--LEVEL3 Facility support systems
local startitems={
"pump","ppammo",--10 pakkis
"revolver","revolverammo","revolverammo",
"pystol",
"nailgun","nailammo","nailammo",
"aupystol","pyammo","pyammo",
"explauncher","pexpammo","pexpammo",
--"cangun","meattrap",
"rocketitem",
--"nailbomb",
"timebomb","smtimebomb","smtimebomb",
--"teleport",
"medkit",
}

local citemlist={}
local itemlist={}
local rareitemlist={}

--Relvad:
 citemlist		["pystol"]=				1
--rareitemlist	["pystol"]=				1
--citemlist		["pump"]=				1
--itemlist		["pump"]=				1
--rareitemlist	["pump"]=				1
--citemlist		["explauncher"]=		1
--rareitemlist	["explauncher"]=		1
--citemlist		["revolver"]=			1
--rareitemlist	["revolver"]=			1
 citemlist		["automaat"]=			1
--rareitemlist	["automaat"]=			1
--citemlist		["riflehv"]=			1
--rareitemlist	["riflehv"]=			1
--citemlist		["rifle"]=				1
--rareitemlist	["rifle"]=				1
--citemlist		["lasgun"]=				1
--rareitemlist	["lasgun"]=				1
--citemlist		["taser"]=				1
--rareitemlist	["taser"]=				1
--citemlist		["cannon"]=				1
--rareitemlist	["cannon"]=				1

--Ammo:
 citemlist		["pyammo"]=				1 -- 15 pakkis
--rareitemlist	["pyammo"]=				1 -- 15 pakkis
 citemlist		["ppammo"]=				4 -- 10 pakkis
--itemlist		["ppammo"]=				1 -- 10 pakkis
--rareitemlist	["ppammo"]=				1 -- 10 pakkis
--citemlist		["revolverammo"]=		1 -- 12 pakkis
--rareitemlist	["revolverammo"]=		1 -- 12 pakkis
 citemlist		["auammo"]=				7 -- 30 pakkis
--rareitemlist	["auammo"]=				1 -- 30 pakkis
--citemlist		["hvammo"]=				1 -- 30 pakkis
--rareitemlist	["hvammo"]=				1 -- 30 pakkis
--citemlist		["riammo"]=				1 -- 10 pakkis
--rareitemlist	["riammo"]=				1 -- 10 pakkis
--citemlist		["lasammo"]=			1 -- 20 pakkis
--rareitemlist	["lasammo"]=			1 -- 20 pakkis
 citemlist		["pexpammo"]=			2 -- 10 pakkis
--rareitemlist	["pexpammo"]=			1 -- 10 pakkis
--citemlist		["teslaammo"]=			1 -- 50 pakkis
--rareitemlist	["teslaammo"]=			1 -- 50 pakkis
--citemlist		["cannonrounds"]=		1 -- lõhkeaine + toru = 8tk
--rareitemlist	["cannonrounds"]=		1 -- lõhkeaine + toru = 8tk

--Pommid
 citemlist		["smtimebomb"]=			5
--rareitemlist	["smtimebomb"]=			1
 citemlist		["timebomb"]=			3 -- smtimebomb + smtimebomb
 rareitemlist	["timebomb"]=			1 -- smtimebomb + smtimebomb
--rareitemlist	["nailbomb"]=			1 -- timebomb + nailbox

--Medkitid
--citemlist		["cmeat"]=				1
--itemlist		["cmeat"]=				3
 --citemlist		["medkit"]=			1
--rareitemlist	["medkit"]=				1
 citemlist		["smmedkit"]=			1
 rareitemlist	["smmedkit"]=			2

--Ainult kombineerimiseks kasutatavad asjad:
--itemlist		["tube"]=				1
--rareitemlist	["tube"]=				1
 itemlist		["fattube"]=			1
--rareitemlist	["fattube"]=			1
--itemlist		["emptycan"]=			1
--citemlist		["hardware"]=			1
 itemlist		["hardware"]=			1
-- rareitemlist	["hardware"]=			1
 citemlist		["mchip"]=				1
--itemlist		["mchip"]=				1
 rareitemlist	["mchip"]=				1
--itemlist		["metalplate"]=			1
--rareitemlist	["metalplate"]=			1
--itemlist		["motor"]=				1
--rareitemlist	["motor"]=				1
 itemlist		["nailbox"]=			2
--rareitemlist	["nailbox"]=			1

--Asjad, mida saab kombineerimise teel ja hiljem ka levelitest:
--citemlist		["pumpx2"]=				1 -- pump + pump + hardware
--rareitemlist	["pumpx2"]=				1 -- pump + pump + hardware
--citemlist		["automaathv"]=			1 -- fattube + hardware + automaat
--rareitemlist	["automaathv"]=			1 -- fattube + hardware + automaat
--citemlist		["minigun"]=			1 -- motor + automaat + automaat + automaat + automaat
--rareitemlist	["minigun"]=			1 -- motor + automaat + automaat + automaat + automaat
--citemlist		["lasgun2"]=			1 -- lasgun + mchip
--rareitemlist	["lasgun2"]=			1 -- lasgun + mchip
--citemlist		["pumpexp"]=			1 -- hardware + pump + explauncher
--rareitemlist	["pumpexp"]=			1 -- hardware + pump + explauncher
--citemlist		["tesla"]=				1 -- taser + tube + mchip
--rareitemlist	["tesla"]=				1 -- taser + tube + mchip
--citemlist		["stimulant"]=			1 -- smmedkit + smtimebomb
--rareitemlist	["stimulant"]=			1 -- smmedkit + smtimebomb

----------------------------

local modules={
	"l3_algus",
	{"l3_niiske_kelder","l3_niiske_kelder_v2"},
	{"l3_ringikujuline_hoov","l3_ringikujuline_hoov_v2"},
	{"l3_raudmehe_garaaz","l3_raudmehe_garaaz_v2"},
	{"l3_masinatuba2","l3_masinatuba2_v2"},
	{"l3_p88re","l3_p88re_v2"},
	"l3_lyliti", --lülitiruum
	"l3_suur_uks", --ukseruum
	"FILLHOLES",
	{"l3_3toaga_tehas","l3_3toaga_tehas_v2"},
	{"l3_sammastega_kelder","l3_sammastega_kelder_v2"},
	{"l3_5ruumi","l3_5ruumi_salateleporter"},
	"l3_p88re2",
	{"l3_masinatuba","l3_masinatuba_v2"},
	"l3_toru_tuppik",
	{"l3_varisenud_ruum","l3_varisenud_ruum_v2","l3_varisenud_ruum_v3"},
	{"l3_varing","l3_varing_v2"},
	"l3_l6pp"
}

local encount={}
encount["soldat"]=			2
encount["zombie"]=			55--50
encount["giant_zombie"]=	6--5
encount["zombie_spawner"]=	6--5--4
encount["red_commander"]=	4

local storybits={
"Memo to chief engineer",
"Memo to chief engineer 2",
"Facility Life Support",
"Memo to janitor administrators",
"Software security alert",
"Facility Support Systems at reduced quality",
"SHOWEND",
"SHOWBOXES",
"RECIPE:nailgun2"
}


local pstart={x=-5.8,y=1.4}

GenerateLevel(modules,itemlist,rareitemlist,citemlist,encount,{"l3_tuppik"},10,pstart,startitems,storybits)
