CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
9.77k stars 4.07k forks source link

[Sky Island] Warped reinforcement is stopped by... something? #73641

Open Consoleable opened 3 weeks ago

Consoleable commented 3 weeks ago

Describe the bug

When crafting the "warped reinforcement" upgrade for the main room of the sky island bunker, there is no room expansion

Attach save file

Bonsai-trimmed.tar.gz

Steps to reproduce

Craft "warped reinforcement" No expansion of main room Suffering

Expected behavior

Warped reinforcement should cause the nexus room of the bunker in SI mod to expand. It doesnt seem to want to. Note that in the attached save file, there is another bug related to playernum and mission cleanup, HOWEVER this bug doesnt seem to prevent the other rooms from being expanded, so it seems to be an issue with warped reinforcement

Screenshots

No response

Versions and configuration

Additional context

No response

RenechCDDA commented 3 weeks ago

As far as I can tell the mission's end is being called, EOC effects are activating, mission effects are firing.... it's unclear to me why the mapgen update is not running.

RenechCDDA commented 3 weeks ago

(oops, wrong wrong wrong)

So here's mission_type::parse_funcs() which is called when the mission ends and is supposed to run update_mapgen.

image

update_mapgen is a mission function - it should be in that vector called funcs. The vector is empty. Why? It's called by an eoc - the eoc is of course a talk function :)

RenechCDDA commented 3 weeks ago

After a great deal of stepping through functions, I've found out that... the appliances are getting in the way?!

Here, update_map returns false due to vehicle collision. https://github.com/CleverRaven/Cataclysm-DDA/blob/ef430d2c16b658c37d05cf81cfe8f3370d820334/src/mapgen.cpp#L7843

Destroying all vehicles on the map is sufficient to allow it to work. I thought it was the wall light at first (it's in the path of replaced terrain) but destroying just the wall light is not sufficient. This is very strange (and also it should probably throw a warning on fail!)

Procyonae commented 3 weeks ago

Here, update_map returns false due to vehicle collision.

Ye I noticed that was a thing here #72947 but I weren't entirely sure how to solve it properly. It probably shouldn't throw an error bc map extras use mapgen updates and them failing to be placed is supposed to be silent but potentially we should have some way to call a forced mapgen update in json that doesn't verify and instead throws an error for stuff like this where you do expect it to place 100% of the time.

physics-enthusiast commented 2 weeks ago

Destroying all vehicles on the map is sufficient to allow it to work. I thought it was the wall light at first (it's in the path of replaced terrain) but destroying just the wall light is not sufficient. This is very strange (and also it should probably throw a warning on fail!)

Wait, is it mentioned ingame anywhere that this will destroy appliances? And is there a way to avoid doing so?

Procyonae commented 2 weeks ago

It doesn't destroy appliances it fails because there are appliances, Renech's saying if you do destroy all appliances it will work