mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Dynamically translate different wound types
* Brings back minor, medium, large wounds
This commit is contained in:
parent
89c68364ef
commit
627ea0ebdc
addons
medical/functions
medical_damage
medical_menu/functions
@ -88,12 +88,13 @@ if (_show == 1) then {
|
||||
if (_selectionN == _bodyPartN) then {
|
||||
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
|
||||
if (_amountOf > 0) then {
|
||||
private _className = (EGVAR(medical_damage,woundsData) select _woundClassID) select 6;
|
||||
private _postfix = ["Minor", "Medium", "Large"] select (floor ((0 max _bleeding min 0.1) / 0.05));
|
||||
private _woundDescription = localize format [ELSTRING(medical_damage,%1_%2), _className, _postfix];
|
||||
if (_amountOf >= 1) then {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushBack [format["%2x %1", (EGVAR(medical_damage,woundsData) select _woundClassID) select 6, ceil _amountOf], [1,1,1,1]];
|
||||
_allInjuryTexts pushBack [format["%2x %1", _woundDescription, ceil _amountOf], [1,1,1,1]];
|
||||
} else {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushBack [format["Partial %1", (EGVAR(medical_damage,woundsData) select _woundClassID) select 6], [1,1,1,1]];
|
||||
_allInjuryTexts pushBack [format["Partial %1", _woundDescription], [1,1,1,1]];
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -105,12 +106,13 @@ if (_show == 1) then {
|
||||
if (_selectionN == _bodyPartN) then {
|
||||
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
|
||||
if (_amountOf > 0) then {
|
||||
private _className = (EGVAR(medical_damage,woundsData) select _woundClassID) select 6;
|
||||
private _postfix = ["Minor", "Medium", "Large"] select (floor ((0 max _bleeding min 0.1) / 0.05));
|
||||
private _woundDescription = localize format [ELSTRING(medical_damage,%1_%2), _className, _postfix];
|
||||
if (_amountOf >= 1) then {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushBack [format ["[B] %2x %1", (EGVAR(medical_damage,woundsData) select _woundClassID) select 6, ceil _amountOf], [0.88,0.7,0.65,1]];
|
||||
_allInjuryTexts pushBack [format ["[B] %2x %1", _woundDescription, ceil _amountOf], [0.88,0.7,0.65,1]];
|
||||
} else {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushBack [format ["[B] Partial %1", (EGVAR(medical_damage,woundsData) select _woundClassID) select 6], [0.88,0.7,0.65,1]];
|
||||
_allInjuryTexts pushBack [format ["[B] Partial %1", _woundDescription], [0.88,0.7,0.65,1]];
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -122,12 +124,13 @@ if (_show == 1) then {
|
||||
if (_selectionN == _bodyPartN) then {
|
||||
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
|
||||
if (_amountOf > 0) then {
|
||||
private _className = (EGVAR(medical_damage,woundsData) select _woundClassID) select 6;
|
||||
private _postfix = ["Minor", "Medium", "Large"] select (floor ((0 max _bleeding min 0.1) / 0.05));
|
||||
private _woundDescription = localize format [ELSTRING(medical_damage,%1_%2), _className, _postfix];
|
||||
if (_amountOf >= 1) then {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushBack [format ["[S] %2x %1", (EGVAR(medical_damage,woundsData) select _woundClassID) select 6, ceil _amountOf], [0.7,0.7,0.7,1]];
|
||||
_allInjuryTexts pushBack [format ["[S] %2x %1", _woundDescription, ceil _amountOf], [0.7,0.7,0.7,1]];
|
||||
} else {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushBack [format ["[S] Partial %1", (EGVAR(medical_damage,woundsData) select _woundClassID) select 6], [0.7,0.7,0.7,1]];
|
||||
_allInjuryTexts pushBack [format ["[S] Partial %1", _woundDescription], [0.7,0.7,0.7,1]];
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -148,7 +151,7 @@ if (_show == 1) then {
|
||||
} else {
|
||||
private _bloodLoss = _selectionBloodLoss select _forEachIndex;
|
||||
if (_bloodLoss > 0) then {
|
||||
_green = 0 max (0.9 - _bloodLoss);
|
||||
_green = 0 max (0.8 - _bloodLoss);
|
||||
_blue = _green;
|
||||
} else {
|
||||
private _damage = _selectionDamage select _forEachIndex;
|
||||
|
@ -7,7 +7,6 @@ class ACE_Medical_Injuries {
|
||||
// Source: Scarle
|
||||
// Also called scrapes, they occur when the skin is rubbed away by friction against another rough surface (e.g. rope burns and skinned knees).
|
||||
class Abrasion {
|
||||
name = CSTRING(Abrasion);
|
||||
causes[] = {"falling", "ropeburn", "vehiclecrash", "unknown"};
|
||||
bleeding = 0.001;
|
||||
pain = 0.4;
|
||||
@ -15,8 +14,7 @@ class ACE_Medical_Injuries {
|
||||
maxDamage = 0.30;
|
||||
};
|
||||
// Occur when an entire structure or part of it is forcibly pulled away, such as the loss of a permanent tooth or an ear lobe. Explosions, gunshots, and animal bites may cause avulsions.
|
||||
class Avulsions {
|
||||
name = CSTRING(Avulsion);
|
||||
class Avulsion {
|
||||
causes[] = {"explosive", "vehiclecrash", "grenade", "shell", "bullet", "backblast", "bite"};
|
||||
bleeding = 0.5;
|
||||
pain = 1.0;
|
||||
@ -25,7 +23,6 @@ class ACE_Medical_Injuries {
|
||||
};
|
||||
// Also called bruises, these are the result of a forceful trauma that injures an internal structure without breaking the skin. Blows to the chest, abdomen, or head with a blunt instrument (e.g. a football or a fist) can cause contusions.
|
||||
class Contusion {
|
||||
name = CSTRING(Contusion);
|
||||
causes[] = {"bullet", "backblast", "punch", "vehiclecrash", "falling"};
|
||||
bleeding = 0.0;
|
||||
pain = 0.3;
|
||||
@ -33,8 +30,7 @@ class ACE_Medical_Injuries {
|
||||
maxDamage = 0.35;
|
||||
};
|
||||
// Occur when a heavy object falls onto a person, splitting the skin and shattering or tearing underlying structures.
|
||||
class CrushWound {
|
||||
name = CSTRING(Crush);
|
||||
class Crush {
|
||||
causes[] = {"falling", "vehiclecrash", "punch", "unknown"};
|
||||
bleeding = 0.1;
|
||||
pain = 0.8;
|
||||
@ -43,7 +39,6 @@ class ACE_Medical_Injuries {
|
||||
};
|
||||
// Slicing wounds made with a sharp instrument, leaving even edges. They may be as minimal as a paper cut or as significant as a surgical incision.
|
||||
class Cut {
|
||||
name = CSTRING(Cut);
|
||||
causes[] = {"vehiclecrash", "grenade", "explosive", "shell", "backblast", "stab", "unknown"};
|
||||
bleeding = 0.04;
|
||||
pain = 0.1;
|
||||
@ -51,7 +46,6 @@ class ACE_Medical_Injuries {
|
||||
};
|
||||
// Also called tears, these are separating wounds that produce ragged edges. They are produced by a tremendous force against the body, either from an internal source as in childbirth, or from an external source like a punch.
|
||||
class Laceration {
|
||||
name = CSTRING(Laceration);
|
||||
selections[] = {"All"};
|
||||
causes[] = {"vehiclecrash", "punch"};
|
||||
bleeding = 0.05;
|
||||
@ -59,8 +53,7 @@ class ACE_Medical_Injuries {
|
||||
minDamage = 0.01;
|
||||
};
|
||||
// Also called velocity wounds, they are caused by an object entering the body at a high speed, typically a bullet or small peices of shrapnel.
|
||||
class velocityWound {
|
||||
name = CSTRING(VelocityWound);
|
||||
class VelocityWound {
|
||||
causes[] = {"bullet", "grenade","explosive", "shell", "unknown"};
|
||||
bleeding = 1.0;
|
||||
pain = 0.9;
|
||||
@ -68,8 +61,7 @@ class ACE_Medical_Injuries {
|
||||
causeLimping = 1;
|
||||
};
|
||||
// Deep, narrow wounds produced by sharp objects such as nails, knives, and broken glass.
|
||||
class punctureWound {
|
||||
name = CSTRING(PunctureWound);
|
||||
class PunctureWound {
|
||||
causes[] = {"stab", "grenade"};
|
||||
bleeding = 0.1;
|
||||
pain = 0.4;
|
||||
|
@ -31,12 +31,11 @@ private _classID = 0;
|
||||
private _minDamage = GET_NUMBER(_entry >> "minDamage",0);
|
||||
private _maxDamage = GET_NUMBER(_entry >> "maxDamage",-1);
|
||||
private _causes = GET_ARRAY(_entry >> "causes",[]);
|
||||
private _displayName = GET_STRING(_entry >> "name",_className); // @todo, don't translate in config
|
||||
private _causeLimping = GET_NUMBER(_entry >> "causeLimping",0);
|
||||
|
||||
if (count _causes > 0) then {
|
||||
GVAR(woundClassNames) pushBack _className;
|
||||
GVAR(woundsData) pushBack [_classID, _selections, _bleeding, _pain, [_minDamage, _maxDamage], _causes, _displayName, _causeLimping];
|
||||
GVAR(woundsData) pushBack [_classID, _selections, _bleeding, _pain, [_minDamage, _maxDamage], _causes, _className, _causeLimping];
|
||||
_classID = _classID + 1;
|
||||
};
|
||||
} forEach configProperties [_woundsConfig, "isClass _x"];
|
||||
|
@ -417,18 +417,5 @@
|
||||
<Czech>Velká bodná rána</Czech>
|
||||
<Japanese>大きな刺し傷</Japanese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Damage_Femur">
|
||||
<English>Broken Femur</English>
|
||||
<German>Gebrochener Oberschenkelknochen</German>
|
||||
<Italian>Femore Rotto</Italian>
|
||||
<Russian>Перелом</Russian>
|
||||
<Polish>Zkłamana kość udowa</Polish>
|
||||
<French>Fémur cassé</French>
|
||||
<Spanish>Femur roto</Spanish>
|
||||
<Hungarian>Törött combcsont</Hungarian>
|
||||
<Portuguese>Fêmur quebrado</Portuguese>
|
||||
<Czech>Zlomená stehenní kost</Czech>
|
||||
<Japanese>大腿骨の骨折</Japanese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -35,7 +35,7 @@ private _availableSelections = [50, 51, 52, 53, 54, 55];
|
||||
} else {
|
||||
private _bloodLoss = _selectionBloodLoss select _forEachIndex;
|
||||
if (_bloodLoss > 0) then {
|
||||
_green = 0 max (0.9 - _bloodLoss);
|
||||
_green = 0 max (0.8 - _bloodLoss);
|
||||
_blue = _green;
|
||||
} else {
|
||||
private _damage = _selectionDamage select _forEachIndex;
|
||||
|
@ -66,12 +66,13 @@ private _allInjuryTexts = [];
|
||||
if (_selectionN == _bodyPartN) then {
|
||||
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
|
||||
if (_amountOf > 0) then {
|
||||
private _className = (EGVAR(medical_damage,woundsData) select _woundClassID) select 6;
|
||||
private _postfix = ["Minor", "Medium", "Large"] select (floor ((0 max _bleeding min 0.1) / 0.05));
|
||||
private _woundDescription = localize format [ELSTRING(medical_damage,%1_%2), _className, _postfix];
|
||||
if (_amountOf >= 1) then {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushBack [format["%2x %1", (EGVAR(medical_damage,woundsData) select _woundClassID) select 6, ceil _amountOf], [1,1,1,1]];
|
||||
_allInjuryTexts pushBack [format["%2x %1", _woundDescription, ceil _amountOf], [1,1,1,1]];
|
||||
} else {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushBack [format["Partial %1", (EGVAR(medical_damage,woundsData) select _woundClassID) select 6], [1,1,1,1]];
|
||||
_allInjuryTexts pushBack [format["Partial %1", _woundDescription], [1,1,1,1]];
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -83,12 +84,13 @@ private _allInjuryTexts = [];
|
||||
if (_selectionN == _bodyPartN) then {
|
||||
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
|
||||
if (_amountOf > 0) then {
|
||||
private _className = (EGVAR(medical_damage,woundsData) select _woundClassID) select 6;
|
||||
private _postfix = ["Minor", "Medium", "Large"] select (floor ((0 max _bleeding min 0.1) / 0.05));
|
||||
private _woundDescription = localize format [ELSTRING(medical_damage,%1_%2), _className, _postfix];
|
||||
if (_amountOf >= 1) then {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushBack [format ["[B] %2x %1", (EGVAR(medical_damage,woundsData) select _woundClassID) select 6, ceil _amountOf], [0.88,0.7,0.65,1]];
|
||||
_allInjuryTexts pushBack [format ["[B] %2x %1", _woundDescription, ceil _amountOf], [0.88,0.7,0.65,1]];
|
||||
} else {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushBack [format ["[B] Partial %1", (EGVAR(medical_damage,woundsData) select _woundClassID) select 6], [0.88,0.7,0.65,1]];
|
||||
_allInjuryTexts pushBack [format ["[B] Partial %1", _woundDescription], [0.88,0.7,0.65,1]];
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -100,12 +102,13 @@ private _allInjuryTexts = [];
|
||||
if (_selectionN == _bodyPartN) then {
|
||||
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
|
||||
if (_amountOf > 0) then {
|
||||
private _className = (EGVAR(medical_damage,woundsData) select _woundClassID) select 6;
|
||||
private _postfix = ["Minor", "Medium", "Large"] select (floor ((0 max _bleeding min 0.1) / 0.05));
|
||||
private _woundDescription = localize format [ELSTRING(medical_damage,%1_%2), _className, _postfix];
|
||||
if (_amountOf >= 1) then {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushBack [format ["[S] %2x %1", (EGVAR(medical_damage,woundsData) select _woundClassID) select 6, ceil _amountOf], [0.7,0.7,0.7,1]];
|
||||
_allInjuryTexts pushBack [format ["[S] %2x %1", _woundDescription, ceil _amountOf], [0.7,0.7,0.7,1]];
|
||||
} else {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushBack [format ["[S] Partial %1", (EGVAR(medical_damage,woundsData) select _woundClassID) select 6], [0.7,0.7,0.7,1]];
|
||||
_allInjuryTexts pushBack [format ["[S] Partial %1", _woundDescription], [0.7,0.7,0.7,1]];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user