Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical Treatment - Modernize and Cleanup #6933

Merged
merged 51 commits into from
Jun 3, 2019
Merged

Conversation

mharis001
Copy link
Member

@mharis001 mharis001 commented Apr 11, 2019

When merged this pull request will:

  • Modernizes and cleans up the medical_treatment component

@mharis001 mharis001 added kind/enhancement Release Notes: **IMPROVED:** status/WIP kind/cleanup Release Notes: **CHANGED:** labels Apr 11, 2019
addons/medical/XEH_preInit.sqf Outdated Show resolved Hide resolved
addons/medical_treatment/ACE_Medical_Treatment.hpp Outdated Show resolved Hide resolved
addons/medical_treatment/functions/fnc_checkPulseLocal.sqf Outdated Show resolved Hide resolved
addons/medical_treatment/functions/fnc_treatment.sqf Outdated Show resolved Hide resolved
addons/medical_treatment/functions/fnc_canTreat.sqf Outdated Show resolved Hide resolved
@@ -34,4 +34,23 @@ GVAR(animDurations) = [] call CBA_fnc_createNamespace;
["AinvPknlMstpSnonWnonDnon_medic1", 10]
];

// class names of medical facilities
// global variable so it can be accessed by mission makers
GVAR(facilityClasses) = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to have the default list in config? So that mods like CUP/RHS can add compat?
Iterating over all vehicles is not an option though. So maybe a seperate config class for these? Maybe in CfgMagazineWells style to make adding onto it easy?

Copy link
Member Author

@mharis001 mharis001 May 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add CfgVehicles config entry and then compile the list at preStart?
Or for your suggestion, would something like this work?

class ACE_Medical_Facilities {
    BI[] = {
        "VanillaMedFac01_F",
        "VanillaMedFac02_F"
    };
    CUP[] = {
        "TK_GUE_WarfareBFieldhHospital_Base_EP1",
        "TK_GUE_WarfareBFieldhHospital_EP1"
    };
};

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably do a separate config like that, same as we're doing for the healing item replacement

Copy link
Contributor

@dedmen dedmen May 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that's what I thought about.

Not sure if we really need preStart. The problem with preStart is that we always have to add overhead of compileFinal to make it hacking safe.
preInit would be good enough here.
Or.. We could argue that it's not gameplay relevant enough to be worth hacking, and thus we don't care and don't need to make it compileFinal'ed?

I'd prefer to not have a class in config root but rather something like ace_medical >> facilities

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 <[email protected]>
Drop unique id and merge classId and category
@PabstMirror
Copy link
Contributor

Fixed merge conflicts with limping: https://github.com/acemod/ACE3/tree/medical-treatment-work-rebaseLimping

class ItemInfo: InventoryFirstAidKitItem_Base_F {
mass = 4;
};
};
class Medikit: ItemCore {
type = 0;
ace_arsenal_hide = 1;
EGVAR(arsenal,hide) = 1;
Copy link
Member

@kymckay kymckay May 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should port over the removal of these entries from #7017 (will just close that PR as it's handled better here)

My reasoning is that there are a number of reasons people might still want to add vanilla items to units that will be only replaced if ACE is present (e.g. it's possible to make missions addon compatible but not dependent). Additionally it will be consistent with any other addons that add to the replacement config because they won't be hiding their own items.

@PabstMirror PabstMirror merged commit 44050df into master Jun 3, 2019
@PabstMirror PabstMirror deleted the medical-treatment-work branch June 3, 2019 15:31
Vdauphin added a commit to Vdauphin/HeartsAndMinds that referenced this pull request Jul 16, 2019
PabstMirror pushed a commit that referenced this pull request Jul 31, 2019
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
* 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 <[email protected]>

* 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 <[email protected]>

* formating, rename bone images

* Fix args for setDead call in actionPlaceInBodyBag

* Apply suggestions from code review

Co-Authored-By: PabstMirror <[email protected]>

* 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 36c22a9.

* 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 <[email protected]>
@PabstMirror PabstMirror modified the milestones: Medical Rewrite, 3.13.0, 3.13.0-temp3 Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Release Notes: **CHANGED:** kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants