require( "scripts/objects/objects.lua" );

-- idle_object.lua
-- idle_object table
idle_object = {
	-- ANCHOR
	anchor_x=0,
	anchor_y=0,
	offset_x=0,
	offset_y=0,
	
	-- IDLE
	task_idle = true,
	
	-- TEXTURE
	texture="",
	
	-- UI
	animated=true,
	loaduiicons=true,
	indicator_ui_x=0,
	indicator_ui_y=-90,
	dad_ui_x=-125,
	dad_ui_y=-90,
	mom_ui_x=-55,
	mom_ui_y=-90,
	nanny_ui_x=10,
	nanny_ui_y=10,
	
	-- INIT STATE
	init_state="clean",

	-- OBJECT
	object_name = "",
	object_clean_animation = "clean",
	object_messing_animation = "messing",
	object_dirty_animation = "dirty",
	object_dirty_mouse_on_animation = "dirty_mouse_on",
	object_cleaning_animation = "cleaning",

	-- STATES NAMES
	clean_state_name = "clean",
	messing_state_name = "messing",
	dirty_state_name = "dirty",
	dirty_mouse_on_state_name = "dirty_mouse_on",
	flaging_state_name = "flaging",
	flaged_state_name = "flaged",
	cleaning_state_name = "cleaning",

	-- CHARACTER
	current_action_character = "youngchild",
	character_messing_animation = "doing_stuff_sit_down",
	character_dirty_animation = "idle",
	character_cleaning_animation = "doing_bow_down",
	character_clean_animation = "idle",
	flipped_animation = false,

	-- PARENT
	parent_chosen = "",
	parent_state_action = "normal",

	-- TIME
	new_state_start_time = 0,
	messing_state_time = 1000,
	cleaning_state_time = 1000,
	selecting_state_time = 2000,
	parent_select_intial_time = 0,
	previous_cleaning_state_time = cleaning_state_time,
	
	-- CHAOS
	
	chaos_init_inc = 5;
	chaos_update_inc = 1;
	chaos_amount = 0;
	chaos_clean_inc = 12;
	chaos_state_timer = 0;
	
	
	-- STRESS
	stress_inc = 15;
	no_stress_power = false;
	stress_inc_enabled = true;
	
	-- MASK
	mask = false;
	maskX = 0;
	maskY = 0;
	maskWidth = 0;
	maskHeight = 0;

	mouse_on = false,
	dad_mouse_on = false,
	mom_mouse_on = false,	
	
	--mouse_over_enabled = true,	
	object_is_dirty = false;
	clicked = false;
	set_click_enable = true;
	click_enable = true;
	parent_is_coming = false;
	previous_state = "";
	
	check_teamwork = false;
	finish_teamwork = false;
	teamworktask_name = "";
	
	show_cleaning_particle = true;
	
	parent_current_state = "";
	parent_current_stuff = "";
	
	sound_of_work_enable = true;
	
	sound_of_messing = "";
	sound_of_messed = "";
	sound_of_cleaning = "";
	
	cleaning_timer_enabled = false;
	
	particle_x = "0";
	particle_y = "0";
}

function idle_object:new(o)
	o = o or {}   -- create object if user does not provide one
	setmetatable(o, self)
	self.__index = self
	return o
end

function idle_object:parent_action(parent)
	FinishCharacterTask(parent);
end