Merge pull request #36258 from vuonojenmustaturska/bepis
Makes the smoke machine deconstructable
This commit is contained in:
committed by
CitadelStationBot
parent
e62f090dad
commit
7650336507
@@ -37,10 +37,13 @@
|
||||
|
||||
/obj/machinery/smoke_machine/update_icon()
|
||||
if((!is_operational()) || (!on) || (reagents.total_volume == 0))
|
||||
icon_state = "smoke0"
|
||||
if (panel_open)
|
||||
icon_state = "smoke0-o"
|
||||
else
|
||||
icon_state = "smoke0"
|
||||
else
|
||||
icon_state = "smoke1"
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/smoke_machine/RefreshParts()
|
||||
var/new_volume = REAGENTS_BASE_VOLUME
|
||||
@@ -62,15 +65,16 @@
|
||||
|
||||
/obj/machinery/smoke_machine/process()
|
||||
..()
|
||||
update_icon()
|
||||
if(!is_operational())
|
||||
return
|
||||
if(reagents.total_volume == 0)
|
||||
on = FALSE
|
||||
update_icon()
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/smoke_test = locate(/obj/effect/particle_effect/smoke) in T
|
||||
if(on && !smoke_test)
|
||||
update_icon()
|
||||
var/datum/effect_system/smoke_spread/chem/smoke_machine/smoke = new()
|
||||
smoke.set_up(reagents, setting*3, efficiency, T)
|
||||
smoke.start()
|
||||
@@ -87,6 +91,10 @@
|
||||
if(default_unfasten_wrench(user, I, 40))
|
||||
on = FALSE
|
||||
return
|
||||
if(default_deconstruction_screwdriver(user, "smoke0-o", "smoke0", I))
|
||||
return
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/smoke_machine/deconstruct()
|
||||
@@ -124,6 +132,7 @@
|
||||
switch(action)
|
||||
if("purge")
|
||||
reagents.clear_reagents()
|
||||
update_icon()
|
||||
. = TRUE
|
||||
if("setting")
|
||||
var/amount = text2num(params["amount"])
|
||||
@@ -132,6 +141,7 @@
|
||||
. = TRUE
|
||||
if("power")
|
||||
on = !on
|
||||
update_icon()
|
||||
if(on)
|
||||
message_admins("[key_name_admin(usr)] activated a smoke machine that contains [english_list(reagents.reagent_list)] at [ADMIN_COORDJMP(src)].")
|
||||
log_game("[key_name(usr)] activated a smoke machine that contains [english_list(reagents.reagent_list)] at [COORD(src)].")
|
||||
|
||||
Reference in New Issue
Block a user