mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-31 07:58:22 +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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user