mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Moves shuttle related logs into a new log file (#48441)
* Logs shuttle computer usage * Adds a separate shuttle log * Adds missing logs to INDIVIDUAL_SHOW_ALL_LOG * no message
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#define LOG_MECHA (1 << 15)
|
||||
#define LOG_VIRUS (1 << 16)
|
||||
#define LOG_CLONING (1 << 17)
|
||||
#define LOG_SHUTTLE (1 << 18)
|
||||
|
||||
//Individual logging panel pages
|
||||
#define INDIVIDUAL_ATTACK_LOG (LOG_ATTACK)
|
||||
@@ -44,7 +45,7 @@
|
||||
#define INDIVIDUAL_COMMS_LOG (LOG_PDA | LOG_CHAT | LOG_COMMENT | LOG_TELECOMMS)
|
||||
#define INDIVIDUAL_OOC_LOG (LOG_OOC | LOG_ADMIN)
|
||||
#define INDIVIDUAL_OWNERSHIP_LOG (LOG_OWNERSHIP)
|
||||
#define INDIVIDUAL_SHOW_ALL_LOG (LOG_ATTACK | LOG_SAY | LOG_WHISPER | LOG_EMOTE | LOG_DSAY | LOG_PDA | LOG_CHAT | LOG_COMMENT | LOG_TELECOMMS | LOG_OOC | LOG_ADMIN | LOG_OWNERSHIP | LOG_GAME)
|
||||
#define INDIVIDUAL_SHOW_ALL_LOG (LOG_ATTACK | LOG_SAY | LOG_WHISPER | LOG_EMOTE | LOG_DSAY | LOG_PDA | LOG_CHAT | LOG_COMMENT | LOG_TELECOMMS | LOG_OOC | LOG_ADMIN | LOG_OWNERSHIP | LOG_GAME | LOG_ADMIN_PRIVATE | LOG_ASAY | LOG_MECHA | LOG_VIRUS | LOG_CLONING | LOG_SHUTTLE)
|
||||
|
||||
#define LOGSRC_CLIENT "Client"
|
||||
#define LOGSRC_MOB "Mob"
|
||||
|
||||
@@ -148,6 +148,9 @@
|
||||
if (CONFIG_GET(flag/log_vote))
|
||||
WRITE_LOG(GLOB.world_game_log, "VOTE: [text]")
|
||||
|
||||
/proc/log_shuttle(text)
|
||||
if (CONFIG_GET(flag/log_shuttle))
|
||||
WRITE_LOG(GLOB.world_shuttle_log, "SHUTTLE: [text]")
|
||||
|
||||
/proc/log_topic(text)
|
||||
WRITE_LOG(GLOB.world_game_log, "TOPIC: [text]")
|
||||
|
||||
@@ -40,6 +40,8 @@ GLOBAL_VAR(world_paper_log)
|
||||
GLOBAL_PROTECT(world_paper_log)
|
||||
GLOBAL_VAR(tgui_log)
|
||||
GLOBAL_PROTECT(tgui_log)
|
||||
GLOBAL_VAR(world_shuttle_log)
|
||||
GLOBAL_PROTECT(world_shuttle_log)
|
||||
|
||||
GLOBAL_LIST_EMPTY(bombers)
|
||||
GLOBAL_PROTECT(bombers)
|
||||
|
||||
@@ -83,6 +83,8 @@
|
||||
|
||||
/datum/config_entry/flag/log_job_debug // log roundstart divide occupations debug information to a file
|
||||
|
||||
/datum/config_entry/flag/log_shuttle // log shuttle related actions, ie shuttle computers, shuttle manipulator, emergency console
|
||||
|
||||
/datum/config_entry/flag/allow_admin_ooccolor // Allows admins with relevant permissions to have their own ooc colour
|
||||
|
||||
/datum/config_entry/flag/allow_admin_asaycolor //Allows admins with relevant permissions to have a personalized asay color
|
||||
|
||||
@@ -144,9 +144,9 @@ SUBSYSTEM_DEF(shuttle)
|
||||
return //no players no autoevac
|
||||
|
||||
if(alive / total <= threshold)
|
||||
var/msg = "Automatically dispatching shuttle due to crew death."
|
||||
var/msg = "Automatically dispatching emergency shuttle due to crew death."
|
||||
message_admins(msg)
|
||||
log_game("[msg] Alive: [alive], Roundstart: [total], Threshold: [threshold]")
|
||||
log_shuttle("[msg] Alive: [alive], Roundstart: [total], Threshold: [threshold]")
|
||||
emergencyNoRecall = TRUE
|
||||
priority_announce("Catastrophic casualties detected: crisis shuttle protocols activated - jamming recall signals across all frequencies.")
|
||||
if(emergency.timeLeft(1) > emergencyCallTime * 0.4)
|
||||
@@ -234,11 +234,11 @@ SUBSYSTEM_DEF(shuttle)
|
||||
|
||||
var/area/A = get_area(user)
|
||||
|
||||
log_game("[key_name(user)] has called the shuttle.")
|
||||
log_shuttle("[key_name(user)] has called the emergency shuttle.")
|
||||
deadchat_broadcast(" has called the shuttle at <span class='name'>[A.name]</span>.", "<span class='name'>[user.real_name]</span>", user)
|
||||
if(call_reason)
|
||||
SSblackbox.record_feedback("text", "shuttle_reason", 1, "[call_reason]")
|
||||
log_game("Shuttle call reason: [call_reason]")
|
||||
log_shuttle("Shuttle call reason: [call_reason]")
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has called the shuttle. (<A HREF='?_src_=holder;[HrefToken()];trigger_centcom_recall=1'>TRIGGER CENTCOM RECALL</A>)")
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/centcom_recall(old_timer, admiral_message)
|
||||
@@ -271,7 +271,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
/datum/controller/subsystem/shuttle/proc/cancelEvac(mob/user)
|
||||
if(canRecall())
|
||||
emergency.cancel(get_area(user))
|
||||
log_game("[key_name(user)] has recalled the shuttle.")
|
||||
log_shuttle("[key_name(user)] has recalled the shuttle.")
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has recalled the shuttle.")
|
||||
deadchat_broadcast(" has recalled the shuttle from <span class='name'>[get_area_name(user, TRUE)]</span>.", "<span class='name'>[user.real_name]</span>", user)
|
||||
return 1
|
||||
@@ -318,7 +318,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
if(callShuttle)
|
||||
if(EMERGENCY_IDLE_OR_RECALLED)
|
||||
emergency.request(null, set_coefficient = 2.5)
|
||||
log_game("There is no means of calling the shuttle anymore. Shuttle automatically called.")
|
||||
log_shuttle("There is no means of calling the emergency shuttle anymore. Shuttle automatically called.")
|
||||
message_admins("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.")
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/registerHostileEnvironment(datum/bad)
|
||||
|
||||
@@ -1103,6 +1103,8 @@
|
||||
log_game(log_text)
|
||||
if(LOG_MECHA)
|
||||
log_mecha(log_text)
|
||||
if(LOG_SHUTTLE)
|
||||
log_shuttle(log_text)
|
||||
else
|
||||
stack_trace("Invalid individual logging type: [message_type]. Defaulting to [LOG_GAME] (LOG_GAME).")
|
||||
log_game(log_text)
|
||||
|
||||
@@ -171,6 +171,7 @@
|
||||
D.adjust_money(-S.credit_cost)
|
||||
minor_announce("[usr.real_name] has purchased [S.name] for [S.credit_cost] credits.[S.extra_desc ? " [S.extra_desc]" : ""]" , "Shuttle Purchase")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] purchased [S.name].")
|
||||
log_shuttle("[key_name(usr)] has purchased [S.name].")
|
||||
SSblackbox.record_feedback("text", "shuttle_purchase", 1, "[S.name]")
|
||||
else
|
||||
to_chat(usr, "<span class='alert'>Insufficient credits.</span>")
|
||||
|
||||
+3
-1
@@ -25,7 +25,7 @@ GLOBAL_VAR(restart_counter)
|
||||
|
||||
SetupExternalRSC()
|
||||
|
||||
GLOB.config_error_log = GLOB.world_manifest_log = GLOB.world_pda_log = GLOB.world_job_debug_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = "data/logs/config_error.[GUID()].log" //temporary file used to record errors with loading config, moved to log directory once logging is set bl
|
||||
GLOB.config_error_log = GLOB.world_manifest_log = GLOB.world_pda_log = GLOB.world_job_debug_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = GLOB.world_shuttle_log = "data/logs/config_error.[GUID()].log" //temporary file used to record errors with loading config, moved to log directory once logging is set bl
|
||||
|
||||
make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once)
|
||||
|
||||
@@ -132,6 +132,7 @@ GLOBAL_VAR(restart_counter)
|
||||
GLOB.world_job_debug_log = "[GLOB.log_directory]/job_debug.log"
|
||||
GLOB.world_paper_log = "[GLOB.log_directory]/paper.log"
|
||||
GLOB.tgui_log = "[GLOB.log_directory]/tgui.log"
|
||||
GLOB.world_shuttle_log = "[GLOB.log_directory]/shuttle.log"
|
||||
|
||||
#ifdef UNIT_TESTS
|
||||
GLOB.test_log = file("[GLOB.log_directory]/tests.log")
|
||||
@@ -147,6 +148,7 @@ GLOBAL_VAR(restart_counter)
|
||||
start_log(GLOB.world_runtime_log)
|
||||
start_log(GLOB.world_job_debug_log)
|
||||
start_log(GLOB.tgui_log)
|
||||
start_log(GLOB.world_shuttle_log)
|
||||
|
||||
GLOB.changelog_hash = md5('html/changelog.html') //for telling if the changelog has changed recently
|
||||
if(fexists(GLOB.config_error_log))
|
||||
|
||||
@@ -90,6 +90,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
say("<span class='danger'>Launch sequence activated! Prepare for drop!!</span>")
|
||||
playsound(loc, 'sound/machines/warning-buzzer.ogg', 70, FALSE)
|
||||
launch_warning = FALSE
|
||||
log_shuttle("[key_name(usr)] has launched the auxillary base.")
|
||||
else if(!shuttle_error)
|
||||
say("Shuttle request uploaded. Please stand away from the doors.")
|
||||
else
|
||||
@@ -342,7 +343,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
for(var/i in 1 to landing_turfs.len) //You land NEAR the base, not IN it.
|
||||
var/turf/L = landing_turfs[i]
|
||||
if(!L) //This happens at map edges
|
||||
to_chat(user, "<span class='warning'>Unable to secure a valid docking zone. Please try again in an open area near, but not within the aux. mining base.</span>")
|
||||
to_chat(user, "<span class='warning'>Unable to secure a valid docking zone. Please try again in an open area near, but not within the auxillary mining base.</span>")
|
||||
SSshuttle.stationary.Remove(Mport)
|
||||
qdel(Mport)
|
||||
return
|
||||
@@ -353,7 +354,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
return
|
||||
|
||||
if(mining_shuttle.canDock(Mport) != SHUTTLE_CAN_DOCK)
|
||||
to_chat(user, "<span class='warning'>Unable to secure a valid docking zone. Please try again in an open area near, but not within the aux. mining base.</span>")
|
||||
to_chat(user, "<span class='warning'>Unable to secure a valid docking zone. Please try again in an open area near, but not within the auxillary mining base.</span>")
|
||||
SSshuttle.stationary.Remove(Mport)
|
||||
qdel(Mport)
|
||||
return
|
||||
@@ -362,6 +363,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
to_chat(user, "<span class='notice'>Mining shuttle calibration successful! Shuttle interface available at base console.</span>")
|
||||
anchored = TRUE //Locks in place to mark the landing zone.
|
||||
playsound(loc, 'sound/machines/ping.ogg', 50, FALSE)
|
||||
log_shuttle("[key_name(usr)] has registered the mining shuttle beacon at [COORD(landing_spot)].")
|
||||
|
||||
/obj/structure/mining_shuttle_beacon/proc/clear_cooldown()
|
||||
anti_spam_cd = 0
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1))
|
||||
if(0)
|
||||
say("Shuttle departing. Please stand away from the doors.")
|
||||
log_shuttle("[key_name(usr)] has sent shuttle \"[M]\" towards \"[href_list["move"]]\", using [src].")
|
||||
if(1)
|
||||
to_chat(usr, "<span class='warning'>Invalid shuttle requested.</span>")
|
||||
else
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
authorized += ID
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has authorized early shuttle launch")
|
||||
log_game("[key_name(user)] has authorized early shuttle launch in [COORD(src)]")
|
||||
log_shuttle("[key_name(user)] has authorized early shuttle launch in [COORD(src)]")
|
||||
// Now check if we're on our way
|
||||
. = TRUE
|
||||
process()
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
var/time = TIME_LEFT
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has emagged the emergency shuttle [time] seconds before launch.")
|
||||
log_game("[key_name(user)] has emagged the emergency shuttle in [COORD(src)] [time] seconds before launch.")
|
||||
log_shuttle("[key_name(user)] has emagged the emergency shuttle in [COORD(src)] [time] seconds before launch.")
|
||||
|
||||
ENABLE_BITFIELD(obj_flags, EMAGGED)
|
||||
SSshuttle.emergency.movement_force = list("KNOCKDOWN" = 60, "THROW" = 20)//YOUR PUNY SEATBELTS can SAVE YOU NOW, MORTAL
|
||||
|
||||
@@ -33,8 +33,10 @@ All ShuttleMove procs go here
|
||||
M.stop_pulling()
|
||||
M.visible_message("<span class='warning'>[shuttle] slams into [M]!</span>")
|
||||
SSblackbox.record_feedback("tally", "shuttle_gib", 1, M.type)
|
||||
log_attack("[key_name(M)] was shuttle gibbed by [shuttle].")
|
||||
M.gib()
|
||||
|
||||
|
||||
else //non-living mobs shouldn't be affected by shuttles, which is why this is an else
|
||||
if(istype(thing, /obj/singularity) && !istype(thing, /obj/singularity/narsie)) //it's a singularity but not a god, ignore it.
|
||||
continue
|
||||
|
||||
@@ -140,6 +140,9 @@ LOG_VIRUS
|
||||
## log cloning actions
|
||||
LOG_CLONING
|
||||
|
||||
# log shuttle actions
|
||||
LOG_SHUTTLE
|
||||
|
||||
##Log camera pictures - Must have picture logging enabled
|
||||
PICTURE_LOGGING_CAMERA
|
||||
|
||||
|
||||
Reference in New Issue
Block a user