53 lines
1.4 KiB
Lua
Raw Normal View History

2018-12-20 20:40:01 +00:00
local mp = minetest.get_modpath(minetest.get_current_modname())
-- a reaction is a function that is called when a certain two solutions mix (or a solution and an item)
-- disasters are bad non-specific reactions
-- herbs are items gotten from leaves and used in making solutions
-- helpers are just helper functions
-- effects are things that happen when a beaker with solution is thrown
2018-12-23 17:36:23 -05:00
local s = minetest.get_mod_storage()
local ts = s:get_string("teleport_stones")
if ts ~= "" then
ts = minetest.deserialize(ts)
else
ts = {}
end
2018-12-20 20:40:01 +00:00
alchemy = {}
alchemy.solutions = {}
alchemy.reactions = {}
alchemy.disasters = {}
alchemy.herbs = {}
alchemy.helpers = {}
alchemy.effects = {}
2018-12-22 20:01:54 -05:00
alchemy.active_effects = {}
alchemy.effect_hud = {}
alchemy.hud = {}
2018-12-23 17:36:23 -05:00
alchemy.teleport_stones = ts
alchemy.save = function()
local ts = minetest.serialize(alchemy.teleport_stones)
s:set_string("teleport_stones", ts)
end
2018-12-20 20:40:01 +00:00
-- Load helper functions
dofile(mp .. "/helpers.lua")
2018-12-22 20:01:54 -05:00
-- Load HUD system
dofile(mp .. "/hud.lua")
2018-12-20 20:40:01 +00:00
-- Load registering functions
dofile(mp .. "/beakers.lua")
dofile(mp .. "/cauldron.lua")
dofile(mp .. "/herbs.lua")
-- Load reactions / disasters
dofile(mp .. "/reactions.lua")
dofile(mp .. "/disasters.lua")
-- Load solutions
dofile(mp .. "/solutions.lua")
dofile(mp .. "/effects.lua")
2018-12-23 17:36:23 -05:00
dofile(mp .. "/teleporting.lua")
2018-12-20 20:40:01 +00:00
-- Load plant processor
dofile(mp .. "/plant_processor.lua")
-- Load crafting recipes
dofile(mp .. "/crafting.lua")