Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get HEMTT working #418

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
/addons/*.pbo

## Added by HEMTT
releases/*
*.biprivatekey
keys/*
.hemtt/local
####

## Added by HEMTT
####
2 changes: 2 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[submodule ".hemtt/template"]
url = https://github.com/hemtt/cba
56 changes: 53 additions & 3 deletions .hemtt/base.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,56 @@ prefix = "tmf"
author = "TMF Team"
template = "cba"
mainprefix = "x"
files = ["mod.cpp"]
folder_optionals = true
sig_version = 3
files = [
"mod.cpp",
"README.md",
"logo_tmf_ca.paa",
"tmf_template.vr"
]

version = "3.0.0"

modname = "{{name}}"
key_name = "{{prefix}}_{{version}}"
authority = "{{prefix}}_{{version}}-{{git \"id 8\"}}"

check = [
"!version_set"
]
releasebuild = [
"@zip TMF_v{{semver.major}}.{{semver.minor}}.{{semver.patch}}",
"!version_unset"
]

[header_exts]
version = "{{git \"id 8\"}}"

[scripts.version_set]
steps_linux = [
"echo Setting version",
"sed -i -r -s 's/[0-9]+\\.[0-9]+\\.[0-9]+/{{semver.major}}.{{semver.minor}}.{{semver.patch}}/g' mod.cpp",
"sed -i -r -s 's/#define BUILD 000000/#define BUILD {{date \"%y%m%d\"}}/g' addons/main/script_version.hpp"
]
steps_windows = [
"echo Setting version",
"powershell -Command foreach ($f in 'mod.cpp') {(Get-Content $f) -replace '[0-9]+\\.[0-9]+\\.[0-9]+', '{{semver.major}}.{{semver.minor}}.{{semver.patch}}' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"powershell -Command foreach ($f in 'addons/main/script_version.hpp') {(Get-Content $f) -replace '#define BUILD 000000', '#define BUILD {{date \"%y%m%d\"}}' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}"
]
only_release = true
show_output = true

[scripts.version_unset]
steps_linux = [
"echo 'Unsetting version'",
"sed -i -r -s 's/{{semver.major}}.{{semver.minor}}.{{semver.patch}}/0.0.0/g' mod.cpp",
"sed -i -r -s 's/#define BUILD {{date \"%y%m%d\"}}/#define BUILD 000000/g' addons/main/script_version.hpp",
"echo '-> README.md version ready for commit (ignore until release)!'"
]
steps_windows = [
"echo Unsetting version",
"powershell -Command foreach ($f in 'mod.cpp') {(Get-Content $f) -replace '{{semver.major}}.{{semver.minor}}.{{semver.patch}}', '0.0.0' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"powershell -Command foreach ($f in 'addons/main/script_version.hpp') {(Get-Content $f) -replace '#define BUILD {{date \"%y%m%d\"}}', '#define BUILD 000000' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"echo -^> README.md version ready for commit (ignore until release)!"
]
only_release = true
show_output = true
60 changes: 30 additions & 30 deletions addons/acre2/Cfg3DEN.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#include "\a3\3DEN\UI\macros.inc"
#include "\a3\3DEN\UI\resincl.inc"
#include "\a3\3den\UI\macros.inc"
#include "\a3\3den\UI\resincl.inc"

class ctrlDefault;
class ctrlDefaultText;// : ctrlDefault;
Expand All @@ -14,7 +14,7 @@ class RscButtonMenu;
class RscText;


class cfgScriptPaths
class cfgScriptPaths
{
TMF_acre2 = "x\tmf\addons\acre2\ui_scripts\"; //"
};
Expand Down Expand Up @@ -136,7 +136,7 @@ class Cfg3DEN
control = "None"; // UI control base class displayed in Edit Attributes window, points to Cfg3DEN >> Attributes
expression = "[_this,'TMF_Network',_value] call tmf_common_fnc_initGroupVar;";// expression = "_this setVariable ['TMF_Network',_value,true];";
wikiType = "[[Number]]";
defaultValue = -1;
defaultValue = -1;
};
class TMF_Channellist
{
Expand Down Expand Up @@ -217,16 +217,16 @@ class Cfg3DEN
{
class Title;
class Toolbox; //class Toolbox: Title

class TMF_AcreAddRadioActions : Toolbox {
scriptName = "AcreAddRadioActions";
scriptPath = "TMF_acre2";
onLoad = "['onLoad',_this,'AcreAddRadioActions','TMF_acre2',false] call (uinamespace getvariable 'BIS_fnc_initDisplay');"; // 3rd param is the path PATH\scriptName.sqf
onUnload = "['onUnload',_this,'AcreAddRadioActions','TMF_acre2',false] call (uinamespace getvariable 'BIS_fnc_initDisplay');";

attributeLoad = "['attributeLoad',_this] call (uinamespace getvariable 'AcreAddRadioActions_script');";
attributeSave = "['attributeSave',_this] call (uinamespace getvariable 'AcreAddRadioActions_script');";

w = (ATTRIBUTE_TITLE_W + ATTRIBUTE_CONTENT_W) * GRID_W;
h = 6 * SIZE_M * GRID_H;
class Controls
Expand All @@ -237,7 +237,7 @@ class Cfg3DEN
style = ST_RIGHT;
w = ATTRIBUTE_TITLE_W * GRID_W;
x = 0;
h = 1 * SIZE_M * GRID_H;
h = 1 * SIZE_M * GRID_H;
y = 0;
colorBackground[] = {0,0,0,0};
tooltip = "These radios will be available for selection (via scroll wheel action) for the first 5 minutes after the player has spawned.";
Expand Down Expand Up @@ -267,7 +267,7 @@ class Cfg3DEN

};
};

class BabelSettings : Toolbox
{
scriptName = "BabelSettings";
Expand All @@ -277,7 +277,7 @@ class Cfg3DEN

attributeLoad = "['attributeLoad',_this] call (uinamespace getvariable 'BabelSettings_script');";
attributeSave = "['attributeSave',_this] call (uinamespace getvariable 'BabelSettings_script');";

w = (ATTRIBUTE_TITLE_W + ATTRIBUTE_CONTENT_W) * GRID_W;
h = 16 * SIZE_M * GRID_H;
class Controls
Expand All @@ -286,11 +286,11 @@ class Cfg3DEN
{
text = "Languages:";
w = ((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W)/2) * GRID_W;
h = 1 * SIZE_M * GRID_H;
h = 1 * SIZE_M * GRID_H;
y = 0;
x = SIZE_M * GRID_W;
colorBackground[] = {0,0,0,0};
};
};
class SpeakersTitle : LangTitle
{
text = "Language speakers:";
Expand Down Expand Up @@ -399,7 +399,7 @@ class Cfg3DEN
x = (((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W) - SIZE_M ) * GRID_W / 7)*3.9375 + SIZE_M * GRID_W;
action = "['languageDelClickCancel',_this] call (uinamespace getvariable 'BabelSettings_script');";
};

class EditLanguageTitle : LangTitle
{
idc = 313201;
Expand All @@ -409,7 +409,7 @@ class Cfg3DEN
w = ((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W) - SIZE_M ) * GRID_W;
colorBackground[] = {0.1,0.1,0.1,1};
};

class EditLanguageShortTitle : LangTitle
{
idc = 313202;
Expand Down Expand Up @@ -448,26 +448,26 @@ class Cfg3DEN

attributeLoad = "['attributeLoad', _this, _value] call (uinamespace getvariable 'RadioChannels_script');";
attributeSave = "['attributeSave',_this] call (uinamespace getvariable 'RadioChannels_script');";

w = (ATTRIBUTE_TITLE_W + ATTRIBUTE_CONTENT_W) * GRID_W;
h = (32 * SIZE_M + 1) * GRID_H;

//Attribute_Title_W = left side? Attribute_content_W = right Side?
// SIZE_M <- size of margin (relatively big-ish)
class Controls
{

class Title0: ctrlStatic
{
text = "Radio network allocation:";
w = ((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W)/2) * GRID_W;
h = 1 * SIZE_M * GRID_H;
h = 1 * SIZE_M * GRID_H;
y = 0;
x = SIZE_M * GRID_W;
colorBackground[] = {0,0,0,0};
tooltip = "Each network is a collection of radio channels. The network number is displayed on the right side below. To assign a different network select the entity below and press the number on your keyboard for the network number you wish to assign.";
};

class NetworkTree : ctrlTree
{
idc = 189438;
Expand All @@ -481,7 +481,7 @@ class Cfg3DEN
action = "['presetTreeClick',_this] call (uinamespace getvariable 'RadioChannels_script');";
onTreeDblClick = "['presetTreeDoubleClick',_this] call (uinamespace getvariable 'RadioChannels_script');";
};

class MyLine:RscText
{
style = ST_LINE;
Expand All @@ -491,7 +491,7 @@ class Cfg3DEN
y = SIZE_M * GRID_H * 12.4;
w = (((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W+SIZE_M)) * GRID_W);
};

class networkButton : RscButtonMenu
{
idc = 1502;
Expand All @@ -506,18 +506,18 @@ class Cfg3DEN
action = "['networkToggleButton',_this] call (uinamespace getvariable 'RadioChannels_script');";
tooltip = "Toggle through the radio networks.";
};

class Title1: Title0
{
text = "Channels of selected network:";
w = ((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W)/2) * GRID_W;
h = 1 * SIZE_M * GRID_H;
h = 1 * SIZE_M * GRID_H;
y = SIZE_M * GRID_H * 14;
x = SIZE_M * GRID_W;
colorBackground[] = {0,0,0,0};
tooltip = "";
};

class Title2 : Title1
{
text = "Entities present on selected channel:";
Expand Down Expand Up @@ -633,7 +633,7 @@ class Cfg3DEN
x = (((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W) - SIZE_M ) * GRID_W / 7)*3.9375 + SIZE_M * GRID_W;
action = "['channelDelClickCancel',_this] call (uinamespace getvariable 'RadioChannels_script');";
};

class EditChannelTitle : Title1
{
idc = 313201;
Expand All @@ -644,7 +644,7 @@ class Cfg3DEN
colorBackground[] = {0.1,0.1,0.1,1};
tooltip = "";
};

class EditChannelShortTitle : Title1
{
idc = 313202;
Expand Down Expand Up @@ -744,10 +744,10 @@ class Cfg3DEN
//style = ST_LEFT + ST_MULTI; // Style

checked = 0; // Default state

colorText[] = {COLOR_TEXT_RGBA}; // Text and frame color
colorSelect[] = {0,0,0,1}; // Text selection color
sizeEx = SIZEEX_PURISTA(SIZEEX_M); // Text size
sizeEx = SIZEEX_PURISTA_M; // Text size
font = FONT_NORMAL; // Font from CfgFontFamilies
shadow = 1; // Shadow (0 - none, 1 - directional, color affected by colorShadow, 2 - black outline)

Expand Down Expand Up @@ -812,10 +812,10 @@ class Cfg3DEN
onMouseHolding = "";

onCheckedChanged = "";

};
};
};

};
};
Loading