mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added settings module to config
Started functionality
This commit is contained in:
parent
519aba57b5
commit
3118666f80
@ -24,4 +24,4 @@ if (isNil {_logic getVariable _moduleVariable}) exitWith {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Set the setting globally and force it
|
// Set the setting globally and force it
|
||||||
[_settingName, _logic getVariable _moduleVariable, true, true] call FUNC(setSetting);
|
[_settingName, _logic getVariable _moduleVariable, true, true] call FUNC(setSetting);
|
6
addons/zeus/CfgFactionClasses.hpp
Normal file
6
addons/zeus/CfgFactionClasses.hpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
class CfgFactionClasses {
|
||||||
|
class NO_CATEGORY;
|
||||||
|
class ADDON: NO_CATEGORY {
|
||||||
|
displayName = "ACE Zeus";
|
||||||
|
};
|
||||||
|
};
|
80
addons/zeus/CfgVehicles.hpp
Normal file
80
addons/zeus/CfgVehicles.hpp
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
class CfgVehicles {
|
||||||
|
class Module_F;
|
||||||
|
class ModuleEmpty_F;
|
||||||
|
class ACE_Module;
|
||||||
|
|
||||||
|
class GVAR(moduleZeusSettings): ACE_Module {
|
||||||
|
scope = 2;
|
||||||
|
displayName = "Zeus Settings [ACE]";
|
||||||
|
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
|
||||||
|
category = "ACE_zeus";
|
||||||
|
function = QUOTE(DFUNC(moduleZeusSettings));
|
||||||
|
functionPriority = 1;
|
||||||
|
isGlobal = 1;
|
||||||
|
isTriggerActivated = 0;
|
||||||
|
author = "SilentSpike";
|
||||||
|
class Arguments {
|
||||||
|
class zeusAscension {
|
||||||
|
displayName = "Enable Ascension Messages";
|
||||||
|
description = "Display a global popup message when a player is assigned as Zeus.";
|
||||||
|
typeName = "BOOL";
|
||||||
|
defaultValue = 1;
|
||||||
|
};
|
||||||
|
class zeusBird {
|
||||||
|
displayName = "Enable Eagle";
|
||||||
|
description = "Spawn an eagle that follows the Zeus camera.";
|
||||||
|
typeName = "BOOL";
|
||||||
|
defaultValue = 1;
|
||||||
|
};
|
||||||
|
class radioOrdnance {
|
||||||
|
displayName = "Ordnance Radio Warning";
|
||||||
|
description = "Play a radio warning when Zeus uses ordnance.";
|
||||||
|
typeName = "BOOL";
|
||||||
|
defaultValue = 1;
|
||||||
|
};
|
||||||
|
class revealMines {
|
||||||
|
displayName = "Reveal Mines";
|
||||||
|
description = "Do you want to reveal mines placed by Zeus?";
|
||||||
|
typeName = "NUMBER";
|
||||||
|
class values {
|
||||||
|
class disable {
|
||||||
|
name = "Disabled";
|
||||||
|
value = 0;
|
||||||
|
};
|
||||||
|
class partial {
|
||||||
|
name = "Reveal to sides friendly with Zeus unit";
|
||||||
|
value = 1;
|
||||||
|
};
|
||||||
|
class full {
|
||||||
|
name = "Add map markers and reveal to sides friendly with Zeus unit";
|
||||||
|
value = 2;
|
||||||
|
default = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class remoteWind {
|
||||||
|
displayName = "Reveal Remote Control";
|
||||||
|
description = "Play a wind sound when Zeus remote controls a unit.";
|
||||||
|
typeName = "BOOL";
|
||||||
|
defaultValue = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class ModuleDescription {
|
||||||
|
description = "Provides control over various aspects of Zeus.";
|
||||||
|
sync[] = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class ModuleCurator_F: Module_F {
|
||||||
|
function = QUOTE(DFUNC(bi_moduleCurator));
|
||||||
|
};
|
||||||
|
class ModuleMine_F: ModuleEmpty_F {
|
||||||
|
function = QUOTE(DFUNC(bi_moduleMine));
|
||||||
|
};
|
||||||
|
class ModuleOrdnance_F: Module_F {
|
||||||
|
function = QUOTE(DFUNC(bi_moduleProjectile));
|
||||||
|
};
|
||||||
|
class ModuleRemoteControl_F: Module_F {
|
||||||
|
function = QUOTE(DFUNC(bi_moduleRemoteControl));
|
||||||
|
};
|
||||||
|
};
|
@ -6,5 +6,6 @@ PREP(bi_moduleCurator);
|
|||||||
PREP(bi_moduleMine);
|
PREP(bi_moduleMine);
|
||||||
PREP(bi_moduleProjectile);
|
PREP(bi_moduleProjectile);
|
||||||
PREP(bi_moduleRemoteControl);
|
PREP(bi_moduleRemoteControl);
|
||||||
|
PREP(moduleZeusSettings);
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
@ -5,7 +5,7 @@ class CfgPatches {
|
|||||||
units[] = {};
|
units[] = {};
|
||||||
weapons[] = {};
|
weapons[] = {};
|
||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_common"};
|
requiredAddons[] = {"ace_common","ace_modules"};
|
||||||
author[] = {"SilentSpike"};
|
author[] = {"SilentSpike"};
|
||||||
authorUrl = "https://github.com/SilentSpike";
|
authorUrl = "https://github.com/SilentSpike";
|
||||||
VERSION_CONFIG;
|
VERSION_CONFIG;
|
||||||
@ -13,20 +13,5 @@ class CfgPatches {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
|
#include "CfgFactionClasses.hpp"
|
||||||
class CfgVehicles {
|
#include "CfgVehicles.hpp"
|
||||||
class Module_F;
|
|
||||||
class ModuleEmpty_F;
|
|
||||||
class ModuleCurator_F: Module_F {
|
|
||||||
function = QUOTE(FUNC(bi_moduleCurator));
|
|
||||||
};
|
|
||||||
class ModuleMine_F: ModuleEmpty_F {
|
|
||||||
function = QUOTE(FUNC(bi_moduleMine));
|
|
||||||
};
|
|
||||||
class ModuleOrdnance_F: Module_F {
|
|
||||||
function = QUOTE(FUNC(bi_moduleProjectile));
|
|
||||||
};
|
|
||||||
class ModuleRemoteControl_F: Module_F {
|
|
||||||
function = QUOTE(FUNC(bi_moduleRemoteControl));
|
|
||||||
};
|
|
||||||
};
|
|
@ -2,7 +2,7 @@
|
|||||||
* Author: Bohemia Interactive
|
* Author: Bohemia Interactive
|
||||||
* Module function for spawning projectiles
|
* Module function for spawning projectiles
|
||||||
* Used by Curator artillery modules etc
|
* Used by Curator artillery modules etc
|
||||||
* Edited to remove radio warning (also retains ballistics support added by ACE_Modules)
|
* Edited to remove radio warning and add ballistics support
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The logic object <OBJECT>
|
* 0: The logic object <OBJECT>
|
||||||
|
29
addons/zeus/functions/fnc_moduleZeusSettings.sqf
Normal file
29
addons/zeus/functions/fnc_moduleZeusSettings.sqf
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* Author: SilentSpike
|
||||||
|
* Module for adjusting various aspects of zeus
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: The module logic <LOGIC>
|
||||||
|
* 1: units <ARRAY>
|
||||||
|
* 2: activated <BOOL>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None <NIL>
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_logic", "_units", "_activated"];
|
||||||
|
_logic = _this select 0;
|
||||||
|
_units = _this select 1;
|
||||||
|
_activated = _this select 2;
|
||||||
|
|
||||||
|
if !(_activated) exitWith {};
|
||||||
|
|
||||||
|
[_logic, QGVAR(settingAscension), "zeusAscension"] call EFUNC(common,readSettingFromModule);
|
||||||
|
[_logic, QGVAR(settingBird), "zeusBird"] call EFUNC(common,readSettingFromModule);
|
||||||
|
[_logic, QGVAR(settingOrdnance), "radioOrdnance"] call EFUNC(common,readSettingFromModule);
|
||||||
|
[_logic, QGVAR(settingMines), "revealMines"] call EFUNC(common,readSettingFromModule);
|
||||||
|
[_logic, QGVAR(settingWind), "remoteWind"] call EFUNC(common,readSettingFromModule);
|
Loading…
Reference in New Issue
Block a user