[MDB IGNORE] Shuttle engine code improvement and fixes (#69516)

* A lot of shuttle code improvements

* Makes use of ``as anything`` in many places
* Adds mapload to connect_to_shuttle()
* Renames many vars, including shuttle 'id' var to 'shuttle_id' and engine 'state' to 'engine_state'.
* Engines now weakref their attached ship, and disconnect when unwrenched from it.
* Removes check for force when deleting a mobile docking port, being deleted should still clear your stuff, regardless of being forced.

Because of all the above, I was able to remove a few pointless checks scattered around, like engine's alter_engine_power()

* better comment for port_id

* Fixes Cargo, Arrivals, and Pirate ships.

* Merge branch 'master' into shuttlecode-oh-no

* last few

* fixes the CI

* fixes

* Fixes infinite engines

* Revert "Merge branch 'master' into shuttlecode-oh-no"

This reverts commit 94eba37de9fe3f4a01dc40bb064771b764f379e3.

* trammies

* whiteship tram

* Makes use of ?. instead

apparently this is what weakrefs use, so 🤷

* i hate supernovaa41

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>

* removes lateinit that I never implemented

* adds _ref to weakref var name

* small change to weld time define

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
This commit is contained in:
John Willard
2022-09-07 11:43:54 -04:00
committed by GitHub
co-authored by Seth Scherer
parent 71ee13d168
commit 253613c1c3
84 changed files with 4332 additions and 4310 deletions
+2 -2
View File
@@ -240,8 +240,8 @@ GLOBAL_LIST_EMPTY(crematoriums)
GLOB.crematoriums -= src
return ..()
/obj/structure/bodycontainer/crematorium/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
id = "[port.id]_[id]"
/obj/structure/bodycontainer/crematorium/connect_to_shuttle(mapload, obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
id = "[port.shuttle_id]_[id]"
/obj/structure/bodycontainer/crematorium/update_icon_state()
if(!connected || connected.loc != src)
+2 -2
View File
@@ -822,8 +822,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sink/kitchen, (-16))
. = ..()
GLOB.curtains += src
/obj/structure/curtain/cloth/fancy/mechanical/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
id = "[port.id]_[id]"
/obj/structure/curtain/cloth/fancy/mechanical/connect_to_shuttle(mapload, obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
id = "[port.shuttle_id]_[id]"
/obj/structure/curtain/cloth/fancy/mechanical/proc/open()
icon_state = "[icon_type]-open"