[Request] Colonists Don't Trigger Traps

Started by Epson, July 26, 2016, 02:18:40 PM

Previous topic - Next topic

Epson

As the title says. Willing to mod it myself if it is simple and someone can point me in the right direction.

1000101

You'd need to detour the code which triggers traps to cause colonists to not trigger them.  CCL can help you with that but you still need to write the replacement method.  Specifically you want the class Building_Trap and the method Tick().

The reason you'd need a detour and not just inherit and extend the class is that you'd then have to remake the buildings which extend Building_Trap, Building_TrapExplosive and Building_TrapRearmable, to inherit from your new Building_Trap.  Detouring means that no inheritance is needed and all mod added traps would use the same functionality which you have defined in your detoured method.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Jaxxa

Sounds like an interesting idea. I will have a look into this.