Commit Graph

237 Commits

Author SHA1 Message Date
johnb432
cd678c5b90
Medical AI - Add tourniquet support (#10158)
Add tourniquet support for Medical AI
2024-08-05 02:39:01 -07:00
Mike-MF
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
Grim
59af3e1f6d
General - Change CBA Namespaces to HashMap (#8801)
* medical_treatment

* advanced_throwing

* common, csw

* Update fnc_replaceRegisteredItems.sqf

* Sanitised numerous components

* Update XEH_postInit.sqf

* Update XEH_postInit.sqf

* FUNC -> LINKFUNC

* Changed tagging hashmap

* Reverted some changes

* Reverted some changes

* Update XEH_clientInit.sqf

* Tweaks and fixes

* Fix number replacements

* Minor cleanup

* Update fnc_getMagazineName.sqf

* Update fnc_getMagazineName.sqf

* Minor improvement

* Made factions case-sensitive and added `toLowerANSI` to be safe

* Update fnc_getDetectedObject.sqf

* Update addons/common/functions/fnc_actionKeysNamesConverted.sqf

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

* Throw error if item doesn't exist

---------

Co-authored-by: Salluci <69561145+Salluci@users.noreply.github.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2024-06-11 12:34:32 -03:00
PabstMirror
05ebe1f48f
Medical Treatment - Allow diagnosing cardiac arrest with clear language (#9997) 2024-05-23 17:25:59 -05:00
johnb432
2a3ff8e185
Medical Treatment - Fix low SpO2 making units go into cardiac arrest again (#10003)
* Set SpO2 after successful CPR

* Update fnc_cprLocal.sqf

* Add API

* Update fnc_cprLocal.sqf
2024-05-10 20:39:41 -05:00
johnb432
60b87f0b41
Medical - Add _createLitter to medical events (#9959)
Added `_createLitter` to medical events
2024-04-26 17:35:57 -05:00
Tim Beswick
23842aab39
Medical - Fix script error when bandaging (#9956)
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2024-04-19 16:57:41 -03:00
johnb432
dda6b9d2dc
Medical Treatment - Enforce bandage effectiveness variable type (#9950)
Enforce bandage effectiveness variable type
2024-04-16 13:33:40 -07:00
PlayerBotPro
6165b46ab6
Medical Treatment - Fix Painkiller has no effect when Advanced Medication is off (#9942)
* fix: Painkiller has no effect when Advanced Medication is off

* Change PainKillers_PAIN_SUPPRESSION to uppercase

* Update addons/medical_treatment/functions/fnc_medicationLocal.sqf

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

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2024-04-11 12:58:50 -03:00
PabstMirror
5ca3465b8a
Medical Treatment - Only create litter on empty container (#9924) 2024-04-06 22:11:51 -03:00
BrettMayson
3c5b46c42d
Medical - Support Magazine Treatment Items (#9816)
* count treatment items

* getCountofItem

Co-Authored-By: Blue <itzblueman@gmail.com>

* getCountofItem fix

Co-Authored-By: Blue <itzblueman@gmail.com>

* convert painkillers to magazine

* use isclass

Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com>

* forget to change variable

* Update addons/medical_treatment/functions/fnc_hasItem.sqf

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

* better magazine adjustment

* Update addons/common/functions/fnc_adjustMagazineAmmo.sqf

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

* Update addons/medical_treatment/functions/fnc_medication.sqf

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

* Update addons/medical_treatment/functions/fnc_treatmentFailure.sqf

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

* Update docs/wiki/framework/arsenal-framework.md

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

* Update addons/common/functions/fnc_adjustMagazineAmmo.sqf

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

* Header

* use switch statement in fnc_useItem

* Update addons/common/functions/fnc_adjustMagazineAmmo.sqf

* Update addons/common/functions/fnc_adjustMagazineAmmo.sqf

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

* only check adding to mags that are not full

Co-Authored-By: LinkIsGrim <salluci.lovi@gmail.com>

* Update addons/common/functions/fnc_adjustMagazineAmmo.sqf

* Update fnc_getCountOfItem.sqf

* Optimisations & header fix

* Update addons/common/functions/fnc_adjustMagazineAmmo.sqf

* Fixed vehicle implementation

---------

Co-authored-by: Blue <itzblueman@gmail.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
2024-03-21 22:56:24 +01:00
BrettMayson
c5b54c65a8
Medical Treatment - Fix bandage effectiveness (#9865)
* fix broken bandages

* update params
2024-03-19 08:56:05 +01:00
Grim
8e975a6b91
Medical Treatment - Add hook to modify bandaging treatment (#9814)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2024-03-09 14:15:24 -03:00
Grim
e06c6f7835
General - Replace toLower with toLowerANSI where applicable (#9790)
* General - Replace toLower with toLowerANSI where applicable

* whoops

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Update addons/repair/functions/fnc_setHitPointDamage.sqf

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

* Update addons/repair/dev/draw_showRepairInfo.sqf

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

* Update addons/tagging/XEH_preStart.sqf

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

* Update addons/vehicle_damage/functions/fnc_handleCookoff.sqf

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

* Update addons/tagging/XEH_preStart.sqf

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

* comparment -> compartment

* Update fnc_showHud.sqf

* Update fnc_registerObjects.sqf

* Update addons/common/functions/fnc_cbaSettings_settingChanged.sqf

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2024-03-07 22:08:13 +01:00
BrettMayson
67fa53fd2c
General - Events for Mods (#9813)
* full heal local

* update body image

* log list

* better _enable in categories

* update injury list

* cardiac output internal variable

* typo

* remove duplicate event

* rename event

* add docs

* Update docs/wiki/framework/events-framework.md

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

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-03-04 15:08:12 -06:00
BAXENdev
a0f3933bf0
Medical - Change max medication dosage behavior (#9746)
* Consistentency Update with Overdosing

* Added Description to Condition Cases

* Updated to CASE 2

Overdose behavior:
ODs on uses `_maxDose + {1 or 2 or 3}` from `_maxDose + {0 or 1 or 2}`

* Update fnc_onMedicationUsage.sqf

* Update fnc_onMedicationUsage.sqf

* Added riskDose range and updated medications

* maxDose -> maxSafeDose | riskDose -> chanceDoses

* Fixed maxDose reference in trace

* Added chanceDoses to trace

* Fixed use of TRACE macro

* Updated comments and variable maxSafeDose -> maxDose

* Updated comment and overdose formula

* chanceDoses -> maxDoseDeviation

* Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf

* Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf

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

* Update addons/medical_treatment/ACE_Medical_Treatment.hpp

---------

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-02-13 02:45:04 -08:00
BrettMayson
1649422cbd
Medical Vitals - Add SPO2 (#9360)
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
2024-02-07 17:50:18 -03:00
PabstMirror
a3aef6a066
General - Cleanup spaces in macros (#9769)
Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
2024-02-05 14:04:24 -03:00
BrettMayson
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
Grim
7bc3fab533
Medical - Fix getting no pulse on a dead patient receiving CPR (#9756)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2024-01-22 19:44:42 -03:00
Grim
6741822480
Interaction - Allow unloading patients, bodies, and captives from inside vehicles (#9645)
* add unloading from inside vehicles

* Update addons/common/functions/fnc_findUnloadPosition.sqf

* Update fnc_findUnloadPosition.sqf
2023-11-22 19:38:52 -03:00
johnb432
ac9044f2d6
Zeus - Add medical menu module (#9367)
* open medical menu from Zeus

* fix function header

* Zeus can use every action, add room for more buttons in medical menu

* Update addons/medical_treatment/functions/fnc_treatment.sqf

* Added zeus treatment time coeff

* Update addons/medical_gui/functions/fnc_canOpenMenu.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Update fnc_canOpenMenu.sqf

* Update initSettings.sqf

* Update fnc_moduleMedicalMenu.sqf

* Added check + documentation

* Update fnc_canTreat.sqf

---------

Authored-by: Brett <brett@mayson.io>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-11-20 13:52:29 -08:00
Grim
b8a9376a65
Medical Treatment - Use Laws of War bodybag model and add colored bodybags (#9371)
* add colored bodybags

* fix dogtags, add icons, revert item model to original

* Retexture ace's item model

* Keep original vehicle classname

* Update fnc_placeInBodyBagOrGrave.sqf

* fix displayName

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-10-24 15:16:52 -04:00
Grim
642ca3c14d
Medical - Make dug graves respect terrain slope (#9545)
* slope dug graves

* remove parentheses
2023-10-20 02:40:48 +00:00
Grim
f088d9bfa1
General - uiNamespace cleanup (#9425)
* fix clear trauma on stitch

* add compileFinal and move to hashmap

* add missin param

* fix captives

* explosives/medtreat

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-10-04 14:09:05 -04:00
PabstMirror
3c9d7733e8
Medical Treatment - Fix grave digging (#9455) 2023-10-02 11:05:56 -04:00
Drofseh
8bf0772558
Medical Treatement - Add Grave Digging To Body Bags (#9442)
* add grave digging to body bags

* move buryBodyBag action to config, change grave ui icon to headstone

* improvements from code review

* switch direction check to man instead of bodybag, nominally allowing anything to be buried

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2023-10-01 14:55:13 -04:00
BrettMayson
66deb59037
Medical Treatment - Add event and setting for grave creation (#9441)
graves: event and setting for markers

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2023-10-01 14:31:38 -04:00
Drofseh
b9580a0349
Medical Treatment - Change isAwake check for grave digging to only apply to CAManBase (#9451)
* Move awake check for bodybag grave

* Apply suggestions from code review

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-10-01 13:42:07 -04:00
Marstruc
a8bd08136e
Medical Treatment - Add new Grave model (#9444)
* Added Grave model, swapped Grave classnames

* Change p3d name of Grave model

* Update addons/medical_treatment/CfgVehicles.hpp

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Updated grave model, textures, classname.

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-10-01 08:48:31 -04:00
Drofseh
dbf288851e
Medical Treatement - Don't allow conscious patients to be buried (#9448)
Don't allow conscious patients to be buried
2023-09-30 11:32:06 -04:00
Drofseh
94f3b301e0
Medical Treatment - Add Grave Digging for Corpse Disposal (#9276)
* Add grave digging

* Update fnc_placeInBodyBagOrGrave.sqf

* Update fnc_placeInBodyBagOrGrave.sqf

* Update fnc_placeInBodyBagOrGrave.sqf

* Update addons/medical_treatment/functions/fnc_placeInBodyBag.sqf

Co-authored-by: BrettMayson <brett@mayson.io>

* Add setting to enable/disable

* improvements

- fix flipped bool in fnc_canDigGrave
- improve fnc_placeInBodyBagOrGrave.sqf by splitting out some checks and item assignment into separate bodybag and grave functions

* fix typo in variable

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* add to XEH_PREP and fix event for non-local patient

* Add interaction to check name on headstone

* Update addons/medical_treatment/XEH_postInit.sqf

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

* Simplify Setting

* Apply suggestions from code review

Co-authored-by: jonpas <jonpas33@gmail.com>

* Update addons/medical_treatment/stringtable.xml

Co-authored-by: jonpas <jonpas33@gmail.com>

* Make placeInBodyBagOrGrave more generic and use any grave class

* Update addons/medical_treatment/functions/fnc_placeInGrave.sqf

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

* Update medical-treatment-framework.md

* Update docs/wiki/framework/medical-treatment-framework.md

Co-authored-by: jonpas <jonpas33@gmail.com>

* update docs

* Update addons/medical_treatment/functions/fnc_placeInBodyBagOrGrave.sqf

* Update addons/medical_treatment/functions/fnc_placeInGrave.sqf

* fix includes

---------

Co-authored-by: BrettMayson <brett@mayson.io>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: jonpas <jonpas33@gmail.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2023-09-24 15:57:08 -04:00
Grim
ec96cdf12c
Medical Treatment - Fix clearing trauma after stitch with multiple wounds (#9420)
fix clear trauma on stitch
2023-09-23 12:59:10 -04:00
jonpas
742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00
Grim
de8940af9b
Medical Treatment - Add setting to rollover bandage effectiveness (#8426)
* use leftover bandage effectiveness on other wounds in same limb

variable naming

* Comments

Co-authored-by: Kyle Mckay <5459452+kymckay@users.noreply.github.com>

* variable naming, fix part index check in findMostEffectiveWound

trace 4

* fix function header

* Account for multiple wounds in time calculation

* fix trace, remove systemChat

* update for hashmaps

* compile cache

* Update addons/medical_treatment/functions/fnc_findMostEffectiveWounds.sqf

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

* add bandage effectiveness setting

* stupid

* remove limit on bandageRemaining

* Update addons/medical_treatment/functions/fnc_bandageLocal.sqf

Co-authored-by: BrettMayson <brett@mayson.io>

* Update fnc_getBandageTime.sqf

* Update fnc_bandageLocal.sqf

* fix header / debug

---------

Co-authored-by: Salluci <69561145+Salluci@users.noreply.github.com>
Co-authored-by: Kyle Mckay <5459452+kymckay@users.noreply.github.com>
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: BrettMayson <brett@mayson.io>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-10 02:06:15 -04:00
Grim
aa107ed517
Medical - Add treating with items from vehicle inventory (#9286)
* allow pulling items from vehicle inventory

* use vehicle items first
2023-09-05 11:20:56 -03:00
johnb432
6bc1ae453b
Update fnc_loadUnit.sqf (#9300) 2023-08-01 11:35:55 -05:00
Grim
39e4f9340b
Common/Medical - Change vehicle checks to objectParent (#9281)
* switch to objectParent

* use objectParent in unloadUnit

* fix derp

* allow unload patient on dead units
2023-07-22 09:11:58 +03:00
Grim
31e1ad0cff
Arsenal - Add Tools category and moveOnOverwrite parameter to FUNC(addCustomRightPanelButton) (#9247)
* add tools tab and setting

* move to preinit

* fix icon, add restart warning

* derp

Co-authored-by: Dystopian <sddex@ya.ru>

* Update addons/arsenal/stringtable.xml

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* remove setting

* add keepIfOverriden parameter

* docs again

* documentation whitespace

* docs grammar, change parameter name

* fix docs

* more docs fixes

* magazine support

* deprecate spare barrel item

* more docs, improve condition

---------

Co-authored-by: Dystopian <sddex@ya.ru>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-07-21 22:39:48 +03:00
Grim
45af0cdca0
Medical Treatment - Remove early exit when stitching with sutures (#9243) 2023-07-07 08:19:45 +03:00
Grim
0e26755b88
Medical - Add arsenal category (#9220)
* add medical category to arsenal

* function header

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* move to preinit, protect list

* improve macro

* documentation

* add config property

* add CfgMagazines

* Revert "add CfgMagazines"

Arsenal doesn't support magazines in custom categories

---------

Co-authored-by: GhostIsSpooky <69561145+Salluci@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-07-07 07:14:44 +03:00
pterolatypus
f434549faf
Medical Treatment - Change stitching action to be per-body-part (#9005)
* Make stitching action per-body-part

* Apply suggestions from code review

Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>

---------

Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
Co-authored-by: Salluci <salluci.lovi@gmail.com>
2023-06-28 01:43:45 +03:00
Kyle Mckay
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
Kam
1e6073c467
give tourniquet to patient or medic depending on setting (#9206) 2023-06-22 04:26:28 -03:00
KJW
fd3c9c967d
Medical Treatment - Improve Medical Actions underwater (#9096) 2023-05-15 23:47:00 -06:00
BrettMayson
e252ef67d6
Medical Treatment - Suture (#9020)
Co-authored-by: Walthzer <19926813+Walthzer@users.noreply.github.com>
2023-03-06 14:17:01 -06:00
Brett
90d63475d5
Medical Treatment - Add preferred seats for loading patients (#8789)
* Medical Treatment - Add preferred seats for loading patients

* load patients in reverse order

* add option for reverse fill

* Update addons/medical_treatment/functions/fnc_loadUnit.sqf

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>

* Update docs/wiki/framework/medical-treatment-framework.md

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2022-02-17 11:14:39 -06:00
GhostIsSpooky
a9296f66d5
Medical - Update setDead to use setHitpointDamage instigator param (#8397)
* Redoing this

* Revert "Redoing this"

This reverts commit 80ff709676.

* Do this properly

* Update fnc_handleKilled.sqf

* use setDead function directly

* Handle scripted camera

* redo #8387

I'm dumb.

* try this

* if construct outside of ctrlSetEventHandler

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>

* tweak disableUserInput / handleKilled

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2021-11-15 09:31:56 -06:00
Crowdedlight
5bf4167d3e
Medical - Add check to FullHealLocal in case unit is burning then extinguish before healing (#8622)
* added check if burning in fullheal and then extinguish

* Add check if fire module is loaded as PabstMirror showed

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2021-11-04 16:36:53 -05:00
PabstMirror
7bc6fdfa66
Cleanup - Trim all trailing whitespace (#8651) 2021-10-30 16:42:03 -05:00