mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Initial cable changes.
This commit is contained in:
@@ -565,6 +565,7 @@
|
||||
#include "code\game\objects\items\toys.dm"
|
||||
#include "code\game\objects\items\trash.dm"
|
||||
#include "code\game\objects\items\devices\aicard.dm"
|
||||
#include "code\game\objects\items\devices\cable_spool.dm"
|
||||
#include "code\game\objects\items\devices\camera_bug.dm"
|
||||
#include "code\game\objects\items\devices\chameleonproj.dm"
|
||||
#include "code\game\objects\items\devices\codebreaker.dm"
|
||||
|
||||
@@ -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)"
|
||||
|
||||
@@ -67,8 +67,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
|
||||
@@ -86,7 +86,7 @@
|
||||
user << "You begin to cut the cables..."
|
||||
playsound(get_turf(src), '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.")
|
||||
|
||||
@@ -94,8 +94,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
|
||||
@@ -113,7 +113,7 @@
|
||||
user << "You begin to cut the cables..."
|
||||
playsound(get_turf(src), '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.")
|
||||
|
||||
@@ -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 (Experimental 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 (Experimental shield capacitor)"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
list(
|
||||
"desc" = "An empty pod frame.",
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/cable_coil,
|
||||
"key" = /obj/item/stack/cable_coil,
|
||||
"vis_msg" = "{USER} wires the {HOLDER}.",
|
||||
"self_msg" = "You wire the {HOLDER}."
|
||||
)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
#define iswelder(A) istype(A, /obj/item/weapon/weldingtool)
|
||||
|
||||
#define iscoil(A) istype(A, /obj/item/weapon/cable_coil)
|
||||
#define iscoil(A) istype(A, /obj/item/stack/cable_coil)
|
||||
|
||||
#define iswirecutter(A) istype(A, /obj/item/weapon/wirecutters)
|
||||
|
||||
@@ -85,4 +85,4 @@
|
||||
|
||||
#define iscrowbar(A) istype(A, /obj/item/weapon/crowbar)
|
||||
|
||||
#define iswire(O) istype(O, /obj/item/weapon/cable_coil)
|
||||
#define iswire(O) istype(O, /obj/item/stack/cable_coil)
|
||||
|
||||
@@ -1211,7 +1211,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,
|
||||
|
||||
@@ -60,8 +60,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
|
||||
@@ -93,7 +93,7 @@
|
||||
proc/spawn_result(mob/user as mob)
|
||||
if(result)
|
||||
testing("[user] finished a [result]!")
|
||||
|
||||
|
||||
new result(get_turf(holder))
|
||||
spawn()
|
||||
del holder
|
||||
@@ -114,8 +114,8 @@
|
||||
return 0
|
||||
stack.use(amount)
|
||||
// CABLES
|
||||
if(istype(used_atom,/obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/coil=used_atom
|
||||
if(istype(used_atom,/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil=used_atom
|
||||
if(coil.amount < amount)
|
||||
user << "\red You don't have enough cable! You need at least [amount] coils."
|
||||
return 0
|
||||
@@ -239,8 +239,8 @@
|
||||
var/spawntype=state["spawn"]
|
||||
var/atom/A = new spawntype(holder.loc)
|
||||
if("amount" in state)
|
||||
if(istype(A,/obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/C=A
|
||||
if(istype(A,/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C=A
|
||||
C.amount=state["amount"]
|
||||
if(istype(A,/obj/item/stack))
|
||||
var/obj/item/stack/S=A
|
||||
|
||||
@@ -348,8 +348,8 @@
|
||||
if(!weight1 && !weight2) //if there's nothing attached
|
||||
user.show_message("<span class='notice'>You cut the knot in the [src].</span>")
|
||||
playsound(usr, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
var /obj/item/weapon/cable_coil/C = new /obj/item/weapon/cable_coil(user.loc) //we get back the wire lengths we put in
|
||||
var /obj/item/weapon/cable_coil/S = new /obj/item/weapon/screwdriver(user.loc)
|
||||
var /obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(user.loc) //we get back the wire lengths we put in
|
||||
var /obj/item/stack/cable_coil/S = new /obj/item/weapon/screwdriver(user.loc)
|
||||
C.amount = 10
|
||||
C._color = cable_color
|
||||
C.icon_state = "coil_[C._color]"
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
for(var/obj/O in src)
|
||||
if(!istype(O,/obj/item/weapon/circuitboard/clonescanner) && \
|
||||
!istype(O,/obj/item/weapon/stock_parts) && \
|
||||
!istype(O,/obj/item/weapon/cable_coil) && \
|
||||
!istype(O,/obj/item/stack/cable_coil) && \
|
||||
O != beaker)
|
||||
O.loc = get_turf(src)//Ejects items that manage to get in there (exluding the components and beaker)
|
||||
if(!occupant)
|
||||
|
||||
@@ -858,8 +858,8 @@
|
||||
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
|
||||
@@ -1002,11 +1002,11 @@ FIRE ALARM
|
||||
buildstage=1
|
||||
user.visible_message("<span class='attack'>[user] has cut the wiring from \the [src]!</span>", "You have cut the last of the wiring from \the [src].")
|
||||
update_icon()
|
||||
new /obj/item/weapon/cable_coil(user.loc,5)
|
||||
new /obj/item/stack/cable_coil(user.loc,5)
|
||||
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
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
|
||||
|
||||
@@ -988,8 +988,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)
|
||||
|
||||
@@ -912,7 +912,7 @@ var/global/mulebot_count = 0
|
||||
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()
|
||||
|
||||
@@ -59,7 +59,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
|
||||
@@ -112,7 +112,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(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "You cut the wires from the circuits."
|
||||
state = 2
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
user << "<span class='notice'>You unfasten the circuit board.</span>"
|
||||
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))
|
||||
@@ -83,7 +83,7 @@
|
||||
user << "<span class='notice'>You remove the cables.</span>"
|
||||
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/glass/rglass))
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
src.state = 1
|
||||
src.icon_state = "1"
|
||||
return 1
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
if(P:amount >= 5)
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
@@ -356,7 +356,7 @@
|
||||
user << "<span class='notice'>You remove the cables.</span>"
|
||||
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
|
||||
return 1
|
||||
|
||||
|
||||
@@ -40,8 +40,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(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start to add cables to the frame.</span>"
|
||||
@@ -104,7 +104,7 @@
|
||||
user << "<span class='notice'>You remove the cables.</span>"
|
||||
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)
|
||||
@@ -153,11 +153,11 @@
|
||||
for(var/I in req_components)
|
||||
if(istype(P, text2path(I)) && (req_components[I] > 0))
|
||||
playsound(get_turf(src), '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 >= req_components[I])
|
||||
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)
|
||||
@@ -188,7 +188,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 << "<span class='warning'>You cannot add that component to the machine!</span>"
|
||||
|
||||
|
||||
@@ -703,7 +703,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
frame_desc = "Requires 2 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
|
||||
@@ -714,7 +714,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
frame_desc = "Requires 2 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
|
||||
@@ -725,7 +725,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
frame_desc = "Requires 2 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
|
||||
@@ -739,7 +739,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
|
||||
@@ -750,7 +750,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
frame_desc = "Requires 2 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
|
||||
@@ -761,7 +761,7 @@ obj/item/weapon/circuitboard/rdserver
|
||||
frame_desc = "Requires 2 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)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
src.health = max(0, src.health - damage)
|
||||
if (src.health <= 0)
|
||||
getFromPool(/obj/item/weapon/shard, 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
|
||||
src.density = 0
|
||||
del(src)
|
||||
@@ -163,7 +163,7 @@
|
||||
visible_message("<span class='warning'>[user] smashes against the [src.name].</span>", 1)
|
||||
if (src.health <= 0)
|
||||
getFromPool(/obj/item/weapon/shard, 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
|
||||
src.density = 0
|
||||
del(src)
|
||||
@@ -205,7 +205,7 @@
|
||||
visible_message("\red <B>[src] was hit by [I].</B>")
|
||||
if (src.health <= 0)
|
||||
getFromPool(/obj/item/weapon/shard, 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
|
||||
src.density = 0
|
||||
del(src)
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
"\red [user.name] has removed \the [C]!",\
|
||||
"You remove \the [C].")
|
||||
return 1
|
||||
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
|
||||
user << "You start adding cables to \the [src]..."
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20) && C.amount >= 10)
|
||||
@@ -89,7 +89,7 @@
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
usr << "You begin to remove the wiring from \the [src]."
|
||||
if(do_after(user, 50))
|
||||
new /obj/item/weapon/cable_coil(loc,5)
|
||||
new /obj/item/stack/cable_coil(loc,5)
|
||||
user.visible_message(\
|
||||
"\red [user.name] cut the cables.",\
|
||||
"You cut the cables.")
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
// ^ makes sinle list of active (R.contents) and inactive modules (R.module.modules)
|
||||
for(var/obj/O in um)
|
||||
// Engineering
|
||||
if(istype(O,/obj/item/weapon/cable_coil))
|
||||
if(istype(O,/obj/item/stack/cable_coil))
|
||||
if(O:amount < 50)
|
||||
O:amount += 2
|
||||
if(O:amount > 50)
|
||||
|
||||
@@ -279,8 +279,8 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/weapon/cable_coil) && malfunction && panel_open)
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
if(istype(W, /obj/item/stack/cable_coil) && malfunction && panel_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))
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
playsound(get_turf(src), '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
|
||||
@@ -79,8 +79,8 @@
|
||||
newpath = text2path(I)
|
||||
var/obj/item/s = new newpath
|
||||
s.loc = user.loc
|
||||
if(istype(s, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/A = s
|
||||
if(istype(s, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/A = s
|
||||
A.amount = 1
|
||||
|
||||
// Drop a circuit board too
|
||||
|
||||
@@ -889,7 +889,7 @@
|
||||
qdel(I)
|
||||
|
||||
new /obj/item/weapon/circuitboard/vendomat(src.loc)
|
||||
new /obj/item/weapon/cable_coil(loc,5)
|
||||
new /obj/item/stack/cable_coil(loc,5)
|
||||
|
||||
return 1
|
||||
return -1
|
||||
@@ -907,7 +907,7 @@
|
||||
qdel(I)
|
||||
|
||||
new /obj/item/weapon/circuitboard/vendomat(src.loc)
|
||||
new /obj/item/weapon/cable_coil(loc,5)
|
||||
new /obj/item/stack/cable_coil(loc,5)
|
||||
|
||||
return 1
|
||||
return -1
|
||||
@@ -980,8 +980,8 @@
|
||||
"<span class='warning'>[user.name] has removed \the [C]!</span>",\
|
||||
"You remove \the [C].")
|
||||
return 1
|
||||
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
|
||||
user << "You start adding cables to \the [src]..."
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20) && C.amount >= 5)
|
||||
@@ -995,7 +995,7 @@
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
usr << "You begin to remove the wiring from \the [src]."
|
||||
if(do_after(user, 50))
|
||||
new /obj/item/weapon/cable_coil(loc,5)
|
||||
new /obj/item/stack/cable_coil(loc,5)
|
||||
user.visible_message(\
|
||||
"<span class='warning'>[user.name] cut the cables.</span>",\
|
||||
"You cut the cables.")
|
||||
@@ -1148,7 +1148,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)
|
||||
@@ -1177,7 +1177,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.
|
||||
@@ -1193,7 +1193,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)
|
||||
|
||||
@@ -128,8 +128,8 @@
|
||||
break
|
||||
del(H)
|
||||
|
||||
for(var/T in typesof(/obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/test = new T
|
||||
for(var/T in typesof(/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/test = new T
|
||||
if(test._color == color)
|
||||
//world << "Found the right cable coil, _color: [test._color]"
|
||||
ccoil_test = 1
|
||||
@@ -181,7 +181,7 @@
|
||||
H.desc = new_desc
|
||||
|
||||
if(ccoil_test)
|
||||
for(var/obj/item/weapon/cable_coil/H in contents)
|
||||
for(var/obj/item/stack/cable_coil/H in contents)
|
||||
//world << "DEBUG: YUP! FOUND IT!"
|
||||
H._color = color
|
||||
H.icon_state = "coil_[color]"
|
||||
@@ -233,7 +233,7 @@
|
||||
istype(W,/obj/item/clothing/gloves) || \
|
||||
istype(W,/obj/item/clothing/shoes) || \
|
||||
istype(W,/obj/item/clothing/suit) || \
|
||||
istype(W,/obj/item/weapon/cable_coil) || \
|
||||
istype(W,/obj/item/stack/cable_coil) || \
|
||||
istype(W,/obj/item/weapon/bedsheet))
|
||||
|
||||
//YES, it's hardcoded... saves a var/can_be_washed for every single clothing item.
|
||||
|
||||
@@ -242,7 +242,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()
|
||||
@@ -269,7 +269,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)
|
||||
@@ -297,7 +297,7 @@
|
||||
m = min(m, cable.amount)
|
||||
if(m)
|
||||
use_cable(m)
|
||||
var/obj/item/weapon/cable_coil/CC = getFromPool(/obj/item/weapon/cable_coil, get_turf(chassis))
|
||||
var/obj/item/stack/cable_coil/CC = getFromPool(/obj/item/stack/cable_coil, get_turf(chassis))
|
||||
CC.amount = m
|
||||
else
|
||||
occupant_message("There's no more cable on the reel.")
|
||||
@@ -309,14 +309,14 @@
|
||||
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)
|
||||
if(to_load)
|
||||
to_load = min(CC.amount, to_load)
|
||||
if(!cable)
|
||||
cable = getFromPool(/obj/item/weapon/cable_coil, src)
|
||||
cable = getFromPool(/obj/item/stack/cable_coil, src)
|
||||
cable.amount = 0
|
||||
cable.amount += to_load
|
||||
CC.use(to_load)
|
||||
|
||||
@@ -702,9 +702,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)
|
||||
|
||||
@@ -81,7 +81,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
|
||||
@@ -125,7 +125,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)
|
||||
@@ -315,7 +315,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
|
||||
@@ -359,7 +359,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)
|
||||
@@ -577,7 +577,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
|
||||
@@ -621,7 +621,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)
|
||||
@@ -897,7 +897,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
|
||||
@@ -942,7 +942,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)
|
||||
@@ -1157,7 +1157,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
|
||||
@@ -1201,7 +1201,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)
|
||||
@@ -1375,7 +1375,7 @@
|
||||
"backkey"=/obj/item/weapon/screwdriver,
|
||||
"desc"="The wiring is added"),
|
||||
//14
|
||||
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."),
|
||||
//15
|
||||
@@ -1413,7 +1413,7 @@
|
||||
user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].")
|
||||
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
|
||||
if(12)
|
||||
if(diff==FORWARD)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -274,8 +274,8 @@
|
||||
M.amount = 2
|
||||
qdel(src)
|
||||
return
|
||||
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
|
||||
user.visible_message(
|
||||
"<span class='warning'>[user.name] has added cables to \the [src]!</span>",
|
||||
"You add cables to \the [src].")
|
||||
@@ -292,7 +292,7 @@
|
||||
if(has_signaler)
|
||||
user << "<span class='warning'>You must remove the signaler first.</span>"
|
||||
return
|
||||
new /obj/item/weapon/cable_coil(get_turf(src),1)
|
||||
new /obj/item/stack/cable_coil(get_turf(src),1)
|
||||
user.visible_message(
|
||||
"<span class='warning'>[user.name] cut the cables.</span>",
|
||||
"You cut the cables.")
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
/obj/item/device/radio/intercom/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(!installed)
|
||||
if(istype(W,/obj/item/weapon/cable_coil))
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
if(!circuitry_installed)
|
||||
user << "\red You need to install intercom electronics first!"
|
||||
return 1
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
user << "<span class='rose'>There is another network terminal here.</span>"
|
||||
return
|
||||
else
|
||||
var/obj/item/weapon/cable_coil/C = new /obj/item/weapon/cable_coil(turf_loc)
|
||||
var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(turf_loc)
|
||||
C.amount = 10
|
||||
user << "You cut the cables and disassemble the unused power terminal."
|
||||
qdel(T)
|
||||
|
||||
@@ -258,12 +258,12 @@
|
||||
W.loc = src
|
||||
src.cell = W
|
||||
user << "<span class='notice'>You insert the cell!</span>"
|
||||
if(istype(W, /obj/item/weapon/cable_coil))
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
if(src.wires)
|
||||
user << "<span class='notice'>You have already inserted wire!</span>"
|
||||
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 << "<span class='notice'>You insert the wire!</span>"
|
||||
|
||||
@@ -201,8 +201,8 @@
|
||||
return 1
|
||||
|
||||
/obj/item/stack/sheet/glass/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
|
||||
|
||||
@@ -15,7 +15,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/glass(user.loc)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
list_recipes(usr, text2num(href_list["sublist"]))
|
||||
|
||||
if (href_list["make"])
|
||||
if (src.amount < 1) del(src) //Never should happen
|
||||
if (src.amount < 1) returnToPool(src) //Never should happen
|
||||
|
||||
var/list/recipes_list = recipes
|
||||
if (href_list["sublist"])
|
||||
@@ -147,14 +147,14 @@
|
||||
var/oldsrc = src
|
||||
src = null //dont kill proc after del()
|
||||
usr.before_take_item(oldsrc)
|
||||
del(oldsrc)
|
||||
returnToPool(oldsrc)
|
||||
if (istype(O,/obj/item))
|
||||
usr.put_in_hands(O)
|
||||
O.add_fingerprint(usr)
|
||||
//BubbleWrap - so newly formed boxes are empty
|
||||
if ( istype(O, /obj/item/weapon/storage) )
|
||||
for (var/obj/item/I in O)
|
||||
del(I)
|
||||
qdel(I)
|
||||
//BubbleWrap END
|
||||
if (src && usr.machine==src) //do not reopen closed window
|
||||
spawn( 0 )
|
||||
@@ -172,7 +172,7 @@
|
||||
if (src.amount<=0)
|
||||
if(usr)
|
||||
usr.before_take_item(src)
|
||||
spawn qdel(src)
|
||||
spawn returnToPool(src)
|
||||
|
||||
/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
|
||||
var/obj/item/stack/oldsrc = src
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/attackby(var/obj/item/I, mob/user as mob) //Wiring the can for ignition
|
||||
if(istype(I, /obj/item/weapon/cable_coil))
|
||||
if(istype(I, /obj/item/stack/cable_coil))
|
||||
if(assembled == 1)
|
||||
var/obj/item/weapon/cable_coil/C = I
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
C.use(1)
|
||||
assembled = 2
|
||||
user << "<span class='notice'>You wire the igniter to detonate the fuel.</span>"
|
||||
|
||||
@@ -30,7 +30,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")
|
||||
@@ -43,7 +43,7 @@
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/device/multitool(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/full/New()
|
||||
..()
|
||||
@@ -52,7 +52,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()
|
||||
|
||||
@@ -70,12 +70,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"
|
||||
@@ -91,6 +91,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)
|
||||
|
||||
@@ -107,8 +107,8 @@
|
||||
return eyestab(M,user)
|
||||
|
||||
/obj/item/weapon/screwdriver/attackby(var/obj/O)
|
||||
if(istype(O, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/C = O
|
||||
if(istype(O, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = O
|
||||
var/mob/M = usr
|
||||
if(ishuman(M) && !M.restrained() && !M.stat && !M.paralysis && ! M.stunned)
|
||||
if(!istype(M.loc,/turf)) return
|
||||
|
||||
@@ -148,11 +148,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))
|
||||
|
||||
@@ -461,7 +461,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
|
||||
|
||||
@@ -195,9 +195,9 @@
|
||||
anchored = !anchored
|
||||
busy = 0
|
||||
|
||||
else if(istype(W, /obj/item/weapon/cable_coil) && state == 0 && anchored )
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored )
|
||||
busy = 1
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
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
|
||||
@@ -214,7 +214,7 @@
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "<span class='notice'>You cut the airlock wires.!</span>"
|
||||
new/obj/item/weapon/cable_coil(src.loc, 1)
|
||||
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||
src.state = 0
|
||||
busy = 0
|
||||
|
||||
|
||||
@@ -126,12 +126,12 @@ obj/structure/windoor_assembly/Destroy()
|
||||
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 << "<span class='notice'>You wire the windoor!</span>"
|
||||
src.state = "02"
|
||||
@@ -153,7 +153,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
if(!src) return
|
||||
|
||||
user << "<span class='notice'>You cut the windoor wires!</span>"
|
||||
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 Wired Windoor Assembly"
|
||||
|
||||
@@ -534,9 +534,9 @@ turf/simulated/floor/proc/update_icon()
|
||||
user << "<span class='warning'>This section is too damaged to support a tile. Use a welder to fix the damage.</span>"
|
||||
|
||||
|
||||
if(istype(C, /obj/item/weapon/cable_coil))
|
||||
if(istype(C, /obj/item/stack/cable_coil))
|
||||
if(is_plating() || is_catwalk())
|
||||
var/obj/item/weapon/cable_coil/coil = C
|
||||
var/obj/item/stack/cable_coil/coil = C
|
||||
coil.turf_place(src, user)
|
||||
else
|
||||
user << "<span class='warning'>You must remove the plating first.</span>"
|
||||
|
||||
@@ -393,8 +393,8 @@
|
||||
T:update_icon(0)
|
||||
return
|
||||
|
||||
if(istype(C, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/coil = C
|
||||
if(istype(C, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil = C
|
||||
coil.turf_place(src, user)
|
||||
|
||||
is_catwalk()
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
user << "<span class='notice'>That won't work.</span>" //i'm not putting my lips on that!
|
||||
..()
|
||||
return
|
||||
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(!wired)
|
||||
if(C.amount >= 2)
|
||||
C.use(2)
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
/obj/item/toy/crayon/blue,
|
||||
/obj/item/toy/crayon/orange,
|
||||
/obj/item/weapon/c_tube,
|
||||
/obj/item/weapon/cable_coil/random,
|
||||
/obj/item/stack/cable_coil/random,
|
||||
/obj/item/weapon/camera_assembly,
|
||||
/obj/item/weapon/cell,
|
||||
/obj/item/weapon/crowbar,
|
||||
@@ -508,7 +508,7 @@
|
||||
/obj/item/weapon/bikehorn/rubberducky,
|
||||
/obj/item/weapon/broken_bottle,
|
||||
/obj/item/weapon/bucket_sensor,
|
||||
/obj/item/weapon/cable_coil,
|
||||
/obj/item/stack/cable_coil,
|
||||
/obj/item/weapon/camera_assembly,
|
||||
/obj/item/weapon/cigbutt/cigarbutt,
|
||||
/obj/item/weapon/clipboard,
|
||||
@@ -657,7 +657,7 @@
|
||||
/obj/item/robot_parts/robot_suit,
|
||||
/obj/item/robot_parts/head,
|
||||
/obj/item/weapon/autopsy_scanner,
|
||||
/obj/item/weapon/cable_coil/pink,
|
||||
/obj/item/stack/cable_coil/pink,
|
||||
/obj/item/weapon/cell/hyper,
|
||||
/obj/item/weapon/ed209_assembly,
|
||||
/obj/item/weapon/firstaid_arm_assembly,
|
||||
|
||||
@@ -378,8 +378,8 @@
|
||||
icon_state = "coin_mythril"
|
||||
|
||||
/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
|
||||
@@ -398,7 +398,7 @@
|
||||
..()
|
||||
return
|
||||
|
||||
var/obj/item/weapon/cable_coil/CC = new(user.loc)
|
||||
var/obj/item/stack/cable_coil/CC = new(user.loc)
|
||||
CC.amount = 1
|
||||
CC.update_icon()
|
||||
overlays = list()
|
||||
|
||||
@@ -180,8 +180,8 @@ They can only use one tool at a time, they can't choose modules, and they have 1
|
||||
user << "Need more welding fuel!"
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/cable_coil) && wiresexposed)
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && wiresexposed)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
adjustFireLoss(-30)
|
||||
updatehealth()
|
||||
coil.use(1)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
src.modules += new /obj/item/blueprints/mommiprints(src)
|
||||
src.modules += new /obj/item/device/material_synth/robot(src)
|
||||
|
||||
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
|
||||
W.max_amount = 50 // Override MAXCOIL
|
||||
src.modules += W
|
||||
@@ -33,14 +33,14 @@
|
||||
var/list/what = list (
|
||||
// /obj/item/stack/sheet/metal/cyborg,
|
||||
// /obj/item/stack/sheet/glass/glass,
|
||||
/obj/item/weapon/cable_coil,
|
||||
/obj/item/stack/cable_coil,
|
||||
// /obj/item/stack/sheet/glass/rglass/cyborg,
|
||||
)
|
||||
for (var/T in what)
|
||||
if (!(locate(T) in src.modules))
|
||||
src.modules -= null
|
||||
var/O = new T(src)
|
||||
if(istype(O,/obj/item/weapon/cable_coil))
|
||||
if(istype(O,/obj/item/stack/cable_coil))
|
||||
O:max_amount = 50
|
||||
src.modules += O
|
||||
O:amount = 1
|
||||
|
||||
@@ -526,7 +526,7 @@
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/show_cable_lengths()
|
||||
var/obj/item/weapon/cable_coil/coil = installed_module(/obj/item/weapon/cable_coil)
|
||||
var/obj/item/stack/cable_coil/coil = installed_module(/obj/item/stack/cable_coil)
|
||||
if(coil)
|
||||
stat(null, text("Cable Lengths: [coil.amount]/[coil.max_amount]"))
|
||||
|
||||
@@ -747,11 +747,11 @@
|
||||
user << "Need more welding fuel!"
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/cable_coil) && wiresexposed)
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && wiresexposed)
|
||||
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)
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
src.modules += new /obj/item/weapon/tile_painter(src)
|
||||
src.modules += new /obj/item/device/material_synth/robot/cyborg(src)
|
||||
|
||||
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
|
||||
W.max_amount = 50
|
||||
src.modules += W
|
||||
@@ -199,13 +199,13 @@
|
||||
|
||||
/obj/item/weapon/robot_module/engineering/respawn_consumable(var/mob/living/silicon/robot/R)
|
||||
var/list/what = list (
|
||||
/obj/item/weapon/cable_coil
|
||||
/obj/item/stack/cable_coil
|
||||
)
|
||||
for (var/T in what)
|
||||
if (!(locate(T) in src.modules))
|
||||
src.modules -= null
|
||||
var/O = new T(src)
|
||||
if(istype(O,/obj/item/weapon/cable_coil))
|
||||
if(istype(O,/obj/item/stack/cable_coil))
|
||||
O:max_amount = 50
|
||||
src.modules += O
|
||||
O:amount = 1
|
||||
@@ -225,7 +225,7 @@
|
||||
// ^ makes sinle list of active (R.contents) and inactive modules (R.module.modules)
|
||||
for(var/obj/O in um)
|
||||
// Engineering
|
||||
if(istype(O,/obj/item/weapon/cable_coil))
|
||||
if(istype(O,/obj/item/stack/cable_coil))
|
||||
if(O:amount < 50)
|
||||
O:amount += 1
|
||||
R.cell.use(50) //Take power from the borg...
|
||||
|
||||
@@ -458,11 +458,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
|
||||
@@ -494,7 +494,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.")
|
||||
|
||||
@@ -138,9 +138,9 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
return
|
||||
|
||||
if(src.d1) // 0-X cables are 1 unit, X-X cables are 2 units long
|
||||
getFromPool(/obj/item/weapon/cable_coil, T, 2, l_color)
|
||||
getFromPool(/obj/item/stack/cable_coil, T, 2, l_color)
|
||||
else
|
||||
getFromPool(/obj/item/weapon/cable_coil, T, 1, l_color)
|
||||
getFromPool(/obj/item/stack/cable_coil, T, 1, l_color)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red [user] cuts the cable.", 1)
|
||||
@@ -169,8 +169,8 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
|
||||
returnToPool(src)
|
||||
return
|
||||
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))
|
||||
if((powernet) && (powernet.avail > 0)) // is it powered?
|
||||
@@ -206,12 +206,12 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
returnToPool(src)
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
getFromPool(/obj/item/weapon/cable_coil, src.loc, src.d1 ? 2 : 1, l_color)
|
||||
getFromPool(/obj/item/stack/cable_coil, src.loc, src.d1 ? 2 : 1, l_color)
|
||||
returnToPool(src)
|
||||
|
||||
if(3.0)
|
||||
if(prob(25))
|
||||
getFromPool(/obj/item/weapon/cable_coil, src.loc, src.d1 ? 2 : 1, l_color)
|
||||
getFromPool(/obj/item/stack/cable_coil, src.loc, src.d1 ? 2 : 1, l_color)
|
||||
returnToPool(src)
|
||||
return
|
||||
|
||||
@@ -476,15 +476,19 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
// Definitions
|
||||
////////////////////////////////
|
||||
|
||||
var/global/list/datum/stack_recipe/cable_recipes = list ( \
|
||||
new/datum/stack_recipe("cable cuffs", /obj/item/weapon/handcuffs/cable, one_per_turf = 0, on_floor = 0))
|
||||
|
||||
#define MAXCOIL 30
|
||||
|
||||
/obj/item/weapon/cable_coil
|
||||
/obj/item/stack/cable_coil
|
||||
name = "cable coil"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "coil_red"
|
||||
gender = NEUTER
|
||||
var/amount = MAXCOIL
|
||||
var/max_amount = MAXCOIL
|
||||
amount = MAXCOIL
|
||||
singular_name = "cable"
|
||||
max_amount = MAXCOIL
|
||||
_color = "red"
|
||||
desc = "A coil of power cable."
|
||||
throwforce = 10
|
||||
@@ -499,13 +503,14 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
item_state = "coil_red"
|
||||
attack_verb = list("whipped", "lashed", "disciplined", "flogged")
|
||||
|
||||
/obj/item/weapon/cable_coil/suicide_act(mob/user)
|
||||
/obj/item/stack/cable_coil/suicide_act(mob/user)
|
||||
viewers(user) << "<SPAN CLASS='danger'>[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.</SPAN>"
|
||||
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)
|
||||
..()
|
||||
amount = length
|
||||
|
||||
recipes = cable_recipes
|
||||
|
||||
if(param_color)
|
||||
_color = param_color
|
||||
@@ -519,7 +524,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
///////////////////////////////////
|
||||
|
||||
// you can use wires to heal robotics
|
||||
/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)
|
||||
|
||||
@@ -542,7 +547,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/cable_coil/update_icon()
|
||||
/obj/item/stack/cable_coil/update_icon()
|
||||
if(!_color)
|
||||
_color = pick("red", "yellow", "blue", "green")
|
||||
|
||||
@@ -556,7 +561,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
icon_state = "coil_[_color]"
|
||||
name = "cable coil"
|
||||
|
||||
/obj/item/weapon/cable_coil/examine()
|
||||
/obj/item/stack/cable_coil/examine()
|
||||
set src in view(1)
|
||||
|
||||
if(amount == 1)
|
||||
@@ -566,90 +571,24 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
else
|
||||
usr << "A coil of power cable. There are [amount] lengths of cable in the coil."
|
||||
|
||||
/obj/item/weapon/cable_coil/verb/make_restraint()
|
||||
set name = "Make Cable Restraints"
|
||||
set category = "Object"
|
||||
|
||||
var/mob/M = usr
|
||||
|
||||
if(ishuman(M) && !M.restrained() && !M.stat && M.canmove)
|
||||
if(!isturf(usr.loc))
|
||||
return
|
||||
|
||||
if(amount <= 14)
|
||||
usr << "<SPAN CLASS='warning'>You need at least 15 lengths to make restraints!</SPAN>"
|
||||
return
|
||||
|
||||
var/obj/item/weapon/handcuffs/cable/B = new(usr.loc)
|
||||
B.icon_state = "cuff_[_color]"
|
||||
usr << "<SPAN CLASS='notice'>You wind some cable together to make some restraints.</SPAN>"
|
||||
use(15)
|
||||
else
|
||||
usr << "<SPAN CLASS='notice'>You cannot do that.</SPAN>"
|
||||
|
||||
..()
|
||||
|
||||
// Items usable on a cable coil :
|
||||
// - Wirecutters : cut them duh !
|
||||
// - Cable coil : merge cables
|
||||
/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)) && (amount > 1))
|
||||
amount--
|
||||
getFromPool(/obj/item/weapon/cable_coil, user.loc, 1, _color)
|
||||
getFromPool(/obj/item/stack/cable_coil, user.loc, 1, _color)
|
||||
user << "You cut a piece off the cable coil."
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
|
||||
if(C.amount >= max_amount)
|
||||
user << "<SPAN CLASS='warning'>The coil is too long, you cannot add any more cable to it.</SPAN>"
|
||||
return
|
||||
|
||||
if((C.amount + src.amount <= max_amount))
|
||||
user << "<SPAN CLASS='notice'>You join the cable coils together.</SPAN>"
|
||||
C.give(amount) // give it cable
|
||||
use(amount) // make sure this one cleans up right
|
||||
return
|
||||
else
|
||||
var/amt = max_amount - C.amount
|
||||
user << "<SPAN CLASS='notice'>You transfer [amt] length\s of cable from one coil to the other.</SPAN>"
|
||||
C.give(amt)
|
||||
use(amt)
|
||||
return
|
||||
|
||||
//remove cables from the stack
|
||||
/obj/item/weapon/cable_coil/proc/use(var/used)
|
||||
if(amount < used)
|
||||
return 0
|
||||
else if (amount == used) //remove cables from the stack
|
||||
//if(ismob(loc)) //handle mob icon update
|
||||
//var/mob/M = loc
|
||||
//M.unEquip(src)
|
||||
|
||||
returnToPool(src)
|
||||
else
|
||||
amount -= used
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
// add cables to the stack
|
||||
/obj/item/weapon/cable_coil/proc/give(var/extra)
|
||||
if(amount + extra > max_amount)
|
||||
amount = max_amount
|
||||
else
|
||||
amount += extra
|
||||
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// Cable laying procedures
|
||||
//////////////////////////////////////////////
|
||||
|
||||
// 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
|
||||
|
||||
@@ -696,12 +635,12 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
|
||||
if(C.shock(user, 50))
|
||||
if(prob(50)) // fail
|
||||
getFromPool(/obj/item/weapon/cable_coil, C.loc)
|
||||
getFromPool(/obj/item/stack/cable_coil, C.loc)
|
||||
returnToPool(C)
|
||||
|
||||
// called when cable_coil is click on an installed obj/cable
|
||||
// or click on a turf that already contains a "node" 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))
|
||||
@@ -760,7 +699,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
|
||||
if (NC.shock(user, 50))
|
||||
if (prob(50)) //fail
|
||||
new/obj/item/weapon/cable_coil(NC.loc, 1, NC.l_color)
|
||||
new/obj/item/stack/cable_coil(NC.loc, 1, NC.l_color)
|
||||
returnToPool(NC)
|
||||
|
||||
return
|
||||
@@ -805,7 +744,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
|
||||
if(C.shock(user, 50))
|
||||
if(prob(50)) //fail
|
||||
getFromPool(/obj/item/weapon/cable_coil, C.loc, 1, C.l_color)
|
||||
getFromPool(/obj/item/stack/cable_coil, C.loc, 1, C.l_color)
|
||||
returnToPool(C)
|
||||
return
|
||||
|
||||
@@ -815,45 +754,45 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
// Misc.
|
||||
/////////////////////////////
|
||||
|
||||
/obj/item/weapon/cable_coil/cut
|
||||
/obj/item/stack/cable_coil/cut
|
||||
item_state = "coil_red2"
|
||||
|
||||
/obj/item/weapon/cable_coil/cut/New(loc)
|
||||
/obj/item/stack/cable_coil/cut/New(loc)
|
||||
..(loc)
|
||||
src.amount = rand(1, 2)
|
||||
pixel_x = rand(-2, 2)
|
||||
pixel_y = rand(-2, 2)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/cable_coil/yellow
|
||||
/obj/item/stack/cable_coil/yellow
|
||||
_color = "yellow"
|
||||
icon_state = "coil_yellow"
|
||||
|
||||
/obj/item/weapon/cable_coil/blue
|
||||
/obj/item/stack/cable_coil/blue
|
||||
_color = "blue"
|
||||
icon_state = "coil_blue"
|
||||
|
||||
/obj/item/weapon/cable_coil/green
|
||||
/obj/item/stack/cable_coil/green
|
||||
_color = "green"
|
||||
icon_state = "coil_green"
|
||||
|
||||
/obj/item/weapon/cable_coil/pink
|
||||
/obj/item/stack/cable_coil/pink
|
||||
_color = "pink"
|
||||
icon_state = "coil_pink"
|
||||
|
||||
/obj/item/weapon/cable_coil/orange
|
||||
/obj/item/stack/cable_coil/orange
|
||||
_color = "orange"
|
||||
icon_state = "coil_orange"
|
||||
|
||||
/obj/item/weapon/cable_coil/cyan
|
||||
/obj/item/stack/cable_coil/cyan
|
||||
_color = "cyan"
|
||||
icon_state = "coil_cyan"
|
||||
|
||||
/obj/item/weapon/cable_coil/white
|
||||
/obj/item/stack/cable_coil/white
|
||||
_color = "white"
|
||||
icon_state = "coil_white"
|
||||
|
||||
/obj/item/weapon/cable_coil/random/New()
|
||||
/obj/item/stack/cable_coil/random/New()
|
||||
_color = pick("red","yellow","green","blue","pink")
|
||||
icon_state = "coil_[_color]"
|
||||
..()
|
||||
|
||||
@@ -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))
|
||||
user << "<span class='notice'>These cables are too tough to be cut with those [W.name].</span>"
|
||||
return
|
||||
else if(W.type == /obj/item/weapon/cable_coil)
|
||||
else if(W.type == /obj/item/stack/cable_coil)
|
||||
user << "<span class='notice'>You will need heavier cables to connect to these.</span>"
|
||||
return
|
||||
else
|
||||
|
||||
@@ -68,15 +68,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(get_turf(src), '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")
|
||||
|
||||
@@ -114,8 +114,8 @@ display round(lastgen) and plasmatank amount
|
||||
component_parts = newlist(
|
||||
/obj/item/weapon/stock_parts/matter_bin,
|
||||
/obj/item/weapon/stock_parts/micro_laser,
|
||||
/obj/item/weapon/cable_coil,
|
||||
/obj/item/weapon/cable_coil,
|
||||
/obj/item/stack/cable_coil,
|
||||
/obj/item/stack/cable_coil,
|
||||
/obj/item/weapon/stock_parts/capacitor,
|
||||
board_path
|
||||
)
|
||||
|
||||
@@ -97,8 +97,8 @@
|
||||
if(..())
|
||||
return 1
|
||||
if(panel_open)
|
||||
if(istype(W, /obj/item/weapon/cable_coil) && !terminal)
|
||||
var/obj/item/weapon/cable_coil/CC = W
|
||||
if(istype(W, /obj/item/stack/cable_coil) && !terminal)
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
|
||||
if (CC.amount < 10)
|
||||
user << "<span class=\"warning\">You need 10 length cable coil to make a terminal.</span>"
|
||||
@@ -126,7 +126,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(\
|
||||
"<span class='warning'>[user.name] cut the cables and dismantled the power terminal.</span>",\
|
||||
"You cut the cables and dismantle the power terminal.")
|
||||
|
||||
@@ -85,7 +85,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) qdel(W)
|
||||
|
||||
@@ -43,7 +43,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,
|
||||
)
|
||||
|
||||
priority = 3
|
||||
|
||||
@@ -91,7 +91,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.
|
||||
)
|
||||
|
||||
|
||||
@@ -52,7 +52,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.
|
||||
)
|
||||
|
||||
|
||||
@@ -182,7 +182,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
|
||||
)
|
||||
|
||||
@@ -92,7 +92,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,
|
||||
)
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
/datum/surgery_step/internal/attach_organ
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/FixOVein = 100,
|
||||
/obj/item/weapon/cable_coil = 75,
|
||||
/obj/item/stack/cable_coil = 75,
|
||||
)
|
||||
|
||||
min_duration = 100
|
||||
|
||||
@@ -9,7 +9,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
|
||||
|
||||
Reference in New Issue
Block a user