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


dispensa = fooddispenser:new{
	object_name="dispensa",
	
	object_dirty_animation = "dirty",
	
	anchor_x=-5,
	anchor_y=95,
	offset_x=-1,
	offset_y=-3,
	
	texture="anim/objects/dispensa/dispensa",
	animation_script="anim/objects/dispensa/dispensa_animation_script.lua",
	glow_texture="anim/objects/dispensa/dispensa_glow",
	glow_animation_script="anim/objects/dispensa/dispensa_glow_animation_script.lua",
	
	character_messing_animation = "doing_stuff_up",
	character_cleaning_animation = "doing_stuff_up",
	
	next_object_selected = "mesajantar1";
	
	stuff_name = "clean_dishes";
	stuff_x = "0";
	stuff_y = "-70";
	stuff_layer = "1";
	
	parent_final_state = "holding_plates";
	flipped_animation = false,
	
	check_teamwork = true;
	finish_teamwork = false;
	teamworktask_name = "setthetable";
	
	sound_of_cleaning = "pick_plates";
	
	sound_of_work_enable = false;	
}

function dispensa:messing_update()
	if (GetCurrentTime() - self.new_state_start_time) > self.messing_state_time then
		PlayCharacterAnimation(self.current_action_character, self.character_dirty_animation);
		FlipAnimation(self.current_action_character, self.flipped_animation);
		FinishCharacterTask(self.current_action_character);
		ChangeObjectState(self.object_name, self.dirty_state_name);		
	end
end