sync: restore source from Google Drive
Sync changed files to Google Drive / sync (push) Successful in 1h45m13s

This commit is contained in:
admin_d committed 2026-09-12 16:50:30 +05:00
1 parent e2d8247e91
commit 7063d1b1c9
993 files changed
+949976

No files matched your search

@@ -0,0 +1,61 @@
unit KM_UnitTaskGoOutShowHungry;
{$I KaM_Remake.inc}
interface
uses
Classes, KM_Defaults, KM_Units, SysUtils;
type
TKMTaskGoOutShowHungry = class(TKMUnitTask)
public
constructor Create(aUnit: TKMUnit);
function Execute: TKMTaskResult; override;
end;
implementation
uses
KM_CommonUtils;
{ TTaskGoOutShowHungry }
constructor TKMTaskGoOutShowHungry.Create(aUnit: TKMUnit);
begin
inherited Create(aUnit);
fType := uttGoOutShowHungry;
end;
function TKMTaskGoOutShowHungry.Execute: TKMTaskResult;
begin
Result := trTaskContinues;
if fUnit.Home.IsDestroyed then
Exit(trTaskDone);
with fUnit do
case fPhase of
0: begin
Thought := thEat;
SetActionStay(20, uaWalk);
end;
1: begin
SetActionGoIn(uaWalk,gdGoOutside, fUnit.Home);
Home.SetState(hstEmpty);
end;
2: SetActionLockedStay(4,uaWalk);
3: SetActionWalkToSpot(fUnit.Home.PointBelowEntrance);
4: SetActionGoIn(uaWalk, gdGoInside, fUnit.Home);
5: begin
SetActionStay(20 + KaMRandom(10{$IFDEF DBG_RNG_SPY}, 'TKMTaskGoOutShowHungry.Execute'{$ENDIF}), uaWalk);
Home.SetState(hstIdle);
end;
else begin
Thought := thNone;
Result := trTaskDone;
end;
end;
inc(fPhase);
end;
end.