anchor.diff:  
     TM := TKMTaskMining.Create(Self, gRes.Houses[fHome.HouseType].ResOutput[Res]);
   
  -  if TM.WorkPlan.ResourceDepleted and not fHome.ResourceDepletedMsgIssued then
  -    IssueResourceDepletedMessage;
  +  if TM.WorkPlan.ResourceDepleted then
  +  begin
  +    if not fHome.ResourceDepleted then
  +      fHome.IssueResourceDepletedMsg;
  +  end
  +  else
  +    //Reset resource depleted state for home, if we find any resource
  +    //(it could appear again, f.e. by script)
  +    fHome.ResourceDepleted := False;
   
     if TM.WorkPlan.IsIssued
       and ((TM.WorkPlan.Resource1 = wtNone) or (fHome.CheckResIn(TM.WorkPlan.Resource1) >= TM.WorkPlan.Count1))
  
positive.code: end;
  
  
  procedure TKMUnitCitizen.IssueResourceDepletedMessage;
  begin
    fHome.IssueResourceDepletedMsg;
  end;
  
  
  function TKMUnitCitizen.InitiateActivity: TKMUnitTask;
  var
    Res: Integer;
  
negative.code: 
    //This is a common class for all units, who can work in house
    TKMUnitCitizen = class(TKMSettledUnit)
    protected
      function InitiateActivity: TKMUnitTask; override;
    public
  