Revert "12/21 modernizations from TG live"
This commit is contained in:
+31
-17
@@ -93,11 +93,10 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
cable_list -= src //remove it from global cable list
|
||||
return ..() // then go ahead and delete the cable
|
||||
|
||||
/obj/structure/cable/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/turf/T = loc
|
||||
stored.forceMove(T)
|
||||
qdel(src)
|
||||
/obj/structure/cable/Deconstruct()
|
||||
var/turf/T = loc
|
||||
stored.loc = T
|
||||
..()
|
||||
|
||||
///////////////////////////////////
|
||||
// General procedures
|
||||
@@ -106,7 +105,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
//If underfloor, hide the cable
|
||||
/obj/structure/cable/hide(i)
|
||||
|
||||
if(level == 1 && isturf(loc))
|
||||
if(level == 1 && istype(loc, /turf))
|
||||
invisibility = i ? INVISIBILITY_MAXIMUM : 0
|
||||
updateicon()
|
||||
|
||||
@@ -116,6 +115,9 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
else
|
||||
icon_state = "[d1]-[d2]"
|
||||
|
||||
//Telekinesis has no effect on a cable
|
||||
/obj/structure/cable/attack_tk(mob/user)
|
||||
return
|
||||
|
||||
// Items usable on a cable :
|
||||
// - Wirecutters : cut it duh !
|
||||
@@ -132,7 +134,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
user.visible_message("[user] cuts the cable.", "<span class='notice'>You cut the cable.</span>")
|
||||
stored.add_fingerprint(user)
|
||||
investigate_log("was cut by [key_name(usr, usr.client)] in [user.loc.loc]","wires")
|
||||
deconstruct()
|
||||
Deconstruct()
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
@@ -163,9 +165,21 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
else
|
||||
return 0
|
||||
|
||||
//explosion handling
|
||||
/obj/structure/cable/ex_act(severity, target)
|
||||
..()
|
||||
if(!qdeleted(src))
|
||||
switch(severity)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
Deconstruct()
|
||||
if(3)
|
||||
if(prob(25))
|
||||
Deconstruct()
|
||||
|
||||
/obj/structure/cable/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
deconstruct()
|
||||
Deconstruct()
|
||||
|
||||
/obj/structure/cable/proc/cableColor(colorC = "red")
|
||||
cable_color = colorC
|
||||
@@ -187,9 +201,9 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
if("white")
|
||||
icon = 'icons/obj/power_cond/power_cond_white.dmi'
|
||||
|
||||
/obj/structure/cable/proc/update_stored(length = 1, colorC = "red")
|
||||
/obj/structure/cable/proc/update_stored(var/length = 1, var/color = "red")
|
||||
stored.amount = length
|
||||
stored.item_color = colorC
|
||||
stored.item_color = color
|
||||
stored.update_icon()
|
||||
|
||||
////////////////////////////////////////////
|
||||
@@ -453,7 +467,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list ( \
|
||||
item_color = "red"
|
||||
desc = "A coil of insulated power cable."
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
w_class = 2
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=10, MAT_GLASS=5)
|
||||
@@ -474,9 +488,9 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list ( \
|
||||
|
||||
/obj/item/stack/cable_coil/suicide_act(mob/user)
|
||||
if(locate(/obj/structure/chair/stool) in get_turf(user))
|
||||
user.visible_message("<span class='suicide'>[user] is making a noose with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
user.visible_message("<span class='suicide'>[user] is making a noose with the [src.name]! It looks like \he's trying to commit suicide.</span>")
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] is strangling [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
user.visible_message("<span class='suicide'>[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.</span>")
|
||||
return(OXYLOSS)
|
||||
|
||||
/obj/item/stack/cable_coil/New(loc, amount = MAXCOIL, var/param_color = null)
|
||||
@@ -499,7 +513,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list ( \
|
||||
return ..()
|
||||
|
||||
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
|
||||
if(affecting && affecting.status == BODYPART_ROBOTIC)
|
||||
if(affecting && affecting.status == ORGAN_ROBOTIC)
|
||||
user.visible_message("<span class='notice'>[user] starts to fix some of the wires in [H]'s [affecting.name].</span>", "<span class='notice'>You start fixing some of the wires in [H]'s [affecting.name].</span>")
|
||||
if(!do_mob(user, H, 50))
|
||||
return
|
||||
@@ -601,7 +615,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list ( \
|
||||
|
||||
if (C.shock(user, 50))
|
||||
if (prob(50)) //fail
|
||||
C.deconstruct()
|
||||
C.Deconstruct()
|
||||
|
||||
// called when cable_coil is click on an installed obj/cable
|
||||
// or click on a turf that already contains a "node" cable
|
||||
@@ -666,7 +680,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list ( \
|
||||
|
||||
if (NC.shock(user, 50))
|
||||
if (prob(50)) //fail
|
||||
NC.deconstruct()
|
||||
NC.Deconstruct()
|
||||
|
||||
return
|
||||
|
||||
@@ -716,7 +730,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list ( \
|
||||
|
||||
if (C.shock(user, 50))
|
||||
if (prob(50)) //fail
|
||||
C.deconstruct()
|
||||
C.Deconstruct()
|
||||
return
|
||||
|
||||
C.denode()// this call may have disconnected some cables that terminated on the centre of the turf, if so split the powernets.
|
||||
|
||||
Reference in New Issue
Block a user