And so it begins...
This commit is contained in:
commit
1b8091e26b
55 changed files with 962 additions and 0 deletions
32
mods/artifact_story/init.lua
Normal file
32
mods/artifact_story/init.lua
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
artifact.story = {
|
||||
states = enum { -- We use an enum for this so that we can use relational operators to determine if the current state is before or after a target state.
|
||||
"loading", -- For mapgen
|
||||
"init", -- For the opening cutscene
|
||||
"pre_vix", -- The player doesn't have Vix yet
|
||||
"main", -- The main game state. Progress is managed by checkpoints here.
|
||||
"end", -- The game is over.
|
||||
}
|
||||
}
|
||||
local ns = artifact.story
|
||||
local db = minetest.get_mod_storage()
|
||||
|
||||
local state = db:get_int("state") -- Defaults to zero, i.e. "loading".
|
||||
|
||||
function ns.set_state(to)
|
||||
state = to
|
||||
db:set_int("state", state)
|
||||
end
|
||||
|
||||
function ns.get_state()
|
||||
return state
|
||||
end
|
||||
|
||||
function ns.before_state(target)
|
||||
|
||||
end
|
||||
|
||||
minetest.register_globalstep(function()
|
||||
if state == "init" then
|
||||
|
||||
end
|
||||
end)
|
||||
2
mods/artifact_story/mod.conf
Normal file
2
mods/artifact_story/mod.conf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
name = artifact_story
|
||||
depends = artifact_base
|
||||
Loading…
Add table
Add a link
Reference in a new issue