Merge remote-tracking branch 'origin/master' into allTheMissiles

This commit is contained in:
jaynus 2015-04-07 12:12:05 -07:00
commit 0c3b51c28b
175 changed files with 3440 additions and 3168 deletions

View File

@ -73,6 +73,7 @@ PREP(getStringFromMissionSQM);
PREP(getTargetAzimuthAndInclination); PREP(getTargetAzimuthAndInclination);
PREP(getTargetDistance); PREP(getTargetDistance);
PREP(getTargetObject); PREP(getTargetObject);
PREP(getTurnedOnLights);
PREP(getTurretCommander); PREP(getTurretCommander);
PREP(getTurretConfigPath); PREP(getTurretConfigPath);
PREP(getTurretCopilot); PREP(getTurretCopilot);
@ -111,6 +112,7 @@ PREP(isModLoaded);
PREP(isPlayer); PREP(isPlayer);
PREP(isTurnedOut); PREP(isTurnedOut);
PREP(letterToCode); PREP(letterToCode);
PREP(lightIntensityFromObject);
PREP(loadPerson); PREP(loadPerson);
PREP(loadPersonLocal); PREP(loadPersonLocal);
PREP(loadSettingsFromProfile); PREP(loadSettingsFromProfile);
@ -189,6 +191,9 @@ PREP(getConfigGunner);
PREP(getConfigCommander); PREP(getConfigCommander);
PREP(getHitPoints); PREP(getHitPoints);
PREP(getHitPointsWithSelections); PREP(getHitPointsWithSelections);
PREP(getReflectorsWithSelections);
PREP(getLightProperties);
PREP(getLightPropertiesWeapon);
PREP(getVehicleCrew); PREP(getVehicleCrew);
// turrets // turrets

View File

@ -11,4 +11,4 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity/5 min 1) * (1 - overcast) (sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity/5) * (1 - overcast)) min 1

View File

@ -0,0 +1,63 @@
/*
* Author: commy2
* Read properties of given vehicles light.
*
* Arguments:
* 0: Object with lights (Object)
* 1: Light classname (String)
*
* Return Value:
* Stuff from config (Array)
*
*/
#include "script_component.hpp"
private ["_vehicle", "_light"];
_vehicle = _this select 0;
_light = _this select 1;
private "_config";
_config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Reflectors" >> _light;
private ["_intensity", "_position", "_direction", "_innerAngle", "_outerAngle"];
_intensity = getNumber (_config >> "intensity");
_position = getText (_config >> "position");
_direction = getText (_config >> "direction");
_innerAngle = getNumber (_config >> "innerAngle");
_outerAngle = getNumber (_config >> "outerAngle");
[_intensity, _position, _direction, _innerAngle, _outerAngle]
/*
class Reflectors
{
class Light_1
{
color[] = {1000,1000,1100};
ambient[] = {10,10,11};
intensity = 5;
size = 1;
innerAngle = 90;
outerAngle = 130;
coneFadeCoef = 2;
position = "Light_1_pos";
direction = "Light_1_dir";
hitpoint = "Light_1_hitpoint";
selection = "Light_1_hide";
useFlare = 1;
flareSize = 0.9;
flareMaxDistance = 85;
class Attenuation
{
start = 0;
constant = 0;
linear = 0;
quadratic = 0.9;
hardLimitStart = 40;
hardLimitEnd = 60;
};
};
};
*/

View File

@ -0,0 +1,58 @@
/*
* Author: commy2
* Read properties of given flashlight. @todo, Can weapons themselves still have flashlights (no attachment)?
*
* Arguments:
* 0: A flashlight (String)
*
* Return Value:
* Stuff from config (Array)
*
*/
#include "script_component.hpp"
private "_weapon";
_weapon = _this select 0;
private "_config";
_config = configFile >> "CfgWeapons" >> _weapon >> "ItemInfo" >> "FlashLight";
private ["_intensity", "_position", "_direction", "_innerAngle", "_outerAngle"];
_intensity = getNumber (_config >> "intensity");
_position = getText (_config >> "position");
_direction = getText (_config >> "direction");
_innerAngle = getNumber (_config >> "innerAngle");
_outerAngle = getNumber (_config >> "outerAngle");
[_intensity, _position, _direction, _innerAngle, _outerAngle]
/*
class FlashLight
{
color[] = {180,156,120};
ambient[] = {0.9,0.78,0.6};
intensity = 20;
size = 1;
innerAngle = 20;
outerAngle = 80;
coneFadeCoef = 5;
position = "flash dir";
direction = "flash";
useFlare = 1;
flareSize = 1.4;
flareMaxDistance = "100.0f";
dayLight = 0;
class Attenuation
{
start = 0.5;
constant = 0;
linear = 0;
quadratic = 1.1;
hardLimitStart = 20;
hardLimitEnd = 30;
};
scale[] = {0};
};
*/

View File

@ -0,0 +1,45 @@
/*
* Author: commy2
*
* Returns all lighting hitpoints of any vehicle.
* Note: These are actual selections that are affected by setHit and getHit, not getHitPointDamage or setHitpointDamage.
* They behave like having an armor value of 0.
*
* Arguments:
* 0: A vehicle, not the classname (Object)
*
* Return Value:
* The light names and selections (Array)
*/
#include "script_component.hpp"
private ["_vehicle", "_config", "_hitpoints", "_selections"];
_vehicle = _this select 0;
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_hitpoints = [];
_selections = [];
// iterate through all parents
while {isClass _config} do {
private "_class";
_class = _config >> "Reflectors";
for "_i" from 0 to (count _class - 1) do {
private ["_entry", "_selection"];
_entry = _class select _i;
_selection = getText (_entry >> "hitpoint");
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
_hitpoints pushBack configName _entry;
_selections pushBack _selection;
};
};
_config = inheritsFrom _config;
};
[_hitPoints, _selections]

View File

@ -0,0 +1,36 @@
/*
* Author: commy2
*
* Returns all turned on lights of any vehicle or streetlamp.
*
* Arguments:
* 0: A vehicle, not the classname (Object)
*
* Return Value:
* All burning lights (Array)
*/
#include "script_component.hpp"
private "_vehicle";
_vehicle = _this select 0;
if (!isLightOn _vehicle) exitWith {[]};
private ["_reflectorsWithSelections", "_lights", "_hitpoints"];
_reflectorsWithSelections = [_vehicle] call FUNC(getReflectorsWithSelections);
_lights = _reflectorsWithSelections select 0;
_hitpoints = _reflectorsWithSelections select 1;
private "_turnedOnLights";
_turnedOnLights = [];
{
if (_vehicle getHit _x <= 0.9) then {
_turnedOnLights pushBack (_lights select _forEachIndex);
};
} forEach _hitpoints;
_turnedOnLights

View File

@ -0,0 +1,99 @@
/*
* Author: commy2
* Calculate light intensity object 1 recieves from object 2
*
* Arguments:
* 0: Object that recieves light (Object)
* 1: Object that emits light (Object)
*
* Return Value:
* Brightest light level
*
*/
#include "script_component.hpp"
private ["_unit", "_lightSource"];
_unit = _this select 0;
_lightSource = _this select 1;
private "_unitPos";
_unitPos = _unit modelToWorld (_unit selectionPosition "spine3");
private "_lightLevel";
_lightLevel = 0;
if (_lightSource isKindOf "CAManBase") then {
// handle persons with flashlights
private "_weapon";
_weapon = currentWeapon _lightSource;
if !(_lightSource isFlashlightOn _weapon) exitWith {};
private ["_flashlight", "_properties", "_intensity", "_innerAngle", "_outerAngle", "_position", "_direction", "_directionToUnit", "_distance", "_angle"];
_flashlight = switch (_weapon) do {
case (primaryWeapon _lightSource): {
primaryWeaponItems _lightSource select 1
};
case (secondaryWeapon _lightSource): {
secondaryWeaponItems _lightSource select 1
};
case (handgunWeapon _lightSource): {
handgunItems _lightSource select 1
};
default {""};
};
_properties = [_flashlight] call FUNC(getLightPropertiesWeapon);
_innerAngle = (_properties select 3) / 2;
_outerAngle = (_properties select 4) / 2;
_position = _lightSource modelToWorld (_lightSource selectionPosition "rightHand");
_direction = _lightSource weaponDirection _weapon;
_directionToUnit = _position vectorFromTo _unitPos;
_distance = _unitPos distance _position;
_angle = acos (_direction vectorDotProduct _directionToUnit);
_lightLevel = (linearConversion [0, 30, _distance, 1, 0, true]) * (linearConversion [_innerAngle, _outerAngle, _angle, 1, 0, true]);
} else {
// handle any object, strcutures, cars, tanks, etc.
private "_lights";
_lights = [_lightSource] call FUNC(getTurnedOnLights);
{
private ["_properties", "_intensity", "_innerAngle", "_outerAngle", "_position", "_direction", "_directionToUnit", "_distance", "_angle"];
_properties = [_lightSource, _x] call FUNC(getLightProperties);
// @todo intensity affects range?
//_intensity = _properties select 0;
_innerAngle = (_properties select 3) / 2;
_outerAngle = (_properties select 4) / 2;
// get world position and direction
_position = _lightSource modelToWorld (_lightSource selectionPosition (_properties select 1));
_direction = _lightSource modelToWorld (_lightSource selectionPosition (_properties select 2));
_direction = _position vectorFromTo _direction;
_directionToUnit = _position vectorFromTo _unitPos;
_distance = _unitPos distance _position;
_angle = acos (_direction vectorDotProduct _directionToUnit);
_lightLevel = _lightLevel max ((linearConversion [0, 30, _distance, 1, 0, true]) * (linearConversion [_innerAngle, _outerAngle, _angle, 1, 0, true]));
//systemChat format ["%1 %2", (linearConversion [0, 30, _distance, 1, 0, true]), (linearConversion [_innerAngle, _outerAngle, _angle, 1, 0, true])];
} forEach _lights;
};
_lightLevel

View File

@ -296,25 +296,21 @@
<Hungarian>Nincs hang</Hungarian> <Hungarian>Nincs hang</Hungarian>
</Key> </Key>
<Key ID="STR_ACE_ACTION_ACCEPT_REQUEST_KEY_TITLE"> <Key ID="STR_ACE_ACTION_ACCEPT_REQUEST_KEY_TITLE">
<Original>Accept Requests</Original>
<Polish>Akceptuj prośby</Polish> <Polish>Akceptuj prośby</Polish>
<Spanish>Aceptar Peticiones</Spanish> <Spanish>Aceptar Peticiones</Spanish>
<English>Accept Requests</English> <English>Accept Requests</English>
</Key> </Key>
<Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TITLE"> <Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TITLE">
<Original>Decline Requests</Original>
<Polish>Ignoruj prośby</Polish> <Polish>Ignoruj prośby</Polish>
<Spanish>Rechazar Peticiones</Spanish> <Spanish>Rechazar Peticiones</Spanish>
<English>Decline Requests</English> <English>Decline Requests</English>
</Key> </Key>
<Key ID="STR_ACE_ACTION_ACCEPT_REQUEST_KEY_TOOLTIP"> <Key ID="STR_ACE_ACTION_ACCEPT_REQUEST_KEY_TOOLTIP">
<Original>Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions.</Original>
<Polish>Akceptuj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish> <Polish>Akceptuj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish>
<Spanish>Acepta Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish> <Spanish>Acepta Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish>
<English>Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions.</English> <English>Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions.</English>
</Key> </Key>
<Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TOOLTIP"> <Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TOOLTIP">
<Original>Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions.</Original>
<Polish>Ignoruj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish> <Polish>Ignoruj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish>
<Spanish>Rechazar Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish> <Spanish>Rechazar Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish>
<English>Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions.</English> <English>Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions.</English>

View File

@ -1,6 +1,9 @@
// by commy2 // by commy2
#include "script_component.hpp" #include "script_component.hpp"
// fixes laser when being captured. Needed, because the selectionpsoition of the right hand is used
["SetHandcuffed", {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call EFUNC(common,addEventHandler);
if !(hasInterface) exitWith {}; if !(hasInterface) exitWith {};
GVAR(nearUnits) = []; GVAR(nearUnits) = [];

View File

@ -17,7 +17,6 @@
</Key> </Key>
<Key ID="STR_ACE_Laserpointer_useLaser"> <Key ID="STR_ACE_Laserpointer_useLaser">
<Original>&lt;t color='#9cf953'&gt;Use: &lt;/t&gt;Turn Laser ON/OFF</Original>
<English>&lt;t color='#9cf953'&gt;Use: &lt;/t&gt;Turn Laser ON/OFF</English> <English>&lt;t color='#9cf953'&gt;Use: &lt;/t&gt;Turn Laser ON/OFF</English>
<Czech>&lt;t color='#9cf953'&gt;Použití: &lt;/t&gt;Zapnout/vypnout laser</Czech> <Czech>&lt;t color='#9cf953'&gt;Použití: &lt;/t&gt;Zapnout/vypnout laser</Czech>
<French>&lt;t color='#9cf953'&gt;Utiliser : &lt;/t&gt;laser on/off</French> <French>&lt;t color='#9cf953'&gt;Utiliser : &lt;/t&gt;laser on/off</French>

View File

@ -1,13 +0,0 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_FiredBIS_EventHandlers {
class AllVehicles {
class ADDON {
firedBIS = QUOTE(_this call FUNC(forceMagazineMuzzleVelocity));
};
};
};

View File

@ -22,7 +22,6 @@ class CfgMagazines {
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_SDDescription"; descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_SDDescription";
picture = "\A3\weapons_f\data\ui\m_30stanag_caseless_green_CA.paa"; picture = "\A3\weapons_f\data\ui\m_30stanag_caseless_green_CA.paa";
initSpeed = 320; initSpeed = 320;
GVAR(forceMagazineMuzzleVelocity) = 1;
}; };
class ACE_30Rnd_65x39_caseless_mag_AP: 30Rnd_65x39_caseless_mag { class ACE_30Rnd_65x39_caseless_mag_AP: 30Rnd_65x39_caseless_mag {
@ -58,7 +57,6 @@ class CfgMagazines {
displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDNameShort"; displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDNameShort";
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDDescription"; descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDDescription";
initSpeed = 320; initSpeed = 320;
GVAR(forceMagazineMuzzleVelocity) = 1;
}; };
class ACE_30Rnd_65x39_caseless_green_mag_AP: 30Rnd_65x39_caseless_green { class ACE_30Rnd_65x39_caseless_green_mag_AP: 30Rnd_65x39_caseless_green {
@ -90,7 +88,6 @@ class CfgMagazines {
displayNameShort = "$STR_ACE_30Rnd_556x45_mag_SDNameShort"; displayNameShort = "$STR_ACE_30Rnd_556x45_mag_SDNameShort";
descriptionShort = "$STR_ACE_30Rnd_556x45_mag_SDDescription"; descriptionShort = "$STR_ACE_30Rnd_556x45_mag_SDDescription";
initSpeed = 320; initSpeed = 320;
GVAR(forceMagazineMuzzleVelocity) = 1;
picture = "\A3\weapons_f\data\ui\m_30stanag_green_ca.paa"; picture = "\A3\weapons_f\data\ui\m_30stanag_green_ca.paa";
}; };
@ -130,7 +127,6 @@ class CfgMagazines {
displayNameShort = "$STR_ACE_20Rnd_762x51_mag_SDNameShort"; displayNameShort = "$STR_ACE_20Rnd_762x51_mag_SDNameShort";
descriptionShort = "$STR_ACE_20Rnd_762x51_mag_SDDescription"; descriptionShort = "$STR_ACE_20Rnd_762x51_mag_SDDescription";
initSpeed = 320; initSpeed = 320;
GVAR(forceMagazineMuzzleVelocity) = 1;
}; };
class ACE_20Rnd_762x51_Mag_AP: 20Rnd_762x51_Mag { class ACE_20Rnd_762x51_Mag_AP: 20Rnd_762x51_Mag {

View File

@ -1,7 +0,0 @@
#include "script_component.hpp"
ADDON = false;
PREP(forceMagazineMuzzleVelocity);
ADDON = true;

View File

@ -12,8 +12,6 @@ class CfgPatches {
}; };
}; };
#include "CfgEventHandlers.hpp"
#include "CfgAmmo.hpp" #include "CfgAmmo.hpp"
#include "CfgMagazines.hpp" #include "CfgMagazines.hpp"
#include "CfgVehicles.hpp" #include "CfgVehicles.hpp"

View File

@ -1,41 +0,0 @@
/*
* Author: commy2
*
* DESCRIPTION.
*
* Arguments:
* firedBIS
*
* Return Value:
* None
*/
#include "script_component.hpp"
private ["_weapon", "_magazine", "_projectile"];
_weapon = _this select 1;
_magazine = _this select 5;
_projectile = _this select 6;
if (getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(forceMagazineMuzzleVelocity)) != 1) exitWith {
//hint str (speed _projectile / 3.6);
};
private ["_initSpeedWeapon", "_initSpeedMagazine"];
_initSpeedWeapon = getNumber (configFile >> "CfgWeapons" >> _weapon >> "initSpeed");
_initSpeedMagazine = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
//systemChat format ["W: %1m/s, M: %2m/s", _initSpeedWeapon, _initSpeedMagazine];
// force magazine initSpeed
private ["_credit", "_debit"];
_credit = vectorMagnitude velocity _projectile;
_debit = _credit + (_initSpeedMagazine - _initSpeedWeapon);
_projectile setVelocity ((velocity _projectile) vectorMultiply (_debit / _credit));
//hint str (speed _projectile / 3.6);

View File

@ -1 +0,0 @@
#include "\z\ace\addons\magazines\script_component.hpp"

View File

@ -295,14 +295,16 @@ class ACE_Medical_Advanced {
selections[] = {"All"}; selections[] = {"All"};
bleedingRate = 0.0001; bleedingRate = 0.0001;
pain = 0.01; pain = 0.01;
causes[] = {"falling", "ropeburn", "vehiclecrash"}; causes[] = {"falling", "ropeburn", "vehiclecrash", "unknown"};
minDamage = 0.01; minDamage = 0.01;
class Minor { class Minor {
minDamage = 0.01; minDamage = 0.01;
maxDamage = 0.2;
bleedingRate = 0.0001; bleedingRate = 0.0001;
}; };
class Medium { class Medium {
minDamage = 0.2; minDamage = 0.2;
maxDamage = 0.3;
bleedingRate = 0.00015; bleedingRate = 0.00015;
}; };
class Large { class Large {
@ -321,10 +323,12 @@ class ACE_Medical_Advanced {
minDamage = 0.2; minDamage = 0.2;
class Minor { class Minor {
minDamage = 0.2; minDamage = 0.2;
maxDamage = 0.3;
bleedingRate = 0.01; bleedingRate = 0.01;
}; };
class Medium { class Medium {
minDamage = 0.3; minDamage = 0.3;
maxDamage = 0.6;
bleedingRate = 0.02; bleedingRate = 0.02;
}; };
class Large { class Large {
@ -341,14 +345,18 @@ class ACE_Medical_Advanced {
pain = 0.05; pain = 0.05;
causes[] = {"bullet", "backblast", "punch","vehiclecrash","falling"}; causes[] = {"bullet", "backblast", "punch","vehiclecrash","falling"};
minDamage = 0.01; minDamage = 0.01;
maxDamage = 0.1;
class Minor { class Minor {
minDamage = 0.01; minDamage = 0.01;
maxDamage = 0.1;
}; };
class Medium { class Medium {
minDamage = 0.1; minDamage = 0.1;
maxDamage = 0.15;
}; };
class Large { class Large {
minDamage = 0.3; minDamage = 0.15;
maxDamage = 0.2;
}; };
}; };
@ -358,14 +366,16 @@ class ACE_Medical_Advanced {
selections[] = {"All"}; selections[] = {"All"};
bleedingRate = 0.01; bleedingRate = 0.01;
pain = 0.1; pain = 0.1;
causes[] = {"falling", "vehiclecrash", "punch"}; causes[] = {"falling", "vehiclecrash", "punch", "unknown"};
minDamage = 0.1; minDamage = 0.1;
class Minor { class Minor {
minDamage = 0.1; minDamage = 0.1;
maxDamage = 0.45;
bleedingRate = 0.005; bleedingRate = 0.005;
}; };
class Medium { class Medium {
minDamage = 0.4; minDamage = 0.4;
maxDamage = 0.7;
bleedingRate = 0.007; bleedingRate = 0.007;
}; };
class Large { class Large {
@ -380,14 +390,16 @@ class ACE_Medical_Advanced {
selections[] = {"All"}; selections[] = {"All"};
bleedingRate = 0.01; bleedingRate = 0.01;
pain = 0.075; pain = 0.075;
causes[] = {"vehiclecrash", "grenade", "explosive", "shell", "backblast", "stab"}; causes[] = {"vehiclecrash", "grenade", "explosive", "shell", "backblast", "stab", "unknown"};
minDamage = 0.1; minDamage = 0.1;
class Minor { class Minor {
minDamage = 0.1; minDamage = 0.1;
maxDamage = 0.3;
bleedingRate = 0.005; bleedingRate = 0.005;
}; };
class Medium { class Medium {
minDamage = 0.3; minDamage = 0.3;
maxDamage = 0.65;
bleedingRate = 0.02; bleedingRate = 0.02;
}; };
class Large { class Large {
@ -406,10 +418,12 @@ class ACE_Medical_Advanced {
minDamage = 0.01; minDamage = 0.01;
class Minor { class Minor {
minDamage = 0.1; minDamage = 0.1;
maxDamage = 0.5;
bleedingRate = 0.005; bleedingRate = 0.005;
}; };
class Medium { class Medium {
minDamage = 0.5; minDamage = 0.5;
maxDamage = 0.7;
bleedingRate = 0.01; bleedingRate = 0.01;
}; };
class Large { class Large {
@ -424,10 +438,11 @@ class ACE_Medical_Advanced {
selections[] = {"All"}; selections[] = {"All"};
bleedingRate = 0.01; bleedingRate = 0.01;
pain = 0.2; pain = 0.2;
causes[] = {"bullet", "grenade","explosive", "shell"}; causes[] = {"bullet", "grenade","explosive", "shell", "unknown"};
minDamage = 0.15; minDamage = 0.15;
class Minor { class Minor {
minDamage = 0.15; minDamage = 0.15;
maxDamage = 0.3;
bleedingRate = 0.025; bleedingRate = 0.025;
}; };
class Medium { class Medium {
@ -450,10 +465,12 @@ class ACE_Medical_Advanced {
minDamage = 0.01; minDamage = 0.01;
class Minor { class Minor {
minDamage = 0.01; minDamage = 0.01;
maxDamage = 0.5;
bleedingRate = 0.01; bleedingRate = 0.01;
}; };
class Medium { class Medium {
minDamage = 0.5; minDamage = 0.5;
maxDamage = 0.75;
bleedingRate = 0.03; bleedingRate = 0.03;
}; };
class Large { class Large {
@ -518,6 +535,9 @@ class ACE_Medical_Advanced {
thresholds[] = {{0.1, 1}}; thresholds[] = {{0.1, 1}};
selectionSpecific = 1; selectionSpecific = 1;
}; };
class unknown {
thresholds[] = {{0.1, 1}};
};
}; };
}; };
class Treatment { class Treatment {
@ -751,7 +771,7 @@ class ACE_Medical_Advanced {
// specific details for the ACE_Morphine treatment action // specific details for the ACE_Morphine treatment action
class Morphine { class Morphine {
painReduce = 0.7; painReduce = 1;
hrIncreaseLow[] = {-10, -30, 35}; hrIncreaseLow[] = {-10, -30, 35};
hrIncreaseNormal[] = {-10, -50, 40}; hrIncreaseNormal[] = {-10, -50, 40};
hrIncreaseHigh[] = {-10, -40, 50}; hrIncreaseHigh[] = {-10, -40, 50};

View File

@ -113,4 +113,8 @@ class ACE_Settings {
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(healHitPointAfterAdvBandage) {
typeName = "BOOL";
value = 1;
};
}; };

View File

@ -886,7 +886,7 @@ class CfgVehicles {
scope = 2; scope = 2;
accuracy = 1000; accuracy = 1000;
displayName = "[ACE] Medical Supply Crate"; displayName = "[ACE] Medical Supply Crate";
model = "\A3\weapons_F\AmmoBoxes\AmmoBox_F"; model = PATHTOF(data\ace_medcrate.p3d);
author = "$STR_ACE_Common_ACETeam"; author = "$STR_ACE_Common_ACETeam";
class TransportItems { class TransportItems {
class ACE_fieldDressing { class ACE_fieldDressing {

View File

@ -24,7 +24,7 @@ class CfgWeapons {
class ACE_fieldDressing: ACE_ItemCore { class ACE_fieldDressing: ACE_ItemCore {
scope = 2; scope = 2;
model = QUOTE(PATHTOF(data\bandage.p3d)); model = QUOTE(PATHTOF(data\bandage.p3d));
picture = QUOTE(PATHTOF(ui\items\fieldDressing.paa)); picture = QUOTE(PATHTOF(ui\items\fieldDressing_x_ca.paa));
displayName = $STR_ACE_MEDICAL_BANDAGE_BASIC_DISPLAY; displayName = $STR_ACE_MEDICAL_BANDAGE_BASIC_DISPLAY;
descriptionShort = $STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_USE;
@ -38,7 +38,7 @@ class CfgWeapons {
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MEDICAL_PACKING_BANDAGE_DISPLAY; displayName = $STR_ACE_MEDICAL_PACKING_BANDAGE_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\packingBandage.paa)); picture = QUOTE(PATHTOF(ui\items\packingBandage_x_ca.paa));
model = QUOTE(PATHTOF(data\packingbandage.p3d)); model = QUOTE(PATHTOF(data\packingbandage.p3d));
descriptionShort = $STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_USE;
@ -52,7 +52,7 @@ class CfgWeapons {
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DISPLAY; displayName = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\elasticBandage.paa)); picture = QUOTE(PATHTOF(ui\items\elasticBandage_x_ca.paa));
model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
descriptionShort = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_USE;
@ -66,7 +66,7 @@ class CfgWeapons {
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MEDICAL_TOURNIQUET_DISPLAY; displayName = $STR_ACE_MEDICAL_TOURNIQUET_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\tourniquet.paa)); picture = QUOTE(PATHTOF(ui\items\tourniquet_x_ca.paa));
model = QUOTE(PATHTOF(data\tourniquet.p3d)); model = QUOTE(PATHTOF(data\tourniquet.p3d));
descriptionShort = $STR_ACE_MEDICAL_TOURNIQUET_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_TOURNIQUET_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_TOURNIQUET_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_TOURNIQUET_DESC_USE;
@ -80,7 +80,7 @@ class CfgWeapons {
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MEDICAL_MORPHINE_DISPLAY; displayName = $STR_ACE_MEDICAL_MORPHINE_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\morphine.paa)); picture = QUOTE(PATHTOF(ui\items\morphine_x_ca.paa));
model = QUOTE(PATHTOF(data\morphine.p3d)); model = QUOTE(PATHTOF(data\morphine.p3d));
descriptionShort = $STR_ACE_MEDICAL_MORPHINE_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_MORPHINE_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_MORPHINE_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_MORPHINE_DESC_USE;
@ -94,7 +94,7 @@ class CfgWeapons {
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MEDICAL_ATROPINE_DISPLAY; displayName = $STR_ACE_MEDICAL_ATROPINE_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\atropine.paa)); picture = QUOTE(PATHTOF(ui\items\atropine_x_ca.paa));
model = QUOTE(PATHTOF(data\atropine.p3d)); model = QUOTE(PATHTOF(data\atropine.p3d));
descriptionShort = $STR_ACE_MEDICAL_ATROPINE_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_ATROPINE_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_ATROPINE_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_ATROPINE_DESC_USE;
@ -109,7 +109,7 @@ class CfgWeapons {
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MEDICAL_EPINEPHRINE_DISPLAY; displayName = $STR_ACE_MEDICAL_EPINEPHRINE_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\epinephrine.paa)); picture = QUOTE(PATHTOF(ui\items\epinephrine_x_ca.paa));
model = QUOTE(PATHTOF(data\epinephrine.p3d)); model = QUOTE(PATHTOF(data\epinephrine.p3d));
descriptionShort = $STR_ACE_MEDICAL_EPINEPHRINE_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_EPINEPHRINE_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_EPINEPHRINE_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_EPINEPHRINE_DESC_USE;
@ -122,7 +122,7 @@ class CfgWeapons {
value = 1; value = 1;
count = 1; count = 1;
displayName = $STR_ACE_MEDICAL_PLASMA_IV; displayName = $STR_ACE_MEDICAL_PLASMA_IV;
picture = QUOTE(PATHTOF(ui\items\plasmaIV.paa)); picture = QUOTE(PATHTOF(ui\items\plasmaIV_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_PLASMA_IV_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_PLASMA_IV_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_PLASMA_IV_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_PLASMA_IV_DESC_USE;
class ItemInfo: InventoryItem_Base_F { class ItemInfo: InventoryItem_Base_F {
@ -147,7 +147,7 @@ class CfgWeapons {
count = 1; count = 1;
model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d"; model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d";
displayName = $STR_ACE_MEDICAL_BLOOD_IV; displayName = $STR_ACE_MEDICAL_BLOOD_IV;
picture = QUOTE(PATHTOF(ui\items\bloodIV.paa)); picture = QUOTE(PATHTOF(ui\items\bloodIV_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_BLOOD_IV_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_BLOOD_IV_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_BLOOD_IV_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_BLOOD_IV_DESC_USE;
class ItemInfo: InventoryItem_Base_F { class ItemInfo: InventoryItem_Base_F {
@ -171,7 +171,7 @@ class CfgWeapons {
value = 1; value = 1;
count = 1; count = 1;
displayName = $STR_ACE_MEDICAL_SALINE_IV; displayName = $STR_ACE_MEDICAL_SALINE_IV;
picture = QUOTE(PATHTOF(ui\items\salineIV.paa)); picture = QUOTE(PATHTOF(ui\items\salineIV_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_SALINE_IV_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_SALINE_IV_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_SALINE_IV_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_SALINE_IV_DESC_USE;
class ItemInfo: InventoryItem_Base_F { class ItemInfo: InventoryItem_Base_F {
@ -196,7 +196,7 @@ class CfgWeapons {
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MEDICAL_QUIKCLOT_DISPLAY; displayName = $STR_ACE_MEDICAL_QUIKCLOT_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\quickclot.paa)); picture = QUOTE(PATHTOF(ui\items\quickclot_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_QUIKCLOT_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_QUIKCLOT_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_QUIKCLOT_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_QUIKCLOT_DESC_USE;
class ItemInfo: InventoryItem_Base_F { class ItemInfo: InventoryItem_Base_F {
@ -209,7 +209,7 @@ class CfgWeapons {
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MEDICAL_AID_KIT_DISPLAY; displayName = $STR_ACE_MEDICAL_AID_KIT_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\personal_aid_kit.paa)); picture = QUOTE(PATHTOF(ui\items\personal_aid_kit_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_AID_KIT_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_AID_KIT_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_AID_KIT_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_AID_KIT_DESC_USE;
class ItemInfo: InventoryItem_Base_F { class ItemInfo: InventoryItem_Base_F {
@ -220,7 +220,7 @@ class CfgWeapons {
scope=2; scope=2;
displayName= $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY; displayName= $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY;
model = QUOTE(PATHTOF(data\surgical_kit.p3d)); model = QUOTE(PATHTOF(data\surgical_kit.p3d));
picture = QUOTE(PATHTOF(ui\items\surgicalKit.paa)); picture = QUOTE(PATHTOF(ui\items\surgicalKit_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_SURGICALKIT_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_SURGICALKIT_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_SURGICALKIT_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_SURGICALKIT_DESC_USE;
class ItemInfo: InventoryItem_Base_F { class ItemInfo: InventoryItem_Base_F {
@ -231,7 +231,7 @@ class CfgWeapons {
scope=2; scope=2;
displayName= $STR_ACE_MEDICAL_BODYBAG_DISPLAY; displayName= $STR_ACE_MEDICAL_BODYBAG_DISPLAY;
model = QUOTE(PATHTOF(data\bodybagItem.p3d)); model = QUOTE(PATHTOF(data\bodybagItem.p3d));
picture = QUOTE(PATHTOF(ui\items\bodybag.paa)); picture = QUOTE(PATHTOF(ui\items\bodybag_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_BODYBAG_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_BODYBAG_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_BODYBAG_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_BODYBAG_DESC_USE;
class ItemInfo: InventoryItem_Base_F { class ItemInfo: InventoryItem_Base_F {

View File

@ -8,7 +8,6 @@ GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "A
GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"]; GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"];
GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"]; GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
["Medical_treatmentCompleted", FUNC(onTreatmentCompleted)] call ace_common_fnc_addEventHandler;
["medical_propagateWound", FUNC(onPropagateWound)] call ace_common_fnc_addEventHandler; ["medical_propagateWound", FUNC(onPropagateWound)] call ace_common_fnc_addEventHandler;
["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler; ["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler;
["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler; ["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler;
@ -134,9 +133,9 @@ GVAR(effectTimeBlood) = time;
_bleeding = ACE_player call FUNC(getBloodLoss); _bleeding = ACE_player call FUNC(getBloodLoss);
// Bleeding Indicator // Bleeding Indicator
if (_bleeding > 0 and GVAR(effectTimeBlood) + 6 < time) then { if (_bleeding > 0 and GVAR(effectTimeBlood) + 3.5 < time) then {
GVAR(effectTimeBlood) = time; GVAR(effectTimeBlood) = time;
[500 * _bleeding] call BIS_fnc_bloodEffect; [600 * _bleeding] call BIS_fnc_bloodEffect;
}; };
// Blood Volume Effect // Blood Volume Effect

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -23,9 +23,6 @@ if ([_target] call EFUNC(common,isAwake)) exitwith {
["displayTextStructured", [_caller], [["This person (%1) is awake and cannot be loaded", [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent); ["displayTextStructured", [_caller], [["This person (%1) is awake and cannot be loaded", [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
}; };
[_caller, objNull] call cse_fnc_carryObj;
[_target, objNull] call cse_fnc_carryObj;
_vehicle = [_caller, _target] call EFUNC(common,loadPerson); _vehicle = [_caller, _target] call EFUNC(common,loadPerson);
if (!isNull _vehicle) then { if (!isNull _vehicle) then {
if (!isnil QGVAR(DROP_ADDACTION)) then { if (!isnil QGVAR(DROP_ADDACTION)) then {

View File

@ -26,7 +26,6 @@ _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
// Check if there is a tourniquet on this bodypart // Check if there is a tourniquet on this bodypart
if ((_tourniquets select _part) == 0) exitwith { if ((_tourniquets select _part) == 0) exitwith {
// TODO localization
_output = "There is no tourniquet on this body part!"; _output = "There is no tourniquet on this body part!";
["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent); ["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent);
}; };
@ -37,5 +36,3 @@ _target setvariable [QGVAR(tourniquets), _tourniquets, true];
// Adding the tourniquet item to the caller // Adding the tourniquet item to the caller
_caller addItem "ACE_tourniquet"; _caller addItem "ACE_tourniquet";
// "AinvPknlMstpSlayWrflDnon_medic

View File

@ -16,7 +16,7 @@ _part = _this select 1;
_withDamage = if (count _this > 2) then { _this select 2} else {0}; _withDamage = if (count _this > 2) then { _this select 2} else {0};
if (!alive _unit) exitwith {true}; if (!alive _unit) exitwith {true};
if (_part < 0 || _part > 5) exitwith {}; if (_part < 0 || _part > 5) exitwith {false};
if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitwith { true }; if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitwith { true };
// Find the correct Damage threshold for unit. // Find the correct Damage threshold for unit.

View File

@ -14,11 +14,12 @@
#include "script_component.hpp" #include "script_component.hpp"
private ["_target", "_show"]; private ["_target", "_show", "_selectionN"];
_target = _this select 0; _target = _this select 0;
_show = if (count _this > 1) then {_this select 1} else {true}; _show = if (count _this > 1) then {_this select 1} else {true};
GVAR(currentSelectedSelectionN) = if (count _this > 2) then {_this select 2} else {0}; _selectionN = if (count _this > 2) then {_this select 2} else {0};
GVAR(currentSelectedSelectionN) = if (typeName _selectionN == "SCALAR") then {_selectionN} else {0};
GVAR(displayPatientInformationTarget) = if (_show) then {_target} else {ObjNull}; GVAR(displayPatientInformationTarget) = if (_show) then {_target} else {ObjNull};
if (USE_WOUND_EVENT_SYNC) then { if (USE_WOUND_EVENT_SYNC) then {
@ -75,6 +76,7 @@ if (_show) then {
_genericMessages pushback [format[localize "STR_ACE_MEDICAL_receivingIvVolume", floor _totalIvVolume], [1, 1, 1, 1]]; _genericMessages pushback [format[localize "STR_ACE_MEDICAL_receivingIvVolume", floor _totalIvVolume], [1, 1, 1, 1]];
}; };
_damaged = [false, false, false, false, false, false];
_selectionBloodLoss = [0,0,0,0,0,0]; _selectionBloodLoss = [0,0,0,0,0,0];
if (GVAR(level) >= 2) then { if (GVAR(level) >= 2) then {
_openWounds = _target getvariable [QGVAR(openWounds), []]; _openWounds = _target getvariable [QGVAR(openWounds), []];
@ -82,10 +84,12 @@ if (_show) then {
{ {
_amountOf = _x select 3; _amountOf = _x select 3;
// Find how much this bodypart is bleeding // Find how much this bodypart is bleeding
_selectionBloodLoss set [(_x select 2), (_selectionBloodLoss select (_x select 2)) + (15 * ((_x select 4) * _amountOf))];
if (GVAR(currentSelectedSelectionN) == (_x select 2)) 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 { if (_amountOf > 0) then {
_damaged set[_x select 2, true];
_selectionBloodLoss set [(_x select 2), (_selectionBloodLoss select (_x select 2)) + (20 * ((_x select 4) * _amountOf))];
if (_selectionN == (_x select 2)) 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 >= 1) then { if (_amountOf >= 1) then {
// TODO localization // TODO localization
_allInjuryTexts pushback [format["%2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [1,1,1,1]]; _allInjuryTexts pushback [format["%2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [1,1,1,1]];
@ -101,27 +105,28 @@ if (_show) then {
{ {
_amountOf = _x select 3; _amountOf = _x select 3;
// Find how much this bodypart is bleeding // Find how much this bodypart is bleeding
//if (_selectionBloodLoss select (_x select 2) == 0) then { if !(_damaged select (_x select 2)) then {
// _selectionBloodLoss set [(_x select 2), (_selectionBloodLoss select (_x select 2)) + (15 * ((_x select 4) * _amountOf))]; _selectionBloodLoss set [(_x select 2), (_selectionBloodLoss select (_x select 2)) + (20 * ((_x select 4) * _amountOf))];
//}; };
if (GVAR(currentSelectedSelectionN) == (_x select 2)) then { if (_selectionN == (_x select 2)) 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] // 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 { if (_amountOf > 0) then {
if (_amountOf >= 1) then { if (_amountOf >= 1) then {
// TODO localization // TODO localization
_allInjuryTexts pushback [format["[B] %2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [1,0.5,0.5,1]]; _allInjuryTexts pushback [format["[B] %2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [0.88,0.7,0.65,1]];
} else { } else {
// TODO localization // TODO localization
_allInjuryTexts pushback [format["[B] Partial %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6], [1,0.5,0.5,1]]; _allInjuryTexts pushback [format["[B] Partial %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6], [0.88,0.7,0.65,1]];
}; };
}; };
}; };
}foreach _bandagedwounds; }foreach _bandagedwounds;
} else { } else {
_damaged = [true, true, true, true, true, true];
{ {
_selectionBloodLoss set [_forEachIndex, _target getHitPointDamage _x]; _selectionBloodLoss set [_forEachIndex, _target getHitPointDamage _x];
if (_target getHitPointDamage _x > 0.1) then { if (_target getHitPointDamage _x > 0.1 && {_forEachIndex == _selectionN}) then {
// @todo localize // @todo localize
_allInjuryTexts pushBack [format ["%1 %2", _allInjuryTexts pushBack [format ["%1 %2",
["Lightly wounded", "Heavily wounded"] select (_target getHitPointDamage _x > 0.5), ["Lightly wounded", "Heavily wounded"] select (_target getHitPointDamage _x > 0.5),
@ -132,7 +137,7 @@ if (_show) then {
}; };
// Handle the body image coloring // Handle the body image coloring
_damaged = [false, false, false, false, false, false];
_availableSelections = [50,51,52,53,54,55]; _availableSelections = [50,51,52,53,54,55];
{ {
private ["_red", "_green", "_blue"]; private ["_red", "_green", "_blue"];
@ -142,26 +147,29 @@ if (_show) then {
_green = 1; _green = 1;
_blue = 1; _blue = 1;
if (_total > 0) then { if (_total > 0) then {
_green = 0.9 - _total; if (_damaged select _forEachIndex) then {
if (_green < 0.0) then { _green = (0.9 - _total) max 0;
_green = 0.0;
};
_blue = _green; _blue = _green;
_damaged set[_foreachIndex, true]; } else {
_green = (0.9 - _total) max 0;
_red = _green;
//_blue = _green;
};
}; };
(_display displayCtrl (_availableSelections select _foreachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0]; (_display displayCtrl (_availableSelections select _foreachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0];
}foreach _selectionBloodLoss; }foreach _selectionBloodLoss;
// TODO fill the lb with the appropiate information for the patient
_lbCtrl = (_display displayCtrl 200); _lbCtrl = (_display displayCtrl 200);
lbClear _lbCtrl; lbClear _lbCtrl;
{ {
_lbCtrl lbAdd (_x select 0); _lbCtrl lbAdd (_x select 0);
_lbCtrl lbSetColor [_foreachIndex, _x select 1]; _lbCtrl lbSetColor [_foreachIndex, _x select 1];
}foreach _genericMessages; }foreach _genericMessages;
_amountOfGeneric = count _genericMessages;
{ {
_lbCtrl lbAdd (_x select 0); _lbCtrl lbAdd (_x select 0);
_lbCtrl lbSetColor [_foreachIndex, _x select 1]; _lbCtrl lbSetColor [_foreachIndex + _amountOfGeneric, _x select 1];
}foreach _allInjuryTexts; }foreach _allInjuryTexts;
if (count _allInjuryTexts == 0) then { if (count _allInjuryTexts == 0) then {
_lbCtrl lbAdd "No injuries on this bodypart.."; _lbCtrl lbAdd "No injuries on this bodypart..";

View File

@ -33,6 +33,13 @@ _injuryTypeInfo = missionNamespace getvariable [format[QGVAR(woundInjuryType_%1)
// This are the available injuries for this damage type. Format [[classtype, selections, bloodloss, minimalDamage, pain], ..] // This are the available injuries for this damage type. Format [[classtype, selections, bloodloss, minimalDamage, pain], ..]
_allInjuriesForDamageType = _injuryTypeInfo select 2; _allInjuriesForDamageType = _injuryTypeInfo select 2;
// It appears we are dealing with an unknown type of damage.
if (count _allInjuriesForDamageType == 0) then {
// grabbing the configuration for unknown damage type
_injuryTypeInfo = missionNamespace getvariable [QGVAR(woundInjuryType_unknown),[[], false, []]];
_allInjuriesForDamageType = _injuryTypeInfo select 2;
};
// find the available injuries for this damage type and damage amount // find the available injuries for this damage type and damage amount
_highestPossibleSpot = -1; _highestPossibleSpot = -1;
@ -67,11 +74,8 @@ _allPossibleInjuries = [];
// No possible wounds available for this damage type or damage amount. // No possible wounds available for this damage type or damage amount.
if (_highestPossibleSpot < 0) exitwith { if (_highestPossibleSpot < 0) exitwith {
// It appears we are dealing with an unknown type of damage.
if (count _allInjuriesForDamageType == 0) then {
}; };
};
// Administration for open wounds and ids // Administration for open wounds and ids
_openWounds = _unit getvariable[QGVAR(openWounds), []]; _openWounds = _unit getvariable[QGVAR(openWounds), []];
@ -84,7 +88,7 @@ _woundsCreated = [];
for "_i" from 0 to (1+ floor(random(_x select 1)-1)) /* step +1 */ do { for "_i" from 0 to (1+ floor(random(_x select 1)-1)) /* step +1 */ do {
// Find the injury we are going to add. Format [ classID, allowdSelections, bloodloss, painOfInjury, minimalDamage] // Find the injury we are going to add. Format [ classID, allowdSelections, bloodloss, painOfInjury, minimalDamage]
_toAddInjury = if (random(1) >= 0.5) then {_allInjuriesForDamageType select _highestPossibleSpot} else {_allPossibleInjuries select (floor(random (count _allPossibleInjuries)));}; _toAddInjury = if (random(1) >= 0.85) then {_allInjuriesForDamageType select _highestPossibleSpot} else {_allPossibleInjuries select (floor(random (count _allPossibleInjuries)));};
_toAddClassID = _toAddInjury select 0; _toAddClassID = _toAddInjury select 0;
_foundIndex = -1; _foundIndex = -1;

View File

@ -12,10 +12,9 @@
#include "script_component.hpp" #include "script_component.hpp"
private ["_injuriesRootConfig", "_woundsConfig", "_allWoundClasses", "_amountOf", "_entry","_classType", "_selections", "_bloodLoss", "_pain","_minDamage","_causes", "_allTypes", "_damageTypesConfig", "_thresholds", "_typeThresholds", "_selectionSpecific", "_selectionSpecificType", "_classDisplayName", "_subClassDisplayName", "_maxDamage", "_subClassmaxDamage", "_defaultMinLethalDamage", "_minLethalDamage"]; private ["_injuriesRootConfig", "_woundsConfig", "_allWoundClasses", "_amountOf", "_entry","_classType", "_selections", "_bloodLoss", "_pain","_minDamage","_causes", "_damageTypesConfig", "_thresholds", "_typeThresholds", "_selectionSpecific", "_selectionSpecificType", "_classDisplayName", "_subClassDisplayName", "_maxDamage", "_subClassmaxDamage", "_defaultMinLethalDamage", "_minLethalDamage"];
_injuriesRootConfig = (configFile >> "ACE_Medical_Advanced" >> "Injuries"); _injuriesRootConfig = (configFile >> "ACE_Medical_Advanced" >> "Injuries");
_allTypes = ["stab", "grenade", "bullet", "explosive", "shell", "punch", "vehiclecrash", "backblast", "falling", "bite", "ropeburn"];
_allFoundDamageTypes = []; _allFoundDamageTypes = [];
_configDamageTypes = (_injuriesRootConfig >> "damageTypes"); _configDamageTypes = (_injuriesRootConfig >> "damageTypes");

View File

@ -37,7 +37,6 @@ if !([_target] call FUNC(hasMedicalEnabled)) exitwith {
}; };
}foreach _items;*/ }foreach _items;*/
["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent;
[_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_bandagedPatient", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); [_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_bandagedPatient", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
true; true;

View File

@ -96,8 +96,11 @@ if (_impact > 0 && {GVAR(enableAdvancedWounds)}) then {
}; };
// If all wounds have been bandaged, we will reset all damage to 0, so the unit is not showing any blood on the model anymore. // If all wounds have been bandaged, we will reset all damage to 0, so the unit is not showing any blood on the model anymore.
if (count _openWounds == 0) then { if (GVAR(healHitPointAfterAdvBandage) && {{(_x select 2) == _part && {_x select 3 > 0}}count _openWounds == 0}) then {
_target setDamage 0; _hitSelections = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
_point = _hitPoints select (_hitSelections find _selectionName);
[_target, _point, 0] call FUNC(setHitPointDamage);
// _target setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true]; // _target setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
}; };

View File

@ -32,7 +32,6 @@ _items = _this select 4;
}; };
}foreach _items; }foreach _items;
["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent;
[_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_usedItem", [[_caller] call EFUNC(common,getName), _className]] call FUNC(addToLog); [_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_usedItem", [[_caller] call EFUNC(common,getName), _className]] call FUNC(addToLog);
true; true;

View File

@ -71,9 +71,11 @@ if (alive _target) then {
}; };
}; };
if (_painReduce > 0) then {
// Reduce the pain level // Reduce the pain level
_pain = _target getvariable [QGVAR(pain), 0]; _pain = _target getvariable [QGVAR(pain), 0];
_target setvariable [QGVAR(pain), (_pain - _painReduce) max 0]; _target setvariable [QGVAR(pain), (_pain - (_pain * _painReduce)) max 0];
};
_resistance = _unit getvariable [QGVAR(peripheralResistance), 100]; _resistance = _unit getvariable [QGVAR(peripheralResistance), 100];
_resistance = _resistance + _viscosityChange; _resistance = _resistance + _viscosityChange;

View File

@ -28,6 +28,5 @@ if (count _items == 0) exitwith {};
_removeItem = _items select 0; _removeItem = _items select 0;
[[_target, _removeItem], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ [[_target, _removeItem], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent;
[_target, _removeItem] call FUNC(addToTriageCard); [_target, _removeItem] call FUNC(addToTriageCard);
[_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_gaveIV", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); [_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_gaveIV", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);

View File

@ -41,7 +41,7 @@ if ((_tourniquets select _part) > 0) exitwith {
_removeItem = _items select 0; _removeItem = _items select 0;
[[_target, _removeItem], QUOTE(DFUNC(treatmentTourniquetLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ [[_target, _removeItem], QUOTE(DFUNC(treatmentTourniquetLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent;
[_target, _removeItem] call FUNC(addToTriageCard); [_target, _removeItem] call FUNC(addToTriageCard);
[_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_appliedTourniquet", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); [_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_appliedTourniquet", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);

View File

@ -3,31 +3,26 @@
<Package name="WindDeflection"> <Package name="WindDeflection">
<Container ID="Weather_Meter"> <Container ID="Weather_Meter">
<Key ID="STR_ACE_WEATHER_METER_WIND_CATEGORY"> <Key ID="STR_ACE_WEATHER_METER_WIND_CATEGORY">
<Original>Wind Information</Original>
<English>Wind Information</English> <English>Wind Information</English>
<Polish>Informacje o wietrze</Polish> <Polish>Informacje o wietrze</Polish>
<Spanish>Información del viento</Spanish> <Spanish>Información del viento</Spanish>
</Key> </Key>
<Key ID="STR_ACE_WEATHER_METER_WIND_DIRECTION"> <Key ID="STR_ACE_WEATHER_METER_WIND_DIRECTION">
<Original>Direction: %1</Original>
<English>Direction: %1</English> <English>Direction: %1</English>
<Polish>Kierunek: %1</Polish> <Polish>Kierunek: %1</Polish>
<Spanish>Dirección: %1</Spanish> <Spanish>Dirección: %1</Spanish>
</Key> </Key>
<Key ID="STR_ACE_WEATHER_METER_WIND_SPEED"> <Key ID="STR_ACE_WEATHER_METER_WIND_SPEED">
<Original>Speed: %1 m/s</Original>
<English>Speed: %1 m/s</English> <English>Speed: %1 m/s</English>
<Polish>Prędkość: %1</Polish> <Polish>Prędkość: %1</Polish>
<Spanish>Velocidad: %1 m/s</Spanish> <Spanish>Velocidad: %1 m/s</Spanish>
</Key> </Key>
<Key ID="STR_ACE_WEATHER_METER_WEATHER_CATEGORY"> <Key ID="STR_ACE_WEATHER_METER_WEATHER_CATEGORY">
<Original>Weather Information</Original>
<English>Weather Information</English> <English>Weather Information</English>
<Polish>Informacje o pogodzie</Polish> <Polish>Informacje o pogodzie</Polish>
<Spanish>Información Meteorológica</Spanish> <Spanish>Información Meteorológica</Spanish>
</Key> </Key>
<Key ID="STR_ACE_WEATHER_METER_WEATHER_HUMIDITY"> <Key ID="STR_ACE_WEATHER_METER_WEATHER_HUMIDITY">
<Original>Humidity: %1%</Original>
<English>Humidity: %1%</English> <English>Humidity: %1%</English>
<Polish>Wilgotność: %1</Polish> <Polish>Wilgotność: %1</Polish>
<Spanish>Humedad: %1%</Spanish> <Spanish>Humedad: %1%</Spanish>

View File

@ -48,6 +48,7 @@ import hashlib
import configparser import configparser
import json import json
import traceback import traceback
import time
if sys.platform == "win32": if sys.platform == "win32":
import winreg import winreg
@ -538,8 +539,8 @@ See the make.cfg file for additional build options.
input("Press Enter to continue...") input("Press Enter to continue...")
print("Resuming build...") print("Resuming build...")
continue continue
else: #else:
print("WARNING: Module is stored on work drive (" + work_drive + ").") #print("WARNING: Module is stored on work drive (" + work_drive + ").")
try: try:
# Remove the old pbo, key, and log # Remove the old pbo, key, and log
@ -575,15 +576,25 @@ See the make.cfg file for additional build options.
if build_tool == "pboproject": if build_tool == "pboproject":
try: try:
#PABST: Convert config (run the macro'd config.cpp through CfgConvert twice to produce a de-macro'd cpp that pboProject can read without fucking up: #PABST: Convert config (run the macro'd config.cpp through CfgConvert twice to produce a de-macro'd cpp that pboProject can read without fucking up:
os.chdir(os.path.join(arma3tools_path, "CfgConvert"))
shutil.copyfile(os.path.join(work_drive, prefix, module, "config.cpp"), os.path.join(work_drive, prefix, module, "config.backup")) shutil.copyfile(os.path.join(work_drive, prefix, module, "config.cpp"), os.path.join(work_drive, prefix, module, "config.backup"))
print_green("\Pabst (double converting):" + "cfgConvertGUI.exe " + os.path.join(work_drive, prefix, module, "config.cpp"))
ret = subprocess.call(["cfgConvertGUI.exe", os.path.join(work_drive, prefix, module, "config.cpp")])
ret = subprocess.call(["cfgConvertGUI.exe", os.path.join(work_drive, prefix, module, "config.bin")])
# Call pboProject
os.chdir("P:\\") os.chdir("P:\\")
cmd = [os.path.join(work_drive, "CfgConvert", "CfgConvert.exe"), "-bin", "-dst", os.path.join(work_drive, prefix, module, "config.bin"), os.path.join(work_drive, prefix, module, "config.cpp")]
ret = subprocess.call(cmd)
#ret = subprocess.call(["cfgConvertGUI.exe", os.path.join(work_drive, prefix, module, "config.cpp")])
if ret != 0:
print_error("CfgConvert -bin return code == " + str(ret))
input("Press Enter to continue...")
cmd = [os.path.join(work_drive, "CfgConvert", "CfgConvert.exe"), "-txt", "-dst", os.path.join(work_drive, prefix, module, "config.cpp"), os.path.join(work_drive, prefix, module, "config.bin")]
ret = subprocess.call(cmd)
if ret != 0:
print_error("CfgConvert -txt) return code == " + str(ret))
input("Press Enter to continue...")
if os.path.isfile(os.path.join(work_drive, prefix, module, "$NOBIN$")): if os.path.isfile(os.path.join(work_drive, prefix, module, "$NOBIN$")):
print_green("$NOBIN$ Found. Proceeding with non-binarizing!") print_green("$NOBIN$ Found. Proceeding with non-binarizing!")
cmd = [makepboTool, "-P","-A","-L","-N","-G", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"Addons")] cmd = [makepboTool, "-P","-A","-L","-N","-G", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"Addons")]
@ -625,12 +636,12 @@ See the make.cfg file for additional build options.
if not build_successful: if not build_successful:
print_error("pboProject return code == " + str(ret)) print_error("pboProject return code == " + str(ret))
print_error("Module not successfully built/signed.") print_error("Module not successfully built/signed.")
#input("Press Enter to continue...") input("Press Enter to continue...")
print ("Resuming build...") print ("Resuming build...")
continue continue
#PABST: cleanup config BS (you could comment this out to see the "de-macroed" cpp #PABST: cleanup config BS (you could comment this out to see the "de-macroed" cpp
print_green("\Pabst (restoring): " + os.path.join(work_drive, prefix, module, "config.cpp")) #print_green("\Pabst (restoring): " + os.path.join(work_drive, prefix, module, "config.cpp"))
os.remove(os.path.join(work_drive, prefix, module, "config.cpp")) os.remove(os.path.join(work_drive, prefix, module, "config.cpp"))
os.remove(os.path.join(work_drive, prefix, module, "config.bin")) os.remove(os.path.join(work_drive, prefix, module, "config.bin"))
os.rename(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp")) os.rename(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp"))