class 'd2cleaner' (D2Person)

d2cleaner.clean = false

function d2cleaner:__init(baseName) super(baseName)

	self:setReturnHomeTime(1000)
	self:animate("WALK_UP", 0)
    self:animate("WALK_DOWN", 0)
    self:animate("WALK_RIGHT", 0)
    self:animate("CLEAN", 0)
    self:animate("CLEAN_RIGHT", 0)
	self:animate(self:getDefaultAnimation(), 0)

end

function d2cleaner:acceptTask(task)

	if (self.clean) then
		if (task:getType() == "TableTask") then
			if (task:isCleaningTask()) then
				return true
			end	
		end
	end
	
	return D2Person.acceptTask(self, task)

end

function d2cleaner:calcImageName(input)

  	in_ = input;

  	if (self:isSitting()) then
   		if (input == "IDLE") then
      		in_ =  "SIT"
   		end
  	end

  	res = D2Person.calcImageName(self, in_)
  
  	return res
  
end
