mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
only disable auto-weather settings by default, but keep them toggleable
This commit is contained in:
parent
3690519a7c
commit
1db1c41072
@ -1,76 +0,0 @@
|
|||||||
|
|
||||||
// point of this file is to disable "auto-weather"
|
|
||||||
// we want this, because it breaks weather commands we use in this component
|
|
||||||
|
|
||||||
// we hide the settings name and remove the tooltip
|
|
||||||
#define ALWAYS_ENABLE_WEATHER_SETTING control = QGVAR(disabledCheckbox);\
|
|
||||||
displayName = "";\
|
|
||||||
tooltip = ""
|
|
||||||
|
|
||||||
class Cfg3DEN {
|
|
||||||
class Attributes {
|
|
||||||
class Title;
|
|
||||||
class Checkbox: Title {
|
|
||||||
class Controls {
|
|
||||||
class Title;
|
|
||||||
class Value;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
class GVAR(disabledCheckbox): Checkbox {
|
|
||||||
// setting is still in the menu, because they have to appear somewhere
|
|
||||||
// we can however set the size to 0
|
|
||||||
w = 0;
|
|
||||||
h = 0;
|
|
||||||
attributeLoad = "";
|
|
||||||
attributeSave = "";
|
|
||||||
class Controls: Controls {
|
|
||||||
// the control has to have a "Title" and a "Value", otherwise the game crashes
|
|
||||||
class Title: Title {
|
|
||||||
// these also have to have a size of 0 or they would appear over the settings below
|
|
||||||
w = 0;
|
|
||||||
h = 0;
|
|
||||||
};
|
|
||||||
// We change the "Value"s type to the same of the "Title", so it's not selectable
|
|
||||||
class Value: Title {
|
|
||||||
// hard coded. has to be 100, otherwise the game crashes
|
|
||||||
idc = 100;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class Mission {
|
|
||||||
class Intel {
|
|
||||||
class AttributeCategories {
|
|
||||||
class Rain {
|
|
||||||
class Attributes {
|
|
||||||
class RainForced {
|
|
||||||
ALWAYS_ENABLE_WEATHER_SETTING;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class Lightnings {
|
|
||||||
class Attributes {
|
|
||||||
class LightningsForced {
|
|
||||||
ALWAYS_ENABLE_WEATHER_SETTING;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class Waves {
|
|
||||||
class Attributes {
|
|
||||||
class WavesForced {
|
|
||||||
ALWAYS_ENABLE_WEATHER_SETTING;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class Wind {
|
|
||||||
class Attributes {
|
|
||||||
class WindForced {
|
|
||||||
ALWAYS_ENABLE_WEATHER_SETTING;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
@ -15,7 +15,6 @@ class CfgPatches {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#include "CfgEventhandlers.hpp"
|
#include "CfgEventhandlers.hpp"
|
||||||
#include "Cfg3DEN.hpp"
|
|
||||||
#include "CfgWorlds.hpp"
|
#include "CfgWorlds.hpp"
|
||||||
#include "RscTitles.hpp"
|
#include "RscTitles.hpp"
|
||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
|
@ -1,19 +1,15 @@
|
|||||||
// point of this file is to disable "auto-weather"
|
// point of this file is to disable "auto-weather" by default
|
||||||
// we want this, because it breaks weather commands we use in this component
|
// we want this, because it breaks weather commands we use in this component
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
// cannot create checkboxes which have the default value true
|
// cannot create checkboxes which have the default value "true"
|
||||||
// 3den uses inverted checkboxes instead, but those only change in appearence
|
// 3den uses inverted checkboxes instead, but those only change in appearence
|
||||||
// we have to auto set these settings manually - on mission creation
|
// we have to auto set these settings manually - on mission creation
|
||||||
// we also want this on mission load, just to reach as many missions as possible
|
add3DENEventHandler ["onMissionNew", {
|
||||||
private _fnc_disableAutoWeather = {
|
|
||||||
set3DENMissionAttributes [
|
set3DENMissionAttributes [
|
||||||
["Intel", "IntelRainIsForced", true],
|
["Intel", "IntelRainIsForced", true],
|
||||||
["Intel", "IntelLightningIsForced", true],
|
["Intel", "IntelLightningIsForced", true],
|
||||||
["Intel", "IntelWavesIsForced", true],
|
["Intel", "IntelWavesIsForced", true],
|
||||||
["Intel", "IntelWindIsForced", true]
|
["Intel", "IntelWindIsForced", true]
|
||||||
];
|
];
|
||||||
};
|
}];
|
||||||
|
|
||||||
add3DENEventHandler ["onMissionNew", _fnc_disableAutoWeather];
|
|
||||||
add3DENEventHandler ["onMissionLoad", _fnc_disableAutoWeather];
|
|
||||||
|
Loading…
Reference in New Issue
Block a user