if (not skipIncludes) then
	dofile("script/layouts/room3.lua")
	dofile("script/upgrades/room3_upgrades.lua")

	levelDesc.onTick = function(self, time)
		self:tick(time)
		self.randomWalkTimer = (self.randomWalkTimer or 0) - time
		if (self.randomWalkTimer < 0) then
			level:doRandomWalkingPerson() 
			self.randomWalkTimer = math.Random(6000, 11000)
		end
	end

	levelDesc.doRandomWalkingPerson = function()
		local baseAnim = randomFromWeightedTable({
			{weight=300, anim="PAGEANT_D"},
			{weight=300, anim="PREGNANT_W"},
			{weight=50, anim="PATIENT_BOY"},
			{weight=50, anim="PATIENT_BOY2"},
			{weight=50, anim="PATIENT_BOY3"},
			{weight=50, anim="PATIENT_GIRL"},
			{weight=300, anim="PATIENT_GIRL2"},
			{weight=50, anim="PATIENT_GIRL3"},
			{weight=50, anim="PATIENT_PREG"},
			{weight=300, anim="PATIENT_PREG2"},
			{weight=50, anim="PATIENT_PREG3"},
			{weight=400, anim="PATIENT_MOTHER"},
			{weight=300, anim="PATIENT_GRAN"},
			{weight=200, anim="GABRIEL"},
			{weight=300, anim="MALE_NURSE"},
			{weight=100, anim="LISA"},
		}).anim

		local y = 189
		local x1, x2 = 0, 680
		if (math.Random(1000) < 500) then
			x1, x2 = 680, 0
		end

		level.rpIdx = (level.rpIdx or 0) + 1
		local desc = {
			class = "CareCharacter",
			name = "random_person"..level.rpIdx,
			hasNormalClothes = false,
			x = x1,
			y = y,
			floor = -20,
			baseAnimation = baseAnim,
			--walkSpeed = math.Random(80, 200),
		}

		local randomPerson = level:add(desc)
		randomPerson:addTask({class="WalkToTask", target={x=x2, y=y}})
		randomPerson:addTask({class="RemoveTask"})
	end
end

levelDesc.areaId = 0
levelDesc.isGamePlayLevel = true
levelDesc.ambientPanning = -0.1
levelDesc.heroDesc =
{
	name = "hero",
	base = "sarah",
	x = 400,
	y = 500,
}
levelDesc.residentDesc =
{
	name = "resident",
	base = "connor",
	x = 40,
	y = 346,
}
levelDesc.treatments =
{
	REMOVAL = {
		class="Step",
		miniGame="Removal",
		workIcon="WORKICON_EAR_NOSE_THROAT",
	},
	SPATULA = {
		class="Step",
		workIcon="WORKICON_SPATULA",
		animation="DO_SPATULA",
		animationFrameTime=-1,
		animationCycles=1,
		animationWhenFinished="stay",
		duration=2000,
	},
	BANDAID = {
		class="Step",
		miniGame="Bandaid",
		workIcon="WORKICON_BANDAID",
	},
	GIVE_INJECTION = {
		class="Step",
		workIcon="WORKICON_ROOM3_INJECTION",
		animation="GIVE_INJECTION_LEFT",
		animationFrameTime=-1,
		animationCycles=1,
		animationWhenFinished="stay",
		duration=3000,
		workSound="SND_SYRINGE:sound",
	},
	TOILET = {
		class="Step",
		duration=6000,
		workSound="SND_TOILET_USED:sound",
	},
}
