-- Items, a Testlevel for Enigma
-- Copyright (C) 2006 Raoul
-- Licensed under GPL v2.0 or above 
-- Alle Items zum testen

-- GENERAL --
levelw = 120
levelh = 13
create_world(levelw, levelh)
enigma.ConserveLevel = TRUE
display.SetFollowMode(display.FOLLOW_SCROLLING)

-- DESIGN --
boden="fl-sahara"
wand="st-glass"

-- FLOOR --
fill_floor(boden, 0,0,levelw,levelh)

-- STONES --
draw_border(wand)

-- ITEMS --
set_item("it-document", 10, 6, {text="many many many many Tools !"})

-- ACTORS --
actor1=set_actor("ac-blackball", 4.5,4.5, {player=0})


-- Funktionen
-- VARS
itemlist={"it-1pkillstone","it-2pkillstone","it-abyss","it-bag","it-banana","it-blackbomb","it-blackbomb_burning","it-blocker","it-blocker-new","it-booze","it-brake","it-bridge-oxyd","it-bridge-oxyd_active","it-brush","it-burnable","it-burnable_ash","it-burnable_burning","it-burnable_fireproof","it-burnable_ignited","it-changefloor","it-cherry","it-coffee","it-coin1","it-coin2","it-coin4","it-crack1","it-cross","it-debris","it-document","it-drop","it-dummy","it-dynamite","it-easykeepstone","it-easykillstone","it-explosion1","it-explosion2","it-explosion3","it-extinguisher","it-extinguisher_empty","it-extinguisher_medium","it-extralife","it-flagblack","it-flagwhite","it-floppy","it-glasses","it-glasses-broken","it-hammer","it-hill","it-hollow","it-hstrip","it-inversesensor","it-key","it-key_a","it-key_b","it-key_c","it-landmine","it-magicwand","it-magnet","it-magnet-off","it-magnet-on","it-odometer","it-oxyd5f","it-pencil","it-pin","it-pipe-e","it-pipe-es","it-pipe-h","it-pipe-n","it-pipe-ne","it-pipe-s","it-pipe-sw","it-pipe-v","it-pipe-w","it-pipe-wn","it-puller-e","it-puller-n","it-puller-s","it-puller-w","it-ring","it-rubberband","it-seed","it-seed_nowood","it-seed_volcano","it-sensor","it-shogun-l","it-shogun-m","it-shogun-s","it-signalfilter0","it-signalfilter1","it-spade","it-spoon","it-spring1","it-spring2","it-springboard","it-squashed","it-surprise","it-sword","it-tinyhill","it-tinyhollow","it-trigger","it-umbrella","it-vortex-closed","it-vortex-open","it-vstrip","it-weight","it-whitebomb","it-wormhole","it-wormhole-off","it-wrench","it-yinyang"}

itemdoku={"it-1pkillstone","it-2pkillstone","it-abyss","it-bag","it-banana","it-blackbomb","it-blackbomb_burning","it-blocker","it-blocker-new","it-booze","it-brake","it-bridge-oxyd","it-bridge-oxyd_active","it-brush","it-burnable","it-burnable_ash","it-burnable_burning","it-burnable_fireproof","it-burnable_ignited","it-changefloor","it-cherry","it-coffee","it-coin1( value )","it-coin2( value )","it-coin4( value )","it-crack{0..3} ( type fixed brittleness )","it-cross","it-debris","it-document( text )","it-drop","it-dummy","it-dynamite","it-easykeepstone","it-easykillstone","it-explosion1","it-explosion2","it-explosion3","it-extinguisher( load )","it-extinguisher_empty( load )","it-extinguisher_medium( load )","it-extralife","it-flagblack","it-flagwhite","it-floppy","it-glasses","it-glasses-broken","it-hammer","it-hill","it-hollow","it-hstrip","it-inversesensor","it-key( keycode )","it-key_a","it-key_b","it-key_c","it-landmine","it-magicwand","it-magnet( on strength range )","it-magnet-off( on strength range )","it-magnet-on( on strength range )","it-odometer","it-oxyd5f","it-pencil","it-pin","it-pipe-e","it-pipe-es","it-pipe-h","it-pipe-n","it-pipe-ne","it-pipe-s","it-pipe-sw","it-pipe-v","it-pipe-w","it-pipe-wn","it-puller-e","it-puller-n","it-puller-s","it-puller-w","it-ring","it-rubberband( object1 object2 length strength )","it-seed","it-seed_nowood","it-seed_volcano","it-sensor","it-shogun-l","it-shogun-m","it-shogun-s","it-signalfilter0","it-signalfilter1","it-spade","it-spoon","it-spring1","it-spring2","it-springboard","it-squashed","it-surprise","it-sword","it-tinyhill","it-tinyhollow","it-trigger( invisible )","it-umbrella","it-vortex-closed( autoclose targetx targety )","it-vortex-open( autoclose targetx targety )","it-vstrip","it-weight","it-whitebomb","it-wormhole( on targetx targety strength range )","it-wormhole-off( on targetx targety strength range )","it-wrench","it-yinyang"}

------
nr=1
for i=1,110 do
      nr = nr+1
      set_stone("st-switch",1+i,3, {action="callback", target="sw"..nr, name="switch"..nr})
      func = "function sw"..nr.."() itnr="..i.."; settem(itnr) ; end"
      dostring(func)
end


function settem(itnr)
 item= itemlist[itnr]
 itdo=itemdoku[itnr]
 set_item(item,1+itnr,5)
 set_item("it-document", 1+itnr, 1, {text=itdo})
end

--Laser:
set_stone("st-laser", 115, 3, {name="laser1", dir=SOUTH, on="0"})
set_stone("st-switch", 115,1, {action="onoff", target="laser1"})


