diff --git a/code/__defines/~mods/rust_g.dm b/code/__defines/~mods/rust_g.dm index 9f7f58e971b62..595590143dbd0 100644 --- a/code/__defines/~mods/rust_g.dm +++ b/code/__defines/~mods/rust_g.dm @@ -148,6 +148,9 @@ #define rustg_log_write(fname, text, format) RUSTG_CALL(RUST_G, "log_write")(fname, text, format) /proc/rustg_log_close_all() return RUSTG_CALL(RUST_G, "log_close_all")() +#define rustg_log_write_formatted(log, text) rustg_log_write(log, text, "true") +#define rustg_log_write_no_format(log, text) rustg_log_write(log, text, "false") + #define rustg_noise_get_at_coordinates(seed, x, y) RUSTG_CALL(RUST_G, "noise_get_at_coordinates")(seed, x, y) #define rustg_sql_connect_pool(options) RUSTG_CALL(RUST_G, "sql_connect_pool")(options) diff --git a/code/_helpers/logging.dm b/code/_helpers/logging.dm index 3e7d1fd10b2de..946a56ed365b3 100644 --- a/code/_helpers/logging.dm +++ b/code/_helpers/logging.dm @@ -30,7 +30,10 @@ var/global/log_end= world.system_type == UNIX ? ascii2text(13) : "" to_world_log("## TESTING: [msg][log_end]") /proc/game_log(category, text) - to_file(global.diary, "\[[time_stamp()]] [game_id] [category]: [text][log_end]") + // [SIERRA-EDIT] - RUST_G + // to_file(global.diary, "\[[time_stamp()]] [game_id] [category]: [text][log_end]") // SIERRA-EDIT - ORIGINAL + rustg_log_write_formatted("[GLOB.log_directory]/game.log", "[category]: [text]") + // [/SIERRA-EDIT] /proc/log_admin(text) GLOB.admin_log.Add(text) diff --git a/code/controllers/master.dm b/code/controllers/master.dm index 095f3e0c0c7dc..023d5398c2139 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -66,8 +66,12 @@ var/global/datum/controller/master/Master = new /datum/controller/master/New() Uptime() //Uptime as close to boot as possible to set its statics + // [SIERRA-REMOVE] - RUST_G + /* if (!global.diary) global.diary = file("data/logs/[time2text(world.timeofday, "YYYY/MM/DD", -world.timezone)].log") + */ + // [/SIERRA-REMOVE] if (!config) config = new total_run_times = list() diff --git a/code/controllers/subsystems/garbage.dm b/code/controllers/subsystems/garbage.dm index 9cae056c008fa..eda564eac736c 100644 --- a/code/controllers/subsystems/garbage.dm +++ b/code/controllers/subsystems/garbage.dm @@ -65,8 +65,11 @@ SUBSYSTEM_DEF(garbage) qdel_log += "\tSleeps: [details.slept_destroy]" if (details.no_hint) qdel_log += "\tNo hint: [details.no_hint] times" - var/log_file = file("[GLOB.log_directory]/qdel.log") - to_file(log_file, jointext(qdel_log, "\n")) + // [SIERRA-EDIT] + // var/log_file = file("[GLOB.log_directory]/qdel.log") // SIERRA-EDIT - ORIGINAL + // to_file(log_file, jointext(qdel_log, "\n")) // SIERRA-EDIT - ORIGINAL + rustg_log_write_formatted("[GLOB.log_directory]/qdel.log", jointext(qdel_log, "\n")) + // [/SIERRA-EDIT] /datum/controller/subsystem/garbage/Initialize(start_uptime) diff --git a/code/game/world.dm b/code/game/world.dm index 97abf5ef9109b..6f94b6c1fcb91 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -81,7 +81,13 @@ GLOBAL_VAR(href_logfile) SetupLogs() var/date_string = time2text(world.realtime, "YYYY/MM/DD") - to_file(global.diary, "[log_end]\n[log_end]\nStarting up. (ID: [game_id]) [time2text(world.timeofday, "hh:mm.ss")][log_end]\n---------------------[log_end]") + // [SIERRA-EDIT] - RUST_G + // to_file(global.diary, "[log_end]\n[log_end]\nStarting up. (ID: [game_id]) [time2text(world.timeofday, "hh:mm.ss")][log_end]\n---------------------[log_end]") // SIERRA-EDIT - ORIGINAL + + // Do not use `game_log` anywhere else! Use `log_game`! + game_log(global.diary, "\n\nStarting up. (ID: [game_id]) [time2text(world.timeofday, "hh:mm.ss")]\n---------------------") + // [/SIERRA-EDIT] + if (config) if (config.server_name) diff --git a/mods/rust_g/README.md b/mods/rust_g/README.md index c607f2340f9e6..4c7cbd19a9db5 100644 --- a/mods/rust_g/README.md +++ b/mods/rust_g/README.md @@ -50,7 +50,57 @@ ID мода: RUST_G ### Дефайны -- `code/__defines/~mods/rust_g.dm`: `RUST_G_SPEED_MULTIPLIER`, `RUST_G_SPEED_BASE` +- `code/__defines/~mods/rust_g.dm`: + - `RUST_G` + - `RUSTG_OVERRIDE_BUILTINS` + - `RUSTG_CALL` + - `rustg_setup_acreplace` + - `rustg_setup_acreplace_with_options` + - `rustg_acreplace` + - `rustg_acreplace_with_replacements` + - `rustg_cnoise_generate` + - `rustg_dmi_strip_metadata` + - `rustg_dmi_create_png` + - `rustg_dmi_resize_png` + - `rustg_dmi_icon_states` + - `rustg_file_read` + - `rustg_file_exists` + - `rustg_file_write` + - `rustg_file_append` + - `rustg_file_get_line_count` + - `rustg_file_seek_line` + - `rustg_git_revparse` + - `rustg_git_commit_date` + - `RUSTG_HTTP_METHOD_GET` + - `RUSTG_HTTP_METHOD_PUT` + - `RUSTG_HTTP_METHOD_DELETE` + - `RUSTG_HTTP_METHOD_PATCH` + - `RUSTG_HTTP_METHOD_HEAD` + - `RUSTG_HTTP_METHOD_POST` + - `rustg_http_request_blocking` + - `rustg_http_request_async` + - `rustg_http_check_request` + - `RUSTG_JOB_NO_RESULTS_YET` + - `RUSTG_JOB_NO_SUCH_JOB` + - `RUSTG_JOB_ERROR` + - `rustg_json_is_valid` + - `rustg_log_write` + - `rustg_log_write_formatted` + - `rustg_log_write_no_format` + - `rustg_noise_get_at_coordinates` + - `rustg_sql_connect_pool` + - `rustg_sql_query_async` + - `rustg_sql_query_blocking` + - `rustg_sql_connected` + - `rustg_sql_disconnect_pool` + - `rustg_sql_check_query` + - `rustg_time_microseconds` + - `rustg_time_milliseconds` + - `rustg_time_reset` + - `rustg_raw_read_toml_file` + - `rustg_raw_toml_encode` + - `rustg_url_encode` + - `rustg_url_decode`