Add selling, undeploying and harvesting conditions to DiscardOn#2260
Add selling, undeploying and harvesting conditions to DiscardOn#2260DeathFishAtEase wants to merge 13 commits into
selling, undeploying and harvesting conditions to DiscardOn#2260Conversation
|
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
selling and undeploy conditions to DiscardOnselling, undeploy and harvesting conditions to DiscardOn
|
To Chinese users:
|
selling, undeploy and harvesting conditions to DiscardOnselling, undeploying and harvesting conditions to DiscardOn
|
While the logic is fine by itself, I'm wondering how should DiscardOn be proceeded further. There'll certainly be more and more conditions that could be used as a discard check, but bloating the enum might not be a long-lasting solution: you'll just get more enum keywords to be filled and handled, and these conditions have to be checked no matter if they're used or not A similar issue was happened in AutoDeath before and I was trying to resolved it by a generic condition handler, but that's a failure either since checking lots of conditions per frame can result in performance drop. Not sure if there could be a better design for such features that can be triggered by multiple conditions |
|
This is indeed a problem that requires careful consideration, especially since conditions like |
Event system |
|
I think you folks really need to cooperate and start generalizing the features, not fearing learning new stuff. We can't implement every single idea in existence if we do them as one-offs without reusability or generalization. We need to be providing building bricks, not an endless amount of houses. |
|
Tested by:
|
|
@Metadorius So what is your decision? |
…On_Selling_or_Undeploy
My suggestion for this is as follows, uncertain if it is close to what you had in mind or not but whatever.
I am willing to do the grunt work for this if we can agree on something even remotely approaching an actionable plan first. |
to correctly distinguish between harvesting and stationary
to avoid flickering caused by entering the stationary branch due to lag in `IsHarvesting` checking
when `useDestinationBased == true`, and instead document that `DiscardOn.MoveBasedOnDestination=false` is inaccurate
to avoid changing the original default behavior.
It is found that there are many scenarios where `DiscardOn=harvesting` can only be handled correctly under `DiscardOn.MoveBasedOnDestination=true`






DiscardOn...selling: Discard when the building to which the effect is attached is sold.undeploying: Discard when the building to which the effect is attached performs undeploy.harvesting: Discard when the object the effect is attached is harvesting ore.