mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
Removed intact var in favour of is_plating() proc, fixed issues with invisible initialized pipes.
This commit is contained in:
@@ -505,7 +505,8 @@
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
else if (istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics!=2)
|
||||
if (src.loc:intact)
|
||||
var/turf/T = loc
|
||||
if(istype(T) && !T.is_plating())
|
||||
user << "<span class='warning'>You must remove the floor plating in front of the APC first.</span>"
|
||||
return
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
@@ -517,7 +518,6 @@
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (C.amount >= 10 && !terminal && opened && has_electronics != 2)
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/N = T.get_cable_node()
|
||||
if (prob(50) && electrocute_mob(usr, N, N))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
@@ -532,7 +532,8 @@
|
||||
make_terminal()
|
||||
terminal.connect_to_network()
|
||||
else if (istype(W, /obj/item/weapon/wirecutters) && terminal && opened && has_electronics!=2)
|
||||
if (src.loc:intact)
|
||||
var/turf/T = loc
|
||||
if(istype(T) && !T.is_plating())
|
||||
user << "<span class='warning'>You must remove the floor plating in front of the APC first.</span>"
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user.name] dismantles the power terminal from [src].</span>", \
|
||||
|
||||
@@ -70,7 +70,6 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
/obj/structure/cable/New()
|
||||
..()
|
||||
|
||||
|
||||
// ensure d1 & d2 reflect the icon_state for entering and exiting cable
|
||||
|
||||
var/dash = findtext(icon_state, "-")
|
||||
@@ -80,7 +79,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
d2 = text2num( copytext( icon_state, dash+1 ) )
|
||||
|
||||
var/turf/T = src.loc // hide if turf is not intact
|
||||
if(level==1) hide(T.intact)
|
||||
if(level==1) hide(!T.is_plating())
|
||||
cable_list += src //add it to the global cable list
|
||||
|
||||
|
||||
@@ -123,7 +122,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
/obj/structure/cable/attackby(obj/item/W, mob/user)
|
||||
|
||||
var/turf/T = src.loc
|
||||
if(T.intact)
|
||||
if(!T.is_plating())
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
@@ -655,7 +654,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
user << "You can't lay cable at a place that far away."
|
||||
return
|
||||
|
||||
if(F.intact) // Ff floor is intact, complain
|
||||
if(!F.is_plating()) // Ff floor is intact, complain
|
||||
user << "You can't lay cable there unless the floor tiles are removed."
|
||||
return
|
||||
|
||||
@@ -750,7 +749,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
|
||||
var/turf/T = C.loc
|
||||
|
||||
if(!isturf(T) || T.intact) // sanity checks, also stop use interacting with T-scanner revealed cable
|
||||
if(!isturf(T) || !T.is_plating()) // sanity checks, also stop use interacting with T-scanner revealed cable
|
||||
return
|
||||
|
||||
if(get_dist(C, user) > 1) // make sure it's close enough
|
||||
@@ -766,7 +765,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
|
||||
// one end of the clicked cable is pointing towards us
|
||||
if(C.d1 == dirn || C.d2 == dirn)
|
||||
if(U.intact) // can't place a cable if the floor is complete
|
||||
if(!U.is_plating()) // can't place a cable if the floor is complete
|
||||
user << "You can't lay cable there unless the floor tiles are removed."
|
||||
return
|
||||
else
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/obj/structure/cable/heavyduty/attackby(obj/item/W, mob/user)
|
||||
|
||||
var/turf/T = src.loc
|
||||
if(T.intact)
|
||||
if(!T.is_plating())
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
var/turf/T = user.loc
|
||||
|
||||
if(T.intact || !istype(T, /turf/simulated/floor))
|
||||
if(!T.is_plating() || !istype(T, /turf/simulated/floor))
|
||||
return
|
||||
|
||||
if(get_dist(src, user) > 1)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
return 1000
|
||||
|
||||
/turf/singularity_act(S, current_size)
|
||||
if(intact)
|
||||
if(!is_plating())
|
||||
for(var/obj/O in contents)
|
||||
if(O.level != 1)
|
||||
continue
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
user << "<span class='warning'>You can't build a terminal on space.</span>"
|
||||
return 1
|
||||
else if (istype(tempLoc))
|
||||
if(tempLoc.intact)
|
||||
if(!tempLoc.is_plating())
|
||||
user << "<span class='warning'>You must remove the floor plating first.</span>"
|
||||
return 1
|
||||
user << "<span class='notice'>You start adding cable to the [src].</span>"
|
||||
@@ -272,7 +272,7 @@
|
||||
building_terminal = 1
|
||||
var/turf/tempTDir = terminal.loc
|
||||
if (istype(tempTDir))
|
||||
if(tempTDir.intact)
|
||||
if(!tempTDir.is_plating())
|
||||
user << "<span class='warning'>You must remove the floor plating first.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You begin to cut the cables...</span>"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/obj/machinery/power/terminal/New()
|
||||
..()
|
||||
var/turf/T = src.loc
|
||||
if(level==1) hide(T.intact)
|
||||
if(level==1) hide(!T.is_plating())
|
||||
return
|
||||
|
||||
/obj/machinery/power/terminal/Destroy()
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
ispipe = 1
|
||||
|
||||
var/turf/T = src.loc
|
||||
if(T.intact)
|
||||
if(!T.is_plating())
|
||||
user << "You can only attach the [nicetype] if the floor plating is removed."
|
||||
return
|
||||
|
||||
|
||||
@@ -713,7 +713,7 @@
|
||||
// update the icon_state to reflect hidden status
|
||||
proc/update()
|
||||
var/turf/T = src.loc
|
||||
hide(T.intact && !istype(T,/turf/space)) // space never hides pipes
|
||||
hide(!T.is_plating() && !istype(T,/turf/space)) // space never hides pipes
|
||||
|
||||
// hide called by levelupdate if turf intact status changes
|
||||
// change visibility status and force update of icon
|
||||
@@ -746,14 +746,10 @@
|
||||
H.active = 0
|
||||
H.loc = src
|
||||
return
|
||||
if(T.intact && istype(T,/turf/simulated/floor)) //intact floor, pop the tile
|
||||
if(!T.is_plating() && istype(T,/turf/simulated/floor)) //intact floor, pop the tile
|
||||
var/turf/simulated/floor/F = T
|
||||
//F.health = 100
|
||||
F.burnt = 1
|
||||
F.intact = 0
|
||||
F.levelupdate()
|
||||
F.break_tile()
|
||||
new /obj/item/stack/tile(H) // add to holder so it will be thrown with other stuff
|
||||
F.icon_state = "Floor[F.burnt ? "1" : ""]"
|
||||
|
||||
if(direction) // direction is specified
|
||||
if(istype(T, /turf/space)) // if ended in space, then range is unlimited
|
||||
@@ -856,7 +852,7 @@
|
||||
attackby(var/obj/item/I, var/mob/user)
|
||||
|
||||
var/turf/T = src.loc
|
||||
if(T.intact)
|
||||
if(!T.is_plating())
|
||||
return // prevent interaction with T-scanner revealed pipes
|
||||
src.add_fingerprint(user)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
@@ -1339,7 +1335,7 @@
|
||||
return
|
||||
|
||||
var/turf/T = src.loc
|
||||
if(T.intact)
|
||||
if(!T.is_plating())
|
||||
return // prevent interaction with T-scanner revealed pipes
|
||||
src.add_fingerprint(user)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
|
||||
Reference in New Issue
Block a user