* Determine ammo damage type through config property
* Tabs
* Add warning when property is missing
Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
* Fixed up inheritance
Some classes were not editable;
changes moved to relevant subclasses instead
* Newlines for readability
* More sensible default value
* Fix mistakes I added
* Update addons/medical_damage/CfgAmmo.hpp
* Pre-cache special values for damage types
* Support # values
For backwards compatibility
Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
* HandleDamage uses armour values to determine which hitpoint was damaged
* Tidied up comments
* Newlines
* Tabs? In MY code?!
* Added uniform caching and option to force disable caching
* Review suggestions
* Review suggestions/code style
* Spelling and select
* Removed unnecessary validity check
* Apply suggestions from code review
Co-Authored-By: commy2 <commy-2@gmx.de>
* Tweaks and optimisations, removed _noCache
Also fixed cache nil vs empty
* Different approach with fewer loops
Lookup is now done per-hitpoint and default values cached
fnc_getItemArmor made a helper function as it's now only a few lines
* Tabs & newlines
* Moved uniform logic inside helper function
* Optimisations
* Tweaks & optimisations, improved formatting
* Ignore explosionShielding
* Moved getArmor back to separate func, add per-unit caching
* Formatting
* Review suggestions
Co-authored-by: commy2 <commy-2@gmx.de>
* fix the medical hitpoints test
* fix the Enoch pilot
* readd optional test for all units
* Run test at preStart
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
* 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 <pabstmirror@gmail.com>
* 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 <pabstmirror@gmail.com>
* formating, rename bone images
* Fix args for setDead call in actionPlaceInBodyBag
* Apply suggestions from code review
Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
* 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 36c22a9047.
* 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 <silentspike100+Github@gmail.com>
* 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 <pabstmirror@gmail.com>
* 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
* cleanup
* Apply suggestions from code review
Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
* formating, rename bone images
* Apply suggestions from code review
Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
* 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
* 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 <pabstmirror@gmail.com>
* Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf
Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
* Add a macro for the bloodloss scaling factor
* Adjust bloodloss threshold for red icon
* Remove bloodloss color scaling factor
The issue is actually the other way round, the factor of 20 would
instantly make bodyparts red on taking a wound.
* Implemet 10 color steps provided by ShackTac
This replaces the old method of colouring the interaction menu icons
and body image selections with a new method that has 10 distinct color
steps (matching across the icons and the body image).
* Use macros for constants
* Implement blue damage colouring
This re-adds visualisation for colouring based on damage. The case where
a limb has a tourniquet will hopefully be handled by an overlayed icon.
* Tidy up file structure
* Move patient information display to medical_ui
* Make common colour conversion code into functions
* Add tourniquet icon overlay to body image
* Fix mispelling I forgot to commit
* Update icon paths to new white cross icon
* Clean mess after rebase
* Add new medical menu gui
* Add updating injury list and body image
* Add updating treatment category buttons
* Update onMenuClose function
* Delete unused functions
* Add action buttons and triage card to menu
* Move medical menu PFH to separate function
* Move setTriageStatus to treatment
* Add triage select dropdown
* Add toggle button action
* Fix mouse moving randomly when opening
* Add logs list update and remove unused functions
* Hide tourniquet icons by default
* Remove CfgInGameUI (already in feedback)
* Update patient info display
* Update triage card display
* Add settings to control interact menu actions
* Cleanup files/paths
* Move triage status update to common function
* Add icons for interact menu actions
* Modify icon color for interact menu actions
* Update canOpenMenu for new setting
* Hide pain information for unconscious
* Stringtable cleanup
* Use switch for pain text
* Change minor triage status to minimal
* Fix injury list to use new stringtable entry names
* Fix medical actions check when disabled
* Skip distance check in same vehicle
* More cleanup
* Fix CI error
* Requested changes
* Fix INJURIES string
* Fix include after comment block
* Fix missing ;
Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
* Fixes BleedingCoef having impact on bloodloss KO
Fixes incorrect var in setUnconscious
* Changes method for checking if typeOfDamage is valid
Adds check for if typeOfDamage is valid to extension version of woundsHandler
* Changes collision wound location select to a weighted system to make it more lethal at faster collisions
Adds collision and drowning damage types to config (drowning has no related wounds to prevent wounds being added while drowning).
* Fixes unneeded space
* Fixes minor mistake (body damage chance should go from 1 to 0 without ever becoming negative)
* Tidy handle damage code
* Fix environmental damage conditions
- Vehicle damage would never occur because it doesn't fire all the
hitpoints
- Missing sanity check on fall damage to check that unit isn't in a
vehicle
- Getting hit by a vehicle while on foot can be detected by checking for
a shooter
* Improve collision handling
- All collisions have a `_shooter` so we simply first check for that because burning doesn't and it could happen at any velocity
- We don't actually care what caused the collision because they should all cause the same type of wounding
- The exception is fall damage because we want to prioritise wounding the legs, we assume if the `_unit` had downward velocity and `_shooter == _unit` that it was fall damage (not necessarily always true, but almost always is and there doesn't look to be a more specific way to check).
* Minor code clean up
* refactor(medical): shorten some code
* refactor(medical): use macros for tourniquets
* refactor(medical): pull cache expiry values into script_macros_medical
Not sure of the original reason we interpolate to this ACE unconscious
animation, but removing it seemingly has no effect and fixes all the
other animations that were broken by it.
* Move scream and moan sounds to medical feedback
* Move vanilla feedback overrides to medical feedback
* Update all function calls
* Use events to avoid a dependency
* Move litter to `treatment`
* Move eden object attributes to `treatment`
* Move treatment items to `treatment`
* Move bodybag handling to `treatment`
* Move state conditions to `statemachine`
* Move radio addon handling to `feedback`
* Move medical macros to `engine`
* Move medical extension to `damage`
* Fix texture and material paths after move
* Remove duplicate medical menu config
* Remove old faction class
* Remove a bunch of old code
Units accumulate damage in the local variables
"ACE_Medical_Engine_$HitXXXX", but these are never reset. The way these
vars are used is as a single-damage-event tracker, and the end result of
not resetting their value when they're done being used is that a
specific $HitXXXX can accumulate enough damage to cause the "select
wound with highest damage" code to always select _it_ for the next wound
event, even if it wasn't the primary target of the last wound event.
I.E. I get shot in the right leg badly. If I then get winged in the left
arm, that wound will end up on my right leg, because when the code runs,
it finds QGVAR($HitRightLeg) > QGVAR($HitLeftArm), and so it applies the
wound to the right leg.