mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #2163 from acemod/add-objects-to-curator
Add objects to all curators
This commit is contained in:
commit
5112bd9bdf
@ -20,4 +20,10 @@ class ACE_Settings {
|
|||||||
value = 0;
|
value = 0;
|
||||||
values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(revealMines_partial), CSTRING(revealMines_full)};
|
values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(revealMines_partial), CSTRING(revealMines_full)};
|
||||||
};
|
};
|
||||||
|
class GVAR(autoAddObjects) {
|
||||||
|
displayName = CSTRING(AddObjectsToCurator);
|
||||||
|
description = CSTRING(AddObjectsToCurator_desc);
|
||||||
|
value = 0;
|
||||||
|
typeName = "BOOL";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -4,3 +4,11 @@ class Extended_PreInit_EventHandlers {
|
|||||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Extended_InitPost_EventHandlers {
|
||||||
|
class AllVehicles {
|
||||||
|
class ADDON {
|
||||||
|
serverInit = QUOTE(call FUNC(addObjectToCurator));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
ADDON = false;
|
ADDON = false;
|
||||||
|
|
||||||
|
PREP(addObjectToCurator);
|
||||||
PREP(bi_moduleCurator);
|
PREP(bi_moduleCurator);
|
||||||
PREP(bi_moduleMine);
|
PREP(bi_moduleMine);
|
||||||
PREP(bi_moduleProjectile);
|
PREP(bi_moduleProjectile);
|
||||||
|
24
addons/zeus/functions/fnc_addObjectToCurator.sqf
Normal file
24
addons/zeus/functions/fnc_addObjectToCurator.sqf
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Author: Glowbal
|
||||||
|
* Adds an object to curator upon spawn
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* Object <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
if (!isServer) exitwith {};
|
||||||
|
|
||||||
|
params ["_object"];
|
||||||
|
|
||||||
|
if (!(_object getvariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitwith {};
|
||||||
|
|
||||||
|
{
|
||||||
|
_x addCuratorEditableObjects [[_object], true];
|
||||||
|
}foreach allCurators;
|
@ -204,5 +204,11 @@
|
|||||||
<German>Benötigt ein Addon, das nicht vorhanden ist</German>
|
<German>Benötigt ein Addon, das nicht vorhanden ist</German>
|
||||||
<Portuguese>Requer um addon que não está presente</Portuguese>
|
<Portuguese>Requer um addon que não está presente</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Zeus_AddObjectsToCurator">
|
||||||
|
<English>Add Objects to Curator</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Zeus_AddObjectsToCurator_desc">
|
||||||
|
<English>Adds any spawned object to all curators in the mission</English>
|
||||||
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user