-
Notifications
You must be signed in to change notification settings - Fork 738
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 Treatment - Modernize and Cleanup #6933
Conversation
addons/medical_treatment/functions/fnc_hasTourniquetAppliedTo.sqf
Outdated
Show resolved
Hide resolved
@@ -34,4 +34,23 @@ GVAR(animDurations) = [] call CBA_fnc_createNamespace; | |||
["AinvPknlMstpSnonWnonDnon_medic1", 10] | |||
]; | |||
|
|||
// class names of medical facilities | |||
// global variable so it can be accessed by mission makers | |||
GVAR(facilityClasses) = [ |
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.
Wouldn't it make more sense to have the default list in config? So that mods like CUP/RHS can add compat?
Iterating over all vehicles is not an option though. So maybe a seperate config class for these? Maybe in CfgMagazineWells style to make adding onto it easy?
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 could add CfgVehicles config entry and then compile the list at preStart?
Or for your suggestion, would something like this work?
class ACE_Medical_Facilities {
BI[] = {
"VanillaMedFac01_F",
"VanillaMedFac02_F"
};
CUP[] = {
"TK_GUE_WarfareBFieldhHospital_Base_EP1",
"TK_GUE_WarfareBFieldhHospital_EP1"
};
};
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.
I'd probably do a separate config like that, same as we're doing for the healing item replacement
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.
Yes that's what I thought about.
Not sure if we really need preStart. The problem with preStart is that we always have to add overhead of compileFinal to make it hacking safe.
preInit would be good enough here.
Or.. We could argue that it's not gameplay relevant enough to be worth hacking, and thus we don't care and don't need to make it compileFinal'ed?
I'd prefer to not have a class in config root but rather something like ace_medical >> facilities
addons/medical_treatment/functions/fnc_hasTourniquetAppliedTo.sqf
Outdated
Show resolved
Hide resolved
fix func descriptions Calc wound blood loss on events reorder includes so scritpmacroMed has global effect trivial optimization for getCardiacOutput Fix var Fix wounds not reopening (nil _category) Fix surgical kit inherting canBandage conditional debug hitpoints Update ACE_Medical_Treatment_Actions.hpp Use woundBleeding for IS_BLEEDING macro rework medication vars comments Reset var in init / fullHeal Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf Co-Authored-By: PabstMirror <[email protected]>
Drop unique id and merge classId and category
Fixed merge conflicts with limping: https://github.com/acemod/ACE3/tree/medical-treatment-work-rebaseLimping |
Co-Authored-By: PabstMirror <[email protected]>
Co-Authored-By: PabstMirror <[email protected]>
Co-Authored-By: SilentSpike <[email protected]>
class ItemInfo: InventoryFirstAidKitItem_Base_F { | ||
mass = 4; | ||
}; | ||
}; | ||
class Medikit: ItemCore { | ||
type = 0; | ||
ace_arsenal_hide = 1; | ||
EGVAR(arsenal,hide) = 1; |
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.
I think we should port over the removal of these entries from #7017 (will just close that PR as it's handled better here)
My reasoning is that there are a number of reasons people might still want to add vanilla items to units that will be only replaced if ACE is present (e.g. it's possible to make missions addon compatible but not dependent). Additionally it will be consistent with any other addons that add to the replacement config because they won't be hiding their own items.
#7107) * FIX set medical vehicle zeus module Since #6933 `isMedicalVehicle` should be use instead of `medicClass` * isMedicalVehicle is a boolean https://github.com/acemod/ACE3/blob/44050df98b00e579e5b5a79c0d76d4d1138b4baa/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf#L20
* Modernize and cleanup medical_treatment * One line for each old public function * Fix litterCleanupDelay name * Improve adjustment calcs / wound blood loss / medications fix func descriptions Calc wound blood loss on events reorder includes so scritpmacroMed has global effect trivial optimization for getCardiacOutput Fix var Fix wounds not reopening (nil _category) Fix surgical kit inherting canBandage conditional debug hitpoints Update ACE_Medical_Treatment_Actions.hpp Use woundBleeding for IS_BLEEDING macro rework medication vars comments Reset var in init / fullHeal Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf Co-Authored-By: PabstMirror <[email protected]> * Change wound data array Drop unique id and merge classId and category * Splinting and treatment and gui * Add arm fractures and aim effects * localizations and event * fix * fix merge for renamed files * Fixes and code review changes * Move medical logs clearing to treatment * More cleanup work * cleanup * Apply suggestions from code review Co-Authored-By: PabstMirror <[email protected]> * formating, rename bone images * Fix args for setDead call in actionPlaceInBodyBag * Apply suggestions from code review Co-Authored-By: PabstMirror <[email protected]> * disable calls to extension * Update fnc_onMedicationUsage.sqf * Medical - Skip unneeded setVars on initUnit (#6949) * Medical - Transfer state machine state on locality (#6950) * Medical - Transfer state machine state on locality * Fix feedback isUnconscious var * Exclude AI * Make UAV excludes consistant, formating * Update fnc_treatmentFullHealLocal.sqf * reset fractures on respawn * Fix merge * Add PAK time coefficient setting * Fix medication * Add ace_medical_replacementItems config array * checkItems performance improvement * Treatment - cap max animation speed (#6995) * Treatment - cap max animation speed and add lock to prevent AF from reseting anim * Update fnc_getBandageTime.sqf * Use local version of setAnimSpeedCoef * Revert "Use local version of setAnimSpeedCoef" This reverts commit 36c22a9. * Move replacementItems compiling to preInit * Improve replacementItems compiling * Cleanup splint functions, use macros for fractures * Rename splintCondition to canSplint * Add cprCreatesPulse setting * Cleanup remaining functions * Capitalize stringtable entry names * getStitchTime function and fix treatment locations * Update addons/medical_treatment/functions/fnc_getHealTime.sqf Co-Authored-By: SilentSpike <[email protected]>
When merged this pull request will: