FortressCraft Evolved

FortressCraft Evolved

Not enough ratings
NukerProof Rooms
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
917.607 KB
8 Jan, 2019 @ 5:12pm
29 Jul, 2022 @ 5:28pm
2 Change Notes ( view )

Subscribe to download
NukerProof Rooms

Description
This mod prevents Tunnel Nukers from destroying room cubes, grommets, alloyed space window, or multi-block machine placements without the need for modded cubes or altering built in cube definitions.

Updates

Update 7/29/2022:
- Update Harmony library to 2.2.2

Update 1/8/2019:
- Initial test release.
14 Comments
ack_ptbhbhbhb 12 Jul, 2020 @ 2:10pm 
I'm thinking of doing a multi-layered approach:
1. Build the CCCC on the very bottom of the cold cavern layer, so Cryoplasm spawners are below my smelting areas and don't interfere - essentially build it at z=-278, x/y=+/- 320, y/x=+/-160
2. Build rooms (this is where this mod comes in) around the eight spawn points. This will be ineffective because the Cryoplasm will block the room controler's line of sight to the walls.
3. Build rooms (skinny ones) between the spawners and the CCCC.
4. Armor the shafts down (which should also be away from the paths used by the Cryoplasm) in basic conveyors.

At that point, build the CCCC, then as resources permit:
5. Set a MK4 battery with conduits (which aren't blocked by cryoplasm) right on top of the CCCC. Maybe connect it with LPT's if I have to (in contact, so the cryoplasm can't interrupt power flow)
6. Place lancers all over the above battery.
7. place lancers in a ring around the CCCC
ack_ptbhbhbhb 12 Jul, 2020 @ 2:10pm 
Does this work against Cryoplasm? The cryoplasm destroying my rooms every time I turned around was my primary problem last time. Totally pain in the ass, and every time my framerate completely tanks.
Wariat117 14 Mar, 2019 @ 7:54am 
I thought that prefix function should have the same type as vanilla funcation it overrides ;-;

So, since I do void functions, __result shouldn't interest me for now.

I didn't know that harmony is something external... I thought it's something created for FCE mods, the modding pdf mentions that it is possible to override classes... But doesn't say how to do it (I guessed that harmony is the way)

edit:
Thanks, for answers, changing void->bool and adding return false; fixes all problems for me.
Mad Vandal  [author] 14 Mar, 2019 @ 4:38am 
If the prefix method has a boolean return then that determines if the original code is run after. __result is added to provide the actual return value. Recommend you see Harmony docs for details. You can override anything provided it hasn't already been run through the JIT compiler.
Wariat117 13 Mar, 2019 @ 3:26pm 
The only difference between your code and mine code (that I have found) is __result... but void doesn't have result, does it?

Also adding "return;" somewhere in my code doesn't prevent the vanilla code from being loaded.
In case it's important, it's about this mod:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1681249573
Depending on your answer I will have to apply different fix ;d
Wariat117 13 Mar, 2019 @ 2:59pm 
Hello Mad,

How does the modifying with harmony works :D?
I have used it in my mod... and it seems to add my code infront of the vanilla's code, basically doubling certain stuff (or vanilla overriding my stuff)

Is it possible to prevent game from loading vanilla code and use my code instead?
I'm overriding this:
in the Class PyrothermicGenerator, functions:
public override void LowFrequencyUpdate()
public override void Write(BinaryWriter writer)
public override void Read(BinaryReader reader, int entityVersion)

and in the Class UIManager, function:
private void UpdatePyrothermicGeneratorPopup()


The fact that it adds my code instead of overriding it causes small oddities (not really important tho)
ZaGeR 14 Feb, 2019 @ 8:22am 
Oh thank you! Tunnel Nukers recently broke me my room.:lunar2019madpig:
Wariat117 13 Jan, 2019 @ 12:06am 
You could leave comment on the mod's page ;D
It seems that steam doesn't give notifications if person who isn't creator comments there...
So... What's the problem?
Transendence 9 Jan, 2019 @ 3:18pm 
(however i have a solid fix for that mod but i personaly do not have time to do myself.)
Transendence 9 Jan, 2019 @ 3:17pm 
>and we need to chat about the portable base.< >its all bad< pls convey with myself or mad v on this matter when you have time Wariat117