mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
[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:
co-authored by
Seth Scherer
parent
71ee13d168
commit
253613c1c3
@@ -141,7 +141,7 @@
|
||||
var/crash_strength = rand(min_crash_strength,max_crash_strength)
|
||||
for (var/S in SSshuttle.stationary_docking_ports)
|
||||
var/obj/docking_port/stationary/SM = S
|
||||
if (SM.id == "emergency_home")
|
||||
if (SM.shuttle_id == "emergency_home")
|
||||
var/new_dir = turn(SM.dir, 180)
|
||||
SM.forceMove(get_ranged_target_turf(SM, new_dir, crash_strength))
|
||||
break
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
continue // please don't do this
|
||||
var/obj/docking_port/stationary/S = port
|
||||
if (canDock(S) == SHUTTLE_CAN_DOCK)
|
||||
options[S.name || S.id] = S
|
||||
options[S.name || S.shuttle_id] = S
|
||||
|
||||
options += "--------"
|
||||
options += "Infinite Transit"
|
||||
options += "Delete Shuttle"
|
||||
options += "Into The Sunset (delete & greentext 'escape')"
|
||||
|
||||
var/selection = tgui_input_list(user, "Select where to fly [name || id]:", "Fly Shuttle", options)
|
||||
var/selection = tgui_input_list(user, "Select where to fly [name || shuttle_id]:", "Fly Shuttle", options)
|
||||
if(isnull(selection))
|
||||
return
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
setTimer(ignitionTime)
|
||||
|
||||
if("Delete Shuttle")
|
||||
if(tgui_alert(user, "Really delete [name || id]?", "Delete Shuttle", list("Cancel", "Really!")) != "Really!")
|
||||
if(tgui_alert(user, "Really delete [name || shuttle_id]?", "Delete Shuttle", list("Cancel", "Really!")) != "Really!")
|
||||
return
|
||||
jumpToNullSpace()
|
||||
|
||||
if("Into The Sunset (delete & greentext 'escape')")
|
||||
if(tgui_alert(user, "Really delete [name || id] and greentext escape objectives?", "Delete Shuttle", list("Cancel", "Really!")) != "Really!")
|
||||
if(tgui_alert(user, "Really delete [name || shuttle_id] and greentext escape objectives?", "Delete Shuttle", list("Cancel", "Really!")) != "Really!")
|
||||
return
|
||||
intoTheSunset()
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
continue // please don't do this
|
||||
var/obj/docking_port/stationary/S = port
|
||||
if (canDock(S) == SHUTTLE_CAN_DOCK)
|
||||
options[S.name || S.id] = S
|
||||
options[S.name || S.shuttle_id] = S
|
||||
|
||||
var/selection = tgui_input_list(user, "New arrivals destination", "Fly Shuttle", options)
|
||||
if(isnull(selection))
|
||||
|
||||
Reference in New Issue
Block a user