Merge branch 'master' into medicalImprovements

This commit is contained in:
Glowbal 2015-04-04 22:01:15 +02:00
commit 77d39877d2
18 changed files with 1398 additions and 106 deletions

View File

@ -6,12 +6,22 @@
# request, preferably including an email address.
# CORE TEAM
bux578 <github@jonathandavid.de>
commy2
esteldunedain <nicolas.d.badano@gmail.com>
Felix Wiegand <koffeinflummi@gmail.com>
Garth "L-H" de Wet <garthofhearts@gmail.com>
bux578 <github@jonathandavid.de>
Giallustio
Glowbal
Janus
Kieran
NouberNou
PabstMirror <pabstmirror@gmail.com>
Ruthberg
tpM
ViperMaul
VKing <kauestad@gmail.com>
Walter Pearce <jaynus@gmail.com>
# CONTRIBUTORS
11RDP-LoupVert <loupvert@11rdp.fr>

View File

@ -149,11 +149,6 @@ class CfgVehicles {
MACRO_LOADUNLOADCAPTIVE
};
class StaticMortar;
class Mortar_01_base_F: StaticMortar {
MACRO_LOADUNLOADCAPTIVE
};
class Box_NATO_Support_F;
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems {

View File

@ -16,8 +16,11 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_isUnconc);
EXPLODE_2_PVT(_this,_unit,_isUnconc);
diag_log "handleOnUnconscious";
diag_log _this;
diag_log _unit;
if (!local _unit) exitWith {};
if (_isUnconc) then {

View File

@ -106,60 +106,31 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
// PFH to raise varios events
[{
if(!isNil "ACE_player" && { !isNull ACE_player }) then {
// "playerInventoryChanged" event
_newPlayerInventory = [ACE_player] call FUNC(getAllGear);
if !(_newPlayerInventory isEqualTo GVAR(OldPlayerInventory)) then {
// Raise ACE event locally
GVAR(OldPlayerInventory) = _newPlayerInventory;
["playerInventoryChanged", [ACE_player, _newPlayerInventory]] call FUNC(localEvent);
};
// "playerVisionModeChanged" event
_newPlayerVisionMode = currentVisionMode ACE_player;
if !(_newPlayerVisionMode isEqualTo GVAR(OldPlayerVisionMode)) then {
// Raise ACE event locally
GVAR(OldPlayerVisionMode) = _newPlayerVisionMode;
["playerVisionModeChanged", [ACE_player, _newPlayerVisionMode]] call FUNC(localEvent);
};
// "inventoryDisplayChanged" event
_newInventoryDisplayIsOpen = !(isNull findDisplay 602);
if !(_newInventoryDisplayIsOpen isEqualTo GVAR(OldInventoryDisplayIsOpen)) then {
// Raise ACE event locally
GVAR(OldInventoryDisplayIsOpen) = _newInventoryDisplayIsOpen;
["inventoryDisplayChanged", [ACE_player, _newInventoryDisplayIsOpen]] call FUNC(localEvent);
};
// "playerVehicleChanged" event
_newPlayerVehicle = vehicle ACE_player;
if !(_newPlayerVehicle isEqualTo GVAR(OldPlayerVehicle)) then {
// Raise ACE event locally
GVAR(OldPlayerVehicle) = _newPlayerVehicle;
["playerVehicleChanged", [ACE_player, _newPlayerVehicle]] call FUNC(localEvent);
};
// "playerTurretChanged" event
_newPlayerTurret = [ACE_player] call FUNC(getTurretIndex);
if !(_newPlayerTurret isEqualTo GVAR(OldPlayerTurret)) then {
// Raise ACE event locally
GVAR(OldPlayerTurret) = _newPlayerTurret;
["playerTurretChanged", [ACE_player, _newPlayerTurret]] call FUNC(localEvent);
};
// "playerWeaponChanged" event
_newPlayerWeapon = currentWeapon ACE_player;
if (_newPlayerWeapon != GVAR(OldPlayerWeapon)) then {
// Raise ACE event locally
GVAR(OldPlayerWeapon) = _newPlayerWeapon;
["playerWeaponChanged", [ACE_player, _newPlayerWeapon]] call FUNC(localEvent);
};
// "playerInventoryChanged" event
_newPlayerInventory = [ACE_player] call FUNC(getAllGear);
if !(_newPlayerInventory isEqualTo GVAR(OldPlayerInventory)) then {
// Raise ACE event locally
GVAR(OldPlayerInventory) = _newPlayerInventory;
["playerInventoryChanged", [ACE_player, _newPlayerInventory]] call FUNC(localEvent);
};
//
// These events can fire on a null player object
//
// "playerVisionModeChanged" event
_newPlayerVisionMode = currentVisionMode ACE_player;
if !(_newPlayerVisionMode isEqualTo GVAR(OldPlayerVisionMode)) then {
// Raise ACE event locally
GVAR(OldPlayerVisionMode) = _newPlayerVisionMode;
["playerVisionModeChanged", [ACE_player, _newPlayerVisionMode]] call FUNC(localEvent);
};
// "inventoryDisplayChanged" event
_newInventoryDisplayIsOpen = !(isNull findDisplay 602);
if !(_newInventoryDisplayIsOpen isEqualTo GVAR(OldInventoryDisplayIsOpen)) then {
// Raise ACE event locally
GVAR(OldInventoryDisplayIsOpen) = _newInventoryDisplayIsOpen;
["inventoryDisplayChanged", [ACE_player, _newInventoryDisplayIsOpen]] call FUNC(localEvent);
};
// "zeusDisplayChanged" event
_newZeusDisplayIsOpen = !(isNull findDisplay 312);
if !(_newZeusDisplayIsOpen isEqualTo GVAR(OldZeusDisplayIsOpen)) then {
@ -167,7 +138,7 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
GVAR(OldZeusDisplayIsOpen) = _newZeusDisplayIsOpen;
["zeusDisplayChanged", [ACE_player, _newZeusDisplayIsOpen]] call FUNC(localEvent);
};
// "cameraViewChanged" event
_newCameraView = cameraView;
if !(_newCameraView isEqualTo GVAR(OldCameraView)) then {
@ -175,7 +146,31 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
GVAR(OldCameraView) = _newCameraView;
["cameraViewChanged", [ACE_player, _newCameraView]] call FUNC(localEvent);
};
// "playerVehicleChanged" event
_newPlayerVehicle = vehicle ACE_player;
if !(_newPlayerVehicle isEqualTo GVAR(OldPlayerVehicle)) then {
// Raise ACE event locally
GVAR(OldPlayerVehicle) = _newPlayerVehicle;
["playerVehicleChanged", [ACE_player, _newPlayerVehicle]] call FUNC(localEvent);
};
// "playerTurretChanged" event
_newPlayerTurret = [ACE_player] call FUNC(getTurretIndex);
if !(_newPlayerTurret isEqualTo GVAR(OldPlayerTurret)) then {
// Raise ACE event locally
GVAR(OldPlayerTurret) = _newPlayerTurret;
["playerTurretChanged", [ACE_player, _newPlayerTurret]] call FUNC(localEvent);
};
// "playerWeaponChanged" event
_newPlayerWeapon = currentWeapon ACE_player;
if (_newPlayerWeapon != GVAR(OldPlayerWeapon)) then {
// Raise ACE event locally
GVAR(OldPlayerWeapon) = _newPlayerWeapon;
["playerWeaponChanged", [ACE_player, _newPlayerWeapon]] call FUNC(localEvent);
};
}, 0, []] call cba_fnc_addPerFrameHandler;
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);

View File

@ -12,8 +12,7 @@
*/
#include "script_component.hpp"
_eventName = _this select 0;
_eventArgs = _this select 1;
PARAMS_2(_eventName,_eventArgs);
_eventNames = GVAR(events) select 0;
_eventIndex = _eventNames find _eventName;

View File

@ -23,11 +23,6 @@ class Extended_Init_EventHandlers {
init = QUOTE(_this call DFUNC(initObject));
};
};
class StaticMortar {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class ReammoBox_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));

View File

@ -18,11 +18,37 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
["ACE3", QGVAR(InteractKey), (localize "STR_ACE_Interact_Menu_InteractKey"),
{[0] call FUNC(keyDown)},
{
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Statement
[0] call FUNC(keyDown)
},
{[0] call FUNC(keyUp)},
[219, [false, false, false]], false] call cba_fnc_addKeybind; //Left Windows Key
["ACE3", QGVAR(SelfInteractKey), (localize "STR_ACE_Interact_Menu_SelfInteractKey"),
{[1] call FUNC(keyDown)},
{
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Statement
[1] call FUNC(keyDown)
},
{[1] call FUNC(keyUp)},
[219, [false, true, false]], false] call cba_fnc_addKeybind; //Left Windows Key + Ctrl/Strg
// Listens for the falling unconscious event, just in case the menu needs to be closed
["medical_onUnconscious", {
diag_log ["im_onUn 1:",_this];
// If no menu is open just quit
if (GVAR(openedMenuType) < 0) exitWith {};
EXPLODE_2_PVT(_this,_unit,_isUnconscious);
if (_unit != ACE_player || !_isUnconscious) exitWith {};
GVAR(actionSelected) = false;
[] call FUNC(keyUp);
diag_log ["im_onUn 2:",_this];
}] call EFUNC(common,addEventhandler);

View File

@ -89,7 +89,7 @@ _fnc_renderSelfActions = {
{
_action = _x;
_pos = if !(visibleMap) then {
_pos = if !(GVAR(useCursorMenu)) then {
(((positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL)) vectorAdd GVAR(selfMenuOffset)) call EFUNC(common,ASLToPosition)
} else {
[0.5, 0.5]

View File

@ -35,7 +35,7 @@ GVAR(iconCount) = GVAR(iconCount) + 1;
if(_icon == "") then {
_icon = DEFAULT_ICON;
};
_text = format ["<img image='%1' color='%2' align='center'/><br/><t color='%3' size='0.80' align='center'>%4</t>", _icon, _color, _color, _text];
_text = format ["<img image='%1' color='%2' align='center'/><br/><t color='%3' size='0.80' align='center' shadow='1' shadowColor='#000000' shadowOffset='0.07'>%4</t>", _icon, _color, _color, _text];
_ctrl ctrlSetStructuredText (parseText _text);
_ctrl ctrlSetPosition [(_sPos select 0)-(0.125*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.25*SafeZoneW, 0.1*SafeZoneW];
//_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1];

View File

@ -525,26 +525,6 @@ class CfgVehicles {
};
};
class StaticMortar;
class Mortar_01_base_F: StaticMortar {
class ACE_Actions {
class ACE_MainActions {
displayName = "$STR_ACE_Interaction_MainAction";
selection = "gunnerview";
distance = 2;
condition = "true";
};
};
class ACE_SelfActions {
class ACE_Passengers {
displayName = "$STR_ACE_Interaction_Passengers";
condition = "true";
statement = "";
insertChildren = QUOTE(_this call FUNC(addPassengersActions));
};
};
};
class thingX;
class ReammoBox_F: thingX {
class ACE_Actions {

View File

@ -2155,18 +2155,4 @@ class CfgVehicles {
};
};
};
class StaticMortar;
class Mortar_01_base_F: StaticMortar {
class ACE_Actions {
class ACE_MainActions {
class ACE_UnloadPatients {
displayName = "$STR_ACE_Medical_UnloadPatient";
condition = "true";
statement = "";
insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions));
};
};
};
};
};

View File

@ -241,3 +241,7 @@ if (USE_WOUND_EVENT_SYNC) then {
{((_this select 0) getvariable ["ACE_isDead", false])},
{(((_this select 0) getvariable [QGVAR(airwayStatus), 100]) < 80)}
] call FUNC(addUnconsciousCondition);
// Prevent all types of interaction while unconscious
// @todo: probably remove this when CBA keybind hold key works properly
["isNotUnconscious", {!((_this select 0) getVariable ["ACE_isUnconscious", false])}] call EFUNC(common,addCanInteractWithCondition);

View File

@ -0,0 +1 @@
z\ace\Addons\testmissions

View File

@ -0,0 +1,17 @@
enableDebugConsole = 2; //note security risk
// respawn = "GROUP";
respawn = "BASE";
// respawn = "BIRD";
respawnDelay = 2;
class Header {
gameType = Coop;
minPlayers = 1;
maxPlayers = 491;
};
onLoadName = "ACE3 Testing";
// onLoadMission = "";
// author = "";
// loadScreen = "";

View File

@ -0,0 +1 @@
enableSaving [false, false];

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
VERSION_CONFIG;
};
};
class CfgMissions {
class MPMissions {
class ACETestingMap1 {
briefingName = "ACE Testing Map 1";
directory = QUOTE(PATHTO_R(MPMissions\ACETestingMap1.Stratis));
};
};
};

View File

@ -0,0 +1,12 @@
#define COMPONENT testmissions
#include "\z\ace\Addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_TESTMISSIONS
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_ENABLED_TESTMISSIONS
#define DEBUG_SETTINGS DEBUG_ENABLED_TESTMISSIONS
#endif
#include "\z\ace\Addons\main\script_macros.hpp"