diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index dad6165400f..dcb4501ce6e 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -287,3 +287,6 @@ #define SHELTER_DEPLOY_BAD_TURFS "bad turfs" #define SHELTER_DEPLOY_BAD_AREA "bad area" #define SHELTER_DEPLOY_ANCHORED_OBJECTS "anchored objects" + +// The cooldown on OOC messages such as OOC, LOOC, praying and adminhelps +#define OOC_COOLDOWN 5 diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 0dd6c109170..7f4b0574450 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -179,7 +179,7 @@ if(has_gravity(src)) return 1 - if(pulledby) + if(pulledby && !pulledby.pulling) return 1 if(locate(/obj/structure/lattice) in range(1, get_turf(src))) //Not realistic but makes pushing things in space easier diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index f7e78ffad2e..1d8d9a1e22e 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -981,7 +981,7 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob, pa /obj/machinery/newscaster/proc/newsAlert(var/news_call) //This isn't Agouri's work, for it is ugly and vile. if(news_call) - atom_say("Breaking news from [news_call]!") + atom_say("[news_call]!") src.alert = 1 src.update_icon() spawn(300) diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm index 6399a11c291..5714f5e4310 100644 --- a/code/game/objects/items/weapons/dice.dm +++ b/code/game/objects/items/weapons/dice.dm @@ -147,6 +147,7 @@ triggered = 1 visible_message("You hear a quiet click.") spawn(40) + var/cap = 0 if(result > MAX_EX_LIGHT_RANGE && result != 20) cap = 1 @@ -156,6 +157,13 @@ var/turf/epicenter = get_turf(src) explosion(epicenter, round(result*0.25), round(result*0.5), round(result), round(result*1.5), 1, cap) + var/turf/bombturf = get_turf(src) + var/area/A = get_area(bombturf) + bombers += "E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]" + message_admins("E20 detonated at [A.name] (JMP) with a roll of [result]. Triggered by: [key_name_admin(user)]") + log_game("E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]") + + /obj/item/weapon/dice/update_icon() overlays.Cut() overlays += "[src.icon_state][src.result]" diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 2c896f3dbdf..f209e652b38 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -32,7 +32,7 @@ var/global/admin_ooc_colour = "#b82e00" if(prefs.muted & MUTE_OOC) to_chat(src, "You cannot use OOC (muted).") return - if(handle_spam_prevention(msg, MUTE_OOC)) + if(handle_spam_prevention(msg, MUTE_OOC, OOC_COOLDOWN)) return if(findtext(msg, "byond://")) to_chat(src, "Advertising other servers is not allowed.") @@ -168,7 +168,7 @@ var/global/admin_ooc_colour = "#b82e00" if(prefs.muted & MUTE_OOC) to_chat(src, "You cannot use LOOC (muted).") return - if(handle_spam_prevention(msg,MUTE_OOC)) + if(handle_spam_prevention(msg, MUTE_OOC, OOC_COOLDOWN)) return if(findtext(msg, "byond://")) to_chat(src, "Advertising other servers is not allowed.") diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index d78ef5dcde3..c17671995ff 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -24,7 +24,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," if(!msg) return - if(src.handle_spam_prevention(msg,MUTE_ADMINHELP)) + if(handle_spam_prevention(msg, MUTE_ADMINHELP, OOC_COOLDOWN)) return msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN)) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index d711a3f5910..63241ce43c5 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -99,7 +99,7 @@ adminhelp(msg) //admin we are replying to has vanished, adminhelp instead return - if(src.handle_spam_prevention(msg,MUTE_ADMINHELP)) + if(handle_spam_prevention(msg, MUTE_ADMINHELP, OOC_COOLDOWN)) return //clean the message if it's not sent by a high-rank admin diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 03365b38385..486b95f5a1b 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -9,7 +9,7 @@ if(usr.client.prefs.muted & MUTE_PRAY) to_chat(usr, "\red You cannot pray (muted).") return - if(src.client.handle_spam_prevention(msg,MUTE_PRAY)) + if(client.handle_spam_prevention(msg, MUTE_PRAY, OOC_COOLDOWN)) return var/image/cross = image('icons/obj/storage.dmi',"bible") diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index c1cbd07daee..8f2adef5a1b 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -4,8 +4,9 @@ //////////////// var/datum/admins/holder = null - var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming. - var/last_message_count = 0 //contins a number of how many times a message identical to last_message was sent. + var/last_message = "" //contains the last message sent by this client - used to protect against copy-paste spamming. + var/last_message_count = 0 //contains a number of how many times a message identical to last_message was sent. + var/last_message_time = 0 //holds the last time (based on world.time) a message was sent ///////// //OTHER// diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 7a668e375fc..17c454bb7e2 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -233,19 +233,25 @@ return 0 return 1 -/client/proc/handle_spam_prevention(var/message, var/mute_type) - if(config.automute_on && !holder && src.last_message == message) - src.last_message_count++ - if(src.last_message_count >= SPAM_TRIGGER_AUTOMUTE) - to_chat(src, "\red You have exceeded the spam filter limit for identical messages. An auto-mute was applied.") - cmd_admin_mute(src.mob, mute_type, 1) +/client/proc/handle_spam_prevention(var/message, var/mute_type, var/throttle = 0) + if(throttle) + if((last_message_time + throttle > world.time) && !check_rights(R_ADMIN, 0)) + var/wait_time = round(((last_message_time + throttle) - world.time) / 10, 1) + to_chat(src, "You are sending messages to quickly. Please wait [wait_time] [wait_time == 1 ? "second" : "seconds"] before sending another message.") + return 1 + last_message_time = world.time + if(config.automute_on && !check_rights(R_ADMIN, 0) && last_message == message) + last_message_count++ + if(last_message_count >= SPAM_TRIGGER_AUTOMUTE) + to_chat(src, "You have exceeded the spam filter limit for identical messages. An auto-mute was applied.") + cmd_admin_mute(mob, mute_type, 1) return 1 - if(src.last_message_count >= SPAM_TRIGGER_WARNING) - to_chat(src, "\red You are nearing the spam filter limit for identical messages.") + if(last_message_count >= SPAM_TRIGGER_WARNING) + to_chat(src, "You are nearing the spam filter limit for identical messages.") return 0 else last_message = message - src.last_message_count = 0 + last_message_count = 0 return 0 //This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc. diff --git a/code/modules/projectiles/guns/projectile/saw.dm b/code/modules/projectiles/guns/projectile/saw.dm index 097f5fb4a58..d36ad1dd2c6 100644 --- a/code/modules/projectiles/guns/projectile/saw.dm +++ b/code/modules/projectiles/guns/projectile/saw.dm @@ -1,6 +1,6 @@ /obj/item/weapon/gun/projectile/automatic/l6_saw name = "\improper L6 SAW" - desc = "A heavily modified 7.62 light machine gun, designated 'L6 SAW'. Has 'Aussec Armoury - 2531' engraved on the reciever below the designation." + desc = "A heavily modified 5.56 light machine gun, designated 'L6 SAW'. Has 'Aussec Armoury - 2531' engraved on the reciever below the designation." icon_state = "l6closed100" item_state = "l6closedmag" w_class = 5 diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 2a36ba585df..1e56d9d6d57 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -300,7 +300,7 @@ /obj/machinery/conveyor_switch/multitool_menu(var/mob/user, var/obj/item/device/multitool/P) return {" "} diff --git a/html/changelog.html b/html/changelog.html index 5582979afc5..e97bc64d845 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -55,6 +55,20 @@ -->
+

23 November 2016

+

Fethas updated:

+ +

FlattestNerd updated:

+ +

Fox McCloud updated:

+ +

22 November 2016

KasparoVy updated: