mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
disable auto weather - bugging out ACE weather
This commit is contained in:
parent
8f3907c03f
commit
3690519a7c
76
addons/weather/Cfg3DEN.hpp
Normal file
76
addons/weather/Cfg3DEN.hpp
Normal file
@ -0,0 +1,76 @@
|
||||
|
||||
// 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -17,3 +17,9 @@ class Extended_PostInit_EventHandlers {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_DisplayLoad_EventHandlers {
|
||||
class Display3DEN {
|
||||
ADDON = QUOTE(call COMPILE_FILE(init3DEN));
|
||||
};
|
||||
};
|
||||
|
@ -15,6 +15,7 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventhandlers.hpp"
|
||||
#include "Cfg3DEN.hpp"
|
||||
#include "CfgWorlds.hpp"
|
||||
#include "RscTitles.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
19
addons/weather/init3DEN.sqf
Normal file
19
addons/weather/init3DEN.sqf
Normal file
@ -0,0 +1,19 @@
|
||||
// point of this file is to disable "auto-weather"
|
||||
// we want this, because it breaks weather commands we use in this component
|
||||
#include "script_component.hpp"
|
||||
|
||||
// cannot create checkboxes which have the default value true
|
||||
// 3den uses inverted checkboxes instead, but those only change in appearence
|
||||
// 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
|
||||
private _fnc_disableAutoWeather = {
|
||||
set3DENMissionAttributes [
|
||||
["Intel", "IntelRainIsForced", true],
|
||||
["Intel", "IntelLightningIsForced", true],
|
||||
["Intel", "IntelWavesIsForced", true],
|
||||
["Intel", "IntelWindIsForced", true]
|
||||
];
|
||||
};
|
||||
|
||||
add3DENEventHandler ["onMissionNew", _fnc_disableAutoWeather];
|
||||
add3DENEventHandler ["onMissionLoad", _fnc_disableAutoWeather];
|
Loading…
Reference in New Issue
Block a user