Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trivial SMES units don't check for exact power when charging
#1
SMES units wait 5 ticks before charging. The check to increment the "start charging" counter or not is:

"input < incoming power"

This means that it won't charge if it's receiving exactly the amount of power the input is set to. It needs to be:

"input ≤ incoming power"

Once the SMES unit starts charging, it uses the latter to determine if it should continue charging or stop.

Effectively, this means that to get an APC to charge off of a fixed value, like a furnace, you need to set the SMES input to 4900 (or 100 less than whatever the total is) until it starts charging, at which point you can tick it back up to the full value.

It would be nice if the wait-to-charge thing was indicated somewhere as well, because there's no indication if the settings are right until it actually begins charging.
Reply
#2
do you know where this code is located? it would be nice if, since you know where the check is located, you could provide the erroneous line
Reply
#3
I didn't actually know where it was; I merely used psychic debugging and observation.

The section (and line) in question is here: obj/machinery/power/smes.dm:143
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)