Skip to content

Commit 4d23961

Browse files
authored
Merge pull request #112 from jacz24/patch-1
Implement ShowOnTarget for TRSObjectArray
2 parents 51d66c6 + 9be89f3 commit 4d23961

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

osrs/position/map/objects.simba

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ var
157157
objs: TRSObjectArray;
158158
begin
159159
Map.Setup([ERSChunk.VARROCK]);
160-
objs := TRSObject.Create(ObjectsJSON.GetByName('bank'));
160+
objs := TRSObjectArray.Create(ObjectsJSON.GetByName('Bank booth'));
161161
end;
162162
```
163163
*)
@@ -1071,6 +1071,23 @@ begin
10711071
img.Show();
10721072
end;
10731073

1074+
(*
1075+
## ShowOnTarget TRSObjectArray
1076+
```pascal
1077+
procedure ShowOnTarget(objs: TRSObjectArray); overload;
1078+
```
1079+
Shows an image of the target with the `TRSObjectArray` drawn on it.
1080+
*)
1081+
procedure ShowOnTarget(objs: TRSObjectArray); overload;
1082+
var
1083+
img: TImage;
1084+
i: Integer;
1085+
begin
1086+
img := Target.GetImage();
1087+
for i := 0 to High(objs) do
1088+
img.DrawObject(objs[i]);
1089+
img.Show();
1090+
end;
10741091

10751092
function ToString(constref obj: TRSObject): String; override;
10761093
begin

0 commit comments

Comments
 (0)