mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Fix can_speak check in megaphone
The original check actually made no sense, but worked because it returned false every time as there was never a message passed through
This commit is contained in:
@@ -17,12 +17,11 @@
|
||||
if(user.client.prefs.muted & MUTE_IC)
|
||||
src << "<span class='warning'>You cannot speak in IC (muted).</span>"
|
||||
return
|
||||
|
||||
if(!ishuman(user))
|
||||
user << "<span class='warning'>You don't know how to use this!</span>"
|
||||
return
|
||||
if(user.can_speak())
|
||||
user << "<span class='warning'>You find yourself unable to speak at all.</span>"
|
||||
return
|
||||
|
||||
if(spamcheck > world.time)
|
||||
user << "<span class='warning'>\The [src] needs to recharge!</span>"
|
||||
return
|
||||
@@ -30,7 +29,12 @@
|
||||
var/message = copytext(sanitize(input(user, "Shout a message?", "Megaphone", null) as text),1,MAX_MESSAGE_LEN)
|
||||
if(!message)
|
||||
return
|
||||
|
||||
message = capitalize(message)
|
||||
if(!user.can_speak(message))
|
||||
user << "<span class='warning'>You find yourself unable to speak at all.</span>"
|
||||
return
|
||||
|
||||
if ((src.loc == user && user.stat == 0))
|
||||
if(emagged)
|
||||
if(insults)
|
||||
@@ -60,4 +64,4 @@
|
||||
|
||||
/obj/item/device/megaphone/cargo
|
||||
name = "supply megaphone"
|
||||
icon_state = "megaphone-cargo"
|
||||
icon_state = "megaphone-cargo"
|
||||
|
||||
Reference in New Issue
Block a user