mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Cables are now stacks
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
|
||||
//overwrite the attackby of space to transform it to openspace if necessary
|
||||
/turf/space/attackby(obj/item/C as obj, mob/user as mob)
|
||||
if (istype(C, /obj/item/weapon/cable_coil) && src.hasbelow())
|
||||
if (istype(C, /obj/item/stack/cable_coil) && src.hasbelow())
|
||||
var/turf/simulated/floor/open/W = src.ChangeTurf(/turf/simulated/floor/open)
|
||||
W.attackby(C, user)
|
||||
return
|
||||
@@ -92,8 +92,8 @@
|
||||
|
||||
/turf/simulated/floor/open/attackby(obj/item/C as obj, mob/user as mob)
|
||||
(..)
|
||||
if (istype(C, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/cable = C
|
||||
if (istype(C, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/cable = C
|
||||
cable.turf_place(src, user)
|
||||
return
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ datum/design/rust_fuel_compressor
|
||||
"/obj/item/weapon/stock_parts/micro_laser/ultra" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 5)
|
||||
"/obj/item/stack/cable_coil" = 5)
|
||||
|
||||
datum/design/rust_core
|
||||
name = "Internal circuitry (RUST tokamak core)"
|
||||
@@ -107,7 +107,7 @@ datum/design/rust_core
|
||||
"/obj/item/weapon/stock_parts/scanning_module/phasic" = 1,
|
||||
"/obj/item/weapon/stock_parts/matter_bin/super" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 5)
|
||||
"/obj/item/stack/cable_coil" = 5)
|
||||
|
||||
datum/design/rust_injector
|
||||
name = "Internal circuitry (RUST tokamak core)"
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
icon_state = "port2"
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/cable_coil) && opened && !(has_electronics & 2))
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
else if (istype(W, /obj/item/stack/cable_coil) && opened && !(has_electronics & 2))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(C.amount < 10)
|
||||
user << "\red You need more wires."
|
||||
return
|
||||
@@ -97,7 +97,7 @@
|
||||
user << "You begin to cut the cables..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
new /obj/item/weapon/cable_coil(loc,10)
|
||||
new /obj/item/stack/cable_coil(loc,10)
|
||||
user.visible_message(\
|
||||
"\red [user.name] cut the cabling inside the port.",\
|
||||
"You cut the cabling inside the port.")
|
||||
|
||||
@@ -105,8 +105,8 @@
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] the compressor interface."
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/cable_coil) && opened && !(has_electronics & 2))
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
else if (istype(W, /obj/item/stack/cable_coil) && opened && !(has_electronics & 2))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(C.amount < 10)
|
||||
user << "\red You need more wires."
|
||||
return
|
||||
@@ -124,7 +124,7 @@
|
||||
user << "You begin to cut the cables..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
new /obj/item/weapon/cable_coil(loc,10)
|
||||
new /obj/item/stack/cable_coil(loc,10)
|
||||
user.visible_message(\
|
||||
"\red [user.name] cut the cabling inside the compressor.",\
|
||||
"You cut the cabling inside the port.")
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
return
|
||||
switch(state)
|
||||
if(1)
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
if(P:amount >= 5)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "\blue You start to add cables to the frame."
|
||||
@@ -80,7 +80,7 @@
|
||||
user << "\blue You remove the cables."
|
||||
state = 1
|
||||
icon_state = "wm_0"
|
||||
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
|
||||
A.amount = 5
|
||||
|
||||
if(3)
|
||||
@@ -136,11 +136,11 @@
|
||||
for(var/I in req_components)
|
||||
if(istype(P, text2path(I)) && (req_components[I] > 0))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/CP = P
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CP = P
|
||||
if(CP.amount > 1)
|
||||
var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided
|
||||
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src)
|
||||
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src)
|
||||
CC.amount = camt
|
||||
CC.update_icon()
|
||||
CP.use(camt)
|
||||
@@ -155,7 +155,7 @@
|
||||
update_desc()
|
||||
break
|
||||
user << desc
|
||||
if(P.loc != src && !istype(P, /obj/item/weapon/cable_coil))
|
||||
if(P.loc != src && !istype(P, /obj/item/stack/cable_coil))
|
||||
user << "\red You cannot add that component to the machine!"
|
||||
|
||||
/obj/item/weapon/circuitboard/firealarm
|
||||
@@ -168,7 +168,7 @@
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 2)
|
||||
"/obj/item/stack/cable_coil" = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/alarm
|
||||
name = "Circuit board (Atmospheric Alarm)"
|
||||
@@ -180,7 +180,7 @@
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 2)
|
||||
"/obj/item/stack/cable_coil" = 2)
|
||||
|
||||
/* oh right, not a machine :(
|
||||
/obj/item/weapon/circuitboard/intercom
|
||||
@@ -192,7 +192,7 @@
|
||||
contain_parts = 0
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 2)
|
||||
"/obj/item/stack/cable_coil" = 2)
|
||||
*/
|
||||
|
||||
/* too complex to set up the dept for an RC in a way intuitive for the user
|
||||
@@ -206,7 +206,7 @@
|
||||
req_components = list(
|
||||
"/obj/item/device/radio" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1
|
||||
"/obj/item/weapon/cable_coil" = 1)
|
||||
"/obj/item/stack/cable_coil" = 1)
|
||||
*/
|
||||
|
||||
/obj/item/weapon/circuitboard/status_display
|
||||
@@ -218,7 +218,7 @@
|
||||
contain_parts = 0
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 2,
|
||||
"/obj/item/weapon/cable_coil" = 1)
|
||||
"/obj/item/stack/cable_coil" = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/light_switch
|
||||
name = "Circuit board (Light Switch)"
|
||||
@@ -228,4 +228,4 @@
|
||||
frame_desc = "Requires 2 pieces of cable."
|
||||
contain_parts = 0
|
||||
req_components = list(
|
||||
"/obj/item/weapon/cable_coil" = 2)
|
||||
"/obj/item/stack/cable_coil" = 2)
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
user << "\red There's already \an [battery] in [src]!"
|
||||
|
||||
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
if(P:amount >= 5)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
@@ -173,7 +173,7 @@
|
||||
user << "\blue You remove the cables."
|
||||
src.state = 2
|
||||
src.icon_state = "2"
|
||||
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
|
||||
A.amount = 5
|
||||
|
||||
if(istype(P, /obj/item/weapon/crowbar)) // complicated check
|
||||
|
||||
@@ -1175,7 +1175,7 @@ proc/get_mob_with_client_list()
|
||||
|
||||
//Quick type checks for some tools
|
||||
var/global/list/common_tools = list(
|
||||
/obj/item/weapon/cable_coil,
|
||||
/obj/item/stack/cable_coil,
|
||||
/obj/item/weapon/wrench,
|
||||
/obj/item/weapon/weldingtool,
|
||||
/obj/item/weapon/screwdriver,
|
||||
@@ -1199,7 +1199,7 @@ var/global/list/common_tools = list(
|
||||
return 0
|
||||
|
||||
/proc/iscoil(O)
|
||||
if(istype(O, /obj/item/weapon/cable_coil))
|
||||
if(istype(O, /obj/item/stack/cable_coil))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -1224,7 +1224,7 @@ var/global/list/common_tools = list(
|
||||
return 0
|
||||
|
||||
/proc/iswire(O)
|
||||
if(istype(O, /obj/item/weapon/cable_coil))
|
||||
if(istype(O, /obj/item/stack/cable_coil))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/weapon/cable_coil(src)
|
||||
component_parts += new /obj/item/weapon/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/dna_scannernew/allow_drop()
|
||||
@@ -87,7 +87,7 @@
|
||||
/obj/machinery/dna_scannernew/proc/eject_occupant()
|
||||
src.go_out()
|
||||
for(var/obj/O in src)
|
||||
if((!istype(O,/obj/item/weapon/reagent_containers)) && (!istype(O,/obj/item/weapon/circuitboard/clonescanner)) && (!istype(O,/obj/item/weapon/stock_parts)) && (!istype(O,/obj/item/weapon/cable_coil)))
|
||||
if((!istype(O,/obj/item/weapon/reagent_containers)) && (!istype(O,/obj/item/weapon/circuitboard/clonescanner)) && (!istype(O,/obj/item/weapon/stock_parts)) && (!istype(O,/obj/item/stack/cable_coil)))
|
||||
O.loc = get_turf(src)//Ejects items that manage to get in there (exluding the components)
|
||||
if(!occupant)
|
||||
for(var/mob/M in src)//Failsafe so you can get mobs out
|
||||
|
||||
@@ -1112,8 +1112,8 @@ table tr:first-child th:first-child { border: none;}
|
||||
return
|
||||
|
||||
if(1)
|
||||
if(istype(W, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if(coil.amount < 5)
|
||||
user << "You need more cable for this!"
|
||||
return
|
||||
@@ -1303,8 +1303,8 @@ FIRE ALARM
|
||||
else
|
||||
user.visible_message("\red [user] has disconnected [src]'s detecting unit!", "You have disconnected [src]'s detecting unit.")
|
||||
if(1)
|
||||
if(istype(W, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if(coil.amount < 5)
|
||||
user << "You need more cable for this!"
|
||||
return
|
||||
|
||||
@@ -959,8 +959,8 @@ Auto Patrol: []"},
|
||||
icon_state = "[lasercolor]ed209_prox"
|
||||
|
||||
if(6)
|
||||
if( istype(W, /obj/item/weapon/cable_coil) )
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
if( istype(W, /obj/item/stack/cable_coil) )
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
var/turf/T = get_turf(user)
|
||||
user << "<span class='notice'>You start to wire [src]...</span>"
|
||||
sleep(40)
|
||||
|
||||
@@ -954,7 +954,7 @@
|
||||
new /obj/item/device/assembly/prox_sensor(Tsec)
|
||||
new /obj/item/stack/rods(Tsec)
|
||||
new /obj/item/stack/rods(Tsec)
|
||||
new /obj/item/weapon/cable_coil/cut(Tsec)
|
||||
new /obj/item/stack/cable_coil/cut(Tsec)
|
||||
if (cell)
|
||||
cell.loc = Tsec
|
||||
cell.update_icon()
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
if(2)
|
||||
// State 2
|
||||
if(iscoil(W))
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(C.use(2))
|
||||
user << "You add wires to the assembly."
|
||||
state = 3
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
else if(iswirecutter(W))
|
||||
|
||||
new/obj/item/weapon/cable_coil(get_turf(src), 2)
|
||||
new/obj/item/stack/cable_coil(get_turf(src), 2)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "You cut the wires from the circuits."
|
||||
state = 2
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
user << "\blue You unfasten the circuit board."
|
||||
state = 1
|
||||
icon_state = "1"
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
if(P:amount >= 5)
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
@@ -80,7 +80,7 @@
|
||||
user << "\blue You remove the cables."
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( loc )
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
|
||||
A.amount = 5
|
||||
|
||||
if(istype(P, /obj/item/stack/sheet/rglass))
|
||||
|
||||
@@ -402,7 +402,7 @@
|
||||
user << "\blue You unfasten the circuit board."
|
||||
src.state = 1
|
||||
src.icon_state = "1"
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
if(P:amount >= 5)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
@@ -418,7 +418,7 @@
|
||||
user << "\blue You remove the cables."
|
||||
src.state = 2
|
||||
src.icon_state = "2"
|
||||
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
|
||||
A.amount = 5
|
||||
|
||||
if(istype(P, /obj/item/stack/sheet/glass))
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
return
|
||||
switch(state)
|
||||
if(1)
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/C = P
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.amount >= 5)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "\blue You start to add cables to the frame."
|
||||
@@ -85,7 +85,7 @@
|
||||
user << "\blue You remove the cables."
|
||||
state = 1
|
||||
icon_state = "box_0"
|
||||
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
|
||||
A.amount = 5
|
||||
|
||||
if(3)
|
||||
@@ -128,15 +128,15 @@
|
||||
new_machine.RefreshParts()
|
||||
del(src)
|
||||
else
|
||||
if(istype(P, /obj/item/weapon))
|
||||
if(istype(P, /obj/item))
|
||||
for(var/I in req_components)
|
||||
if(istype(P, text2path(I)) && (req_components[I] > 0))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/CP = P
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CP = P
|
||||
if(CP.amount > 1)
|
||||
var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided
|
||||
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src)
|
||||
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src)
|
||||
CC.amount = camt
|
||||
CC.update_icon()
|
||||
CP.use(camt)
|
||||
@@ -151,7 +151,7 @@
|
||||
update_desc()
|
||||
break
|
||||
user << desc
|
||||
if(P && P.loc != src && !istype(P, /obj/item/weapon/cable_coil))
|
||||
if(P && P.loc != src && !istype(P, /obj/item/stack/cable_coil))
|
||||
user << "\red You cannot add that component to the machine!"
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ to destroy them and players will be able to make replacements.
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/pacman/super
|
||||
@@ -235,7 +235,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3"
|
||||
frame_desc = "Requires 2 pieces of cable, and 1 Scanning Module."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/cable_coil" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/mechfab
|
||||
@@ -257,7 +257,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3;biotech=3"
|
||||
frame_desc = "Requires 2 Manipulator, 2 Scanning Module, 2 pieces of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/cable_coil" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
@@ -273,7 +273,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 2,)
|
||||
"/obj/item/stack/cable_coil" = 2,)
|
||||
|
||||
/obj/item/weapon/circuitboard/gas_heater
|
||||
name = "Circuit Board (Gas Heating System)"
|
||||
@@ -282,7 +282,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "powerstorage=2;engineering=1"
|
||||
frame_desc = "Requires 5 Pieces of Cable, 1 Matter Bin, and 2 Capacitors."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/cable_coil" = 5,
|
||||
"/obj/item/stack/cable_coil" = 5,
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 2)
|
||||
|
||||
@@ -293,7 +293,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "magnets=2;engineering=2"
|
||||
frame_desc = "Requires 2 Pieces of Cable, 1 Matter Bin, 1 Micro Manipulator, and 2 Capacitors."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/cable_coil" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1)
|
||||
@@ -320,7 +320,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
frame_desc = "Requires 2 Micro Manipulators, 2 Cable Coil and 2 Hyperwave Filter."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/cable_coil" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/relay
|
||||
@@ -331,7 +331,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
frame_desc = "Requires 2 Micro Manipulators, 2 Cable Coil and 2 Hyperwave Filters."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/cable_coil" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/bus
|
||||
@@ -342,7 +342,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
frame_desc = "Requires 2 Micro Manipulators, 1 Cable Coil and 1 Hyperwave Filter."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/cable_coil" = 1,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/processor
|
||||
@@ -356,7 +356,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/treatment" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/analyzer" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/amplifier" = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/server
|
||||
@@ -367,7 +367,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
frame_desc = "Requires 2 Micro Manipulators, 1 Cable Coil and 1 Hyperwave Filter."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/cable_coil" = 1,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/broadcaster
|
||||
@@ -378,7 +378,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
frame_desc = "Requires 2 Micro Manipulators, 1 Cable Coil, 1 Hyperwave Filter, 1 Ansible Crystal and 2 High-Powered Micro-Lasers. "
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/cable_coil" = 1,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser/high" = 2)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
src.health = max(0, src.health - damage)
|
||||
if (src.health <= 0)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src.loc)
|
||||
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
|
||||
CC.amount = 2
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
|
||||
@@ -58,12 +58,12 @@
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "You remove the cables."
|
||||
construct_op ++
|
||||
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( user.loc )
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( user.loc )
|
||||
A.amount = 5
|
||||
stat |= BROKEN // the machine's been borked!
|
||||
if(3)
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/A = P
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/A = P
|
||||
if(A.amount >= 5)
|
||||
user << "You insert the cables."
|
||||
A.amount -= 5
|
||||
@@ -93,8 +93,8 @@
|
||||
newpath = text2path(I)
|
||||
var/obj/item/s = new newpath
|
||||
s.loc = user.loc
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/A = P
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/A = P
|
||||
A.amount = 1
|
||||
|
||||
// Drop a circuit board too
|
||||
|
||||
@@ -916,7 +916,7 @@
|
||||
icon_state = "tool"
|
||||
icon_deny = "tool-deny"
|
||||
//req_access_txt = "12" //Maintenance access
|
||||
products = list(/obj/item/weapon/cable_coil/random = 10,/obj/item/weapon/crowbar = 5,/obj/item/weapon/weldingtool = 3,/obj/item/weapon/wirecutters = 5,
|
||||
products = list(/obj/item/stack/cable_coil/random = 10,/obj/item/weapon/crowbar = 5,/obj/item/weapon/weldingtool = 3,/obj/item/weapon/wirecutters = 5,
|
||||
/obj/item/weapon/wrench = 5,/obj/item/device/analyzer = 5,/obj/item/device/t_scanner = 5,/obj/item/weapon/screwdriver = 5)
|
||||
contraband = list(/obj/item/weapon/weldingtool/hugetank = 2,/obj/item/clothing/gloves/fyellow = 2)
|
||||
premium = list(/obj/item/clothing/gloves/yellow = 1)
|
||||
@@ -941,7 +941,7 @@
|
||||
products = list(/obj/item/clothing/under/rank/chief_engineer = 4,/obj/item/clothing/under/rank/engineer = 4,/obj/item/clothing/shoes/orange = 4,/obj/item/clothing/head/hardhat = 4,
|
||||
/obj/item/weapon/storage/belt/utility = 4,/obj/item/clothing/glasses/meson = 4,/obj/item/clothing/gloves/yellow = 4, /obj/item/weapon/screwdriver = 12,
|
||||
/obj/item/weapon/crowbar = 12,/obj/item/weapon/wirecutters = 12,/obj/item/device/multitool = 12,/obj/item/weapon/wrench = 12,/obj/item/device/t_scanner = 12,
|
||||
/obj/item/weapon/cable_coil/heavyduty = 8, /obj/item/weapon/cell = 8, /obj/item/weapon/weldingtool = 8,/obj/item/clothing/head/welding = 8,
|
||||
/obj/item/stack/cable_coil/heavyduty = 8, /obj/item/weapon/cell = 8, /obj/item/weapon/weldingtool = 8,/obj/item/clothing/head/welding = 8,
|
||||
/obj/item/weapon/light/tube = 10,/obj/item/clothing/suit/fire = 4, /obj/item/weapon/stock_parts/scanning_module = 5,/obj/item/weapon/stock_parts/micro_laser = 5,
|
||||
/obj/item/weapon/stock_parts/matter_bin = 5,/obj/item/weapon/stock_parts/manipulator = 5,/obj/item/weapon/stock_parts/console_screen = 5)
|
||||
// There was an incorrect entry (cablecoil/power). I improvised to cablecoil/heavyduty.
|
||||
@@ -955,7 +955,7 @@
|
||||
icon_state = "robotics"
|
||||
icon_deny = "robotics-deny"
|
||||
req_access_txt = "29"
|
||||
products = list(/obj/item/clothing/suit/storage/labcoat = 4,/obj/item/clothing/under/rank/roboticist = 4,/obj/item/weapon/cable_coil = 4,/obj/item/device/flash = 4,
|
||||
products = list(/obj/item/clothing/suit/storage/labcoat = 4,/obj/item/clothing/under/rank/roboticist = 4,/obj/item/stack/cable_coil = 4,/obj/item/device/flash = 4,
|
||||
/obj/item/weapon/cell/high = 12, /obj/item/device/assembly/prox_sensor = 3,/obj/item/device/assembly/signaler = 3,/obj/item/device/healthanalyzer = 3,
|
||||
/obj/item/weapon/scalpel = 2,/obj/item/weapon/circular_saw = 2,/obj/item/weapon/tank/anesthetic = 2,/obj/item/clothing/mask/breath/medical = 5,
|
||||
/obj/item/weapon/screwdriver = 5,/obj/item/weapon/crowbar = 5)
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
var/datum/event/event
|
||||
var/turf/old_turf
|
||||
var/obj/structure/cable/last_piece
|
||||
var/obj/item/weapon/cable_coil/cable
|
||||
var/obj/item/stack/cable_coil/cable
|
||||
var/max_cable = 1000
|
||||
|
||||
New()
|
||||
@@ -270,7 +270,7 @@
|
||||
chassis.events.clearEvent("onMove",event)
|
||||
return ..()
|
||||
|
||||
action(var/obj/item/weapon/cable_coil/target)
|
||||
action(var/obj/item/stack/cable_coil/target)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
var/result = load_cable(target)
|
||||
@@ -298,7 +298,7 @@
|
||||
m = min(m, cable.amount)
|
||||
if(m)
|
||||
use_cable(m)
|
||||
var/obj/item/weapon/cable_coil/CC = new (get_turf(chassis))
|
||||
var/obj/item/stack/cable_coil/CC = new (get_turf(chassis))
|
||||
CC.amount = m
|
||||
else
|
||||
occupant_message("There's no more cable on the reel.")
|
||||
@@ -310,7 +310,7 @@
|
||||
return "[output] \[Cable: [cable ? cable.amount : 0] m\][(cable && cable.amount) ? "- <a href='?src=\ref[src];toggle=1'>[!equip_ready?"Dea":"A"]ctivate</a>|<a href='?src=\ref[src];cut=1'>Cut</a>" : null]"
|
||||
return
|
||||
|
||||
proc/load_cable(var/obj/item/weapon/cable_coil/CC)
|
||||
proc/load_cable(var/obj/item/stack/cable_coil/CC)
|
||||
if(istype(CC) && CC.amount)
|
||||
var/cur_amount = cable? cable.amount : 0
|
||||
var/to_load = max(max_cable - cur_amount,0)
|
||||
|
||||
@@ -697,9 +697,9 @@
|
||||
state=2
|
||||
user << "You close the hatch to the power unit"
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/cable_coil))
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
if(state == 3 && hasInternalDamage(MECHA_INT_SHORT_CIRCUIT))
|
||||
var/obj/item/weapon/cable_coil/CC = W
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(CC.amount > 1)
|
||||
CC.use(2)
|
||||
clearInternalDamage(MECHA_INT_SHORT_CIRCUIT)
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
else if(istype(used_atom, /obj/item/weapon/wirecutters))
|
||||
playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
|
||||
else if(istype(used_atom, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/C = used_atom
|
||||
else if(istype(used_atom, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = used_atom
|
||||
if(C.amount<4)
|
||||
user << ("There's not enough cable to finish the task.")
|
||||
return 0
|
||||
@@ -51,8 +51,8 @@
|
||||
else if(istype(used_atom, /obj/item/weapon/wirecutters))
|
||||
playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
|
||||
else if(istype(used_atom, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/C = used_atom
|
||||
else if(istype(used_atom, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = used_atom
|
||||
if(C.amount<4)
|
||||
user << ("There's not enough cable to finish the task.")
|
||||
return 0
|
||||
@@ -146,7 +146,7 @@
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The wiring is added"),
|
||||
//12
|
||||
list("key"=/obj/item/weapon/cable_coil,
|
||||
list("key"=/obj/item/stack/cable_coil,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The hydraulic systems are active."),
|
||||
//13
|
||||
@@ -190,7 +190,7 @@
|
||||
holder.icon_state = "ripley4"
|
||||
else
|
||||
user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].")
|
||||
var/obj/item/weapon/cable_coil/coil = new /obj/item/weapon/cable_coil(get_turf(holder))
|
||||
var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder))
|
||||
coil.amount = 4
|
||||
holder.icon_state = "ripley2"
|
||||
if(10)
|
||||
@@ -380,7 +380,7 @@
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The wiring is added"),
|
||||
//18
|
||||
list("key"=/obj/item/weapon/cable_coil,
|
||||
list("key"=/obj/item/stack/cable_coil,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The hydraulic systems are active."),
|
||||
//19
|
||||
@@ -424,7 +424,7 @@
|
||||
holder.icon_state = "gygax4"
|
||||
else
|
||||
user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].")
|
||||
var/obj/item/weapon/cable_coil/coil = new /obj/item/weapon/cable_coil(get_turf(holder))
|
||||
var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder))
|
||||
coil.amount = 4
|
||||
holder.icon_state = "gygax2"
|
||||
if(16)
|
||||
@@ -642,7 +642,7 @@
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The wiring is added"),
|
||||
//13
|
||||
list("key"=/obj/item/weapon/cable_coil,
|
||||
list("key"=/obj/item/stack/cable_coil,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The hydraulic systems are active."),
|
||||
//14
|
||||
@@ -686,7 +686,7 @@
|
||||
holder.icon_state = "fireripley4"
|
||||
else
|
||||
user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].")
|
||||
var/obj/item/weapon/cable_coil/coil = new /obj/item/weapon/cable_coil(get_turf(holder))
|
||||
var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder))
|
||||
coil.amount = 4
|
||||
holder.icon_state = "fireripley2"
|
||||
if(11)
|
||||
@@ -883,7 +883,7 @@
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The wiring is added"),
|
||||
//18
|
||||
list("key"=/obj/item/weapon/cable_coil,
|
||||
list("key"=/obj/item/stack/cable_coil,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The hydraulic systems are active."),
|
||||
//19
|
||||
@@ -928,7 +928,7 @@
|
||||
holder.icon_state = "durand4"
|
||||
else
|
||||
user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].")
|
||||
var/obj/item/weapon/cable_coil/coil = new /obj/item/weapon/cable_coil(get_turf(holder))
|
||||
var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder))
|
||||
coil.amount = 4
|
||||
holder.icon_state = "durand2"
|
||||
if(16)
|
||||
@@ -1163,7 +1163,7 @@
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The wiring is added"),
|
||||
//12
|
||||
list("key"=/obj/item/weapon/cable_coil,
|
||||
list("key"=/obj/item/stack/cable_coil,
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The hydraulic systems are active."),
|
||||
//13
|
||||
@@ -1207,7 +1207,7 @@
|
||||
holder.icon_state = "odysseus4"
|
||||
else
|
||||
user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].")
|
||||
var/obj/item/weapon/cable_coil/coil = new /obj/item/weapon/cable_coil(get_turf(holder))
|
||||
var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder))
|
||||
coil.amount = 4
|
||||
holder.icon_state = "odysseus2"
|
||||
if(10)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
anchored = 0
|
||||
opacity = 0
|
||||
var/list/welder_salvage = list(/obj/item/stack/sheet/plasteel,/obj/item/stack/sheet/metal,/obj/item/stack/rods)
|
||||
var/list/wirecutters_salvage = list(/obj/item/weapon/cable_coil)
|
||||
var/list/wirecutters_salvage = list(/obj/item/stack/cable_coil)
|
||||
var/list/crowbar_salvage
|
||||
var/salvage_num = 5
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
usr << "\red There is another network terminal here."
|
||||
return
|
||||
else
|
||||
var/obj/item/weapon/cable_coil/C = new /obj/item/weapon/cable_coil(loc)
|
||||
var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(loc)
|
||||
C.amount = 10
|
||||
usr << "You cut the cables and disassemble the unused power terminal."
|
||||
del(T)
|
||||
|
||||
@@ -251,12 +251,12 @@
|
||||
W.loc = src
|
||||
src.cell = W
|
||||
user << "\blue You insert the cell!"
|
||||
if(istype(W, /obj/item/weapon/cable_coil))
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
if(src.wires)
|
||||
user << "\blue You have already inserted wire!"
|
||||
return
|
||||
else
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
coil.use(1)
|
||||
src.wires = 1.0
|
||||
user << "\blue You insert the wire!"
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
if(istype(W,/obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/CC = W
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(CC.amount < 5)
|
||||
user << "\b There is not enough wire in this coil. You need 5 lengths."
|
||||
return
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/obj/item/stack/light_w/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
..()
|
||||
if(istype(O,/obj/item/weapon/wirecutters))
|
||||
var/obj/item/weapon/cable_coil/CC = new/obj/item/weapon/cable_coil(user.loc)
|
||||
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
|
||||
CC.amount = 5
|
||||
amount--
|
||||
new/obj/item/stack/sheet/glass(user.loc)
|
||||
|
||||
@@ -162,15 +162,24 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/stack/proc/use(var/amount)
|
||||
src.amount-=amount
|
||||
if (src.amount<=0)
|
||||
/obj/item/stack/proc/use(var/used)
|
||||
if (amount < used)
|
||||
return 0
|
||||
amount -= used
|
||||
if (amount <= 0)
|
||||
var/oldsrc = src
|
||||
src = null //dont kill proc after del()
|
||||
if(usr)
|
||||
usr.before_take_item(oldsrc)
|
||||
del(oldsrc)
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/item/stack/proc/add(var/extra)
|
||||
if(amount + extra > max_amount)
|
||||
return 0
|
||||
else
|
||||
amount += extra
|
||||
return 1
|
||||
|
||||
/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
|
||||
var/obj/item/stack/oldsrc = src
|
||||
@@ -189,7 +198,7 @@
|
||||
|
||||
/obj/item/stack/attack_hand(mob/user as mob)
|
||||
if (user.get_inactive_hand() == src)
|
||||
var/obj/item/stack/F = new src.type( user, 1)
|
||||
var/obj/item/stack/F = new src.type(user, 1)
|
||||
F.copy_evidences(src)
|
||||
user.put_in_hands(F)
|
||||
src.add_fingerprint(user)
|
||||
@@ -212,7 +221,7 @@
|
||||
to_transfer = 1
|
||||
else
|
||||
to_transfer = min(src.amount, S.max_amount-S.amount)
|
||||
S.amount+=to_transfer
|
||||
S.add(to_transfer)
|
||||
if (S && usr.machine==S)
|
||||
spawn(0) S.interact(usr)
|
||||
src.use(to_transfer)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"/obj/item/weapon/wrench",
|
||||
"/obj/item/device/multitool",
|
||||
"/obj/item/device/flashlight",
|
||||
"/obj/item/weapon/cable_coil",
|
||||
"/obj/item/stack/cable_coil",
|
||||
"/obj/item/device/t_scanner",
|
||||
"/obj/item/device/analyzer",
|
||||
"/obj/item/taperoll/engineering")
|
||||
@@ -34,7 +34,7 @@
|
||||
new /obj/item/weapon/weldingtool(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/weapon/cable_coil(src,30,pick("red","yellow","orange"))
|
||||
new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange"))
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/utility/atmostech/New()
|
||||
|
||||
@@ -60,12 +60,12 @@
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/device/t_scanner(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/cable_coil(src,30,color)
|
||||
new /obj/item/weapon/cable_coil(src,30,color)
|
||||
new /obj/item/stack/cable_coil(src,30,color)
|
||||
new /obj/item/stack/cable_coil(src,30,color)
|
||||
if(prob(5))
|
||||
new /obj/item/clothing/gloves/yellow(src)
|
||||
else
|
||||
new /obj/item/weapon/cable_coil(src,30,color)
|
||||
new /obj/item/stack/cable_coil(src,30,color)
|
||||
|
||||
/obj/item/weapon/storage/toolbox/syndicate
|
||||
name = "suspicious looking toolbox"
|
||||
@@ -81,6 +81,6 @@
|
||||
new /obj/item/weapon/wrench(src)
|
||||
new /obj/item/weapon/weldingtool(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/cable_coil(src,30,color)
|
||||
new /obj/item/stack/cable_coil(src,30,color)
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
@@ -99,7 +99,7 @@
|
||||
prob(2);/obj/random/bomb_supply,\
|
||||
prob(1);/obj/item/weapon/extinguisher,\
|
||||
prob(1);/obj/item/clothing/gloves/fyellow,\
|
||||
prob(3);/obj/item/weapon/cable_coil,\
|
||||
prob(3);/obj/item/stack/cable_coil,\
|
||||
prob(2);/obj/random/toolbox,\
|
||||
prob(2);/obj/item/weapon/storage/belt/utility,\
|
||||
prob(5);/obj/random/tool)
|
||||
@@ -129,11 +129,11 @@
|
||||
if(prob(20))
|
||||
new /obj/item/weapon/storage/belt/utility(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
new /obj/item/stack/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
new /obj/item/stack/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
new /obj/item/stack/cable_coil/random(src)
|
||||
if(prob(20))
|
||||
new /obj/item/device/multitool(src)
|
||||
if(prob(5))
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
W.loc = src.loc
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/cable_coil))
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
if(rigged)
|
||||
user << "<span class='notice'>[src] is already rigged!</span>"
|
||||
return
|
||||
@@ -182,7 +182,7 @@
|
||||
src.toggle(user)
|
||||
|
||||
/obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(is_type_in_list(W, list(/obj/item/weapon/packageWrap, /obj/item/weapon/cable_coil, /obj/item/device/radio/electropack, /obj/item/weapon/wirecutters)))
|
||||
if(is_type_in_list(W, list(/obj/item/weapon/packageWrap, /obj/item/stack/cable_coil, /obj/item/device/radio/electropack, /obj/item/weapon/wirecutters)))
|
||||
return ..()
|
||||
if(locked && (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)))
|
||||
overlays.Cut()
|
||||
|
||||
@@ -184,8 +184,8 @@ obj/structure/door_assembly
|
||||
user << "\blue You [anchored? "un" : ""]secured the airlock assembly!"
|
||||
anchored = !anchored
|
||||
|
||||
else if(istype(W, /obj/item/weapon/cable_coil) && state == 0 && anchored )
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored )
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
@@ -200,7 +200,7 @@ obj/structure/door_assembly
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You cut the airlock wires.!"
|
||||
new/obj/item/weapon/cable_coil(src.loc, 1)
|
||||
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||
src.state = 0
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 && W:icon_state != "door_electronics_smoked")
|
||||
|
||||
@@ -126,12 +126,12 @@ obj/structure/windoor_assembly/Del()
|
||||
src.name = "Secure Windoor Assembly"
|
||||
|
||||
//Adding cable to the assembly. Step 5 complete.
|
||||
else if(istype(W, /obj/item/weapon/cable_coil) && anchored)
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
|
||||
user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
var/obj/item/weapon/cable_coil/CC = W
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
CC.use(1)
|
||||
user << "\blue You wire the windoor!"
|
||||
src.state = "02"
|
||||
@@ -153,7 +153,7 @@ obj/structure/windoor_assembly/Del()
|
||||
if(!src) return
|
||||
|
||||
user << "\blue You cut the windoor wires.!"
|
||||
new/obj/item/weapon/cable_coil(get_turf(user), 1)
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
src.state = "01"
|
||||
if(src.secure)
|
||||
src.name = "Secure Anchored Windoor Assembly"
|
||||
|
||||
@@ -532,9 +532,9 @@ turf/simulated/floor/proc/update_icon()
|
||||
user << "\blue This section is too damaged to support a tile. Use a welder to fix the damage."
|
||||
|
||||
|
||||
if(istype(C, /obj/item/weapon/cable_coil))
|
||||
if(istype(C, /obj/item/stack/cable_coil))
|
||||
if(is_plating())
|
||||
var/obj/item/weapon/cable_coil/coil = C
|
||||
var/obj/item/stack/cable_coil/coil = C
|
||||
coil.turf_place(src, user)
|
||||
else
|
||||
user << "\red You must remove the plating first."
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
return
|
||||
|
||||
//add wires
|
||||
if(istype(W, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if (clipped)
|
||||
user << "<span class='notice'>The [src] are too badly mangled for wiring.</span>"
|
||||
return
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
icon_state = "coin_adamantine"
|
||||
|
||||
/obj/item/weapon/coin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/cable_coil) )
|
||||
var/obj/item/weapon/cable_coil/CC = W
|
||||
if(istype(W,/obj/item/stack/cable_coil) )
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(string_attached)
|
||||
user << "\blue There already is a string attached to this coin."
|
||||
return
|
||||
@@ -64,7 +64,7 @@
|
||||
..()
|
||||
return
|
||||
|
||||
var/obj/item/weapon/cable_coil/CC = new/obj/item/weapon/cable_coil(user.loc)
|
||||
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
|
||||
CC.amount = 1
|
||||
CC.updateicon()
|
||||
overlays = list()
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
else
|
||||
module_string += text("[O]: <A HREF=?src=\ref[src];act=\ref[O]>Activate</A><BR>")
|
||||
|
||||
if((istype(O,/obj/item/weapon) || istype(O,/obj/item/device)) && !(istype(O,/obj/item/weapon/cable_coil)))
|
||||
if((istype(O,/obj/item/weapon) || istype(O,/obj/item/device)) && !(istype(O,/obj/item/stack/cable_coil)))
|
||||
tools += module_string
|
||||
else
|
||||
resources += module_string
|
||||
|
||||
@@ -613,11 +613,11 @@
|
||||
user << "Need more welding fuel!"
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/cable_coil) && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
|
||||
if (!getFireLoss())
|
||||
user << "Nothing to fix here!"
|
||||
return
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
adjustFireLoss(-30)
|
||||
updatehealth()
|
||||
coil.use(1)
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
/obj/item/stack/sheet/metal = 50,
|
||||
/obj/item/stack/sheet/glass = 50,
|
||||
/obj/item/stack/sheet/rglass = 50,
|
||||
/obj/item/weapon/cable_coil = 50,
|
||||
/obj/item/stack/cable_coil = 50,
|
||||
/obj/item/stack/rods = 15,
|
||||
/obj/item/stack/tile/plasteel = 15
|
||||
)
|
||||
@@ -226,7 +226,7 @@
|
||||
G.amount = 50
|
||||
src.modules += G
|
||||
|
||||
var/obj/item/weapon/cable_coil/W = new /obj/item/weapon/cable_coil(src)
|
||||
var/obj/item/stack/cable_coil/W = new /obj/item/stack/cable_coil(src)
|
||||
W.amount = 50
|
||||
src.modules += W
|
||||
|
||||
@@ -407,7 +407,7 @@
|
||||
/obj/item/stack/tile/plasteel = 15,
|
||||
/obj/item/stack/sheet/metal = 20,
|
||||
/obj/item/stack/sheet/glass = 20,
|
||||
/obj/item/weapon/cable_coil = 30
|
||||
/obj/item/stack/cable_coil = 30
|
||||
)
|
||||
|
||||
New()
|
||||
|
||||
@@ -496,11 +496,11 @@
|
||||
update_icon()
|
||||
else
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] the APC interface."
|
||||
else if (istype(W, /obj/item/weapon/cable_coil) && !terminal && opened && has_electronics!=2)
|
||||
else if (istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics!=2)
|
||||
if (src.loc:intact)
|
||||
user << "\red You must remove the floor plating in front of the APC first."
|
||||
return
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(C.amount < 10)
|
||||
user << "\red You need more wires."
|
||||
return
|
||||
@@ -532,7 +532,7 @@
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return
|
||||
new /obj/item/weapon/cable_coil(loc,10)
|
||||
new /obj/item/stack/cable_coil(loc,10)
|
||||
user.visible_message(\
|
||||
"\red [user.name] cut the cables and dismantled the power terminal.",\
|
||||
"You cut the cables and dismantle the power terminal.")
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
/obj/machinery/power/attackby(obj/item/weapon/W, mob/user)
|
||||
|
||||
if(istype(W, /obj/item/weapon/cable_coil))
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
|
||||
var/turf/T = user.loc
|
||||
|
||||
@@ -125,9 +125,9 @@
|
||||
return
|
||||
|
||||
if(src.d1) // 0-X cables are 1 unit, X-X cables are 2 units long
|
||||
new/obj/item/weapon/cable_coil(T, 2, color)
|
||||
new/obj/item/stack/cable_coil(T, 2, color)
|
||||
else
|
||||
new/obj/item/weapon/cable_coil(T, 1, color)
|
||||
new/obj/item/stack/cable_coil(T, 1, color)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<span class='warning'>[user] cuts the cable.</span>", 1)
|
||||
@@ -148,8 +148,8 @@
|
||||
return // not needed, but for clarity
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
coil.cable_join(src, user)
|
||||
|
||||
else if(istype(W, /obj/item/device/multitool))
|
||||
@@ -189,23 +189,24 @@
|
||||
del(src)
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
new/obj/item/weapon/cable_coil(src.loc, src.d1 ? 2 : 1, color)
|
||||
new/obj/item/stack/cable_coil(src.loc, src.d1 ? 2 : 1, color)
|
||||
del(src)
|
||||
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
new/obj/item/weapon/cable_coil(src.loc, src.d1 ? 2 : 1, color)
|
||||
new/obj/item/stack/cable_coil(src.loc, src.d1 ? 2 : 1, color)
|
||||
del(src)
|
||||
return
|
||||
|
||||
// the cable coil object, used for laying cable
|
||||
|
||||
#define MAXCOIL 30
|
||||
/obj/item/weapon/cable_coil
|
||||
/obj/item/stack/cable_coil
|
||||
name = "cable coil"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "coil"
|
||||
var/amount = MAXCOIL
|
||||
amount = MAXCOIL
|
||||
max_amount = MAXCOIL
|
||||
item_color = COLOR_RED
|
||||
desc = "A coil of power cable."
|
||||
throwforce = 10
|
||||
@@ -223,7 +224,7 @@
|
||||
return(OXYLOSS)
|
||||
|
||||
|
||||
/obj/item/weapon/cable_coil/New(loc, length = MAXCOIL, var/param_color = null)
|
||||
/obj/item/stack/cable_coil/New(loc, length = MAXCOIL, var/param_color = null)
|
||||
..()
|
||||
src.amount = length
|
||||
if (param_color)
|
||||
@@ -235,7 +236,7 @@
|
||||
updateicon()
|
||||
update_wclass()
|
||||
|
||||
/obj/item/weapon/cable_coil/proc/updateicon()
|
||||
/obj/item/stack/cable_coil/proc/updateicon()
|
||||
if (!color)
|
||||
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_ORANGE, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
|
||||
item_color = color
|
||||
@@ -249,13 +250,13 @@
|
||||
icon_state = "coil"
|
||||
name = "cable coil"
|
||||
|
||||
/obj/item/weapon/cable_coil/proc/update_wclass()
|
||||
/obj/item/stack/cable_coil/proc/update_wclass()
|
||||
if(amount == 1)
|
||||
w_class = 1.0
|
||||
else
|
||||
w_class = 2.0
|
||||
|
||||
/obj/item/weapon/cable_coil/examine()
|
||||
/obj/item/stack/cable_coil/examine()
|
||||
set src in view(1)
|
||||
|
||||
if(amount == 1)
|
||||
@@ -265,7 +266,7 @@
|
||||
else
|
||||
usr << "A coil of power cable. There are [amount] lengths of cable in the coil."
|
||||
|
||||
/obj/item/weapon/cable_coil/verb/make_restraint()
|
||||
/obj/item/stack/cable_coil/verb/make_restraint()
|
||||
set name = "Make Cable Restraints"
|
||||
set category = "Object"
|
||||
var/mob/M = usr
|
||||
@@ -283,54 +284,61 @@
|
||||
usr << "<span class='notice'>\blue You cannot do that.</span>"
|
||||
..()
|
||||
|
||||
/obj/item/weapon/cable_coil/attackby(obj/item/weapon/W, mob/user)
|
||||
..()
|
||||
/obj/item/stack/cable_coil/attackby(obj/item/weapon/W, mob/user)
|
||||
if( istype(W, /obj/item/weapon/wirecutters) && src.amount > 1)
|
||||
src.amount--
|
||||
new/obj/item/weapon/cable_coil(user.loc, 1,item_color)
|
||||
new/obj/item/stack/cable_coil(user.loc, 1,item_color)
|
||||
user << "<span class='notice'>You cut a piece off the cable coil.</span>"
|
||||
src.updateicon()
|
||||
src.update_wclass()
|
||||
return
|
||||
|
||||
else if( istype(W, /obj/item/weapon/cable_coil) )
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
if(C.amount == MAXCOIL)
|
||||
user << "<span class='notice'>The coil is too long, you cannot add any more cable to it.</span>"
|
||||
else if( istype(W, /obj/item/stack/cable_coil) )
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(C.amount >= MAXCOIL)
|
||||
user << "The coil is too long, you cannot add any more cable to it."
|
||||
return
|
||||
|
||||
if( (C.amount + src.amount <= MAXCOIL) )
|
||||
C.amount += src.amount
|
||||
user << "<span class='notice'>You join the cable coils together.</span>"
|
||||
C.updateicon()
|
||||
C.update_wclass()
|
||||
del(src)
|
||||
return
|
||||
user << "You join the cable coils together."
|
||||
C.add(src.amount) // give it cable
|
||||
src.use(src.amount) // make sure this one cleans up right
|
||||
|
||||
else
|
||||
user << "<span class='notice'>You transfer [MAXCOIL - C.amount ] length\s of cable from one coil to the other.</span>"
|
||||
src.amount -= (MAXCOIL-C.amount)
|
||||
src.updateicon()
|
||||
src.update_wclass()
|
||||
C.amount = MAXCOIL
|
||||
C.updateicon()
|
||||
C.update_wclass()
|
||||
return
|
||||
var/amt = MAXCOIL - C.amount
|
||||
user << "You transfer [amt] length\s of cable from one coil to the other."
|
||||
C.add(amt)
|
||||
src.use(amt)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/cable_coil/proc/use(var/used)
|
||||
if(src.amount < used)
|
||||
return 0
|
||||
else if (src.amount == used)
|
||||
del(src)
|
||||
/obj/item/stack/cable_coil/attack_hand(mob/user as mob)
|
||||
if (user.get_inactive_hand() == src)
|
||||
var/obj/item/stack/cable_coil/F = new /obj/item/stack/cable_coil(user, 1, color)
|
||||
F.copy_evidences(src)
|
||||
user.put_in_hands(F)
|
||||
src.add_fingerprint(user)
|
||||
F.add_fingerprint(user)
|
||||
use(1)
|
||||
else
|
||||
amount -= used
|
||||
updateicon()
|
||||
update_wclass()
|
||||
return 1
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/stack/cable_coil/use(var/used)
|
||||
. = ..()
|
||||
updateicon()
|
||||
update_wclass()
|
||||
return
|
||||
|
||||
/obj/item/stack/cable_coil/add(var/extra)
|
||||
. = ..()
|
||||
updateicon()
|
||||
update_wclass()
|
||||
return
|
||||
|
||||
// called when cable_coil is clicked on a turf/simulated/floor
|
||||
|
||||
/obj/item/weapon/cable_coil/proc/turf_place(turf/simulated/floor/F, mob/user)
|
||||
/obj/item/stack/cable_coil/proc/turf_place(turf/simulated/floor/F, mob/user)
|
||||
|
||||
if(!isturf(user.loc))
|
||||
return
|
||||
@@ -422,7 +430,7 @@
|
||||
use(1)
|
||||
if (C.shock(user, 50))
|
||||
if (prob(50)) //fail
|
||||
new/obj/item/weapon/cable_coil(C.loc, 1, C.color)
|
||||
new/obj/item/stack/cable_coil(C.loc, 1, C.color)
|
||||
del(C)
|
||||
//src.laying = 1
|
||||
//last = C
|
||||
@@ -430,7 +438,7 @@
|
||||
|
||||
// called when cable_coil is click on an installed obj/cable
|
||||
|
||||
/obj/item/weapon/cable_coil/proc/cable_join(obj/structure/cable/C, mob/user)
|
||||
/obj/item/stack/cable_coil/proc/cable_join(obj/structure/cable/C, mob/user)
|
||||
|
||||
var/turf/U = user.loc
|
||||
if(!isturf(U))
|
||||
@@ -482,7 +490,7 @@
|
||||
use(1)
|
||||
if (NC.shock(user, 50))
|
||||
if (prob(50)) //fail
|
||||
new/obj/item/weapon/cable_coil(NC.loc, 1, NC.color)
|
||||
new/obj/item/stack/cable_coil(NC.loc, 1, NC.color)
|
||||
del(NC)
|
||||
|
||||
return
|
||||
@@ -521,7 +529,7 @@
|
||||
use(1)
|
||||
if (C.shock(user, 50))
|
||||
if (prob(50)) //fail
|
||||
new/obj/item/weapon/cable_coil(C.loc, 2, C.color)
|
||||
new/obj/item/stack/cable_coil(C.loc, 2, C.color)
|
||||
del(C)
|
||||
|
||||
return
|
||||
@@ -599,10 +607,10 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
color_n = colorC
|
||||
color = color_n
|
||||
|
||||
/obj/item/weapon/cable_coil/cut
|
||||
/obj/item/stack/cable_coil/cut
|
||||
item_state = "coil2"
|
||||
|
||||
/obj/item/weapon/cable_coil/cut/New(loc)
|
||||
/obj/item/stack/cable_coil/cut/New(loc)
|
||||
..()
|
||||
src.amount = rand(1,2)
|
||||
pixel_x = rand(-2,2)
|
||||
@@ -610,32 +618,32 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
updateicon()
|
||||
update_wclass()
|
||||
|
||||
/obj/item/weapon/cable_coil/yellow
|
||||
/obj/item/stack/cable_coil/yellow
|
||||
item_color = COLOR_YELLOW
|
||||
|
||||
/obj/item/weapon/cable_coil/blue
|
||||
/obj/item/stack/cable_coil/blue
|
||||
item_color = COLOR_BLUE
|
||||
|
||||
/obj/item/weapon/cable_coil/green
|
||||
/obj/item/stack/cable_coil/green
|
||||
item_color = COLOR_GREEN
|
||||
|
||||
/obj/item/weapon/cable_coil/pink
|
||||
/obj/item/stack/cable_coil/pink
|
||||
item_color = COLOR_PINK
|
||||
|
||||
/obj/item/weapon/cable_coil/orange
|
||||
/obj/item/stack/cable_coil/orange
|
||||
item_color = COLOR_ORANGE
|
||||
|
||||
/obj/item/weapon/cable_coil/cyan
|
||||
/obj/item/stack/cable_coil/cyan
|
||||
item_color = COLOR_CYAN
|
||||
|
||||
/obj/item/weapon/cable_coil/white
|
||||
/obj/item/stack/cable_coil/white
|
||||
item_color = COLOR_WHITE
|
||||
|
||||
/obj/item/weapon/cable_coil/random/New()
|
||||
/obj/item/stack/cable_coil/random/New()
|
||||
item_color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/cable_coil/attack(mob/M as mob, mob/user as mob)
|
||||
/obj/item/stack/cable_coil/attack(mob/M as mob, mob/user as mob)
|
||||
if(hasorgans(M))
|
||||
|
||||
var/datum/organ/external/S = M:get_organ(user.zone_sel.selecting)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/cable_coil/heavyduty
|
||||
/obj/item/stack/cable_coil/heavyduty
|
||||
name = "heavy cable coil"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "wire"
|
||||
@@ -18,7 +18,7 @@
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
usr << "\blue These cables are too tough to be cut with those [W.name]."
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/cable_coil))
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
usr << "\blue You will need heavier cables to connect to these."
|
||||
return
|
||||
else
|
||||
|
||||
@@ -128,15 +128,15 @@
|
||||
src.icon_state = "tube-construct-stage1"
|
||||
if("bulb")
|
||||
src.icon_state = "bulb-construct-stage1"
|
||||
new /obj/item/weapon/cable_coil(get_turf(src.loc), 1, "red")
|
||||
new /obj/item/stack/cable_coil(get_turf(src.loc), 1, "red")
|
||||
user.visible_message("[user.name] removes the wiring from [src].", \
|
||||
"You remove the wiring from [src].", "You hear a noise.")
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/cable_coil))
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
if (src.stage != 1) return
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
coil.use(1)
|
||||
switch(fixture_type)
|
||||
if ("tube")
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||
component_parts += new /obj/item/weapon/cable_coil(src)
|
||||
component_parts += new /obj/item/weapon/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new board_path(src)
|
||||
RefreshParts()
|
||||
|
||||
@@ -115,8 +115,8 @@ display round(lastgen) and phorontank amount
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||
component_parts += new /obj/item/weapon/cable_coil(src)
|
||||
component_parts += new /obj/item/weapon/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new board_path(src)
|
||||
var/obj/sheet = new sheet_path(null)
|
||||
|
||||
@@ -214,9 +214,9 @@
|
||||
open_hatch = 0
|
||||
user << "<span class='notice'>You close the maintenance hatch of [src].</span>"
|
||||
if (open_hatch)
|
||||
if(istype(W, /obj/item/weapon/cable_coil) && !terminal && !building_terminal)
|
||||
if(istype(W, /obj/item/stack/cable_coil) && !terminal && !building_terminal)
|
||||
building_terminal = 1
|
||||
var/obj/item/weapon/cable_coil/CC = W
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if (CC.amount < 10)
|
||||
user << "<span class='warning'>You need more cables.</span>"
|
||||
building_terminal = 0
|
||||
@@ -248,7 +248,7 @@
|
||||
s.start()
|
||||
building_terminal = 0
|
||||
return
|
||||
new /obj/item/weapon/cable_coil(loc,10)
|
||||
new /obj/item/stack/cable_coil(loc,10)
|
||||
user.visible_message(\
|
||||
"<span class='notice'>[user.name] cut the cables and dismantled the power terminal.</span>",\
|
||||
"<span class='notice'>You cut the cables and dismantle the power terminal.</span>")
|
||||
|
||||
@@ -228,8 +228,8 @@
|
||||
buildstate++
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(W,/obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
else if(istype(W,/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(buildstate == 2)
|
||||
if(C.amount >= 5)
|
||||
C.use(5)
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/cable_coil))
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
if(W:amount >= 5)
|
||||
W:amount -= 5
|
||||
if(!W:amount) del(W)
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/rdserver(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||
component_parts += new /obj/item/weapon/cable_coil(src)
|
||||
component_parts += new /obj/item/weapon/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
RefreshParts()
|
||||
src.initialize(); //Agouri
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/amplifier" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 5)
|
||||
"/obj/item/stack/cable_coil" = 5)
|
||||
|
||||
datum/design/shield_gen_ex
|
||||
name = "Circuit Design (Experimental hull shield generator)"
|
||||
@@ -40,7 +40,7 @@ datum/design/shield_gen_ex
|
||||
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/amplifier" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 5)
|
||||
"/obj/item/stack/cable_coil" = 5)
|
||||
|
||||
datum/design/shield_gen
|
||||
name = "Circuit Design (Bubble shield generator)"
|
||||
@@ -66,7 +66,7 @@ datum/design/shield_gen
|
||||
"/obj/item/weapon/stock_parts/subspace/treatment" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/analyzer" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 5)
|
||||
"/obj/item/stack/cable_coil" = 5)
|
||||
|
||||
datum/design/shield_cap
|
||||
name = "Circuit Design (Shield capacitor)"
|
||||
|
||||
@@ -299,8 +299,8 @@
|
||||
user << "\blue You open the panel and expose the wiring."
|
||||
is_open = 1
|
||||
|
||||
else if(istype(W, /obj/item/weapon/cable_coil) && malfunction && is_open)
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && malfunction && is_open)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
user << "\blue You begin to replace the wires."
|
||||
//if(do_after(user, min(60, round( ((maxhealth/health)*10)+(malfunction*10) ))) //Take longer to repair heavier damage
|
||||
if(do_after(user, 30))
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
/datum/surgery_step/brain/hematoma
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/FixOVein = 100, \
|
||||
/obj/item/weapon/cable_coil = 75
|
||||
/obj/item/stack/cable_coil = 75
|
||||
)
|
||||
|
||||
min_duration = 90
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
/datum/surgery_step/eye/mend_eyes
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/cable_coil = 75, \
|
||||
/obj/item/stack/cable_coil = 75, \
|
||||
/obj/item/device/assembly/mousetrap = 10 //I don't know. Don't ask me. But I'm leaving it because hilarity.
|
||||
)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/datum/surgery_step/face/mend_vocal
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/cable_coil = 75, \
|
||||
/obj/item/stack/cable_coil = 75, \
|
||||
/obj/item/device/assembly/mousetrap = 10 //I don't know. Don't ask me. But I'm leaving it because hilarity.
|
||||
)
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
/datum/surgery_step/generic/clamp_bleeders
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/cable_coil = 75, \
|
||||
/obj/item/stack/cable_coil = 75, \
|
||||
/obj/item/device/assembly/mousetrap = 20
|
||||
)
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
/datum/surgery_step/head/shape
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/FixOVein = 100, \
|
||||
/obj/item/weapon/cable_coil = 75, \
|
||||
/obj/item/stack/cable_coil = 75, \
|
||||
/obj/item/device/assembly/mousetrap = 10) //ok chinsky
|
||||
|
||||
min_duration = 80
|
||||
@@ -88,7 +88,7 @@
|
||||
/datum/surgery_step/head/suture
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/cable_coil = 60, \
|
||||
/obj/item/stack/cable_coil = 60, \
|
||||
/obj/item/weapon/FixOVein = 80)
|
||||
|
||||
min_duration = 80
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
priority = 2
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/FixOVein = 100, \
|
||||
/obj/item/weapon/cable_coil = 75
|
||||
/obj/item/stack/cable_coil = 75
|
||||
)
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
|
||||
new /obj/item/stack/rods(Tsec)
|
||||
new /obj/item/stack/rods(Tsec)
|
||||
new /obj/item/weapon/cable_coil/cut(Tsec)
|
||||
new /obj/item/stack/cable_coil/cut(Tsec)
|
||||
|
||||
if(cell)
|
||||
cell.forceMove(Tsec)
|
||||
|
||||
@@ -1630,9 +1630,9 @@ turf/simulated/floor/return_siding_icon_state()
|
||||
user << "\blue This section is too damaged to support a tile. Use a welder to fix the damage."
|
||||
|
||||
|
||||
if(istype(C, /obj/item/weapon/cable_coil))
|
||||
if(istype(C, /obj/item/stack/cable_coil))
|
||||
if(is_plating())
|
||||
var/obj/item/weapon/cable_coil/coil = C
|
||||
var/obj/item/stack/cable_coil/coil = C
|
||||
coil.turf_place(src, user)
|
||||
else
|
||||
user << "\red You must remove the plating first."
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
W.loc = src.loc
|
||||
src.peripherals.Remove(W)
|
||||
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
if(P:amount >= 5)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
@@ -99,7 +99,7 @@
|
||||
user << "\blue You remove the cables."
|
||||
src.state = 2
|
||||
src.icon_state = "2"
|
||||
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
|
||||
A.amount = 5
|
||||
if(src.hd)
|
||||
src.hd.loc = src.loc
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
if(C)
|
||||
M.buckled = C
|
||||
else
|
||||
new/obj/item/weapon/cable_coil/cut(M.loc)
|
||||
new/obj/item/stack/cable_coil/cut(M.loc)
|
||||
else
|
||||
step(M,movedir)
|
||||
else
|
||||
@@ -97,7 +97,7 @@
|
||||
G.affecting.Move(src.loc)
|
||||
del(G)
|
||||
return
|
||||
else if(istype(I, /obj/item/weapon/cable_coil)) // if cable, see if a mob is present
|
||||
else if(istype(I, /obj/item/stack/cable_coil)) // if cable, see if a mob is present
|
||||
var/mob/M = locate() in src.loc
|
||||
if(M)
|
||||
if (M == user)
|
||||
|
||||
@@ -52,6 +52,6 @@
|
||||
G.amount = 50
|
||||
src.modules += G
|
||||
|
||||
var/obj/item/weapon/cable_coil/W = new /obj/item/weapon/cable_coil(src)
|
||||
var/obj/item/stack/cable_coil/W = new /obj/item/stack/cable_coil(src)
|
||||
W.amount = 50
|
||||
src.modules += W
|
||||
|
||||
@@ -118,11 +118,11 @@
|
||||
user.show_message(text("\red Done!"),1)
|
||||
src.updateicon()
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/cable_coil) && !bypassed)
|
||||
if(istype(W, /obj/item/stack/cable_coil) && !bypassed)
|
||||
if(src.locked)
|
||||
user.show_message(text("\red You must remove the panel first!"),1)
|
||||
return
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(C.use(4))
|
||||
user.show_message(text("\red You unravel some cable.."),1)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user