Skip to content

Commit

Permalink
add: add areas and headsets to simplify event creation (ss220-space#3880
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ArtemDerp authored Nov 17, 2023
1 parent d6f2b07 commit 00dee92
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 3 deletions.
4 changes: 4 additions & 0 deletions code/__DEFINES/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
#define PROC_FREQ 1339 //Procedure
#define BOT_FREQ 1447 //mulebot, secbot, ed209

// Event channels
#define EVENT_ALPHA_FREQ 1522
#define EVENT_BETA_FREQ 1532
#define EVENT_GAMMA_FREQ 1542

// Department channels
#define PUB_FREQ 1459 //standard radio chat
Expand Down
11 changes: 10 additions & 1 deletion code/controllers/subsystem/non-firing/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ SUBSYSTEM_DEF(radio)
"Medical(I)" = MED_I_FREQ,
"Security(I)" = SEC_I_FREQ,
"Spy Spider" = SPY_SPIDER_FREQ,
"Spider Clan" = NINJA_FREQ
"Spider Clan" = NINJA_FREQ,
"Alpha wave" = EVENT_ALPHA_FREQ,
"Beta wave" = EVENT_BETA_FREQ,
"Gamma wave" = EVENT_GAMMA_FREQ
)
var/list/CENT_FREQS = list(ERT_FREQ, DTH_FREQ)
var/list/ANTAG_FREQS = list(SYND_FREQ, SYNDTEAM_FREQ, SYND_TAIPAN_FREQ)
Expand Down Expand Up @@ -73,6 +76,12 @@ SUBSYSTEM_DEF(radio)
return "spyradio"
if(NINJA_FREQ)
return "spider_clan"
if(EVENT_ALPHA_FREQ)
return "event_alpha"
if(EVENT_BETA_FREQ)
return "event_beta"
if(EVENT_GAMMA_FREQ)
return "event_gamma"

// If the above switch somehow failed. And it needs the SSradio. part otherwise it fails to compile
if(frequency in DEPT_FREQS)
Expand Down
30 changes: 30 additions & 0 deletions code/game/area/ss13_areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2928,3 +2928,33 @@ GLOBAL_LIST_INIT(the_station_areas, list(
/area/turret_protected/ai_upload_foyer,
/area/turret_protected/ai,
))


//// Special event areas

/area/special_event
name = "Special event area"
icon_state = "unknown"
requires_power = TRUE
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
report_alerts = FALSE

/area/special_event/alpha
name = "Special event area Alpha"
icon_state = "away1"

/area/special_event/beta
name = "Special event area Beta"
icon_state = "away2"

/area/special_event/gamma
name = "Special event area Gamma"
icon_state = "away3"

/area/special_event/delta
name = "Special event area Delta"
icon_state = "away4"

/area/special_event/epsilon
name = "Special event area Epsilon"
icon_state = "away5"
19 changes: 19 additions & 0 deletions code/game/objects/items/devices/radio/encryptionkey.dm
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,22 @@
desc = "Integrated encryption key"
icon_state = "cap_cypherkey"
channels = list("Command" = 1, "Security" = 1, "Engineering" = 1, "Science" = 1, "Medical" = 1, "Supply" = 1, "Service" = 1, "AI Private" = 1, "Procedure" = 1)

/obj/item/encryptionkey/event_1
name = "Encryption key"
desc = "An encryption key for a radio headset. To access special radio channel, use :q."
icon_state = "sov_cypherkey"
channels = list("Alpha wave" = 1)

/obj/item/encryptionkey/event_2
name = "Encryption key"
desc = "An encryption key for a radio headset. To access special radio channel, use :vi."
icon_state = "sov_cypherkey"
channels = list("Beta wave" = 1)

/obj/item/encryptionkey/event_3
name = "Encryption key"
desc = "An encryption key for a radio headset. To access special radio channel, use :y."
icon_state = "sov_cypherkey"
channels = list("Gamma wave" = 1)

30 changes: 30 additions & 0 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,36 @@
return FALSE
return ..()

/obj/item/radio/headset/event_1
name = "Radio headset"
desc = "A headset linked to special long range alpha frequency in this sector."
icon_state = "headset"
item_state = "headset"
ks1type = /obj/item/encryptionkey/event_1
requires_tcomms = FALSE
instant = TRUE
freqlock = TRUE

/obj/item/radio/headset/event_2
name = "Radio headset"
desc = "A headset linked to special long range beta frequency in this sector."
icon_state = "headset"
item_state = "headset"
ks1type = /obj/item/encryptionkey/event_2
requires_tcomms = FALSE
instant = TRUE
freqlock = TRUE

/obj/item/radio/headset/event_3
name = "Radio headset"
desc = "A headset linked to special long range gamma frequency in this sector."
icon_state = "headset"
item_state = "headset"
ks1type = /obj/item/encryptionkey/event_3
requires_tcomms = FALSE
instant = TRUE
freqlock = TRUE

/obj/item/radio/headset/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/encryptionkey/))
user.set_machine(src)
Expand Down
19 changes: 17 additions & 2 deletions code/modules/mob/living/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
% ? ^ '
Busy letters by radio(eng):
c e h i l m n p r s t u w x z
c e h i l m n p q r s t u w x z y
vi
Busy letters by radio(rus):
б г д е ё з к р с т у ц ч ш ы ь я Э
б г д е ё з й к н р с т у ц ч ш ы ь я Э
мш
Busy symbols by radio:
~ , $ _ - + *
Expand All @@ -37,6 +39,9 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
":u" = "Supply", "#u" = "Supply", "№u" = "Supply", ".u" = "Supply",
":z" = "Service", "#z" = "Service", "№z" = "Service", ".z" = "Service",
":p" = "AI Private", "#p" = "AI Private", "№p" = "AI Private", ".p" = "AI Private",
":q" = "Alpha wave", "#q" = "Alpha wave", "№q" = "Alpha wave", ".q" = "Alpha wave",
":vi" = "Beta wave", "#vi" = "Beta wave", "№vi" = "Beta wave", ".vi" = "Beta wave",
":y" = "Gamma wave", "#y" = "Gamma wave", "№y" = "Gamma wave", ".y" = "Gamma wave",

// English text uppercase
":R" = "right ear", "#R" = "right ear", "№R" = "right ear", ".R" = "right ear",
Expand All @@ -55,6 +60,9 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
":U" = "Supply", "#U" = "Supply", "№U" = "Supply", ".U" = "Supply",
":Z" = "Service", "#Z" = "Service", "№Z" = "Service", ".Z" = "Service",
":P" = "AI Private", "#P" = "AI Private", "№P" = "AI Private", ".P" = "AI Private",
":Q" = "Alpha wave", "#Q" = "Alpha wave", "№Q" = "Alpha wave", ".Q" = "Alpha wave",
":VI" = "Beta wave", "#VI" = "Beta wave", "№VI" = "Beta wave", ".VI" = "Beta wave",
":Y" = "Gamma wave", "#Y" = "Gamma wave", "№Y" = "Gamma wave", ".Y" = "Gamma wave",

// Russian text lowercase
"" = "right ear", "" = "right ear", "№к" = "right ear", "" = "right ear",
Expand All @@ -75,6 +83,10 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
"" = "Service", "" = "Service", "№я" = "Service", "" = "Service",
"" = "AI Private", "" = "AI Private", "№з" = "AI Private", "" = "AI Private",
"" = "cords", "" = "cords", "№ё" = "cords", "" = "cords",
"" = "Alpha wave", "" = "Alpha wave", "№й" = "Alpha wave", "" = "Alpha wave",
":мш" = "Beta wave", "#мш" = "Beta wave", "№мш" = "Beta wave", ".мш" = "Beta wave",
"" = "Gamma wave", "" = "Gamma wave", "№y" = "Gamma wave", "" = "Gamma wave",

// Russian text uppercase
"" = "right ear", "" = "right ear", "№К" = "right ear", "" = "right ear",
"" = "left ear", "" = "left ear", "№Д" = "left ear", "" = "left ear",
Expand All @@ -93,6 +105,9 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
"" = "Service", "" = "Service", "№Я" = "Service", "" = "Service",
"" = "AI Private", "" = "AI Private", "№З" = "AI Private", "" = "AI Private",
"" = "cords", "" = "cords", "№Ё" = "cords", "" = "cords",
"" = "Alpha wave", "" = "Alpha wave", "№Й" = "Alpha wave", "" = "Alpha wave",
":МШ" = "Beta wave", "#МШ" = "Beta wave", "№МШ" = "Beta wave", ".МШ" = "Beta wave",
"" = "Gamma wave", "" = "Gamma wave", "№Н" = "Gamma wave", "" = "Gamma wave",

// English symbols no case
":~" = "cords", "#~" = "cords", "№~" = "cords", ".~" = "cords",
Expand Down
3 changes: 3 additions & 0 deletions goon/browserassets/css/browserOutput-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ h1, h2, h3, h4, h5, h6 {color: #06f;}
.sovradio {color: #f7941d;}
.taipan {color: #ffec8b;}
.spider_clan {color: #3cfd1e;}
.event_alpha {color: #e9f71d;}
.event_beta {color: #1d83f7;}
.event_gamma {color: #d46549;}
.dsquadradio {color: #998599;}
.airadio {color: #FF94FF;}
.centradio {color: #78789B;}
Expand Down
3 changes: 3 additions & 0 deletions goon/browserassets/css/browserOutput.css
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ em {font-style: normal; font-weight: bold;}
.taipan {color: #998e54;}
.syndiecom {color: #8f4242;}
.spider_clan {color: #044a1b;}
.event_alpha {color: #e9f71d;}
.event_beta {color: #1d83f7;}
.event_gamma {color: #d46549;}
.dsquadradio {color: #686868;}
.resteamradio {color: #18BC46;}
.airadio {color: #FF00FF;}
Expand Down

0 comments on commit 00dee92

Please sign in to comment.