From 3330ece2202aada481d6658d14bf16cb2b526bc3 Mon Sep 17 00:00:00 2001 From: Obique PSWG Date: Thu, 1 Jun 2017 09:41:41 -0500 Subject: [PATCH] Fixed logical error with "dropping below the minimum" spawned resources --- .../crafting/resource/galactic/GalacticResourceSpawner.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/services/crafting/resource/galactic/GalacticResourceSpawner.java b/src/services/crafting/resource/galactic/GalacticResourceSpawner.java index a119f0e07..d1427246f 100644 --- a/src/services/crafting/resource/galactic/GalacticResourceSpawner.java +++ b/src/services/crafting/resource/galactic/GalacticResourceSpawner.java @@ -126,7 +126,7 @@ public class GalacticResourceSpawner { int spawned = GalacticResourceContainer.getContainer().getSpawnedGalacticResources(raw); int minTypes = raw.getMinTypes(); int maxTypes = raw.getMaxTypes(); - if (spawned > minTypes) + if (spawned >= minTypes) return; // Only respawn once total number spawned in goes below minTypes int targetTypes = random.nextInt(maxTypes - minTypes + 1) + minTypes; for (int i = spawned; i < targetTypes; i++) { @@ -139,7 +139,6 @@ public class GalacticResourceSpawner { GalacticResource resource = createNewResource(raw); Log.i("Created new resource '%s' with ID %d of type %s with %d spawns per planet", resource.getName(), resource.getId(), raw.getName().getKey(), targetSpawns); Terrain restricted = getRestrictedResource(raw); - Log.d(" %s - restricted %s", raw.getName().getKey(), restricted); if (restricted == null) { for (Terrain terrain : BASE_PLANETS) { for (int i = 0; i < targetSpawns; i++) {