Commit Graph

177 Commits

Author SHA1 Message Date
mharis001
171fbf1e9e
Medical Treatment - Settings cleanup (#7973) 2020-10-30 23:40:10 -05:00
diwako
2b0db19807
Medical - Adjustable times for many treatment actions (#7951)
* adjustable times for most constant treatment times

* add new line, formatting

* cleanup merge

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2020-10-29 11:37:44 -05:00
Brett
9e3409fc6e
Medical - Allow placing unconscious in a body bag (#7941)
* medical: allow placing unconscious in a bodybag

* Always show body bag action on non-awake units

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2020-10-29 11:37:36 -05:00
Daniel Gibson
185c15de0e
Medical - Add Global Wound Reopen Chance Modifer (#7747)
* Added Bandage Reopening Chance Modifier

* Added Wound Reopen Chance Addon Setting

* Fixed dumb error in localization setup

* Credit!

* Resolved issue with Addon Settings definition & removed testing values.

* PR Feedback #1

- Removed unnecessary whitespace on LN 46
- Call global var directly at LN 87
- Updated Wound Reopen Chance localized name & description

* PR Feedback #2

- Increased reopen coefficient upper limit from 2 to 5.

* Changed author credit to reflect GitHub email.
2020-06-13 15:52:30 -05:00
PabstMirror
a9a69ac4ff
Headers - Fix function names in examples (#7663) 2020-04-25 08:41:45 +02:00
jonpas
c42a004ab3
General - Fix preprocessor issues (#7563)
* Fix preprocessor issues

* Fix more preprocessor issues
2020-02-29 16:09:31 -06:00
commy2
754a9e09af values, simplify 2020-02-23 14:25:11 +01:00
commy2
27ecfc6a5b prevent extremely slow or fast animations 2020-02-23 14:14:11 +01:00
mharis001
2d1f166f5a Medical - Combine advancedBandages and woundReopening settings 2020-01-04 15:43:51 -05:00
mharis001
b874a1f618 Medical Treatment - Fix bodyCleanupLoop typo (#7308) 2019-12-17 09:50:59 -06:00
PabstMirror
9b8cfc27af
Medical Treatment - Reset canTreatCached on treatment (#7253)
* Medical Treatment - Reset canTreatCached on treatment

* Reset conditionCaches of nearby units

* CAManBase
2019-12-12 10:25:21 -06:00
BaerMitUmlaut
bb0461be16 Fast medical item replacement (#7224)
* Add item replacement framework

* Correctance of English

Co-Authored-By: Dedmen Miller <dedmen@users.noreply.github.com>

* Remove unecessary code

* Use new item replacement framework for medical items

* minor fixes, support GVAR(convertItems) setting

* use forEach, convert atropine to epi

* replace with adenosine
2019-10-11 15:00:25 -05:00
PabstMirror
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
Daniel Lee
f4dbe5229e Medical - Option for treatment to require holstering/lowering weapon. (#7063)
* Option for medical treatment to require holstering/lowering weapon, with an option for examine category items to still be available.

* Vehicles cause holster settings to be ignored.

Unsure whether to expand this into it's own setting (disallow all medical in vehicles? only allow if both medic and patient are in the same vehicle? what about people in the back of transports healing those in the cab?), but just going to leave it as is for now.

* Replace !isEqualTo with != in for performance reasons.

Resolves line 33 PR review.

* Merge settings, short circuit

* move logic to new file
2019-10-08 10:44:36 -05:00
mharis001
35a4ffbad6 Expand advanced diagnose setting tooltip (#7197) 2019-09-28 16:25:29 -05:00
PabstMirror
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
mharis001
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
LachlanSneddon
b4c1d0cb57 Minor logic fixes (#7174) 2019-09-07 12:18:12 -05:00
PabstMirror
0880ea25a3
Medical Treatment - Add logging for splints (#7170)
* Medical Treatment - Add logging for splints

* addToTriageCard
2019-09-06 21:47:20 -05:00
PabstMirror
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
PabstMirror
f5782fd1ff
Medical - Various debugging and fix cpr anim speed (#7122)
* Medical - Various debugging and fix cpr anim speed

* Update fnc_setCardiacArrest.sqf
2019-08-06 08:10:33 -05:00
PabstMirror
fa910a7fd8
Small med stuff (#7084)
* Small med stuff

* update adv fatigue comment

* disable medical debug by default

* Fix tourniquet call to addToTriageCard
2019-07-03 10:40:42 -05:00
PabstMirror
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
mharis001
08a7d2706e Add wounds var macros (#7058) 2019-06-22 13:36:27 -05:00
PabstMirror
d52fedf39f
Medical Treatment - Scale bandage time based on amount of wound treated (#7049)
* Medical Treatment - Scale bandage time based on amount of wound treated

* ignore basic bandage?

* add debug trace
2019-06-16 11:04:51 -05:00
PabstMirror
2fc11d38e0
Medical - Fix unconsicous problems with minWaitingTime and fullHealLocal (#7030)
* Medical - Fix setUnconsicous minWaitingTime

* Fix fullHeallocal restoring unconscious with unstable vitals
2019-06-11 19:25:05 -05:00
mharis001
9315dbebd9 Fix medication and ivBagLocal typos (#7048) 2019-06-08 16:54:54 -05:00
PabstMirror
9b2c8c84e8 Medical - fix canTreat (#7041)
* Update fnc_canTreat.sqf

* Update fnc_canTreat.sqf
2019-06-08 06:17:00 -04:00
mharis001
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
PabstMirror
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
PabstMirror
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
Dedmen Miller
50e3d8b3fe Fix macro argument counts (#6962) 2019-04-27 06:05:29 -07:00
PabstMirror
9588b13942 Zeus/Medical - Fix modules for rewrite (#6914)
* Zeus/Medical - Fix modules for rewrite

* move wakeup logic to medical_treatment
2019-04-03 06:17:17 -07:00
Katalam
55a7d53437 Medical - Add condition for surgicial kit (#6916)
* Added condition canStitch

* Update XEH_PREP.hpp

* Update addons/medical_treatment/functions/fnc_canStitch.sqf

Co-Authored-By: Katalam <39590058+Katalam@users.noreply.github.com>

* Added example, removed arguments information and changed > to isEqualTo

* Added example in canBandage too
2019-04-03 04:36:37 -07:00
mharis001
30b99fa20a Medical Rewrite - Remove dropDownTriageCard function (#6907)
* Remove dropDownTriageCard function

* Delete fnc_updateTourniquets.sqf
2019-03-30 16:06:36 -05:00
SilentSpike
ac1651c6db Prevent bandaging when not bleeding (#6532) 2019-03-30 15:44:58 -05:00
PabstMirror
f2b9bf3a17 Update headers 2019-03-30 11:07:54 -05:00
mharis001
8d2bba4b35
Rewrite Medical GUI (#6831)
* 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>
2019-03-24 18:17:48 -04:00
PabstMirror
2d0090422c move settings to sqf 2019-03-24 00:37:39 -05:00
Magnetar
cc11ad051d Formatting. Lazy eval 2019-03-21 14:34:51 +01:00
Magnetar
89927a8b94 Missing privates. Lazy evaluation. 2019-03-17 21:26:15 +01:00
Magnetar
99f5d2ea0a
Rewrite rectify convert option (#6825)
* Rewrite Rectify - Adding option to convert vanilla medical gear

* Oops
2019-03-17 17:59:49 +01:00
Magnetar
1d34cc4cc0
Rewrite rectify. Medical - Add vehicle hint when loading unconscious (#6822)
* Rewrite rectify. Medical - Add vehicle hint when loading unconscious

* Fix copy paste
2019-03-17 17:54:50 +01:00
SilentSpike
0e8ed5315e
Remove patient treatment animations (#6524)
* Prevent treatment animation on dead bodies

This was causing bodies to glitch out on dedicated servers according to
feedback

* Remove patient animation logic and setting
2018-08-12 12:28:48 +01:00
SilentSpike
923c25163f Fix missing boolean return in CPR 2018-08-12 11:50:47 +01:00
Zakant
14d52ee77e Remove CPR alive check (#6492) 2018-08-12 08:57:23 +01:00
Rutger "RedBery" Meijering
0a97ef3cc8 Fix event name overlap and macros (#6514) 2018-08-11 11:40:06 +01:00
SilentSpike
9e5c4a7ed9
Move medical settings into their respective components (#6493)
* Transfer medical AI to CBA setting
* Neuter the old settings module

I've left the entry in CfgVehicles so that it doesn't cause errors on
older missions, but it's just a dumb logic now and does nothing.

* Remove medic setting
* Move increaseTraining setting
* Move fnc_adjustPainlevel to medical_status
* Move pain and bleed coefficients to medical_status
* Move advanced bandages to medical_treatment
* Move advanced medication to medical_treatment
* Move advanced diagnose to medical_treatment
* Move wound reopening and screams settings
* Move damage threshold settings
* Move showPain setting
* Move statemachine settings
* Move pain visualisation setting
* Move all treatment usage settings
* Move self IV setting
* Move remaining settings
* Sort treatment setting string categories
2018-08-06 17:08:43 +01:00
Dedmen Miller
7a0a00ea09 Cleanup using SQFLint (#6485)
* Use private
* Fix wrong spacing
* Fix wrong variable being used
* Cleanup empty line after header
* ace_common_fnc_getCountOfItem
* Remove useless _return variable
* Naming
2018-08-02 15:02:10 +01:00
Dedmen Miller
6bd8542eed Move #includes before function headers (#6484) 2018-07-30 10:22:14 +01:00