Files
Bubberstation/code/game/objects/items/devices/megaphone.dm
SkyratBot 2595f10911 [MIRROR] Fixes some issues with sign language & makes some things more clear (#783)
* Fixes some issues with sign language & makes some things more clear (#53610)

Changes the name of the recipe for the gloves to make them more clear
Adds a note in the tongue file to make sure it's clear you SHOULDN'T SEE THAT TONGUE.
Adds a unique chat message for mimes who use sign language, to make it clearer you can't cheese as a mime
Adds a unique slurring verb for drunkards
Removes the ability for sign languagers to use megaphones, which I forgot existed in the game. 
Punctuation removal now replaces all punctuation used with periods rather than with blank space, to reduce run-on sentences.

* Fixes some issues with sign language & makes some things more clear

Co-authored-by: Wallemations <66052067+Wallemations@users.noreply.github.com>
2020-09-13 04:39:19 +02:00

68 lines
2.3 KiB
Plaintext

/obj/item/megaphone
name = "megaphone"
desc = "A device used to project your voice. Loudly."
icon = 'icons/obj/device.dmi'
icon_state = "megaphone"
inhand_icon_state = "megaphone"
lefthand_file = 'icons/mob/inhands/misc/megaphone_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/megaphone_righthand.dmi'
w_class = WEIGHT_CLASS_SMALL
siemens_coefficient = 1
var/spamcheck = 0
var/list/voicespan = list(SPAN_COMMAND)
/obj/item/megaphone/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] is uttering [user.p_their()] last words into \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
spamcheck = 0//so they dont have to worry about recharging
user.say("AAAAAAAAAAAARGHHHHH", forced="megaphone suicide")//he must have died while coding this
return OXYLOSS
/obj/item/megaphone/equipped(mob/M, slot)
. = ..()
if (slot == ITEM_SLOT_HANDS && !HAS_TRAIT(M, TRAIT_SIGN_LANG))
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
else
UnregisterSignal(M, COMSIG_MOB_SAY)
/obj/item/megaphone/dropped(mob/M)
. = ..()
UnregisterSignal(M, COMSIG_MOB_SAY)
/obj/item/megaphone/proc/handle_speech(mob/living/carbon/user, list/speech_args)
if (user.get_active_held_item() == src)
if(spamcheck > world.time)
to_chat(user, "<span class='warning'>\The [src] needs to recharge!</span>")
else
playsound(loc, 'sound/items/megaphone.ogg', 100, FALSE, TRUE)
spamcheck = world.time + 50
speech_args[SPEECH_SPANS] |= voicespan
/obj/item/megaphone/emag_act(mob/user)
if(obj_flags & EMAGGED)
return
to_chat(user, "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>")
obj_flags |= EMAGGED
voicespan = list(SPAN_REALLYBIG, "userdanger")
/obj/item/megaphone/sec
name = "security megaphone"
icon_state = "megaphone-sec"
inhand_icon_state = "megaphone-sec"
/obj/item/megaphone/command
name = "command megaphone"
icon_state = "megaphone-command"
inhand_icon_state = "megaphone-command"
/obj/item/megaphone/cargo
name = "supply megaphone"
icon_state = "megaphone-cargo"
inhand_icon_state = "megaphone-cargo"
/obj/item/megaphone/clown
name = "clown's megaphone"
desc = "Something that should not exist."
icon_state = "megaphone-clown"
inhand_icon_state = "megaphone-clown"
voicespan = list(SPAN_CLOWN)