diff --git a/dfhack.init-example b/dfhack.init-example index 8c8289595..3542956ce 100644 --- a/dfhack.init-example +++ b/dfhack.init-example @@ -268,3 +268,10 @@ view-item-info enable # a replacement for the "load game" screen gui/load-screen enable + +############################## +# Extra DFHack command files # +############################## + +# Run commands in this file when a world loads +sc-script add SC_WORLD_LOADED onLoad.init-example diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 1513e1dca..40c122de9 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -411,7 +411,7 @@ endif() install(FILES xml/symbols.xml DESTINATION ${DFHACK_DATA_DESTINATION}) #linux: share/dfhack #install the example autoexec file -install(FILES ../dfhack.init-example +install(FILES ../dfhack.init-example ../onLoad.init-example DESTINATION ${DFHACK_BINARY_DESTINATION}) install(TARGETS dfhack-run dfhack-client binpatch diff --git a/onLoad.init-example b/onLoad.init-example new file mode 100644 index 000000000..08dd536a7 --- /dev/null +++ b/onLoad.init-example @@ -0,0 +1,2 @@ +repeat -name warn-starving -time 10 -timeUnits days -command [ warn-starving ] +repeat -name warn-stuck-trees -time 10 -timeUnits days -command [ warn-stuck-trees ]