mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
merge conflict fix
This commit is contained in:
@@ -54,12 +54,12 @@
|
||||
list(
|
||||
"desc" = "A crudely-wired pod frame.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/wirecutters,
|
||||
"key" = /obj/item/wirecutters,
|
||||
"vis_msg" = "{USER} cuts out the {HOLDER}'s wiring.",
|
||||
"self_msg" = "You remove the {HOLDER}'s wiring."
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/screwdriver,
|
||||
"key" = /obj/item/screwdriver,
|
||||
"vis_msg" = "{USER} adjusts the wiring.",
|
||||
"self_msg" = "You adjust the {HOLDER}'s wiring."
|
||||
)
|
||||
@@ -68,12 +68,12 @@
|
||||
list(
|
||||
"desc" = "A wired pod frame.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/screwdriver,
|
||||
"key" = /obj/item/screwdriver,
|
||||
"vis_msg" = "{USER} unclips {HOLDER}'s wiring harnesses.",
|
||||
"self_msg" = "You unclip {HOLDER}'s wiring harnesses."
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/circuitboard/mecha/pod,
|
||||
"key" = /obj/item/circuitboard/mecha/pod,
|
||||
"vis_msg" = "{USER} inserts the mainboard into the {HOLDER}.",
|
||||
"self_msg" = "You insert the mainboard into the {HOLDER}.",
|
||||
"delete" = 1
|
||||
@@ -83,15 +83,15 @@
|
||||
list(
|
||||
"desc" = "A wired pod frame with a loose mainboard.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/crowbar,
|
||||
"key" = /obj/item/crowbar,
|
||||
"vis_msg" = "{USER} pries out the mainboard.",
|
||||
"self_msg" = "You pry out the mainboard.",
|
||||
|
||||
"spawn" = /obj/item/weapon/circuitboard/mecha/pod,
|
||||
"spawn" = /obj/item/circuitboard/mecha/pod,
|
||||
"amount" = 1
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/screwdriver,
|
||||
"key" = /obj/item/screwdriver,
|
||||
"vis_msg" = "{USER} secures the mainboard.",
|
||||
"self_msg" = "You secure the mainboard."
|
||||
)
|
||||
@@ -100,7 +100,7 @@
|
||||
list(
|
||||
"desc" = "A wired pod frame with a secured mainboard.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/screwdriver,
|
||||
"key" = /obj/item/screwdriver,
|
||||
"vis_msg" = "{USER} unsecures the mainboard.",
|
||||
"self_msg" = "You unscrew the mainboard from the {HOLDER}."
|
||||
),
|
||||
@@ -116,7 +116,7 @@
|
||||
list(
|
||||
"desc" = "A naked space pod with a loose core.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/crowbar,
|
||||
"key" = /obj/item/crowbar,
|
||||
"vis_msg" = "{USER} delicately removes the core from the {HOLDER} with a crowbar.",
|
||||
"self_msg" = "You delicately remove the core from the {HOLDER} with a crowbar.",
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
"amount" = 1
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
"key" = /obj/item/wrench,
|
||||
"vis_msg" = "{USER} secures the core's bolts.",
|
||||
"self_msg" = "You secure the core's bolts."
|
||||
)
|
||||
@@ -133,7 +133,7 @@
|
||||
list(
|
||||
"desc" = "A naked space pod with an exposed core. How lewd.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
"key" = /obj/item/wrench,
|
||||
"vis_msg" = "{USER} unsecures the {HOLDER}'s core.",
|
||||
"self_msg" = "You unsecure the {HOLDER}'s core."
|
||||
),
|
||||
@@ -148,7 +148,7 @@
|
||||
list(
|
||||
"desc" = "A space pod with loose bulkhead panelling exposed.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/crowbar,
|
||||
"key" = /obj/item/crowbar,
|
||||
"vis_msg" = "{USER} pops the {HOLDER}'s bulkhead panelling loose.",
|
||||
"self_msg" = "You pop the {HOLDER}'s bulkhead panelling loose.",
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
"amount" = 5,
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
"key" = /obj/item/wrench,
|
||||
"vis_msg" = "{USER} secures the {HOLDER}'s bulkhead panelling.",
|
||||
"self_msg" = "You secure the {HOLDER}'s bulkhead panelling."
|
||||
)
|
||||
@@ -165,12 +165,12 @@
|
||||
list(
|
||||
"desc" = "A space pod with unwelded bulkhead panelling exposed.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
"key" = /obj/item/wrench,
|
||||
"vis_msg" = "{USER} unbolts the {HOLDER}'s bulkhead panelling.",
|
||||
"self_msg" = "You unbolt the {HOLDER}'s bulkhead panelling."
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/weldingtool,
|
||||
"key" = /obj/item/weldingtool,
|
||||
"vis_msg" = "{USER} seals the {HOLDER}'s bulkhead panelling with a weld.",
|
||||
"self_msg" = "You seal the {HOLDER}'s bulkhead panelling with a weld."
|
||||
)
|
||||
@@ -179,7 +179,7 @@
|
||||
list(
|
||||
"desc" = "A space pod with sealed bulkhead panelling exposed.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/weldingtool,
|
||||
"key" = /obj/item/weldingtool,
|
||||
"vis_msg" = "{USER} cuts the {HOLDER}'s bulkhead panelling loose.",
|
||||
"self_msg" = "You cut the {HOLDER}'s bulkhead panelling loose."
|
||||
),
|
||||
@@ -194,14 +194,14 @@
|
||||
list(
|
||||
"desc" = "A space pod with unsecured armor.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/crowbar,
|
||||
"key" = /obj/item/crowbar,
|
||||
"vis_msg" = "{USER} pries off {HOLDER}'s armor.",
|
||||
"self_msg" = "You pry off {HOLDER}'s armor.",
|
||||
"spawn" = /obj/item/pod_parts/armor,
|
||||
"amount" = 1
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
"key" = /obj/item/wrench,
|
||||
"vis_msg" = "{USER} bolts down the {HOLDER}'s armor.",
|
||||
"self_msg" = "You bolt down the {HOLDER}'s armor."
|
||||
)
|
||||
@@ -210,12 +210,12 @@
|
||||
list(
|
||||
"desc" = "A space pod with unsecured armor.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
"key" = /obj/item/wrench,
|
||||
"vis_msg" = "{USER} unsecures the {HOLDER}'s armor.",
|
||||
"self_msg" = "You unsecure the {HOLDER}'s armor."
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/weldingtool,
|
||||
"key" = /obj/item/weldingtool,
|
||||
"vis_msg" = "{USER} welds the {HOLDER}'s armor.",
|
||||
"self_msg" = "You weld the {HOLDER}'s armor."
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/device/spacepod_equipment/weaponry/proc/fire_weapons()
|
||||
/obj/item/spacepod_equipment/weaponry/proc/fire_weapons()
|
||||
if(my_atom.next_firetime > world.time)
|
||||
to_chat(usr, "<span class='warning'>Your weapons are recharging.</span>")
|
||||
return
|
||||
@@ -45,26 +45,26 @@
|
||||
|
||||
/datum/spacepod/equipment
|
||||
var/obj/spacepod/my_atom
|
||||
var/list/obj/item/device/spacepod_equipment/installed_modules = list() // holds an easy to access list of installed modules
|
||||
var/list/obj/item/spacepod_equipment/installed_modules = list() // holds an easy to access list of installed modules
|
||||
|
||||
var/obj/item/device/spacepod_equipment/weaponry/weapon_system // weapons system
|
||||
var/obj/item/device/spacepod_equipment/misc/misc_system // misc system
|
||||
var/obj/item/device/spacepod_equipment/cargo/cargo_system // cargo system
|
||||
var/obj/item/device/spacepod_equipment/cargo/sec_cargo_system // secondary cargo system
|
||||
var/obj/item/device/spacepod_equipment/lock/lock_system // lock system
|
||||
var/obj/item/spacepod_equipment/weaponry/weapon_system // weapons system
|
||||
var/obj/item/spacepod_equipment/misc/misc_system // misc system
|
||||
var/obj/item/spacepod_equipment/cargo/cargo_system // cargo system
|
||||
var/obj/item/spacepod_equipment/cargo/sec_cargo_system // secondary cargo system
|
||||
var/obj/item/spacepod_equipment/lock/lock_system // lock system
|
||||
|
||||
/datum/spacepod/equipment/New(var/obj/spacepod/SP)
|
||||
..()
|
||||
if(istype(SP))
|
||||
my_atom = SP
|
||||
|
||||
/obj/item/device/spacepod_equipment
|
||||
/obj/item/spacepod_equipment
|
||||
name = "equipment"
|
||||
var/obj/spacepod/my_atom
|
||||
var/occupant_mod = 0 // so any module can modify occupancy
|
||||
var/list/storage_mod = list("slots" = 0, "w_class" = 0) // so any module can modify storage slots
|
||||
|
||||
/obj/item/device/spacepod_equipment/proc/removed(var/mob/user) // So that you can unload cargo when you remove the module
|
||||
/obj/item/spacepod_equipment/proc/removed(var/mob/user) // So that you can unload cargo when you remove the module
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -73,7 +73,7 @@
|
||||
///////////////////////////////////////
|
||||
*/
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry
|
||||
/obj/item/spacepod_equipment/weaponry
|
||||
name = "pod weapon"
|
||||
desc = "You shouldn't be seeing this"
|
||||
icon = 'icons/vehicles/spacepod.dmi'
|
||||
@@ -84,7 +84,7 @@
|
||||
var/fire_sound
|
||||
var/fire_delay = 15
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/taser
|
||||
/obj/item/spacepod_equipment/weaponry/taser
|
||||
name = "disabler system"
|
||||
desc = "A weak taser system for space pods, fires disabler beams."
|
||||
icon_state = "weapon_taser"
|
||||
@@ -92,7 +92,7 @@
|
||||
shot_cost = 400
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/burst_taser
|
||||
/obj/item/spacepod_equipment/weaponry/burst_taser
|
||||
name = "burst taser system"
|
||||
desc = "A weak taser system for space pods, this one fires 3 at a time."
|
||||
icon_state = "weapon_burst_taser"
|
||||
@@ -102,7 +102,7 @@
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
fire_delay = 30
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/laser
|
||||
/obj/item/spacepod_equipment/weaponry/laser
|
||||
name = "laser system"
|
||||
desc = "A weak laser system for space pods, fires concentrated bursts of energy."
|
||||
icon_state = "weapon_laser"
|
||||
@@ -111,7 +111,7 @@
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
|
||||
// MINING LASERS
|
||||
/obj/item/device/spacepod_equipment/weaponry/mining_laser_basic
|
||||
/obj/item/spacepod_equipment/weaponry/mining_laser_basic
|
||||
name = "weak mining laser system"
|
||||
desc = "A weak mining laser system for space pods, fires bursts of energy that cut through rock."
|
||||
icon = 'icons/goonstation/pods/ship.dmi'
|
||||
@@ -121,7 +121,7 @@
|
||||
fire_delay = 14
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/mining_laser
|
||||
/obj/item/spacepod_equipment/weaponry/mining_laser
|
||||
name = "mining laser system"
|
||||
desc = "A mining laser system for space pods, fires bursts of energy that cut through rock."
|
||||
icon = 'icons/goonstation/pods/ship.dmi'
|
||||
@@ -131,7 +131,7 @@
|
||||
fire_delay = 10
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/mining_laser_hyper
|
||||
/obj/item/spacepod_equipment/weaponry/mining_laser_hyper
|
||||
name = "enhanced mining laser system"
|
||||
desc = "An enhanced mining laser system for space pods, fires bursts of energy that cut through rock."
|
||||
icon = 'icons/goonstation/pods/ship.dmi'
|
||||
@@ -147,20 +147,20 @@
|
||||
///////////////////////////////////////
|
||||
*/
|
||||
|
||||
/obj/item/device/spacepod_equipment/misc
|
||||
/obj/item/spacepod_equipment/misc
|
||||
name = "pod misc"
|
||||
desc = "You shouldn't be seeing this"
|
||||
icon = 'icons/goonstation/pods/ship.dmi'
|
||||
icon_state = "blank"
|
||||
var/enabled
|
||||
|
||||
/obj/item/device/spacepod_equipment/misc/tracker
|
||||
/obj/item/spacepod_equipment/misc/tracker
|
||||
name = "\improper spacepod tracking system"
|
||||
desc = "A tracking device for spacepods."
|
||||
icon_state = "pod_locator"
|
||||
enabled = 0
|
||||
|
||||
/obj/item/device/spacepod_equipment/misc/tracker/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
/obj/item/spacepod_equipment/misc/tracker/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(isscrewdriver(I))
|
||||
if(enabled)
|
||||
enabled = 0
|
||||
@@ -177,37 +177,37 @@
|
||||
///////////////////////////////////////
|
||||
*/
|
||||
|
||||
/obj/item/device/spacepod_equipment/cargo
|
||||
/obj/item/spacepod_equipment/cargo
|
||||
name = "pod cargo"
|
||||
desc = "You shouldn't be seeing this"
|
||||
icon = 'icons/vehicles/spacepod.dmi'
|
||||
icon_state = "cargo_blank"
|
||||
var/obj/storage = null
|
||||
|
||||
/obj/item/device/spacepod_equipment/cargo/proc/passover(var/obj/item/I)
|
||||
/obj/item/spacepod_equipment/cargo/proc/passover(var/obj/item/I)
|
||||
return
|
||||
|
||||
/obj/item/device/spacepod_equipment/cargo/proc/unload() // called by unload verb
|
||||
/obj/item/spacepod_equipment/cargo/proc/unload() // called by unload verb
|
||||
if(storage)
|
||||
storage.forceMove(get_turf(my_atom))
|
||||
storage = null
|
||||
|
||||
/obj/item/device/spacepod_equipment/cargo/removed(var/mob/user) // called when system removed
|
||||
/obj/item/spacepod_equipment/cargo/removed(var/mob/user) // called when system removed
|
||||
. = ..()
|
||||
unload()
|
||||
|
||||
// Ore System
|
||||
/obj/item/device/spacepod_equipment/cargo/ore
|
||||
/obj/item/spacepod_equipment/cargo/ore
|
||||
name = "spacepod ore storage system"
|
||||
desc = "An ore storage system for spacepods. Scoops up any ore you drive over."
|
||||
icon_state = "cargo_ore"
|
||||
|
||||
/obj/item/device/spacepod_equipment/cargo/ore/passover(var/obj/item/I)
|
||||
if(storage && istype(I,/obj/item/weapon/ore))
|
||||
/obj/item/spacepod_equipment/cargo/ore/passover(var/obj/item/I)
|
||||
if(storage && istype(I,/obj/item/ore))
|
||||
I.forceMove(storage)
|
||||
|
||||
// Crate System
|
||||
/obj/item/device/spacepod_equipment/cargo/crate
|
||||
/obj/item/spacepod_equipment/cargo/crate
|
||||
name = "spacepod crate storage system"
|
||||
desc = "A heavy duty storage system for spacepods. Holds one crate."
|
||||
icon_state = "cargo_crate"
|
||||
@@ -218,21 +218,21 @@
|
||||
///////////////////////////////////////
|
||||
*/
|
||||
|
||||
/obj/item/device/spacepod_equipment/sec_cargo
|
||||
/obj/item/spacepod_equipment/sec_cargo
|
||||
name = "secondary cargo"
|
||||
desc = "you shouldn't be seeing this"
|
||||
icon = 'icons/vehicles/spacepod.dmi'
|
||||
icon_state = "blank"
|
||||
|
||||
// Passenger Seat
|
||||
/obj/item/device/spacepod_equipment/sec_cargo/chair
|
||||
/obj/item/spacepod_equipment/sec_cargo/chair
|
||||
name = "passenger seat"
|
||||
desc = "A passenger seat for a spacepod."
|
||||
icon_state = "sec_cargo_chair"
|
||||
occupant_mod = 1
|
||||
|
||||
// Loot Box
|
||||
/obj/item/device/spacepod_equipment/sec_cargo/loot_box
|
||||
/obj/item/spacepod_equipment/sec_cargo/loot_box
|
||||
name = "loot box"
|
||||
desc = "A small compartment to store valuables."
|
||||
icon_state = "sec_cargo_loot"
|
||||
@@ -244,7 +244,7 @@
|
||||
///////////////////////////////////////
|
||||
*/
|
||||
|
||||
/obj/item/device/spacepod_equipment/lock
|
||||
/obj/item/spacepod_equipment/lock
|
||||
name = "pod lock"
|
||||
desc = "You shouldn't be seeing this"
|
||||
icon = 'icons/vehicles/spacepod.dmi'
|
||||
@@ -253,18 +253,18 @@
|
||||
var/id = null
|
||||
|
||||
// Key and Tumbler System
|
||||
/obj/item/device/spacepod_equipment/lock/keyed
|
||||
/obj/item/spacepod_equipment/lock/keyed
|
||||
name = "spacepod tumbler lock"
|
||||
desc = "A locking system to stop podjacking. This version uses a standalone key."
|
||||
icon_state = "lock_tumbler"
|
||||
var/static/id_source = 0
|
||||
|
||||
/obj/item/device/spacepod_equipment/lock/keyed/New()
|
||||
/obj/item/spacepod_equipment/lock/keyed/New()
|
||||
..()
|
||||
id = ++id_source
|
||||
|
||||
// The key
|
||||
/obj/item/device/spacepod_key
|
||||
/obj/item/spacepod_key
|
||||
name = "spacepod key"
|
||||
desc = "A key for a spacepod lock."
|
||||
icon = 'icons/vehicles/spacepod.dmi'
|
||||
@@ -273,9 +273,9 @@
|
||||
var/id = 0
|
||||
|
||||
// Key - Lock Interactions
|
||||
/obj/item/device/spacepod_equipment/lock/keyed/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/device/spacepod_key))
|
||||
var/obj/item/device/spacepod_key/key = I
|
||||
/obj/item/spacepod_equipment/lock/keyed/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/spacepod_key))
|
||||
var/obj/item/spacepod_key/key = I
|
||||
if(!key.id)
|
||||
key.id = id
|
||||
to_chat(user, "<span class='notice'>You grind the blank key to fit the lock.</span>")
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/obj/item/device/lock_buster
|
||||
/obj/item/lock_buster
|
||||
name = "pod lock buster"
|
||||
desc = "Destroys a podlock in mere seconds once applied. Waranty void if used."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "lock_buster_off"
|
||||
var/on = 0
|
||||
|
||||
/obj/item/device/lock_buster/attack_self(mob/user as mob)
|
||||
/obj/item/lock_buster/attack_self(mob/user as mob)
|
||||
on = !on
|
||||
if(on)
|
||||
icon_state = "lock_buster_on"
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
pod.loc = F.loc
|
||||
qdel(F)
|
||||
playsound(get_turf(src), O.usesound, 50, 1)
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
if(istype(O, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You [!anchored ? "secure \the [src] in place." : "remove the securing bolts."]</span>")
|
||||
anchored = !anchored
|
||||
density = anchored
|
||||
|
||||
@@ -1,541 +0,0 @@
|
||||
/obj/machinery/spod_part_fabricator
|
||||
icon = 'icons/obj/robotics.dmi'
|
||||
icon_state = "fab-idle"
|
||||
name = "spacepod fabricator"
|
||||
desc = "Nothing is being built."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 5000
|
||||
var/time_coeff = 1
|
||||
var/resource_coeff = 1
|
||||
var/time_coeff_tech = 1
|
||||
var/resource_coeff_tech = 1
|
||||
var/list/resources = list(
|
||||
MAT_METAL=0,
|
||||
MAT_GLASS=0,
|
||||
MAT_BANANIUM=0,
|
||||
MAT_DIAMOND=0,
|
||||
MAT_GOLD=0,
|
||||
MAT_PLASMA=0,
|
||||
MAT_SILVER=0,
|
||||
MAT_URANIUM=0
|
||||
)
|
||||
var/res_max_amount = 200000
|
||||
var/datum/research/files
|
||||
var/id
|
||||
var/sync = 0
|
||||
var/part_set
|
||||
var/datum/design/being_built
|
||||
var/list/queue = list()
|
||||
var/processing_queue = 0
|
||||
var/screen = "main"
|
||||
var/temp
|
||||
var/list/part_sets = list(
|
||||
"Pod_Weaponry",
|
||||
"Pod_Armor",
|
||||
"Pod_Cargo",
|
||||
"Pod_Parts",
|
||||
"Pod_Frame",
|
||||
"Misc",
|
||||
)
|
||||
var/turf/exit
|
||||
|
||||
/obj/machinery/spod_part_fabricator/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/podfab(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
files = new /datum/research(src) //Setup the research data holder.
|
||||
for(var/direction in cardinal)
|
||||
exit = get_step(src,direction)
|
||||
if(!exit.density)
|
||||
break
|
||||
exit = loc
|
||||
|
||||
/obj/machinery/spod_part_fabricator/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/podfab(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/spod_part_fabricator/RefreshParts()
|
||||
var/T = 0
|
||||
|
||||
//maximum stocking amount (max 412000)
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
T += M.rating
|
||||
res_max_amount = (187000+(T * 37500))
|
||||
|
||||
//ressources adjustment coefficient (1 -> 0.88 -> 0.75)
|
||||
T = -1
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/Ma in component_parts)
|
||||
T += Ma.rating
|
||||
resource_coeff = round(initial(resource_coeff) - (initial(resource_coeff)*(T))/8,0.01)
|
||||
|
||||
//building time adjustment coefficient (1 -> 0.8 -> 0.6)
|
||||
T = -1
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/Ml in component_parts)
|
||||
T += Ml.rating
|
||||
time_coeff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/output_parts_list(set_name)
|
||||
var/output = ""
|
||||
for(var/v in files.known_designs)
|
||||
var/datum/design/D = files.known_designs[v]
|
||||
if(D.build_type & PODFAB)
|
||||
if(!(set_name in D.category))
|
||||
continue
|
||||
var/resources_available = check_resources(D)
|
||||
output += "<div class='part'>[output_part_info(D)]<br>\[[resources_available?"<a href='?src=[UID()];part=[D.id]'>Build</a> | ":null]<a href='?src=[UID()];add_to_queue=[D.id]'>Add to queue</a>\]\[<a href='?src=[UID()];part_desc=[D.id]'>?</a>\]</div>"
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/output_part_info(datum/design/D)
|
||||
var/output = "[initial(D.name)] (Cost: [output_part_cost(D)]) [get_construction_time_w_coeff(D)/10] seconds"
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/output_part_cost(datum/design/D)
|
||||
var/i = 0
|
||||
var/output
|
||||
for(var/c in D.materials)
|
||||
if(c in resources)
|
||||
output += "[i?" | ":null][get_resource_cost_w_coeff(D,c)] [material2name(c)]"
|
||||
i++
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/output_available_resources()
|
||||
var/output
|
||||
for(var/resource in resources)
|
||||
var/amount = min(res_max_amount, resources[resource])
|
||||
output += "<span class=\"res_name\">[material2name(resource)]: </span>[amount] cm³, [round(resources[resource] / MINERAL_MATERIAL_AMOUNT,0.1)] sheets"
|
||||
if(amount>0)
|
||||
output += "<span style='font-size:80%;'> - Remove \[<a href='?src=[UID()];remove_mat=1;material=[resource]'>1</a>\] | \[<a href='?src=[UID()];remove_mat=10;material=[resource]'>10</a>\] | \[<a href='?src=[UID()];remove_mat=1;material=[resource];custom_eject=1'>Custom</a>\] | \[<a href='?src=[UID()];remove_mat=[resources[resource] / MINERAL_MATERIAL_AMOUNT];material=[resource]'>All</a>\]</span>"
|
||||
output += "<br/>"
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/remove_resources(datum/design/D)
|
||||
for(var/resource in D.materials)
|
||||
if(resource in resources)
|
||||
resources[resource] -= get_resource_cost_w_coeff(D,resource)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/check_resources(datum/design/D)
|
||||
for(var/R in D.materials)
|
||||
if(R in resources)
|
||||
if(resources[R] < get_resource_cost_w_coeff(D, R))
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/build_part(datum/design/D)
|
||||
being_built = D
|
||||
desc = "It's building \a [initial(D.name)]."
|
||||
remove_resources(D)
|
||||
overlays += "fab-active"
|
||||
use_power = 2
|
||||
updateUsrDialog()
|
||||
sleep(get_construction_time_w_coeff(D))
|
||||
use_power = 1
|
||||
overlays -= "fab-active"
|
||||
desc = initial(desc)
|
||||
|
||||
var/obj/item/I = new D.build_path
|
||||
var/O = D.locked
|
||||
if(O)
|
||||
var/obj/item/weapon/storage/lockbox/L = new/obj/item/weapon/storage/lockbox(exit)
|
||||
I.loc = L
|
||||
L.name += " ([I.name])"
|
||||
else
|
||||
I.loc = exit
|
||||
I.materials[MAT_METAL] = get_resource_cost_w_coeff(D,MAT_METAL)
|
||||
I.materials[MAT_GLASS] = get_resource_cost_w_coeff(D,MAT_GLASS)
|
||||
visible_message("[bicon(src)] <b>\The [src]</b> beeps, \"\The [I] is complete.\"")
|
||||
being_built = null
|
||||
|
||||
updateUsrDialog()
|
||||
return 1
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/update_queue_on_page()
|
||||
send_byjax(usr,"mecha_fabricator.browser","queue",list_queue())
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/add_part_set_to_queue(set_name)
|
||||
if(set_name in part_sets)
|
||||
for(var/v in files.known_designs)
|
||||
var/datum/design/D = files.known_designs[v]
|
||||
if(D.build_type & PODFAB)
|
||||
if(set_name in D.category)
|
||||
add_to_queue(D)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/add_to_queue(D)
|
||||
if(!istype(queue))
|
||||
queue = list()
|
||||
if(D)
|
||||
queue[++queue.len] = D
|
||||
return queue.len
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/remove_from_queue(index)
|
||||
if(!isnum(index) || !istype(queue) || (index<1 || index>queue.len))
|
||||
return 0
|
||||
queue.Cut(index,++index)
|
||||
return 1
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/process_queue()
|
||||
var/datum/design/D = queue[1]
|
||||
if(!D)
|
||||
remove_from_queue(1)
|
||||
if(queue.len)
|
||||
return process_queue()
|
||||
else
|
||||
return
|
||||
temp = null
|
||||
while(D)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
return 0
|
||||
if(!check_resources(D))
|
||||
visible_message("[bicon(src)] <b>\The [src]</b> beeps, \"Not enough resources. Queue processing stopped.\"")
|
||||
temp = {"<span class='alert'>Not enough resources to build next part.</span><br>
|
||||
<a href='?src=[UID()];process_queue=1'>Try again</a> | <a href='?src=[UID()];clear_temp=1'>Return</a><a>"}
|
||||
return 0
|
||||
remove_from_queue(1)
|
||||
build_part(D)
|
||||
D = listgetindex(queue, 1)
|
||||
visible_message("[bicon(src)] <b>\The [src]</b> beeps, \"Queue processing finished successfully.\"")
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/list_queue()
|
||||
var/output = "<b>Queue contains:</b>"
|
||||
if(!istype(queue) || !queue.len)
|
||||
output += "<br>Nothing"
|
||||
else
|
||||
output += "<ol>"
|
||||
var/i = 0
|
||||
for(var/datum/design/D in queue)
|
||||
i++
|
||||
var/obj/part = D.build_path
|
||||
output += "<li[!check_resources(D)?" style='color: #f00;'":null]>[initial(part.name)] - [i>1?"<a href='?src=[UID()];queue_move=-1;index=[i]' class='arrow'>↑</a>":null] [i<queue.len?"<a href='?src=[UID()];queue_move=+1;index=[i]' class='arrow'>↓</a>":null] <a href='?src=[UID()];remove_from_queue=[i]'>Remove</a></li>"
|
||||
|
||||
output += "</ol>"
|
||||
output += "\[<a href='?src=[UID()];process_queue=1'>Process queue</a> | <a href='?src=[UID()];clear_queue=1'>Clear queue</a>\]"
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/update_tech()
|
||||
if(!files)
|
||||
return
|
||||
var/output
|
||||
for(var/v in files.known_tech)
|
||||
var/datum/tech/T = files.known_tech[v]
|
||||
if(T && T.level > 1)
|
||||
var/diff
|
||||
switch(T.id)
|
||||
if("materials")
|
||||
//one materials level is 1/32, so that max level is 0.75 coefficient
|
||||
diff = round(initial(resource_coeff_tech) - (initial(resource_coeff_tech)*(T.level-1))/32,0.01)
|
||||
if(resource_coeff_tech>diff)
|
||||
resource_coeff_tech = diff
|
||||
output+="Production efficiency increased.<br>"
|
||||
if("programming")
|
||||
//one materials level is 1/40, so that max level is 0.8 coefficient
|
||||
diff = round(initial(time_coeff_tech) - (initial(time_coeff_tech)*(T.level-1))/40,0.1)
|
||||
if(time_coeff_tech>diff)
|
||||
time_coeff_tech = diff
|
||||
output+="Production routines updated.<br>"
|
||||
return output
|
||||
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/sync()
|
||||
temp = "Updating local R&D database..."
|
||||
updateUsrDialog()
|
||||
sleep(30) //only sleep if called by user
|
||||
var/area/localarea = get_area(src)
|
||||
|
||||
for(var/obj/machinery/computer/rdconsole/RDC in localarea.contents)
|
||||
if(!RDC.sync)
|
||||
continue
|
||||
RDC.files.push_data(files)
|
||||
temp = "Processed equipment designs.<br>"
|
||||
//check if the tech coefficients have changed
|
||||
temp += update_tech()
|
||||
temp += "<a href='?src=[UID()];clear_temp=1'>Return</a>"
|
||||
|
||||
updateUsrDialog()
|
||||
visible_message("[bicon(src)] <b>\The [src]</b> beeps, \"Successfully synchronized with R&D server.\"")
|
||||
return
|
||||
|
||||
temp = "Unable to connect to local R&D Database.<br>Please check your connections and try again.<br><a href='?src=[UID()];clear_temp=1'>Return</a>"
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/get_resource_cost_w_coeff(datum/design/D, resource, roundto = 1)
|
||||
return round(D.materials[resource]*resource_coeff*resource_coeff_tech, roundto)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/get_construction_time_w_coeff(datum/design/D, roundto = 1) //aran
|
||||
return round(initial(D.construction_time)*time_coeff*time_coeff_tech, roundto)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/attack_hand(mob/user)
|
||||
if(..())
|
||||
return 1
|
||||
return interact(user)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/interact(mob/user as mob)
|
||||
var/dat, left_part
|
||||
if(..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
if(exit.density)
|
||||
visible_message("[bicon(src)] <b>\The [src]</b> beeps, \"Error! Part outlet is obstructed.\"")
|
||||
return
|
||||
if(temp)
|
||||
left_part = temp
|
||||
else if(being_built)
|
||||
var/obj/I = being_built.build_path
|
||||
left_part = {"<TT>Building [initial(I.name)].<BR>
|
||||
Please wait until completion...</TT>"}
|
||||
else
|
||||
switch(screen)
|
||||
if("main")
|
||||
left_part = output_available_resources()+"<hr>"
|
||||
left_part += "<a href='?src=[UID()];sync=1'>Sync with R&D servers</a><hr>"
|
||||
for(var/part_set in part_sets)
|
||||
left_part += "<a href='?src=[UID()];part_set=[part_set]'>[part_set]</a> - \[<a href='?src=[UID()];partset_to_queue=[part_set]'>Add all parts to queue</a>\]<br>"
|
||||
if("parts")
|
||||
left_part += output_parts_list(part_set)
|
||||
left_part += "<hr><a href='?src=[UID()];screen=main'>Return</a>"
|
||||
dat = {"
|
||||
<title>[name]</title>
|
||||
<style>
|
||||
.res_name {font-weight: bold; text-transform: capitalize;}
|
||||
.red {color: #f00;}
|
||||
.part {margin-bottom: 10px;}
|
||||
.arrow {text-decoration: none; font-size: 10px;}
|
||||
body, table {height: 100%;}
|
||||
td {vertical-align: top; padding: 5px;}
|
||||
html, body {padding: 0px; margin: 0px;}
|
||||
h1 {font-size: 18px; margin: 5px 0px;}
|
||||
</style>
|
||||
<script language='javascript' type='text/javascript'>
|
||||
[js_byjax]
|
||||
</script>
|
||||
<table style='width: 100%;'>
|
||||
<tr>
|
||||
<td style='width: 65%; padding-right: 10px;'>
|
||||
[left_part]
|
||||
</td>
|
||||
<td style='width: 35%; background: #000;' id='queue'>
|
||||
[list_queue()]
|
||||
</td>
|
||||
<tr>
|
||||
</table>"}
|
||||
var/datum/browser/popup = new(user, "mecha_fabricator", name, 1000, 430)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "mecha_fabricator")
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["part_set"])
|
||||
var/tpart_set = afilter.getStr("part_set")
|
||||
if(tpart_set)
|
||||
if(tpart_set=="clear")
|
||||
part_set = null
|
||||
else
|
||||
part_set = tpart_set
|
||||
screen = "parts"
|
||||
if(href_list["part"])
|
||||
var/T = afilter.getStr("part")
|
||||
var/datum/design/D = files.known_designs[T]
|
||||
if(D && D.build_type & PODFAB)
|
||||
if(!processing_queue)
|
||||
build_part(D)
|
||||
else
|
||||
add_to_queue(D)
|
||||
if(href_list["add_to_queue"])
|
||||
var/T = afilter.getStr("add_to_queue")
|
||||
var/datum/design/D = files.known_designs[T]
|
||||
if(D && D.build_type & PODFAB)
|
||||
add_to_queue(D)
|
||||
return update_queue_on_page()
|
||||
if(href_list["remove_from_queue"])
|
||||
remove_from_queue(afilter.getNum("remove_from_queue"))
|
||||
return update_queue_on_page()
|
||||
if(href_list["partset_to_queue"])
|
||||
add_part_set_to_queue(afilter.get("partset_to_queue"))
|
||||
return update_queue_on_page()
|
||||
if(href_list["process_queue"])
|
||||
spawn(-1)
|
||||
if(processing_queue || being_built)
|
||||
return 0
|
||||
processing_queue = 1
|
||||
process_queue()
|
||||
processing_queue = 0
|
||||
if(href_list["clear_temp"])
|
||||
temp = null
|
||||
if(href_list["screen"])
|
||||
screen = href_list["screen"]
|
||||
if(href_list["queue_move"] && href_list["index"])
|
||||
var/index = afilter.getNum("index")
|
||||
var/new_index = index + afilter.getNum("queue_move")
|
||||
if(isnum(index) && isnum(new_index))
|
||||
if(IsInRange(new_index,1,queue.len))
|
||||
queue.Swap(index,new_index)
|
||||
return update_queue_on_page()
|
||||
if(href_list["clear_queue"])
|
||||
queue = list()
|
||||
return update_queue_on_page()
|
||||
if(href_list["sync"])
|
||||
sync()
|
||||
if(href_list["part_desc"])
|
||||
var/T = afilter.getStr("part_desc")
|
||||
var/datum/design/D = files.known_designs[T]
|
||||
if(D && D.build_type & PODFAB)
|
||||
var/obj/part = D.build_path
|
||||
temp = {"<h1>[initial(part.name)] description:</h1>
|
||||
[initial(part.desc)]<br>
|
||||
<a href='?src=[UID()];clear_temp=1'>Return</a>
|
||||
"}
|
||||
|
||||
if(href_list["remove_mat"] && href_list["material"])
|
||||
var/amount = text2num(href_list["remove_mat"])
|
||||
var/material = href_list["material"]
|
||||
if(href_list["custom_eject"])
|
||||
amount = input("How many sheets would you like to eject from the machine?", "How much?", 1) as null|num
|
||||
amount = max(0,min(round(resources[material]/MINERAL_MATERIAL_AMOUNT),amount)) // Rounding errors aren't scary, as the mineral eject proc is smart
|
||||
if(!amount)
|
||||
return
|
||||
amount = round(amount)
|
||||
if(amount < 0 || amount > resources[material]) //href protection
|
||||
return
|
||||
|
||||
var/removed = remove_material(material,amount)
|
||||
if(removed == -1)
|
||||
temp = "Not enough [material2name(material)] to produce a sheet."
|
||||
else
|
||||
temp = "Ejected [removed] of [material2name(material)]"
|
||||
temp += "<br><a href='?src=[UID()];clear_temp=1'>Return</a>"
|
||||
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/remove_material(var/mat_string, var/amount)
|
||||
if(resources[mat_string] < MINERAL_MATERIAL_AMOUNT) //not enough mineral for a sheet
|
||||
return -1
|
||||
var/type
|
||||
switch(mat_string)
|
||||
if(MAT_METAL)
|
||||
type = /obj/item/stack/sheet/metal
|
||||
if(MAT_GLASS)
|
||||
type = /obj/item/stack/sheet/glass
|
||||
if(MAT_GOLD)
|
||||
type = /obj/item/stack/sheet/mineral/gold
|
||||
if(MAT_SILVER)
|
||||
type = /obj/item/stack/sheet/mineral/silver
|
||||
if(MAT_DIAMOND)
|
||||
type = /obj/item/stack/sheet/mineral/diamond
|
||||
if(MAT_PLASMA)
|
||||
type = /obj/item/stack/sheet/mineral/plasma
|
||||
if(MAT_URANIUM)
|
||||
type = /obj/item/stack/sheet/mineral/uranium
|
||||
if(MAT_BANANIUM)
|
||||
type = /obj/item/stack/sheet/mineral/bananium
|
||||
else
|
||||
return 0
|
||||
var/result = 0
|
||||
|
||||
while(amount > 50)
|
||||
new type(get_turf(src),50)
|
||||
amount -= 50
|
||||
result += 50
|
||||
resources[mat_string] -= 50 * MINERAL_MATERIAL_AMOUNT
|
||||
|
||||
var/total_amount = round(resources[mat_string]/MINERAL_MATERIAL_AMOUNT)
|
||||
if(total_amount)//if there's still enough material for sheets
|
||||
var/obj/item/stack/sheet/res = new type(get_turf(src),min(amount,total_amount))
|
||||
resources[mat_string] -= res.amount*MINERAL_MATERIAL_AMOUNT
|
||||
result += res.amount
|
||||
|
||||
return result
|
||||
|
||||
|
||||
/obj/machinery/spod_part_fabricator/attackby(obj/W as obj, mob/user as mob, params)
|
||||
if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
for(var/material in resources)
|
||||
remove_material(material, resources[material]/MINERAL_MATERIAL_AMOUNT)
|
||||
default_deconstruction_crowbar(W)
|
||||
return 1
|
||||
else
|
||||
to_chat(user, "<span class='danger'>You can't load \the [name] while it's opened.</span>")
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/stack))
|
||||
var/material
|
||||
switch(W.type)
|
||||
if(/obj/item/stack/sheet/mineral/gold)
|
||||
material = MAT_GOLD
|
||||
if(/obj/item/stack/sheet/mineral/silver)
|
||||
material = MAT_SILVER
|
||||
if(/obj/item/stack/sheet/mineral/diamond)
|
||||
material = MAT_DIAMOND
|
||||
if(/obj/item/stack/sheet/mineral/plasma)
|
||||
material = MAT_PLASMA
|
||||
if(/obj/item/stack/sheet/metal)
|
||||
material = MAT_METAL
|
||||
if(/obj/item/stack/sheet/glass)
|
||||
material = MAT_GLASS
|
||||
if(/obj/item/stack/sheet/mineral/bananium)
|
||||
material = MAT_BANANIUM
|
||||
if(/obj/item/stack/sheet/mineral/uranium)
|
||||
material = MAT_URANIUM
|
||||
else
|
||||
return ..()
|
||||
|
||||
if(being_built)
|
||||
to_chat(user, "\The [src] is currently processing. Please wait until completion.")
|
||||
return
|
||||
if(res_max_amount - resources[material] < MINERAL_MATERIAL_AMOUNT) //overstuffing the fabricator
|
||||
to_chat(user, "\The [src] [material2name(material)] storage is full.")
|
||||
return
|
||||
var/obj/item/stack/sheet/stack = W
|
||||
var/sname = "[stack.name]"
|
||||
if(resources[material] < res_max_amount)
|
||||
overlays += "fab-load-[material2name(material)]"//loading animation is now an overlay based on material type. No more spontaneous conversion of all ores to metal. -vey
|
||||
|
||||
var/transfer_amount = min(stack.amount, round((res_max_amount - resources[material])/MINERAL_MATERIAL_AMOUNT,1))
|
||||
resources[material] += transfer_amount * MINERAL_MATERIAL_AMOUNT
|
||||
stack.use(transfer_amount)
|
||||
to_chat(user, "You insert [transfer_amount] [sname] sheet\s into \the [src].")
|
||||
sleep(10)
|
||||
updateUsrDialog()
|
||||
overlays -= "fab-load-[material2name(material)]" //No matter what the overlay shall still be deleted
|
||||
else
|
||||
to_chat(user, "\The [src] cannot hold any more [sname] sheet\s.")
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/material2name(var/ID)
|
||||
return copytext(ID,2)
|
||||
@@ -5,7 +5,7 @@
|
||||
#define RIM 3
|
||||
#define PAINT 4
|
||||
|
||||
/obj/item/weapon/pod_paint_bucket
|
||||
/obj/item/pod_paint_bucket
|
||||
name = "space pod paintkit"
|
||||
desc = "Pimp your ride"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
@@ -27,12 +27,12 @@
|
||||
var/list/mob/pilot //There is only ever one pilot and he gets all the privledge
|
||||
var/list/mob/passengers = list() //passengers can't do anything and are variable in number
|
||||
var/max_passengers = 0
|
||||
var/obj/item/weapon/storage/internal/cargo_hold
|
||||
var/obj/item/storage/internal/cargo_hold
|
||||
|
||||
var/datum/spacepod/equipment/equipment_system
|
||||
|
||||
var/battery_type = "/obj/item/weapon/stock_parts/cell/high"
|
||||
var/obj/item/weapon/stock_parts/cell/battery
|
||||
var/battery_type = "/obj/item/stock_parts/cell/high"
|
||||
var/obj/item/stock_parts/cell/battery
|
||||
|
||||
var/datum/gas_mixture/cabin_air
|
||||
var/obj/machinery/portable_atmospherics/canister/internal_tank
|
||||
@@ -120,7 +120,7 @@
|
||||
equipment_system = new(src)
|
||||
equipment_system.installed_modules += battery
|
||||
spacepods_list += src
|
||||
cargo_hold = new/obj/item/weapon/storage/internal(src)
|
||||
cargo_hold = new/obj/item/storage/internal(src)
|
||||
cargo_hold.w_class = 5 //so you can put bags in
|
||||
cargo_hold.storage_slots = 0 //You need to install cargo modules to use it.
|
||||
cargo_hold.max_w_class = 5 //fit almost anything
|
||||
@@ -313,7 +313,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The hatch is locked shut!</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
if(istype(W, /obj/item/stock_parts/cell))
|
||||
if(!hatch_open)
|
||||
to_chat(user, "<span class='warning'>The maintenance hatch is closed!</span>")
|
||||
return
|
||||
@@ -325,31 +325,31 @@
|
||||
battery = W
|
||||
W.forceMove(src)
|
||||
return
|
||||
if(istype(W, /obj/item/device/spacepod_equipment))
|
||||
if(istype(W, /obj/item/spacepod_equipment))
|
||||
if(!hatch_open)
|
||||
to_chat(user, "<span class='warning'>The maintenance hatch is closed!</span>")
|
||||
return
|
||||
if(!equipment_system)
|
||||
to_chat(user, "<span class='warning'>The pod has no equipment datum, yell at the coders</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/device/spacepod_equipment/weaponry))
|
||||
if(istype(W, /obj/item/spacepod_equipment/weaponry))
|
||||
add_equipment(user, W, "weapon_system")
|
||||
return
|
||||
if(istype(W, /obj/item/device/spacepod_equipment/misc))
|
||||
if(istype(W, /obj/item/spacepod_equipment/misc))
|
||||
add_equipment(user, W, "misc_system")
|
||||
return
|
||||
if(istype(W, /obj/item/device/spacepod_equipment/cargo))
|
||||
if(istype(W, /obj/item/spacepod_equipment/cargo))
|
||||
add_equipment(user, W, "cargo_system")
|
||||
return
|
||||
if(istype(W, /obj/item/device/spacepod_equipment/sec_cargo))
|
||||
if(istype(W, /obj/item/spacepod_equipment/sec_cargo))
|
||||
add_equipment(user, W, "sec_cargo_system")
|
||||
return
|
||||
if(istype(W, /obj/item/device/spacepod_equipment/lock))
|
||||
if(istype(W, /obj/item/spacepod_equipment/lock))
|
||||
add_equipment(user, W, "lock_system")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/device/spacepod_key) && istype(equipment_system.lock_system, /obj/item/device/spacepod_equipment/lock/keyed))
|
||||
var/obj/item/device/spacepod_key/key = W
|
||||
if(istype(W, /obj/item/spacepod_key) && istype(equipment_system.lock_system, /obj/item/spacepod_equipment/lock/keyed))
|
||||
var/obj/item/spacepod_key/key = W
|
||||
if(key.id == equipment_system.lock_system.id)
|
||||
lock_pod()
|
||||
return
|
||||
@@ -357,11 +357,11 @@
|
||||
to_chat(user, "<span class='warning'>This is the wrong key!</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
if(!hatch_open)
|
||||
to_chat(user, "<span class='warning'>You must open the maintenance hatch before attempting repairs.</span>")
|
||||
return
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(!WT.isOn())
|
||||
to_chat(user, "<span class='warning'>The welder must be on for this task.</span>")
|
||||
return
|
||||
@@ -376,8 +376,8 @@
|
||||
to_chat(user, "<span class='boldnotice'>[src] is fully repaired!</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/device/lock_buster))
|
||||
var/obj/item/device/lock_buster/L = W
|
||||
if(istype(W, /obj/item/lock_buster))
|
||||
var/obj/item/lock_buster/L = W
|
||||
if(L.on && equipment_system.lock_system)
|
||||
user.visible_message(user, "<span class='warning'>[user] is drilling through the [src]'s lock!</span>",
|
||||
"<span class='notice'>You start drilling through the [src]'s lock!</span>")
|
||||
@@ -400,7 +400,7 @@
|
||||
if(cargo_hold.storage_slots > 0 && !hatch_open && unlocked) // must be the last option as all items not listed prior will be stored
|
||||
cargo_hold.attackby(W, user, params)
|
||||
|
||||
obj/spacepod/proc/add_equipment(mob/user, var/obj/item/device/spacepod_equipment/SPE, var/slot)
|
||||
obj/spacepod/proc/add_equipment(mob/user, var/obj/item/spacepod_equipment/SPE, var/slot)
|
||||
if(equipment_system.vars[slot])
|
||||
to_chat(user, "<span class='notice'>The pod already has a [slot], remove it first.</span>")
|
||||
return
|
||||
@@ -409,7 +409,7 @@ obj/spacepod/proc/add_equipment(mob/user, var/obj/item/device/spacepod_equipment
|
||||
user.drop_item(SPE)
|
||||
SPE.forceMove(src)
|
||||
equipment_system.vars[slot] = SPE
|
||||
var/obj/item/device/spacepod_equipment/system = equipment_system.vars[slot]
|
||||
var/obj/item/spacepod_equipment/system = equipment_system.vars[slot]
|
||||
system.my_atom = src
|
||||
equipment_system.installed_modules += SPE
|
||||
max_passengers += SPE.occupant_mod
|
||||
@@ -486,7 +486,7 @@ obj/spacepod/proc/add_equipment(mob/user, var/obj/item/device/spacepod_equipment
|
||||
if("Lock System")
|
||||
remove_equipment(user, equipment_system.lock_system, "lock_system")
|
||||
|
||||
/obj/spacepod/proc/remove_equipment(mob/user, var/obj/item/device/spacepod_equipment/SPE, var/slot)
|
||||
/obj/spacepod/proc/remove_equipment(mob/user, var/obj/item/spacepod_equipment/SPE, var/slot)
|
||||
|
||||
if(passengers.len > max_passengers - SPE.occupant_mod)
|
||||
to_chat(user, "<span class='warning'>Someone is sitting in [SPE]!</span>")
|
||||
@@ -526,12 +526,12 @@ obj/spacepod/proc/add_equipment(mob/user, var/obj/item/device/spacepod_equipment
|
||||
|
||||
L += src.contents
|
||||
|
||||
for(var/obj/item/weapon/storage/S in src)
|
||||
for(var/obj/item/storage/S in src)
|
||||
L += S.return_inv()
|
||||
for(var/obj/item/weapon/gift/G in src)
|
||||
for(var/obj/item/gift/G in src)
|
||||
L += G.gift
|
||||
if(istype(G.gift, /obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/inv = G.gift
|
||||
if(istype(G.gift, /obj/item/storage))
|
||||
var/obj/item/storage/inv = G.gift
|
||||
L += inv.return_inv()
|
||||
return L
|
||||
|
||||
@@ -541,7 +541,7 @@ obj/spacepod/proc/add_equipment(mob/user, var/obj/item/device/spacepod_equipment
|
||||
|
||||
/obj/spacepod/civilian/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/pod_paint_bucket))
|
||||
if(istype(W, /obj/item/pod_paint_bucket))
|
||||
apply_paint(user)
|
||||
return
|
||||
|
||||
@@ -567,24 +567,24 @@ obj/spacepod/proc/add_equipment(mob/user, var/obj/item/device/spacepod_equipment
|
||||
|
||||
/obj/spacepod/sec/New()
|
||||
..()
|
||||
var/obj/item/device/spacepod_equipment/weaponry/burst_taser/T = new /obj/item/device/spacepod_equipment/weaponry/taser
|
||||
var/obj/item/spacepod_equipment/weaponry/burst_taser/T = new /obj/item/spacepod_equipment/weaponry/taser
|
||||
T.loc = equipment_system
|
||||
equipment_system.weapon_system = T
|
||||
equipment_system.weapon_system.my_atom = src
|
||||
equipment_system.installed_modules += T
|
||||
var/obj/item/device/spacepod_equipment/misc/tracker/L = new /obj/item/device/spacepod_equipment/misc/tracker
|
||||
var/obj/item/spacepod_equipment/misc/tracker/L = new /obj/item/spacepod_equipment/misc/tracker
|
||||
L.loc = equipment_system
|
||||
equipment_system.misc_system = L
|
||||
equipment_system.misc_system.my_atom = src
|
||||
equipment_system.misc_system.enabled = 1
|
||||
equipment_system.installed_modules += L
|
||||
var/obj/item/device/spacepod_equipment/sec_cargo/chair/C = new /obj/item/device/spacepod_equipment/sec_cargo/chair
|
||||
var/obj/item/spacepod_equipment/sec_cargo/chair/C = new /obj/item/spacepod_equipment/sec_cargo/chair
|
||||
C.loc = equipment_system
|
||||
equipment_system.sec_cargo_system = C
|
||||
equipment_system.sec_cargo_system.my_atom = src
|
||||
equipment_system.installed_modules += C
|
||||
max_passengers = 1
|
||||
var/obj/item/device/spacepod_equipment/lock/keyed/K = new /obj/item/device/spacepod_equipment/lock/keyed
|
||||
var/obj/item/spacepod_equipment/lock/keyed/K = new /obj/item/spacepod_equipment/lock/keyed
|
||||
K.loc = equipment_system
|
||||
equipment_system.lock_system = K
|
||||
equipment_system.lock_system.my_atom = src
|
||||
@@ -707,15 +707,15 @@ obj/spacepod/proc/add_equipment(mob/user, var/obj/item/device/spacepod_equipment
|
||||
enter_pod(user)
|
||||
return
|
||||
|
||||
if(istype(A, /obj/structure/ore_box) && equipment_system.cargo_system && istype(equipment_system.cargo_system,/obj/item/device/spacepod_equipment/cargo/ore)) // For loading ore boxes
|
||||
if(istype(A, /obj/structure/ore_box) && equipment_system.cargo_system && istype(equipment_system.cargo_system,/obj/item/spacepod_equipment/cargo/ore)) // For loading ore boxes
|
||||
load_cargo(user, A)
|
||||
return
|
||||
|
||||
if(istype(A, /obj/structure/closet/crate) && equipment_system.cargo_system && istype(equipment_system.cargo_system, /obj/item/device/spacepod_equipment/cargo/crate)) // For loading crates
|
||||
if(istype(A, /obj/structure/closet/crate) && equipment_system.cargo_system && istype(equipment_system.cargo_system, /obj/item/spacepod_equipment/cargo/crate)) // For loading crates
|
||||
load_cargo(user, A)
|
||||
|
||||
/obj/spacepod/proc/load_cargo(mob/user, var/obj/O)
|
||||
var/obj/item/device/spacepod_equipment/cargo/ore/C = equipment_system.cargo_system
|
||||
var/obj/item/spacepod_equipment/cargo/ore/C = equipment_system.cargo_system
|
||||
if(!C.storage)
|
||||
to_chat(user, "<span class='notice'>You begin loading [O] into [src]'s [equipment_system.cargo_system]</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
@@ -742,7 +742,7 @@ obj/spacepod/proc/add_equipment(mob/user, var/obj/item/device/spacepod_equipment
|
||||
if(!istype(user))
|
||||
return 0
|
||||
|
||||
var/fukkendisk = user.GetTypeInAllContents(/obj/item/weapon/disk/nuclear)
|
||||
var/fukkendisk = user.GetTypeInAllContents(/obj/item/disk/nuclear)
|
||||
|
||||
if(user.incapacitated()) //are you cuffed, dying, lying, stunned or other
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user