Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Commit

Permalink
[Fix] Include 'START' in LNVL.VisitedScenes and LNVL.SceneHistory
Browse files Browse the repository at this point in the history
Because 'START' is always the first scene we should automatically add
it to these two tables, as no other code does so.  This allows us to
use 'START' as a valid precondition for scenes.
  • Loading branch information
Eric James Michael Ritz committed Apr 7, 2015
1 parent 48fef9b commit 6e7eee4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions LNVL.lua
Expand Up @@ -131,9 +131,12 @@ LNVL.CurrentScene = nil
-- each key is always 'true', allowing us to perform a simple look-up
-- to determine if we have already shown a scene or not.
--
-- Because LNVL requires all stories to have a 'START' scene we
-- automatically include it in the list of visited scenes.
--
-- N.B. This table does not represent the order in which we displayed
-- each scene.
LNVL.VisitedScenes = {}
LNVL.VisitedScenes = { ["START"] = true }
-- This table is a stack respresenting the exact order in which the
-- player has traversed through the scenes. Using various gameplay
Expand All @@ -149,7 +152,10 @@ LNVL.VisitedScenes = {}
--
-- to access each LNVL.Scene (as 'scene' above) in the order in which
-- the player encountered those scenes (indicated by 'index' above).
LNVL.SceneHistory = {}
--
-- This table contains the 'START' scene for the same reason given in
-- the commentary for the LNVL.VisitedScenes table.
LNVL.SceneHistory = { "START" }
-- This function loads all of the LNVL sub-modules, initializing the
-- engine. The argument, if given, must be a string that will be
Expand Down

0 comments on commit 6e7eee4

Please sign in to comment.