Vlek / RuinsAndRiches

Ruins & Riches Ultima Online Server Files
6 stars 0 forks source link

Double-clicking ore smelts if close enough to a smelter #84

Open Vlek opened 1 year ago

Vlek commented 1 year ago

Right now you gotta double-click the ore, then you get asked to target a smelter.

Instead of making the player do the work, have it like in UOF where it targets it for you.

The logic should be: If the ore is accessible and the smelter is in range 2 tiles, then allow smelt attempt.

Vlek commented 1 year ago

Here is where it will need to change: https://github.com/Vlek/RuinsAndRiches/blob/5a978d91b81e0876cb82adac002a0dfbf19fdf4c/Scripts/Items/Trades/Resources/Blacksmithing/Ore.cs

The on double-click method specifically.

I do not know whether there is a helper function for finding a smelter type object in a given range, but might want to make one if it does not exist.

There are Dwarven smelters as well as normal ones. Maybe more?

Vlek commented 12 months ago

I can use the same style of code that is currently used for filling waterskins.

Vlek commented 12 months ago

The logic is in Ore.cs and it's a bit of a nightmare.

I'm learning about how targeting works though which is cool.