mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Replace opacity = X with set_opacity(X) so that the lighting system can update propertly.
This commit is contained in:
@@ -162,9 +162,9 @@
|
|||||||
smoke.pixel_x = -32 + rand(-8, 8)
|
smoke.pixel_x = -32 + rand(-8, 8)
|
||||||
smoke.pixel_y = -32 + rand(-8, 8)
|
smoke.pixel_y = -32 + rand(-8, 8)
|
||||||
walk_to(smoke, T)
|
walk_to(smoke, T)
|
||||||
smoke.opacity = 1 //switching opacity on after the smoke has spawned, and then
|
smoke.set_opacity(1) //switching opacity on after the smoke has spawned, and then
|
||||||
sleep(150+rand(0,20)) // turning it off before it is deleted results in cleaner
|
sleep(150+rand(0,20)) // turning it off before it is deleted results in cleaner
|
||||||
smoke.opacity = 0 // lighting and view range updates
|
smoke.set_opacity(0) // lighting and view range updates
|
||||||
fadeOut(smoke)
|
fadeOut(smoke)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/structure/curtain/proc/toggle()
|
/obj/structure/curtain/proc/toggle()
|
||||||
opacity = !opacity
|
set_opacity(!opacity)
|
||||||
if(opacity)
|
if(opacity)
|
||||||
icon_state = "closed"
|
icon_state = "closed"
|
||||||
layer = SHOWER_CLOSED_LAYER
|
layer = SHOWER_CLOSED_LAYER
|
||||||
|
|||||||
@@ -32,9 +32,9 @@
|
|||||||
name = "[material.display_name] door"
|
name = "[material.display_name] door"
|
||||||
color = material.icon_colour
|
color = material.icon_colour
|
||||||
if(material.opacity < 0.5)
|
if(material.opacity < 0.5)
|
||||||
opacity = 0
|
set_opacity(0)
|
||||||
else
|
else
|
||||||
opacity = 1
|
set_opacity(1)
|
||||||
if(material.products_need_process())
|
if(material.products_need_process())
|
||||||
processing_objects |= src
|
processing_objects |= src
|
||||||
update_nearby_tiles(need_rebuild=1)
|
update_nearby_tiles(need_rebuild=1)
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
flick("[material.door_icon_base]opening",src)
|
flick("[material.door_icon_base]opening",src)
|
||||||
sleep(10)
|
sleep(10)
|
||||||
density = 0
|
density = 0
|
||||||
opacity = 0
|
set_opacity(0)
|
||||||
state = 1
|
state = 1
|
||||||
update_icon()
|
update_icon()
|
||||||
isSwitchingStates = 0
|
isSwitchingStates = 0
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
flick("[material.door_icon_base]closing",src)
|
flick("[material.door_icon_base]closing",src)
|
||||||
sleep(10)
|
sleep(10)
|
||||||
density = 1
|
density = 1
|
||||||
opacity = 1
|
set_opacity(1)
|
||||||
state = 0
|
state = 0
|
||||||
update_icon()
|
update_icon()
|
||||||
isSwitchingStates = 0
|
isSwitchingStates = 0
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
set_light(0)
|
set_light(0)
|
||||||
src.blocks_air = 0
|
src.blocks_air = 0
|
||||||
src.opacity = 0
|
set_opacity(0)
|
||||||
for(var/turf/simulated/turf in loc)
|
for(var/turf/simulated/turf in loc)
|
||||||
air_master.mark_for_update(turf)
|
air_master.mark_for_update(turf)
|
||||||
else
|
else
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
set_light(1)
|
set_light(1)
|
||||||
src.blocks_air = 1
|
src.blocks_air = 1
|
||||||
src.opacity = 1
|
set_opacity(1)
|
||||||
for(var/turf/simulated/turf in loc)
|
for(var/turf/simulated/turf in loc)
|
||||||
air_master.mark_for_update(turf)
|
air_master.mark_for_update(turf)
|
||||||
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@
|
|||||||
|
|
||||||
if(growth>2 && growth == max_growth)
|
if(growth>2 && growth == max_growth)
|
||||||
layer = 5
|
layer = 5
|
||||||
opacity = 1
|
set_opacity(1)
|
||||||
if(!isnull(seed.chems["woodpulp"]))
|
if(!isnull(seed.chems["woodpulp"]))
|
||||||
density = 1
|
density = 1
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -70,11 +70,11 @@
|
|||||||
|
|
||||||
// Create a decorative ramp bottom and flatten out our current ramp.
|
// Create a decorative ramp bottom and flatten out our current ramp.
|
||||||
density = 0
|
density = 0
|
||||||
opacity = 0
|
set_opacity(0)
|
||||||
icon_state = "ramptop"
|
icon_state = "ramptop"
|
||||||
var/obj/structure/droppod_door/door_bottom = new(T)
|
var/obj/structure/droppod_door/door_bottom = new(T)
|
||||||
door_bottom.deployed = 1
|
door_bottom.deployed = 1
|
||||||
door_bottom.density = 0
|
door_bottom.density = 0
|
||||||
door_bottom.opacity = 0
|
door_bottom.set_opacity(0)
|
||||||
door_bottom.dir = src.dir
|
door_bottom.dir = src.dir
|
||||||
door_bottom.icon_state = "rampbottom"
|
door_bottom.icon_state = "rampbottom"
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
playsound(src.loc, 'sound/effects/EMPulse.ogg', 75, 1)
|
playsound(src.loc, 'sound/effects/EMPulse.ogg', 75, 1)
|
||||||
|
|
||||||
check_failure()
|
check_failure()
|
||||||
opacity = 1
|
set_opacity(1)
|
||||||
spawn(20) if(src) opacity = 0
|
spawn(20) if(!deleted(src)) set_opacity(0)
|
||||||
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -63,8 +63,8 @@
|
|||||||
health -= Proj.get_structure_damage()
|
health -= Proj.get_structure_damage()
|
||||||
..()
|
..()
|
||||||
check_failure()
|
check_failure()
|
||||||
opacity = 1
|
set_opacity(1)
|
||||||
spawn(20) if(src) opacity = 0
|
spawn(20) if(!deleted(src)) set_opacity(0)
|
||||||
|
|
||||||
/obj/machinery/shield/ex_act(severity)
|
/obj/machinery/shield/ex_act(severity)
|
||||||
switch(severity)
|
switch(severity)
|
||||||
@@ -113,8 +113,8 @@
|
|||||||
check_failure()
|
check_failure()
|
||||||
|
|
||||||
//The shield becomes dense to absorb the blow.. purely asthetic.
|
//The shield becomes dense to absorb the blow.. purely asthetic.
|
||||||
opacity = 1
|
set_opacity(1)
|
||||||
spawn(20) if(src) opacity = 0
|
spawn(20) if(!deleted(src)) set_opacity(0)
|
||||||
|
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user