Amend main module code in modding guide

develop
Tachytaenius 2023-03-27 22:05:06 +01:00 committed by GitHub
parent b515b337ea
commit df51835b1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

@ -457,6 +457,8 @@ Ok, you're all set up! Now, let's take a look at an example
enabled = enabled or false enabled = enabled or false
function isEnabled() function isEnabled()
-- this function is for the enabled API, the script won't show up on the
-- control panel without it
return enabled return enabled
end end
@ -473,6 +475,10 @@ Ok, you're all set up! Now, let's take a look at an example
dfhack.run_command('enable', 'example-mod') dfhack.run_command('enable', 'example-mod')
end end
if dfhack_flags.module then
return
end
if not dfhack_flags.enable then if not dfhack_flags.enable then
print(dfhack.script_help()) print(dfhack.script_help())
print() print()