mirror of
https://github.com/mt-mods/currency.git
synced 2024-11-26 14:23:44 +01:00
make basic income only happen in Survival mode
also cache the output of minetest.get_modpath()
This commit is contained in:
parent
8056fa6c18
commit
47bc762955
21
init.lua
21
init.lua
@ -1,13 +1,20 @@
|
|||||||
print(" Currency mod loading... ")
|
print(" Currency mod loading... ")
|
||||||
dofile(minetest.get_modpath("currency").."/craftitems.lua")
|
local modpath = minetest.get_modpath("currency")
|
||||||
|
|
||||||
|
dofile(modpath.."/craftitems.lua")
|
||||||
print("[Currency] Craft_items Loaded!")
|
print("[Currency] Craft_items Loaded!")
|
||||||
dofile(minetest.get_modpath("currency").."/shop.lua")
|
dofile(modpath.."/shop.lua")
|
||||||
print("[Currency] Shop Loaded!")
|
print("[Currency] Shop Loaded!")
|
||||||
dofile(minetest.get_modpath("currency").."/barter.lua")
|
dofile(modpath.."/barter.lua")
|
||||||
print("[Currency] Barter Loaded!")
|
print("[Currency] Barter Loaded!")
|
||||||
dofile(minetest.get_modpath("currency").."/safe.lua")
|
dofile(modpath.."/safe.lua")
|
||||||
print("[Currency] Safe Loaded!")
|
print("[Currency] Safe Loaded!")
|
||||||
dofile(minetest.get_modpath("currency").."/crafting.lua")
|
dofile(modpath.."/crafting.lua")
|
||||||
print("[Currency] Crafting Loaded!")
|
print("[Currency] Crafting Loaded!")
|
||||||
dofile(minetest.get_modpath("currency").."/income.lua")
|
|
||||||
print("[Currency] Income Loaded!")
|
if minetest.setting_getbool("creative_mode") then
|
||||||
|
print("[Currency] Creative mode in use, skipping basic income.")
|
||||||
|
else
|
||||||
|
dofile(modpath.."/income.lua")
|
||||||
|
print("[Currency] Income Loaded!")
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user