Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions osrs/position/map/entities.simba
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ Example:
{$I WaspLib/osrs.simba}

var
objs: TRSObjectArray;
entities: TRSEntityArray;
begin
Map.Setup([ERSChunk.VARROCK]);
objs := TRSObject.Create(ObjectsJSON.GetByName('bank'));
entities := TRSEntityArray.Create(NPCsJSON.GetByName('Banker'));
end;
```
*)
Expand Down Expand Up @@ -853,6 +853,13 @@ begin
Self.DrawTPA(boundsArray[i].Connect());
end;

(*
## ShowOnTarget TRSEntity
```pascal
procedure ShowOnTarget(entity: TRSEntity); overload;
```
Shows an image of the target with the `TRSEntity` drawn on it.
*)
procedure ShowOnTarget(entity: TRSEntity); overload;
var
img: TImage;
Expand All @@ -862,6 +869,25 @@ begin
img.Show();
end;

(*
## ShowOnTarget TRSEntityArray
```pascal
procedure ShowOnTarget(entities: TRSEntityArray); overload;
```
Shows an image of the target with the `TRSEntityArray` drawn on it.
*)

procedure ShowOnTarget(entities: TRSEntityArray); overload;
var
img: TImage;
i: Integer;
begin
img := Target.GetImage();
for i := 0 to High(entities) do
img.DrawEntity(entities[i]);
img.Show();
end;


function ToString(constref entity: TRSEntity): String; override;
begin
Expand Down
Loading