Merge pull request #12002 from Markolie/falsewallfix

False wall secure fix, add extra step to plating deconstruction
This commit is contained in:
Fox McCloud
2019-08-21 01:31:21 -04:00
committed by GitHub
2 changed files with 20 additions and 6 deletions
+2 -5
View File
@@ -97,12 +97,9 @@
else
icon_state = "fwall_open"
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
/obj/structure/falsewall/proc/ChangeToWall(delete = TRUE)
var/turf/T = get_turf(src)
if(!walltype || walltype == "metal")
T.ChangeTurf(/turf/simulated/wall)
else
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[walltype]"))
T.ChangeTurf(walltype)
if(delete)
qdel(src)
return T
+18 -1
View File
@@ -7,6 +7,8 @@
broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
burnt_states = list("floorscorched1", "floorscorched2")
var/unfastened = FALSE
footstep_sounds = list(
"human" = list('sound/effects/footstep/plating_human.ogg'),
"xeno" = list('sound/effects/footstep/plating_xeno.ogg')
@@ -31,6 +33,12 @@
if(!broken && !burnt)
icon_state = icon_plating //Because asteroids are 'platings' too.
/turf/simulated/floor/plating/examine(mob/user)
. = ..()
if(unfastened)
to_chat(user, "<span class='warning'>It has been unfastened.</span>")
/turf/simulated/floor/plating/attackby(obj/item/C, mob/user, params)
if(..())
return TRUE
@@ -64,7 +72,16 @@
to_chat(user, "<span class='warning'>This section is too damaged to support a tile! Use a welder to fix the damage.</span>")
return TRUE
else if(iswelder(C))
else if(isscrewdriver(C))
var/obj/item/screwdriver/screwdriver = C
to_chat(user, "<span class='notice'>You start [unfastened ? "fastening" : "unfastening"] [src].</span>")
playsound(src, screwdriver.usesound, 50, 1)
if(do_after(user, 20 * screwdriver.toolspeed, target = src) && screwdriver)
to_chat(user, "<span class='notice'>You [unfastened ? "fasten" : "unfasten"] [src].</span>")
unfastened = !unfastened
return TRUE
else if(iswelder(C) && unfastened)
var/obj/item/weldingtool/welder = C
if(welder.isOn())
if(!welder.remove_fuel(0, user))