TownyAdvanced / TownyResources

Adds value to towns, by giving each one a unique set of automatically-generated resources.
Other
33 stars 17 forks source link

Add allowance of duplicate offers. #117

Closed PirateSoftware closed 1 month ago

PirateSoftware commented 1 year ago

Right now a town cannot get two of the same categories under offers. Please give us a config option to allow this if we would like to.

Currently it just skips duplicates in TownResourceDiscoveryController.java

//Skip category if we have already discovered something in it for(String material: alreadyDiscoveredMaterials) { if(category.getMaterialsInCategory().contains(material)) continue CATEGORY_LOOP;

This makes it impossible to give different amounts of the same material. I'd like to make Low/Medium/High size deposits but this skips based on the Material type.