Commit Graph

16 Commits

Author SHA1 Message Date
johnb432
ff31bc69a8
Medical AI - Prevent medics from being blocked on treatments they can't complete (#10167)
* Add tourniquet support for Medical AI

* Stop blocking start

* Renamed states, condensed `canHeal`

* Renamed `tooManyMeds` state

* Update addons/medical_ai/functions/fnc_healUnit.sqf

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

* Change states to use singular, add states for autoinjectors & splint

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2024-08-11 08:06:59 -07:00
PabstMirror
0b4029b12f
Medical AI - AI will remove tourniquets (#10166)
* Medical AI - AI will remove tourniquets

* Medical AI - Improve tourniquet removal (for #10166) (#10178)

* Fixes & tweaks

- Have AI remove tourniquets ASAP
- Fixed bug where AI would not remove tourniquet, because it didn't have any bandages
- Allowed for more multitasking

* Allow healer to administer morphine if out of bandages

* Remove TODO comment

* Allow AI to remove tourniquets from limbs with no open wounds

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

---------

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2024-08-11 00:19:35 -07:00
johnb432
d7c98ea366
Medical AI - Fix specific treatment items not being removed (#10179)
Fix treatment items not being removed

Bug introduced in #10158
2024-08-10 10:19:36 -07:00
johnb432
cd678c5b90
Medical AI - Add tourniquet support (#10158)
Add tourniquet support for Medical AI
2024-08-05 02:39:01 -07:00
johnb432
98da279e8f
Medical AI - Give blood in Cardiac Arrest before doing CPR (#10154)
Give blood in CA if needed before doing CPR
2024-07-29 15:04:59 +02:00
johnb432
e99d6d9381
Medical AI - Make AI take tourniquets into account when medicing (#10142)
* Make AI take tourniquets into account when medicing

* Update fnc_healingLogic.sqf
2024-07-25 07:49:45 +02:00
johnb432
74de646a02
Medical AI - Fix splints not being applied in special circumstance & setting adding multiple EH (#10141)
Several medical AI fixes

- Not applying splints if too many medications were taken
- Potential nil for _target
- Setting could add multiple EH, require mission restart
2024-07-24 15:04:53 +02:00
johnb432
cb3c18c2fb
Medical AI - Header fixes (#10140)
Header fixes for medical AI
2024-07-23 15:28:40 +02:00
PabstMirror
8143cdc1da
Medical AI - Add setting to replace gear for AI (#9458) 2023-10-04 14:19: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
dbd5fbaf31
Medical - Add internal variable for wake-up timer and stable blood volume (#9374)
* Medical - Allow changing SPONTANEOUS_WAKE_UP_INTERVAL via var

* add variable for minimum blood volume

* change variable name

* update pain comment

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-09 00:15:43 -04:00
PabstMirror
25b8fd6d54
Medical AI - Add setting to require items for treatment (#9362)
* Medical AI - Add setting to require items for treatment

* all ivs

* invert setting

* Update addons/medical_ai/stringtable.xml

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

* move item hash to preStart

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2023-09-06 12:37:26 -04: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
GhostIsSpooky
5b89daf277
fix CPR treatment condition (#8762) 2022-01-31 13:40:03 -06:00
LachlanSneddon
e8fcbcdf4b Medical AI - Improve Healing Logic (#7255)
* Improve AI healing logic

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Added event for CPR chance being 0

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* Update fnc_healingLogic.sqf

Co-Authored-By: commy2 <commy2@users.noreply.github.com>
2019-12-14 12:04:09 -06:00
PabstMirror
05e4f74e73
Medical AI - Adjust healing logic for rewrite (#6902)
* Medical AI - Adjust healing logic for rewrite

- move state machine from config to sqf
- move all healing logic to seperate func
- attempt to handle healing for new system

* prioritize unitReady medics

* move setting to subcategory under medical

* Use faster GET_WOUND_BLEEDING

* Update fnc_healingLogic.sqf

* Update for wound array changes

* Update treatment events changes

* Fractures/splint

* formating / use GET_OPEN_WOUNDS

* Use non-localized medical category
2019-07-03 09:59:28 -05:00