This Mod fixes some Bugs I found in the original game during the development of my Electricity Overhaul Mod. I've extracted these into its own project, since they also fix some edge-cases with the vanilla game implementation.
You need to disable EAC to use this mod!
If you configure a Motion Sensor or a Trip Wire to have a power runtime and trigger it permanently, the trigger will constantly turn itself off after the duration and then on again. This fix will reset the duration as long as the trigger is active, therefore only counting down the duration once the trigger is deactivated (e.g. target moved out of range/sight).
Note: I believe this is actually a bug in the original code, since the correct implementation seems to be there, but simply one level nested too deeply inside another (unrelated) condition.
This Bug can be seen if you connect three TripWire posts, resulting
in two actual wires that you can configure. Leave the first one on
instant
triggers (default) and set the second to have a duration
of e.g. 1 minute (also connect some bulbs to see trigger states).
Now if you activate the second trip-wire, the bulb should light up for one minute, but once you walk through the first wire, the second is also instantly deactivated.
This Bug can be seen if you connect a pressure plate and set it to
have a start delay and power duration to triggered
. If you quickly
step over the plate, the power will go on after the delay but never
turn off. Power should never be on in the first place in this case.
This applies also to trip wires and motion sensors.
When the save game doesn't load correctly or is aborted too early, the PowerManager will still write it's state to disk, even though it might not have been loaded yet, thus overwriting existing save. Note that this Bug seems fixed with A21, but my fix is still included, as it may add even a bit more protection and it doesn't hurt.
- Change mod folder to add OCB prefix
- Update compatibility for 7D2D A21.0(b324)
- Fix visual glitch with power switch emission
- Add potential fix for [vanilla power.dat reset bug][1]
- Automated deployment and release packaging
- Fix
AudioSource_InteractFullVolume
not found issue
- Rework fix how trigger groups are disconnected
- Refactor for A20 compatibility
Simply download here from GitHub and put into your A21 Mods folder:
- https://github.com/OCB7D2D/OcbElectricityWorkarounds/releases (preferred method)
- https://github.com/OCB7D2D/OcbElectricityWorkarounds/archive/master.zip (master branch)
Developed initially for version A20(b218), updated through A21.2(b37)