mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-09 14:15:22 +01:00
Switching cable coils to stacks
This commit is contained in:
@@ -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.")
|
||||
|
||||
@@ -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)"
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/weapon/wrench(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/weapon/cable_coil(src)
|
||||
new /obj/item/stack/cable_coil(src)
|
||||
|
||||
new /obj/item/weapon/handcuffs(src)
|
||||
new /obj/item/weapon/dnainjector/xraymut(src)
|
||||
@@ -146,7 +146,7 @@
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/weapon/wrench(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/weapon/cable_coil(src)
|
||||
new /obj/item/stack/cable_coil(src)
|
||||
|
||||
new /obj/item/device/analyzer(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
name = "Building Supplies"
|
||||
id = "supplies"
|
||||
blacklist = null
|
||||
whitelist = list(/obj/item/weapon/cable_coil,/obj/item/stack/rods,
|
||||
whitelist = list(/obj/item/stack/cable_coil,/obj/item/stack/rods,
|
||||
/obj/item/stack/sheet/metal,/obj/item/stack/sheet/plasteel,
|
||||
/obj/item/stack/sheet/glass,/obj/item/stack/sheet/rglass,
|
||||
/obj/item/stack/tile,/obj/item/weapon/light,
|
||||
@@ -375,7 +375,7 @@
|
||||
universal = 1
|
||||
|
||||
blacklist = null
|
||||
whitelist = list(/obj/item/stack,/obj/item/weapon/cable_coil)
|
||||
whitelist = list(/obj/item/stack,/obj/item/stack/cable_coil)
|
||||
|
||||
dedicated_path = /obj/machinery/programmable/stacker
|
||||
|
||||
@@ -399,12 +399,12 @@
|
||||
I.loc = master
|
||||
master.types[I.type] = src
|
||||
return I.w_class
|
||||
if(istype(W,/obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/I = W
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/I = W
|
||||
if(!I.amount) // todo: am I making a bad assumption here?
|
||||
del I
|
||||
return
|
||||
for(var/obj/item/weapon/cable_coil/O in master.contents)
|
||||
for(var/obj/item/stack/cable_coil/O in master.contents)
|
||||
if(O.type == I.type && O.amount < MAXCOIL)
|
||||
if(I.amount + O.amount <= MAXCOIL)
|
||||
O.amount += I.amount
|
||||
@@ -427,8 +427,8 @@
|
||||
if(src.enabled && (I.amount < I.max_amount))
|
||||
return // Still needs to be stacked
|
||||
..(W,D)
|
||||
if(istype(W,/obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/I = W
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/I = W
|
||||
if(src.enabled && (I.amount < MAXCOIL))
|
||||
return // Still needs to be stacked
|
||||
..(W,D)
|
||||
@@ -439,7 +439,7 @@
|
||||
name = "Stack Items"
|
||||
id = "ustacker"
|
||||
blacklist = null
|
||||
whitelist = list(/obj/item/stack,/obj/item/weapon/cable_coil)
|
||||
whitelist = list(/obj/item/stack,/obj/item/stack/cable_coil)
|
||||
|
||||
dedicated_path = /obj/machinery/programmable/unary/stacker
|
||||
|
||||
@@ -456,11 +456,11 @@
|
||||
return ..(W,S,remaining)
|
||||
return 0
|
||||
|
||||
if(istype(W,/obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/I = W
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/I = W
|
||||
if(I.amount >= MAXCOIL)
|
||||
return 0
|
||||
for(var/obj/item/weapon/cable_coil/other in S.contents)
|
||||
for(var/obj/item/stack/cable_coil/other in S.contents)
|
||||
if(other != I && other.amount < MAXCOIL)
|
||||
return ..(W,S,remaining)
|
||||
return 0
|
||||
@@ -481,9 +481,9 @@
|
||||
//end for
|
||||
I.loc = D
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/I = W
|
||||
for(var/obj/item/weapon/cable_coil/O in D.contents)
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/I = W
|
||||
for(var/obj/item/stack/cable_coil/O in D.contents)
|
||||
if(O.type == I.type && O.amount < MAXCOIL)
|
||||
if(I.amount + O.amount <= MAXCOIL) // Why did they make it a #define.
|
||||
O.amount += I.amount
|
||||
|
||||
@@ -557,7 +557,7 @@
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/cable_coil" = 1)
|
||||
"/obj/item/stack/cable_coil" = 1)
|
||||
|
||||
//Customization of the machine
|
||||
var/datum/cargoprofile/default = new/datum/cargoprofile()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user