Add config style validation

This commit is contained in:
Glowbal 2016-04-07 19:51:12 +02:00
parent a8c0840cd1
commit f409ce8248
8 changed files with 571 additions and 413 deletions

View File

@ -12,6 +12,7 @@ before_script:
fi
script:
- python3 tools/sqf_validator.py
- python3 tools/config_style_checker.py
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
python3 tools/deploy.py;
fi

View File

@ -76,349 +76,349 @@
class RscText;
class DAGR_Button {
idc = -1;
type = CT_BUTTON;
style = ST_LEFT;
font = "RobotoCondensed";
sizeEx = 0.02;
colorText[] = { 0, 1, 0, 1 };
colorFocused[] = { 0, 0, 0, 0 }; // border color for focused state
colorDisabled[] = { 0, 0, 0, 0 }; // text color for disabled state
colorBackground[] = { 0, 0, 0, 0 };
colorBackgroundDisabled[] = { 0, 0, 0, 0 }; // background color for disabled state
colorBackgroundActive[] = { 0, 0, 0, 0 }; // background color for active state
offsetX = 0;
offsetY = 0;
offsetPressedX = 0;
offsetPressedY = 0;
colorShadow[] = { 0, 0, 0, 0 };
colorBorder[] = { 0, 0, 0, 0 };
borderSize = 0;
soundEnter[] = { "", 0, 1 }; // no sound
soundPush[] = { "", 0, 1 };
soundClick[] = { "", 0, 1 }; // no sound
soundEscape[] = { "", 0, 1 }; // no sound
x = 0.5;
y = 0.5;
w = 0.07;
h = 0.05;
text = "";
action = "";
idc = -1;
type = CT_BUTTON;
style = ST_LEFT;
font = "RobotoCondensed";
sizeEx = 0.02;
colorText[] = { 0, 1, 0, 1 };
colorFocused[] = { 0, 0, 0, 0 }; // border color for focused state
colorDisabled[] = { 0, 0, 0, 0 }; // text color for disabled state
colorBackground[] = { 0, 0, 0, 0 };
colorBackgroundDisabled[] = { 0, 0, 0, 0 }; // background color for disabled state
colorBackgroundActive[] = { 0, 0, 0, 0 }; // background color for active state
offsetX = 0;
offsetY = 0;
offsetPressedX = 0;
offsetPressedY = 0;
colorShadow[] = { 0, 0, 0, 0 };
colorBorder[] = { 0, 0, 0, 0 };
borderSize = 0;
soundEnter[] = { "", 0, 1 }; // no sound
soundPush[] = { "", 0, 1 };
soundClick[] = { "", 0, 1 }; // no sound
soundEscape[] = { "", 0, 1 }; // no sound
x = 0.5;
y = 0.5;
w = 0.07;
h = 0.05;
text = "";
action = "";
};
class DAGR_Menu_Pic {
type = 0;
idc = -1;
style = 48;
x = 0;
y = 0;
w = 0.7;
h = 1.4;
text = "";
colorBackground[] = {};
colorText[] = {};
font = "RobotoCondensed";
sizeEx = 0.04;
waitForLoad = 0;
type = 0;
idc = -1;
style = 48;
x = 0;
y = 0;
w = 0.7;
h = 1.4;
text = "";
colorBackground[] = {};
colorText[] = {};
font = "RobotoCondensed";
sizeEx = 0.04;
waitForLoad = 0;
};
class DAGR_Menu_Text {
type = 0;
idc = -1;
style = 0x00;
x = 0.5;
y = 0.5;
w = 0.15;
h = 0.15;
colorBackground[] = { 0, 0, 0, 0 };
colorText[] = { 0.239, 0.216, 0.153, 1 };
font = "RobotoCondensed";
sizeEx = 0.03;
waitForLoad = 0;
text = "";
type = 0;
idc = -1;
style = 0x00;
x = 0.5;
y = 0.5;
w = 0.15;
h = 0.15;
colorBackground[] = { 0, 0, 0, 0 };
colorText[] = { 0.239, 0.216, 0.153, 1 };
font = "RobotoCondensed";
sizeEx = 0.03;
waitForLoad = 0;
text = "";
};
class DAGR_Menu {
idd = 266860;
movingEnable = false;
duration = 100000;
fadein = 0;
fadeout = 0;
name = "Dagr_Menu";
onLoad = "uiNamespace setVariable ['DAGR_Menu', _this select 0]";
idd = 266860;
movingEnable = false;
duration = 100000;
fadein = 0;
fadeout = 0;
name = "Dagr_Menu";
onLoad = "uiNamespace setVariable ['DAGR_Menu', _this select 0]";
onUnload = QUOTE(GVAR(PWR) = true); // Simulate pressing the power button
controls[] = {"DAGR_MENU_UI", "DAGR_PWR_Button", "DAGR_UP_Button", "DAGR_DOWN_Button", "DAGR_LEFT_Button", "DAGR_RIGHT_Button", "DAGR_NEXT_Button",
"DAGR_SEL_Button", "DAGR_MENU_Button", "DAGR_F1_Button", "DAGR_F2_Button", "DAGR_F3_Button", "DAGR_F1_Text", "DAGR_F2_Text", "DAGR_F3_Text", "DAGR_MENU_OPTION0",
"DAGR_MENU_OPTION1", "DAGR_MENU_OPTION2", "DAGR_MENU_OPTION3", "DAGR_MENU_OPTION4", "DAGR_MENU_SELECTION0", "DAGR_MENU_SELECTION1", "DAGR_MENU_SELECTION2",
"DAGR_MENU_SELECTION3", "DAGR_MENU_SELECTION4", "DAGR_MENU_Main_Text", "DAGR_MENU_PSELECTION1", "DAGR_MENU_PSELECTION2", "DAGR_MENU_PSELECTION3",
"DAGR_MENU_PSELECTION4", "DAGR_MENU_PSELECTION5", "DAGR_MENU_PSELECTION6","DAGR_MENU_PSELECTION7", "DAGR_MENU_PSELECTION8"};
controls[] = {"DAGR_MENU_UI", "DAGR_PWR_Button", "DAGR_UP_Button", "DAGR_DOWN_Button", "DAGR_LEFT_Button", "DAGR_RIGHT_Button", "DAGR_NEXT_Button",
"DAGR_SEL_Button", "DAGR_MENU_Button", "DAGR_F1_Button", "DAGR_F2_Button", "DAGR_F3_Button", "DAGR_F1_Text", "DAGR_F2_Text", "DAGR_F3_Text", "DAGR_MENU_OPTION0",
"DAGR_MENU_OPTION1", "DAGR_MENU_OPTION2", "DAGR_MENU_OPTION3", "DAGR_MENU_OPTION4", "DAGR_MENU_SELECTION0", "DAGR_MENU_SELECTION1", "DAGR_MENU_SELECTION2",
"DAGR_MENU_SELECTION3", "DAGR_MENU_SELECTION4", "DAGR_MENU_Main_Text", "DAGR_MENU_PSELECTION1", "DAGR_MENU_PSELECTION2", "DAGR_MENU_PSELECTION3",
"DAGR_MENU_PSELECTION4", "DAGR_MENU_PSELECTION5", "DAGR_MENU_PSELECTION6","DAGR_MENU_PSELECTION7", "DAGR_MENU_PSELECTION8"};
class DAGR_MENU_UI : DAGR_Menu_Pic {
idc = 266861;
x = 0.175;
y = -0.173;
text = QUOTE(PATHTOF(UI\dagr_menu.paa));
sizeEx = 0.1;
};
class DAGR_MENU_UI : DAGR_Menu_Pic {
idc = 266861;
x = 0.175;
y = -0.173;
text = QUOTE(PATHTOF(UI\dagr_menu.paa));
sizeEx = 0.1;
};
class DAGR_PWR_Button : DAGR_Button {
idc = 266863;
action = QUOTE(GVAR(PWR) = true);
x = 0.40;
y = 0.65;
};
class DAGR_PWR_Button : DAGR_Button {
idc = 266863;
action = QUOTE(GVAR(PWR) = true);
x = 0.40;
y = 0.65;
};
class DAGR_UP_Button : DAGR_Button {
idc = 266864;
action = QUOTE(GVAR(UP) = true);
x = 0.50;
y = 0.675;
};
class DAGR_UP_Button : DAGR_Button {
idc = 266864;
action = QUOTE(GVAR(UP) = true);
x = 0.50;
y = 0.675;
};
class DAGR_DOWN_Button : DAGR_Button {
idc = 266865;
action = QUOTE(GVAR(DOWN) = true);
x = 0.50;
y = 0.81;
};
class DAGR_DOWN_Button : DAGR_Button {
idc = 266865;
action = QUOTE(GVAR(DOWN) = true);
x = 0.50;
y = 0.81;
};
class DAGR_LEFT_Button : DAGR_Button {
idc = 266866;
action = QUOTE(GVAR(LEFT) = true);
x = 0.40;
y = 0.735;
w = 0.05;
h = 0.07;
};
class DAGR_LEFT_Button : DAGR_Button {
idc = 266866;
action = QUOTE(GVAR(LEFT) = true);
x = 0.40;
y = 0.735;
w = 0.05;
h = 0.07;
};
class DAGR_RIGHT_Button : DAGR_Button {
idc = 266867;
action = QUOTE(GVAR(RIGHT) = true);
x = 0.62;
y = 0.735;
w = 0.05;
h = 0.07;
};
class DAGR_RIGHT_Button : DAGR_Button {
idc = 266867;
action = QUOTE(GVAR(RIGHT) = true);
x = 0.62;
y = 0.735;
w = 0.05;
h = 0.07;
};
class DAGR_NEXT_Button : DAGR_Button {
idc = 266868;
action = QUOTE(DAGR_NEXT = true);
x = 0.60;
y = 0.65;
};
class DAGR_NEXT_Button : DAGR_Button {
idc = 266868;
action = QUOTE(DAGR_NEXT = true);
x = 0.60;
y = 0.65;
};
class DAGR_SEL_Button : DAGR_Button {
idc = 266869;
action = QUOTE(GVAR(SEL) = true);
x = 0.54;
y = 0.735;
w = 0.06;
h = 0.06;
};
class DAGR_SEL_Button : DAGR_Button {
idc = 266869;
action = QUOTE(GVAR(SEL) = true);
x = 0.54;
y = 0.735;
w = 0.06;
h = 0.06;
};
class DAGR_MENU_Button : DAGR_Button {
idc = 266870;
action = QUOTE(GVAR(MENU_B) = true);
x = 0.46;
y = 0.735;
w = 0.06;
h = 0.06;
};
class DAGR_MENU_Button : DAGR_Button {
idc = 266870;
action = QUOTE(GVAR(MENU_B) = true);
x = 0.46;
y = 0.735;
w = 0.06;
h = 0.06;
};
class DAGR_F1_Button : DAGR_Button {
idc = 266871;
action = QUOTE(GVAR(F1) = true);
x = 0.40;
y = 0.575;
};
class DAGR_F1_Button : DAGR_Button {
idc = 266871;
action = QUOTE(GVAR(F1) = true);
x = 0.40;
y = 0.575;
};
class DAGR_F2_Button : DAGR_Button {
idc = 266872;
action = QUOTE(GVAR(F2) = true);
x = 0.495;
y = 0.575;
};
class DAGR_F2_Button : DAGR_Button {
idc = 266872;
action = QUOTE(GVAR(F2) = true);
x = 0.495;
y = 0.575;
};
class DAGR_F3_Button : DAGR_Button {
idc = 266873;
action = QUOTE(GVAR(F3) = true);
x = 0.59;
y = 0.575;
};
class DAGR_F3_Button : DAGR_Button {
idc = 266873;
action = QUOTE(GVAR(F3) = true);
x = 0.59;
y = 0.575;
};
class DAGR_F1_Text : DAGR_Menu_Text {
idc = 266874;
x = 0.388;
y = 0.38;
text = "";
};
class DAGR_F1_Text : DAGR_Menu_Text {
idc = 266874;
x = 0.388;
y = 0.38;
text = "";
};
class DAGR_F2_Text : DAGR_Menu_Text {
idc = 266875;
x = 0.506;
y = 0.38;
};
class DAGR_F2_Text : DAGR_Menu_Text {
idc = 266875;
x = 0.506;
y = 0.38;
};
class DAGR_F3_Text : DAGR_Menu_Text {
idc = 266876;
x = 0.612;
y = 0.38;
};
class DAGR_F3_Text : DAGR_Menu_Text {
idc = 266876;
x = 0.612;
y = 0.38;
};
class DAGR_MENU_OPTION0 : DAGR_Menu_Text {
idc = 2668777;
style = 0x02;
sizeEx = 0.035;
x = 0.43;
y = 0.19;
};
class DAGR_MENU_OPTION0 : DAGR_Menu_Text {
idc = 2668777;
style = 0x02;
sizeEx = 0.035;
x = 0.43;
y = 0.19;
};
class DAGR_MENU_OPTION1 : DAGR_Menu_Text {
idc = 2668778;
style = 0x02;
sizeEx = 0.035;
x = 0.43;
y = 0.225;
};
class DAGR_MENU_OPTION1 : DAGR_Menu_Text {
idc = 2668778;
style = 0x02;
sizeEx = 0.035;
x = 0.43;
y = 0.225;
};
class DAGR_MENU_OPTION2 : DAGR_Menu_Text {
idc = 2668779;
style = 0x02;
sizeEx = 0.035;
x = 0.43;
y = 0.26;
};
class DAGR_MENU_OPTION2 : DAGR_Menu_Text {
idc = 2668779;
style = 0x02;
sizeEx = 0.035;
x = 0.43;
y = 0.26;
};
class DAGR_MENU_OPTION3 : DAGR_Menu_Text {
idc = 2668780;
style = 0x02;
sizeEx = 0.035;
x = 0.43;
y = 0.295;
};
class DAGR_MENU_OPTION3 : DAGR_Menu_Text {
idc = 2668780;
style = 0x02;
sizeEx = 0.035;
x = 0.43;
y = 0.295;
};
class DAGR_MENU_OPTION4 : DAGR_Menu_Text {
idc = 2668781;
style = 0x02;
sizeEx = 0.035;
x = 0.43;
y = 0.33;
};
class DAGR_MENU_SELECTION0 : DAGR_Menu_Pic {
idc = 2668783;
x = 0.42;
y = 0.246;
w = 0.17;
h = 0.035;
sizeEx = 0.05;
};
class DAGR_MENU_OPTION4 : DAGR_Menu_Text {
idc = 2668781;
style = 0x02;
sizeEx = 0.035;
x = 0.43;
y = 0.33;
};
class DAGR_MENU_SELECTION0 : DAGR_Menu_Pic {
idc = 2668783;
x = 0.42;
y = 0.246;
w = 0.17;
h = 0.035;
sizeEx = 0.05;
};
class DAGR_MENU_SELECTION1 : DAGR_Menu_Pic {
idc = 2668784;
x = 0.42;
y = 0.281;
w = 0.17;
h = 0.035;
sizeEx = 0.05;
};
class DAGR_MENU_SELECTION1 : DAGR_Menu_Pic {
idc = 2668784;
x = 0.42;
y = 0.281;
w = 0.17;
h = 0.035;
sizeEx = 0.05;
};
class DAGR_MENU_SELECTION2 : DAGR_Menu_Pic {
idc = 2668785;
x = 0.42;
y = 0.316;
w = 0.17;
h = 0.035;
sizeEx = 0.05;
};
class DAGR_MENU_SELECTION2 : DAGR_Menu_Pic {
idc = 2668785;
x = 0.42;
y = 0.316;
w = 0.17;
h = 0.035;
sizeEx = 0.05;
};
class DAGR_MENU_SELECTION3 : DAGR_Menu_Pic {
idc = 2668786;
x = 0.42;
y = 0.351;
w = 0.17;
h = 0.035;
sizeEx = 0.05;
};
class DAGR_MENU_SELECTION3 : DAGR_Menu_Pic {
idc = 2668786;
x = 0.42;
y = 0.351;
w = 0.17;
h = 0.035;
sizeEx = 0.05;
};
class DAGR_MENU_SELECTION4 : DAGR_Menu_Pic {
idc = 2668787;
x = 0.42;
y = 0.386;
w = 0.17;
h = 0.035;
sizeEx = 0.05;
};
class DAGR_MENU_SELECTION4 : DAGR_Menu_Pic {
idc = 2668787;
x = 0.42;
y = 0.386;
w = 0.17;
h = 0.035;
sizeEx = 0.05;
};
class DAGR_MENU_Main_Text : DAGR_Menu_Text {
idc = 2668782;
style = ST_CENTER;
x = 0.38;
y = 0.32;
w = 0.25;
h = 0.035;
sizeEx = 0.04;
};
class DAGR_MENU_Main_Text : DAGR_Menu_Text {
idc = 2668782;
style = ST_CENTER;
x = 0.38;
y = 0.32;
w = 0.25;
h = 0.035;
sizeEx = 0.04;
};
class DAGR_MENU_PSELECTION1 : DAGR_Menu_Pic {
idc = 2668788;
x = 0.451;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION1 : DAGR_Menu_Pic {
idc = 2668788;
x = 0.451;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION2 : DAGR_Menu_Pic {
idc = 2668789;
x = 0.465;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION2 : DAGR_Menu_Pic {
idc = 2668789;
x = 0.465;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION3 : DAGR_Menu_Pic {
idc = 2668790;
x = 0.479;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION3 : DAGR_Menu_Pic {
idc = 2668790;
x = 0.479;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION4 : DAGR_Menu_Pic {
idc = 2668791;
x = 0.493;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION4 : DAGR_Menu_Pic {
idc = 2668791;
x = 0.493;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION5 : DAGR_Menu_Pic {
idc = 2668792;
x = 0.507;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION5 : DAGR_Menu_Pic {
idc = 2668792;
x = 0.507;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION6 : DAGR_Menu_Pic {
idc = 2668793;
x = 0.521;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION6 : DAGR_Menu_Pic {
idc = 2668793;
x = 0.521;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION7 : DAGR_Menu_Pic {
idc = 2668794;
x = 0.535;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION7 : DAGR_Menu_Pic {
idc = 2668794;
x = 0.535;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION8 : DAGR_Menu_Pic {
idc = 2668795;
x = 0.549;
y = 0.352;
w = 0.01;
h = 0.003;
};
class DAGR_MENU_PSELECTION8 : DAGR_Menu_Pic {
idc = 2668795;
x = 0.549;
y = 0.352;
w = 0.01;
h = 0.003;
};
};

View File

@ -1,95 +1,95 @@
class RscTitles {
class DAGR_Text {
type = 0;
idc = -1;
style = 0x01;
x = 0;
y = 0;
w = 0.15;
h = 0.050;
text = "";
colorBackground[] = { 0, 0, 0, 0 };
colorText[] = { 0.239, 0.216, 0.153, 1 };
font = "RobotoCondensed";
sizeEx = 0.04;
waitForLoad = 0;
};
class DAGR_Pic {
type = 0;
idc = -1;
style = 48;
x = 0;
y = 0;
w = 0.50;
h = 0.50;
text = "";
colorBackground[] = {};
colorText[] = {};
font = "RobotoCondensed";
sizeEx = 0.02;
waitForLoad = 0;
};
class DAGR_Text {
type = 0;
idc = -1;
style = 0x01;
x = 0;
y = 0;
w = 0.15;
h = 0.050;
text = "";
colorBackground[] = { 0, 0, 0, 0 };
colorText[] = { 0.239, 0.216, 0.153, 1 };
font = "RobotoCondensed";
sizeEx = 0.04;
waitForLoad = 0;
};
class DAGR_Pic {
type = 0;
idc = -1;
style = 48;
x = 0;
y = 0;
w = 0.50;
h = 0.50;
text = "";
colorBackground[] = {};
colorText[] = {};
font = "RobotoCondensed";
sizeEx = 0.02;
waitForLoad = 0;
};
class DAGR_Display {
idd = 266850;
movingEnable = false;
duration = 100000;
fadein = 0;
fadeout = 0;
name = "Dagr_Display";
onLoad="uiNamespace setVariable ['DAGR_Display', _this select 0]";
controls[] = {"DAGR_UI", "DAGR_Grid", "DAGR_Speed", "DAGR_Elevation", "DAGR_Heading", "DAGR_Time", "DAGR_WP", "DAGR_Bearing", "DAGR_DIST"};
class DAGR_Display {
idd = 266850;
movingEnable = false;
duration = 100000;
fadein = 0;
fadeout = 0;
name = "Dagr_Display";
onLoad="uiNamespace setVariable ['DAGR_Display', _this select 0]";
controls[] = {"DAGR_UI", "DAGR_Grid", "DAGR_Speed", "DAGR_Elevation", "DAGR_Heading", "DAGR_Time", "DAGR_WP", "DAGR_Bearing", "DAGR_DIST"};
class DAGR_UI : DAGR_Pic {
idc = 266856;
x = "(SafeZoneW + SafeZoneX) - 0.45";
y = "(SafeZoneH + SafeZoneY) - 0.47";
};
class DAGR_UI : DAGR_Pic {
idc = 266856;
x = "(SafeZoneW + SafeZoneX) - 0.45";
y = "(SafeZoneH + SafeZoneY) - 0.47";
};
class DAGR_Grid : DAGR_Text {
idc = 266851;
x = "(SafeZoneW + SafeZoneX) - 0.370";// 0.830
y = "(SafeZoneH + SafeZoneY)- 0.250";// 0.845
w = 0.25;
h = 0.06;
sizeEx = 0.07;
};
class DAGR_Speed : DAGR_Text {
idc = 266852;
x = "(SafeZoneW + SafeZoneX) - 0.388"; //0.812
y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
};
class DAGR_Elevation : DAGR_Text {
idc = 266853;
x = "(SafeZoneW + SafeZoneX) - 0.270"; //0.930
y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
};
class DAGR_Heading : DAGR_Text {
idc = 266854;
x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787
y = "(SafeZoneH + SafeZoneY) - 0.1294"; //0.9656
};
class DAGR_Time : DAGR_Text {
idc = 266855;
x = "(SafeZoneW + SafeZoneX) - 0.275"; //0.925
y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965
};
class DAGR_Grid : DAGR_Text {
idc = 266851;
x = "(SafeZoneW + SafeZoneX) - 0.370";// 0.830
y = "(SafeZoneH + SafeZoneY)- 0.250";// 0.845
w = 0.25;
h = 0.06;
sizeEx = 0.07;
};
class DAGR_Speed : DAGR_Text {
idc = 266852;
x = "(SafeZoneW + SafeZoneX) - 0.388"; //0.812
y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
};
class DAGR_Elevation : DAGR_Text {
idc = 266853;
x = "(SafeZoneW + SafeZoneX) - 0.270"; //0.930
y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
};
class DAGR_Heading : DAGR_Text {
idc = 266854;
x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787
y = "(SafeZoneH + SafeZoneY) - 0.1294"; //0.9656
};
class DAGR_Time : DAGR_Text {
idc = 266855;
x = "(SafeZoneW + SafeZoneX) - 0.275"; //0.925
y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965
};
class DAGR_WP : DAGR_Text {
idc = 266857;
x = "(SafeZoneW + SafeZoneX) - 0.235"; //0.965
y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
};
class DAGR_WP : DAGR_Text {
idc = 266857;
x = "(SafeZoneW + SafeZoneX) - 0.235"; //0.965
y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
};
class DAGR_Bearing : DAGR_Text {
idc = 266858;
x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787
y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
};
class DAGR_DIST : DAGR_Text {
idc = 266859;
x = "(SafeZoneW + SafeZoneX) - 0.265"; //0.935
y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965
};
};
class DAGR_Bearing : DAGR_Text {
idc = 266858;
x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787
y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
};
class DAGR_DIST : DAGR_Text {
idc = 266859;
x = "(SafeZoneW + SafeZoneX) - 0.265"; //0.935
y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965
};
};
};

View File

@ -27,8 +27,8 @@ class CfgSounds {
sound[] = {QUOTE(PATHTOF(sounds\deafness_noring.ogg)),3,1};
titles[] = {};
};
class ACE_Ring_Backblast {
sound[] = {QUOTE(PATHTOF(sounds\backblast_ring.ogg)),1,1};
titles[] = {};
};
class ACE_Ring_Backblast {
sound[] = {QUOTE(PATHTOF(sounds\backblast_ring.ogg)),1,1};
titles[] = {};
};
};

View File

@ -33,13 +33,13 @@ class CfgAmmo {
soundFakeFall2[] = {"",3.16228,1,1000};
soundFakeFall3[] = {"",3.16228,1,1000};
soundFakeFall[] = {};
hit = 0;
indirectHit = 0;
indirectHitRange = 0;
explosive = 1;
model = "\A3\weapons_f\empty";
airFriction = 0;
timeToLive = 1;
explosionTime = 0.001;
hit = 0;
indirectHit = 0;
indirectHitRange = 0;
explosive = 1;
model = "\A3\weapons_f\empty";
airFriction = 0;
timeToLive = 1;
explosionTime = 0.001;
};
};

View File

@ -642,6 +642,6 @@ class CfgVehicles {
class Item_Base_F;
class Item_acc_flashlight: Item_Base_F {
displayName="UTG Defender 126";
};
displayName="UTG Defender 126";
};
};

View File

@ -2,16 +2,16 @@ class CfgWeapons {
class ACE_ItemCore;
class InventoryItem_Base_F;
class ACE_Tripod: ACE_ItemCore {
author[] = {"Rocko", "Scubaman3D"};
scope = 2;
displayName = CSTRING(DisplayName);
descriptionShort = "";
model = PATHTOF(data\w_sniper_tripod.p3d);
picture = PATHTOF(UI\w_sniper_tripod_ca.paa);
class ACE_Tripod: ACE_ItemCore {
author[] = {"Rocko", "Scubaman3D"};
scope = 2;
displayName = CSTRING(DisplayName);
descriptionShort = "";
model = PATHTOF(data\w_sniper_tripod.p3d);
picture = PATHTOF(UI\w_sniper_tripod_ca.paa);
class ItemInfo: InventoryItem_Base_F {
mass = 40;
};
};
};
};

View File

@ -0,0 +1,157 @@
#!/usr/bin/env python3
import fnmatch
import os
import re
import ntpath
import sys
import argparse
def check_config_style(filepath):
bad_count_file = 0
def pushClosing(t):
closingStack.append(closing.expr)
closing << Literal( closingFor[t[0]] )
def popClosing():
closing << closingStack.pop()
with open(filepath, 'r', encoding='utf-8', errors='ignore') as file:
content = file.read()
# Store all brackets we find in this file, so we can validate everything on the end
brackets_list = []
# To check if we are in a comment block
isInCommentBlock = False
checkIfInComment = False
# Used in case we are in a line comment (//)
ignoreTillEndOfLine = False
# Used in case we are in a comment block (/* */). This is true if we detect a * inside a comment block.
# If the next character is a /, it means we end our comment block.
checkIfNextIsClosingBlock = False
# We ignore everything inside a string
isInString = False
# Used to store the starting type of a string, so we can match that to the end of a string
inStringType = '';
lastIsCurlyBrace = False
checkForSemiColumn = False
# Extra information so we know what line we find errors at
lineNumber = 0
indexOfCharacter = 0
# Parse all characters in the content of this file to search for potential errors
for c in content:
if (lastIsCurlyBrace):
lastIsCurlyBrace = False
if c == '\n': # Keeping track of our line numbers
lineNumber += 1 # so we can print accurate line number information when we detect a possible error
if (isInString): # while we are in a string, we can ignore everything else, except the end of the string
if (c == inStringType):
isInString = False
# if we are not in a comment block, we will check if we are at the start of one or count the () {} and []
elif (isInCommentBlock == False):
# This means we have encountered a /, so we are now checking if this is an inline comment or a comment block
if (checkIfInComment):
checkIfInComment = False
if c == '*': # if the next character after / is a *, we are at the start of a comment block
isInCommentBlock = True
elif (c == '/'): # Otherwise, will check if we are in an line comment
ignoreTillEndOfLine = True # and an line comment is a / followed by another / (//) We won't care about anything that comes after it
if (isInCommentBlock == False):
if (ignoreTillEndOfLine): # we are in a line comment, just continue going through the characters until we find an end of line
if (c == '\n'):
ignoreTillEndOfLine = False
else: # validate brackets
if (c == '"' or c == "'"):
isInString = True
inStringType = c
elif (c == '/'):
checkIfInComment = True
elif (c == '('):
brackets_list.append('(')
elif (c == ')'):
if (len(brackets_list) > 0 and brackets_list[-1] in ['{', '[']):
print("ERROR: Possible missing round bracket ')' detected at {0} Line number: {1}".format(filepath,lineNumber))
bad_count_file += 1
brackets_list.append(')')
elif (c == '['):
brackets_list.append('[')
elif (c == ']'):
if (len(brackets_list) > 0 and brackets_list[-1] in ['{', '(']):
print("ERROR: Possible missing square bracket ']' detected at {0} Line number: {1}".format(filepath,lineNumber))
bad_count_file += 1
brackets_list.append(']')
elif (c == '{'):
brackets_list.append('{')
elif (c == '}'):
lastIsCurlyBrace = True
if (len(brackets_list) > 0 and brackets_list[-1] in ['(', '[']):
print("ERROR: Possible missing curly brace '}}' detected at {0} Line number: {1}".format(filepath,lineNumber))
bad_count_file += 1
brackets_list.append('}')
elif (c== '\t'):
print("ERROR: Tab detected at {0} Line number: {1}".format(filepath,lineNumber))
bad_count_file += 1
else: # Look for the end of our comment block
if (c == '*'):
checkIfNextIsClosingBlock = True;
elif (checkIfNextIsClosingBlock):
if (c == '/'):
isInCommentBlock = False
elif (c != '*'):
checkIfNextIsClosingBlock = False
indexOfCharacter += 1
if brackets_list.count('[') != brackets_list.count(']'):
print("ERROR: A possible missing square bracket [ or ] in file {0} [ = {1} ] = {2}".format(filepath,brackets_list.count('['),brackets_list.count(']')))
bad_count_file += 1
if brackets_list.count('(') != brackets_list.count(')'):
print("ERROR: A possible missing round bracket ( or ) in file {0} ( = {1} ) = {2}".format(filepath,brackets_list.count('('),brackets_list.count(')')))
bad_count_file += 1
if brackets_list.count('{') != brackets_list.count('}'):
print("ERROR: A possible missing curly brace {{ or }} in file {0} {{ = {1} }} = {2}".format(filepath,brackets_list.count('{'),brackets_list.count('}')))
bad_count_file += 1
return bad_count_file
def main():
print("Validating Config Style")
sqf_list = []
bad_count = 0
parser = argparse.ArgumentParser()
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default="")
args = parser.parse_args()
# Allow running from root directory as well as from inside the tools directory
rootDir = "../addons"
if (os.path.exists("addons")):
rootDir = "addons"
for root, dirnames, filenames in os.walk(rootDir + '/' + args.module):
for filename in fnmatch.filter(filenames, '*.cpp'):
sqf_list.append(os.path.join(root, filename))
for filename in fnmatch.filter(filenames, '*.hpp'):
sqf_list.append(os.path.join(root, filename))
for filename in sqf_list:
bad_count = bad_count + check_config_style(filename)
print("------\nChecked {0} files\nErrors detected: {1}".format(len(sqf_list), bad_count))
if (bad_count == 0):
print("Config validation PASSED")
else:
print("Config validation FAILED")
return bad_count
if __name__ == "__main__":
sys.exit(main())