-
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
Fix mission reference to nonexistent om_terrain #76684
Fix mission reference to nonexistent om_terrain #76684
Conversation
This caused a duplicate evac_center to be created
Worth backporting if this bug existed on 0.H |
I haven't checked yet but I suspect this bug existed back to at least 0.F |
@RenechCDDA what is the process for a backport? |
Just open a new PR targeting the 0.H branch with your changes. You should be able to cherry pick the commit right onto your new branch, there shouldn't be any merge conflicts. |
Apparently this has flipped back and forth recently and wasn't buggy for some previous versions. I got a dozen commits deep in tracking down which versions of the terrain names matched vs didn't and gave up. I think it's ok in 0.H-branch see #70847 |
For posterity this PR didn't do anything, refctr_S3e is still a valid om_terrain, the assign_mission_target field doesn't expect a rotation and even if it did the one you've changed it to doesn't have a rotation so I'm slightly confused what you thought this did '^^ |
@Procyonae What I thought was happening here is that the mission code was looking for an OMT of type Also, just in general, it was weird for this single mission to reference a different OMT than all the other "find or create the refugee center" mission definitions. I can look into this again if you're saying that's not what was going on? |
refctr_S3e does exist within the om_special and exists anywhere that evac_center_18 exists
so unless it's right on the edge of the search range this yields the exact same results (I left that id alone at the time bc the computers search for that OMT and I planned on making the unique behaviour of that function exposed to the json methods but never figured it out over multiple attempts) You're correct in that it's failing to find it and then force placing the special though ye, again though this wants generic C++ solutions to allow you to define in json what to do if one can't be found, like minor radiant NPC quests should probably just say they "can't remember where it was actually" or whatever while faction "main questlines" should probably force place.
so you'd only see the start mission dialog if a target is found and it would only do the search once for that npc. I think that would work fine but it's very cumbersome to tack onto every minor mission and if an NPC had lots of minor missions it'd do all the searches as soon as the dialog is available which given the lag 1 large search can cause probably isn't ideal |
I wasn't able to find the code path that would add the direction suffix and allow |
If you thought lacking the rotation was the issue (which it isn't, why would you want to make it _north and only match 1/4 of the time?), why did you think changing it to "evac_center_18" without specifying a rotation would help? |
Because And also, again, because the other two similar missions use |
I literally linked the line where refctr_S3e is also there, I don't understand why you're so adamant it not being despite that and turning it into an argument lol, like I said to start I'm merely pointing this out for posterity for anyone confused by this change in the future |
Summary
Bugfixes "Scrap trader mission no longer generates duplicate refugee center"
Purpose of change
The refugee center should be globally unique.
Describe the solution
The mission referenced an old
om_terrain
"refctr_S3e"
which doesn't exist any more. I replaced this with the same"evac_center_18"
that is used in the equivalent chemist and lumbermill missions.Describe alternatives you've considered
"refctr_S3e_north"
would refer to the same map in the refugee center as before, but would still be inconsistent with the other missions.Testing
I was not able to reproduce the duplication of the refugee center.
Additional context
Originally reported at https://www.reddit.com/r/cataclysmdda/comments/1fq6w4z/only_164_tiles_to_the_refugee_center_awesome_wait/lp33kmd/ by https://www.reddit.com/user/TheShoopdahoop