From 7ad9a559fbd9ac46336d9e0689c0df4cc87e5eb9 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 15 Aug 2010 21:53:12 +0200 Subject: adjusted example rcs. added README --- .../tex/context/third/simpleslides/automata/automata-eca.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'module') diff --git a/module/tex/context/third/simpleslides/automata/automata-eca.lua b/module/tex/context/third/simpleslides/automata/automata-eca.lua index 95d1f71..27450ba 100644 --- a/module/tex/context/third/simpleslides/automata/automata-eca.lua +++ b/module/tex/context/third/simpleslides/automata/automata-eca.lua @@ -10,7 +10,11 @@ -------------------------------------------------------------------------------- -- -environment.loadluafile( "automata-life" ) +if context then + environment.loadluafile( "automata-life" ) +else + require "automata-life" +end local help = gol.helpers @@ -82,11 +86,11 @@ function eca.gen_frame(from, lines, rule) local cnt = 1 local c = mplife.setup.current - local new = { [1] = eca.stripcells(from, c.clip, c.diff ) } + local new = { [1] = eca.stripcells(from, c.clip, c.diff or 0 ) } repeat from = eca.next_line(from, rule) - table.insert( new, eca.stripcells(from, c.clip, c.diff) ) + table.insert( new, eca.stripcells(from, c.clip, c.diff or 0) ) cnt = cnt + 1 until cnt == lines return eca.next_line(from, rule), new -- cgit v1.2.3