-
Notifications
You must be signed in to change notification settings - Fork 20
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
Medical - Refactoring #73
base: master
Are you sure you want to change the base?
Conversation
Use new method for adding bleedings
Update signature of ToggleActive
* Use the new SCR_DotDamageEffect approach to healing * Rename to CalculatePassiveRegenDPS and apply regen scale for resilience * Use new method for adding bleeding * GetBleedingHitZones changed signature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This is a refactoring PR, so it shouldn't remove
SCR_BandageUserAction.c
, since that would introduce a behavioral change. - As mentioned, we follow MarioE's convention for the folder structure and naming of modded scripts, so you should revert the renaming.
@@ -2,78 2,74 @@ | |||
//! Introduce a second chance, which gets triggered when the character would have died without | |||
//! falling unconscious. | |||
//! Add methods for interacting with pain hit zone. | |||
modded class SCR_CharacterDamageManagerComponent : SCR_DamageManagerComponent | |||
modded class SCR_CharacterDamageManagerComponent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We prefer to have the parent class specification for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok that makes sense, actually I didn't know this was possible. I wish I knew it before
ACE_Medical_Settings settings = ACE_SettingsHelperT<ACE_Medical_Settings>.GetModSettings(); | ||
|
||
const ACE_Medical_Settings settings = ACE_SettingsHelperT<ACE_Medical_Settings>.GetModSettings(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While thinking about constant correctness isn't inherently bad, we prefer to have it more consistent with the rest of the code base. The current convention for this repo is to have const only for primitive members.
I would consider removing |
Having the prefix helps maintainability as it is much easier to find what you're looking for. If I want to go to the modded version I can just type Prefix_****, without the prefix it will take me to the vanilla code and that is annoying. |
I agree that reverting the approach for detecting, if a bandage can be applied, is refactoring, but that's not all it does. The actual behavioral change is whether the check is done in
I don't see your issue. One version is in |
Refactored the code.
Taken from #72