mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
Custom items 26/05 (#8958)
* Custom items 26/05 * tweaks this. * Update code/modules/customitems/item_defines.dm Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it> * Update code/game/objects/items/devices/megaphone.dm Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it> * matt's suggestion. * Fixes travis Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
var/emagged = 0
|
||||
var/insults = 0
|
||||
var/list/insultmsg = list("FUCK EVERYONE!", "I'M A TATER!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "FOR THE SYNDICATE!")
|
||||
var/activation_sound = 'sound/items/megaphone.ogg'
|
||||
var/needs_user_location = TRUE
|
||||
|
||||
/obj/item/device/megaphone/attack_self(mob/living/user as mob)
|
||||
if (user.client)
|
||||
@@ -29,19 +31,20 @@
|
||||
if(!message)
|
||||
return
|
||||
message = capitalize(message)
|
||||
if ((src.loc == user && usr.stat == 0))
|
||||
if ((user.stat == CONSCIOUS))
|
||||
if(needs_user_location)
|
||||
if(!src.loc == user)
|
||||
return
|
||||
if(emagged)
|
||||
if(insults)
|
||||
for(var/mob/O in (viewers(user)))
|
||||
O.show_message("<B>[user]</B> broadcasts, <FONT size=3>\"[pick(insultmsg)]\"</FONT>",2) // 2 stands for hearable message
|
||||
user.visible_message("<B>[user]</B> broadcasts, <FONT size=3>\"[pick(insultmsg)]\"</FONT>")
|
||||
insults--
|
||||
else
|
||||
to_chat(user, "<span class='warning'>*BZZZZzzzzzt*</span>")
|
||||
else
|
||||
for(var/mob/O in (viewers(user)))
|
||||
O.show_message("<B>[user]</B> broadcasts, <FONT size=3>\"[message]\"</FONT>",2) // 2 stands for hearable message
|
||||
|
||||
playsound(loc, 'sound/items/megaphone.ogg', 100, 0, 1)
|
||||
user.visible_message("<B>[user]</B> broadcasts, <FONT size=3>\"[message]\"</FONT>")
|
||||
if(activation_sound)
|
||||
playsound(loc, activation_sound, 100, 0, 1)
|
||||
spamcheck = 1
|
||||
spawn(20)
|
||||
spamcheck = 0
|
||||
|
||||
Reference in New Issue
Block a user