Enhanced delam/tram counter (#75699)

## About The Pull Request

Gives a makeover to the delam and tram hit counters and adds some new
functionality.


![image](https://github.com/tgstation/tgstation/assets/83487515/cbbeb0df-d205-47ed-be6e-e49cea8c4f12)


![image](https://github.com/tgstation/tgstation/assets/83487515/e042d5e8-cb8b-4feb-b3f0-02365cd8fdbf)


![image](https://github.com/tgstation/tgstation/assets/83487515/c2831f7f-639d-40a8-a74f-d4894a4f67c6)


https://github.com/tgstation/tgstation/assets/83487515/871fb0fd-8b92-45c5-877b-c122a034608c

- The signs now remember your last 'best' score and show the crew if
they're trending in the right or wrong direction since the last
incident.
- Safety Moth PSA panel. In the future this will dynamically change
based on the current events, or function as a status display.
- Tram hit counters no longer waste processing every tram hit.
Previously each sign independently managed tracking, which meant that
deconstructing or constructing a sign would reset it to 0 and it would
become out of sync with the other signs.
- Can be repaired, EMP'd

## Why It's Good For The Game

Provide a little motivation to reach for that high score. The PSA
changing to for example, find a locker during a delam event.

## Changelog

🆑 LT3
image: Delam and tram flipsigns have been replaced with information
displays
fix: Tram hit count is centrally managed instead of independently on
each sign, so they won't get out of sync
/🆑
This commit is contained in:
lessthanthree
2023-06-23 11:29:34 -07:00
committed by GitHub
parent a3568da563
commit b3d040fb2f
15 changed files with 679 additions and 375 deletions
@@ -424,7 +424,10 @@ GLOBAL_LIST_EMPTY(lifts)
var/datum/callback/land_slam = new(collided, TYPE_PROC_REF(/mob/living/, tram_slam_land))
collided.throw_at(throw_target, 200 * collision_lethality, 4 * collision_lethality, callback = land_slam)
SEND_SIGNAL(src, COMSIG_TRAM_COLLISION, collided)
//increment the hit counter signs
if(ismob(collided) && collided.client)
SSpersistence.tram_hits_this_round++
SEND_SIGNAL(src, COMSIG_TRAM_COLLISION, SSpersistence.tram_hits_this_round)
unset_movement_registrations(exited_locs)
group_move(things_to_move, going)
@@ -21,9 +21,10 @@ GLOBAL_LIST_INIT(sm_delam_list, list(
/// [/obj/machinery/power/supermatter_crystal/proc/count_down]
/datum/sm_delam/proc/delaminate(obj/machinery/power/supermatter_crystal/sm)
if (sm.is_main_engine)
SSpersistence.delam_highscore = SSpersistence.rounds_since_engine_exploded
SSpersistence.rounds_since_engine_exploded = ROUNDCOUNT_ENGINE_JUST_EXPLODED
for (var/obj/structure/sign/delamination_counter/sign as anything in GLOB.map_delamination_counters)
sign.update_count(ROUNDCOUNT_ENGINE_JUST_EXPLODED)
for (var/obj/machinery/incident_display/sign as anything in GLOB.map_delamination_counters)
sign.update_delam_count(ROUNDCOUNT_ENGINE_JUST_EXPLODED)
qdel(sm)
#undef ROUNDCOUNT_ENGINE_JUST_EXPLODED