mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 19:19:12 +01:00
reimplements attack and player logs (#19313)
* reomplements attack and player logs * right log cat * updates logging, makesDB optional * regex serarch * . * . * . * sucks * db load * . * . * db logging
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
/atom/var/lastattacker = null
|
||||
/mob/var/lastattacked = null
|
||||
/mob/var/attack_log = list( )
|
||||
/mob/var/dialogue_log = list( )
|
||||
|
||||
/proc/log_and_message_admins(var/message as text, var/mob/user = usr)
|
||||
log_admin(user ? "[key_name(user)] [message]" : "EVENT [message]")
|
||||
@@ -17,30 +15,3 @@
|
||||
|
||||
log_admin("[english_list(user_keys)] [message]")
|
||||
message_admins("[english_list(user_keys)] [message]")
|
||||
/* Old procs
|
||||
/proc/admin_attack_log(var/mob/attacker, var/mob/victim, var/attacker_message, var/victim_message, var/admin_message)
|
||||
if(victim)
|
||||
victim.attack_log += text("\[[time_stamp()]\]" + span_orange(" [key_name(attacker)] - [victim_message]"))
|
||||
if(attacker)
|
||||
attacker.attack_log += text("\[[time_stamp()]\]" + span_red(" [key_name(victim)] - [attacker_message]"))
|
||||
|
||||
msg_admin_attack("[key_name(attacker)] [admin_message] [key_name(victim)] (INTENT: [attacker? uppertext(attacker.a_intent) : "N/A"]) (<A href='byond://?_src_=holder;adminplayerobservecoodjump=1;X=[attacker.x];Y=[attacker.y];Z=[attacker.z]'>JMP</a>)")
|
||||
|
||||
/proc/admin_attacker_log_many_victims(var/mob/attacker, var/list/mob/victims, var/attacker_message, var/victim_message, var/admin_message)
|
||||
if(!victims || !victims.len)
|
||||
return
|
||||
|
||||
for(var/mob/victim in victims)
|
||||
admin_attack_log(attacker, victim, attacker_message, victim_message, admin_message)
|
||||
|
||||
/proc/admin_inject_log(mob/attacker, mob/victim, obj/item, reagents, amount_transferred, violent=0)
|
||||
if(violent)
|
||||
violent = "violently "
|
||||
else
|
||||
violent = ""
|
||||
admin_attack_log(attacker,
|
||||
victim,
|
||||
"used \the [weapon] to [violent]inject - [reagents] - [amount_transferred]u transferred",
|
||||
"was [violent]injected with \the [weapon] - [reagents] - [amount_transferred]u transferred",
|
||||
"used \the [weapon] to [violent]inject [reagents] ([amount_transferred]u transferred) into")
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user