diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql
index 34d3fef31be..ac212377724 100644
--- a/SQL/paradise_schema.sql
+++ b/SQL/paradise_schema.sql
@@ -265,6 +265,7 @@ CREATE TABLE `player` (
`ghost_anonsay` tinyint(1) NOT NULL DEFAULT '0',
`exp` mediumtext,
`clientfps` smallint(4) DEFAULT '0',
+ `atklog` smallint(4) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `ckey` (`ckey`)
) ENGINE=InnoDB AUTO_INCREMENT=32446 DEFAULT CHARSET=latin1;
diff --git a/SQL/paradise_schema_prefixed.sql b/SQL/paradise_schema_prefixed.sql
index afc730af8c9..15dccc0a805 100644
--- a/SQL/paradise_schema_prefixed.sql
+++ b/SQL/paradise_schema_prefixed.sql
@@ -264,6 +264,7 @@ CREATE TABLE `SS13_player` (
`ghost_anonsay` tinyint(1) NOT NULL DEFAULT '0',
`exp` mediumtext,
`clientfps` smallint(4) DEFAULT '0',
+ `atklog` smallint(4) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `ckey` (`ckey`)
) ENGINE=InnoDB AUTO_INCREMENT=32446 DEFAULT CHARSET=latin1;
diff --git a/SQL/updates/3-4.sql b/SQL/updates/3-4.sql
new file mode 100644
index 00000000000..25b6f9007cd
--- /dev/null
+++ b/SQL/updates/3-4.sql
@@ -0,0 +1,4 @@
+#Updating the SQL from version 3 to version 4. -Kyep
+#Adding new column to contain the atklog value.
+ALTER TABLE `player`
+ ADD `atklog` smallint(4) DEFAULT '0' AFTER `clientfps`;
\ No newline at end of file
diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm
index b59b2a94182..f465317db9c 100644
--- a/code/__DEFINES/preferences.dm
+++ b/code/__DEFINES/preferences.dm
@@ -15,7 +15,6 @@
#define CHAT_GHOSTSIGHT 8
#define CHAT_PRAYER 16
#define CHAT_RADIO 32
-#define CHAT_ATTACKLOGS 64
#define CHAT_DEBUGLOGS 128
#define CHAT_LOOC 256
#define CHAT_GHOSTRADIO 512
@@ -27,7 +26,14 @@
#define DONATOR_PUBLIC 32768
#define CHAT_NO_TICKETLOGS 65536
-#define TOGGLES_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS|CHAT_LOOC|MEMBER_PUBLIC|DONATOR_PUBLIC)
+#define TOGGLES_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_LOOC|MEMBER_PUBLIC|DONATOR_PUBLIC)
+
+// Admin attack logs filter system, see /proc/add_attack_logs and /proc/msg_admin_attack
+#define ATKLOG_ALL 0
+#define ATKLOG_ALMOSTALL 1
+#define ATKLOG_MOST 2
+#define ATKLOG_FEW 3
+#define ATKLOG_NONE 4
// Playtime tracking system, see jobs_exp.dm
#define EXP_TYPE_LIVING "Living"
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index a8a6307e70c..95afa6244d3 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -248,11 +248,11 @@ Proc for attack log creation, because really why not
This is always put in the attack log.
*/
-/proc/add_attack_logs(mob/user, mob/target, what_done, admin_notify = TRUE)
+/proc/add_attack_logs(mob/user, mob/target, what_done, custom_level)
if(islist(target)) // Multi-victim adding
var/list/targets = target
for(var/mob/M in targets)
- add_attack_logs(user, M, what_done, admin_notify)
+ add_attack_logs(user, M, what_done, custom_level)
return
var/user_str = key_name_log(user)
@@ -263,8 +263,20 @@ This is always put in the attack log.
if(istype(target))
target.create_attack_log("Attacked by [user_str]: [what_done]")
log_attack(user_str, target_str, what_done)
- if(admin_notify)
- msg_admin_attack("[key_name_admin(user)] vs [key_name_admin(target)]: [what_done]")
+
+ var/loglevel = ATKLOG_MOST
+
+ if(custom_level)
+ loglevel = custom_level
+ else if(istype(target))
+ if(isLivingSSD(target)) // Attacks on SSDs are shown to admins with any log level except ATKLOG_NONE
+ loglevel = ATKLOG_FEW
+ else if(!user.ckey && !target.ckey) // Attacks between NPCs are only shown to admins with ATKLOG_ALL
+ loglevel = ATKLOG_ALL
+ else if(!target.ckey) // Attacks by players on NPCs are only shown to admins with ATKLOG_ALL or ATKLOG_ALMOSTALL
+ loglevel = ATKLOG_ALMOSTALL
+
+ msg_admin_attack("[key_name_admin(user)] vs [key_name_admin(target)]: [what_done]", loglevel)
/proc/do_mob(var/mob/user, var/mob/target, var/time = 30, var/uninterruptible = 0, progress = 1, datum/callback/extra_checks = null)
if(!user || !target)
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index bf01bca6e3c..ddd6e14a5b0 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -65,7 +65,8 @@
user.do_attack_animation(M)
M.attacked_by(src, user, def_zone)
- add_attack_logs(user, M, "Attacked with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])", admin_notify = (force > 0 && damtype != STAMINA))
+ add_attack_logs(user, M, "Attacked with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])", (M.ckey && force > 0 && damtype != STAMINA) ? null : ATKLOG_ALMOSTALL)
+
add_fingerprint(user)
diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm
index ae9b8e3945a..14ba6fb9dd0 100644
--- a/code/game/gamemodes/vampire/vampire.dm
+++ b/code/game/gamemodes/vampire/vampire.dm
@@ -279,7 +279,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
to_chat(owner, "[owner.wear_mask] prevents you from biting [H]!")
draining = null
return
- add_attack_logs(owner, H, "vampirebit & is draining their blood.", FALSE)
+ add_attack_logs(owner, H, "vampirebit & is draining their blood.", ATKLOG_ALMOSTALL)
owner.visible_message("[owner] grabs [H]'s neck harshly and sinks in [owner.p_their()] fangs!", "You sink your fangs into [H] and begin to drain [owner.p_their()] blood.", "You hear a soft puncture and a wet sucking noise.")
if(!iscarbon(owner))
H.LAssailant = null
diff --git a/code/game/machinery/poolcontroller.dm b/code/game/machinery/poolcontroller.dm
index 6c10129c6ea..de5552e6a75 100644
--- a/code/game/machinery/poolcontroller.dm
+++ b/code/game/machinery/poolcontroller.dm
@@ -100,7 +100,7 @@
if(drownee.losebreath > 20) //You've probably got bigger problems than drowning at this point, so we won't add to it until you get that under control.
return
- add_attack_logs(src, drownee, "Drowned", isLivingSSD(drownee))
+ add_attack_logs(src, drownee, "Drowned", isLivingSSD(drownee) ? null : ATKLOG_ALL)
if(drownee.stat) //Mob is in critical.
drownee.AdjustLoseBreath(3, bound_lower = 0, bound_upper = 20)
drownee.visible_message("\The [drownee] appears to be drowning!","You're quickly drowning!") //inform them that they are fucked.
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index c640d5d5554..247a40a3425 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -230,7 +230,7 @@
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
if(payload && !istype(payload, /obj/item/bombcore/training))
- msg_admin_attack("[key_name_admin(user)] has primed a [name] ([payload]) for detonation at [A.name] (JMP).")
+ msg_admin_attack("[key_name_admin(user)] has primed a [name] ([payload]) for detonation at [A.name] (JMP).", ATKLOG_FEW)
log_game("[key_name(user)] has primed a [name] ([payload]) for detonation at [A.name] [COORD(bombturf)]")
investigate_log("[key_name(user)] has has primed a [name] ([payload]) for detonation at [A.name] [COORD(bombturf)]", INVESTIGATE_BOMB)
payload.adminlog = "\The [src] that [key_name(user)] had primed detonated!"
diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm
index 385067e0611..1df0166260e 100644
--- a/code/game/objects/effects/effect_system/effects_smoke.dm
+++ b/code/game/objects/effects/effect_system/effects_smoke.dm
@@ -263,13 +263,13 @@
var/more = ""
if(M)
more = " "
- msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
+ msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", ATKLOG_FEW)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
else
- msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
+ msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", ATKLOG_FEW)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
else
- msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key. CODERS: carry.my_atom may be null.", 0, 1)
+ msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key. CODERS: carry.my_atom may be null.", ATKLOG_FEW)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key. CODERS: carry.my_atom may be null.")
/datum/effect_system/smoke_spread/chem/start(effect_range = 2)
diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm
index 291f0fd7b2a..737abd10bb1 100644
--- a/code/game/objects/items/devices/aicard.dm
+++ b/code/game/objects/items/devices/aicard.dm
@@ -83,7 +83,7 @@
if(href_list["wipe"])
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
if(confirm == "Yes" && (CanUseTopic(user, state) == STATUS_INTERACTIVE))
- msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].")
+ msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].", ATKLOG_FEW)
add_attack_logs(user, AI, "Wiped with [src].")
flush = 1
AI.suiciding = 1
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index 84bad81c015..dbd7701ce93 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -64,7 +64,7 @@
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
investigate_log("[key_name(user)] attached a [A] to a transfer valve.", INVESTIGATE_BOMB)
- msg_admin_attack("[key_name_admin(user)]attached [A] to a transfer valve.")
+ msg_admin_attack("[key_name_admin(user)]attached [A] to a transfer valve.", ATKLOG_FEW)
log_game("[key_name_admin(user)] attached [A] to a transfer valve.")
attacher = user
SSnanoui.update_uis(src) // update all UIs attached to src
diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm
index d120fb4e1cd..3a8bf12b143 100644
--- a/code/game/objects/items/weapons/dna_injector.dm
+++ b/code/game/objects/items/weapons/dna_injector.dm
@@ -142,7 +142,7 @@
else
to_chat(user, "You inject yourself with [src].")
- add_attack_logs(user, M, attack_log, FALSE)
+ add_attack_logs(user, M, attack_log, ATKLOG_ALL)
if(!iscarbon(user))
M.LAssailant = null
else
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index b155ddc13dd..051f450179b 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -9,15 +9,17 @@ var/global/nologevent = 0
if(C.prefs && !(C.prefs.toggles & CHAT_NO_ADMINLOGS))
to_chat(C, msg)
-/proc/msg_admin_attack(var/text) //Toggleable Attack Messages
+/proc/msg_admin_attack(var/text, var/loglevel)
if(!nologevent)
var/rendered = "ATTACK: [text]"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
- if(C.prefs.toggles & CHAT_ATTACKLOGS)
- if(!istype(C, /mob/living))
- var/msg = rendered
- to_chat(C, msg)
+ if(C.prefs.atklog == ATKLOG_NONE)
+ continue
+ var/msg = rendered
+ if(C.prefs.atklog <= loglevel)
+ to_chat(C, msg)
+
/proc/message_adminTicket(var/msg)
msg = "ADMIN TICKET: [msg]"
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index c162a59fb82..91c237a0328 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -902,12 +902,27 @@ var/list/admin_verbs_ticket = list(
if(!check_rights(R_ADMIN))
return
- prefs.toggles ^= CHAT_ATTACKLOGS
- prefs.save_preferences(src)
- if(prefs.toggles & CHAT_ATTACKLOGS)
- to_chat(usr, "You now will get attack log messages")
+ if(prefs.atklog == ATKLOG_ALL)
+ prefs.atklog = ATKLOG_ALMOSTALL
+ to_chat(usr, "Your attack logs preference is now: show ALMOST ALL attack logs (notable exceptions: NPCs attacking other NPCs, vampire bites, equipping/stripping, people pushing each other over)")
+ else if(prefs.atklog == ATKLOG_ALMOSTALL)
+ prefs.atklog = ATKLOG_MOST
+ to_chat(usr, "Your attack logs preference is now: show MOST attack logs (like ALMOST ALL, except that it also hides attacks by players on NPCs)")
+ else if(prefs.atklog == ATKLOG_MOST)
+ prefs.atklog = ATKLOG_FEW
+ to_chat(usr, "Your attack logs preference is now: show FEW attack logs (only the most important stuff: attacks on SSDs, use of explosives, messing with the engine, gibbing, AI wiping, forcefeeding, acid sprays, and organ extraction)")
+ else if(prefs.atklog == ATKLOG_FEW)
+ prefs.atklog = ATKLOG_NONE
+ to_chat(usr, "Your attack logs preference is now: show NO attack logs")
+ else if(prefs.atklog == ATKLOG_NONE)
+ prefs.atklog = ATKLOG_ALL
+ to_chat(usr, "Your attack logs preference is now: show ALL attack logs")
else
- to_chat(usr, "You now won't get attack log messages")
+ prefs.atklog = ATKLOG_ALL
+ to_chat(usr, "Your attack logs preference is now: show ALL attack logs (your preference was set to an invalid value, it has been reset)")
+
+ prefs.save_preferences(src)
+
/client/proc/toggleadminlogs()
set name = "Toggle Admin Log Messages"
diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm
index e92330754f2..763152cc5cf 100644
--- a/code/modules/assembly/bomb.dm
+++ b/code/modules/assembly/bomb.dm
@@ -46,7 +46,7 @@
if(!status)
status = 1
investigate_log("[key_name(user)] welded a single tank bomb. Temperature: [bombtank.air_contents.temperature-T0C]", INVESTIGATE_BOMB)
- msg_admin_attack("[key_name_admin(user)] welded a single tank bomb. Temperature: [bombtank.air_contents.temperature-T0C]")
+ msg_admin_attack("[key_name_admin(user)] welded a single tank bomb. Temperature: [bombtank.air_contents.temperature-T0C]", ATKLOG_FEW)
log_game("[key_name(user)] welded a single tank bomb. Temperature: [bombtank.air_contents.temperature - T0C]")
to_chat(user, "A pressure hole has been bored to [bombtank] valve. \The [bombtank] can now be ignited.")
else
diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm
index 8fff84a4e69..db4f33ac121 100644
--- a/code/modules/client/preference/preferences.dm
+++ b/code/modules/client/preference/preferences.dm
@@ -90,6 +90,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
var/UI_style_alpha = 255
var/windowflashing = TRUE
var/clientfps = 0
+ var/atklog = ATKLOG_ALL
//ghostly preferences
var/ghost_anonsay = 0
diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm
index f2a9d739cfe..a175e39bc71 100644
--- a/code/modules/client/preference/preferences_mysql.dm
+++ b/code/modules/client/preference/preferences_mysql.dm
@@ -17,7 +17,8 @@
windowflashing,
ghost_anonsay,
exp,
- clientfps
+ clientfps,
+ atklog
FROM [format_table_name("player")]
WHERE ckey='[C.ckey]'"}
)
@@ -48,6 +49,7 @@
ghost_anonsay = text2num(query.item[15])
exp = query.item[16]
clientfps = text2num(query.item[17])
+ atklog = text2num(query.item[18])
//Sanitize
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
@@ -66,6 +68,7 @@
ghost_anonsay = sanitize_integer(ghost_anonsay, 0, 1, initial(ghost_anonsay))
exp = sanitize_text(exp, initial(exp))
clientfps = sanitize_integer(clientfps, 0, 1000, initial(clientfps))
+ atklog = sanitize_integer(atklog, 0, 100, initial(atklog))
return 1
/datum/preferences/proc/save_preferences(client/C)
@@ -85,6 +88,7 @@
be_role='[sanitizeSQL(list2params(be_special))]',
default_slot='[default_slot]',
toggles='[toggles]',
+ atklog='[atklog]',
sound='[sound]',
randomslot='[randomslot]',
volume='[volume]',
@@ -93,7 +97,8 @@
lastchangelog='[lastchangelog]',
windowflashing='[windowflashing]',
ghost_anonsay='[ghost_anonsay]',
- clientfps='[clientfps]'
+ clientfps='[clientfps]',
+ atklog='[atklog]'
WHERE ckey='[C.ckey]'"}
)
diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
index 0c2af905a74..a67b88f97d4 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
@@ -260,7 +260,7 @@
new /obj/effect/decal/cleanable/blood/gibs(src)
if(!UserOverride)
- add_attack_logs(user, occupant, "Gibbed in [src]", !!occupant.ckey)
+ add_attack_logs(user, occupant, "Gibbed in [src]", !!occupant.ckey ? ATKLOG_FEW : ATKLOG_ALL)
if(!iscarbon(user))
occupant.LAssailant = null
diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm
index 4e76f7dcc74..f42b7963104 100644
--- a/code/modules/martial_arts/martial.dm
+++ b/code/modules/martial_arts/martial.dm
@@ -60,7 +60,7 @@
D.apply_damage(damage, BRUTE, affecting, armor_block)
- add_attack_logs(A, D, "Melee attacked with martial-art [src]", admin_notify = (damage > 0) ? TRUE : FALSE)
+ add_attack_logs(A, D, "Melee attacked with martial-art [src]", (damage > 0) ? null : ATKLOG_ALL)
if((D.stat != DEAD) && damage >= A.species.punchstunthreshold)
D.visible_message("[A] has weakened [D]!!", \
diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm
index 0d9c50ba5cc..72bf30ceedf 100644
--- a/code/modules/mob/living/carbon/alien/alien_defense.dm
+++ b/code/modules/mob/living/carbon/alien/alien_defense.dm
@@ -35,7 +35,7 @@ In all, this is a lot like the monkey code. /N
visible_message("[M.name] bites [src]!", \
"[M.name] bites [src]!")
adjustBruteLoss(damage)
- add_attack_logs(M, src, "Alien attack", FALSE)
+ add_attack_logs(M, src, "Alien attack", ATKLOG_ALL)
updatehealth()
else
to_chat(M, "[name] is too injured for that.")
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index a0969b82b25..aa890cbd17f 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -201,7 +201,7 @@
swap_hand()
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
- add_attack_logs(M, src, "Shaked", admin_notify = FALSE)
+ add_attack_logs(M, src, "Shaked", ATKLOG_ALL)
if(health >= config.health_threshold_crit)
if(src == M && ishuman(src))
var/mob/living/carbon/human/H = src
@@ -1015,7 +1015,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
return 1
/mob/living/carbon/proc/forceFedAttackLog(var/obj/item/reagent_containers/food/toEat, mob/user)
- add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist(toEat)]")
+ add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist(toEat)]", ATKLOG_FEW)
if(!iscarbon(user))
LAssailant = null
else
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 0a7b781cf03..cca71c1e8d6 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -651,12 +651,12 @@
unEquip(pocket_item)
if(thief_mode)
usr.put_in_hands(pocket_item)
- add_attack_logs(usr, src, "Stripped of [pocket_item]", isLivingSSD(src))
+ add_attack_logs(usr, src, "Stripped of [pocket_item]", isLivingSSD(src) ? null : ATKLOG_ALL)
else
if(place_item)
usr.unEquip(place_item)
equip_to_slot_if_possible(place_item, pocket_id, 0, 1)
- add_attack_logs(usr, src, "Equipped with [pocket_item]", isLivingSSD(src))
+ add_attack_logs(usr, src, "Equipped with [pocket_item]", isLivingSSD(src) ? null : ATKLOG_ALL)
// Update strip window
if(usr.machine == src && in_range(src, usr))
@@ -665,7 +665,7 @@
// Display a warning if the user mocks up if they don't have pickpocket gloves.
if(!thief_mode)
to_chat(src, "You feel your [pocket_side] pocket being fumbled with!")
- add_attack_logs(usr, src, "Attempted strip of [pocket_item]", isLivingSSD(src))
+ add_attack_logs(usr, src, "Attempted strip of [pocket_item]", isLivingSSD(src) ? null : ATKLOG_ALL)
if(href_list["set_sensor"])
if(istype(w_uniform, /obj/item/clothing/under))
@@ -680,7 +680,7 @@
"You have dislodged everything from [src]'s headpocket!")
var/obj/item/organ/internal/headpocket/C = get_int_organ(/obj/item/organ/internal/headpocket)
C.empty_contents()
- add_attack_logs(usr, src, "Stripped of headpocket items", isLivingSSD(src))
+ add_attack_logs(usr, src, "Stripped of headpocket items", isLivingSSD(src) ? null : ATKLOG_ALL)
if(href_list["strip_accessory"])
if(istype(w_uniform, /obj/item/clothing/under))
@@ -1762,7 +1762,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
to_chat(H, "You feel a breath of fresh air enter your lungs. It feels good.")
to_chat(src, "Repeat at least every 7 seconds.")
- add_attack_logs(src, H, "CPRed", FALSE)
+ add_attack_logs(src, H, "CPRed", ATKLOG_ALL)
return 1
else
to_chat(src, "You need to stay still while performing CPR!")
diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm
index 4de74d63e5a..139f2f7c9bb 100644
--- a/code/modules/mob/living/carbon/human/species/species.dm
+++ b/code/modules/mob/living/carbon/human/species/species.dm
@@ -357,7 +357,7 @@
var/datum/unarmed_attack/attack = user.species.unarmed
user.do_attack_animation(target, attack.animation_type)
- add_attack_logs(user, target, "Melee attacked with fists", admin_notify = target.ckey ? TRUE : FALSE)
+ add_attack_logs(user, target, "Melee attacked with fists", target.ckey ? null : ATKLOG_ALL)
if(!iscarbon(user))
target.LAssailant = null
@@ -392,7 +392,7 @@
if(attacker_style && attacker_style.disarm_act(user, target))
return 1
else
- add_attack_logs(user, target, "Disarmed", admin_notify = FALSE)
+ add_attack_logs(user, target, "Disarmed", ATKLOG_ALL)
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
if(target.w_uniform)
target.w_uniform.add_fingerprint(user)
@@ -402,7 +402,7 @@
target.apply_effect(2, WEAKEN, target.run_armor_check(affecting, "melee"))
playsound(target.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
target.visible_message("[user] has pushed [target]!")
- add_attack_logs(user, target, "Pushed over", admin_notify = FALSE)
+ add_attack_logs(user, target, "Pushed over", ATKLOG_ALL)
if(!iscarbon(user))
target.LAssailant = null
else
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index d008bf060c4..bff49e7c527 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -818,7 +818,7 @@
who.unEquip(what)
if(silent)
put_in_hands(what)
- add_attack_logs(src, who, "Stripped of [what]", isLivingSSD(who))
+ add_attack_logs(src, who, "Stripped of [what]")
// The src mob is trying to place an item on someone
// Override if a certain mob should be behave differently when placing items (can't, for example)
@@ -837,8 +837,7 @@
if(what && Adjacent(who))
unEquip(what)
who.equip_to_slot_if_possible(what, where, 0, 1)
- add_attack_logs(src, who, "Equipped [what]", isLivingSSD(who))
-
+ add_attack_logs(src, who, "Equipped [what]")
/mob/living/singularity_act()
var/gain = 20
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index e211cef629e..aaeb26fe2c6 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -129,7 +129,7 @@
add_attack_logs(M.occupant, src, "Mecha-meleed with [M]")
else
step_away(src,M)
- add_attack_logs(M.occupant, src, "Mecha-pushed with [M]", FALSE)
+ add_attack_logs(M.occupant, src, "Mecha-pushed with [M]", ATKLOG_ALL)
M.occupant_message("You push [src] out of the way.")
visible_message("[M] pushes [src] out of the way.")
return
@@ -240,7 +240,7 @@
to_chat(user, "You already grabbed [src].")
return
- add_attack_logs(user, src, "Grabbed passively", admin_notify = FALSE)
+ add_attack_logs(user, src, "Grabbed passively", ATKLOG_ALL)
var/obj/item/grab/G = new /obj/item/grab(user, src)
if(buckled)
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 986795ccd1e..5e79c315f42 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -276,7 +276,7 @@
return
apply_damage(M.melee_damage_upper, BRUTE)
visible_message("[M] has [M.attacktext] [src]!")
- add_attack_logs(M, src, "Animal attacked", FALSE)
+ add_attack_logs(M, src, "Animal attacked", ATKLOG_ALL)
if(prob(10))
new /obj/effect/decal/cleanable/blood/oil(loc)
diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm
index 593d077a562..458138b9db0 100644
--- a/code/modules/mob/mob_grab.dm
+++ b/code/modules/mob/mob_grab.dm
@@ -263,7 +263,7 @@
state = GRAB_AGGRESSIVE
icon_state = "grabbed1"
hud.icon_state = "reinforce1"
- add_attack_logs(assailant, affecting, "Aggressively grabbed", admin_notify = FALSE)
+ add_attack_logs(assailant, affecting, "Aggressively grabbed", ATKLOG_ALL)
else if(state < GRAB_NECK)
if(isslime(affecting))
to_chat(assailant, "You squeeze [affecting], but nothing interesting happens.")
@@ -273,7 +273,7 @@
state = GRAB_NECK
icon_state = "grabbed+1"
assailant.setDir(get_dir(assailant, affecting))
- add_attack_logs(assailant, affecting, "Neck grabbed", admin_notify = FALSE)
+ add_attack_logs(assailant, affecting, "Neck grabbed", ATKLOG_ALL)
if(!iscarbon(assailant))
affecting.LAssailant = null
else
diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm
index 70cd75bf85d..a6c86d3f2ef 100644
--- a/code/modules/power/singularity/emitter.dm
+++ b/code/modules/power/singularity/emitter.dm
@@ -121,7 +121,7 @@
if(radio_controller)
radio_controller.remove_object(src, frequency)
radio_connection = null
- msg_admin_attack("Emitter deleted at ([x],[y],[z] - [ADMIN_JMP(src)])", 0, 1)
+ msg_admin_attack("Emitter deleted at ([x],[y],[z] - [ADMIN_JMP(src)])", ATKLOG_FEW)
log_game("Emitter deleted at ([x],[y],[z])")
investigate_log("deleted at ([x],[y],[z])","singulo")
return ..()
diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm
index b8570de2c78..42fbb784f49 100644
--- a/code/modules/power/singularity/particle_accelerator/particle_control.dm
+++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm
@@ -227,7 +227,7 @@
active = !active
investigate_log("turned [active?"ON":"OFF"] by [usr ? usr.key : "outside forces"]","singulo")
if(active)
- msg_admin_attack("PA Control Computer turned ON by [key_name_admin(usr)]",0,1)
+ msg_admin_attack("PA Control Computer turned ON by [key_name_admin(usr)]", ATKLOG_FEW)
log_game("PA Control Computer turned ON by [key_name(usr)] in ([x],[y],[z])")
use_log += text("\[[time_stamp()]\] [key_name(usr)] has turned on the PA Control Computer.")
if(active)
diff --git a/code/modules/projectiles/guns/dartgun.dm b/code/modules/projectiles/guns/dartgun.dm
index 5ae089d5522..c279abdc5c1 100644
--- a/code/modules/projectiles/guns/dartgun.dm
+++ b/code/modules/projectiles/guns/dartgun.dm
@@ -178,7 +178,8 @@
else
M.LAssailant = user
- add_attack_logs(user, M, "Shot with dartgun containing [R]", !!M.ckey)
+ add_attack_logs(user, M, "Shot with dartgun containing [R]")
+
if(D.reagents)
D.reagents.trans_to(M, 15)
to_chat(M, "You feel a slight prick.")
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index a378e291e7c..e38a42ff88f 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -114,13 +114,18 @@
"[L] is hit by \a [src][organ_hit_text]!") //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
var/reagent_note
+ var/has_reagents = FALSE
if(reagents && reagents.reagent_list)
reagent_note = " REAGENTS:"
for(var/datum/reagent/R in reagents.reagent_list)
reagent_note += R.id + " ("
reagent_note += num2text(R.volume) + ") "
+ has_reagents = TRUE
if(!log_override && firer && original)
- add_attack_logs(firer, L, "Shot with a [type] (potentially containing [reagent_note])")
+ if(has_reagents)
+ add_attack_logs(firer, L, "Shot with a [type] (containing [reagent_note])")
+ else
+ add_attack_logs(firer, L, "Shot with a [type]")
return L.apply_effects(stun, weaken, paralyze, irradiate, slur, stutter, eyeblur, drowsy, blocked, stamina, jitter)
/obj/item/projectile/proc/get_splatter_blockage(var/turf/step_over, var/atom/target, var/splatter_dir, var/target_loca) //Check whether the place we want to splatter blood is blocked (i.e. by windows).
diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm
index 057a339649c..ad8b3438ee4 100644
--- a/code/modules/reagents/reagent_containers/borghydro.dm
+++ b/code/modules/reagents/reagent_containers/borghydro.dm
@@ -85,7 +85,7 @@
var/datum/reagent/injected = chemical_reagents_list[reagent_ids[mode]]
var/contained = injected.name
var/trans = R.trans_to(M, amount_per_transfer_from_this)
- add_attack_logs(M, user, "Injected with [name] containing [contained], transfered [trans] units", !!M.ckey)
+ add_attack_logs(M, user, "Injected with [name] containing [contained], transfered [trans] units")
M.LAssailant = user
to_chat(user, "[trans] units injected. [R.total_volume] units remaining.")
return
diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm
index 6b0dc98dd37..d20ef6f82ee 100644
--- a/code/modules/reagents/reagent_containers/glass_containers.dm
+++ b/code/modules/reagents/reagent_containers/glass_containers.dm
@@ -83,7 +83,7 @@
for(var/datum/reagent/R in reagents.reagent_list)
injected += R.name
var/contained = english_list(injected)
- add_attack_logs(M, user, "Splashed with [name] containing [contained]", !!M.ckey)
+ add_attack_logs(M, user, "Splashed with [name] containing [contained]", !!M.ckey ? null : ATKLOG_ALL)
if(!iscarbon(user))
M.LAssailant = null
else
diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm
index fa709fd7d98..02ab4408acb 100644
--- a/code/modules/reagents/reagent_containers/spray.dm
+++ b/code/modules/reagents/reagent_containers/spray.dm
@@ -49,10 +49,10 @@
user.newtonian_move(get_dir(A, user))
if(reagents.has_reagent("sacid"))
- msg_admin_attack("[key_name_admin(user)] fired sulphuric acid from \a [src] at [COORD(user)].")
+ msg_admin_attack("[key_name_admin(user)] fired sulphuric acid from \a [src] at [COORD(user)].", ATKLOG_FEW)
log_game("[key_name(user)] fired sulphuric acid from \a [src] at [COORD(user)].")
if(reagents.has_reagent("facid"))
- msg_admin_attack("[key_name_admin(user)] fired fluorosulfuric acid from \a [src] at [COORD(user)].")
+ msg_admin_attack("[key_name_admin(user)] fired fluorosulfuric acid from \a [src] at [COORD(user)].", ATKLOG_FEW)
log_game("[key_name(user)] fired fluorosulfuric Acid from \a [src] at [COORD(user)].")
if(reagents.has_reagent("lube"))
msg_admin_attack("[key_name_admin(user)] fired space lube from \a [src] at [COORD(user)].")
diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm
index 322f392950d..bcbcad6bc98 100644
--- a/code/modules/reagents/reagent_dispenser.dm
+++ b/code/modules/reagents/reagent_dispenser.dm
@@ -131,7 +131,7 @@
var/obj/item/assembly_holder/H = I
if(istype(H.a_left, /obj/item/assembly/igniter) || istype(H.a_right, /obj/item/assembly/igniter))
- msg_admin_attack("[key_name_admin(user)] rigged [src.name] with [I.name] for explosion (JMP)")
+ msg_admin_attack("[key_name_admin(user)] rigged [src.name] with [I.name] for explosion (JMP)", ATKLOG_FEW)
log_game("[key_name(user)] rigged [src.name] with [I.name] for explosion at [COORD(loc)]")
investigate_log("[key_name(user)] rigged [src.name] with [I.name] for explosion at [COORD(loc)]", INVESTIGATE_BOMB)
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index aaf35238d80..00b3b06a3a5 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -133,7 +133,7 @@
for(var/mob/C in viewers(src))
C.show_message("[GM.name] has been placed in the [src] by [user].", 3)
qdel(G)
- add_attack_logs(usr, GM, "Disposal'ed", !!GM.ckey)
+ add_attack_logs(usr, GM, "Disposal'ed", !!GM.ckey ? null : ATKLOG_ALL)
return
if(!I)
@@ -179,7 +179,7 @@
msg = "[user.name] stuffs [target.name] into the [src]!"
to_chat(user, "You stuff [target.name] into the [src]!")
- add_attack_logs(user, target, "Disposal'ed", !!target.ckey)
+ add_attack_logs(user, target, "Disposal'ed", !!target.ckey ? null : ATKLOG_ALL)
else
return
target.forceMove(src)
diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm
index 4908133d2c0..5837fab5925 100644
--- a/code/modules/surgery/organs/organ.dm
+++ b/code/modules/surgery/organs/organ.dm
@@ -307,7 +307,7 @@
processing_objects |= src
if(owner && vital && is_primary_organ()) // I'd do another check for species or whatever so that you couldn't "kill" an IPC by removing a human head from them, but it doesn't matter since they'll come right back from the dead
- add_attack_logs(user, owner, "Removed vital organ ([src])", !!user)
+ add_attack_logs(user, owner, "Removed vital organ ([src])", !!user ? ATKLOG_FEW : ATKLOG_ALL)
owner.death()
owner = null
return src
diff --git a/config/example/dbconfig.txt b/config/example/dbconfig.txt
index 37768b61732..563768b69bc 100644
--- a/config/example/dbconfig.txt
+++ b/config/example/dbconfig.txt
@@ -9,7 +9,7 @@
## This value must be set to the version of the paradise schema in use.
## If this value does not match, the SQL database will not be loaded and an error will be generated.
## Roundstart will be delayed.
-DB_VERSION 3
+DB_VERSION 4
## Server the MySQL database can be found at.
# Examples: localhost, 200.135.5.43, www.mysqldb.com, etc.
@@ -26,11 +26,11 @@ FEEDBACK_DATABASE feedback
## Note, this does not change the table names in the database, you will have to do that yourself.
## IE:
## FEEDBACK_TABLEPREFIX erro_
-## FEEDBACK_TABLEPREFIX
+## FEEDBACK_TABLEPREFIX
## FEEDBACK_TABLEPREFIX SS13_
##
## Leave as is if you are using the standard schema file.
-FEEDBACK_TABLEPREFIX
+FEEDBACK_TABLEPREFIX
## Username/Login used to access the database.
FEEDBACK_LOGIN username