------------------------------------------------Variables------------------------------------------------

require( "package/leveldesign/ld_variables_define.lua" );
DebugOut( "create elements for main quests (file : package/leveldesign/ld_firefly_kingdom.lua)" );

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

------------------------------------------------Firefly Tree------------------------------------------------

function F_blindage_firefly_tree_max_stock()
	local result = G_firefly_tree_fruit_feed_stock;
	
	if  result < 1 then 
		result = 2;
	end
	
	return result;
end

DepositZone
{
	name = "LD_firefly_tree_fruit",
	positionX = 1926,
	positionY = 59,

	use_drop_position = true,
	drop_as_action = false,
	drop_position     = { { 1813, 101 }, { 1829, 132 } },
	action_position     = { { 1845, 170 }, { 1805, 75 } },

	stock_max_value = F_blindage_firefly_tree_max_stock(),
	current_stock = 0,

	Image
	{
		file = "backgrounds/empty",
	    minimum_percent = 1,
	},
	Image
	{
		file = "backgrounds/empty",
	    minimum_percent = 0,
	},
}

StaticObject
{
	name  = "O_firefly_tree_healthy_A",
	image = "backgrounds/objects/firefly_tree_healthy_a",
	positionX = 1872,
	positionY = -40,
	layer = Characters,
	use_ref_point_y = true,
	ref_point_y = 0,
	visible = false,
}

StaticObject
{
	name  = "O_firefly_tree_healthy_B",
	image = "backgrounds/objects/firefly_tree_healthy_b",
	positionX = 1579,
	positionY = -82,
	layer = Air,
	visible = false,
}

StaticObject
{
	name  = "O_firefly_tree_sick_A",
	image = "backgrounds/objects/firefly_tree_sick_a",
	positionX = 1872,
	positionY = -40,
	layer = Characters,
	use_ref_point_y = true,
	ref_point_y = 0,
}

StaticObject
{
	name  = "O_firefly_tree_sick_B",
	image = "backgrounds/objects/firefly_tree_sick_b",
	positionX = 1579,
	positionY = -82,
	layer = Air,
}



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

------------------------------------------------Firefly Lamp------------------------------------------------

InteractiveZone
{
	name = "LD_firefly_lamp",
	positionX = 1823,
	positionY = 1575,

	use_drop_position = true,
	drop_position     = { {1745, 1574}, {1725, 1640}, {1715, 1681} },
	action_position     = { {1526, 1975}, {1161, 1892}, {1332, 1924}, {1085, 1947}, {1278, 1995}, {1420, 1786}, {1467, 1714}, {1534, 1798}, {1650, 1681}, {1603, 1771}, {1638, 1846}, {1674, 1916} },

	unlimited = false,
	stock_max_value = G_firefly_lamp_stock,

	Image
	{
		file = "backgrounds/objects/petrol_lamp_broken",
	    minimum_percent = 0,
	},
}

StaticObject
{
	name = "LD_firefly_lamp_repaired",
	positionX = 1823,
	positionY = 1576,
	visible = false,
	image = "backgrounds/objects/lamp_clean_off",
	HUD_name = "LD_firefly_lamp",
}


StaticObject
{
	name = "LD_firefly_lamp_shiny",
	positionX = 1823,
	positionY = 1575,
	visible = false,
	image = "backgrounds/objects/petrol_lamp_shiny",
	HUD_name = "LD_firefly_lamp",
}

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

------------------------------------------------Firefly Last Crusade------------------------------------------------

function F_blindage_firefly_tree_last_crusade_max_stock()
	local result = G_firefly_tree_fruit_stock;
	
	if  result < 1 then 
		result = 2;
	end
	
	return result;
end

DepositZone
{
	name = "LD_firefly_tree_last_crusade",
	positionX = 1926,
	positionY = 59,

	use_drop_position = true,
	drop_as_action = false,
	visible = false,
	drop_position     = { { 1813, 101 }, { 1829, 132 } },
	action_position     = { { 1845, 170 }, { 1805, 75 } },

	stock_max_value = F_blindage_firefly_tree_last_crusade_max_stock(),
	current_stock = 0,

	Image
	{
		file = "backgrounds/empty",
	    minimum_percent = 1,
	},
	Image
	{
		file = "backgrounds/empty",
	    minimum_percent = 0,
	},
}

InteractiveZone
{
	name = "LD_golden_syrup",
	positionX = 645,
	positionY = 953,

	visible = false,

	use_drop_position = true,
	layer = Fogs,
	drop_position     = { {652, 888}, {693, 908} },

	unlimited = true,
	--stock_max_value = G_firefly_tree_fruit_stock,

	Image
	{
		file = "backgrounds/objects/test_red",
	    minimum_percent = 0,
	},
}

InteractiveZone
{
	name = "LD_firefly_lamp_destination",
	positionX = 1823,
	positionY = 1575,
	layer = Fogs,

	visible = false,

	use_drop_position = true,
	drop_position     = { {1745, 1544}, {1748, 1616}, {1715, 1681} },

	unlimited = false,
	stock_max_value = G_firefly_lamp_stock,

	Image
	{
		file = "backgrounds/objects/test_red",
		minimum_percent = 0,
	},
}
