Skip to content

Commit

Permalink
Merge pull request #199 from Garrett3Nelson/patch-1
Browse files Browse the repository at this point in the history
Allow Equipment to take (X..Y) strings
  • Loading branch information
Torwent authored Sep 19, 2024
2 parents 2460fa6 + 01a9170 commit bc5bfde
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions osr/interfaces/gametabs/equipment.simba
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@
{$I WaspLib/osr.simba}
{$ENDIF}

function TRSEquipment.FindItems(items: TRSItemArray; out slots: TIntegerArray): Boolean; override;
var
item: TRSItem;
tmp: TRSItemArray;
begin
if not Self.Open() then
Exit;

for item in items do
tmp += item.GetArray();

slots := Self.ItemInterface.IndicesOf(tmp);
Result := Length(slots) > 0;
end;

0 comments on commit bc5bfde

Please sign in to comment.