Docking Ports Management Program (#16802)

* stuff copied from the other branch

* aurorastation.dme reorder

* lint fixes

* docks gui prettier

---------

Co-authored-by: DreamySkrell <>
This commit is contained in:
DreamySkrell
2023-07-23 20:27:43 +02:00
committed by GitHub
parent 1820893638
commit db030df4d5
22 changed files with 254 additions and 61 deletions
@@ -94,6 +94,7 @@
soundloop = new(src, enabled)
initial_name = name
listener = new("modular_computers", src)
sync_linked()
/obj/item/modular_computer/Destroy()
kill_program(TRUE)
@@ -495,3 +496,26 @@
/obj/item/modular_computer/on_slotmove(var/mob/living/user, slot)
. = ..(user, slot)
BITSET(user.hud_updateflag, ID_HUD) //Same reasoning as for IDs
// A late init operation called in SSshuttle for ship computers and holopads, used to attach the thing to the right ship.
/obj/item/modular_computer/proc/attempt_hook_up(var/obj/effect/overmap/visitable/sector)
SHOULD_CALL_PARENT(TRUE)
if(!istype(sector))
return FALSE
if(sector.check_ownership(src))
linked = sector
return TRUE
return FALSE
/obj/item/modular_computer/proc/sync_linked()
var/obj/effect/overmap/visitable/sector = map_sectors["[z]"]
if(!sector)
return
return attempt_hook_up_recursive(sector)
/obj/item/modular_computer/proc/attempt_hook_up_recursive(var/obj/effect/overmap/visitable/sector)
if(attempt_hook_up(sector))
return sector
for(var/obj/effect/overmap/visitable/candidate in sector)
if((. = .(candidate)))
return
@@ -32,6 +32,7 @@
var/doorcode = "smindicate"
var/hidden = FALSE
var/initial_name
var/obj/effect/overmap/visitable/linked // overmap sector the computer is linked to
// Modular computers can run on various devices. Each DEVICE (Laptop, Console, Tablet,..)
// must have it's own DMI file. Icon states must be called exactly the same in all files, but may look differently