SavageLabs / SavageFactions

The Ultimate Competitve Factions Plugin. Switches focus from casual factions and introduces new features for competitive factions.
https://savagelabs.net
GNU General Public License v3.0
95 stars 63 forks source link

Fixed spawner upgrades #154

Closed BradBouquio closed 5 years ago

BradBouquio commented 5 years ago

What type of PR is this? (Feature, Bug fix, Formatting etc.) Bug fix

Explain your change(s): Fixed spawner upgrades. Boost levels are stored as decimals in the config. setMinSpawnDelay() and setMaxSpawnDelay() control spawner delay. getMinSpawnDelay() and getMaxSpawnDelay shouldn't be used to reduce delay because lowerSpawnerDelay() runs after each spawn event. Must instead use a static number (500), which is the average of the default min and max times (200 and 800, respectively). Something more fancy could be done to make this a range that scales with the configs boost decimal, but this would require more work.

Why did you make these change(s)? spawner upgrades not working

BradBouquio commented 5 years ago

Not yet. I'll check out 1.8 and report back.

prosavage commented 5 years ago

Why was it closed? I just asked cuz I think 1.8 api doesnt have it

BradBouquio commented 5 years ago

You’re correct not working for 1.8. Didn’t think to consider it before submitting.