Skip to content

Commit

Permalink
Tram malfunction adjustments (tgstation#83706)
Browse files Browse the repository at this point in the history
## About The Pull Request

Adjusts tram malfunction and the tram malfunction event to be more
straightforward and similar to other telecoms machinery.

- Tram malfunction now requires engineering, borg, or AI to visit either
the tram or the tram controller in telecoms to press 'reset'
(previously: open the tram panel and find the appropriate tool to repair
it)
- Tram malfunction event only stops the tram once per event roll
- Adjust announcement to include message that engineers need to reset
the tram
- Removed loud priority_announce when the tram is fixed. Players know
the tram is fixed because they are using it again
- Tram doors no longer force crush during malfunction, since engineers
have no method to fix this
- EMP/communications blackout event will temporarily degrade crossing
signals, otherwise the tram continues to function normally
- Loss of telecoms power will degrade crossing signals, otherwise the
tram continues to function normally

Frequency of tram malfunction event is reduced to be in line with
communications blackout and grav gen blackout, and a maximum of 3
occurrences per round

Signal failure:
Previously: Signals fail until reset has physically been done on the
controller
New: Signal failure is moved to be part of the Communications Blackout
event, lasting the duration of EMP blast that hits telecoms

Communication loss:
Previously: For the duration of the Tram Malfunction event there is a 5%
chance the tram does a degraded stop, ending when the controller is
repaired or the timer ends
New: A guaranteed 1 degraded stop per event roll. To balance the
increase in occurrences it's been made easier to reset on the
controller. If the tram is not reset by the end of the timer, it is done
automatically

New telecoms room tram controller:

![dreamseeker_AGHpKvyunZ](https://github.com/tgstation/tgstation/assets/83487515/e8269607-11c9-407a-8f6e-d20f3f1b5f56)

## Why It's Good For The Game

Making the tram friendlier for engineering to pick up/understand, it
will function more predictably in the tram malfunction and
communications blackout event.

## Changelog

:cl: LT3
add: Telecoms now has a central tram controller
add: Tram controller is now included in communications blackout event
qol: Tram malfunction event only stops tram once, requiring engineering
to reset (no tools required)
qol: Tram malfunction event no longer sends a Central Command
announcement when fixed
del: Tram doors no longer force crush you during tram malfunction event
del: Silicons can no longer control the tram when communication is lost
/:cl:
  • Loading branch information
lessthnthree authored Jun 9, 2024
1 parent 933a6b1 commit 8246e3c
Show file tree
Hide file tree
Showing 9 changed files with 216 additions and 99 deletions.
14 changes: 11 additions & 3 deletions _maps/map_files/Birdshot/birdshot.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -22386,6 +22386,12 @@
},
/turf/open/floor/engine/co2,
/area/station/engineering/atmos/space_catwalk)
"izw" = (
/obj/machinery/transport/tram_controller/tcomms{
configured_transport_id = "bird_2"
},
/turf/open/floor/circuit,
/area/station/tcommsat/server)
"izB" = (
/obj/effect/turf_decal/tile/neutral/fourcorners,
/obj/structure/sign/painting/library{
Expand Down Expand Up @@ -58362,8 +58368,10 @@
/turf/open/floor/iron/dark,
/area/station/medical/pharmacy)
"tUD" = (
/obj/effect/spawner/structure/window/reinforced,
/turf/open/floor/plating,
/obj/machinery/transport/tram_controller/tcomms{
configured_transport_id = "bird_1"
},
/turf/open/floor/circuit,
/area/station/tcommsat/server)
"tUH" = (
/obj/structure/disposalpipe/segment,
Expand Down Expand Up @@ -121804,7 +121812,7 @@ wos
udv
tSq
mvo
tUD
izw
bFw
ulK
cdn
Expand Down
16 changes: 12 additions & 4 deletions _maps/map_files/tramstation/tramstation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -6765,7 +6765,10 @@
dir = 8
},
/obj/item/radio/intercom/directional/west,
/obj/item/paper/fluff/jobs/engineering/frequencies,
/obj/item/toy/plush/lizard_plushie/green{
name = "Runs-The-Rails";
desc = "An adorable, hard working lizard that runs in circles to keep the tram operating safely."
},
/turf/open/floor/iron,
/area/station/tcommsat/computer)
"boc" = (
Expand Down Expand Up @@ -26721,6 +26724,7 @@
},
/obj/item/folder/blue,
/obj/item/pen/blue,
/obj/item/paper/fluff/jobs/engineering/frequencies,
/turf/open/floor/iron,
/area/station/tcommsat/computer)
"iDQ" = (
Expand Down Expand Up @@ -61751,6 +61755,10 @@
"uGW" = (
/turf/closed/wall,
/area/station/cargo/miningdock)
"uGX" = (
/obj/machinery/transport/tram_controller/tcomms,
/turf/open/floor/iron/dark/telecomms,
/area/station/tcommsat/server)
"uHb" = (
/obj/machinery/airalarm/directional/north,
/obj/machinery/photocopier,
Expand Down Expand Up @@ -98247,7 +98255,7 @@ dwR
ngp
dwR
dwR
cXL
ney
ney
sMr
sMr
Expand Down Expand Up @@ -98505,7 +98513,7 @@ gga
rBW
ffN
sMr
sMr
uGX
drH
ney
tms
Expand Down Expand Up @@ -98761,7 +98769,7 @@ ocK
ngp
dwR
dwR
cXL
sMr
sMr
sMr
sMr
Expand Down
4 changes: 0 additions & 4 deletions code/controllers/subsystem/transport.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@ PROCESSING_SUBSYSTEM_DEF(transport)
/datum/controller/subsystem/processing/transport/proc/pre_departure(datum/transport_controller/linear/tram/transport_controller, request_flags)
log_transport("Sub: [transport_controller.specific_transport_id] start pre-departure. Info: [SUB_TS_STATUS]")

// Tram Malfunction event
if(transport_controller.controller_status & COMM_ERROR)
request_flags |= BYPASS_SENSORS

// Lock the physical controls of the tram
transport_controller.set_status_code(PRE_DEPARTURE, TRUE)
transport_controller.set_status_code(CONTROLS_LOCKED, TRUE)
Expand Down
4 changes: 4 additions & 0 deletions code/modules/events/communications_blackout.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@
/datum/round_event/communications_blackout/start()
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list)
T.emp_act(EMP_HEAVY)
for(var/datum/transport_controller/linear/tram/transport as anything in SStransport.transports_by_type[TRANSPORT_TYPE_TRAM])
if(!isnull(transport.home_controller))
var/obj/machinery/transport/tram_controller/tcomms/controller = transport.home_controller
controller.emp_act(EMP_HEAVY)
12 changes: 4 additions & 8 deletions code/modules/events/tram_malfunction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
/datum/round_event_control/tram_malfunction
name = "Tram Malfunction"
typepath = /datum/round_event/tram_malfunction
weight = 40
max_occurrences = 4
weight = 30
max_occurrences = 3
earliest_start = 15 MINUTES
category = EVENT_CATEGORY_ENGINEERING
description = "Tram crossing signals malfunction, tram collision damage is increased."
description = "Tram comes to an emergency stop, requiring engineering to reset."
min_wizard_trigger_potency = 0
max_wizard_trigger_potency = 3

Expand All @@ -34,9 +34,6 @@
/datum/round_event/tram_malfunction/setup()
end_when = rand(TRAM_MALFUNCTION_TIME_LOWER, TRAM_MALFUNCTION_TIME_UPPER)

/datum/round_event/tram_malfunction/announce()
priority_announce("Our automated control system has lost contact with the tram's onboard computer. Please take extra care while engineers diagnose and resolve the issue.", "[command_name()] Engineering Division")

/datum/round_event/tram_malfunction/start()
for(var/datum/transport_controller/linear/tram/malfunctioning_controller as anything in SStransport.transports_by_type[TRANSPORT_TYPE_TRAM])
if(malfunctioning_controller.specific_transport_id == specific_transport_id)
Expand All @@ -45,9 +42,8 @@

/datum/round_event/tram_malfunction/end()
for(var/datum/transport_controller/linear/tram/malfunctioning_controller as anything in SStransport.transports_by_type[TRANSPORT_TYPE_TRAM])
if(malfunctioning_controller.specific_transport_id == specific_transport_id && malfunctioning_controller.controller_status & COMM_ERROR)
if(malfunctioning_controller.specific_transport_id == specific_transport_id && malfunctioning_controller.malf_active)
malfunctioning_controller.end_malf_event()
priority_announce("The software on the tram has been reset, normal operations are now resuming. Sorry for any inconvienence this may have caused.", "[command_name()] Engineering Division")
return

#undef TRAM_MALFUNCTION_TIME_UPPER
Expand Down
Loading

0 comments on commit 8246e3c

Please sign in to comment.