mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Remove deprecated functionality for 3.12.0 (#5878)
* Remove deprecated functionality for 3.12.0 * Remove associated deprecated module icon * Restore a dummy version of old module This is just to prevent existing missions from breaking due to a missing object.
This commit is contained in:
parent
2a448577bb
commit
845f3656d4
@ -39,32 +39,9 @@ class CfgVehicles {
|
||||
sync[] = {};
|
||||
};
|
||||
};
|
||||
class GVAR(makeLoadable): ACE_Module {
|
||||
class GVAR(makeLoadable): Logic {
|
||||
scope = 1;
|
||||
displayName = CSTRING(makeLoadable_displayName);
|
||||
icon = QPATHTOF(UI\Icon_Module_makeLoadable_ca.paa);
|
||||
category = "ACE_Logistics";
|
||||
function = QFUNC(moduleMakeLoadable);
|
||||
isGlobal = 1;
|
||||
isTriggerActivated = 0;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
class Arguments {
|
||||
class canLoad {
|
||||
displayName = CSTRING(makeLoadable_displayName);
|
||||
description = CSTRING(MakeLoadable_description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class setSize {
|
||||
displayName = CSTRING(makeLoadable_setSize_displayName);
|
||||
typeName = "NUMBER";
|
||||
defaultValue = 1;
|
||||
};
|
||||
};
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = CSTRING(makeLoadable_description);
|
||||
sync[] = {"AnyStaticObject"};
|
||||
};
|
||||
displayName = "Delete (Deprecated in ACE3 3.12.0)";
|
||||
};
|
||||
|
||||
class LandVehicle;
|
||||
|
Binary file not shown.
@ -1,4 +1,3 @@
|
||||
|
||||
PREP(addCargoItem);
|
||||
PREP(addCargoVehiclesActions);
|
||||
PREP(canLoadItemIn);
|
||||
@ -9,8 +8,6 @@ PREP(handleDestroyed);
|
||||
PREP(initObject);
|
||||
PREP(initVehicle);
|
||||
PREP(loadItem);
|
||||
PREP(makeLoadable);
|
||||
PREP(moduleMakeLoadable);
|
||||
PREP(moduleSettings);
|
||||
PREP(onMenuOpen);
|
||||
PREP(paradropItem);
|
||||
|
@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Makes any object loadable. Needs to be called on all machines.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object <OBJECT>
|
||||
* 1: Set as loadable (default: true) <BOOL><SCALAR>
|
||||
* 2: Size. (default: 1) <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [cursorTarget, true, 1] call ace_cargo_fnc_makeLoadable
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Only run this after the settings are initialized
|
||||
if !(EGVAR(common,settingsInitFinished)) exitWith {
|
||||
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(makeLoadable), _this];
|
||||
};
|
||||
|
||||
ACE_DEPRECATED(QFUNC(makeLoadable),"3.12.0",QFUNC(setSize));
|
||||
|
||||
params [["_object", objNull, [objNull]], ["_canLoad", true, [false, 0]], ["_setSize", 1, [0]]];
|
||||
TRACE_3("params",_object,_canLoad,_setSize);
|
||||
|
||||
if (isNull _object) exitWith {TRACE_1("null",_object);};
|
||||
private _type = typeOf _object;
|
||||
private _cfgCanLoad = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad));
|
||||
private _curSize = [_object] call FUNC(getSizeItem);
|
||||
|
||||
_canLoad = [0, 1] select _canLoad; // Convert true/false to scalar
|
||||
|
||||
if ((_canLoad == 1) && {_setSize <= 0}) exitWith {
|
||||
ERROR("ace_cargo_fnc_makeLoadable (size <= 0) when making loadable");
|
||||
};
|
||||
|
||||
TRACE_2("setVar if different from config",_canLoad,_cfgCanLoad);
|
||||
if (_canLoad != _cfgCanLoad) then {
|
||||
_object setVariable [QGVAR(canLoad), _canLoad == 1];
|
||||
};
|
||||
|
||||
TRACE_2("setVar if different from config",_setSize,_curSize);
|
||||
if (_setSize != _curSize) then {
|
||||
_object setVariable [QGVAR(size), _setSize];
|
||||
};
|
||||
|
||||
//Add the load actions to the object class if not already added
|
||||
[_object] call FUNC(initObject);
|
||||
|
||||
nil
|
@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Module to make an object loadable.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The module logic <OBJECT>
|
||||
* 1: Synchronized units <ARRAY>
|
||||
* 2: Activated <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [logic, [box], true] call ace_cargo_fnc_moduleMakeLoadable
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_logic", "_objects", "_activated"];
|
||||
TRACE_3("params",_logic,_objects,_activated);
|
||||
|
||||
ACE_DEPRECATED(QFUNC(moduleMakeLoadable),"3.12.0","Eden editor object attributes");
|
||||
|
||||
if ((isNull _logic) || {!_activated}) exitWith {};
|
||||
if (_objects isEqualTo []) exitWith {
|
||||
WARNING_1("ace_cargo_fnc_moduleMakeLoadable has no synced objects [%1]", _logic);
|
||||
};
|
||||
|
||||
private _canLoad = _logic getVariable ["canLoad", true];
|
||||
private _setSize = _logic getVariable ["setSize", 1];
|
||||
TRACE_2("settings",_canLoad,_setSize);
|
||||
|
||||
{
|
||||
[_x, _canLoad, _setSize] call FUNC(makeLoadable);
|
||||
} forEach _objects;
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Cargo">
|
||||
<Key ID="STR_ACE_Cargo_loadObject">
|
||||
@ -228,51 +228,6 @@
|
||||
<Chinese>%1<br/>無法被卸載</Chinese>
|
||||
<Chinesesimp>%1<br/>无法被卸载</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_makeLoadable_displayName">
|
||||
<English>Make Object Loadable</English>
|
||||
<German>Objekt ein/entladbar machen</German>
|
||||
<Polish>Ustaw jako ładowalny</Polish>
|
||||
<Italian>Rendi oggetto caricabile</Italian>
|
||||
<Spanish>Hacer objeto cargable</Spanish>
|
||||
<French>Rendre l'objet chargeable</French>
|
||||
<Czech>Vytvořit objekt nakladatelným</Czech>
|
||||
<Portuguese>Fazer objeto carregável</Portuguese>
|
||||
<Russian>Сделать объект загружаемым</Russian>
|
||||
<Japanese>オブジェクトを積載可能に</Japanese>
|
||||
<Korean>물체를 화물화시키기</Korean>
|
||||
<Chinese>使物件可裝載</Chinese>
|
||||
<Chinesesimp>使物件可装载</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_makeLoadable_description">
|
||||
<English>Sets the synced object as loadable by the cargo system.</English>
|
||||
<German>Das synchronisierte Objekt wird dem Frachtsystem hinzugefügt und ist ein- und entladbar.</German>
|
||||
<Polish>Ustawia zsynchronizowany obiekt jako możliwy do załadowania poprzez system cargo</Polish>
|
||||
<Italian>Imposta l'oggetto sincronizzato come caricabile dal sistema cargo</Italian>
|
||||
<Spanish>Sincronizar un objecto para hacerlo cargable.</Spanish>
|
||||
<French>Rend l'objet synchronisé comme chargeable par le système de cargaison.</French>
|
||||
<Czech>Nastaví synchronizované objekty nakladatelnými za pomocí Nákladního systému.</Czech>
|
||||
<Portuguese>Seta o objeto sincronizado como carregável</Portuguese>
|
||||
<Russian>Делает синхронизированный объект загружаемым для модуля перевозки грузов.</Russian>
|
||||
<Japanese>オブジェクトを同期させると、カーゴ システムによる積載が可能になります。</Japanese>
|
||||
<Korean>물체를 화물 시스템과 동기화시켜 실을 수 있게 합니다</Korean>
|
||||
<Chinese>使用同步線來使該物件可被裝載.</Chinese>
|
||||
<Chinesesimp>使用同步线来使该物件可被装载.</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_makeLoadable_setSize_displayName">
|
||||
<English>Object's Size</English>
|
||||
<German>Objektgröße</German>
|
||||
<Polish>Rozmiar obiektu</Polish>
|
||||
<Italian>Dimensioni dell'oggetto</Italian>
|
||||
<Spanish>Tamaño del objeto</Spanish>
|
||||
<French>Taille de l'objet</French>
|
||||
<Czech>Velikost objektu</Czech>
|
||||
<Portuguese>Tamanho do objeto</Portuguese>
|
||||
<Russian>Размер объекта</Russian>
|
||||
<Japanese>オブジェクトの大きさ</Japanese>
|
||||
<Korean>물체 크기</Korean>
|
||||
<Chinese>物件的大小</Chinese>
|
||||
<Chinesesimp>物件的大小</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_space_edenName">
|
||||
<English>Cargo Space</English>
|
||||
<German>Frachtraum</German>
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
PREP(addMagazineToSupply);
|
||||
PREP(addRearmActions);
|
||||
PREP(addVehicleMagazinesToSupply);
|
||||
@ -11,7 +10,6 @@ PREP(disable);
|
||||
PREP(dropAmmo);
|
||||
PREP(getAllRearmTurrets);
|
||||
PREP(getCaliber);
|
||||
PREP(getHardpointMagazines);
|
||||
PREP(getMaxMagazines);
|
||||
PREP(getNeedRearmMagazines);
|
||||
PREP(getSupplyCount);
|
||||
|
@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Gets possible magazines that can be added to a pylon.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Pylon config <CONFIG>
|
||||
*
|
||||
* Return Value:
|
||||
* Magazines <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* [config] call ace_rearm_fnc_getHardpointMagazines
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
ACE_DEPRECATED(QFUNC(getHardpointMagazines),"3.12.0","getCompatiblePylonMagazines");
|
||||
|
||||
params ["_pylonConfig"];
|
||||
|
||||
private _return = GVAR(hardpointGroupsCache) getVariable (str _pylonConfig);
|
||||
if (isNil "_return") then {
|
||||
_return = [];
|
||||
private _hardpoints = (getArray (_pylonConfig >> "hardpoints")) apply {toLower _x};
|
||||
private _maxWeight = if (isNumber (_pylonConfig >> "maxWeight")) then {getNumber (_pylonConfig >> "maxWeight")} else {1e5};
|
||||
private _mags = configProperties [configFile >> "CfgMagazines", "(isClass _x) && {isArray (_x >> 'hardpoints')}"];
|
||||
{
|
||||
if ((getNumber (_x >> "mass")) < _maxWeight) then {
|
||||
private _magHardpoints = (getArray (_x >> "hardpoints")) apply {toLower _x};
|
||||
if (!((_hardpoints arrayIntersect _magHardpoints) isEqualTo [])) then {
|
||||
_return pushBack configName _x;
|
||||
};
|
||||
};
|
||||
} forEach _mags;
|
||||
if ((str _pylonConfig) != "") then {
|
||||
GVAR(hardpointGroupsCache) setVariable [(str _pylonConfig), _return];
|
||||
};
|
||||
};
|
||||
|
||||
_return;
|
@ -43,7 +43,6 @@ PREP(handleFired);
|
||||
PREP(moduleSpectatorSettings);
|
||||
PREP(respawnTemplate);
|
||||
PREP(setFocus);
|
||||
PREP(stageSpectator);
|
||||
PREP(switchFocus);
|
||||
|
||||
// Public functions
|
||||
@ -55,10 +54,3 @@ PREP(updateCameraModes);
|
||||
PREP(updateSides);
|
||||
PREP(updateUnits);
|
||||
PREP(updateVisionModes);
|
||||
|
||||
// Deprecated (temp)
|
||||
PREP(interrupt);
|
||||
DFUNC(updateSpectatableSides) = {
|
||||
ACE_DEPRECATED(QFUNC(updateSpectatableSides),"3.12.0",QFUNC(updateSides));
|
||||
_this call FUNC(updateSides);
|
||||
};
|
||||
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Author: SilentSpike
|
||||
* Deprecated. Technically never publically documented, but just in case.
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_reason", "", [""]], ["_interrupt", true, [true]]];
|
||||
|
||||
ACE_DEPRECATED(QFUNC(interrupt),"3.12.0","just close and reopen spectator");
|
||||
|
||||
// Nothing to do when spectator is closed
|
||||
if !(GVAR(isSet)) exitWith {};
|
||||
|
||||
if (_reason == "") exitWith { WARNING("Invalid Reason"); };
|
||||
if (_interrupt) then {
|
||||
GVAR(interrupts) pushBack _reason;
|
||||
} else {
|
||||
GVAR(interrupts) = GVAR(interrupts) - [_reason];
|
||||
};
|
||||
|
||||
if (GVAR(interrupts) isEqualTo []) then {
|
||||
if (isNull SPEC_DISPLAY) then {
|
||||
[true] call FUNC(ui);
|
||||
};
|
||||
} else {
|
||||
if !(isNull SPEC_DISPLAY) then {
|
||||
[false] call FUNC(ui);
|
||||
};
|
||||
};
|
@ -42,10 +42,6 @@ params [
|
||||
["_direction",nil,[0]]
|
||||
];
|
||||
|
||||
if (count _this > 5) then {
|
||||
ACE_DEPRECATED("Use of ""tilt"", ""zoom"" and ""speed"" camera attributes","3.12.0","N/A")
|
||||
};
|
||||
|
||||
// Apply if camera exists
|
||||
if !(isNil QGVAR(camera)) then {
|
||||
// These functions are smart and handle unavailable inputs
|
||||
|
@ -1,87 +0,0 @@
|
||||
/*
|
||||
* Author: SilentSpike
|
||||
* Stores and hides a player safely out of the way (used by setSpectator on living players)
|
||||
*
|
||||
* Units will be gathered at marker ace_spectator_respawn (or [0,0,0] by default)
|
||||
* Upon unstage, units will be moved to the position they were in before staging
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit to handle <OBJECT>
|
||||
* 1: Stage/Unstage <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [player, true] call ace_spectator_fnc_stageSpectator
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
ACE_DEPRECATED(QFUNC(stageSpectator),"3.12.0",[ARR_2(QFUNC(setSpectator),"'s new 3rd parameter")] joinString "");
|
||||
|
||||
params [["_unit",player,[objNull]], ["_set",true,[true]]];
|
||||
|
||||
// No change, no service (but allow spectators to be reset)
|
||||
if !(_set || (GETVAR(_unit,GVAR(isStaged),false))) exitWith {};
|
||||
|
||||
if !(local _unit) exitWith {
|
||||
[QGVAR(stageSpectator), [_unit, _set], _unit] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
||||
// Prevent unit falling into water
|
||||
_unit enableSimulation !_set;
|
||||
|
||||
// Move to/from group as appropriate
|
||||
[_unit, _set, QGVAR(isStaged), side group _unit] call EFUNC(common,switchToGroupSide);
|
||||
|
||||
if (_set) then {
|
||||
// Position should only be saved on first entry
|
||||
if !(GETVAR(_unit,GVAR(isStaged),false)) then {
|
||||
SETVAR(_unit,GVAR(preStagePos),getPosATL _unit);
|
||||
|
||||
// Handle players respawning via pause menu (or script)
|
||||
private _id = _unit addEventHandler ["Respawn",{
|
||||
params ["_unit"];
|
||||
[_unit] call FUNC(stageSpectator);
|
||||
}];
|
||||
|
||||
SETVAR(_unit,GVAR(respawnEH),_id);
|
||||
};
|
||||
|
||||
// Ghosts can't talk
|
||||
[_unit, QGVAR(isStaged)] call EFUNC(common,hideUnit);
|
||||
[_unit, QGVAR(isStaged)] call EFUNC(common,muteUnit);
|
||||
|
||||
// Position defaults to [0,0,0] if marker doesn't exist
|
||||
_unit setPos (markerPos QGVAR(respawn));
|
||||
} else {
|
||||
// Physical beings can talk
|
||||
[_unit, QGVAR(isStaged)] call EFUNC(common,unhideUnit);
|
||||
[_unit, QGVAR(isStaged)] call EFUNC(common,unmuteUnit);
|
||||
|
||||
// Restore original position and delete stored value
|
||||
_unit setPosATL (GETVAR(_unit,GVAR(preStagePos),getPosATL _unit));
|
||||
SETVAR(_unit,GVAR(preStagePos),nil);
|
||||
|
||||
// Remove the respawn handling
|
||||
_unit removeEventHandler ["Respawn",GETVAR(_unit,GVAR(respawnEH),-1)];
|
||||
SETVAR(_unit,GVAR(respawnEH),nil);
|
||||
};
|
||||
|
||||
// Spectators ignore damage (vanilla and ace_medical)
|
||||
_unit allowDamage !_set;
|
||||
_unit setVariable [QEGVAR(medical,allowDamage), !_set];
|
||||
|
||||
// No theoretical change if an existing spectator was reset
|
||||
if !(_set isEqualTo (GETVAR(_unit,GVAR(isStaged),false))) then {
|
||||
// Mark spectator state for reference
|
||||
_unit setVariable [QGVAR(isStaged), _set];
|
||||
};
|
||||
|
||||
// If display exists already update the entity list to hide player
|
||||
if !(isNull SPEC_DISPLAY) then {
|
||||
[] call FUNC(ui_updateListEntities);
|
||||
};
|
Loading…
Reference in New Issue
Block a user