d-rafferty / lethal-tube-removal

Lethal Company mod that allows for deletion of items in the ship through config files.
2 stars 1 forks source link

Compatibility/Request: Optionally change the way you remove items #43

Closed NeatWolf closed 2 months ago

NeatWolf commented 4 months ago

Hi there! Thanks for developing the mod, you managed to spark a lot of ideas in the community - one cable removed at a time ;)

Premise:

The biggest offending issue according to most mod developers is that LTR "destroys" whole pieces of the ship - so every mod that uses those pieces as a reference or a base for something begins to break.

Whilst you could argue "just make null checks", it's true that sometimes the position or the gameobject the player doesn't want to see is perhaps essential. Sometimes mods crash or cause a chain reaction just because a user wants to "hide" some elements via LTR.

Request:

You could, for instance, have a single method "LethalRemove" called every time you remove something via the config, that internally executes the removal according to the user preference. So some valid options/modes could be:

I know it may sound like a lot of boilerplate, but it would allow users to be a little bit more informed about the risks of hiding (currently destroying) certain objects, and considerably reduce the reported issues indirectly caused by what users think is a "visual" mod only :) Big wins for everyone :)

I'd advise switching the removal method to the safest one, letting users have more control on when they also want to be muted.

I understand it's a big change but would really be greatly appreciated not just by me, but by a lot of other modders/users on the official discord modding server @https://discord.gg/Z5Ma6mcC who didn't want to bother you with such a request :)

I'm personally crossing my fingers you may agree on the importance of such a change and hope you have the time and will to make such changes ^_^

Thanks again for your time and for developing this mod!

d-rafferty commented 4 months ago

Yes absolutely! I already have a small few items that use SetActive() because deleting them was interfering with vanilla ship functions. I'll implement that as well and then probably just default to disabled renderers.

When I started writing this mod it was just a few items for some friends that didn't like the ship layout so compatibility was not something that was ever even considered. However I'd say it's definitely due for this change given how many people come here with issues. I can't imagine the amount of people in other repos with bug reports that lead to tireless digging just to find out they deleted a shelf or something with my mod..

I'll get to work on this and hopefully have a release soon. Thanks for stopping by and for the great suggestion. I really appreciate it.

d-rafferty commented 4 months ago

Okay! Finally got around to getting this done. Hopefully this alleviates some of the issues. There are a few more details in the pull request, but this changes all of the inside of the ship items to deactivate the renderer by default. Outside of the ship items will be done as well, but for the time being I assume most if not all conflicts come from the inside-ship items.

I do also need to change some of the store-bought things such as the teleporter too but that will be fine, just wanted to get this out as soon as possible as it's been a few weeks.

I will be implementing these changes in the coming days. If anyone has any issues/suggestions, please let me know!

This will go up with v1.7.0

d-rafferty commented 4 months ago

did not intentionally close this issue.

d-rafferty commented 4 months ago

Sorry it's been a long week.. lol. I think I had to have been sleep deprived and hallucinating when I wrote that patch update. As of now the objects are only removed via SetActive()

Working on the update to turn off renderer and colliders now.

d-rafferty commented 4 months ago

Finally got it sorted. I have some notes in the PR, such that I ran out of time today before getting the Storage Closet completely working, but it should be fine for now.

I will get around to doing the outside of the ship soon but as previously stated the inside was obviously the priority.

If I missed, or goofed anything, please let me know! Thanks for the suggestion @NeatWolf I hope it helps the community save some headache (crossing my fingers)

Definitely need to run some code cleanup after that lol.

will be in v1.7.5 - #53