Merge branch 'release'

Conflicts:
	addons/repair/stringtable.xml
This commit is contained in:
PabstMirror 2015-09-21 17:14:53 -05:00
commit 45e44251b6
34 changed files with 118 additions and 87 deletions

View File

@ -3,9 +3,9 @@
</p>
<p align="center">
<a href="https://github.com/acemod/ACE3/releases">
<img src="https://img.shields.io/badge/Version-3.3.1-blue.svg" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.3.2-blue.svg" alt="ACE3 Version">
</a>
<a href="https://github.com/acemod/ACE3/releases/download/v3.3.1/ace3_3.3.1.zip">
<a href="https://github.com/acemod/ACE3/releases/download/v3.3.2/ace3_3.3.2.zip">
<img src="http://img.shields.io/badge/Download-62.0_MB-green.svg" alt="ACE3 Download">
</a>
<a href="https://github.com/acemod/ACE3/issues">

Binary file not shown.

View File

@ -16,85 +16,73 @@ class Extended_Killed_EventHandlers {
};
};
class Extended_Init_EventHandlers {
//Need initPost or we have problems with setVariable with 'ACE_Cargo'
class Extended_InitPost_EventHandlers {
class StaticWeapon {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class ReammoBox_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class Cargo_base_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class CargoNet_01_box_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class Land_CargoBox_V1_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class Land_PaperBox_closed_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class Car {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Tank {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Helicopter {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Plane {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Ship_F {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class ACE_RepairItem_Base {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class ACE_bodyBagObject {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class ACE_ConcertinaWireCoil {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));

View File

@ -30,9 +30,11 @@ for "_i" from 1 to _amount do {
// Load item or delete it if no space left
if !([_item, _vehicle] call FUNC(loadItem)) exitWith {
TRACE_1("no room to load item - deleting",_item);
deleteVehicle _item;
};
TRACE_1("Item Loaded",_item);
// Invoke listenable event
["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent);
};

View File

@ -25,7 +25,11 @@ _initializedClasses = GETMVAR(GVAR(initializedClasses),[]);
if (isServer) then {
{
if (isClass _x) then {
["AddCargoByClass", [getText (_x >> "type"), _vehicle, getNumber (_x >> "amount")]] call EFUNC(common,localEvent);
private ["_cargoClassname", "_cargoCount"];
_cargoClassname = getText (_x >> "type");
_cargoCount = getNumber (_x >> "amount");
TRACE_3("adding ACE_Cargo", (configName _x), _cargoClassname, _cargoCount);
["AddCargoByClass", [_cargoClassname, _vehicle, _cargoCount]] call EFUNC(common,localEvent);
};
} count ("true" configClasses (configFile >> "CfgVehicles" >> _type >> "ACE_Cargo" >> "Cargo"));
};

View File

@ -19,13 +19,19 @@
private ["_loaded", "_space", "_itemSize"];
params ["_item", "_vehicle"];
TRACE_2("params",_item,_vehicle);
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false};
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {
TRACE_2("canLoadItemIn failed",_item,_vehicle);
false
};
_loaded = _vehicle getVariable [QGVAR(loaded), []];
_loaded pushback _item;
_vehicle setVariable [QGVAR(loaded), _loaded, true];
TRACE_1("added to loaded array",_loaded);
_space = [_vehicle] call FUNC(getCargoSpaceLeft);
_itemSize = [_item] call FUNC(getSizeItem);
_vehicle setVariable [QGVAR(space), _space - _itemSize, true];

View File

@ -1,6 +1,8 @@
#define COMPONENT cargo
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
#ifdef DEBUG_ENABLED_CARGO
#define DEBUG_MODE_FULL
#endif

View File

@ -111,7 +111,8 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
private ["_badClassnames"];
_badClassnames = [];
{
if ((isNil (format [QGVAR(Act_%1), typeOf _x])) || {isNil (format [QGVAR(SelfAct_%1), typeOf _x])}) then {
//Only check Land objects (WeaponHolderSimulated show up in `vehicles` for some reason)
if ((_x isKindOf "Land") && {(isNil (format [QGVAR(Act_%1), typeOf _x])) || {isNil (format [QGVAR(SelfAct_%1), typeOf _x])}}) then {
if (!((typeOf _x) in _badClassnames)) then {
_badClassnames pushBack (typeOf _x);
ACE_LOGERROR_3("Compile checks bad for (classname: %1)(addon: %2) %3", (typeOf _x), (unitAddons (typeOf _x)), _x);

View File

@ -5,8 +5,8 @@
#define MAJOR 3
#define MINOR 3
#define PATCHLVL 1
#define BUILD 2
#define PATCHLVL 2
#define BUILD 0
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD

View File

@ -67,7 +67,7 @@ class CfgVehicles {
displayName = CSTRING(BFT_Module_DisplayName);
function = QFUNC(blueForceTrackingModule);
scope = 2;
isGlobal = 1;
isGlobal = 0;
icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa);
class Arguments {
class Enabled {

View File

@ -1,6 +1,5 @@
/*
* Author: KoffeinFlummi
*
* Initializes the blue force tracking module.
*
* Arguments:
@ -12,15 +11,12 @@
#include "script_component.hpp"
if (!hasInterface) exitWith {};
if (!isServer) exitWith {};
PARAMS_3(_logic,_units,_activated);
if !(_activated) exitWith {};
params ["_logic"];
[_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule);
ACE_LOGINFO("Blue Force Tracking Module Initialized.");
TRACE_2("[ACE]: Blue Force Tracking Module initialized.", GVAR(BFT_Interval), GVAR(BFT_HideAiGroups));
ACE_LOGINFO_3("Blue Force Tracking Module Initialized:", GVAR(BFT_Enabled), GVAR(BFT_Interval), GVAR(BFT_HideAiGroups));

View File

@ -91,6 +91,4 @@ if (_dir != 1) then {
_handled
};
diag_log text format ["HJa %1", _handled];
_handled

View File

@ -122,6 +122,17 @@ class ACE_Torso {
enableInside = 1;
icon = PATHTOF(UI\icons\triageCard.paa);
};
class Diagnose {
displayName = CSTRING(Actions_Diagnose);
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'Diagnose')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'Diagnose')] call DFUNC(treatment));
EXCEPTIONS
showDisabled = 0;
priority = 2;
hotkey = "";
icon = "";
};
// Advanced medical
class FieldDressing {

View File

@ -23,7 +23,7 @@ if (!local _unit) exitwith {
[_this, QFUNC(addToLog), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
};
date params ["", "", "", "_minute", "_hour"];
date params ["", "", "", "_hour", "_minute"];
_moment = format [ (["%1:%2", "%1:0%2"] select (_minute < 10)), _hour, _minute];

View File

@ -109,7 +109,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW
if (_delayedUnconsicous) then {
[{
[_this select 0, true] call FUNC(setUnconscious);
}, [_unit], 0.7, 0] call EFUNC(common,waitAndExec);
}, [_unit], 0.7, 0] call EFUNC(common,waitAndExecute);
} else {
[{
[_this select 0, true] call FUNC(setUnconscious);

View File

@ -2106,6 +2106,9 @@
<Russian>%1 провел сердечно-легочную реанимацию</Russian>
<Spanish>%1 realicó RCP</Spanish>
</Key>
<Key ID="STR_ACE_Medical_Activity_fullHeal">
<English>%1 used Personal Aid Kit</English>
</Key>
<Key ID="STR_ACE_Medical_HeavilyWounded">
<English>Heavily wounded</English>
<German>Schwer verwundet:</German>

View File

@ -1,4 +1,3 @@
class ACE_Settings {
class GVAR(allow) {
displayName = CSTRING(allow);
@ -6,6 +5,7 @@ class ACE_Settings {
value = 1;
typeName = "SCALAR";
values[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled), ECSTRING(common,VehiclesOnly)};
category = ECSTRING(medical,Category_Medical);
};
class GVAR(useMenu) {
displayName = CSTRING(useMenu);
@ -14,6 +14,7 @@ class ACE_Settings {
typeName = "SCALAR";
values[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled), ECSTRING(common,VehiclesOnly)};
isClientSettable = 1;
category = ECSTRING(medical,Category_Medical);
};
class GVAR(openAfterTreatment) {
displayName = CSTRING(openAfterTreatment);
@ -21,5 +22,6 @@ class ACE_Settings {
typeName = "BOOL";
value = 1;
isClientSettable = 1;
category = ECSTRING(medical,Category_Medical);
};
};

View File

@ -7,7 +7,7 @@ if (!hasInterface) exitWith {};
["ACE3 Weapons", QGVAR(unjamWeapon), localize LSTRING(UnjamWeapon),
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon) &&
{currentWeapon ACE_player in (ACE_player getVariable [QGVAR(jammedWeapons), []])}

View File

@ -62,7 +62,7 @@ if (_distance < _backblastRange) then {
[_damage * 100] call BIS_fnc_bloodEffect;
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical") && {([_firer] call EFUNC(medical,hasMedicalEnabled))}) then {
[_firer, "HitBody", [_firer, "body", ((_firer getHitPointDamage "HitBody") + _damage), _firer, "backblast"] call EFUNC(medical,handleDamage)] call EFUNC(medical,setHitPointDamage);
[_firer, "body", ((_firer getvariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]) select 1) + _damage, _firer, "backblast", 0] call EFUNC(medical,handleDamage);
} else {
_firer setDamage (damage _firer + _damage);
};

View File

@ -62,7 +62,7 @@ if (!surfaceIsWater _pos) then {
if (_x == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect};
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical") && {([_x] call EFUNC(medical,hasMedicalEnabled))}) then {
[_x, "HitBody", [_x, "body", (_x getHitPointDamage "HitBody") + _damage, _firer, "backblast"] call EFUNC(medical,handleDamage)] call EFUNC(medical,setHitPointDamage);
[_x, "body", ((_x getvariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]) select 1) + _damage, _firer, "backblast", 0] call EFUNC(medical,handleDamage);
} else {
_x setDamage (damage _x + _damage);
};

View File

@ -10,35 +10,32 @@ class Extended_PostInit_EventHandlers {
};
};
class Extended_Init_EventHandlers {
//Need initPost or we have problems with setVariable with addSpareParts
class Extended_InitPost_EventHandlers {
class Car {
class ADDON {
init = QUOTE(_this call DFUNC(addRepairActions));
serverInit = QUOTE(_this call DFUNC(addSpareParts));
};
};
class Tank {
class ADDON {
init = QUOTE(_this call DFUNC(addRepairActions));
serverInit = QUOTE(_this call DFUNC(addSpareParts));
};
};
class Helicopter {
class ADDON {
init = QUOTE(_this call DFUNC(addRepairActions));
serverInit = QUOTE(_this call DFUNC(addSpareParts));
};
};
class Plane {
class ADDON {
init = QUOTE(_this call DFUNC(addRepairActions));
serverInit = QUOTE(_this call DFUNC(addSpareParts));
};
};
class Ship_F {
class ADDON {
init = QUOTE(_this call DFUNC(addRepairActions));

View File

@ -127,7 +127,7 @@ class CfgVehicles {
author = ECSTRING(common,ACETeam);
class Arguments {
class EnableList {
displayName = CSTRING(AssignEngineerRole_EnableList_DisplayName);
displayName = CSTRING(EnableList_DisplayName);
description = CSTRING(AssignEngineerRole_EnableList_Description);
defaultValue = "";
typeName = "STRING";
@ -171,7 +171,7 @@ class CfgVehicles {
author = ECSTRING(common,ACETeam);
class Arguments {
class EnableList {
displayName = CSTRING(AssignRepairVehicle_EnableList_DisplayName);
displayName = CSTRING(EnableList_DisplayName);
description = CSTRING(AssignRepairVehicle_EnableList_Description);
defaultValue = "";
typeName = "STRING";
@ -203,7 +203,7 @@ class CfgVehicles {
function = QFUNC(moduleAssignRepairFacility);
class Arguments {
class EnableList {
displayName = CSTRING(AssignRepairFacility_EnableList_DisplayName);
displayName = CSTRING(EnableList_DisplayName);
description = CSTRING(AssignRepairFacility_EnableList_Description);
defaultValue = "";
typeName = "STRING";
@ -243,7 +243,7 @@ class CfgVehicles {
author = ECSTRING(common,ACETeam);
class Arguments {
class List {
displayName = CSTRING(AddSpareParts_List_DisplayName);
displayName = CSTRING(EnableList_DisplayName);
description = CSTRING(AddSpareParts_List_Description);
defaultValue = "";
typeName = "STRING";

View File

@ -10,3 +10,4 @@ The people responsible for merging changes to this component or answering potent
- [commy2](https://github.com/commy2)
- [Glowbal](https://github.com/Glowbal)
- [Jonpas](https://github.com/jonpas)

View File

@ -6,7 +6,7 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
author[] = {"commy2", "Glowbal"};
author[] = {"commy2", "Glowbal", "Jonpas"};
authorUrl = "https://ace3mod.com";
VERSION_CONFIG;
};

View File

@ -18,7 +18,7 @@
params ["_vehicle"];
TRACE_1("params", _vehicle);
private ["_type", "_initializedClasses"];
private ["_type", "_initializedClasses", "_condition", "_statement", "_action"];
_type = typeOf _vehicle;
@ -44,28 +44,25 @@ _hitPointsAddedAmount = [];
if (_x in _wheelHitPoints) then {
// add wheel repair action
private ["_icon", "_selection"];
private ["_icon", "_selection", "_name", "_text"];
_icon = QUOTE(PATHTOF(ui\tire_ca.paa));
_icon = "A3\ui_f\data\igui\cfg\actions\repair_ca.paa";
// textDefault = "<img image='\A3\ui_f\data\igui\cfg\actions\repair_ca.paa' size='1.8' shadow=2 />";
_selection = _wheelHitPointSelections select (_wheelHitPoints find _x);
private ["_name", "_text", "_condition", "_statement"];
// remove wheel action
_name = format ["Remove_%1", _x];
_name = format ["Remove_%1", _x];
_text = localize LSTRING(RemoveWheel);
_condition = {[_this select 1, _this select 0, _this select 2 select 0, "RemoveWheel"] call DFUNC(canRepair)};
_statement = {[_this select 1, _this select 0, _this select 2 select 0, "RemoveWheel"] call DFUNC(repair)};
private "_action";
_action = [_name, _text, _icon, _statement, _condition, {}, [_x], _selection, 2] call EFUNC(interact_menu,createAction);
[_type, 0, [], _action] call EFUNC(interact_menu,addActionToClass);
// replace wheel action
_name = format ["Replace_%1", _x];
_name = format ["Replace_%1", _x];
_text = localize LSTRING(ReplaceWheel);
_condition = {[_this select 1, _this select 0, _this select 2 select 0, "ReplaceWheel"] call DFUNC(canRepair)};
@ -102,7 +99,7 @@ _hitPointsAddedAmount = [];
if (isText (configFile >> "CfgVehicles" >> _type >> "HitPoints" >> _x >> "depends")) exitWith {};
// add misc repair action
private ["_name", "_icon", "_selection", "_condition", "_statement"];
private ["_name", "_icon", "_selection", "_customSelectionsConfig"];
_name = format ["Repair_%1", _x];
@ -150,11 +147,9 @@ _hitPointsAddedAmount = [];
} else {
_selection = [1.75, 0, -1.75];
};
private "_action";
_action = [_name, _text, _icon, _statement, _condition, {}, [_x, "RepairTrack"], _selection, 4] call EFUNC(interact_menu,createAction);
[_type, 0, [], _action] call EFUNC(interact_menu,addActionToClass);
} else {
private "_action";
_action = [_name, _text, _icon, _statement, _condition, {}, [_x, "MiscRepair"], _selection, 4] call EFUNC(interact_menu,createAction);
// Put inside main actions if no other position was found above
if (_selection isEqualTo [0, 0, 0]) then {
@ -166,8 +161,6 @@ _hitPointsAddedAmount = [];
};
} forEach _hitPoints;
private ["_action", "_condition", "_statement"];
_condition = {[_this select 1, _this select 0, _this select 2 select 0, _this select 2 select 1] call DFUNC(canRepair)};
_statement = {[_this select 1, _this select 0, _this select 2 select 0, _this select 2 select 1] call DFUNC(repair)};
_action = [QGVAR(fullRepair), localize LSTRING(fullRepair), "A3\ui_f\data\igui\cfg\actions\repair_ca.paa", _statement, _condition, {}, ["", "fullRepair"], "", 4] call EFUNC(interact_menu,createAction);

View File

@ -20,6 +20,8 @@
private ["_hitpointGroupConfig", "_hitpointGroup", "_postRepairDamage", "_return"];
params ["_caller", "_target", "_hitPoint"];
if !([_unit, _target, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Get hitpoint groups if available
_hitpointGroupConfig = configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hitpointGroups);
_hitpointGroup = [];
@ -47,8 +49,4 @@ _return = false;
};
} forEach _hitpointGroup;
if (typeOf _target == "B_MRAP_01_F") then {
diag_log format ["%1 - %2", _hitPoint, _hitpointGroup];
};
_return

View File

@ -20,4 +20,6 @@
params ["_unit", "_target", "_hitPoint"];
TRACE_3("params",_unit,_target,_hitPoint);
if !([_unit, _target, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false};
alive _target && {_target getHitPointDamage _hitPoint < 1}

View File

@ -21,6 +21,8 @@ params ["_unit", "_target", "_hitPoint", ["_wheel",false]];
TRACE_4("params",_unit,_target,_hitPoint,_wheel);
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
if !([_unit, _target, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false};
if (typeName _wheel == "OBJECT") then {
// not near interpret as objNull
if !(_wheel in nearestObjects [_unit, ["ACE_Track"], 5]) then {

View File

@ -22,6 +22,8 @@ params ["_unit", "_target", "_hitPoint", ["_track", false]];
TRACE_4("params",_unit,_target,_hitPoint,_track);
// TODO [_unit, _track] call EFUNC(common,claim); on start of action
if !([_unit, _target, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false};
if (typeName _track == "OBJECT") then {
// not near interpret as objNull
if !(_track in nearestObjects [_unit, ["ACE_Track"], 5]) then {

View File

@ -23,7 +23,7 @@ TRACE_4("params",_unit,_target,_hitPoint,_wheel);
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
//if !([_unit, _target, _hitpoint, "ReplaceWheel"] call FUNC(canRepair)) exitwith {false};
//if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !([_unit, _target, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false};
//if !([_unit, GVAR(engineerSetting_Wheel)] call FUNC(isEngineer)) exitWith {false};

View File

@ -1,6 +1,8 @@
#define COMPONENT repair
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
#ifdef DEBUG_ENABLED_REPAIR
#define DEBUG_MODE_FULL
#endif

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="repair">
<Key ID="STR_ACE_Repair_SpareTrack">
@ -791,7 +791,7 @@
<Czech>Přiřadit Inženýra</Czech>
<Spanish>Asignar ingeniero</Spanish>
</Key>
<Key ID="STR_ACE_Repair_AssignEngineerRole_EnableList_DisplayName">
<Key ID="STR_ACE_Repair_EnableList_DisplayName">
<English>List</English>
<Polish>Lista</Polish>
<Portuguese>Lista</Portuguese>

View File

@ -39,26 +39,47 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) {
std::vector<std::string> arguments = parseExtensionInput(function);
if (arguments.size() > 0)
{
std::string command = arguments.at(0);
arguments.erase(arguments.begin());
if (command == "addInjuryType") {
returnValue = ace::medical::handleDamage::GetInstance().AddInjuryType(arguments);
}
else if (command == "addDamageType") {
returnValue = ace::medical::handleDamage::GetInstance().AddDamageType(arguments);
}
else if (command == "HandleDamageWounds") {
if (arguments.size() >= 4) {
std::string selectionName = arguments.at(0);
double amountOfDamage = std::stod(arguments.at(1));
std::string typeOfDamage = arguments.at(2);
int woundID = std::stoi(arguments.at(3));
returnValue = ace::medical::handleDamage::GetInstance().HandleDamageWounds(selectionName, amountOfDamage, typeOfDamage, woundID);
try {
std::string command = arguments.at(0);
arguments.erase(arguments.begin());
if (command == "addInjuryType") {
returnValue = ace::medical::handleDamage::GetInstance().AddInjuryType(arguments);
}
else if (command == "addDamageType") {
returnValue = ace::medical::handleDamage::GetInstance().AddDamageType(arguments);
}
else if (command == "HandleDamageWounds") {
if (arguments.size() >= 4) {
std::string selectionName = arguments.at(0);
double amountOfDamage = std::stod(arguments.at(1));
std::string typeOfDamage = arguments.at(2);
int woundID = std::stoi(arguments.at(3));
returnValue = ace::medical::handleDamage::GetInstance().HandleDamageWounds(selectionName, amountOfDamage, typeOfDamage, woundID);
}
}
else if (command == "ConfigComplete") {
ace::medical::handleDamage::GetInstance().FinalizeDefinitions();
}
}
else if (command == "ConfigComplete") {
ace::medical::handleDamage::GetInstance().FinalizeDefinitions();
catch (std::exception e) {
std::stringstream debugreturn;
debugreturn << "diag_log format['ACE3 ERROR - Medical Extension: Something went wrong. Input: '];";
int i = 0;
for (auto arg : arguments) {
debugreturn << "diag_log format[' arg " << i++ << ":" << arg << "'];";
}
debugreturn << "diag_log format['Exception: " << e.what() << "'];";
returnValue = debugreturn.str();
}
catch (...) {
std::stringstream debugreturn;
debugreturn << "diag_log format['ACE3 ERROR - Medical Extension: Something went wrong. Input: '];";
int i = 0;
for (auto arg : arguments) {
debugreturn << "diag_log format[' arg " << i++ << ":" << arg << "'];";
}
returnValue = debugreturn.str();
}
}
strncpy(output, returnValue.c_str(), outputSize);

View File

@ -1,8 +1,8 @@
name = "Advanced Combat Environment 3.3.1";
name = "Advanced Combat Environment 3.3.2";
picture = "logo_ace3_ca.paa";
actionName = "GitHub";
action = "https://github.com/acemod/ACE3";
description = "ACE3 - Version 3.3.1";
description = "ACE3 - Version 3.3.2";
logo = "logo_ace3_ca.paa";
logoOver = "logo_ace3_ca.paa";
tooltip = "ACE3";