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:
Kashargul
2026-03-19 22:37:45 +01:00
committed by GitHub
parent 861b270c25
commit 6c768b06ec
50 changed files with 411 additions and 270 deletions
-4
View File
@@ -4,7 +4,6 @@
if(!check_rights(R_MOD,0) && !check_rights(R_BAN)) return
establish_db_connection()
if(!SSdbcore.IsConnected())
return
@@ -126,7 +125,6 @@
if(job)
sql += " AND job = '[job]'"
establish_db_connection()
if(!SSdbcore.IsConnected())
return
@@ -225,7 +223,6 @@
var/sql = "SELECT ckey FROM erro_ban WHERE id = [id]"
establish_db_connection()
if(!SSdbcore.IsConnected())
return
@@ -279,7 +276,6 @@
if(!check_rights_for(user, R_BAN))
return
establish_db_connection()
if(!SSdbcore.IsConnected())
to_chat(usr, span_filter_adminlog("[span_red("Failed to establish database connection")]"))
return
+1 -1
View File
@@ -40,7 +40,7 @@
var/ckeytext = ckey(key)
if(!establish_db_connection())
if(!SSdbcore.IsConnected())
var/msg = "Ban database connection failure. Key [ckeytext] not checked"
log_world(msg)
message_admins(msg)
-29
View File
@@ -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")
*/
+71 -52
View File
@@ -1,65 +1,84 @@
/client/proc/cmd_admin_check_player_logs(mob/living/M as mob in GLOB.mob_list)
set category = "Admin.Logs"
set name = "Check Player Attack Logs"
set desc = "Check a player's attack logs."
show_cmd_admin_check_player_logs(M)
ADMIN_VERB_ONLY_CONTEXT_MENU(cmd_admin_check_player_logs, R_ADMIN|R_MOD, "Check Mob Logs", mob/living/player in GLOB.mob_list)
user.show_cmd_admin_check_player_logs(player.logging, player.name, player.ckey, player.mind?.special_role)
//Views specific attack logs belonging to one player.
/client/proc/show_cmd_admin_check_player_logs(mob/living/M)
var/dat = span_bold("[M]'s Attack Log:<HR>")
dat += span_bold("Viewing attack logs of [M]") + " - (Played by ([key_name(M)]).<br>"
if(M.mind)
dat += span_bold("Current Antag?:") + " [(M.mind.special_role)?"Yes":"No"]<br>"
dat += "<br>" + span_bold("Note:") + " This is arranged from earliest to latest. <br><br>"
/client/proc/show_cmd_admin_check_player_logs(list/mob_data, target_name, target_ckey, target_special)
if(CONFIG_GET(flag/database_logging))
var/datum/db_query/query = SSdbcore.NewQuery("SELECT mid,time,ckey,mob,area,color,type,message from erro_dialog WHERE ckey = :t_ckey", list("t_ckey" = ckey))
if(!query.Execute())
to_chat(src, span_admin("Database query error"))
qdel(query)
return
var/list/data = list()
while(query.NextRow())
var/list/timestamped_message = list(
"event_id" = query.item[1],
"time" = query.item[2],
"ckey" = query.item[3],
"name" = query.item[4],
"loc" = query.item[5],
"color" = query.item[6],
"message" = query.item[8]
)
var/entry_type = query.item[7]
if(!islist(data[entry_type]))
data[entry_type] = list()
UNTYPED_LIST_ADD(data[entry_type], timestamped_message)
qdel(query)
if(!length(data))
to_chat(src, span_admin("No data found."))
return
admin_log_view_target(data, target_name, target_ckey, target_special)
return
if(!length(mob_data))
to_chat(src, span_admin("No data found."))
return
admin_log_view_target(mob_data, target_name, target_ckey, target_special)
if(!isemptylist(M.attack_log))
dat += "<fieldset style='border: 2px solid white; display: inline'>"
for(var/l in M.attack_log)
dat += "[l]<br>"
ADMIN_VERB(persistent_client_logs, R_ADMIN|R_MOD, "Check Player Logs", "Displays the client logs of the selected ckey.", ADMIN_CATEGORY_LOGS)
var/mob/living/selected_key = tgui_input_list(user, "Select a ckey to check their logs", "Ckey", GLOB.persistent_clients_by_ckey)
if(!selected_key)
return
dat += "</fieldset>"
var/datum/persistent_client/selected = GLOB.persistent_clients_by_ckey[selected_key]
else
dat += span_italics("No attack logs found for [M].")
user.show_cmd_admin_check_player_logs(selected.logging, selected.mob?.name, selected_key, selected.mob?.mind?.special_role)
var/datum/browser/popup = new(usr, "admin_attack_log", "[src]", 650, 650, src)
popup.set_content(jointext(dat,null))
popup.open()
/client/proc/admin_log_view_target(list/log_data, name, ckey, special, use_db)
var/datum/player_log_viwer/log_view = new(log_data, name, ckey, special)
log_view.tgui_interact(mob)
onclose(usr, "admin_attack_log")
/datum/player_log_viwer
var/list/log_data
var/target_name
var/target_ckey
var/special_role
feedback_add_details("admin_verb","PL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/player_log_viwer/tgui_close(mob/user)
. = ..()
log_data = null
/client/proc/cmd_admin_check_dialogue_logs(mob/living/M as mob in GLOB.mob_list)
set category = "Admin.Logs"
set name = "Check Player Dialogue Logs"
set desc = "Check a player's dialogue logs."
show_cmd_admin_check_dialogue_logs(M)
/datum/player_log_viwer/New(list/data, name, ckey, special)
. = ..()
log_data = data
target_name = name
target_ckey = ckey
special_role = special
//Views specific dialogue logs belonging to one player.
/client/proc/show_cmd_admin_check_dialogue_logs(mob/living/M)
var/dat = span_bold("[M]'s Dialogue Log:<HR>")
dat += span_bold("Viewing say and emote logs of [M]") + " - (Played by ([key_name(M)]).<br>"
if(M.mind)
dat += span_bold("Current Antag?:") + " [(M.mind.special_role)?"Yes":"No"]<br>"
dat += "<br>" + span_bold("Note:") + " This is arranged from earliest to latest. <br><br>"
/datum/player_log_viwer/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "PlayerLogViewer")
ui.open()
if(!isemptylist(M.dialogue_log))
dat += "<fieldset style='border: 2px solid white; display: inline'>"
/datum/player_log_viwer/tgui_state(mob/user)
return ADMIN_STATE(R_ADMIN|R_MOD)
for(var/d in M.dialogue_log)
dat += "[d]<br>"
dat += "</fieldset>"
else
dat += span_italics("No dialogue logs found for [M].")
var/datum/browser/popup = new(usr, "admin_dialogue_log", "[src]", 650, 650, src)
popup.set_content(jointext(dat,null))
popup.open()
onclose(usr, "admin_dialogue_log")
feedback_add_details("admin_verb","PDL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/player_log_viwer/tgui_static_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
return list(
"entries" = log_data,
"name" = target_name,
"ckey" = target_ckey,
"special" = special_role
)
@@ -20,8 +20,6 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
/client/proc/cmd_admin_pm_context, //right-click adminPM interface,
/client/proc/cmd_admin_pm_panel, //admin-pm list,
/client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head',
/client/proc/cmd_admin_check_player_logs, //checks a player's attack logs,
/client/proc/cmd_admin_check_dialogue_logs, //checks a player's dialogue logs,
/datum/admins/proc/access_news_network, //allows access of newscasters,
/client/proc/jumptocoord, //we ghost and jump to a coordinate,
/client/proc/Getmob, //teleports a mob to our location,
@@ -169,8 +167,6 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
/datum/admins/proc/toggleguests,
/datum/admins/proc/announce,
/client/proc/cmd_admin_subtle_message,
/client/proc/cmd_admin_check_player_logs,
/client/proc/cmd_admin_check_dialogue_logs,
/datum/admins/proc/access_news_network,
/client/proc/cmd_admin_direct_narrate,
/client/proc/cmd_admin_world_narrate,
@@ -271,8 +267,6 @@ GLOBAL_LIST_INIT(admin_verbs_event_manager, list(
/client/proc/cmd_admin_pm_context, //right-click adminPM interface,
/client/proc/cmd_admin_pm_panel, //admin-pm list,
/client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head',
/client/proc/cmd_admin_check_player_logs, //checks a player's attack logs,
/client/proc/cmd_admin_check_dialogue_logs, //checks a player's dialogue logs,
/datum/admins/proc/access_news_network, //allows access of newscasters,
/client/proc/jumptocoord, //we ghost and jump to a coordinate,
/client/proc/Getmob, //teleports a mob to our location,
-1
View File
@@ -681,7 +681,6 @@ ADMIN_VERB(removetickets, R_ADMIN, "Security Tickets", "Allows one to remove tic
var/dat = "<HEAD><TITLE>Book Inventory Management</TITLE></HEAD><BODY>\n"
dat += "<h3>ADMINISTRATIVE MANAGEMENT</h3>"
establish_db_connection()
if(!SSdbcore.IsConnected())
dat += span_red(span_bold("ERROR") + ": Unable to contact External Archive. Please contact your system administrator for assistance.")
+1 -1
View File
@@ -69,7 +69,7 @@ DEBUG
GLOB.jobban_keylist=list()
log_admin("jobban_keylist was empty")
else
if(!establish_db_connection())
if(!SSdbcore.IsConnected())
log_sql("Database connection failed. Reverting to the legacy ban system.")
CONFIG_SET(flag/ban_legacy_system, TRUE)
jobban_loadbanfile()
+1 -1
View File
@@ -39,4 +39,4 @@
if((M.mind && M.mind.special_role && A && A.can_hear_aooc) || isobserver(M)) // Antags must have their type be allowed to AOOC to see AOOC. This prevents, say, ERT from seeing AOOC.
to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[player_display]:</EM> " + span_message("[msg]"))))
src.mob.log_talk("(AOOC) [msg]", LOG_OOC)
src.mob.log_talk("(AOOC) [msg]", LOG_OOC, color="#ff0000")
@@ -31,7 +31,6 @@ GLOBAL_VAR_INIT(inactive_keys, "None<br>")
if(GLOB.checked_for_inactives)
return
establish_db_connection()
if(!SSdbcore.IsConnected())
return
-1
View File
@@ -15,7 +15,6 @@
else
log_admin("Database already disconnected")
establish_db_connection()
var/errno = SSdbcore.ErrorMsg()
if(errno)
log_admin("Database connection returned error message `[errno]`. Aborting.")
-2
View File
@@ -433,7 +433,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
// Returns null if no DB connection can be established, or -1 if the requested key was not found in the database
/proc/get_player_age(key)
establish_db_connection()
if(!SSdbcore.IsConnected())
return null
@@ -454,7 +453,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if ( IsGuestKey(src.key) )
return
establish_db_connection()
if(!SSdbcore.IsConnected())
return
+2 -2
View File
@@ -42,7 +42,7 @@
message_admins("[key_name_admin(src)] has attempted to post a link in OOC: [msg]")
return
src.mob.log_talk(msg, LOG_OOC)
src.mob.log_talk(msg, LOG_OOC, color="#0051ff")
if(msg)
handle_spam_prevention(MUTE_OOC)
@@ -125,7 +125,7 @@
message_admins("[key_name_admin(src)] has attempted to post a link in OOC: [msg]")
return
src.mob.log_message(msg, LOG_LOOC)
src.mob.log_message(msg, LOG_LOOC, color="#53cbff")
if(msg)
handle_spam_prevention(MUTE_LOOC)
@@ -235,8 +235,7 @@
else
to_chat(victim, span_danger("Searing hot oil scorches your [E ? E.name : "flesh"]!"))
user.attack_log += text("\[[time_stamp()]\] [span_red("Has [cook_type] \the [victim] ([victim.ckey]) in \a [src]")]")
victim.attack_log += text("\[[time_stamp()]\] [span_orange("Has been [cook_type] in \a [src] by [user.name] ([user.ckey])")]")
add_attack_logs(user, victim, "has been [cook_type] with [src]")
msg_admin_attack("[key_name_admin(user)] [cook_type] \the [victim] ([victim.ckey]) in \a [src]. (<A href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
//Coat the victim in some oil
-6
View File
@@ -43,7 +43,6 @@
<A href='byond://?src=\ref[src];setauthor=1'>Filter by Author: [author]</A><BR>
<A href='byond://?src=\ref[src];search=1'>\[Start Search\]</A><BR>"}
if(1)
establish_db_connection()
if(!SSdbcore.IsConnected())
dat += span_red(span_bold("ERROR") + ": Unable to contact External Archive. Please contact your system administrator for assistance.") + "<BR>"
else if(!SQLquery)
@@ -263,7 +262,6 @@
<A href='byond://?src=\ref[src];switchscreen=0'>No.</A><BR>"}
if(8)
dat += "<h3>External Archive</h3>" //VOREStation Edit
establish_db_connection()
//dat += "<h3>" + span_red("arning: System Administrator has slated this archive for removal. Personal uploads should be taken to the NT board of internal literature.") + "</h3>" //VOREStation Removal
@@ -307,7 +305,6 @@
var/dat = "<HEAD><TITLE>Book Inventory Management</TITLE></HEAD><BODY>\n" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
dat += "<h3>ADMINISTRATIVE MANAGEMENT</h3>"
establish_db_connection()
if(!SSdbcore.IsConnected())
dat += span_red(span_bold("ERROR") + ": Unable to contact External Archive. Please contact your system administrator for assistance.")
@@ -428,7 +425,6 @@
if(scanner.cache.unique)
tgui_alert_async(usr, "This book has been rejected from the database. Aborting!")
else
establish_db_connection()
if(!SSdbcore.IsConnected())
tgui_alert_async(usr, "Connection to Archive has been severed. Aborting.")
else
@@ -453,7 +449,6 @@
if(href_list["targetid"])
var/sqlid = sanitizeSQL(href_list["targetid"])
establish_db_connection()
if(!SSdbcore.IsConnected())
tgui_alert_async(usr, "Connection to Archive has been severed. Aborting.")
if(bibledelay)
@@ -485,7 +480,6 @@
if(!check_rights(R_ADMIN))
return
var/sqlid = sanitizeSQL(href_list["delid"])
establish_db_connection()
if(!SSdbcore.IsConnected())
tgui_alert_async(usr, "Connection to Archive has been severed. Aborting.")
else
@@ -65,7 +65,6 @@
if(ismob(loc))
var/mob/M = loc
T = get_turf(M) //Where is the body located?
attack_log = M.attack_log //preserve our attack logs by copying them to our ghost
gender = M.gender
if(M.mind && M.mind.name)
name = M.mind.name
+2 -2
View File
@@ -4,7 +4,7 @@
if(!message)
return
log_talk("(GHOST SAY) [message]", LOG_SAY)
log_talk("(GHOST SAY) [message]", LOG_SAY, color="#9c00bc")
if (client)
if(message)
@@ -20,7 +20,7 @@
if(!message)
return
log_message("(GHOST EMOTE) [message]", LOG_EMOTE)
log_message("(GHOST EMOTE) [message]", LOG_EMOTE, color="#9c00bc")
if(client)
if(message)
+2 -2
View File
@@ -423,12 +423,12 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key)
blooploop(message, extrarange = -6, volume = 25, sound_preference = /datum/preference/toggle/whisper_sounds)
// playsound(T, pick(voice_sounds_list), 25, TRUE, extrarange = -6, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/preference/toggle/whisper_sounds)
log_talk(message, LOG_WHISPER)
log_talk(message, LOG_WHISPER, color="#aeaeae")
else
if(do_sound && message)
blooploop(message, volume = 75)
// playsound(T, pick(voice_sounds_list), 75, TRUE, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/preference/toggle/say_sounds)
log_talk(message, LOG_SAY)
log_talk(message, LOG_SAY, color="#c0c0c0")
return 1
/*************************************************************************/
@@ -67,7 +67,6 @@
if(!client) return 0
if(href_list["privacy_poll"])
establish_db_connection()
if(!SSdbcore.IsConnected())
return
var/voted = 0
-6
View File
@@ -1,6 +1,5 @@
/mob/new_player/proc/handle_privacy_poll()
establish_db_connection()
if(!SSdbcore.IsConnected())
return
var/voted = 0
@@ -47,7 +46,6 @@
var/optiontext
/mob/new_player/proc/handle_player_polling()
establish_db_connection()
if(SSdbcore.IsConnected())
var/isadmin = 0
if(src.client && check_rights_for(src.client, R_HOLDER))
@@ -81,7 +79,6 @@
/mob/new_player/proc/poll_player(var/pollid = -1)
if(pollid == -1) return
establish_db_connection()
if(SSdbcore.IsConnected())
var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM erro_poll_question WHERE id = [pollid]")
@@ -343,7 +340,6 @@
if(!isnum(pollid) || !isnum(optionid))
return
establish_db_connection()
if(SSdbcore.IsConnected())
var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
@@ -415,7 +411,6 @@
if(!isnum(pollid) || !istext(replytext))
return
establish_db_connection()
if(SSdbcore.IsConnected())
var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
@@ -475,7 +470,6 @@
if(!isnum(pollid) || !isnum(optionid))
return
establish_db_connection()
if(SSdbcore.IsConnected())
var/datum/db_query/select_query = SSdbcore.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
+2 -2
View File
@@ -357,7 +357,7 @@
G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle))
if(client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) || check_rights_for(G.client, R_HOLDER))
to_chat(G, span_psay("[formatted_name] thinks, \"[message]\""))
M.log_talk("(PSAY) [message]", LOG_SAY)
M.log_talk("(PSAY) [message]", LOG_SAY, color="#d900ff")
else //There wasn't anyone to send the message to, pred or prey, so let's just say it instead and correct our psay just in case.
M.forced_psay = FALSE
M.say(message)
@@ -463,7 +463,7 @@
G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle))
if(client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) || check_rights_for(G.client, R_HOLDER))
to_chat(G, span_pemote("[formatted_name] [message]"))
M.log_talk(message, LOG_SAY)
M.log_talk(message, LOG_SAY, color="#d900ff")
else //There wasn't anyone to send the message to, pred or prey, so let's just emote it instead and correct our psay just in case.
M.forced_psay = FALSE
M.me_verb(message)
@@ -107,7 +107,7 @@
type = MESSAGE_TYPE_NIF,
html = span_nif(span_bold("\[[icon2html(nif.big_icon, CS.client)]NIF\]") + message))
sender.log_talk("NSAY (NIF:[nif.human.real_name]): [message]", LOG_SAY)
sender.log_talk("NSAY (NIF:[nif.human.real_name]): [message]", LOG_SAY, color="#ff00c8")
/datum/nifsoft/soulcatcher/proc/emote_into(var/message, var/mob/living/sender, var/mob/eyeobj, var/whisper)
var/sender_name = eyeobj ? eyeobj.name : sender.name
@@ -135,7 +135,7 @@
type = MESSAGE_TYPE_NIF,
html = span_nif(span_bold("\[[icon2html(nif.big_icon,CS.client)]NIF\]") + message))
sender.log_message("NME (NIF:[nif.human.real_name]): [message]", LOG_EMOTE)
sender.log_message("NME (NIF:[nif.human.real_name]): [message]", LOG_EMOTE, color="#ff00c8")
/datum/nifsoft/soulcatcher/proc/show_settings(var/mob/living/carbon/human/H)
set waitfor = FALSE
+1 -1
View File
@@ -179,7 +179,7 @@
PM.receive_message(list("sent" = 0, "owner" = "[pda.owner]", "job" = "[pda.ownjob]", "message" = "[t]", "target" = "\ref[pda]"), "\ref[pda]")
SStgui.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message
U.log_message("(PDA: [src.name] | [U.real_name]) sent \"[t]\" to [P.name]", LOG_PDA)
U.log_message("(PDA: [src.name] | [U.real_name]) sent \"[t]\" to [P.name]", LOG_PDA, color="#00ff00")
to_chat(U, "[icon2html(pda,U.client)] <b>Sent message to [P.owner] ([P.ownjob]), </b>\"[t]\"")
else
to_chat(U, span_notice("ERROR: Messaging server is not responding.\n\n\
+1 -1
View File
@@ -21,7 +21,7 @@
if(user in target) //no wrapping closets that you are inside - it's not physically possible
return
user.attack_log += text("\[[time_stamp()]\] [span_blue("Has used [src.name] on \ref[target]")]")
add_attack_logs(user, target, "has been wrapped with [src]")
if (istype(target, /obj/item) && !(istype(target, /obj/item/storage) && !istype(target,/obj/item/storage/box)))
var/obj/item/O = target
-1
View File
@@ -341,7 +341,6 @@ GLOBAL_DATUM(blackbox, /obj/machinery/blackbox_recorder)
if(!feedback) return
round_end_data_gathering() //round_end time logging and some other data processing
establish_db_connection()
if(!SSdbcore.IsConnected()) return
var/round_id
+2 -2
View File
@@ -383,7 +383,7 @@
else
destroy_shields()
my_tool.set_ready_state(TRUE)
my_tool.log_message("Power lost.")
my_tool.log_message("Power lost.", LOG_GAME)
else
my_tool.set_ready_state(TRUE)
@@ -409,5 +409,5 @@
..()
my_mecha.use_power(my_tool.energy_drain)
if(!active && shield_health < shield_regen_amount)
my_tool.log_message("Shield overloaded.")
my_tool.log_message("Shield overloaded.", LOG_GAME)
my_mecha.use_power(my_tool.energy_drain * 4)
+1 -1
View File
@@ -88,7 +88,7 @@
take_charge(user, skipcharge)
before_cast(targets) //applies any overlays and effects
user.attack_log += text("\[[time_stamp()]\] [span_red("[user.real_name] ([user.ckey]) cast the spell [name].")]")
add_attack_logs(user, targets, "casted the spell [name]")
if(prob(critfailchance))
critfail(targets, user)
else
+1 -1
View File
@@ -283,7 +283,7 @@
else
user.add_spell(S)
to_chat(user, span_notice("you rapidly read through the arcane book. Suddenly you realize you understand [spellname]!"))
user.attack_log += text("\[[time_stamp()]\] [span_orange("[user.real_name] ([user.ckey]) learned the spell [spellname] ([S]).")]")
add_attack_logs(user, src, "learned the spell [spellname] ([S]).")
onlearned(user)
/obj/item/spellbook/oneuse/proc/recoil(mob/user as mob)
+1 -1
View File
@@ -405,7 +405,7 @@
if(!damage)
return
visible_message(span_danger("[user] [attack_message] the [src]!"))
user.attack_log += text("\[[time_stamp()]\] [span_red("attacked [src.name]")]")
add_attack_logs(user, src, "attacked")
user.do_attack_animation(src)
src.health -= damage
if(mechanical && prob(10))
+2 -2
View File
@@ -104,7 +104,7 @@
for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs)
to_chat(CS, message)
sender.log_talk("NSAY (NIF:[owner.real_name]): [message]", LOG_SAY)
sender.log_talk("NSAY (SC:[owner.real_name]): [message]", LOG_SAY, color="#ff006f")
// Forwards the emotes of captured souls
/obj/soulgem/proc/use_emote(var/message, var/mob/living/sender, var/mob/eyeobj, var/whisper)
@@ -127,7 +127,7 @@
for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs)
to_chat(CS, message)
sender.log_message("NME (NIF:[owner.real_name]): [message]", LOG_EMOTE)
sender.log_message("NME (SC:[owner.real_name]): [message]", LOG_EMOTE, color="#ff006f")
// The capture function which transfers the given mob's mind into the soulcatcher
/obj/soulgem/proc/catch_mob(var/mob/M, var/custom_name)