From c5e09c30d64061b0896a191ce826c9defd30da34 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Thu, 27 Aug 2015 19:56:18 +0200 Subject: [PATCH 1/2] Alters the round duration format, increases Stat inactivity timeout. Round duration now has a similar format to round time. Stat inactivity timeout is now 10 minutes instead of 1 minute. --- code/__HELPERS/time.dm | 9 ++++++--- code/modules/mob/mob.dm | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index d111ebb8fc..6411806a35 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -36,9 +36,12 @@ proc/round_duration() var/mills = world.time // 1/10 of a second, not real milliseconds but whatever //var/secs = ((mills % 36000) % 600) / 10 //Not really needed, but I'll leave it here for refrence.. or something - var/mins = (mills % 36000) / 600 - var/hours = mills / 36000 + var/mins = round((mills % 36000) / 600) + var/hours = round(mills / 36000) - last_round_duration = "[round(hours)]h [round(mins)]m" + mins = mins < 10 ? add_zero(mins, 1) : mins + hours = hours < 10 ? add_zero(hours, 1) : hours + + last_round_duration = "[hours]:[mins]" next_duration_update = world.time + 1 MINUTES return last_round_duration diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 93ffec00cc..2cf562b20c 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -635,7 +635,7 @@ /mob/Stat() ..() - . = (client && client.inactivity < 1200) + . = (is_client_active(10 MINUTES)) if(.) if(statpanel("Status") && ticker && ticker.current_state != GAME_STATE_PREGAME) From d5b618adace1e9ab699c2a3488dccbee100aee82 Mon Sep 17 00:00:00 2001 From: Daranz Date: Fri, 28 Aug 2015 17:33:52 +0200 Subject: [PATCH 2/2] Fix Say ":i" working with intercoms, re-add restraint check for Say ":i" See also commits: e9d9ff57ba74386cfc0560997ca7d3e8416c2b6e bbc8ad6383f7c37959a163e9aa0e81f9c7905a5d b9dbeeb3562e46dc2914bf039ad47035bc8b1112 --- code/modules/mob/living/carbon/human/say.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index bbf1844c45..1fd82ed230 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -165,10 +165,11 @@ /mob/living/carbon/human/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name) switch(message_mode) if("intercom") - for(var/obj/item/device/radio/intercom/I in view(1)) - I.talk_into(src, message, verb, speaking) - I.add_fingerprint(src) - used_radios += I + if(!src.restrained()) + for(var/obj/item/device/radio/intercom/I in view(1)) + I.talk_into(src, message, null, verb, speaking) + I.add_fingerprint(src) + used_radios += I if("headset") if(l_ear && istype(l_ear,/obj/item/device/radio)) var/obj/item/device/radio/R = l_ear