Merge pull request #3114 from wolfboyft/patch-4

Amend main module code in modding guide
develop
Myk 2023-03-27 14:22:06 -07:00 committed by GitHub
commit f9a166b857
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
function isEnabled()
-- this function is for the enabled API, the script won't show up on the
-- control panel without it
return enabled
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')
end
if dfhack_flags.module then
return
end
if not dfhack_flags.enable then
print(dfhack.script_help())
print()