-
-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Game object stats refactor, pt. 2 #3617
Merged
KJeff01
merged 10 commits into
Warzone2100:master
from
ManManson:stats_refactor_continued
Feb 5, 2024
Merged
Game object stats refactor, pt. 2 #3617
KJeff01
merged 10 commits into
Warzone2100:master
from
ManManson:stats_refactor_continued
Feb 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replace direct uses of `asBodyStats` for `DROID_TEMPLATE` instances with calls to the corresponding member function. Signed-off-by: Pavel Solodovnikov <[email protected]>
Replace direct uses of `asBrainStats` for `DROID_TEMPLATE` instances with calls to the corresponding member function. Signed-off-by: Pavel Solodovnikov <[email protected]>
Replace direct uses of `asPropulsionStats` for `DROID_TEMPLATE` instances with calls to the corresponding member function. Signed-off-by: Pavel Solodovnikov <[email protected]>
Replace direct uses of `asSensorStats` for `DROID_TEMPLATE` instances with calls to the corresponding member function. Signed-off-by: Pavel Solodovnikov <[email protected]>
Replace direct uses of `asECMStats` for `DROID_TEMPLATE` instances with calls to the corresponding member function. Signed-off-by: Pavel Solodovnikov <[email protected]>
Replace direct uses of `asRepairStats` for `DROID_TEMPLATE` instances with calls to the corresponding member function. Signed-off-by: Pavel Solodovnikov <[email protected]>
Replace direct uses of `asConstructStats` for `DROID_TEMPLATE` instances with calls to the corresponding member function. Signed-off-by: Pavel Solodovnikov <[email protected]>
Replace direct uses of `asWeaponStats` for `DROID_TEMPLATE` instances with calls to the corresponding member function. Signed-off-by: Pavel Solodovnikov <[email protected]>
…DROID` class These are not `inline` anymore, since it would introduce cyclic dependencies between `droiddef.h` and `objectdef.h` headers. More refactorings may be needed until this can be made inline again. Although, it may not be even necessary, if there is no clear performance penalty, AFAICS. I don't really see any of these functions to have a measurable impact on performance when I did some CPU profiling after the changes. Signed-off-by: Pavel Solodovnikov <[email protected]>
Moved `getWeaponStats()` from `DROID` to `BASE_OBJECT`, so that `STRUCTURE` class can also use it. Actually, `BASE_OBJECT` may not be the best place to store `asWeaps` and other weaponry-related data, since `FEATURE` class doesn't use them at all (one of the direct descendants of `BASE_OBJECT`). But, for the time being, let it remain in `BASE_OBJECT`, so that the diff is kept relatively small and easy-to-review. Signed-off-by: Pavel Solodovnikov <[email protected]>
ManManson
force-pushed
the
stats_refactor_continued
branch
from
February 2, 2024 17:00
edd1917
to
82c0417
Compare
Seems like CI failure for the Flatpak job is unrelated to the PR:
Is there a way to retrigger the job? @past-due |
Sometimes CI just fails for intermittent reasons. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The patchset consists of the following high-level changes:
DROID_TEMPLATE
, replace direct uses of global stat arrays by calls to these member getters.DROID
class.getWeaponStats(weaponSlot)
fromDROID
toBASE_OBJECT
to make it possible to use it forSTRUCTURE
instances.Signed-off-by: Pavel Solodovnikov [email protected]