Skip to content

Commit

Permalink
Don't forget... the button incident (#2066)
Browse files Browse the repository at this point in the history
* sumething

* gives button counters to all maps (Except delta)

* adds the display to delta
  • Loading branch information
Gboster-0 authored May 8, 2024
1 parent fa68bc0 commit d02f8d6
Show file tree
Hide file tree
Showing 16 changed files with 179 additions and 8 deletions.
Binary file added ModularTegustation/Teguicons/button_counter.dmi
Binary file not shown.
58 changes: 58 additions & 0 deletions ModularTegustation/lc13_structures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,61 @@
pixel_y = -8
base_pixel_y = -8
anchored = TRUE

/**
* List of button counters
* Required as persistence subsystem loads after the ones present at mapload, and to reset to 0 upon explosion.
*/
GLOBAL_LIST_EMPTY(map_button_counters)
/obj/structure/sign/button_counter
name = "button counter"
sign_change_name = "Flip Sign- Days since buttoned"
desc = "A pair of flip signs describe how long it's been since the last button incident."
icon_state = "days_since_button"
icon = 'ModularTegustation/Teguicons/button_counter.dmi'
is_editable = TRUE
var/since_last = 0

MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sign/button_counter, 32)

/obj/structure/sign/button_counter/Initialize(mapload)
. = ..()
GLOB.map_button_counters += src
if(!mapload)
update_count(SSpersistence.rounds_since_button_pressed)

/obj/structure/sign/button_counter/Destroy()
GLOB.map_button_counters -= src
return ..()

/obj/structure/sign/button_counter/proc/update_count(new_count)
since_last = min(new_count, 99)
update_overlays()

/obj/structure/sign/button_counter/update_overlays()
. = ..()

var/ones = since_last % 10
var/mutable_appearance/ones_overlay = mutable_appearance('ModularTegustation/Teguicons/button_counter.dmi', "days_[ones]")
ones_overlay.pixel_x = 4
. += ones_overlay

var/tens = (since_last / 10) % 10
var/mutable_appearance/tens_overlay = mutable_appearance('ModularTegustation/Teguicons/button_counter.dmi', "days_[tens]")
tens_overlay.pixel_x = -5
. += tens_overlay

/obj/structure/sign/button_counter/examine(mob/user)
. = ..()
. += span_info("It has been [since_last] day\s since the last button event at a Lobotomy facility.")
switch(since_last)
if(0)
. += span_info("In case you didn't notice.")
if(1)
. += span_info("Let's do better today.")
if(2 to 5)
. += span_info("There's room for improvement.")
if(6 to 10)
. += span_info("Good work!")
if(11 to INFINITY)
. += span_info("Incredible!")
2 changes: 2 additions & 0 deletions _maps/map_files/Alpha/alphacorp.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2876,6 +2876,7 @@
/obj/effect/turf_decal/box/white,
/obj/machinery/vending/lobotomyuniform,
/obj/machinery/camera/autoname,
/obj/structure/sign/button_counter/directional/north,
/turf/open/floor/plasteel/dark,
/area/department_main/records)
"vr" = (
Expand Down Expand Up @@ -3119,6 +3120,7 @@
"wZ" = (
/obj/effect/turf_decal/box/white,
/obj/machinery/vending/lobotomyarmband,
/obj/structure/sign/button_counter/directional/north,
/turf/open/floor/plasteel/dark,
/area/department_main/records)
"xa" = (
Expand Down
2 changes: 2 additions & 0 deletions _maps/map_files/Beta/betacorp.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,7 @@
"fi" = (
/obj/machinery/vending/lobotomyuniform,
/obj/effect/turf_decal/bot_white,
/obj/structure/sign/button_counter/directional/east,
/turf/open/floor/facility/dark,
/area/department_main/records)
"fn" = (
Expand Down Expand Up @@ -5468,6 +5469,7 @@
dir = 9
},
/obj/effect/turf_decal/bot_white,
/obj/structure/sign/button_counter/directional/east,
/turf/open/floor/facility/dark,
/area/department_main/records)
"AC" = (
Expand Down
11 changes: 10 additions & 1 deletion _maps/map_files/Delta/deltacorp.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,14 @@
color = "#ccc8c0"
},
/area/facility_hallway/training)
"cn" = (
/obj/effect/turf_decal/tile/neutral{
color = "#000000";
dir = 8
},
/obj/structure/sign/button_counter/directional/south,
/turf/open/floor/plasteel/sepia,
/area/facility_hallway/information)
"co" = (
/obj/effect/landmark/latejoin,
/obj/effect/turf_decal/tile/yellow{
Expand Down Expand Up @@ -11708,6 +11716,7 @@
color = "#090807";
dir = 1
},
/obj/structure/sign/button_counter/directional/south,
/turf/open/floor/plasteel/sepia,
/area/facility_hallway/information)
"Bo" = (
Expand Down Expand Up @@ -53727,7 +53736,7 @@ TY
mj
Jg
JE
Td
cn
eF
Nh
lp
Expand Down
20 changes: 18 additions & 2 deletions _maps/map_files/Epsilon/epsiloncorp.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,15 @@
/obj/structure/disposalpipe/segment,
/turf/open/floor/plasteel/sepia,
/area/facility_hallway/east)
"dz" = (
/obj/effect/turf_decal/tile/neutral{
dir = 4
},
/obj/structure/sign/button_counter/directional/east,
/turf/open/floor/plasteel/sepia{
color = "#ccc8c0"
},
/area/facility_hallway/information)
"dA" = (
/obj/effect/turf_decal/tile/brown,
/obj/effect/turf_decal/tile/brown{
Expand Down Expand Up @@ -7609,6 +7618,13 @@
},
/turf/open/floor/plasteel/sepia,
/area/facility_hallway/training)
"wA" = (
/obj/effect/turf_decal/tile/neutral,
/obj/structure/sign/button_counter/directional/east,
/turf/open/floor/plasteel/sepia{
color = "#ccc8c0"
},
/area/facility_hallway/information)
"wC" = (
/obj/structure/chair/office{
anchored = 1;
Expand Down Expand Up @@ -51623,9 +51639,9 @@ kp
mt
yl
pH
Zt
dz
SL
Fd
wA
eb
kD
pI
Expand Down
2 changes: 2 additions & 0 deletions _maps/map_files/Eta/etacorp.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
/obj/effect/turf_decal/stripes/white/corner{
dir = 1
},
/obj/structure/sign/button_counter/directional/east,
/turf/open/floor/plasteel/dark{
color = "#ccc8c0"
},
Expand Down Expand Up @@ -1045,6 +1046,7 @@
/area/department_main/training)
"eN" = (
/obj/effect/turf_decal/stripes/white/corner,
/obj/structure/sign/button_counter/directional/north,
/turf/open/floor/plasteel/dark{
color = "#ccc8c0"
},
Expand Down
2 changes: 2 additions & 0 deletions _maps/map_files/Event/skeld.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -5276,6 +5276,7 @@
/obj/machinery/computer/abnormality_logs{
dir = 8
},
/obj/structure/sign/button_counter/directional/east,
/turf/open/floor/carpet/black,
/area/department_main/records)
"Ab" = (
Expand Down Expand Up @@ -5472,6 +5473,7 @@
/obj/machinery/computer/message_monitor{
dir = 8
},
/obj/structure/sign/button_counter/directional/east,
/turf/open/floor/carpet/black,
/area/department_main/records)
"AQ" = (
Expand Down
2 changes: 2 additions & 0 deletions _maps/map_files/Gamma/gammacorp.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,7 @@
"jI" = (
/obj/machinery/vending/lobotomyuniform,
/obj/effect/turf_decal/box/white,
/obj/structure/sign/button_counter/directional/west,
/turf/open/floor/facility/dark,
/area/department_main/records)
"jL" = (
Expand Down Expand Up @@ -2474,6 +2475,7 @@
"qT" = (
/obj/machinery/vending/lobotomyarmband,
/obj/effect/turf_decal/box/white,
/obj/structure/sign/button_counter/directional/west,
/turf/open/floor/facility/dark,
/area/department_main/records)
"qU" = (
Expand Down
26 changes: 24 additions & 2 deletions _maps/map_files/Iota/iotacorp.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -7151,6 +7151,16 @@
},
/turf/open/floor/wood,
/area/facility_hallway/welfare)
"vK" = (
/obj/effect/turf_decal/box/white/corners,
/obj/effect/turf_decal/stripes/white/corner{
dir = 1
},
/obj/structure/sign/button_counter/directional/south,
/turf/open/floor/facility/dark{
color = "#ccc8c0"
},
/area/space)
"vM" = (
/obj/effect/turf_decal/stripes/white/line{
dir = 4
Expand Down Expand Up @@ -11707,6 +11717,18 @@
},
/turf/open/floor/facility/dark,
/area/department_main/records)
"Lu" = (
/obj/effect/turf_decal/box/white/corners{
dir = 8
},
/obj/effect/turf_decal/stripes/white/corner{
dir = 4
},
/obj/structure/sign/button_counter/directional/south,
/turf/open/floor/facility/dark{
color = "#ccc8c0"
},
/area/space)
"Lw" = (
/obj/effect/turf_decal/siding/thinplating{
dir = 1
Expand Down Expand Up @@ -55747,7 +55769,7 @@ rK
SV
JT
ON
dx
Lu
mu
uf
Bn
Expand Down Expand Up @@ -56261,7 +56283,7 @@ rK
SV
mD
sq
BN
vK
mu
uf
Bn
Expand Down
10 changes: 9 additions & 1 deletion _maps/map_files/Kappa/kappacorp.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -7514,6 +7514,13 @@
},
/turf/open/floor/pod/dark,
/area/department_main/information)
"JO" = (
/obj/effect/turf_decal/stripes/line{
dir = 6
},
/obj/structure/sign/button_counter/directional/east,
/turf/open/floor/pod/light,
/area/facility_hallway/information)
"JP" = (
/turf/closed/indestructible/reinforced{
desc = "A huge chunk of wing-grade metal used in various L corporation facilities. Effectively impervious to conventional methods of destruction.";
Expand Down Expand Up @@ -7978,6 +7985,7 @@
/obj/structure/disposalpipe/segment{
dir = 1
},
/obj/structure/sign/button_counter/directional/east,
/turf/open/floor/pod/light,
/area/facility_hallway/information)
"Ml" = (
Expand Down Expand Up @@ -51100,7 +51108,7 @@ em
gQ
Mj
Tr
RU
JO
nO
SK
SK
Expand Down
10 changes: 8 additions & 2 deletions _maps/map_files/Lambda/lambdacorp.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -8791,6 +8791,12 @@
},
/turf/open/floor/pod,
/area/department_main/training)
"QH" = (
/obj/effect/landmark/toolspawn,
/obj/effect/turf_decal/box/white,
/obj/structure/sign/button_counter/directional/north,
/turf/open/floor/pod/dark,
/area/department_main/records)
"QJ" = (
/turf/open/floor/plating,
/area/facility_hallway/information)
Expand Down Expand Up @@ -47965,7 +47971,7 @@ sR
sR
sR
QV
NH
QH
VH
fz
QV
Expand Down Expand Up @@ -48479,7 +48485,7 @@ sR
sR
sR
QV
NH
QH
Dr
Db
QV
Expand Down
17 changes: 17 additions & 0 deletions code/__DEFINES/directional.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/// Create directional subtypes for a path to simplify mapping.
#define MAPPING_DIRECTIONAL_HELPERS(path, offset) ##path/directional/north {\
dir = NORTH; \
pixel_y = offset; \
} \
##path/directional/south {\
dir = SOUTH; \
pixel_y = -offset; \
} \
##path/directional/east {\
dir = EAST; \
pixel_x = offset; \
} \
##path/directional/west {\
dir = WEST; \
pixel_x = -offset; \
}
Loading

0 comments on commit d02f8d6

Please sign in to comment.