Add objects to all curators

This commit is contained in:
Glowbal 2015-08-15 18:39:43 +02:00
parent 29b21b8f41
commit ed66255b19
5 changed files with 46 additions and 1 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_descr);
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 {
init = 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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Zeus">
<Key ID="STR_ACE_Zeus_Settings_DisplayName">
@ -189,5 +189,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>