mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
[MIRROR] Tram v6/Transport Subsystem [MDB IGNORE] (#24399)
* Tram v6/Transport Subsystem * Update icon_smoothing.dm * Update utility.dm * defines/icon * Update airlock.dm * Update door.dm * Update airlock.dm * Update airlock.dm --------- Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
This commit is contained in:
co-authored by
lessthanthree
parent
79fbc17625
commit
7cf7be4b7b
@@ -19,6 +19,84 @@
|
||||
/obj/structure/plaque/static_plaque/golden/captain
|
||||
name = "The Most Robust Captain Award for Robustness"
|
||||
|
||||
/obj/structure/plaque/static_plaque/tram
|
||||
/// The tram we have info about
|
||||
var/specific_transport_id = TRAMSTATION_LINE_1
|
||||
/// Weakref to the tram we have info about
|
||||
var/datum/weakref/transport_ref
|
||||
/// Serial number of the tram
|
||||
var/tram_serial
|
||||
name = "\improper tram information plate"
|
||||
icon_state = "commission_tram"
|
||||
custom_materials = list(/datum/material/titanium = SHEET_MATERIAL_AMOUNT)
|
||||
layer = SIGN_LAYER
|
||||
|
||||
/obj/structure/plaque/static_plaque/tram/Initialize(mapload)
|
||||
. = ..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/structure/plaque/static_plaque/tram/LateInitialize(mapload)
|
||||
. = ..()
|
||||
link_tram()
|
||||
set_tram_serial()
|
||||
|
||||
/obj/structure/plaque/static_plaque/tram/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
. = ..()
|
||||
if(isnull(held_item))
|
||||
context[SCREENTIP_CONTEXT_LMB] = "View details"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/structure/plaque/static_plaque/tram/proc/link_tram()
|
||||
for(var/datum/transport_controller/linear/tram/tram as anything in SStransport.transports_by_type[TRANSPORT_TYPE_TRAM])
|
||||
if(tram.specific_transport_id == specific_transport_id)
|
||||
transport_ref = WEAKREF(tram)
|
||||
break
|
||||
|
||||
/obj/structure/plaque/static_plaque/tram/proc/set_tram_serial()
|
||||
var/datum/transport_controller/linear/tram/tram = transport_ref?.resolve()
|
||||
if(isnull(tram) || isnull(tram.tram_registration))
|
||||
return
|
||||
|
||||
tram_serial = tram.tram_registration.serial_number
|
||||
desc = "A plate showing details from the manufacturer about this Nakamura Engineering SkyyTram Mk VI, serial number [tram_serial].<br><br>We are not responsible for any injuries or fatalities caused by usage of the tram. \
|
||||
Using the tram carries inherent risks, and we cannot guarantee the safety of all passengers. By using the tram, you assume, acknowledge, and accept all the risks and responsibilities. <br><br>\
|
||||
Please be aware that riding the tram can cause a variety of injuries, including but not limited to: slips, trips, and falls; collisions with other passengers or objects; strains, sprains, and other musculoskeletal injuries; \
|
||||
cuts, bruises, and lacerations; and more severe injuries such as head trauma, spinal cord injuries, and even death. These injuries can be caused by a variety of factors, including the movements of the tram, the behaviour \
|
||||
of other passengers, and unforeseen circumstances such as foul play or mechanical issues.<br><br>\
|
||||
By entering the tram, guideway, or crossings you agree Nanotrasen is not liable for any injuries, damages, or losses that may occur. If you do not agree to these terms, please do not use the tram.<br>"
|
||||
|
||||
/obj/structure/plaque/static_plaque/tram/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "TramPlaque")
|
||||
ui.autoupdate = FALSE
|
||||
ui.open()
|
||||
|
||||
/obj/structure/plaque/static_plaque/tram/ui_static_data(mob/user)
|
||||
var/datum/transport_controller/linear/tram/tram = transport_ref?.resolve()
|
||||
var/list/data = list()
|
||||
var/list/current_tram = list()
|
||||
var/list/previous_trams = list()
|
||||
|
||||
current_tram += list(list(
|
||||
"serialNumber" = tram.tram_registration.serial_number,
|
||||
"mfgDate" = tram.tram_registration.mfg_date,
|
||||
"distanceTravelled" = tram.tram_registration.distance_travelled,
|
||||
"tramCollisions" = tram.tram_registration.collisions,
|
||||
))
|
||||
|
||||
for(var/datum/tram_mfg_info/previous_tram as anything in tram.tram_history)
|
||||
previous_trams += list(list(
|
||||
"serialNumber" = previous_tram.serial_number,
|
||||
"mfgDate" = previous_tram.mfg_date,
|
||||
"distanceTravelled" = previous_tram.distance_travelled,
|
||||
"tramCollisions" = previous_tram.collisions,
|
||||
))
|
||||
|
||||
data["currentTram"] = current_tram
|
||||
data["previousTrams"] = previous_trams
|
||||
return data
|
||||
|
||||
// Commission plaques, to give a little backstory to the stations. Commission dates are date of merge (or best approximation, in the case of Meta) + 540 years to convert to SS13 dates.
|
||||
// Where PRs are available, I've linked them. Where they are unavailable, a git hash is provided instead for the direct commit that added/removed the map.
|
||||
// Please enjoy this trip through SS13's history.
|
||||
@@ -149,15 +227,3 @@
|
||||
/obj/structure/sign/plaques/kiddie/gameoflife
|
||||
name = "\improper Conway's The Game Of Life plaque"
|
||||
desc = "A plaque detailing the historical significance of The Game Of Life in the field of computer science, and that the mural underfoot is a representation of the game in action."
|
||||
|
||||
/obj/structure/sign/plaques/tram
|
||||
name = "\improper tram information plate"
|
||||
desc = "A plate showing details from the manufacturer about this Nakamura Engineering SkyyTram Mk IV, serial number LT304TG2563.<br><br>We are not responsible for any injuries or fatalities caused by usage of the tram. \
|
||||
Using the tram carries inherent risks, and we cannot guarantee the safety of all passengers. By using the tram, you assume, acknowledge, and accept all the risks and responsibilities. <br><br>\
|
||||
Please be aware that riding the tram can cause a variety of injuries, including but not limited to: slips, trips, and falls; collisions with other passengers or objects; strains, sprains, and other musculoskeletal injuries; \
|
||||
cuts, bruises, and lacerations; and more severe injuries such as head trauma, spinal cord injuries, and even death. These injuries can be caused by a variety of factors, including the movements of the tram, the behaviour \
|
||||
of other passengers, and unforeseen circumstances such as foul play or mechanical issues.<br><br>\
|
||||
By entering the tram, guideway, or crossings you agree Nanotrasen is not liable for any injuries, damages, or losses that may occur. If you do not agree to these terms, please do not use the tram.<br>"
|
||||
icon_state = "commission_tram"
|
||||
custom_materials = list(/datum/material/titanium =SHEET_MATERIAL_AMOUNT)
|
||||
plane = FLOOR_PLANE
|
||||
|
||||
Reference in New Issue
Block a user