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

Signal Horn Update + Fix #41

Merged
merged 1 commit into from
Oct 16, 2024
Merged
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
54 changes: 42 additions & 12 deletions modular_hearthstone/code/game/objects/items/signal_horn.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/obj/item/signal_horn/proc/sound_horn(mob/living/user)
user.visible_message(span_warning("[user] sounds the alarm!"))
switch(user.job)
if("Bog Guard", "Bog Master")
if("Warden")
playsound(src, 'modular_hearthstone/sound/items/bogguardhorn.ogg', 100, TRUE)
if("Town Sheriff", "Watchman")
playsound(src, 'modular_hearthstone/sound/items/watchhorn.ogg', 100, TRUE)
Expand Down Expand Up @@ -55,30 +55,60 @@
if(SOUTHEAST)
dirtext += "southeast"
else //Where ARE you.
dirtext = ", although I cannot make out a direction"
dirtext = "although I cannot make out an exact direction"

var/disttext
switch(distance)
if(0 to 20)
disttext = " very close"
disttext = " within 20 paces"
if(20 to 40)
disttext = " close"
disttext = " 20 to 40 paces away"
if(40 to 80)
disttext = ""
disttext = " 40 to 80 paces away"
if(80 to 160)
disttext = " far"
else
disttext = " very far"
disttext = " very far"

var/placetext
var/area/localarea = get_area_name(src)
switch(localarea)
if("mountains")
placetext = " In the Mountains!"
if("mt decapitation")
placetext = " from Mt Decapitation!"
if("azure basin")
placetext = " in the The Azure Basin!"
if("wilderness")
placetext = " in the The Azure Grove!"
if("bog", "dense bog")
placetext = " in the The Terrorbog!"
if("coast", "coastforest")
placetext = " on the Azure Coast!"
if("indoors", "Shop", "Physician", "outdoors", "roofs")
placetext = " somewhere in town!"
if("Manor", "Wizard's Tower")
placetext = " from the Keep!"
if("Garrison", "dungeon cell")
placetext = " from the Garrison!"
if("Baths", "tavern")
placetext = " from the Inn!"
if("church")
placetext = " from the Church!"
else
placetext = " I cannot discern where it came from exactly!"

//sound played for other players
switch(user.job)
if("Bog Guard", "Bog Master")
if("Warden")
player.playsound_local(get_turf(player), 'modular_hearthstone/sound/items/bogguardhorn.ogg', 35, FALSE, pressure_affected = FALSE)
to_chat(player, span_warning("I hear the horn of the Bog Garrison somewhere[disttext][dirtext]!"))
if("Town Sheriff", "Watchman")
to_chat(player, span_warning("I hear the horn of the Wardens somewhere[disttext],[dirtext],[placetext]"))
if("Marshall", "Watchman")
player.playsound_local(get_turf(player), 'modular_hearthstone/sound/items/watchhorn.ogg', 35, FALSE, pressure_affected = FALSE)
to_chat(player, span_warning("I hear the horn of the Watch somewhere[disttext][dirtext]!"))
to_chat(player, span_warning("I hear the horn of the Watch somewhere[disttext],[dirtext],[placetext]"))
if("Man at Arms", "Royal Guard")
player.playsound_local(get_turf(player), 'modular_hearthstone/sound/items/rghorn.ogg', 35, FALSE, pressure_affected = FALSE)
to_chat(player, span_warning("I hear the horn of the Royal Guard somewhere[disttext][dirtext]!"))
to_chat(player, span_warning("I hear the horn of the Royal Guard somewhere[disttext],[dirtext],[placetext]"))
else
player.playsound_local(get_turf(player), 'modular_hearthstone/sound/items/signalhorn.ogg', 35, FALSE, pressure_affected = FALSE)
to_chat(player, span_warning("I hear the signal horn somewhere[disttext][dirtext]!"))
to_chat(player, span_warning("I hear the signal horn somewhere[disttext], [dirtext],[placetext]"))
Loading