LoafOrc / FacilityMeltdown

Maybe taking the appartus isn't such a great idea...
8 stars 6 forks source link

[Suggestion] Make the ship react more to the reactor meltdown #40

Closed LinkTroisUn closed 2 months ago

LinkTroisUn commented 2 months ago

Hi,

I had a few ideas to add to your mod. The main one was : what if the ship did not automatically take off when the nuclear explosion occured ? So, I open this pull request to share this idea. Below is listed the commit message that explains what I have changed. Also, here is an unlisted video showing the effects I added. The changes are compatible with both v49 and v50, assuming the mod has been compiled with the proper version of the game.

-Once the meltdown starts, all ship lights (including roof ones) turn to red, and start blinking (if enabled in config). The less time remains before the explosion, the faster they blink. -Door control cease to function. From time to time (each 10s actually), the doors are toggled -30s before the explosion, some screens and the door power display die. -3s before the explosion, the lever used to take off cease to function :) (of course, the ship won't take off on its own) -Players are no longer safe inside the ship : if they are hit by the shockwave inside the ship, they'll die

All these effects are only applied if the new config entry ENABLE_SHIP_MALFUNCTION is set to true. If it is left to false (default), the mod behaves normally

LoafOrc commented 2 months ago

Hey thanks for taking the time to write code for this, but unfortunately I won't be merging this. I'd be down to help you turn this into a companion mod (like FacilityMeltdownPatch or MeltdownChance) but it won't be in the main one.

The main issues I have design wise are follows:

I also understand that most(?) of it is behind a config option and that it wouldn't ruin most players experience. However I don't really like the idea of having a single config option completely change the experience of Meltdown.

(Also the pr would require a bit more of work to have it follow the same principals that I use in case I would have to maintain this code)

Won't be closing incase you want to discuss turning it into a separate mod.

LinkTroisUn commented 2 months ago

I understand. So, I'll make it a mod companion instead. At first, I did not know that you could patch another mod. That was why I made a pull request instead of directly making a new mod.

So far, the only thing that I have not been able to make work yet, is to prevent the ship from leaving when the explosion occurs. Would you have any idea how to implement that ?

LoafOrc commented 2 months ago

Yeah patching other mods is usually not what happens but it is very possible. As for stopping the ship leaving you'd need to stop the ShipTakeOff() from being fired

LoafOrc commented 2 months ago

hooray! https://thunderstore.io/c/lethal-company/p/ShipMeltdown/ShipMeltdown/