From 01a91701673e3cbc5dd2c2e19734246de77bfa41 Mon Sep 17 00:00:00 2001 From: Garrett3Nelson Date: Wed, 18 Sep 2024 17:39:40 -0300 Subject: [PATCH] Allow Equipment to take (X..Y) strings --- osr/interfaces/gametabs/equipment.simba | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/osr/interfaces/gametabs/equipment.simba b/osr/interfaces/gametabs/equipment.simba index 726bdb1f..d976ac0d 100644 --- a/osr/interfaces/gametabs/equipment.simba +++ b/osr/interfaces/gametabs/equipment.simba @@ -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;