mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
TG: r-walls now use smoothwall.dm stuff properly.
fixed a shit-tonne of runtimes and bugs related to sleeps being used for build delays without adequate sanity checks. Should fix the "runtime error: undefined proc or verb /turf/simulated/floor/plating/dismantle wall()" that have been around forever. A bunch of minor fixes like repairing walls not using more metal than it should. Can now repair the first stage of deconstruction with metal rods. Tidied up those HUGE elseif chains a little bit. Tested all seems fine, please let me know if I derped anywhere. Revision: r3410 Author: elly1...@rocketmail.com Date: Apr 7, 2012
This commit is contained in:
@@ -85,6 +85,8 @@
|
||||
#define FILE_DIR "code/js"
|
||||
#define FILE_DIR "code/modules"
|
||||
#define FILE_DIR "code/modules/admin"
|
||||
#define FILE_DIR "code/modules/admin/new"
|
||||
#define FILE_DIR "code/modules/admin/new/verbs"
|
||||
#define FILE_DIR "code/modules/admin/verbs"
|
||||
#define FILE_DIR "code/modules/assembly"
|
||||
#define FILE_DIR "code/modules/chemical"
|
||||
@@ -197,7 +199,6 @@
|
||||
#define FILE_DIR "icons/vending_icons"
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/backup"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/AI"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
for(var/obj/structure/falsewall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falserwall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
junction |= get_dir(src,W)
|
||||
|
||||
/* Commenting this out for now until we figure out what to do with shuttle smooth walls, if anything.
|
||||
As they are now, they sort of work screwy and may need further coding. Or just be scrapped.*/
|
||||
@@ -73,24 +76,25 @@
|
||||
|
||||
return
|
||||
|
||||
/turf/simulated/wall/New()
|
||||
|
||||
/atom/proc/relativewall_neighbours()
|
||||
for(var/turf/simulated/wall/W in range(src,1))
|
||||
W.relativewall()
|
||||
|
||||
for(var/obj/structure/falsewall/W in range(src,1))
|
||||
W.relativewall()
|
||||
for(var/obj/structure/falserwall/W in range(src,1))
|
||||
W.relativewall()
|
||||
return
|
||||
|
||||
/turf/simulated/wall/New()
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
|
||||
/obj/structure/falsewall/New()
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
|
||||
for(var/turf/simulated/wall/W in range(src,1))
|
||||
W.relativewall()
|
||||
|
||||
for(var/obj/structure/falsewall/W in range(src,1))
|
||||
W.relativewall()
|
||||
|
||||
/obj/structure/falserwall/New()
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
|
||||
/*/turf/simulated/shuttle/wall/New()
|
||||
@@ -134,6 +138,8 @@
|
||||
for(var/obj/structure/falsewall/W in range(temploc,1))
|
||||
W.relativewall()
|
||||
|
||||
for(var/obj/structure/falserwall/W in range(temploc,1))
|
||||
W.relativewall()
|
||||
..()
|
||||
|
||||
/*/turf/simulated/shuttle/wall/Del()
|
||||
@@ -144,4 +150,4 @@
|
||||
for(var/turf/simulated/shuttle/wall/W in range(temploc,1))
|
||||
W.relativewall()
|
||||
|
||||
..()*/
|
||||
..()*/
|
||||
|
||||
@@ -290,8 +290,8 @@
|
||||
air_master.tiles_to_update += S
|
||||
return S
|
||||
|
||||
/turf/simulated/wall/New()
|
||||
..()
|
||||
//turf/simulated/wall/New()
|
||||
// ..()
|
||||
|
||||
/turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0)
|
||||
if(istype(src,/turf/simulated/wall/r_wall))
|
||||
@@ -404,295 +404,371 @@
|
||||
|
||||
/turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
||||
var/turf/T = get_turf(user)
|
||||
if (!( istype(T, /turf) ))
|
||||
//get the user's location
|
||||
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
|
||||
|
||||
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
|
||||
if( thermite )
|
||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if( WT.remove_fuel(0,user) )
|
||||
thermitemelt(user)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
thermitemelt(user)
|
||||
return
|
||||
|
||||
if (thermite)
|
||||
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
|
||||
O.name = "Thermite"
|
||||
O.desc = "Looks hot."
|
||||
O.icon = 'fire.dmi'
|
||||
O.icon_state = "2"
|
||||
O.anchored = 1
|
||||
O.density = 1
|
||||
O.layer = 5
|
||||
var/turf/simulated/floor/F = ReplaceWithPlating()
|
||||
F.burn_tile()
|
||||
F.icon_state = "wall_thermite"
|
||||
user << "\red The thermite melts the wall."
|
||||
spawn(100) del(O)
|
||||
F.sd_LumReset()
|
||||
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
|
||||
var/obj/item/weapon/melee/energy/blade/EB = W
|
||||
|
||||
EB.spark_system.start()
|
||||
user << "<span class='notice'>You slash \the [src] with \the [EB]; the thermite ignites!</span>"
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
playsound(src.loc, 'blade1.ogg', 50, 1)
|
||||
|
||||
thermitemelt(user)
|
||||
return
|
||||
|
||||
if (W:remove_fuel(0,user))
|
||||
W:welding = 2
|
||||
user << "\blue Now disassembling the outer wall plating."
|
||||
var/turf/T = user.loc //get user's location for delay checks
|
||||
|
||||
//DECONSTRUCTION
|
||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if( WT.remove_fuel(0,user) )
|
||||
WT.welding = 2
|
||||
|
||||
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
|
||||
sleep(100)
|
||||
if (W && istype(src, /turf/simulated/wall))
|
||||
if ((get_turf(user) == T && user.equipped() == W))
|
||||
user << "\blue You disassembled the outer wall plating."
|
||||
dismantle_wall()
|
||||
W:welding = 1
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !WT || !T ) return
|
||||
WT.welding = 1
|
||||
|
||||
if( user.loc == T && user.equipped() == WT )
|
||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||
dismantle_wall()
|
||||
else
|
||||
user << "\blue You need more welding fuel to complete this task."
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
else if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
|
||||
|
||||
if (thermite)
|
||||
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
|
||||
O.name = "Thermite"
|
||||
O.desc = "Looks hot."
|
||||
O.icon = 'fire.dmi'
|
||||
O.icon_state = "2"
|
||||
O.anchored = 1
|
||||
O.density = 1
|
||||
O.layer = 5
|
||||
var/turf/simulated/floor/F = ReplaceWithPlating()
|
||||
F.burn_tile()
|
||||
F.icon_state = "wall_thermite"
|
||||
user << "\red The thermite melts the wall."
|
||||
spawn(100) del(O)
|
||||
F.sd_LumReset()
|
||||
return
|
||||
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
|
||||
else
|
||||
user << "\blue Now disassembling the outer wall plating."
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
sleep(60)
|
||||
if (W && istype(src, /turf/simulated/wall))
|
||||
if ((get_turf(user) == T && user.equipped() == W))
|
||||
user << "\blue You disassembled the outer wall plating."
|
||||
dismantle_wall()
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced apart."), 2)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Now drilling through wall."
|
||||
sleep(60)
|
||||
if (W && istype(src, /turf/simulated/wall))
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
dismantle_wall(1)
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message(text("\blue The wall was drilled apart by []!", user), 1, text("\red You hear metal being drilled appart."), 2)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == W )
|
||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||
dismantle_wall()
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Now slicing through wall."
|
||||
W:spark_system.start()
|
||||
//DRILLING
|
||||
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
||||
|
||||
user << "<span class='notice'>You begin to drill though the wall.</span>"
|
||||
|
||||
sleep(60)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == W )
|
||||
user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>"
|
||||
dismantle_wall()
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message("<span class='warning'>The wall was drilled through by [user]!</span>", 1, "<span class='warning'>You hear the grinding of metal.</span>", 2)
|
||||
return
|
||||
|
||||
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
|
||||
var/obj/item/weapon/melee/energy/blade/EB = W
|
||||
|
||||
EB.spark_system.start()
|
||||
user << "<span class='notice'>You stab \the [EB] into the wall and begin to slice it apart.</span>"
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
|
||||
sleep(70)
|
||||
if (W && istype(src, /turf/simulated/wall))
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
W:spark_system.start()
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
playsound(src.loc, 'blade1.ogg', 50, 1)
|
||||
dismantle_wall(1)
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !EB || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == W )
|
||||
EB.spark_system.start()
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
playsound(src.loc, 'blade1.ogg', 50, 1)
|
||||
dismantle_wall(1)
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart and sparks flying.</span>", 2)
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/apc_frame))
|
||||
var/obj/item/apc_frame/AH = W
|
||||
AH.try_build(src)
|
||||
return
|
||||
else
|
||||
return attack_hand(user)
|
||||
return
|
||||
|
||||
|
||||
/turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
|
||||
if(!istype(src, /turf/simulated/wall/r_wall))
|
||||
return // this may seem stupid and redundant but apparently floors can call this attackby() proc, it was spamming shit up. -- Doohl
|
||||
//get the user's location
|
||||
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
|
||||
|
||||
|
||||
if (istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
||||
W:eyecheck(user)
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
|
||||
if (thermite)
|
||||
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
|
||||
O.name = "Thermite"
|
||||
O.desc = "Looks hot."
|
||||
O.icon = 'fire.dmi'
|
||||
O.icon_state = "2"
|
||||
O.anchored = 1
|
||||
O.density = 1
|
||||
O.layer = 5
|
||||
var/turf/simulated/floor/F = ReplaceWithPlating()
|
||||
F.burn_tile()
|
||||
F.icon_state = "wall_thermite"
|
||||
user << "\red The thermite melts the wall."
|
||||
spawn(100) del(O)
|
||||
F.sd_LumReset()
|
||||
return
|
||||
|
||||
if (src.d_state == 2)
|
||||
W:welding = 2
|
||||
user << "\blue Slicing metal cover."
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
sleep(60)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
src.d_state = 3
|
||||
user << "\blue You removed the metal cover."
|
||||
W:welding = 1
|
||||
|
||||
else if (src.d_state == 5)
|
||||
W:welding = 2
|
||||
user << "\blue Removing support rods."
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
sleep(100)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
src.d_state = 6
|
||||
new /obj/item/stack/rods( src )
|
||||
user << "\blue You removed the support rods."
|
||||
W:welding = 1
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
|
||||
if (thermite)
|
||||
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
|
||||
O.name = "Thermite"
|
||||
O.desc = "Looks hot."
|
||||
O.icon = 'fire.dmi'
|
||||
O.icon_state = "2"
|
||||
O.anchored = 1
|
||||
O.density = 1
|
||||
O.layer = 5
|
||||
var/turf/simulated/floor/F = ReplaceWithPlating()
|
||||
F.burn_tile()
|
||||
F.icon_state = "wall_thermite"
|
||||
user << "\red The thermite melts the wall."
|
||||
spawn(100) del(O)
|
||||
F.sd_LumReset()
|
||||
return
|
||||
|
||||
if (src.d_state == 2)
|
||||
user << "\blue Slicing metal cover."
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
sleep(40)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
src.d_state = 3
|
||||
user << "\blue You removed the metal cover."
|
||||
|
||||
else if (src.d_state == 5)
|
||||
user << "\blue Removing support rods."
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
sleep(70)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
src.d_state = 6
|
||||
new /obj/item/stack/rods( src )
|
||||
user << "\blue You removed the support rods."
|
||||
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
user << "\blue This wall is too thick to slice through. You will need to find a different path."
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/wrench))
|
||||
if (src.d_state == 4)
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Detaching support rods."
|
||||
playsound(src.loc, 'Ratchet.ogg', 100, 1)
|
||||
sleep(40)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
src.d_state = 5
|
||||
user << "\blue You detach the support rods."
|
||||
|
||||
else if (istype(W, /obj/item/weapon/wirecutters))
|
||||
if (src.d_state == 0)
|
||||
playsound(src.loc, 'Wirecutter.ogg', 100, 1)
|
||||
src.d_state = 1
|
||||
new /obj/item/stack/rods( src )
|
||||
|
||||
else if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if (src.d_state == 1)
|
||||
var/turf/T = user.loc
|
||||
playsound(src.loc, 'Screwdriver.ogg', 100, 1)
|
||||
user << "\blue Removing support lines."
|
||||
sleep(40)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
src.d_state = 2
|
||||
user << "\blue You removed the support lines."
|
||||
|
||||
else if (istype(W, /obj/item/weapon/crowbar))
|
||||
|
||||
if (src.d_state == 3)
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Prying cover off."
|
||||
playsound(src.loc, 'Crowbar.ogg', 100, 1)
|
||||
sleep(100)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
src.d_state = 4
|
||||
user << "\blue You removed the cover."
|
||||
|
||||
else if (src.d_state == 6)
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Prying outer sheath off."
|
||||
playsound(src.loc, 'Crowbar.ogg', 100, 1)
|
||||
sleep(100)
|
||||
if(src)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
user << "\blue You removed the outer sheath."
|
||||
dismantle_wall()
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
||||
var/turf/T = user.loc
|
||||
user << "\blue You begin to drill though, this will take some time."
|
||||
sleep(200)
|
||||
if(src)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
user << "\blue Your drill tears though the reinforced plating."
|
||||
dismantle_wall()
|
||||
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
|
||||
if( thermite )
|
||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if( WT.remove_fuel(0,user) )
|
||||
thermitemelt(user)
|
||||
return
|
||||
|
||||
else if ((istype(W, /obj/item/stack/sheet/metal)) && (src.d_state))
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Repairing wall."
|
||||
sleep(100)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
src.d_state = 0
|
||||
src.icon_state = initial(src.icon_state)
|
||||
user << "\blue You repaired the wall."
|
||||
if (W:amount > 1)
|
||||
W:amount--
|
||||
else
|
||||
del(W)
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
thermitemelt(user)
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/apc_frame))
|
||||
var/obj/item/apc_frame/AH = W
|
||||
AH.try_build(src)
|
||||
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
|
||||
var/obj/item/weapon/melee/energy/blade/EB = W
|
||||
|
||||
EB.spark_system.start()
|
||||
user << "<span class='notice'>You slash \the [src] with \the [EB]; the thermite ignites!</span>"
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
playsound(src.loc, 'blade1.ogg', 50, 1)
|
||||
|
||||
thermitemelt(user)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
user << "<span class='notice'>This wall is too thick to slice through. You will need to find a different path.</span>"
|
||||
return
|
||||
|
||||
if(src.d_state > 0)
|
||||
src.icon_state = "r_wall-[d_state]"
|
||||
var/turf/T = user.loc //get user's location for delay checks
|
||||
|
||||
else
|
||||
//DECONSTRUCTION
|
||||
switch(d_state)
|
||||
if(0)
|
||||
if (istype(W, /obj/item/weapon/wirecutters))
|
||||
playsound(src.loc, 'Wirecutter.ogg', 100, 1)
|
||||
src.d_state = 1
|
||||
src.icon_state = "r_wall-1"
|
||||
new /obj/item/stack/rods( src )
|
||||
user << "<span class='notice'>You cut the outer grille.</span>"
|
||||
return
|
||||
|
||||
if(1)
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
user << "<span class='notice'>You begin removing the support lines.</span>"
|
||||
playsound(src.loc, 'Screwdriver.ogg', 100, 1)
|
||||
|
||||
sleep(40)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( d_state == 1 && user.loc == T && user.equipped() == W )
|
||||
src.d_state = 2
|
||||
src.icon_state = "r_wall-2"
|
||||
user << "<span class='notice'>You remove the support lines.</span>"
|
||||
return
|
||||
|
||||
//REPAIRING (replacing the outer grille for cosmetic damage)
|
||||
else if( istype(W, /obj/item/stack/rods) )
|
||||
var/obj/item/stack/O = W
|
||||
src.d_state = 0
|
||||
src.icon_state = "r_wall"
|
||||
relativewall_neighbours() //call smoothwall stuff
|
||||
user << "<span class='notice'>You replace the outer grille.</span>"
|
||||
if (O.amount > 1)
|
||||
O.amount--
|
||||
else
|
||||
del(O)
|
||||
return
|
||||
|
||||
if(2)
|
||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if( WT.remove_fuel(0,user) )
|
||||
WT.welding = 2
|
||||
|
||||
user << "<span class='notice'>You begin slicing through the metal cover.</span>"
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
|
||||
sleep(60)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !T ) return
|
||||
WT.welding = 1
|
||||
|
||||
if( d_state == 2 && user.loc == T && user.equipped() == WT )
|
||||
src.d_state = 3
|
||||
src.icon_state = "r_wall-3"
|
||||
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
|
||||
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
|
||||
|
||||
user << "<span class='notice'>You begin slicing through the metal cover.</span>"
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
|
||||
sleep(40)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( d_state == 2 && user.loc == T && user.equipped() == W )
|
||||
src.d_state = 3
|
||||
src.icon_state = "r_wall-3"
|
||||
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
|
||||
return
|
||||
|
||||
if(3)
|
||||
if (istype(W, /obj/item/weapon/crowbar))
|
||||
|
||||
user << "<span class='notice'>You struggle to pry off the cover.</span>"
|
||||
playsound(src.loc, 'Crowbar.ogg', 100, 1)
|
||||
|
||||
sleep(100)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( d_state == 3 && user.loc == T && user.equipped() == W )
|
||||
src.d_state = 4
|
||||
src.icon_state = "r_wall-4"
|
||||
user << "<span class='notice'>You pry off the cover.</span>"
|
||||
return
|
||||
|
||||
if(4)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
|
||||
user << "<span class='notice'>You start loosening the anchoring bolts which secure the support rods to their frame.</span>"
|
||||
playsound(src.loc, 'Ratchet.ogg', 100, 1)
|
||||
|
||||
sleep(40)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( d_state == 4 && user.loc == T && user.equipped() == W )
|
||||
src.d_state = 5
|
||||
src.icon_state = "r_wall-5"
|
||||
user << "<span class='notice'>You remove the bolts anchoring the support rods.</span>"
|
||||
return
|
||||
|
||||
if(5)
|
||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if( WT.remove_fuel(0,user) )
|
||||
WT.welding = 2
|
||||
|
||||
user << "<span class='notice'>You begin slicing through the support rods.</span>"
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
|
||||
sleep(100)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !T ) return
|
||||
WT.welding = 1
|
||||
|
||||
if( d_state == 5 && user.loc == T && user.equipped() == WT )
|
||||
src.d_state = 6
|
||||
src.icon_state = "r_wall-6"
|
||||
new /obj/item/stack/rods( src )
|
||||
user << "<span class='notice'>The support rods drop out as you cut them loose from the frame.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
|
||||
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
|
||||
|
||||
user << "<span class='notice'>You begin slicing through the support rods.</span>"
|
||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||
|
||||
sleep(70)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( d_state == 5 && user.loc == T && user.equipped() == W )
|
||||
src.d_state = 6
|
||||
src.icon_state = "r_wall-6"
|
||||
new /obj/item/stack/rods( src )
|
||||
user << "<span class='notice'>The support rods drop out as you cut them loose from the frame.</span>"
|
||||
return
|
||||
|
||||
if(6)
|
||||
if( istype(W, /obj/item/weapon/crowbar) )
|
||||
|
||||
user << "<span class='notice'>You struggle to pry off the outer sheath.</span>"
|
||||
playsound(src.loc, 'Crowbar.ogg', 100, 1)
|
||||
|
||||
sleep(100)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == W )
|
||||
user << "<span class='notice'>You pry off the outer sheath.</span>"
|
||||
dismantle_wall()
|
||||
return
|
||||
|
||||
//vv OK, we weren't performing a valid deconstruction step or igniting thermite,let's check the other possibilities vv
|
||||
|
||||
//DRILLING
|
||||
if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
||||
|
||||
user << "<span class='notice'>You begin to drill though the wall.</span>"
|
||||
|
||||
sleep(200)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == W )
|
||||
user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>"
|
||||
dismantle_wall()
|
||||
|
||||
//REPAIRING
|
||||
else if( istype(W, /obj/item/stack/sheet/metal) && d_state )
|
||||
var/obj/item/stack/sheet/metal/MS = W
|
||||
|
||||
user << "<span class='notice'>You begin patching-up the wall with \a [MS].</span>"
|
||||
|
||||
sleep( max(20*d_state,100) ) //time taken to repair is proportional to the damage! (max 10 seconds)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !MS || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == MS && d_state )
|
||||
src.d_state = 0
|
||||
src.icon_state = "r_wall"
|
||||
relativewall_neighbours() //call smoothwall stuff
|
||||
user << "<span class='notice'>You repair the last of the damage.</span>"
|
||||
if (MS.amount > 1)
|
||||
MS.amount--
|
||||
else
|
||||
del(MS)
|
||||
|
||||
//APC
|
||||
else if( istype(W,/obj/item/apc_frame) )
|
||||
var/obj/item/apc_frame/AH = W
|
||||
AH.try_build(src)
|
||||
|
||||
//Finally, CHECKING FOR FALSE WALLS if it isn't damaged
|
||||
else if(!d_state)
|
||||
return attack_hand(user)
|
||||
return
|
||||
|
||||
/turf/simulated/wall/proc/thermitemelt(mob/user as mob)
|
||||
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
|
||||
O.name = "Thermite"
|
||||
O.desc = "Looks hot."
|
||||
O.icon = 'fire.dmi'
|
||||
O.icon_state = "2"
|
||||
O.anchored = 1
|
||||
O.density = 1
|
||||
O.layer = 5
|
||||
|
||||
var/turf/simulated/floor/F = ReplaceWithPlating()
|
||||
F.burn_tile()
|
||||
F.icon_state = "wall_thermite"
|
||||
user << "<span class='warning'>The thermite melts through the wall.</span>"
|
||||
|
||||
spawn(100)
|
||||
if(O) del(O)
|
||||
F.sd_LumReset()
|
||||
return
|
||||
|
||||
/turf/simulated/wall/meteorhit(obj/M as obj)
|
||||
if (prob(15))
|
||||
dismantle_wall()
|
||||
@@ -753,8 +829,9 @@ var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3
|
||||
var/n = name //just in case commands rename it in the ..() call
|
||||
..()
|
||||
spawn(4)
|
||||
update_icon()
|
||||
name = n
|
||||
if(src)
|
||||
update_icon()
|
||||
name = n
|
||||
|
||||
grass
|
||||
name = "Grass patch"
|
||||
@@ -766,11 +843,12 @@ var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3
|
||||
icon_state = "grass[pick("1","2","3","4")]"
|
||||
..()
|
||||
spawn(4)
|
||||
update_icon()
|
||||
for(var/direction in cardinal)
|
||||
if(istype(get_step(src,direction),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,direction)
|
||||
FF.update_icon() //so siding get updated properly
|
||||
if(src)
|
||||
update_icon()
|
||||
for(var/direction in cardinal)
|
||||
if(istype(get_step(src,direction),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,direction)
|
||||
FF.update_icon() //so siding get updated properly
|
||||
|
||||
/turf/simulated/floor/vault
|
||||
icon_state = "rockvault"
|
||||
@@ -944,6 +1022,11 @@ turf/simulated/floor/return_siding_icon_state()
|
||||
return
|
||||
if (ismob(user.pulling))
|
||||
var/mob/M = user.pulling
|
||||
|
||||
// if(M==user) //temporary hack to stop runtimes. ~Carn
|
||||
// user.pulling = null //but...fixed the root of the problem
|
||||
// return //shoudn't be needed now, unless somebody fucks with pulling again.
|
||||
|
||||
var/mob/t = M.pulling
|
||||
M.pulling = null
|
||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user