Merge pull request #2163 from acemod/add-objects-to-curator

Add objects to all curators
This commit is contained in:
SilentSpike 2015-08-21 13:53:45 +01:00
commit 5112bd9bdf
5 changed files with 45 additions and 0 deletions

View File

@ -20,4 +20,10 @@ class ACE_Settings {
value = 0;
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";
};
};

View File

@ -4,3 +4,11 @@ class Extended_PreInit_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_InitPost_EventHandlers {
class AllVehicles {
class ADDON {
serverInit = QUOTE(call FUNC(addObjectToCurator));
};
};
};

View File

@ -2,6 +2,7 @@
ADDON = false;
PREP(addObjectToCurator);
PREP(bi_moduleCurator);
PREP(bi_moduleMine);
PREP(bi_moduleProjectile);

View 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;

View File

@ -204,5 +204,11 @@
<German>Benötigt ein Addon, das nicht vorhanden ist</German>
<Portuguese>Requer um addon que não está presente</Portuguese>
</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>
</Project>