mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
#define COMMUNICATION_COOLDOWN 600
|
|
#define COMMUNICATION_COOLDOWN_AI 600
|
|
|
|
SUBSYSTEM_DEF(communications)
|
|
name = "Communications"
|
|
flags = SS_NO_INIT | SS_NO_FIRE
|
|
|
|
var/silicon_message_cooldown
|
|
var/nonsilicon_message_cooldown
|
|
|
|
/datum/controller/subsystem/communications/proc/can_announce(mob/living/user, is_silicon)
|
|
if(is_silicon && silicon_message_cooldown > world.time)
|
|
. = FALSE
|
|
else if(!is_silicon && nonsilicon_message_cooldown > world.time)
|
|
. = FALSE
|
|
else
|
|
. = TRUE
|
|
|
|
/datum/controller/subsystem/communications/proc/make_announcement(mob/living/user, is_silicon, input)
|
|
if(!can_announce(user, is_silicon))
|
|
return FALSE
|
|
if(is_silicon)
|
|
minor_announce(html_decode(input),"[user.name] Announces:")
|
|
silicon_message_cooldown = world.time + COMMUNICATION_COOLDOWN_AI
|
|
else
|
|
priority_announce(html_decode(input), null, 'sound/misc/announce.ogg', "Captain")
|
|
nonsilicon_message_cooldown = world.time + COMMUNICATION_COOLDOWN
|
|
log_say("[key_name(user)] has made a priority announcement: [input]")
|
|
message_admins("[key_name_admin(user)] has made a priority announcement.")
|
|
|
|
#undef COMMUNICATION_COOLDOWN
|
|
#undef COMMUNICATION_COOLDOWN_AI
|