Skip to content

Commit

Permalink
Adds Whistles to the game (#22729)
Browse files Browse the repository at this point in the history
* Porting whistle from CMSS13

* species variations

* lets kill the conflict

* adding it back

* new whistle sound
  • Loading branch information
Henri215 authored Nov 6, 2023
1 parent 685df10 commit bc095ad
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 1 deletion.
3 changes: 3 additions & 0 deletions code/datums/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@
/datum/action/item_action/laugh_track
name = "Laugh Track"

/datum/action/item_action/whistle
name = "Whistle"

/datum/action/item_action/floor_buffer
name = "Toggle Floor Buffer"
desc = "Movement speed is decreased while active."
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/effects/spawners/lootdrop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@
/obj/item/clothing/mask/holo_cigar = 100,
/obj/item/storage/box/syndie_kit/chameleon = 50, //costumes!
/obj/item/storage/backpack/satchel_flat = 50,
/obj/item/book_of_babel = 50
/obj/item/book_of_babel = 50,
/obj/item/clothing/mask/whistle = 50
)

/obj/effect/spawner/lootdrop/trade_sol/minerals
Expand Down
25 changes: 25 additions & 0 deletions code/game/objects/items/devices/whistle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,28 @@
emagged = TRUE

#undef USE_COOLDOWN

/obj/item/clothing/mask/whistle
name = "whistle"
desc = "A metal pea-whistle. Can be blown while held, or worn in the mouth."
icon_state = "whistle"
item_state = "whistle"
w_class = WEIGHT_CLASS_TINY
flags = CONDUCT
body_parts_covered = null
actions_types = list(/datum/action/item_action/whistle)
COOLDOWN_DECLARE(whistle_cooldown)
sprite_sheets = list(
"Vox" = 'icons/mob/clothing/species/vox/mask.dmi',
"Unathi" = 'icons/mob/clothing/species/unathi/mask.dmi',
"Tajaran" = 'icons/mob/clothing/species/tajaran/mask.dmi',
"Vulpkanin" = 'icons/mob/clothing/species/vulpkanin/mask.dmi',
"Grey" = 'icons/mob/clothing/species/grey/mask.dmi'
)

/obj/item/clothing/mask/whistle/attack_self(mob/user)
if(!COOLDOWN_FINISHED(src, whistle_cooldown))
return

playsound(src, pick('sound/items/whistle1.ogg', 'sound/items/whistle2.ogg', 'sound/items/whistle3.ogg'), 25)
COOLDOWN_START(src, whistle_cooldown, 4 SECONDS)
1 change: 1 addition & 0 deletions code/game/objects/mail.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
icon_state = "mail_sec"
possible_contents = list(/obj/item/reagent_containers/food/snacks/donut/sprinkles,
/obj/item/megaphone,
/obj/item/clothing/mask/whistle,
/obj/item/poster/random_official,
/obj/item/restraints/handcuffs/pinkcuffs,
/obj/item/restraints/legcuffs/bola/energy,
Expand Down
Binary file modified icons/mob/clothing/mask.dmi
Binary file not shown.
Binary file modified icons/mob/clothing/species/grey/mask.dmi
Binary file not shown.
Binary file modified icons/mob/clothing/species/tajaran/mask.dmi
Binary file not shown.
Binary file modified icons/mob/clothing/species/unathi/mask.dmi
Binary file not shown.
Binary file modified icons/mob/clothing/species/vox/mask.dmi
Binary file not shown.
Binary file modified icons/mob/clothing/species/vulpkanin/mask.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/masks.dmi
Binary file not shown.
Binary file added sound/items/whistle1.ogg
Binary file not shown.
Binary file added sound/items/whistle2.ogg
Binary file not shown.
Binary file added sound/items/whistle3.ogg
Binary file not shown.

0 comments on commit bc095ad

Please sign in to comment.