Skip to content

Commit

Permalink
wait for poh loading screen #minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Torwent committed Sep 3, 2021
1 parent 59aecfa commit 1f05eed
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
27 changes: 27 additions & 0 deletions osr/interface/mainscreen.simba
Original file line number Diff line number Diff line change
Expand Up @@ -342,3 +342,30 @@ begin
(SRL.CountColor(CTS0(8247, 0), Self.Bounds) = 900);
end;

(*
MainScreen.WaitLoadingPOH
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. pascal:: function TRSMainScreen.WaitLoadingPOH: Boolean;

Waits for the POH loading screen returns true if we find a loading screen and successfully wait for it to finish.

Example
-------

Writeln MainScreen.WaitLoadingPOH;
*)
function TRSMainScreen.WaitLoadingPOH(WaitTime: Int32; Interval: Int32 = -1): Boolean;
var
t: UInt64;
begin
if (Interval = -1) then
Interval := SRL.TruncatedGauss(50, 1500);

t := GetTickCount;
if WaitUntil(Self.LoadingPOH, Interval, WaitTime) then
begin
WaitTime := WaitTime - (GetTickCount - t);
Result := WaitUntil(not Self.LoadingPOH, Interval, WaitTime);
end;
end;

9 changes: 9 additions & 0 deletions osr/waspobjects/rsobjects.simba
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ begin
POHPortal.Finder.ColorClusters += [CTS2(9379961, 30, 0.16, 1.76),
CTS2(5987170, 16, 0.18, 0.06), 40];

OakLarderBuilt.SetupCommon;
OakLarderBuilt.UpText := ['Larder'];
OakLarderBuilt.Finder.ColorClusters += [CTS2(6916239, 10, 0.33, 1.18), CTS2(4154749, 9, 0.13, 0.65), 150];

OakLarderSpace.SetupCommon;
OakLarderSpace.UpText := ['2 more'];
OakLarderSpace.Finder.ColorClusters += [CTS2(10529472, 16, 0.25, 0.95), CTS2(8884636, 16, 0.16, 0.18), 80];


AlKharidBank.SetupCommon;
AlKharidBank.UpText := ['Bank ', 'booth'];
AlKharidBank.Finder.ColorClusters += [CTS2(5594210, 18, 0.24, 0.28),
Expand Down

0 comments on commit 1f05eed

Please sign in to comment.