diff --git a/code/__DEFINES/lag_switch.dm b/code/__DEFINES/lag_switch.dm index 2115ce4a5dd..2152d0d9a55 100644 --- a/code/__DEFINES/lag_switch.dm +++ b/code/__DEFINES/lag_switch.dm @@ -16,5 +16,8 @@ #define DISABLE_PARALLAX 7 /// Disables footsteps, TRAIT_BYPASS_MEASURES exempted #define DISABLE_FOOTSTEPS 8 - -#define MEASURES_AMOUNT 8 // The total number of switches defined above +// SKYRAT EDIT ADDITION +/// Stops people from changing things in the character creator. Entirely. +#define DISABLE_CREATOR 9 +// SKYRAT EDIT END +#define MEASURES_AMOUNT 9 // The total number of switches defined above // SKYRAT EDIT ADDITION diff --git a/code/__HELPERS/~skyrat_helpers/logging.dm b/code/__HELPERS/~skyrat_helpers/logging.dm index c13e01092ab..afee3626685 100644 --- a/code/__HELPERS/~skyrat_helpers/logging.dm +++ b/code/__HELPERS/~skyrat_helpers/logging.dm @@ -2,3 +2,10 @@ /proc/log_subtler(text) if (CONFIG_GET(flag/log_subtler)) WRITE_LOG(GLOB.world_game_log, "SUBTLER EMOTE: [text]") + +GLOBAL_VAR(character_creation_log) +GLOBAL_PROTECT(character_creation_log) + +//This logs subtler emotes in game.txt, if the conflig flag in config\skyrat\skyrat_config.txt is true. +/proc/log_creator(text) + WRITE_LOG(GLOB.character_creation_log, "CREATOR LOG: [text]") diff --git a/code/controllers/subsystem/lag_switch.dm b/code/controllers/subsystem/lag_switch.dm index 0c3780750ea..1b4fc9427b7 100644 --- a/code/controllers/subsystem/lag_switch.dm +++ b/code/controllers/subsystem/lag_switch.dm @@ -124,6 +124,13 @@ SUBSYSTEM_DEF(lag_switch) to_chat(world, span_boldannounce("Footstep sounds have been disabled for performance concerns.")) else to_chat(world, span_boldannounce("Footstep sounds have been re-enabled.")) + // SKYRAT EDIT ADDITION + if (DISABLE_CREATOR) + if (state) + to_chat(world, span_boldannounce("The character creator and preferences menu has been disabled for performance metrics.")) + else + to_chat(world, span_boldannounce("The character creatior has been re-enabled.")) + // SKYRAT EDIT END return TRUE diff --git a/code/game/world.dm b/code/game/world.dm index 29ee64a1bb3..8eddc6c29ff 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -156,6 +156,8 @@ GLOBAL_VAR(restart_counter) GLOB.world_shuttle_log = "[GLOB.log_directory]/shuttle.log" GLOB.filter_log = "[GLOB.log_directory]/filters.log" + GLOB.character_creation_log = "[GLOB.log_directory]/creator.log" // SKYRAT EDIT ADDITION + GLOB.demo_log = "[GLOB.log_directory]/demo.log" #ifdef UNIT_TESTS @@ -181,6 +183,8 @@ GLOBAL_VAR(restart_counter) start_log(GLOB.tgui_log) start_log(GLOB.world_shuttle_log) + start_log(GLOB.character_creation_log) // SKYRAT EDIT ADDITION + var/latest_changelog = file("[global.config.directory]/../html/changelogs/archive/" + time2text(world.timeofday, "YYYY-MM") + ".yml") GLOB.changelog_hash = fexists(latest_changelog) ? md5(latest_changelog) : 0 //for telling if the changelog has changed recently if(fexists(GLOB.config_error_log)) diff --git a/code/modules/admin/verbs/admingame.dm b/code/modules/admin/verbs/admingame.dm index 027b398ff0b..657b7092ef6 100644 --- a/code/modules/admin/verbs/admingame.dm +++ b/code/modules/admin/verbs/admingame.dm @@ -466,5 +466,6 @@ Traitors and the like can also be revived with the previous role mostly intact. dat += "Disable examine icons: [SSlag_switch.measures[DISABLE_USR_ICON2HTML] ? "On" : "Off"] - trait applies to examiner
" dat += "Disable parallax: [SSlag_switch.measures[DISABLE_PARALLAX] ? "On" : "Off"] - trait applies to character
" dat += "Disable footsteps: [SSlag_switch.measures[DISABLE_FOOTSTEPS] ? "On" : "Off"] - trait applies to character
" + dat += "Disable character creator: [SSlag_switch.measures[DISABLE_CREATOR] ? "On" : "Off"] - trait applies to all
" // SKRYAT EDIT ADDITION dat += "" usr << browse(dat.Join(), "window=lag_switch_panel;size=420x480") diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 594ef01b5fe..acd83e54467 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -210,6 +210,12 @@ GLOBAL_LIST_EMPTY(preferences_datums) if (.) return + if(SSlag_switch.measures[DISABLE_CREATOR] && action != "change_slot") + to_chat(usr, "The creator has been disabled. Please do not ahelp.") + return + + log_creator("[key_name(usr)] ACTED [action] | PREFERENCE: [params["preference"]] | VALUE: [params["value"]]") + switch (action) if ("change_slot") // Save existing character