mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of github.com:KoffeinFlummi/ACE3
This commit is contained in:
commit
ed3ac637d2
@ -193,6 +193,7 @@ PREP(getHitPoints);
|
||||
PREP(getHitPointsWithSelections);
|
||||
PREP(getReflectorsWithSelections);
|
||||
PREP(getLightProperties);
|
||||
PREP(getLightPropertiesWeapon);
|
||||
PREP(getVehicleCrew);
|
||||
|
||||
// turrets
|
||||
|
58
addons/common/functions/fnc_getLightPropertiesWeapon.sqf
Normal file
58
addons/common/functions/fnc_getLightPropertiesWeapon.sqf
Normal 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};
|
||||
};
|
||||
*/
|
@ -19,7 +19,8 @@ if (!isLightOn _vehicle) exitWith {[]};
|
||||
|
||||
private ["_reflectorsWithSelections", "_lights", "_hitpoints"];
|
||||
|
||||
_reflectorsWithSelections = [_vehicle] call FUNC(getReflectorsWithSelections);
|
||||
_reflectorsWithSelections = [[_vehicle], FUNC(getReflectorsWithSelections), uiNamespace, format [QEGVAR(cache,%1_%2), QUOTE(DFUNC(getReflectorsWithSelections)), typeOf _vehicle], 1E11] call FUNC(cachedCall);
|
||||
//_reflectorsWithSelections = [_vehicle] call FUNC(getReflectorsWithSelections);
|
||||
|
||||
_lights = _reflectorsWithSelections select 0;
|
||||
_hitpoints = _reflectorsWithSelections select 1;
|
||||
|
@ -20,16 +20,59 @@ _lightSource = _this select 1;
|
||||
private "_unitPos";
|
||||
_unitPos = _unit modelToWorld (_unit selectionPosition "spine3");
|
||||
|
||||
private ["_lights", "_lightLevel"];
|
||||
|
||||
_lights = [_lightSource] call FUNC(getTurnedOnLights);
|
||||
|
||||
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], FUNC(getLightPropertiesWeapon), uiNamespace, format [QEGVAR(cache,%1_%2), QUOTE(DFUNC(getLightPropertiesWeapon)), _flashlight], 1E11] call FUNC(cachedCall);
|
||||
//_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);
|
||||
_properties = [[_lightSource, _x], FUNC(getLightProperties), uiNamespace, format [QEGVAR(cache,%1_%2_%3), QUOTE(DFUNC(getLightProperties)), typeOf _lightSource, _x], 1E11] call FUNC(cachedCall);
|
||||
//_properties = [_lightSource, _x] call FUNC(getLightProperties);
|
||||
|
||||
// @todo intensity affects range?
|
||||
//_intensity = _properties select 0;
|
||||
@ -49,8 +92,18 @@ _lightLevel = 0;
|
||||
|
||||
_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])];
|
||||
//systemChat format ["%1 %2", (linearConversion [0, 30, _distance, 1, 0, true]), (linearConversion [_innerAngle, _outerAngle, _angle, 1, 0, true])];
|
||||
|
||||
} forEach _lights;
|
||||
} forEach _lights;
|
||||
|
||||
// handle campfires
|
||||
if (inflamed _lightSource) then {
|
||||
private "_distance";
|
||||
_distance = _unitPos distance position _lightSource;
|
||||
|
||||
_lightLevel = _lightLevel max linearConversion [0, 30, _distance, 0.5, 0, true];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
_lightLevel
|
||||
|
@ -81,7 +81,7 @@ if (!isServer) then {
|
||||
|
||||
_index = _files find _x;
|
||||
if (_index == -1) then {
|
||||
_missingAddons pushBack _x;
|
||||
if (_x != "ace_serverconfig") then {_missingAddons pushBack _x;};
|
||||
} else {
|
||||
|
||||
_clientVersion = _versions select _index;
|
||||
|
@ -295,14 +295,16 @@ class ACE_Medical_Advanced {
|
||||
selections[] = {"All"};
|
||||
bleedingRate = 0.0001;
|
||||
pain = 0.01;
|
||||
causes[] = {"falling", "ropeburn", "vehiclecrash"};
|
||||
causes[] = {"falling", "ropeburn", "vehiclecrash", "unknown"};
|
||||
minDamage = 0.01;
|
||||
class Minor {
|
||||
minDamage = 0.01;
|
||||
maxDamage = 0.2;
|
||||
bleedingRate = 0.0001;
|
||||
};
|
||||
class Medium {
|
||||
minDamage = 0.2;
|
||||
maxDamage = 0.3;
|
||||
bleedingRate = 0.00015;
|
||||
};
|
||||
class Large {
|
||||
@ -321,10 +323,12 @@ class ACE_Medical_Advanced {
|
||||
minDamage = 0.2;
|
||||
class Minor {
|
||||
minDamage = 0.2;
|
||||
maxDamage = 0.3;
|
||||
bleedingRate = 0.01;
|
||||
};
|
||||
class Medium {
|
||||
minDamage = 0.3;
|
||||
maxDamage = 0.6;
|
||||
bleedingRate = 0.02;
|
||||
};
|
||||
class Large {
|
||||
@ -341,14 +345,18 @@ class ACE_Medical_Advanced {
|
||||
pain = 0.05;
|
||||
causes[] = {"bullet", "backblast", "punch","vehiclecrash","falling"};
|
||||
minDamage = 0.01;
|
||||
maxDamage = 0.1;
|
||||
class Minor {
|
||||
minDamage = 0.01;
|
||||
maxDamage = 0.1;
|
||||
};
|
||||
class Medium {
|
||||
minDamage = 0.1;
|
||||
maxDamage = 0.15;
|
||||
};
|
||||
class Large {
|
||||
minDamage = 0.3;
|
||||
minDamage = 0.15;
|
||||
maxDamage = 0.2;
|
||||
};
|
||||
};
|
||||
|
||||
@ -358,14 +366,16 @@ class ACE_Medical_Advanced {
|
||||
selections[] = {"All"};
|
||||
bleedingRate = 0.01;
|
||||
pain = 0.1;
|
||||
causes[] = {"falling", "vehiclecrash", "punch"};
|
||||
causes[] = {"falling", "vehiclecrash", "punch", "unknown"};
|
||||
minDamage = 0.1;
|
||||
class Minor {
|
||||
minDamage = 0.1;
|
||||
maxDamage = 0.45;
|
||||
bleedingRate = 0.005;
|
||||
};
|
||||
class Medium {
|
||||
minDamage = 0.4;
|
||||
maxDamage = 0.7;
|
||||
bleedingRate = 0.007;
|
||||
};
|
||||
class Large {
|
||||
@ -380,14 +390,16 @@ class ACE_Medical_Advanced {
|
||||
selections[] = {"All"};
|
||||
bleedingRate = 0.01;
|
||||
pain = 0.075;
|
||||
causes[] = {"vehiclecrash", "grenade", "explosive", "shell", "backblast", "stab"};
|
||||
causes[] = {"vehiclecrash", "grenade", "explosive", "shell", "backblast", "stab", "unknown"};
|
||||
minDamage = 0.1;
|
||||
class Minor {
|
||||
minDamage = 0.1;
|
||||
maxDamage = 0.3;
|
||||
bleedingRate = 0.005;
|
||||
};
|
||||
class Medium {
|
||||
minDamage = 0.3;
|
||||
maxDamage = 0.65;
|
||||
bleedingRate = 0.02;
|
||||
};
|
||||
class Large {
|
||||
@ -406,10 +418,12 @@ class ACE_Medical_Advanced {
|
||||
minDamage = 0.01;
|
||||
class Minor {
|
||||
minDamage = 0.1;
|
||||
maxDamage = 0.5;
|
||||
bleedingRate = 0.005;
|
||||
};
|
||||
class Medium {
|
||||
minDamage = 0.5;
|
||||
maxDamage = 0.7;
|
||||
bleedingRate = 0.01;
|
||||
};
|
||||
class Large {
|
||||
@ -424,10 +438,11 @@ class ACE_Medical_Advanced {
|
||||
selections[] = {"All"};
|
||||
bleedingRate = 0.01;
|
||||
pain = 0.2;
|
||||
causes[] = {"bullet", "grenade","explosive", "shell"};
|
||||
causes[] = {"bullet", "grenade","explosive", "shell", "unknown"};
|
||||
minDamage = 0.15;
|
||||
class Minor {
|
||||
minDamage = 0.15;
|
||||
maxDamage = 0.3;
|
||||
bleedingRate = 0.025;
|
||||
};
|
||||
class Medium {
|
||||
@ -450,10 +465,12 @@ class ACE_Medical_Advanced {
|
||||
minDamage = 0.01;
|
||||
class Minor {
|
||||
minDamage = 0.01;
|
||||
maxDamage = 0.5;
|
||||
bleedingRate = 0.01;
|
||||
};
|
||||
class Medium {
|
||||
minDamage = 0.5;
|
||||
maxDamage = 0.75;
|
||||
bleedingRate = 0.03;
|
||||
};
|
||||
class Large {
|
||||
@ -518,6 +535,9 @@ class ACE_Medical_Advanced {
|
||||
thresholds[] = {{0.1, 1}};
|
||||
selectionSpecific = 1;
|
||||
};
|
||||
class unknown {
|
||||
thresholds[] = {{0.1, 1}};
|
||||
};
|
||||
};
|
||||
};
|
||||
class Treatment {
|
||||
@ -751,7 +771,7 @@ class ACE_Medical_Advanced {
|
||||
|
||||
// specific details for the ACE_Morphine treatment action
|
||||
class Morphine {
|
||||
painReduce = 0.7;
|
||||
painReduce = 1;
|
||||
hrIncreaseLow[] = {-10, -30, 35};
|
||||
hrIncreaseNormal[] = {-10, -50, 40};
|
||||
hrIncreaseHigh[] = {-10, -40, 50};
|
||||
|
@ -113,4 +113,8 @@ class ACE_Settings {
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(healHitPointAfterAdvBandage) {
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ class CfgWeapons {
|
||||
class ACE_fieldDressing: ACE_ItemCore {
|
||||
scope = 2;
|
||||
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;
|
||||
descriptionShort = $STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_USE;
|
||||
@ -38,7 +38,7 @@ class CfgWeapons {
|
||||
count = 1;
|
||||
type = 16;
|
||||
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));
|
||||
descriptionShort = $STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_USE;
|
||||
@ -52,7 +52,7 @@ class CfgWeapons {
|
||||
count = 1;
|
||||
type = 16;
|
||||
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";
|
||||
descriptionShort = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_USE;
|
||||
@ -66,7 +66,7 @@ class CfgWeapons {
|
||||
count = 1;
|
||||
type = 16;
|
||||
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));
|
||||
descriptionShort = $STR_ACE_MEDICAL_TOURNIQUET_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MEDICAL_TOURNIQUET_DESC_USE;
|
||||
@ -80,7 +80,7 @@ class CfgWeapons {
|
||||
count = 1;
|
||||
type = 16;
|
||||
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));
|
||||
descriptionShort = $STR_ACE_MEDICAL_MORPHINE_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MEDICAL_MORPHINE_DESC_USE;
|
||||
@ -94,7 +94,7 @@ class CfgWeapons {
|
||||
count = 1;
|
||||
type = 16;
|
||||
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));
|
||||
descriptionShort = $STR_ACE_MEDICAL_ATROPINE_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MEDICAL_ATROPINE_DESC_USE;
|
||||
@ -109,7 +109,7 @@ class CfgWeapons {
|
||||
count = 1;
|
||||
type = 16;
|
||||
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));
|
||||
descriptionShort = $STR_ACE_MEDICAL_EPINEPHRINE_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MEDICAL_EPINEPHRINE_DESC_USE;
|
||||
@ -122,7 +122,7 @@ class CfgWeapons {
|
||||
value = 1;
|
||||
count = 1;
|
||||
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;
|
||||
descriptionUse = $STR_ACE_MEDICAL_PLASMA_IV_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
@ -147,7 +147,7 @@ class CfgWeapons {
|
||||
count = 1;
|
||||
model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d";
|
||||
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;
|
||||
descriptionUse = $STR_ACE_MEDICAL_BLOOD_IV_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
@ -171,7 +171,7 @@ class CfgWeapons {
|
||||
value = 1;
|
||||
count = 1;
|
||||
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;
|
||||
descriptionUse = $STR_ACE_MEDICAL_SALINE_IV_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
@ -196,7 +196,7 @@ class CfgWeapons {
|
||||
count = 1;
|
||||
type = 16;
|
||||
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;
|
||||
descriptionUse = $STR_ACE_MEDICAL_QUIKCLOT_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
@ -209,7 +209,7 @@ class CfgWeapons {
|
||||
count = 1;
|
||||
type = 16;
|
||||
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;
|
||||
descriptionUse = $STR_ACE_MEDICAL_AID_KIT_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
@ -220,7 +220,7 @@ class CfgWeapons {
|
||||
scope=2;
|
||||
displayName= $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY;
|
||||
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;
|
||||
descriptionUse = $STR_ACE_MEDICAL_SURGICALKIT_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
@ -231,7 +231,7 @@ class CfgWeapons {
|
||||
scope=2;
|
||||
displayName= $STR_ACE_MEDICAL_BODYBAG_DISPLAY;
|
||||
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;
|
||||
descriptionUse = $STR_ACE_MEDICAL_BODYBAG_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
|
@ -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_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_woundUpdateRequest", FUNC(onWoundUpdateRequest)] 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 Indicator
|
||||
if (_bleeding > 0 and GVAR(effectTimeBlood) + 6 < time) then {
|
||||
if (_bleeding > 0 and GVAR(effectTimeBlood) + 3.5 < time) then {
|
||||
GVAR(effectTimeBlood) = time;
|
||||
[500 * _bleeding] call BIS_fnc_bloodEffect;
|
||||
[600 * _bleeding] call BIS_fnc_bloodEffect;
|
||||
};
|
||||
|
||||
// Blood Volume Effect
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
[_caller, objNull] call cse_fnc_carryObj;
|
||||
[_target, objNull] call cse_fnc_carryObj;
|
||||
|
||||
_vehicle = [_caller, _target] call EFUNC(common,loadPerson);
|
||||
if (!isNull _vehicle) then {
|
||||
if (!isnil QGVAR(DROP_ADDACTION)) then {
|
||||
|
@ -26,7 +26,6 @@ _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
|
||||
|
||||
// Check if there is a tourniquet on this bodypart
|
||||
if ((_tourniquets select _part) == 0) exitwith {
|
||||
// TODO localization
|
||||
_output = "There is no tourniquet on this body part!";
|
||||
["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
|
||||
_caller addItem "ACE_tourniquet";
|
||||
|
||||
// "AinvPknlMstpSlayWrflDnon_medic
|
||||
|
@ -16,7 +16,7 @@ _part = _this select 1;
|
||||
_withDamage = if (count _this > 2) then { _this select 2} else {0};
|
||||
|
||||
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 };
|
||||
|
||||
// Find the correct Damage threshold for unit.
|
||||
|
@ -14,11 +14,12 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_target", "_show"];
|
||||
private ["_target", "_show", "_selectionN"];
|
||||
_target = _this select 0;
|
||||
_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};
|
||||
|
||||
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]];
|
||||
};
|
||||
|
||||
_damaged = [false, false, false, false, false, false];
|
||||
_selectionBloodLoss = [0,0,0,0,0,0];
|
||||
if (GVAR(level) >= 2) then {
|
||||
_openWounds = _target getvariable [QGVAR(openWounds), []];
|
||||
@ -82,10 +84,12 @@ if (_show) then {
|
||||
{
|
||||
_amountOf = _x select 3;
|
||||
// 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 {
|
||||
_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 {
|
||||
// TODO localization
|
||||
_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;
|
||||
// Find how much this bodypart is bleeding
|
||||
//if (_selectionBloodLoss select (_x select 2) == 0) then {
|
||||
// _selectionBloodLoss set [(_x select 2), (_selectionBloodLoss select (_x select 2)) + (15 * ((_x select 4) * _amountOf))];
|
||||
//};
|
||||
if (GVAR(currentSelectedSelectionN) == (_x select 2)) then {
|
||||
if !(_damaged select (_x select 2)) then {
|
||||
_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 > 0) then {
|
||||
if (_amountOf >= 1) then {
|
||||
// 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 {
|
||||
// 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;
|
||||
} else {
|
||||
_damaged = [true, true, true, true, true, true];
|
||||
{
|
||||
_selectionBloodLoss set [_forEachIndex, _target getHitPointDamage _x];
|
||||
|
||||
if (_target getHitPointDamage _x > 0.1) then {
|
||||
if (_target getHitPointDamage _x > 0.1 && {_forEachIndex == _selectionN}) then {
|
||||
// @todo localize
|
||||
_allInjuryTexts pushBack [format ["%1 %2",
|
||||
["Lightly wounded", "Heavily wounded"] select (_target getHitPointDamage _x > 0.5),
|
||||
@ -132,7 +137,7 @@ if (_show) then {
|
||||
};
|
||||
|
||||
// Handle the body image coloring
|
||||
_damaged = [false, false, false, false, false, false];
|
||||
|
||||
_availableSelections = [50,51,52,53,54,55];
|
||||
{
|
||||
private ["_red", "_green", "_blue"];
|
||||
@ -141,27 +146,30 @@ if (_show) then {
|
||||
_red = 1;
|
||||
_green = 1;
|
||||
_blue = 1;
|
||||
if (_total >0) then {
|
||||
_green = 0.9 - _total;
|
||||
if (_green < 0.0) then {
|
||||
_green = 0.0;
|
||||
};
|
||||
if (_total > 0) then {
|
||||
if (_damaged select _forEachIndex) then {
|
||||
_green = (0.9 - _total) max 0;
|
||||
_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];
|
||||
}foreach _selectionBloodLoss;
|
||||
|
||||
// TODO fill the lb with the appropiate information for the patient
|
||||
_lbCtrl = (_display displayCtrl 200);
|
||||
lbClear _lbCtrl;
|
||||
{
|
||||
_lbCtrl lbAdd (_x select 0);
|
||||
_lbCtrl lbSetColor [_foreachIndex, _x select 1];
|
||||
}foreach _genericMessages;
|
||||
|
||||
_amountOfGeneric = count _genericMessages;
|
||||
{
|
||||
_lbCtrl lbAdd (_x select 0);
|
||||
_lbCtrl lbSetColor [_foreachIndex, _x select 1];
|
||||
_lbCtrl lbSetColor [_foreachIndex + _amountOfGeneric, _x select 1];
|
||||
}foreach _allInjuryTexts;
|
||||
if (count _allInjuryTexts == 0) then {
|
||||
_lbCtrl lbAdd "No injuries on this bodypart..";
|
||||
|
@ -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], ..]
|
||||
_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
|
||||
_highestPossibleSpot = -1;
|
||||
@ -67,10 +74,7 @@ _allPossibleInjuries = [];
|
||||
|
||||
// No possible wounds available for this damage type or damage amount.
|
||||
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
|
||||
@ -84,7 +88,7 @@ _woundsCreated = [];
|
||||
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]
|
||||
_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;
|
||||
_foundIndex = -1;
|
||||
|
||||
|
@ -12,10 +12,9 @@
|
||||
|
||||
#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");
|
||||
_allTypes = ["stab", "grenade", "bullet", "explosive", "shell", "punch", "vehiclecrash", "backblast", "falling", "bite", "ropeburn"];
|
||||
_allFoundDamageTypes = [];
|
||||
_configDamageTypes = (_injuriesRootConfig >> "damageTypes");
|
||||
|
||||
|
@ -37,7 +37,6 @@ if !([_target] call FUNC(hasMedicalEnabled)) exitwith {
|
||||
};
|
||||
}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);
|
||||
|
||||
true;
|
||||
|
@ -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 (count _openWounds == 0) then {
|
||||
_target setDamage 0;
|
||||
if (GVAR(healHitPointAfterAdvBandage) && {{(_x select 2) == _part && {_x select 3 > 0}}count _openWounds == 0}) then {
|
||||
_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];
|
||||
};
|
||||
|
||||
|
@ -32,7 +32,6 @@ _items = _this select 4;
|
||||
};
|
||||
}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);
|
||||
|
||||
true;
|
||||
|
@ -71,9 +71,11 @@ if (alive _target) then {
|
||||
};
|
||||
};
|
||||
|
||||
// Reduce the pain level
|
||||
_pain = _target getvariable [QGVAR(pain), 0];
|
||||
_target setvariable [QGVAR(pain), (_pain - _painReduce) max 0];
|
||||
if (_painReduce > 0) then {
|
||||
// Reduce the pain level
|
||||
_pain = _target getvariable [QGVAR(pain), 0];
|
||||
_target setvariable [QGVAR(pain), (_pain - (_pain * _painReduce)) max 0];
|
||||
};
|
||||
|
||||
_resistance = _unit getvariable [QGVAR(peripheralResistance), 100];
|
||||
_resistance = _resistance + _viscosityChange;
|
||||
|
@ -28,6 +28,5 @@ if (count _items == 0) exitwith {};
|
||||
|
||||
_removeItem = _items select 0;
|
||||
[[_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, "activity", "STR_ACE_MEDICAL_ACTIVITY_gaveIV", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
|
||||
|
@ -41,7 +41,7 @@ if ((_tourniquets select _part) > 0) exitwith {
|
||||
|
||||
_removeItem = _items select 0;
|
||||
[[_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, "activity", "STR_ACE_MEDICAL_ACTIVITY_appliedTourniquet", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
|
||||
|
||||
|
@ -576,33 +576,25 @@ See the make.cfg file for additional build options.
|
||||
if build_tool == "pboproject":
|
||||
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:
|
||||
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"))
|
||||
|
||||
ret = subprocess.call(["cfgConvertGUI.exe", os.path.join(work_drive, prefix, module, "config.cpp")])
|
||||
if ret != 0:
|
||||
print_error("cfgConvertGUI (bin) return code == " + str(ret))
|
||||
input("Press Enter to continue...")
|
||||
|
||||
#PABST: Need micro sleeps because cfgConvertGUI can return before it's finished procressing
|
||||
time.sleep(0.05)
|
||||
|
||||
ret = subprocess.call(["cfgConvertGUI.exe", os.path.join(work_drive, prefix, module, "config.bin")])
|
||||
if ret != 0:
|
||||
print_error("cfgConvertGUI (txt) return code == " + str(ret))
|
||||
input("Press Enter to continue...")
|
||||
|
||||
time.sleep(0.05)
|
||||
|
||||
#cmd = [rapifyTool, "-L", "-P", os.path.join(work_drive, prefix, module, "config.cpp")];
|
||||
#ret = subprocess.call(cmd)
|
||||
#if ret != 0:
|
||||
# print_error("rapifyTool return code == " + str(ret) + str(cmd))
|
||||
# input("Press Enter to continue...")
|
||||
|
||||
# Call pboProject
|
||||
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$")):
|
||||
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")]
|
||||
|
Loading…
Reference in New Issue
Block a user