mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Merge pull request #4818 from yogstation13/upstream-merge-43168
[MIRROR] [s] adds logging to cloning
This commit is contained in:
@@ -37,6 +37,7 @@
|
|||||||
#define LOG_ASAY (1 << 14)
|
#define LOG_ASAY (1 << 14)
|
||||||
#define LOG_MECHA (1 << 15)
|
#define LOG_MECHA (1 << 15)
|
||||||
#define LOG_VIRUS (1 << 16)
|
#define LOG_VIRUS (1 << 16)
|
||||||
|
#define LOG_CLONING (1 << 17)
|
||||||
|
|
||||||
//Individual logging panel pages
|
//Individual logging panel pages
|
||||||
#define INDIVIDUAL_ATTACK_LOG (LOG_ATTACK)
|
#define INDIVIDUAL_ATTACK_LOG (LOG_ATTACK)
|
||||||
|
|||||||
@@ -66,6 +66,10 @@
|
|||||||
if (CONFIG_GET(flag/log_virus))
|
if (CONFIG_GET(flag/log_virus))
|
||||||
WRITE_LOG(GLOB.world_virus_log, "VIRUS: [text]")
|
WRITE_LOG(GLOB.world_virus_log, "VIRUS: [text]")
|
||||||
|
|
||||||
|
/proc/log_cloning(text, mob/initiator)
|
||||||
|
if(CONFIG_GET(flag/log_cloning))
|
||||||
|
WRITE_LOG(GLOB.world_cloning_log, "CLONING: [text]")
|
||||||
|
|
||||||
/proc/log_asset(text)
|
/proc/log_asset(text)
|
||||||
WRITE_LOG(GLOB.world_asset_log, "ASSET: [text]")
|
WRITE_LOG(GLOB.world_asset_log, "ASSET: [text]")
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ GLOBAL_VAR(world_virus_log)
|
|||||||
GLOBAL_PROTECT(world_virus_log)
|
GLOBAL_PROTECT(world_virus_log)
|
||||||
GLOBAL_VAR(world_asset_log)
|
GLOBAL_VAR(world_asset_log)
|
||||||
GLOBAL_PROTECT(world_asset_log)
|
GLOBAL_PROTECT(world_asset_log)
|
||||||
|
GLOBAL_VAR(world_cloning_log)
|
||||||
|
GLOBAL_PROTECT(world_cloning_log)
|
||||||
|
|
||||||
GLOBAL_LIST_EMPTY(bombers)
|
GLOBAL_LIST_EMPTY(bombers)
|
||||||
GLOBAL_PROTECT(bombers)
|
GLOBAL_PROTECT(bombers)
|
||||||
|
|||||||
@@ -42,6 +42,8 @@
|
|||||||
|
|
||||||
/datum/config_entry/flag/log_virus // log virology data
|
/datum/config_entry/flag/log_virus // log virology data
|
||||||
|
|
||||||
|
/datum/config_entry/flag/log_cloning // log cloning actions.
|
||||||
|
|
||||||
/datum/config_entry/flag/log_vote // log voting
|
/datum/config_entry/flag/log_vote // log voting
|
||||||
|
|
||||||
/datum/config_entry/flag/log_whisper // log client whisper
|
/datum/config_entry/flag/log_whisper // log client whisper
|
||||||
|
|||||||
@@ -237,17 +237,20 @@
|
|||||||
|
|
||||||
if(!is_operational()) //Autoeject if power is lost
|
if(!is_operational()) //Autoeject if power is lost
|
||||||
if(mob_occupant)
|
if(mob_occupant)
|
||||||
|
log_cloning("[mob_occupant] ejected from [src] at [AREACOORD(src)] due to power loss.")
|
||||||
go_out()
|
go_out()
|
||||||
connected_message("Clone Ejected: Loss of power.")
|
connected_message("Clone Ejected: Loss of power.")
|
||||||
|
|
||||||
else if(mob_occupant && (mob_occupant.loc == src))
|
else if(mob_occupant && (mob_occupant.loc == src))
|
||||||
if(SSeconomy.full_ancap)
|
if(SSeconomy.full_ancap)
|
||||||
if(!current_insurance)
|
if(!current_insurance)
|
||||||
|
log_cloning("[mob_occupant] ejected from [src] at [AREACOORD(src)] due to invalid bank account.")
|
||||||
go_out()
|
go_out()
|
||||||
connected_message("Clone Ejected: No bank account.")
|
connected_message("Clone Ejected: No bank account.")
|
||||||
if(internal_radio)
|
if(internal_radio)
|
||||||
SPEAK("The cloning of [mob_occupant.real_name] has been terminated due to no bank account to draw payment from.")
|
SPEAK("The cloning of [mob_occupant.real_name] has been terminated due to no bank account to draw payment from.")
|
||||||
else if(!current_insurance.adjust_money(-fair_market_price))
|
else if(!current_insurance.adjust_money(-fair_market_price))
|
||||||
|
log_cloning("[mob_occupant] ejected from [src] at [AREACOORD(src)] due to insufficient funds.")
|
||||||
go_out()
|
go_out()
|
||||||
connected_message("Clone Ejected: Out of Money.")
|
connected_message("Clone Ejected: Out of Money.")
|
||||||
if(internal_radio)
|
if(internal_radio)
|
||||||
@@ -261,6 +264,7 @@
|
|||||||
if(internal_radio)
|
if(internal_radio)
|
||||||
SPEAK("The cloning of [mob_occupant.real_name] has been \
|
SPEAK("The cloning of [mob_occupant.real_name] has been \
|
||||||
aborted due to unrecoverable tissue failure.")
|
aborted due to unrecoverable tissue failure.")
|
||||||
|
log_cloning("[mob_occupant] ejected from [src] at [AREACOORD(src)] after suiciding.")
|
||||||
go_out()
|
go_out()
|
||||||
|
|
||||||
else if(mob_occupant && mob_occupant.cloneloss > (100 - heal_level))
|
else if(mob_occupant && mob_occupant.cloneloss > (100 - heal_level))
|
||||||
@@ -288,6 +292,7 @@
|
|||||||
|
|
||||||
else if(mob_occupant && (mob_occupant.cloneloss <= (100 - heal_level)))
|
else if(mob_occupant && (mob_occupant.cloneloss <= (100 - heal_level)))
|
||||||
connected_message("Cloning Process Complete.")
|
connected_message("Cloning Process Complete.")
|
||||||
|
log_cloning("[mob_occupant] completed cloning cycle - [src] at [AREACOORD(src)].")
|
||||||
if(internal_radio)
|
if(internal_radio)
|
||||||
SPEAK("The cloning cycle of [mob_occupant.real_name] is complete.")
|
SPEAK("The cloning cycle of [mob_occupant.real_name] is complete.")
|
||||||
|
|
||||||
@@ -347,6 +352,8 @@
|
|||||||
to_chat(user, "<span class='danger'>Error: Pod has no occupant.</span>")
|
to_chat(user, "<span class='danger'>Error: Pod has no occupant.</span>")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
|
log_cloning("[user] manually ejected [mob_occupant] from [src] at [AREACOORD(src)].")
|
||||||
|
log_combat(user, mob_occupant, "ejected", W, "from [src]")
|
||||||
connected_message("Emergency Ejection")
|
connected_message("Emergency Ejection")
|
||||||
SPEAK("An emergency ejection of [clonemind.name] has occurred. Survival not guaranteed.")
|
SPEAK("An emergency ejection of [clonemind.name] has occurred. Survival not guaranteed.")
|
||||||
to_chat(user, "<span class='notice'>You force an emergency ejection. </span>")
|
to_chat(user, "<span class='notice'>You force an emergency ejection. </span>")
|
||||||
@@ -359,6 +366,8 @@
|
|||||||
return
|
return
|
||||||
to_chat(user, "<span class='warning'>You corrupt the genetic compiler.</span>")
|
to_chat(user, "<span class='warning'>You corrupt the genetic compiler.</span>")
|
||||||
malfunction()
|
malfunction()
|
||||||
|
log_cloning("[user] emagged [src] at [AREACOORD(src)], causing it to malfunction.")
|
||||||
|
log_combat(user, src, "emagged", null, occupant ? "[occupant] inside, killing them via malfunction." : null)
|
||||||
|
|
||||||
//Put messages in the connected computer's temp var for display.
|
//Put messages in the connected computer's temp var for display.
|
||||||
/obj/machinery/clonepod/proc/connected_message(message)
|
/obj/machinery/clonepod/proc/connected_message(message)
|
||||||
@@ -426,8 +435,9 @@
|
|||||||
mob_occupant.grab_ghost() // We really just want to make you suffer.
|
mob_occupant.grab_ghost() // We really just want to make you suffer.
|
||||||
flash_color(mob_occupant, flash_color="#960000", flash_time=100)
|
flash_color(mob_occupant, flash_color="#960000", flash_time=100)
|
||||||
to_chat(mob_occupant, "<span class='warning'><b>Agony blazes across your consciousness as your body is torn apart.</b><br><i>Is this what dying is like? Yes it is.</i></span>")
|
to_chat(mob_occupant, "<span class='warning'><b>Agony blazes across your consciousness as your body is torn apart.</b><br><i>Is this what dying is like? Yes it is.</i></span>")
|
||||||
playsound(loc, 'sound/machines/warning-buzzer.ogg', 50, 0)
|
playsound(src, 'sound/machines/warning-buzzer.ogg', 50)
|
||||||
SEND_SOUND(mob_occupant, sound('sound/hallucinations/veryfar_noise.ogg',0,1,50))
|
SEND_SOUND(mob_occupant, sound('sound/hallucinations/veryfar_noise.ogg',0,1,50))
|
||||||
|
log_cloning("[mob_occupant] destroyed within [src] at [AREACOORD(src)] due to malfunction.")
|
||||||
QDEL_IN(mob_occupant, 40)
|
QDEL_IN(mob_occupant, 40)
|
||||||
|
|
||||||
/obj/machinery/clonepod/relaymove(mob/user)
|
/obj/machinery/clonepod/relaymove(mob/user)
|
||||||
@@ -442,6 +452,7 @@
|
|||||||
if (!(. & EMP_PROTECT_SELF))
|
if (!(. & EMP_PROTECT_SELF))
|
||||||
var/mob/living/mob_occupant = occupant
|
var/mob/living/mob_occupant = occupant
|
||||||
if(mob_occupant && prob(100/(severity*efficiency)))
|
if(mob_occupant && prob(100/(severity*efficiency)))
|
||||||
|
log_cloning("[mob_occupant] ejected from [src] at [AREACOORD(src)] due to EMP pulse.")
|
||||||
connected_message(Gibberish("EMP-caused Accidental Ejection", 0))
|
connected_message(Gibberish("EMP-caused Accidental Ejection", 0))
|
||||||
SPEAK(Gibberish("Exposure to electromagnetic fields has caused the ejection of [mob_occupant.real_name] prematurely." ,0))
|
SPEAK(Gibberish("Exposure to electromagnetic fields has caused the ejection of [mob_occupant.real_name] prematurely." ,0))
|
||||||
go_out()
|
go_out()
|
||||||
@@ -458,10 +469,10 @@
|
|||||||
|
|
||||||
/obj/machinery/clonepod/proc/horrifyingsound()
|
/obj/machinery/clonepod/proc/horrifyingsound()
|
||||||
for(var/i in 1 to 5)
|
for(var/i in 1 to 5)
|
||||||
playsound(loc,pick('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg'), 100, rand(0.95,1.05))
|
playsound(src,pick('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg'), 100, rand(0.95,1.05))
|
||||||
sleep(1)
|
sleep(1)
|
||||||
sleep(10)
|
sleep(10)
|
||||||
playsound(loc,'sound/hallucinations/wail.ogg',100,1)
|
playsound(src,'sound/hallucinations/wail.ogg', 100, TRUE)
|
||||||
|
|
||||||
/obj/machinery/clonepod/deconstruct(disassembled = TRUE)
|
/obj/machinery/clonepod/deconstruct(disassembled = TRUE)
|
||||||
if(occupant)
|
if(occupant)
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#define AUTOCLONING_MINIMAL_LEVEL 3
|
#define AUTOCLONING_MINIMAL_LEVEL 3
|
||||||
|
|
||||||
/obj/machinery/computer/cloning
|
/obj/machinery/computer/cloning
|
||||||
@@ -85,9 +84,10 @@
|
|||||||
var/result = grow_clone_from_record(pod, R)
|
var/result = grow_clone_from_record(pod, R)
|
||||||
if(result & CLONING_SUCCESS)
|
if(result & CLONING_SUCCESS)
|
||||||
temp = "[R.fields["name"]] => <font class='good'>Cloning cycle in progress...</font>"
|
temp = "[R.fields["name"]] => <font class='good'>Cloning cycle in progress...</font>"
|
||||||
|
log_cloning("Cloning of [R.fields["name"]] automatically started via autoprocess - [src] at [AREACOORD(src)]. Pod: [pod] at [AREACOORD(pod)].")
|
||||||
if(result & CLONING_DELETE_RECORD)
|
if(result & CLONING_DELETE_RECORD)
|
||||||
records -= R
|
records -= R
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/cloning/proc/updatemodules(findfirstcloner)
|
/obj/machinery/computer/cloning/proc/updatemodules(findfirstcloner)
|
||||||
scanner = findscanner()
|
scanner = findscanner()
|
||||||
@@ -355,7 +355,7 @@
|
|||||||
|
|
||||||
spawn(20)
|
spawn(20)
|
||||||
scan_occupant(scanner.occupant)
|
scan_occupant(scanner.occupant)
|
||||||
|
|
||||||
loading = FALSE
|
loading = FALSE
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||||
@@ -395,11 +395,12 @@
|
|||||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
|
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
|
||||||
else
|
else
|
||||||
temp = "Access Denied"
|
temp = "Access Denied"
|
||||||
menu = 2
|
menu = 2
|
||||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||||
|
|
||||||
|
|
||||||
else if (menu == 4)
|
else if (menu == 4)
|
||||||
|
log_cloning("[usr] deleted [active_record.fields["name"]]'s cloning records from [src] at [AREACOORD(src)].")
|
||||||
temp = "[active_record.fields["name"]] => Record deleted."
|
temp = "[active_record.fields["name"]] => Record deleted."
|
||||||
records.Remove(active_record)
|
records.Remove(active_record)
|
||||||
active_record = null
|
active_record = null
|
||||||
@@ -409,7 +410,7 @@
|
|||||||
else if (href_list["disk"]) //Load or eject.
|
else if (href_list["disk"]) //Load or eject.
|
||||||
switch(href_list["disk"])
|
switch(href_list["disk"])
|
||||||
if("load")
|
if("load")
|
||||||
|
|
||||||
|
|
||||||
if (!diskette || !istype(diskette.fields))
|
if (!diskette || !istype(diskette.fields))
|
||||||
temp = "<font class='bad'>Load error.</font>"
|
temp = "<font class='bad'>Load error.</font>"
|
||||||
@@ -431,7 +432,8 @@
|
|||||||
overwrite_field_if_available(active_record, diskette, "UI")
|
overwrite_field_if_available(active_record, diskette, "UI")
|
||||||
if(include_se)
|
if(include_se)
|
||||||
overwrite_field_if_available(active_record, diskette, "SE")
|
overwrite_field_if_available(active_record, diskette, "SE")
|
||||||
|
|
||||||
|
log_cloning("[usr] uploaded [active_record.fields["name"]]'s cloning records to [src] at [AREACOORD(src)] via [diskette].")
|
||||||
temp = "Load successful."
|
temp = "Load successful."
|
||||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||||
|
|
||||||
@@ -447,6 +449,7 @@
|
|||||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
log_cloning("[usr] added [active_record.fields["name"]]'s cloning records to [diskette] via [src] at [AREACOORD(src)].")
|
||||||
diskette.fields = active_record.fields.Copy()
|
diskette.fields = active_record.fields.Copy()
|
||||||
diskette.name = "data disk - '[diskette.fields["name"]]'"
|
diskette.name = "data disk - '[diskette.fields["name"]]'"
|
||||||
temp = "Save successful."
|
temp = "Save successful."
|
||||||
@@ -484,6 +487,7 @@
|
|||||||
active_record = null
|
active_record = null
|
||||||
menu = 1
|
menu = 1
|
||||||
success = TRUE
|
success = TRUE
|
||||||
|
log_cloning("[usr] initiated cloning of [C.fields["name"]] - [src] at [AREACOORD(src)]. Pod: [pod] at [AREACOORD(pod)].")
|
||||||
if(result & CLONING_DELETE_RECORD)
|
if(result & CLONING_DELETE_RECORD)
|
||||||
if(active_record == C)
|
if(active_record == C)
|
||||||
active_record = null
|
active_record = null
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ GLOBAL_VAR(restart_counter)
|
|||||||
GLOB.world_game_log = "[GLOB.log_directory]/game.log"
|
GLOB.world_game_log = "[GLOB.log_directory]/game.log"
|
||||||
GLOB.world_mecha_log = "[GLOB.log_directory]/mecha.log"
|
GLOB.world_mecha_log = "[GLOB.log_directory]/mecha.log"
|
||||||
GLOB.world_virus_log = "[GLOB.log_directory]/virus.log"
|
GLOB.world_virus_log = "[GLOB.log_directory]/virus.log"
|
||||||
|
GLOB.world_cloning_log = "[GLOB.log_directory]/cloning.log"
|
||||||
GLOB.world_asset_log = "[GLOB.log_directory]/asset.log"
|
GLOB.world_asset_log = "[GLOB.log_directory]/asset.log"
|
||||||
GLOB.world_attack_log = "[GLOB.log_directory]/attack.log"
|
GLOB.world_attack_log = "[GLOB.log_directory]/attack.log"
|
||||||
GLOB.world_pda_log = "[GLOB.log_directory]/pda.log"
|
GLOB.world_pda_log = "[GLOB.log_directory]/pda.log"
|
||||||
@@ -209,7 +210,7 @@ GLOBAL_VAR(restart_counter)
|
|||||||
else
|
else
|
||||||
to_chat(world, "<span class='boldannounce'>Rebooting world...</span>")
|
to_chat(world, "<span class='boldannounce'>Rebooting world...</span>")
|
||||||
Master.Shutdown() //run SS shutdowns
|
Master.Shutdown() //run SS shutdowns
|
||||||
|
|
||||||
TgsReboot()
|
TgsReboot()
|
||||||
|
|
||||||
if(TEST_RUN_PARAMETER in params)
|
if(TEST_RUN_PARAMETER in params)
|
||||||
|
|||||||
@@ -140,6 +140,9 @@ LOG_MANIFEST
|
|||||||
## log virus and actions
|
## log virus and actions
|
||||||
LOG_VIRUS
|
LOG_VIRUS
|
||||||
|
|
||||||
|
## log cloning actions
|
||||||
|
LOG_CLONING
|
||||||
|
|
||||||
##Log camera pictures - Must have picture logging enabled
|
##Log camera pictures - Must have picture logging enabled
|
||||||
PICTURE_LOGGING_CAMERA
|
PICTURE_LOGGING_CAMERA
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user