mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[modular] connecting computers (#6516)
* [modular] connecting computers * computers that dont fit * cobalt request * Update modular_skyrat/modules/connecting_computer/code/game/machinery/cryopod.dm * Update modular_skyrat/modules/connecting_computer/code/game/machinery/slotmachine.dm * Update modular_skyrat/modules/connecting_computer/code/modules/antagonists/abductor/machinery/camera.dm * Update modular_skyrat/modules/connecting_computer/code/modules/library/lib_machines.dm * Update modular_skyrat/modules/connecting_computer/code/modules/mining/aux_base.dm * Update modular_skyrat/modules/connecting_computer/code/modules/reagents/chemistry/machinery/pandemic.dm * Update modular_skyrat/modules/connecting_computer/code/modules/research/nanites/nanite_cloud_controller.dm * Update modular_skyrat/modules/connecting_computer/code/modules/shuttle/emergency.dm * Update modular_skyrat/modules/connecting_computer/code/modules/shuttle/syndicate.dm Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
@@ -117,7 +117,10 @@
|
||||
var/obj/machinery/new_machine = new circuit.build_path(loc)
|
||||
new_machine.setDir(dir)
|
||||
transfer_fingerprints_to(new_machine)
|
||||
|
||||
// SKYRAT EDIT ADDITION BEGIN - Connecting Computers
|
||||
for(var/obj/machinery/computer/selected in range(1,src))
|
||||
selected.update_overlays()
|
||||
// SKYRAT EDIT ADDITION END - Connecting Computers
|
||||
if(istype(new_machine, /obj/machinery/computer))
|
||||
var/obj/machinery/computer/new_computer = new_machine
|
||||
|
||||
|
||||
@@ -3,27 +3,36 @@
|
||||
icon_state = "intercom"
|
||||
layer = ABOVE_OBJ_LAYER
|
||||
|
||||
connectable = FALSE //connecting_computer change: since icon_state is not a typical console, it cannot be connectable.
|
||||
|
||||
/obj/machinery/computer/emergency_shuttle/advanced
|
||||
icon = 'modular_skyrat/modules/advanced_shuttles/icons/computer.dmi'
|
||||
icon_state = "computer"
|
||||
icon_keyboard = ""
|
||||
icon_screen = ""
|
||||
|
||||
connectable = FALSE //connecting_computer change: since icon_state is not a typical console, it cannot be connectable.
|
||||
|
||||
/obj/machinery/computer/crew/shuttle
|
||||
icon = 'modular_skyrat/modules/advanced_shuttles/icons/computer.dmi'
|
||||
icon_state = "computer_left"
|
||||
icon_keyboard = ""
|
||||
icon_screen = ""
|
||||
|
||||
connectable = FALSE //connecting_computer change: since icon_state is not a typical console, it cannot be connectable.
|
||||
|
||||
/obj/machinery/computer/security/shuttle
|
||||
icon = 'modular_skyrat/modules/advanced_shuttles/icons/computer.dmi'
|
||||
icon_state = "computer_right"
|
||||
icon_keyboard = ""
|
||||
icon_screen = ""
|
||||
|
||||
connectable = FALSE //connecting_computer change: since icon_state is not a typical console, it cannot be connectable.
|
||||
|
||||
/obj/machinery/computer/shuttle/ferry/shuttle
|
||||
icon = 'modular_skyrat/modules/advanced_shuttles/icons/computer.dmi'
|
||||
icon_state = "computer"
|
||||
icon_keyboard = ""
|
||||
icon_screen = ""
|
||||
|
||||
connectable = FALSE //connecting_computer change: since icon_state is not a typical console, it cannot be connectable.
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
light_color = COLOR_ORANGE_BROWN
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
connectable = FALSE //connecting_computer change: since icon_state is not a typical console, it cannot be connectable.
|
||||
|
||||
/obj/machinery/computer/shuttle/arrivals/recall
|
||||
name = "arrivals shuttle recall terminal"
|
||||
desc = "Use this if your friends left you behind."
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
var/target
|
||||
var/area_aim = FALSE //should also show areas for targeting
|
||||
|
||||
connectable = FALSE //connecting_computer change: since icon_state is not a typical console, it cannot be connectable.
|
||||
|
||||
/obj/machinery/computer/bsa_control/multitool_act(mob/living/user, obj/item/I)
|
||||
if(!multitool_check_buffer(user, I))
|
||||
return
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/obj/machinery/computer
|
||||
icon = 'modular_skyrat/modules/connecting_computer/icons/obj/computer.dmi'
|
||||
///Determines if the computer can connect to other computers (no arcades, etc.)
|
||||
var/connectable = TRUE
|
||||
|
||||
/obj/machinery/computer/Destroy()
|
||||
for(var/obj/machinery/computer/selected in range(1, src))
|
||||
addtimer(CALLBACK(selected, .proc/callback_proc_issue), 2)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/computer/proc/callback_proc_issue()
|
||||
update_overlays()
|
||||
|
||||
/obj/machinery/computer/update_overlays()
|
||||
. = ..()
|
||||
if(icon_keyboard)
|
||||
if(machine_stat & NOPOWER)
|
||||
return . + "[icon_keyboard]_off"
|
||||
. += icon_keyboard
|
||||
|
||||
// This whole block lets screens ignore lighting and be visible even in the darkest room
|
||||
var/overlay_state = icon_screen
|
||||
if(connectable)
|
||||
icon_state = initial(icon_state)
|
||||
var/obj/machinery/computer/left_turf = null
|
||||
var/obj/machinery/computer/right_turf = null
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
left_turf = locate(/obj/machinery/computer) in get_step(src, WEST)
|
||||
right_turf = locate(/obj/machinery/computer) in get_step(src, EAST)
|
||||
if(EAST)
|
||||
left_turf = locate(/obj/machinery/computer) in get_step(src, NORTH)
|
||||
right_turf = locate(/obj/machinery/computer) in get_step(src, SOUTH)
|
||||
if(SOUTH)
|
||||
left_turf = locate(/obj/machinery/computer) in get_step(src, EAST)
|
||||
right_turf = locate(/obj/machinery/computer) in get_step(src, WEST)
|
||||
if(WEST)
|
||||
left_turf = locate(/obj/machinery/computer) in get_step(src, SOUTH)
|
||||
right_turf = locate(/obj/machinery/computer) in get_step(src, NORTH)
|
||||
if(left_turf?.dir == dir && left_turf.connectable)
|
||||
icon_state = "[icon_state]_L"
|
||||
if(right_turf?.dir == dir && right_turf.connectable)
|
||||
icon_state = "[icon_state]_R"
|
||||
if(machine_stat & BROKEN)
|
||||
overlay_state = "[icon_state]_broken"
|
||||
. += mutable_appearance(icon, overlay_state)
|
||||
. += emissive_appearance(icon, overlay_state)
|
||||
|
||||
/obj/machinery/computer/deconstruct(disassembled = TRUE, mob/user)
|
||||
on_deconstruction()
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(circuit) //no circuit, no computer frame
|
||||
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer(src.loc)
|
||||
A.setDir(dir)
|
||||
A.circuit = circuit
|
||||
// Circuit removal code is handled in /obj/machinery/Exited()
|
||||
circuit.forceMove(A)
|
||||
A.set_anchored(TRUE)
|
||||
if(machine_stat & BROKEN)
|
||||
if(user)
|
||||
to_chat(user, span_notice("The broken glass falls out."))
|
||||
else
|
||||
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE)
|
||||
new /obj/item/shard(drop_location())
|
||||
new /obj/item/shard(drop_location())
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
else
|
||||
if(user)
|
||||
to_chat(user, span_notice("You disconnect the monitor."))
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
for(var/obj/C in src)
|
||||
C.forceMove(loc)
|
||||
for(var/obj/machinery/computer/selected in range(1,src))
|
||||
addtimer(CALLBACK(selected, .proc/callback_proc_issue), 2)
|
||||
qdel(src)
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/computer/arcade
|
||||
connectable = FALSE
|
||||
@@ -0,0 +1,5 @@
|
||||
/obj/machinery/computer/security/wooden_tv
|
||||
connectable = FALSE
|
||||
|
||||
/obj/machinery/computer/security/telescreen
|
||||
connectable = FALSE
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/computer/med_data/laptop
|
||||
connectable = FALSE
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/computer/pod/old
|
||||
connectable = FALSE
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/computer/secure_data/laptop
|
||||
connectable = FALSE
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/computer/cryopod
|
||||
connectable = FALSE
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/computer/slot_machine
|
||||
connectable = FALSE
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/computer/camera_advanced/abductor
|
||||
connectable = FALSE
|
||||
@@ -0,0 +1,5 @@
|
||||
/obj/machinery/computer/libraryconsole
|
||||
connectable = FALSE
|
||||
|
||||
/obj/machinery/computer/bookmanagement
|
||||
connectable = FALSE
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/computer/auxiliary_base
|
||||
connectable = FALSE
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/computer/pandemic
|
||||
connectable = FALSE
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/computer/nanite_cloud_controller
|
||||
connectable = FALSE
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/computer/shuttle/pod
|
||||
connectable = FALSE
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod
|
||||
connectable = FALSE
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 129 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
@@ -0,0 +1,23 @@
|
||||
## Title: Connecting Computer
|
||||
|
||||
MODULE ID: CONNECTING_COMPUTER
|
||||
|
||||
### Description:
|
||||
|
||||
Changing icons and some small procs to allow computers to connect with one another.
|
||||
|
||||
### TG Proc Changes:
|
||||
|
||||
N/A
|
||||
|
||||
### Defines:
|
||||
|
||||
N/A
|
||||
|
||||
### Included files:
|
||||
|
||||
N/A
|
||||
|
||||
### Credits:
|
||||
|
||||
Jake Park
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
connectable = FALSE //connecting_computer change: since icon_state is not a typical console, it cannot be connectable.
|
||||
|
||||
/obj/machinery/computer/stockexchange/Initialize()
|
||||
. = ..()
|
||||
logged_in = "SS13 Cargo Department"
|
||||
|
||||
@@ -3908,6 +3908,21 @@
|
||||
#include "modular_skyrat\modules\cme\code\_cme_defines.dm"
|
||||
#include "modular_skyrat\modules\cme\code\cme.dm"
|
||||
#include "modular_skyrat\modules\combat_indicator\code\combat_indicator.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\game\machinery\cryopod.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\game\machinery\slotmachine.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\game\machinery\computer\_computer.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\game\machinery\computer\arcade.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\game\machinery\computer\camera.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\game\machinery\computer\medical.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\game\machinery\computer\pod.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\game\machinery\computer\security.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\modules\antagonists\abductor\machinery\camera.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\modules\library\lib_machines.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\modules\mining\aux_base.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\modules\reagents\chemistry\machinery\pandemic.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\modules\research\nanites\nanite_cloud_controller.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\modules\shuttle\emergency.dm"
|
||||
#include "modular_skyrat\modules\connecting_computer\code\modules\shuttle\syndicate.dm"
|
||||
#include "modular_skyrat\modules\cryosleep\code\ai.dm"
|
||||
#include "modular_skyrat\modules\cryosleep\code\area.dm"
|
||||
#include "modular_skyrat\modules\cryosleep\code\config.dm"
|
||||
|
||||
Reference in New Issue
Block a user