mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Fixes and guards against strange values
This commit is contained in:
@@ -52,10 +52,13 @@ var/list/wood_icons = list("wood","wood-broken")
|
|||||||
return lightfloor_state & LIGHTFLOOR_ON_BIT
|
return lightfloor_state & LIGHTFLOOR_ON_BIT
|
||||||
|
|
||||||
proc/set_lightfloor_state(n)
|
proc/set_lightfloor_state(n)
|
||||||
lightfloor_state = get_lightfloor_on() | n
|
lightfloor_state = get_lightfloor_on() | (n & LIGHTFLOOR_STATE_BITS)
|
||||||
|
|
||||||
proc/set_lightfloor_on(n)
|
proc/set_lightfloor_on(n)
|
||||||
lightfloor_state = get_lightfloor_state() | n
|
if(n)
|
||||||
|
lightfloor_state |= LIGHTFLOOR_ON_BIT
|
||||||
|
else
|
||||||
|
lightfloor_state &= ~LIGHTFLOOR_ON_BIT
|
||||||
|
|
||||||
proc/toggle_lightfloor_on()
|
proc/toggle_lightfloor_on()
|
||||||
lightfloor_state ^= LIGHTFLOOR_ON_BIT
|
lightfloor_state ^= LIGHTFLOOR_ON_BIT
|
||||||
@@ -482,6 +485,10 @@ turf/simulated/floor/proc/update_icon()
|
|||||||
user << "\red You forcefully pry off the planks, destroying them in the process."
|
user << "\red You forcefully pry off the planks, destroying them in the process."
|
||||||
else
|
else
|
||||||
var/obj/item/I = new floor_type(src)
|
var/obj/item/I = new floor_type(src)
|
||||||
|
if(is_light_floor())
|
||||||
|
var/obj/item/stack/tile/light/L = I
|
||||||
|
L.on = get_lightfloor_on()
|
||||||
|
L.state = get_lightfloor_state()
|
||||||
user << "\red You remove the [I.name]."
|
user << "\red You remove the [I.name]."
|
||||||
|
|
||||||
make_plating()
|
make_plating()
|
||||||
|
|||||||
Reference in New Issue
Block a user