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

desenhocozinha2 = wall_drawing:new{
	object_name="desenhocozinha2",
	--texture="",
	--animated=false,
	flipped_texture=true,
	flip_animation_action_character = true,
	flip_animation_parent = true,
	flipped_texture = true,
	indicator_ui_y=-50,
	dad_ui_x=-30,
	dad_ui_y=-60,
	mom_ui_x=40,
	mom_ui_y=-60,
	nanny_ui_x=10,
	nanny_ui_y=10,
}

function desenhocozinha2:parent_action()
	self.parent_is_coming = false;
	if self.parent_chosen == "dad" then
		HideDadIcon(self.object_name);
	else
		HideMomIcon(self.object_name);
	end
	RemoveObjectFromClickedList(self.object_name);
	if GetCharacterState(self.parent_chosen) == self.parent_state_action and self.object_is_dirty and GetObjectState("drawingsquare") ~= "dirty" then
		if self.parent_chosen == "dad" then
			PlaySound("working_father", true);
		else
			PlaySound("working_mother", true);
		end
		PlayCharacterAnimation(self.parent_chosen, self.character_cleaning_animation);
		FlipAnimation(self.parent_chosen, self.flip_animation_parent);
		--PlayObjectAnimation(self.object_name, self.object_cleaning_animation);
		ShowCharacterStuff(self.parent_chosen, "pano", self.pano_x, self.pano_y, self.pano_layer);
		ChangeObjectState(self.object_name, self.cleaning_state_name);
		self.new_state_start_time = GetCurrentTime();
		ShowParticle(self.object_name, "effects/powder.lua", "0", "0");
		SetCharacterState(self.parent_chosen, self.cleaning_state_name);
		
		self:get_cleaning_state_time();
	else
		ShowMiss(self.object_name);
		if self.stress_inc_enabled and not self.no_stress_power then
			AddFutureCharacterStress(self.parent_chosen, -self.stress_inc);
		end
		if self.no_stress_power then
			HideNoStressIcon(self.object_name);
		end
		self.no_stress_power = false;
		--PlayObjectAnimation(self.object_name, self.object_dirty_animation);
		--ChangeObjectState(self.object_name, self.dirty_state_name);
		IncludeObjectMouseHandler(self.object_name);
		FinishCharacterTask(self.parent_chosen);
		self.parent_chosen = "";
		self.click_enable = self.set_click_enable;
		if self.object_is_dirty then
			--ChangeObjectState(self.object_name, self.dirty_state_name);			
			IncludeObjectMouseHandler(self.object_name);			
			self.click_enable = true;
			PlayObjectAnimation(self.object_name, self.object_dirty_animation);	
			--PlayGlowAnimation(self.object_name, "dirty");
		end
	end
end