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_y = -32 + rand(-8, 8)
|
||||
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
|
||||
smoke.opacity = 0 // lighting and view range updates
|
||||
smoke.set_opacity(0) // lighting and view range updates
|
||||
fadeOut(smoke)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
..()
|
||||
|
||||
/obj/structure/curtain/proc/toggle()
|
||||
opacity = !opacity
|
||||
set_opacity(!opacity)
|
||||
if(opacity)
|
||||
icon_state = "closed"
|
||||
layer = SHOWER_CLOSED_LAYER
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
name = "[material.display_name] door"
|
||||
color = material.icon_colour
|
||||
if(material.opacity < 0.5)
|
||||
opacity = 0
|
||||
set_opacity(0)
|
||||
else
|
||||
opacity = 1
|
||||
set_opacity(1)
|
||||
if(material.products_need_process())
|
||||
processing_objects |= src
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
@@ -99,7 +99,7 @@
|
||||
flick("[material.door_icon_base]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
set_opacity(0)
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
@@ -111,7 +111,7 @@
|
||||
flick("[material.door_icon_base]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
set_opacity(1)
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
update_icon()
|
||||
set_light(0)
|
||||
src.blocks_air = 0
|
||||
src.opacity = 0
|
||||
set_opacity(0)
|
||||
for(var/turf/simulated/turf in loc)
|
||||
air_master.mark_for_update(turf)
|
||||
else
|
||||
@@ -21,7 +21,7 @@
|
||||
update_icon()
|
||||
set_light(1)
|
||||
src.blocks_air = 1
|
||||
src.opacity = 1
|
||||
set_opacity(1)
|
||||
for(var/turf/simulated/turf in loc)
|
||||
air_master.mark_for_update(turf)
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
if(growth>2 && growth == max_growth)
|
||||
layer = 5
|
||||
opacity = 1
|
||||
set_opacity(1)
|
||||
if(!isnull(seed.chems["woodpulp"]))
|
||||
density = 1
|
||||
else
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
|
||||
// Create a decorative ramp bottom and flatten out our current ramp.
|
||||
density = 0
|
||||
opacity = 0
|
||||
set_opacity(0)
|
||||
icon_state = "ramptop"
|
||||
var/obj/structure/droppod_door/door_bottom = new(T)
|
||||
door_bottom.deployed = 1
|
||||
door_bottom.density = 0
|
||||
door_bottom.opacity = 0
|
||||
door_bottom.set_opacity(0)
|
||||
door_bottom.dir = src.dir
|
||||
door_bottom.icon_state = "rampbottom"
|
||||
@@ -54,8 +54,8 @@
|
||||
playsound(src.loc, 'sound/effects/EMPulse.ogg', 75, 1)
|
||||
|
||||
check_failure()
|
||||
opacity = 1
|
||||
spawn(20) if(src) opacity = 0
|
||||
set_opacity(1)
|
||||
spawn(20) if(!deleted(src)) set_opacity(0)
|
||||
|
||||
..()
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
health -= Proj.get_structure_damage()
|
||||
..()
|
||||
check_failure()
|
||||
opacity = 1
|
||||
spawn(20) if(src) opacity = 0
|
||||
set_opacity(1)
|
||||
spawn(20) if(!deleted(src)) set_opacity(0)
|
||||
|
||||
/obj/machinery/shield/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -113,8 +113,8 @@
|
||||
check_failure()
|
||||
|
||||
//The shield becomes dense to absorb the blow.. purely asthetic.
|
||||
opacity = 1
|
||||
spawn(20) if(src) opacity = 0
|
||||
set_opacity(1)
|
||||
spawn(20) if(!deleted(src)) set_opacity(0)
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user