Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frogs no longer destroy your eardrums from the next department over #2597

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/modules/mob/living/basic/vermin/frog.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@
AddElement(/datum/element/ai_retaliate)
AddElement(/datum/element/swabable, CELL_LINE_TABLE_FROG, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)

/* monkestation edit: overriden in [monkestation\code\modules\mob\living\basic\vermin\frog.dm]
/mob/living/basic/frog/proc/on_entered(datum/source, AM as mob|obj)
SIGNAL_HANDLER
if(!stat && isliving(AM))
var/mob/living/L = AM
if(L.mob_size > MOB_SIZE_TINY)
playsound(src, stepped_sound, 50, TRUE)
monkestation end */

/datum/ai_controller/basic_controller/frog
blackboard = list(
Expand Down
26 changes: 26 additions & 0 deletions monkestation/code/modules/mob/living/basic/vermin/frog.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#define FROG_VOLUME 50
#define FROG_NOISE_COOLDOWN 1.5 SECONDS
#define FROG_FALLOFF_EXPONENT 20 // same as bike horn

/mob/living/basic/frog
/// Cooldown for frogs making their frog noise
COOLDOWN_DECLARE(frogspam_cooldown)

/mob/living/basic/frog/proc/on_entered(datum/source, mob/living/stepper)
SIGNAL_HANDLER
if(stat || !isliving(stepper) || stepper.mob_size <= MOB_SIZE_TINY || !COOLDOWN_FINISHED(src, frogspam_cooldown))
return
playsound(
src,
stepped_sound,
vol = FROG_VOLUME,
vary = TRUE,
extrarange = MEDIUM_RANGE_SOUND_EXTRARANGE,
falloff_exponent = FROG_FALLOFF_EXPONENT,
ignore_walls = FALSE // I DO NOT WANT TO HEAR THIS THING FROM THE NEXT DEPARTMENT OVER
)
COOLDOWN_START(src, frogspam_cooldown, FROG_NOISE_COOLDOWN)

#undef FROG_FALLOFF_EXPONENT
#undef FROG_NOISE_COOLDOWN
#undef FROG_VOLUME
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6934,6 +6934,7 @@
#include "monkestation\code\modules\mob\living\basic\ggg\susflash.dm"
#include "monkestation\code\modules\mob\living\basic\pets\parrot\parrot_ai\parroting_action.dm"
#include "monkestation\code\modules\mob\living\basic\space_fauna\fugu_gland.dm"
#include "monkestation\code\modules\mob\living\basic\vermin\frog.dm"
#include "monkestation\code\modules\mob\living\basic\vermin\mouse.dm"
#include "monkestation\code\modules\mob\living\carbon\carbon.dm"
#include "monkestation\code\modules\mob\living\carbon\carbon_death.dm"
Expand Down
Loading