diff --git a/code/_macros.dm b/code/_macros.dm index b4a22b3d029e7..6a1ce3fc97dfc 100644 --- a/code/_macros.dm +++ b/code/_macros.dm @@ -123,7 +123,10 @@ /// Common use #define legacy_chat(target, message) to_target(target, message) #define to_world(message) to_chat(world, message) -#define to_world_log(message) to_target(world.log, message) +// [SIERRA-EDIT] - RUST_G +// #define to_world_log(message) to_target(world.log, message) // SIERRA-EDIT - ORIGINAL +#define to_world_log(message) if (istext(world.log)) { rustg_log_write_formatted(world.log, message) } else { to_target(world.log, message) } +// [/SIERRA-EDIT] #define sound_to(target, sound) to_target(target, sound) #define image_to(target, image) to_target(target, image) #define show_browser(target, content, title) to_target(target, browse(content, title)) diff --git a/mods/rust_g/README.md b/mods/rust_g/README.md index 4ea389ecb470f..711c1e91e99a1 100644 --- a/mods/rust_g/README.md +++ b/mods/rust_g/README.md @@ -28,6 +28,7 @@ ID мода: RUST_G ### Изменения *кор кода* +- `code/_macros.dm`: `#define to_world_log` - `code/_helpers/logging.dm`: `/proc/game_log()` - `code/controllers/master.dm`: `/datum/controller/master/New()` - `code/controllers/subsystems/garbage.dm`: `/datum/controller/subsystem/garbage/Shutdown()` diff --git a/test/check-paths.sh b/test/check-paths.sh index 75f01ebf03c1d..e0f9fab965de1 100755 --- a/test/check-paths.sh +++ b/test/check-paths.sh @@ -38,7 +38,7 @@ exactly 115 "to_world uses" '\sto_world\(' exactly 0 "globals with leading /" '^/var' -P exactly 0 "globals without global sugar" '^var/(?!global/)' -P exactly 0 "apparent paths with trailing /" '\w/[,\)\n]' -P -exactly 50 "to_world_log uses" '\sto_world_log\(' +exactly $((50 + 1)) "to_world_log uses" '\sto_world_log\(' exactly 0 "world<< uses" 'world<<|world[[:space:]]<<' exactly 0 "world.log<< uses" 'world.log<<|world.log[[:space:]]<<' exactly 2 "<< uses" '(?