Skip to content

Commit

Permalink
Update runtime log to use rust_g
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhEugene committed Nov 26, 2023
1 parent db50e52 commit 17b451f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion code/_macros.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions mods/rust_g/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`
Expand Down
2 changes: 1 addition & 1 deletion test/check-paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" '(?<!<)<<(?!<)' -P
Expand Down

0 comments on commit 17b451f

Please sign in to comment.