Files
VOREStation/code/game/objects/items/devices/whistle.dm
T
Cameron Lennox d5849910e5 Begin clickcode attack_self fix (#18797)
* Begin clickcode attack_self fix

Begins the work to make everything call back to parent for attack_self so that signals are sacred.

* Makes MORE things call the attack_self() parent

Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'.

* Finishes making the rest of attack_self call parent.

As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items.

* begone foul demon

* some more cleanup

* These

* GOD this was annoying

* yeh

* Fix this

* fLARES

* Thesee too

* toys!

* Even more!

* More fixes

* Even more

* rest of em

* these too

* Update syndie.dm

* hardref clear

* Update code/game/gamemodes/nuclear/pinpointer.dm

* Update code/game/objects/effects/mines.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/contraband_vr.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/weapons/gift_wrappaper.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* these too

* Update maintpanel_stack.dm

* angry warning

* Fixes packaged snacks.

Fixes improper var default.

* Special handling for these

* proper poly types

* Fixes magclaws

Makes the 'features' it had just part  of base magboots that can be adjusted via varswap.

* Fixes jackets

Fixes https://github.com/VOREStation/VOREStation/issues/18941

* Small bugfix

Makes p_Theyre properly capitialize
Makes examine show proper wording

* Update gift_wrappaper.dm
2025-12-29 13:21:10 -05:00

64 lines
2.2 KiB
Plaintext

/obj/item/hailer
name = "hailer"
desc = "Used by obese officers to save their breath for running."
icon = 'icons/obj/device.dmi'
icon_state = "voice0"
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
w_class = ITEMSIZE_TINY
slot_flags = SLOT_EARS
var/use_message = "Halt! Security!"
var/spamcheck = 0
var/insults
pickup_sound = 'sound/items/pickup/device.ogg'
drop_sound = 'sound/items/drop/device.ogg'
/obj/item/hailer/verb/set_message()
set name = "Set Hailer Message"
set category = "Object"
set desc = "Alter the message shouted by your hailer."
if(!isnull(insults))
to_chat(usr, "The hailer is fried. The tiny input screen just shows a waving ASCII penis.")
return
var/new_message = tgui_input_text(usr, "Please enter new message (leave blank to reset).", max_length = MAX_MESSAGE_LEN)
if(!new_message || new_message == "")
use_message = "Halt! Security!"
else
use_message = capitalize(new_message)
to_chat(usr, "You configure the hailer to shout \"[use_message]\".")
/obj/item/hailer/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
if (spamcheck)
return
if(isnull(insults))
playsound(src, 'sound/voice/halt.ogg', 100, 1, vary = 0)
user.audible_message(span_warning("[user]'s [name] rasps, \"[use_message]\""), span_warning("\The [user] holds up \the [name]."), runemessage = "\[TTS Voice\] [use_message]")
else
if(insults > 0)
playsound(src, 'sound/voice/binsult.ogg', 100, 1, vary = 0)
// Yes, it used to show the transcription of the sound clip. That was a) inaccurate b) immature as shit.
user.audible_message(span_warning("[user]'s [name] gurgles something indecipherable and deeply offensive."), span_warning("\The [user] holds up \the [name]."), runemessage = "\[TTS Voice\] #&@&^%(*")
insults--
else
to_chat(user, span_danger("*BZZZZZZZZT*"))
spamcheck = 1
spawn(20)
spamcheck = 0
/obj/item/hailer/emag_act(var/remaining_charges, var/mob/user)
if(isnull(insults))
to_chat(user, span_danger("You overload \the [src]'s voice synthesizer."))
insults = rand(1, 3)//to prevent dickflooding
return 1
else
to_chat(user, "The hailer is fried. You can't even fit the sequencer into the input slot.")