Skip to content

Commit

Permalink
bugfix: pet collar announces mob death to "station owner" channel. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeberdir authored Nov 24, 2023
1 parent 92a77ae commit 6219425
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
5 changes: 5 additions & 0 deletions code/game/objects/items/devices/radio/encryptionkey.dm
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@
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/admin //totally shitspawn
name = "Admin Radio Encryption Key"
channels = list("Common" = 1, "Science" = 1, "Command" = 1, "Medical" = 1, "Engineering" = 1, "Security" = 1, "Supply" = 1, "Service" = 1, "Procedure" = 1, "AI Private" = 1, "Syndicate" = 1, \
"Response Team" = 1, "Special Ops" = 1, "SyndTaipan" = 1, "SyndTeam" = 1, "Soviet" = 1, "Medical(I)" = 1, "Security(I)" = 1, "Spy Spider" = 1, "Spider Clan" = 1, "Alpha wave" = 1, "Beta wave" = 1, "Gamma wave" = 1)

/obj/item/encryptionkey/event_1
name = "Encryption key"
desc = "An encryption key for a radio headset. To access special radio channel, use :q."
Expand Down
3 changes: 3 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,9 @@
return FALSE
return ..()

/obj/item/radio/headset/all_channels // Its only feature is all channels.
ks1type = /obj/item/encryptionkey/admin

/obj/item/radio/headset/event_1
name = "Radio headset"
desc = "A headset linked to special long range alpha frequency in this sector."
Expand Down
25 changes: 18 additions & 7 deletions code/modules/clothing/under/accessories/accessory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -819,14 +819,25 @@
// if it wasn't intentionally unequipped but isn't being worn, possibly gibbed
if(istype(M) && src == M.pcollar && M.stat != DEAD)
return

var/announce_channel = "Common" // Channel toggler for mobs, who dies in specific locations.
var/area/t = get_area(M)
var/obj/item/radio/headset/a = new /obj/item/radio/headset(src)
if(istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite))
//give the syndicats a bit of stealth
a.autosay("[M] has been vandalized in Space!", "[M]'s Death Alarm")
else
a.autosay("[M] has been vandalized in [t.name]!", "[M]'s Death Alarm")
var/obj/item/radio/headset/all_channels/a = new /obj/item/radio/headset/all_channels(src)
if(M.z == level_name_to_num(RAMSS_TAIPAN))
announce_channel = "SyndTaipan" // Taipan channel for Руж.
else if(istype(t, /area/centcom))
announce_channel = "Response Team" // For animals who dare to infiltrate CC.
else if(istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) || istype(t, /area/shuttle/syndicate_sit))
announce_channel = "SyndTeam" // Just to be sure ...
else if(istype(t, /area/ninja))
announce_channel = "Spider Clan" // Even ninja may have a little pet.
else if(istype(t, /area/ussp_centcom))
announce_channel = "Soviet" // MISHA, FU!
else if((M.z == level_name_to_num(CENTCOMM) || z == level_name_to_num(ADMIN_ZONE)) && SSticker.current_state != GAME_STATE_FINISHED)
a.autosay("[M] has been vandalized in Space!", "[M]'s Death Alarm") // For the rest of CC map locations like Abductors UFO, Vox home or TSF home.
qdel(a)
STOP_PROCESSING(SSobj, src)
return
a.autosay("[M] has been vandalized in [t.name]!", "[M]'s Death Alarm", announce_channel)
qdel(a)
STOP_PROCESSING(SSobj, src)

Expand Down

0 comments on commit 6219425

Please sign in to comment.