hytonhan / Timberborn-SimpleFloodgateTriggers

MIT License
1 stars 3 forks source link

Stream Gauge level threshold can override contamination set points #21

Open traisjames opened 8 months ago

traisjames commented 8 months ago

For the floodgate in attached screenshot, I have set the gate to change it's state based on contamination of a gauge upstream, and only on contamination. However, If the below low contamination is set to 0, then the level seems to take over Screenshot 2023-12-21 at 2 43 50 AM What I want to happen:

set contamination = 0%
if contamination >= 1%
    set gate to height = 3%
else if contaminations <= 0
    set gate to height = 1

What appears to be happening using 0 for the low threshold and using the values I have set in the screenshot:

set contamination = 0%
if contamination >= 1% /// Evaluates false
    set gate to height = 3
if contamination is <= 0% /// Evaluates true, sets height to 1
    set gate to height = 1
if stream gauge >= high threshold /// Evaluates to true, sets height to 0
    set gate to 0
/// everything after this point sets height to 0

I think the quickest fix for this is the low and high thresholds should have their own on/off boxes.

VasVadum commented 7 months ago

Yea, I was about to bring up this issue myself. I want a checkbox for checking height so that I can set a floodgate to check for contamination only. I don't care about height when checking for contamination, and the checkbox would be the fastest and simplest fix.

I would have said something on the mod page but I don't think the author uses the mod page comments at all.