[changed/fixed] Decay spam hits + [removed] DecayIfLeftAlone #2258
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Status
Description
Fixes #1751
Fixes #860
dissalowDecaying()
renamed todisallowDecaying()
.Decay scripts that use
disallowDecaying()
won't decay blobs if they are invincible or attached.disallowDecaying
added toDecayIfFlipped.as
andDecayIfSpammed.as
.DecayIfLeftAlone removal
Script
DecayIfLeftAlone.as
and all references to it removed as it is unused and I don't see it getting brought back in the future. It looks unpopular to me.DecayIfSpammed change
DecayIfSpammed.as
was rewritten.It checks if a spam limit has been set. Allows for custom spam limit that can be set to blobs via
set_u8("spam limit", number)
. Otherwise defaults to 5.Blobs are kept track of via network IDs.
Only the blob with the lowest net id will be hit, fixing the problem that several blobs were hit at the same time. More blobs will be hit if there are multiples of the spam limit:13~16 buckets, with the limit being 4 - The first three buckets will be hit. etc.Oldest 5 (or whatever the spam limit is) buckets will stay and every bucket past that will decay.
This worked very well in testing.
DecayQuantity change
onAttach()
andonThisAddToInventory()
are removed fromDecayQuantity.as
because the only thing they do is setthis.getCurrentScript().tickFrequency = (getRules().hasTag("quick decay") ? QUICK_FREQUENCY : FREQUENCY);
which is already done inonInit()
so it looks like these hooks don't really fulfill a purpose.If I'm mistaken and there is a purpose, please let me know and I can revert the change.