Skip to content

Commit 63fc462

Browse files
committed
fix(Minimap): read notes
- added tolerance to black - rewrote the core of minimap dot finding with logic close to what I did for 2.0 with workarounds for 1.4 limitations (using TM.........) - added anchovies to food
1 parent bcb9ee0 commit 63fc462

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

osr/interfaces/minimap.simba

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function TRSMinimap.PercentBlack(): Integer;
1212
var
1313
tpa: TPointArray;
1414
begin
15-
SRL.FindColors(tpa, CTS1(0,0), Self.Bounds);
15+
SRL.FindColors(tpa, CTS0(0,2), Self.Bounds);
1616
if Length(tpa) < 1 then Exit;
1717
FilterPointsPie(tpa, 0, 360, 0, 73, Self.Center.X, Self.Center.Y);
1818
Result := ceil((Length(tpa) * 100) / ((Pi * (73 * 73)) * ((360 - 0) / 360.0)-((Pi * 0) * 1)));
@@ -78,7 +78,7 @@ var
7878
p: TPoint;
7979
tpa, finalTPA: TPointArray;
8080
begin
81-
if SRL.FindColors(tpa, 0, Self.Bounds) = 0 then
81+
if SRL.FindColors(tpa, CTS0(0,2), Self.Bounds) = 0 then
8282
Exit(True);
8383

8484
for p in tpa do

utils/items/consumables.simba

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ They are in UPPERCASE because they are intended to be treated as constants but a
5959
WriteLn CONSUMABLE_ARRAYS[ERSConsumable.ENERGY];
6060
```
6161
*)
62-
FOOD_ARRAY: TRSItemArray = ['Shrimps', 'Cooked chicken', 'Cooked meat', 'Sardine', 'Bread', 'Herring', 'Mackerel', 'Choc-ice', 'Trout', 'Cod', 'Pike', 'Cooked wild kebbit', 'Sunlight moth mix (1..2)', 'Sunlight moth', 'Roast beast meat', 'Pineapple punch', 'Salmon', 'Tuna', 'Jug of wine', 'Rainbow fish', 'Cooked larupia', 'Stew', 'Banana stew', 'Cake(1..3)', 'Meat pie(1..2)', 'Bass', 'Plain pizza(1..2)', 'Lobster', 'Cooked barb-tailed kebbit', 'Swordfish', 'Cooked graahk', 'Potato with butter', 'Apple pie(1..2)', 'Chocolate cake(1..3)', 'Tangled toad' 's legs', 'Chocolate bomb', 'Potato with cheese', 'Egg potato', 'Meat pizza(1..2)', 'Admiral pie(1..2)', 'Monkfish', 'Cooked kyatt', 'Anchovy pizza(1..2)', 'Cooked karambwan', 'Curry', 'Ugthanki kebab', 'Guthix rest(1..4)', 'Dragonfruit pie(1..2)', 'Mushroom potato', 'Shark', 'Cooked pyre fox', 'Sea turtle', 'Cooked sunlight antelope', 'Pineapple pizza(1..2)', 'Summer pie(1..2)', 'Wild pie(1..2)', 'Manta ray', 'Cooked dashing kebbit', 'Tuna potato', 'Dark crab', 'Anglerfish', 'Cooked moonlight antelope', 'Saradomin brew(1..4)', 'Cooked bream'];
62+
FOOD_ARRAY: TRSItemArray = ['Anchovies', 'Shrimps', 'Cooked chicken', 'Cooked meat', 'Sardine', 'Bread', 'Herring', 'Mackerel', 'Choc-ice', 'Trout', 'Cod', 'Pike', 'Cooked wild kebbit', 'Sunlight moth mix (1..2)', 'Sunlight moth', 'Roast beast meat', 'Pineapple punch', 'Salmon', 'Tuna', 'Jug of wine', 'Rainbow fish', 'Cooked larupia', 'Stew', 'Banana stew', 'Cake(1..3)', 'Meat pie(1..2)', 'Bass', 'Plain pizza(1..2)', 'Lobster', 'Cooked barb-tailed kebbit', 'Swordfish', 'Cooked graahk', 'Potato with butter', 'Apple pie(1..2)', 'Chocolate cake(1..3)', 'Tangled toad' 's legs', 'Chocolate bomb', 'Potato with cheese', 'Egg potato', 'Meat pizza(1..2)', 'Admiral pie(1..2)', 'Monkfish', 'Cooked kyatt', 'Anchovy pizza(1..2)', 'Cooked karambwan', 'Curry', 'Ugthanki kebab', 'Guthix rest(1..4)', 'Dragonfruit pie(1..2)', 'Mushroom potato', 'Shark', 'Cooked pyre fox', 'Sea turtle', 'Cooked sunlight antelope', 'Pineapple pizza(1..2)', 'Summer pie(1..2)', 'Wild pie(1..2)', 'Manta ray', 'Cooked dashing kebbit', 'Tuna potato', 'Dark crab', 'Anglerfish', 'Cooked moonlight antelope', 'Saradomin brew(1..4)', 'Cooked bream'];
6363
PRAYER_ARRAY: TRSItemArray = ['Zamorak brew(1..4)', 'Sanfew serum(1..4)', 'Super restore(1..4)', 'Prayer potion(1..4)', 'Moonlight moth mix (1..2)', 'Moonlight moth', 'Jangerberries'];
6464
ENERGY_ARRAY: TRSItemArray = ['White tree fruit', 'Winter sq' 'irkjuice', 'Spring sq' 'irkjuice', 'Autumn sq' 'irkjuice', 'Summer sq' 'irkjuice', 'Bandages', 'Guthix rest(1..4)', 'Papaya fruit', 'Energy potion(1..4)', 'Purple sweets', 'Summer pie(1..2)', 'Super energy(1..4)', 'Stamina potion(1..4)', 'Strange fruit', 'Mint cake', 'Gout tuber'];
6565
ANTI_POISON_ARRAY: TRSItemArray = ['Sanfew serum(1..4)', 'Anti-venom+(1..4)', 'Anti-venom(1..4)', 'Antidote++(1..4)', 'Antidote+(1..4)', 'Superantipoison(1..4)', 'Antipoison(1..4)', 'Extended anti-venom+(1..4)'];
@@ -176,6 +176,7 @@ begin
176176
end;
177177

178178
case Self.Item of
179+
'Anchovies': Self.Points := 1;
179180
'Shrimps', 'Cooked chicken', 'Cooked meat': Self.Points := 3;
180181
'Sardine', 'Cake(1..3)', 'Edible seaweed': Self.Points := 4;
181182
'Bread', 'Herring', 'Chocolate cake(1..3)', 'Guthix rest(1..4)': Self.Points := 5;

0 commit comments

Comments
 (0)