-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
map_in_city
says you're not in a city when you very clearly are
#74177
Comments
map_in_city
is inconsistentmap_in_city
says you're not in a city when you very clearly are
If I get the time I'll make the new city check from #71822 it's own PR and hook up everything to that, other than maybe non 0 city distance bc idk if that would be performance efficient or not |
If you're not on z0 how do you think it would be best to work? |
Hmm. I would count any distance up (I think skyscrapers go up to Z: 9), and down to -1 at least for basements and the sewers. A cylinder would be easier but you'd end up with circumstances where some labs were partially in a city and partially not--not sure if subterranean labs should count as in the city or not. |
Edit: pretty much the above comment I would argue against it, since you can run around the underground, not knowing there is a city above you. On the other hand, if you are in a cellar in a building, you still are in a city... So leaking that information isn't that bad. But then maybe mark it as a city only from z=-1 (deepest cellar) up as a compromise. |
Describe the bug
When working on #74175, I noticed that
map_in_city
would repeatedly return false even when I was clearly inside the city limits.Attach save file
Darfur-trimmed.tar.gz
Steps to reproduce
Place the following JSON somewhere where it loads:
{ "type": "effect_on_condition", "id": "EOC_CONDITION_CHECK_HOMULLUS_IN_CIVILIZATION_ON_OMT_ENTER", "eoc_type": "EVENT", "required_event": "avatar_enters_omt", "condition": { "u_has_trait": "HOMULLUS" }, "effect": [ { "run_eocs": [ { "id": "EOC_CONDITION_CHECK_HOMULLUS_IN_CIVILIZATION_ON_OMT_ENTER_2", "condition": { "or": [ { "test_eoc": "EOC_CONDITION_HOMULLUS_NEAR_FACTION" }, { "map_in_city": { "mutator": "loc_relative_u", "target": "(0,0,0)" } } ] }, "effect": [ { "math": [ "u_homullus_is_in_civilization", "=", "1" ] }, { "u_message": "You are in a civilized OMT." } ], "false_effect": [ { "math": [ "u_homullus_is_in_civilization", "=", "0" ] }, { "u_message": "You are NOT in a civilized OMT." } ] } ] } ] }
Load game.
Run west. Check when you start receiving the "You are NOT in a civilized OMT" and compare it to the city area on the map.
Expected behavior
map_in_city
matches the city limits that are visible on your map.Screenshots
map_in_city
returned false for this location:Once I moved north to here, it returned true:
Similarly, over here on the edge of town returns true:
But this spot returns false:
it's not until two OMTs to the east of that picture that it begins returning true.
Versions and configuration
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Portal Storms Ignore NPCs [personal_portal_storms],
Slowdown Fungal Growth [no_fungal_growth],
Xedra Evolved [xedra_evolved]
]
Additional context
No response
The text was updated successfully, but these errors were encountered: