Fixed script errors

This commit is contained in:
Glowbal 2015-02-28 18:59:37 +01:00
parent 9986fddf6b
commit f1445a4c45
8 changed files with 17 additions and 18 deletions

View File

@ -41,7 +41,7 @@ PREP(treatmentBasic_bandage);
PREP(treatmentBasic_morphine);
PREP(treatmentBasic_epipen);
PREP(treatmentBasic_bloodbag);
PREP(teatmentIV);
PREP(treatmentIV);
PREP(treatmentIVLocal);
PREP(treatmentTourniquet);
PREP(treatmentTourniquetLocal);
@ -55,7 +55,7 @@ PREP(actionCheckPulseLocal);
PREP(actionCheckResponse);
PREP(actionRemoveTourniquet);
PREP(onTreatmentCompleted);
PREP(onMedicationUsed);
PREP(onMedicationUsage);
PREP(reactionToDamage);
PREP(useItem);
PREP(useItems);

View File

@ -56,8 +56,8 @@ _unit setvariable [QGVAR(airwayCollapsed), true, true];
// generic medical admin
_unit setvariable [QGVAR(addedToUnitLoop), false, true];
_unit setvariable [QGVAR(inCardiacArrest), true,true];
_unit setVariable [QGVAR(isUnconscious), false, true]
_unit setvariable [QGVAR(inCardiacArrest), true, true];
_unit setVariable [QGVAR(isUnconscious), false, true];
_unit setvariable [QGVAR(hasLostBlood), true, true];
_unit setvariable [QGVAR(isBleeding), false, true];
_unit setvariable [QGVAR(hasPain), false, true];

View File

@ -16,6 +16,8 @@
* Public: No
*/
#include "script_component.hpp"
private ["_target", "_className", "_variable", "_maxDosage", "_timeInSystem", "_incompatabileMeds", "_foundEntry", "_allUsedMedication","_allMedsFromClassname", "_usedMeds", "_hasOverDosed", "_med", "_limit", "_classNamesUsed", "_decreaseAmount"];
_target = _this select 0;
_className = _this select 1;

View File

@ -80,7 +80,8 @@ _selectionSpecific = getNumber(_damageTypesConfig >> "selectionSpecific");
_woundTypes = [];
_type = _x;
{
if (_type in (_x select 4)) then {
// Check if this type is in the causes of a wound class, if so, we will store the wound types for this damage type
if (_type in (_x select 5)) then {
_woundTypes pushback _x;
};
}foreach _allWoundClasses;

View File

@ -99,7 +99,7 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
_iconDisplayed = getText (_config >> "actionIconPath");
if (_iconDisplayed != "") then {
[QGVAR(treatmentActionIcon), true, _iconDisplayed, [1,1,1,1], getNumber(_config >> "actionIconDisplayTime");] call EFUNC(common,displayIcon);
[QGVAR(treatmentActionIcon), true, _iconDisplayed, [1,1,1,1], getNumber(_config >> "actionIconDisplayTime")] call EFUNC(common,displayIcon);
};
// handle display of text/hints
@ -111,7 +111,7 @@ if (_target != _caller) then {
};
if (_displayText != "") then {
["displayTextStructured", [_caller], [[_displayText, [_caller] call EFUNC(getName), [_target] call EFUNC(getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
["displayTextStructured", [_caller], [[_displayText, [_caller] call EFUNC(common,getName), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
};

View File

@ -10,7 +10,7 @@
#include "script_component.hpp"
private ["_unit", "_caller"];
private ["_unit", "_caller", "_allUsedMedication"];
_unit = _this select 0;
_caller = _this select 1;
@ -30,7 +30,7 @@ if (alive _unit) exitwith {
// vitals
_unit setVariable [QGVAR(heartRate), 80];
_unit setvariable [QGVAR(heartRateAdjustments), []];
_unit setvariable [QGVAR(bloodPressure), [80, 120]];
_unit setvariable [QGVAR(bloodPressure), [80, 120]];
_unit setVariable [QGVAR(peripheralResistance), 100];
// fractures
@ -51,22 +51,18 @@ if (alive _unit) exitwith {
// generic medical admin
_unit setvariable [QGVAR(addedToUnitLoop), false, true];
_unit setvariable [QGVAR(inCardiacArrest), true,true];
_unit setVariable [QGVAR(isUnconscious), false, true]
_unit setvariable [QGVAR(inCardiacArrest), true, true];
_unit setVariable [QGVAR(isUnconscious), false, true];
_unit setvariable [QGVAR(hasLostBlood), true, true];
_unit setvariable [QGVAR(isBleeding), false, true];
_unit setvariable [QGVAR(hasPain), false, true];
// medication
_allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []];
_allUsedMedication = _unit getVariable [QGVAR(allUsedMedication), []];
{
_unit setvariable [_x select 0, nil];
}foreach _allUsedMedication;
// Resetting damage
_unit setDamage 0;
["Medical_onFullyHealed", [_unit, true]] call ace_common_fnc_localEvent;
[format["Completed healLocal %1", _this]] call EFUNC(common,debug);
};
["Medical_onFullyHealed", [_unit, false]] call ace_common_fnc_localEvent;

View File

@ -18,7 +18,7 @@
#include "script_component.hpp"
_medic = _this select 0;
_patient = _this select 1:
_patient = _this select 1;
_items = _this select 4;
[_patient, false] call FUNC(setUnconscious);

View File

@ -18,7 +18,7 @@
#include "script_component.hpp"
_medic = _this select 0;
_patient = _this select 1:
_patient = _this select 1;
_items = _this select 4;
[_patient, false] call FUNC(setUnconscious);