mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into medicalImprovements
This commit is contained in:
commit
77d39877d2
12
AUTHORS.txt
12
AUTHORS.txt
@ -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>
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
@ -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]
|
||||
|
@ -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];
|
||||
|
@ -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 {
|
||||
|
@ -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));
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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);
|
||||
|
1
addons/testmissions/$PBOPREFIX$
Normal file
1
addons/testmissions/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\Addons\testmissions
|
@ -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 = "";
|
@ -0,0 +1 @@
|
||||
enableSaving [false, false];
|
1248
addons/testmissions/MPMissions/ACETestingMap1.Stratis/mission.sqm
Normal file
1248
addons/testmissions/MPMissions/ACETestingMap1.Stratis/mission.sqm
Normal file
File diff suppressed because it is too large
Load Diff
20
addons/testmissions/config.cpp
Normal file
20
addons/testmissions/config.cpp
Normal 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));
|
||||
};
|
||||
};
|
||||
};
|
12
addons/testmissions/script_component.hpp
Normal file
12
addons/testmissions/script_component.hpp
Normal 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"
|
Loading…
Reference in New Issue
Block a user