Merge branch 'master' into upstream-merge-29940
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
icon_screen = "crew"
|
||||
icon_keyboard = "med_key"
|
||||
circuit = /obj/item/weapon/circuitboard/computer/operating
|
||||
var/mob/living/carbon/human/patient = null
|
||||
var/obj/structure/table/optable/table = null
|
||||
var/mob/living/carbon/human/patient
|
||||
var/obj/structure/table/optable/table
|
||||
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
|
||||
+129
-142
@@ -1,142 +1,129 @@
|
||||
/obj/machinery/computer
|
||||
name = "computer"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "computer"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 300
|
||||
active_power_usage = 300
|
||||
max_integrity = 200
|
||||
integrity_failure = 100
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 40, acid = 20)
|
||||
var/obj/item/weapon/circuitboard/computer/circuit = null // if circuit==null, computer can't disassembly
|
||||
var/processing = FALSE
|
||||
var/brightness_on = 2
|
||||
var/icon_keyboard = "generic_key"
|
||||
var/icon_screen = "generic"
|
||||
var/clockwork = FALSE
|
||||
|
||||
/obj/machinery/computer/New(location, obj/item/weapon/circuitboard/C)
|
||||
..(location)
|
||||
if(C && istype(C))
|
||||
circuit = C
|
||||
//Some machines, oldcode arcades mostly, new themselves, so circuit
|
||||
//can already be an instance of a type and trying to new that will
|
||||
//cause a runtime
|
||||
else if(ispath(circuit))
|
||||
circuit = new circuit(null)
|
||||
|
||||
/obj/machinery/computer/Destroy()
|
||||
if(circuit)
|
||||
qdel(circuit)
|
||||
circuit = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/Initialize()
|
||||
. = ..()
|
||||
power_change()
|
||||
|
||||
/obj/machinery/computer/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/ratvar_act()
|
||||
if(!clockwork)
|
||||
clockwork = TRUE
|
||||
icon_screen = "ratvar[rand(1, 4)]"
|
||||
icon_keyboard = "ratvar_key[rand(1, 6)]"
|
||||
icon_state = "ratvarcomputer[rand(1, 4)]"
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/narsie_act()
|
||||
if(clockwork && clockwork != initial(clockwork)) //if it's clockwork but isn't normally clockwork
|
||||
clockwork = FALSE
|
||||
icon_screen = initial(icon_screen)
|
||||
icon_keyboard = initial(icon_keyboard)
|
||||
icon_state = initial(icon_state)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/update_icon()
|
||||
cut_overlays()
|
||||
if(stat & NOPOWER)
|
||||
add_overlay("[icon_keyboard]_off")
|
||||
return
|
||||
add_overlay(icon_keyboard)
|
||||
if(stat & BROKEN)
|
||||
add_overlay("[icon_state]_broken")
|
||||
else
|
||||
add_overlay(icon_screen)
|
||||
|
||||
/obj/machinery/computer/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(brightness_on)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && circuit && !(flags&NODECONSTRUCT))
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'> You start to disconnect the monitor...</span>")
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
deconstruct(TRUE, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(stat & BROKEN)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, 1)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
/obj/machinery/computer/obj_break(damage_flag)
|
||||
if(circuit && !(flags & NODECONSTRUCT)) //no circuit, no breaking
|
||||
if(!(stat & BROKEN))
|
||||
playsound(loc, 'sound/effects/glassbr3.ogg', 100, 1)
|
||||
stat |= BROKEN
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(prob(50))
|
||||
obj_break("energy")
|
||||
if(2)
|
||||
if(prob(10))
|
||||
obj_break("energy")
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/deconstruct(disassembled = TRUE, mob/user)
|
||||
on_deconstruction()
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(circuit) //no circuit, no computer frame
|
||||
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer(src.loc)
|
||||
A.circuit = circuit
|
||||
A.anchored = TRUE
|
||||
if(stat & BROKEN)
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
else
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
circuit = null
|
||||
for(var/obj/C in src)
|
||||
C.forceMove(loc)
|
||||
|
||||
qdel(src)
|
||||
/obj/machinery/computer
|
||||
name = "computer"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "computer"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 300
|
||||
active_power_usage = 300
|
||||
max_integrity = 200
|
||||
integrity_failure = 100
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 40, acid = 20)
|
||||
var/processing = FALSE
|
||||
var/brightness_on = 2
|
||||
var/icon_keyboard = "generic_key"
|
||||
var/icon_screen = "generic"
|
||||
var/clockwork = FALSE
|
||||
|
||||
/obj/machinery/computer/Initialize(mapload, obj/item/weapon/circuitboard/C)
|
||||
. = ..()
|
||||
power_change()
|
||||
|
||||
/obj/machinery/computer/Destroy()
|
||||
QDEL_NULL(circuit)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/ratvar_act()
|
||||
if(!clockwork)
|
||||
clockwork = TRUE
|
||||
icon_screen = "ratvar[rand(1, 4)]"
|
||||
icon_keyboard = "ratvar_key[rand(1, 6)]"
|
||||
icon_state = "ratvarcomputer[rand(1, 4)]"
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/narsie_act()
|
||||
if(clockwork && clockwork != initial(clockwork)) //if it's clockwork but isn't normally clockwork
|
||||
clockwork = FALSE
|
||||
icon_screen = initial(icon_screen)
|
||||
icon_keyboard = initial(icon_keyboard)
|
||||
icon_state = initial(icon_state)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/update_icon()
|
||||
cut_overlays()
|
||||
if(stat & NOPOWER)
|
||||
add_overlay("[icon_keyboard]_off")
|
||||
return
|
||||
add_overlay(icon_keyboard)
|
||||
if(stat & BROKEN)
|
||||
add_overlay("[icon_state]_broken")
|
||||
else
|
||||
add_overlay(icon_screen)
|
||||
|
||||
/obj/machinery/computer/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(brightness_on)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && circuit && !(flags&NODECONSTRUCT))
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'> You start to disconnect the monitor...</span>")
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
deconstruct(TRUE, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(stat & BROKEN)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, 1)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
/obj/machinery/computer/obj_break(damage_flag)
|
||||
if(circuit && !(flags & NODECONSTRUCT)) //no circuit, no breaking
|
||||
if(!(stat & BROKEN))
|
||||
playsound(loc, 'sound/effects/glassbr3.ogg', 100, 1)
|
||||
stat |= BROKEN
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(prob(50))
|
||||
obj_break("energy")
|
||||
if(2)
|
||||
if(prob(10))
|
||||
obj_break("energy")
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/deconstruct(disassembled = TRUE, mob/user)
|
||||
on_deconstruction()
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(circuit) //no circuit, no computer frame
|
||||
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer(src.loc)
|
||||
A.circuit = circuit
|
||||
A.anchored = TRUE
|
||||
if(stat & BROKEN)
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
else
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
circuit = null
|
||||
for(var/obj/C in src)
|
||||
C.forceMove(loc)
|
||||
|
||||
qdel(src)
|
||||
@@ -16,9 +16,9 @@
|
||||
var/auth_id = "\[NULL\]"
|
||||
|
||||
/obj/machinery/computer/apc_control/Initialize()
|
||||
. = ..()
|
||||
apcs = list() //To avoid BYOND making the list run through a ton of procs
|
||||
filters = list("Name" = null, "Charge Above" = null, "Charge Below" = null, "Responsive" = null)
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/apc_control/process()
|
||||
apcs = list() //Clear the list every tick
|
||||
|
||||
@@ -51,21 +51,17 @@
|
||||
/obj/machinery/computer/arcade/proc/Reset()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/arcade/New()
|
||||
..()
|
||||
/obj/machinery/computer/arcade/Initialize()
|
||||
. = ..()
|
||||
// If it's a generic arcade machine, pick a random arcade
|
||||
// circuit board for it and make the new machine
|
||||
if(!circuit)
|
||||
var/choice = pick(subtypesof(/obj/item/weapon/circuitboard/computer/arcade))
|
||||
var/obj/item/weapon/circuitboard/CB = new choice()
|
||||
new CB.build_path(loc, CB)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/computer/arcade/Initialize()
|
||||
. = ..()
|
||||
return INITIALIZE_HINT_QDEL
|
||||
Reset()
|
||||
|
||||
|
||||
#define PULSE_MEDAL "Jackpot"
|
||||
|
||||
/obj/machinery/computer/arcade/proc/prizevend()
|
||||
@@ -78,11 +74,9 @@
|
||||
new prizeselect(src)
|
||||
|
||||
var/atom/movable/prize = pick(contents)
|
||||
visible_message(
|
||||
"<span class='notice'>[src] dispenses a [prize]!</span>",
|
||||
"<span class='notice'>You hear a chime and a clunk.</span>")
|
||||
visible_message("<span class='notice'>[src] dispenses a [prize]!</span>", "<span class='notice'>You hear a chime and a clunk.</span>")
|
||||
|
||||
prize.loc = loc
|
||||
prize.forceMove(get_turf(src))
|
||||
#undef PULSE_MEDAL
|
||||
|
||||
/obj/machinery/computer/arcade/emp_act(severity)
|
||||
@@ -157,7 +151,6 @@
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||
popup.open()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/arcade/battle/Topic(href, href_list)
|
||||
if(..())
|
||||
|
||||
@@ -142,320 +142,4 @@
|
||||
new /obj/item/weapon/shard(loc)
|
||||
if(state >= 3)
|
||||
new /obj/item/stack/cable_coil(loc , 5)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard
|
||||
name = "circuit board"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "id_mod"
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
origin_tech = "programming=2"
|
||||
materials = list(MAT_GLASS=1000)
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/build_path = null
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/turbine_computer
|
||||
name = "Turbine Computer (Computer Board)"
|
||||
build_path = /obj/machinery/computer/turbine_computer
|
||||
origin_tech = "programming=4;engineering=4;powerstorage=4"
|
||||
/obj/item/weapon/circuitboard/computer/launchpad_console
|
||||
name = "Launchpad Control Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/launchpad
|
||||
origin_tech = "programming=3;bluespace=3;plasmatech=2"
|
||||
/obj/item/weapon/circuitboard/computer/message_monitor
|
||||
name = "Message Monitor (Computer Board)"
|
||||
build_path = /obj/machinery/computer/message_monitor
|
||||
origin_tech = "programming=2"
|
||||
/obj/item/weapon/circuitboard/computer/security
|
||||
name = "Security Cameras (Computer Board)"
|
||||
build_path = /obj/machinery/computer/security
|
||||
origin_tech = "programming=2;combat=2"
|
||||
/obj/item/weapon/circuitboard/computer/xenobiology
|
||||
name = "circuit board (Xenobiology Console)"
|
||||
build_path = /obj/machinery/computer/camera_advanced/xenobio
|
||||
origin_tech = "programming=3;biotech=3"
|
||||
/obj/item/weapon/circuitboard/computer/base_construction
|
||||
name = "circuit board (Aux Mining Base Construction Console)"
|
||||
build_path = /obj/machinery/computer/camera_advanced/base_construction
|
||||
origin_tech = "programming=3;engineering=3"
|
||||
/obj/item/weapon/circuitboard/computer/aiupload
|
||||
name = "AI Upload (Computer Board)"
|
||||
build_path = /obj/machinery/computer/upload/ai
|
||||
origin_tech = "programming=4;engineering=4"
|
||||
/obj/item/weapon/circuitboard/computer/borgupload
|
||||
name = "Cyborg Upload (Computer Board)"
|
||||
build_path = /obj/machinery/computer/upload/borg
|
||||
origin_tech = "programming=4;engineering=4"
|
||||
/obj/item/weapon/circuitboard/computer/med_data
|
||||
name = "Medical Records Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/med_data
|
||||
origin_tech = "programming=2;biotech=2"
|
||||
/obj/item/weapon/circuitboard/computer/pandemic
|
||||
name = "PanD.E.M.I.C. 2200 (Computer Board)"
|
||||
build_path = /obj/machinery/computer/pandemic
|
||||
origin_tech = "programming=2;biotech=2"
|
||||
/obj/item/weapon/circuitboard/computer/scan_consolenew
|
||||
name = "DNA Machine (Computer Board)"
|
||||
build_path = /obj/machinery/computer/scan_consolenew
|
||||
origin_tech = "programming=2;biotech=2"
|
||||
/obj/item/weapon/circuitboard/computer/communications
|
||||
name = "Communications (Computer Board)"
|
||||
build_path = /obj/machinery/computer/communications
|
||||
origin_tech = "programming=3;magnets=3"
|
||||
var/lastTimeUsed = 0
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/card
|
||||
name = "ID Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/card
|
||||
origin_tech = "programming=3"
|
||||
/obj/item/weapon/circuitboard/computer/card/centcom
|
||||
name = "CentCom ID Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/card/centcom
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/card/minor
|
||||
name = "Department Management Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/card/minor
|
||||
var/target_dept = 1
|
||||
var/list/dept_list = list("General","Security","Medical","Science","Engineering")
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/card/minor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
target_dept = (target_dept == dept_list.len) ? 1 : (target_dept + 1)
|
||||
to_chat(user, "<span class='notice'>You set the board to \"[dept_list[target_dept]]\".</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/card/minor/examine(user)
|
||||
..()
|
||||
to_chat(user, "Currently set to \"[dept_list[target_dept]]\".")
|
||||
|
||||
//obj/item/weapon/circuitboard/computer/shield
|
||||
// name = "Shield Control (Computer Board)"
|
||||
// build_path = /obj/machinery/computer/stationshield
|
||||
/obj/item/weapon/circuitboard/computer/teleporter
|
||||
name = "Teleporter (Computer Board)"
|
||||
build_path = /obj/machinery/computer/teleporter
|
||||
origin_tech = "programming=3;bluespace=3;plasmatech=3"
|
||||
/obj/item/weapon/circuitboard/computer/secure_data
|
||||
name = "Security Records Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/secure_data
|
||||
origin_tech = "programming=2;combat=2"
|
||||
/obj/item/weapon/circuitboard/computer/stationalert
|
||||
name = "Station Alerts (Computer Board)"
|
||||
build_path = /obj/machinery/computer/station_alert
|
||||
/*/obj/item/weapon/circuitboard/computer/atmospheresiphonswitch
|
||||
name = "Atmosphere siphon control (Computer Board)"
|
||||
build_path = /obj/machinery/computer/atmosphere/siphonswitch*/
|
||||
/obj/item/weapon/circuitboard/computer/atmos_control
|
||||
name = "Atmospheric Monitor (Computer Board)"
|
||||
build_path = /obj/machinery/computer/atmos_control
|
||||
/obj/item/weapon/circuitboard/computer/atmos_control/tank
|
||||
name = "Tank Control (Computer Board)"
|
||||
build_path = /obj/machinery/computer/atmos_control/tank
|
||||
origin_tech = "programming=2;engineering=3;materials=2"
|
||||
/obj/item/weapon/circuitboard/computer/atmos_alert
|
||||
name = "Atmospheric Alert (Computer Board)"
|
||||
build_path = /obj/machinery/computer/atmos_alert
|
||||
/obj/item/weapon/circuitboard/computer/pod
|
||||
name = "Massdriver control (Computer Board)"
|
||||
build_path = /obj/machinery/computer/pod
|
||||
/obj/item/weapon/circuitboard/computer/robotics
|
||||
name = "Robotics Control (Computer Board)"
|
||||
build_path = /obj/machinery/computer/robotics
|
||||
origin_tech = "programming=3"
|
||||
/obj/item/weapon/circuitboard/computer/cloning
|
||||
name = "Cloning (Computer Board)"
|
||||
build_path = /obj/machinery/computer/cloning
|
||||
origin_tech = "programming=2;biotech=2"
|
||||
/obj/item/weapon/circuitboard/computer/arcade/battle
|
||||
name = "Arcade Battle (Computer Board)"
|
||||
build_path = /obj/machinery/computer/arcade/battle
|
||||
origin_tech = "programming=1"
|
||||
/obj/item/weapon/circuitboard/computer/arcade/orion_trail
|
||||
name = "Orion Trail (Computer Board)"
|
||||
build_path = /obj/machinery/computer/arcade/orion_trail
|
||||
origin_tech = "programming=1"
|
||||
/obj/item/weapon/circuitboard/computer/turbine_control
|
||||
name = "Turbine control (Computer Board)"
|
||||
build_path = /obj/machinery/computer/turbine_computer
|
||||
/obj/item/weapon/circuitboard/computer/solar_control
|
||||
name = "Solar Control (Computer Board)" //name fixed 250810
|
||||
build_path = /obj/machinery/power/solar_control
|
||||
origin_tech = "programming=2;powerstorage=2"
|
||||
/obj/item/weapon/circuitboard/computer/powermonitor
|
||||
name = "Power Monitor (Computer Board)" //name fixed 250810
|
||||
build_path = /obj/machinery/computer/monitor
|
||||
origin_tech = "programming=2;powerstorage=2"
|
||||
/obj/item/weapon/circuitboard/computer/olddoor
|
||||
name = "DoorMex (Computer Board)"
|
||||
build_path = /obj/machinery/computer/pod/old
|
||||
/obj/item/weapon/circuitboard/computer/syndicatedoor
|
||||
name = "ProComp Executive (Computer Board)"
|
||||
build_path = /obj/machinery/computer/pod/old/syndicate
|
||||
/obj/item/weapon/circuitboard/computer/swfdoor
|
||||
name = "Magix (Computer Board)"
|
||||
build_path = /obj/machinery/computer/pod/old/swf
|
||||
/obj/item/weapon/circuitboard/computer/prisoner
|
||||
name = "Prisoner Management Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/prisoner
|
||||
/obj/item/weapon/circuitboard/computer/gulag_teleporter_console
|
||||
name = "Labor Camp teleporter console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/gulag_teleporter_computer
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/rdconsole
|
||||
name = "R&D Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/rdconsole/core
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/rdconsole/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(build_path == /obj/machinery/computer/rdconsole/core)
|
||||
name = "R&D Console - Robotics (Computer Board)"
|
||||
build_path = /obj/machinery/computer/rdconsole/robotics
|
||||
to_chat(user, "<span class='notice'>Access protocols successfully updated.</span>")
|
||||
else
|
||||
name = "R&D Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/rdconsole/core
|
||||
to_chat(user, "<span class='notice'>Defaulting access protocols.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/mecha_control
|
||||
name = "Exosuit Control Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/mecha
|
||||
/obj/item/weapon/circuitboard/computer/rdservercontrol
|
||||
name = "R&D Server Control (Computer Board)"
|
||||
build_path = /obj/machinery/computer/rdservercontrol
|
||||
/obj/item/weapon/circuitboard/computer/crew
|
||||
name = "Crew Monitoring Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/crew
|
||||
origin_tech = "programming=2;biotech=2"
|
||||
/obj/item/weapon/circuitboard/computer/mech_bay_power_console
|
||||
name = "Mech Bay Power Control Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/mech_bay_power_console
|
||||
origin_tech = "programming=3;powerstorage=3"
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/cargo
|
||||
name = "Supply Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/cargo
|
||||
origin_tech = "programming=3"
|
||||
var/contraband = FALSE
|
||||
var/emagged = FALSE
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/cargo/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
if(!emagged)
|
||||
contraband = !contraband
|
||||
to_chat(user, "<span class='notice'>Receiver spectrum set to [contraband ? "Broad" : "Standard"].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The spectrum chip is unresponsive.</span>")
|
||||
else if(istype(I, /obj/item/weapon/card/emag))
|
||||
if(!emagged)
|
||||
contraband = TRUE
|
||||
emagged = TRUE
|
||||
to_chat(user, "<span class='notice'>You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/cargo/request
|
||||
name = "Supply Request Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/cargo/request
|
||||
/obj/item/weapon/circuitboard/computer/stockexchange
|
||||
name = "circuit board (Stock Exchange Console)"
|
||||
build_path = /obj/machinery/computer/stockexchange
|
||||
origin_tech = "programming=3"
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/operating
|
||||
name = "Operating Computer (Computer Board)"
|
||||
build_path = /obj/machinery/computer/operating
|
||||
origin_tech = "programming=2;biotech=3"
|
||||
/obj/item/weapon/circuitboard/computer/mining
|
||||
name = "Outpost Status Display (Computer Board)"
|
||||
build_path = /obj/machinery/computer/security/mining
|
||||
/obj/item/weapon/circuitboard/computer/comm_monitor
|
||||
name = "Telecommunications Monitor (Computer Board)"
|
||||
build_path = /obj/machinery/computer/telecomms/monitor
|
||||
origin_tech = "programming=3;magnets=3;bluespace=2"
|
||||
/obj/item/weapon/circuitboard/computer/comm_server
|
||||
name = "Telecommunications Server Monitor (Computer Board)"
|
||||
build_path = /obj/machinery/computer/telecomms/server
|
||||
origin_tech = "programming=3;magnets=3;bluespace=2"
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/shuttle
|
||||
name = "Shuttle (Computer Board)"
|
||||
build_path = /obj/machinery/computer/shuttle
|
||||
var/shuttleId
|
||||
var/possible_destinations = ""
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/shuttle/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
var/chosen_id = round(input(usr, "Choose an ID number (-1 for reset):", "Input an Integer", null) as num|null)
|
||||
if(chosen_id >= 0)
|
||||
shuttleId = chosen_id
|
||||
else
|
||||
shuttleId = initial(shuttleId)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/labor_shuttle
|
||||
name = "Labor Shuttle (Computer Board)"
|
||||
build_path = /obj/machinery/computer/shuttle/labor
|
||||
/obj/item/weapon/circuitboard/computer/labor_shuttle/one_way
|
||||
name = "Prisoner Shuttle Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/shuttle/labor/one_way
|
||||
/obj/item/weapon/circuitboard/computer/ferry
|
||||
name = "Transport Ferry (Computer Board)"
|
||||
build_path = /obj/machinery/computer/shuttle/ferry
|
||||
/obj/item/weapon/circuitboard/computer/ferry/request
|
||||
name = "Transport Ferry Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/shuttle/ferry/request
|
||||
/obj/item/weapon/circuitboard/computer/mining_shuttle
|
||||
name = "Mining Shuttle (Computer Board)"
|
||||
build_path = /obj/machinery/computer/shuttle/mining
|
||||
/obj/item/weapon/circuitboard/computer/white_ship
|
||||
name = "White Ship (Computer Board)"
|
||||
build_path = /obj/machinery/computer/shuttle/white_ship
|
||||
/obj/item/weapon/circuitboard/computer/auxillary_base
|
||||
name = "Auxillary Base Management Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/auxillary_base
|
||||
/obj/item/weapon/circuitboard/computer/holodeck// Not going to let people get this, but it's just here for future
|
||||
name = "Holodeck Control (Computer Board)"
|
||||
build_path = /obj/machinery/computer/holodeck
|
||||
origin_tech = "programming=4"
|
||||
/obj/item/weapon/circuitboard/computer/aifixer
|
||||
name = "AI Integrity Restorer (Computer Board)"
|
||||
build_path = /obj/machinery/computer/aifixer
|
||||
origin_tech = "programming=2;biotech=2"
|
||||
/*/obj/item/weapon/circuitboard/computer/prison_shuttle
|
||||
name = "Prison Shuttle (Computer Board)"
|
||||
build_path = /obj/machinery/computer/prison_shuttle*/
|
||||
/obj/item/weapon/circuitboard/computer/slot_machine
|
||||
name = "Slot Machine (Computer Board)"
|
||||
build_path = /obj/machinery/computer/slot_machine
|
||||
origin_tech = "programming=1"
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/libraryconsole
|
||||
name = "Library Visitor Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/libraryconsole
|
||||
origin_tech = "programming=1"
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/libraryconsole/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(build_path == /obj/machinery/computer/libraryconsole/bookmanagement)
|
||||
name = "Library Visitor Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/libraryconsole
|
||||
to_chat(user, "<span class='notice'>Defaulting access protocols.</span>")
|
||||
else
|
||||
name = "Book Inventory Management Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/libraryconsole/bookmanagement
|
||||
to_chat(user, "<span class='notice'>Access protocols successfully updated.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/apc_control
|
||||
name = "\improper Power Flow Control Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/apc_control
|
||||
origin_tech = "programming=3;engineering=3;powerstorage=2"
|
||||
..()
|
||||
@@ -571,8 +571,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
icon_screen = "idminor"
|
||||
circuit = /obj/item/weapon/circuitboard/computer/card/minor
|
||||
|
||||
/obj/machinery/computer/card/minor/New()
|
||||
..()
|
||||
/obj/machinery/computer/card/minor/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/weapon/circuitboard/computer/card/minor/typed_circuit = circuit
|
||||
if(target_dept)
|
||||
typed_circuit.target_dept = target_dept
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/machinery/computer/cloning/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
updatemodules(TRUE)
|
||||
|
||||
/obj/machinery/computer/cloning/Destroy()
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/communications/New()
|
||||
/obj/machinery/computer/communications/Initialize()
|
||||
. = ..()
|
||||
GLOB.shuttle_caller_list += src
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/communications/process()
|
||||
if(..())
|
||||
|
||||
@@ -53,17 +53,13 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/New()
|
||||
..()
|
||||
|
||||
spawn(5)
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
connected = locate(/obj/machinery/dna_scannernew, get_step(src, dir))
|
||||
if(!isnull(connected))
|
||||
break
|
||||
injectorready = world.time + INJECTOR_TIMEOUT
|
||||
return
|
||||
return
|
||||
/obj/machinery/computer/scan_consolenew/Initialize()
|
||||
. = ..()
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
connected = locate(/obj/machinery/dna_scannernew, get_step(src, dir))
|
||||
if(!isnull(connected))
|
||||
break
|
||||
injectorready = world.time + INJECTOR_TIMEOUT
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/attack_hand(mob/user)
|
||||
if(..())
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/New()
|
||||
..()
|
||||
addtimer(CALLBACK(src, .proc/scan_machinery), 5)
|
||||
/obj/machinery/computer/gulag_teleporter_computer/Initialize()
|
||||
. = ..()
|
||||
scan_machinery()
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/Destroy()
|
||||
if(id)
|
||||
|
||||
@@ -5,7 +5,3 @@
|
||||
shuttleId = "pod1"
|
||||
possible_destinations = "monastery_shuttle_asteroid;monastery_shuttle_station"
|
||||
no_destination_swap = TRUE
|
||||
|
||||
/obj/item/weapon/circuitboard/computer/shuttle/monastery_shuttle
|
||||
name = "Monastery Shuttle (Computer Board)"
|
||||
build_path = /obj/machinery/computer/shuttle/monastery_shuttle
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
/obj/machinery/computer/teleporter
|
||||
name = "teleporter control console"
|
||||
desc = "Used to control a linked teleportation Hub and Station."
|
||||
icon_screen = "teleport"
|
||||
icon_keyboard = "teleport_key"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
circuit = /obj/item/weapon/circuitboard/computer/teleporter
|
||||
var/obj/item/device/gps/locked
|
||||
var/regime_set = "Teleporter"
|
||||
var/id
|
||||
var/obj/machinery/teleport/station/power_station
|
||||
var/calibrating
|
||||
var/turf/target //Used for one-time-use teleport cards (such as clown planet coordinates.)
|
||||
//Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
|
||||
|
||||
/obj/machinery/computer/teleporter/Initialize()
|
||||
. = ..()
|
||||
id = "[rand(1000, 9999)]"
|
||||
link_power_station()
|
||||
|
||||
/obj/machinery/computer/teleporter/Destroy()
|
||||
if (power_station)
|
||||
power_station.teleporter_console = null
|
||||
power_station = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/link_power_station()
|
||||
if(power_station)
|
||||
return
|
||||
for(dir in GLOB.cardinals)
|
||||
power_station = locate(/obj/machinery/teleport/station, get_step(src, dir))
|
||||
if(power_station)
|
||||
break
|
||||
return power_station
|
||||
|
||||
/obj/machinery/computer/teleporter/attackby(obj/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/device/gps))
|
||||
var/obj/item/device/gps/L = I
|
||||
if(L.locked_location && !(stat & (NOPOWER|BROKEN)))
|
||||
if(!user.transferItemToLoc(L, src))
|
||||
to_chat(user, "<span class='warning'>\the [I] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return
|
||||
locked = L
|
||||
to_chat(user, "<span class='caution'>You insert the GPS device into the [name]'s slot.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/teleporter/attack_ai(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/teleporter/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/computer/teleporter/interact(mob/user)
|
||||
var/data = "<h3>Teleporter Status</h3>"
|
||||
if(!power_station)
|
||||
data += "<div class='statusDisplay'>No power station linked.</div>"
|
||||
else if(!power_station.teleporter_hub)
|
||||
data += "<div class='statusDisplay'>No hub linked.</div>"
|
||||
else
|
||||
data += "<div class='statusDisplay'>Current regime: [regime_set]<BR>"
|
||||
data += "Current target: [(!target) ? "None" : "[get_area(target)] [(regime_set != "Gate") ? "" : "Teleporter"]"]<BR>"
|
||||
if(calibrating)
|
||||
data += "Calibration: <font color='yellow'>In Progress</font>"
|
||||
else if(power_station.teleporter_hub.calibrated || power_station.teleporter_hub.accurate >= 3)
|
||||
data += "Calibration: <font color='green'>Optimal</font>"
|
||||
else
|
||||
data += "Calibration: <font color='red'>Sub-Optimal</font>"
|
||||
data += "</div><BR>"
|
||||
|
||||
data += "<A href='?src=\ref[src];regimeset=1'>Change regime</A><BR>"
|
||||
data += "<A href='?src=\ref[src];settarget=1'>Set target</A><BR>"
|
||||
if(locked)
|
||||
data += "<BR><A href='?src=\ref[src];locked=1'>Get target from memory</A><BR>"
|
||||
data += "<A href='?src=\ref[src];eject=1'>Eject GPS device</A><BR>"
|
||||
else
|
||||
data += "<BR><span class='linkOff'>Get target from memory</span><BR>"
|
||||
data += "<span class='linkOff'>Eject GPS device</span><BR>"
|
||||
|
||||
data += "<BR><A href='?src=\ref[src];calibrate=1'>Calibrate Hub</A>"
|
||||
|
||||
var/datum/browser/popup = new(user, "teleporter", name, 400, 400)
|
||||
popup.set_content(data)
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/computer/teleporter/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(href_list["eject"])
|
||||
eject()
|
||||
updateDialog()
|
||||
return
|
||||
|
||||
if(!check_hub_connection())
|
||||
say("Error: Unable to detect hub.")
|
||||
return
|
||||
if(calibrating)
|
||||
say("Error: Calibration in progress. Stand by.")
|
||||
return
|
||||
|
||||
if(href_list["regimeset"])
|
||||
power_station.engaged = 0
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = 0
|
||||
reset_regime()
|
||||
if(href_list["settarget"])
|
||||
power_station.engaged = 0
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = 0
|
||||
set_target(usr)
|
||||
if(href_list["locked"])
|
||||
power_station.engaged = 0
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = 0
|
||||
target = get_turf(locked.locked_location)
|
||||
if(href_list["calibrate"])
|
||||
if(!target)
|
||||
say("Error: No target set to calibrate to.")
|
||||
return
|
||||
if(power_station.teleporter_hub.calibrated || power_station.teleporter_hub.accurate >= 3)
|
||||
say("Hub is already calibrated!")
|
||||
return
|
||||
say("Processing hub calibration to target...")
|
||||
|
||||
calibrating = 1
|
||||
spawn(50 * (3 - power_station.teleporter_hub.accurate)) //Better parts mean faster calibration
|
||||
calibrating = 0
|
||||
if(check_hub_connection())
|
||||
power_station.teleporter_hub.calibrated = 1
|
||||
say("Calibration complete.")
|
||||
else
|
||||
say("Error: Unable to detect hub.")
|
||||
updateDialog()
|
||||
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/check_hub_connection()
|
||||
if(!power_station)
|
||||
return FALSE
|
||||
if(!power_station.teleporter_hub)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/reset_regime()
|
||||
target = null
|
||||
if(regime_set == "Teleporter")
|
||||
regime_set = "Gate"
|
||||
else
|
||||
regime_set = "Teleporter"
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/eject()
|
||||
if(locked)
|
||||
locked.forceMove(get_turf(src))
|
||||
locked = null
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/set_target(mob/user)
|
||||
var/list/L = list()
|
||||
var/list/areaindex = list()
|
||||
if(regime_set == "Teleporter")
|
||||
for(var/obj/item/device/radio/beacon/R in GLOB.teleportbeacons)
|
||||
var/turf/T = get_turf(R)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z == ZLEVEL_CENTCOM || T.z > ZLEVEL_SPACEMAX)
|
||||
continue
|
||||
L[avoid_assoc_duplicate_keys(T.loc.name, areaindex)] = R
|
||||
|
||||
for(var/obj/item/weapon/implant/tracking/I in GLOB.tracked_implants)
|
||||
if(!I.imp_in || !ismob(I.loc))
|
||||
continue
|
||||
else
|
||||
var/mob/M = I.loc
|
||||
if(M.stat == DEAD)
|
||||
if(M.timeofdeath + 6000 < world.time)
|
||||
continue
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z == ZLEVEL_CENTCOM)
|
||||
continue
|
||||
L[avoid_assoc_duplicate_keys(M.real_name, areaindex)] = I
|
||||
|
||||
var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in L
|
||||
target = L[desc]
|
||||
|
||||
else
|
||||
var/list/S = power_station.linked_stations
|
||||
if(!S.len)
|
||||
to_chat(user, "<span class='alert'>No connected stations located.</span>")
|
||||
return
|
||||
for(var/obj/machinery/teleport/station/R in S)
|
||||
var/turf/T = get_turf(R)
|
||||
if(!T || !R.teleporter_hub || !R.teleporter_console)
|
||||
continue
|
||||
if(T.z == ZLEVEL_CENTCOM || T.z > ZLEVEL_SPACEMAX)
|
||||
continue
|
||||
L[avoid_assoc_duplicate_keys(T.loc.name, areaindex)] = R
|
||||
var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in L
|
||||
target = L[desc]
|
||||
if(target)
|
||||
var/obj/machinery/teleport/station/trg = target
|
||||
trg.linked_stations |= power_station
|
||||
trg.stat &= ~NOPOWER
|
||||
if(trg.teleporter_hub)
|
||||
trg.teleporter_hub.stat &= ~NOPOWER
|
||||
trg.teleporter_hub.update_icon()
|
||||
if(trg.teleporter_console)
|
||||
trg.teleporter_console.stat &= ~NOPOWER
|
||||
trg.teleporter_console.update_icon()
|
||||
Reference in New Issue
Block a user