dofile("script/layouts/room4_defaults.lua")
dofile("script/shifts/shift4_2_animations.lua")

levelDesc.name = "Shift 4.2"
levelDesc.levelId = 42
levelDesc.musicMood = "1"
levelDesc.timer = 0
levelDesc.trigger =
{
	class = "TriggerSystem",
	triggers =
	{
		{ trigger = "spawn", delay=1000, hearts=1, diseaseDesc = { class="Disease", steps={"MIRROR", "WAX", "NITROGEN" } } },
		{ trigger = "spawn", delay=8000, hearts=2, diseaseDesc = { class="Disease", steps={"CREAM", "LASER" } } },
		{ trigger = "spawn", delay=20000, hearts=3, diseaseDesc = { class="Disease", steps={"NITROGEN" } } },
		{ trigger = "spawn", delay=1000, hearts=3, diseaseDesc = { class="Disease", steps={ "NITROGEN", } } },
		{ trigger = "spawn", delay=15000, hearts=2, diseaseDesc = { class="Disease", steps={"WAX", "NITROGEN", } } },
		{ trigger = "spawn", delay=8000, hearts=3, diseaseDesc = { class="Disease", steps={"MIRROR", "LASER", } } },
		{ trigger = "spawn", delay=25000, hearts=2, diseaseDesc = { class="Disease", steps={"MIRROR", "WAX", } } },
		{ trigger = "spawn", delay=1000, hearts=2, diseaseDesc = { class="Disease", steps={"MIRROR", "LASER" } } },
		{ trigger = "spawn", delay=25000, hearts=1, diseaseDesc = { class="Disease", steps={"MIRROR", "CREAM", "LASER" } } },
		{ trigger = "spawn", delay=1000, hearts=2, diseaseDesc = { class="Disease", steps={"MIRROR", "NITROGEN", } } },
		{ trigger = "spawn", delay=8000, hearts=1, diseaseDesc = { class="Disease", steps={"WAX", "NITROGEN", } } },
		{ trigger = "spawn", delay=25000, hearts=2, diseaseDesc = { class="Disease", steps={"MIRROR", "LASER", } } },
		{ trigger = "spawn", delay=5000, hearts=2, diseaseDesc = { class="Disease", steps={"MIRROR", "CREAM", } } },
		{ trigger = "spawn", delay=8000, hearts=1, diseaseDesc = { class="Disease", steps={"WAX", "NITROGEN", } } },
		{ trigger = "spawn", delay=23000, hearts=3, diseaseDesc = { class="Disease", steps={"MIRROR", "LASER", } } },
		{ trigger = "spawn", delay=10000, hearts=1, diseaseDesc = { class="Disease", steps={"MIRROR", "CREAM", "NITROGEN" } } },
		{ trigger = "spawn", delay=13000, hearts=2, diseaseDesc = { class="Disease", steps={"WAX", "LASER", } } },
		{ trigger = "spawn", delay=8000, hearts=2, diseaseDesc = { class="Disease", steps={"MIRROR", "NITROGEN", } } },
		{ trigger = "spawn", delay=1000, hearts=3, diseaseDesc = { class="Disease", steps={"MIRROR", "CREAM", } } },
	}
}
levelDesc.patientList =
{
	p1 = { weight = 500,
		base = "lady",
	},
	p2 = { weight = 500,
		base = "teen",
	},
	p3 = { weight = 500,
		base = "local_male",
	},
	p4 = { weight = 500,
		base = "mother",
	},
}

levelDesc.eventDesc =
{
	class="FixEvent",
	sequenceStart = "walkFixableChild",
	eventBarText = "TEXT_EVENT_FIX4",
	eventBarImage = "EVENTBAR_ICON_R4_S2:icons",
	items = {
		{ obj="EVENT_FIX_GIRL", activate=nil },
	},
	scoreAllDone = 10,
}

function levelDesc:onShiftStartEnd()
	self:fireTrigger("startEvent")
	level:getObject("hairplacement_left").clickable = false
end

function levelDesc:onTick(time)
	self:tick(time)
	self.timer = self.timer - time
	if (self.timer < 0) then
		self.timer = 3000
		if (level.event.completed) then
			level:getObject("hairplacement_left").clickable = true
		end
	end
end
