From ddaa3eb594a8dc6656529306ccdf9f9a240a3588 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sat, 30 Jun 2018 16:50:55 -0600 Subject: Just in case, overheating in muggle mode triggers an immediate drop to the floor. Because WTF. This basically can't happen unless someone is doing something very stupid. --- spaghetti-monster/anduril/anduril.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c index f2d02ee..e79d568 100644 --- a/spaghetti-monster/anduril/anduril.c +++ b/spaghetti-monster/anduril/anduril.c @@ -1219,6 +1219,18 @@ uint8_t muggle_state(EventPtr event, uint16_t arg) { } return MISCHIEF_MANAGED; } + #ifdef USE_THERMAL_REGULATION + // overheating is handled specially in muggle mode + else if(event == EV_temperature_high) { + // don't even try... + // go immediately to the bottom, in case someone put the light on + // maximum while wrapped in dark-colored flammable insulation + // or something, because muggles are cool like that + // memorized_level = MUGGLE_FLOOR; // override memory? maybe not + set_level(MUGGLE_FLOOR); + return MISCHIEF_MANAGED; + } + #endif // low voltage is handled specially in muggle mode else if(event == EV_voltage_low) { uint8_t lvl = (actual_level >> 1) + (actual_level >> 2); -- cgit v1.2.3