/[enigma]/enigma/data/init.lua
ViewVC logotype

Diff of /enigma/data/init.lua

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by dheck, Sun Jan 12 19:51:18 2003 UTC revision 1.4 by dheck, Wed Feb 26 11:27:00 2003 UTC
# Line 50  function options.LevelStat (key, stat) Line 50  function options.LevelStat (key, stat)
50      status:delete()      status:delete()
51  end  end
52    
53  ---------------  ---------------------
54  -- Functions --  -- Helper routines --
55  ---------------  ---------------------
56    
57    function PrintTable(t)
58        for i,v in t do
59            if type(v)=="table" then
60                print (i.." - "..v[1]..","..v[2])
61            else
62                print (i.." - "..v)
63            end
64        end
65    end
66    
67    function Require(filename)
68        dofile(enigma.FindDataFile(filename))
69    end
70    
71    
72    ----------------------------------
73    -- Routines for creating levels --
74    ----------------------------------
75    
76  function CreateWorld(w, h)  function CreateWorld(w, h)
77      oxyd_default_flavor = "b"      oxyd_default_flavor = "b"
# Line 68  function CreateWorld(w, h) Line 87  function CreateWorld(w, h)
87      enigma.ConserveLevel = TRUE      enigma.ConserveLevel = TRUE
88  end  end
89    
90    
91  function SetDefaultAttribs(objname, attribs)  function SetDefaultAttribs(objname, attribs)
92      local list = DefaultAttribs[objname]      local list = DefaultAttribs[objname]
93      if list then      if list then
94          for key,val in attribs do list[key] = val end          for key,val in attribs do list[key] = val end
95      else DefaultAttribs[objname]= attribs      else
96            DefaultAttribs[objname]= attribs
97      end      end
98  end  end
99    
# Line 306  function Wormhole(x,y,targetx, targety, Line 327  function Wormhole(x,y,targetx, targety,
327      set_item("it-wormhole", x,y, attrs)      set_item("it-wormhole", x,y, attrs)
328  end  end
329    
330  function doorh(x,y,attrs)  function Doorh(x,y,attrs)
331      local attrs = attrs or {}      local attrs = attrs or {}
332      attrs.type="h"      attrs.type="h"
333      set_stone("st-door",x,y,attrs)      set_stone("st-door",x,y,attrs)
334  end  end
335  function doorv(x,y,attrs)  function Doorv(x,y,attrs)
336      local attrs = attrs or {}      local attrs = attrs or {}
337      attrs.type="v"      attrs.type="v"
338      set_stone("st-door",x,y,attrs)      set_stone("st-door",x,y,attrs)
# Line 353  FLAT_FORCE_N    = 22 Line 374  FLAT_FORCE_N    = 22
374  FLAT_FORCE_E    = 23  FLAT_FORCE_E    = 23
375  FLAT_FORCE_W    = 24  FLAT_FORCE_W    = 24
376    
377  function gradient( x, y, type )  function Gradient( x, y, type )
378      set_floor( "fl-gradient", x, y, {type=type} )      set_floor( "fl-gradient", x, y, {type=type} )
379  end  end
380    
# Line 419  set_attrib = SetAttrib Line 440  set_attrib = SetAttrib
440  make_object = MakeObject  make_object = MakeObject
441    
442  document = Document  document = Document
443    doorh    = Doorh
444    doorv    = Doorv
445    gradient = Gradient
446  wormhole = Wormhole  wormhole = Wormhole

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26