enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/data/levels ant.lua,1.18,1.18.2.1


From: Petr Machata <address@hidden>
Subject: [Enigma-cvs] enigma/data/levels ant.lua,1.18,1.18.2.1
Date: Sun, 12 Oct 2003 14:33:22 +0000

Update of /cvsroot/enigma/enigma/data/levels
In directory subversions:/tmp/cvs-serv28001

Modified Files:
      Tag: enigma0_80_rc
        ant.lua 
Log Message:

oxyd_custom, oxyd_col and oxyd_fla added.


Index: ant.lua
===================================================================
RCS file: /cvsroot/enigma/enigma/data/levels/ant.lua,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -C2 -d -r1.18 -r1.18.2.1
*** ant.lua     21 Jun 2003 18:00:57 -0000      1.18
--- ant.lua     12 Oct 2003 14:33:20 -0000      1.18.2.1
***************
*** 65,68 ****
--- 65,69 ----
  -- 2003-04-25 -- boolean tables
  -- 2003-06-19 -- render_puzzles accepts a 'kind' argument. Thanks to ralf!
+ -- 2003-10-09 -- oxyd_custom, oxyd_col and oxyd_fla added.
  
  
***************
*** 1358,1361 ****
--- 1359,1385 ----
  -- WRAPPED init.lua FUNCTIONS -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
-- -- --
  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
-- -- --
+ 
+ -- This somehow generalizes oxyd() from init.lua. You can pick your
+ -- own color and flavor of oxyd stone. If you omit 'acolor', or pass a
+ -- '' (empty string) instead, default value (or last time used value)
+ -- is used instead. Omitting aflavor or passing empty string as
+ -- aflavor results in using default or last used flavor.
+ 
+ function oxyd_custom(x,y,aflavor,acolor)
+    if ((not aflavor) or (aflavor=='')) then
+       aflavor = oxyd_default_flavor
+    end
+ 
+    if ((not acolor) or (acolor=='')) then
+       acolor = oxyd_current_color
+    end
+ 
+    oxyd_default_flavor = aflavor;
+    oxyd_current_color = acolor;
+ 
+    oxyd(x,y)
+ end
+ 
+ 
  -- these functions override common init.lua functions, giving them the power
  -- of ant.lua syntax -- that is, calling with list of coordinates,
***************
*** 1402,1405 ****
--- 1426,1433 ----
  document = Document
  wormhole = Wormhole
+ 
+ -- 'andvanced' oxyd functions
+ oxyd_col = cell{{{oxyd_custom, ''}}}
+ oxyd_fla = cell{{{oxyd_custom}}}
  
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]