18 Commits

Author SHA1 Message Date
77248d774c Medical Treatment - Extract stitching & trauma code (#10543)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2025-01-13 16:37:45 -03:00
e31aba55ce Medical - Add medication dosage support & improve overdose (#10393)
* Initial Commit

* Small fix to get all medications

* Update launch.toml

* Small fix and removal of medication dose variables

* Deleted old entries from stringtable

* Update addons/medical_treatment/script_component.hpp

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Fixed newline

* Changes for backwards compatibility

* Update addons/medical_status/functions/fnc_addMedicationAdjustment.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Update addons/medical_status/functions/fnc_getAllMedicationCount.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Update addons/medical_status/functions/fnc_getAllMedicationCount.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Fixes, maybe?

* Overdose fixes

* trailling comma

* Update addons/medical_vitals/functions/fnc_handleUnitVitals.sqf

* aa

* there we go

* Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

* Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

* Update XEH_PREP.hpp

* Update addons/medical_status/functions/fnc_getAllMedicationCount.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Grim Misc Fixes

* Remove debug

* Small fixes

* newline

* headers

* code cleanup

* more headers

* drop unneeded _dose

* last header

* fix getting overdose func/code

* whitespace

* now the last header

* Update addons/medical_treatment/functions/fnc_overDose.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* fix compiling nil

* Update addons/medical_status/functions/fnc_addMedicationAdjustment.sqf

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Fixes

* Update addons/medical_treatment/functions/fnc_overDose.sqf

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Update fnc_overDose.sqf

* Update addons/medical_status/functions/fnc_addMedicationAdjustment.sqf

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Update addons/medical_treatment/functions/fnc_overDose.sqf

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Update addons/medical_status/functions/fnc_addMedicationAdjustment.sqf

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Update addons/medical_status/functions/fnc_getMedicationCount.sqf

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Fixes

* Moving med settings to different PR

* oopps

* Stringtable

* Misc fixes & cleanup

* Update fnc_onMedicationUsage.sqf

* Fix nonsensical code

* add API event and doc

* Misc fixes

* Update ACE_Medical_Treatment.hpp

* Update watchVariable.sqf

* Update addons/medical_treatment/ACE_Medical_Treatment.hpp

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Update ACE_Medical_Treatment.hpp

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2024-11-14 23:03:21 -03:00
1c6c4d6bff All - Fix parentheses around code (#10073)
* Fix Brackets around code

* Update fnc_handleFired.sqf

* Shouldn't have changed this one

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-06-18 14:08:03 +00:00
1e404cf85b General - SQF Improvements (#9698)
Co-authored-by: Dystopian <sddex@ya.ru>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-02-04 14:50:24 -03:00
742626ff1a General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00
02365609b5 Medical - Change medical to use hashmaps for wound storage (#8926)
* Refactor medical to use hashmaps for wound storage

- We most frequently want to access wounds by body part, so this makes
  that a constant time lookup.
- The body part index is no longer stored in every wound since it's
  inherent in the wound storage.
- Using body part names as the keys of the hashmap to improve code
  clarity (no more magic numbers).

closes #6468

* Add deserilization migration from old wound arrays

Will migrate from old form array wound storage to the new hashmap
strucutre during deserlization. This is relevant for communities piping
medical state out to a database or similar between sessions.

* fix issue with suture stitching

* change version number in comment

---------

Co-authored-by: Salluci <salluci.lovi@gmail.com>
2023-06-24 08:11:56 +03:00
0f08a18f89 Medical - Add force walk option to fracture setting (#7852)
* Medical - Add force walk option to fracture setting

* Add French translation

Co-authored-by: Elgin675 <elgin675@hotmail.com>

* Reduce calls to statusEffect_set (#7865)

* Reduce calls to statusEffect_set

* statusEffect_addType fracture to forcewalk

Co-authored-by: Elgin675 <elgin675@hotmail.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2020-08-22 19:37:15 -05:00
4eeac9f649 Medical - Death from sum of trauma (#7195)
* Medical - Death from sum of trauma

* fixes

* Update fnc_determineIfFatal.sqf
2019-10-08 10:45:09 -05:00
d6507cf119 Medical - epiBoostsSpontaneousWakeUp (#7076)
* Medical - epiBoostsSpontaneousWakeUp

* Update initSettings.sqf

* Move setting, add strings

* Update initSettings.sqf

* Update addons/medical/stringtable.xml

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
2019-09-28 16:11:32 -05:00
ec9e6c088b Medical - Only stitch wounds on not bleeding body parts (#7044)
* Only stitch wounds on not bleeding body parts
2019-09-28 21:48:19 +01:00
b4c1d0cb57 Minor logic fixes (#7174) 2019-09-07 12:18:12 -05:00
edd5c44853 Medical - Improve loading/unloading of unconc patients (#7109)
* Medical - Improve loading/unloading of unconc patients

* Update fnc_loadPersonLocal.sqf

* Multi-line

* Formating

* Update fnc_loadUnit.sqf
2019-09-05 15:56:53 -05:00
de13ab0f47 Medical - Rework CPR and Bleeding in cardiac arrest (#7060)
* Medical - Rework CPR and Bleeding in cardiac arrest

* remove cprCreatesPulse, add cprSuccessChance

* hide cpr for basic diagnose

* Update addons/medical_statemachine/functions/fnc_enteredStateCardiacArrest.sqf

Co-Authored-By: SilentSpike <silentspike100+Github@gmail.com>
2019-06-27 19:01:20 -05:00
08a7d2706e Add wounds var macros (#7058) 2019-06-22 13:36:27 -05:00
44050df98b Medical Treatment - Modernize and Cleanup (#6933)
* 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>
2019-06-03 10:31:46 -05:00
e56cc0d74e Limping / Splint Treatment (#6947)
* 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
2019-05-11 23:13:59 -05:00
847d2d4179 Medical - Improve adjustment calcs / wound blood loss / medications (#6910)
* 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>
2019-04-27 14:12:11 -05:00
c492f184b4 move dev funcs to folder 2019-03-23 19:55:04 -05:00