File tree 1 file changed +9
-7
lines changed
code/modules/power/lighting
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 196
196
197
197
/ obj / machinery/ light/ proc / handle_fire( area / source, new_fire)
198
198
SIGNAL_HANDLER
199
- update ()
199
+ update (dont_burn_out = TRUE )
200
200
201
201
// update the icon_state and luminosity of the light depending on its state
202
- / obj / machinery/ light/ proc / update(trigger = TRUE )
202
+ / obj / machinery/ light/ proc / update(trigger = TRUE , dont_burn_out = FALSE )
203
203
switch (status)
204
204
if (LIGHT_BROKEN ,LIGHT_BURNED ,LIGHT_EMPTY )
205
205
on = FALSE
230
230
brightness_set = bulb_outer_range * bulb_major_emergency_brightness_mul
231
231
var /matching = light && brightness_set == light. light_outer_range && power_set == light. light_power && color_set == light. light_color && FC == light. light_falloff_curve && IR == light. light_inner_range
232
232
if (! matching)
233
- switchcount++
234
- if ( prob( min(60 , (switchcount** 2 )* 0.01 ) ) )
235
- if (trigger)
233
+ var /should_set = TRUE
234
+ if (! dont_burn_out)
235
+ switchcount++
236
+ if (trigger && prob(min(60 , (switchcount ** 2 ) * 0.01 )))
236
237
burn_out ()
237
- else
238
+ should_set = FALSE
239
+ if (should_set)
238
240
use_power = ACTIVE_POWER_USE
239
241
set_light (
240
242
l_outer_range = brightness_set,
241
243
l_inner_range = IR ,
242
244
l_power = power_set,
243
245
l_falloff_curve = FC ,
244
246
l_color = color_set
245
- )
247
+ )
246
248
else if (has_emergency_power(LIGHT_EMERGENCY_POWER_USE ) && ! turned_off())
247
249
use_power = IDLE_POWER_USE
248
250
low_power_mode = TRUE
You can’t perform that action at this time.
0 commit comments