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

Add all wound types to bandage treatment configs #2886

Merged
merged 2 commits into from
Nov 28, 2015
Merged

Conversation

PabstMirror
Copy link
Contributor

Should fix #2878

Gets the correct wound for the bandage treatment config
Used for selecting most effective bandage and reopening
_className was something like "velocityWoundMedium"
but configs only had base class "velocityWound"

Debug Output:

fnc_treatmentAdvanced_bandageLocal.sqf:44","OPENWOUND: :  _target=q1_1,  _x=[1,4,1,1,0.02]"]
fnc_treatmentAdvanced_bandageLocal.sqf:54","Could Not Find Wound Type trying base class - not minor/major/large:  _className=AvulsionsMedium"]
fnc_treatmentAdvanced_bandageLocal.sqf:66","Changed to: _className=Avulsions"]
fnc_treatmentAdvanced_bandageLocal.sqf:78","Wound classes: :  _specificClass=-1,  _classID=4"]
fnc_handleBandageOpening.sqf:44","Could Not Find Wound Type trying base class - not minor/major/large:  _className=AvulsionsMedium"]
fnc_handleBandageOpening.sqf:56","Changed to: _className=Avulsions"]
fnc_handleBandageOpening.sqf:72","configs: _bandage=PackingBandage, _className=Avulsions, _reopeningChance=0.3, _reopeningMinDelay=120, _reopeningMaxDelay=200"]
fnc_handleBandageOpening.sqf:97",": _reopeningChance=0.3"]

Another possible solution would be to add all ~21 wound classes to each bandage in ACE_Medical_Treatments.hpp and have the subclasses inherit?

Gets the correct wound for the bandage treatment config
Used for selecting most effective bandage and reopening
_className was something like "velocityWoundMedium"
but configs only had base class "velocityWound"
@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Nov 27, 2015
@thojkooi
Copy link
Contributor

Messing with the configs would be a rather significant change. It's been a bit to longer for me to fully know what the effects would be of doing so without diving into the code. I rather not do that for upcoming release.

I will look into this a bit more closely today. A better alternative might be to use the sqf array of injuries for the translation instead. It might already store all the necessary information.

@gienkov
Copy link
Contributor

gienkov commented Nov 27, 2015 via email

@thojkooi
Copy link
Contributor

There are sqf arrays for medical that contain a lot of the config values, including the dynamically generated wound classes.

https://github.com/acemod/ACE3/blob/master/addons/medical/functions/fnc_parseConfigForInjuries.sqf#L97

They (or their C++ variants) are used for calculating new injuries.

@PabstMirror
Copy link
Contributor Author

For configs I was thinking of something like this (bottom 3 lines are new):


class Treatment {
    class Bandaging {
       class FieldDressing {
            class Abrasion { //Base wound type
                effectiveness = 1;
                reopeningChance = 0;
                reopeningMinDelay = 0;
                reopeningMaxDelay = 0;
            };
            AbrasionMinor: Abrasion {}; //These are the wound classnames that are actually used
            AbrasionMedium: Abrasion {};
            AbrasionLarge: Abrasion {};

@thojkooi
Copy link
Contributor

That chance would be fine, I think.

@thojkooi thojkooi added this to the 3.4.0 milestone Nov 27, 2015
Fix by adding all config entries;
instead of trying to modify classname
@PabstMirror PabstMirror changed the title Try base wound class in bandage treatment configs Add all wound types to bandage treatment configs Nov 27, 2015
thojkooi added a commit that referenced this pull request Nov 28, 2015
Add all wound types to bandage treatment configs
@thojkooi thojkooi merged commit b807d1d into master Nov 28, 2015
@thojkooi thojkooi deleted the bandageReopen branch November 28, 2015 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wounds do not reopen after implementing the fix from #2646
3 participants