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

Move bush and grass cutter to own component #96

Merged
merged 6 commits into from
Mar 12, 2023
Merged
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ releases/*
keys/*
.hemtt/local
####

.vscode/
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@

## Components:
- **Armory**: Allows you to save and load loadouts from a database across all server and missions.
- **Common**: Grass and bush cutter ACE action and chat commands for logged in admins.
- **Common**: Chat commands for logged in admins.
- **Cords**: Cords for PBW uniforms (BW Kleiderkammer).
- **Cutter**: Grass and bush cutter ACE actions allowing to remove grass and bushes.
- **Drill**: Animation and actions for exercise.
- **Engineer**: Equipment for engineers like a Mine Clearing Line Charge (MICLIC).
- **Items**: Flags in different colors and markers/signs which are carryable and placable.
Expand Down
3 changes: 0 additions & 3 deletions addons/common/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
PREP(addBushCutter);
PREP(addChatCommands);
PREP(addGrassCutter);
PREP(areModsLoaded);
PREP(arsenalPBWFix);
PREP(parseNameToPlayer);
PREP(seesBush);
2 changes: 0 additions & 2 deletions addons/common/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include "script_component.hpp"

call FUNC(addBushCutter);
call FUNC(addGrassCutter);
call FUNC(arsenalPBWFix);
call FUNC(addChatCommands);
6 changes: 0 additions & 6 deletions addons/common/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,4 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;

// Print version to rpt log
private _version = getText (configFile >> "CfgPatches" >> "mts_main" >> "versionStr");
INFO_1("Metis Enhanced version: %1.", _version);

#include "initSettings.hpp"

ADDON = true;
2 changes: 1 addition & 1 deletion addons/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class CfgPatches {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"mts_main", "ace_common", "ace_interact_menu"};
requiredAddons[] = {"mts_main", "ace_common"};
author = ECSTRING(main,authors);
authors[] = {"PhILoX", "Timi007"};
url = ECSTRING(main,URL);
Expand Down
68 changes: 0 additions & 68 deletions addons/common/stringtable.xml
Original file line number Diff line number Diff line change
@@ -1,74 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="mts">
<Package name="common">
<Container name="Grasscutter">
<Key ID="STR_mts_common_grasscutter_subCategory">
<Original>Grass cutter</Original>
<German>Grasschneider</German>
</Key>
<Key ID="STR_mts_common_grasscutter">
<Original>Add grass cutter</Original>
<German>Grasschneider hinzufügen</German>
</Key>
<Key ID="STR_mts_common_grasscutter_tooltip">
<Original>Adds the grass cutter to ACE interaction menu.</Original>
<German>Fügt den Grasschneider zu dem ACE Interaktionmenu hinzu.</German>
</Key>
<Key ID="STR_mts_common_grasscutter_removeGrass">
<Original>Remove grass</Original>
<German>Gras entfernen</German>
</Key>
<Key ID="STR_mts_common_grasscutter_size">
<Original>Grass cutter size</Original>
<German>Grasschneidergröße</German>
</Key>
<Key ID="STR_mts_common_grasscutter_size_tooltip">
<Original>Changes the size of the grass cutter.</Original>
<German>Ändert die Größe des Grasschneiders.</German>
</Key>
<Key ID="STR_mts_common_grasscutter_size_large">
<Original>Large</Original>
<German>Groß</German>
</Key>
<Key ID="STR_mts_common_grasscutter_size_medium">
<Original>Medium</Original>
<German>Mittel</German>
</Key>
<Key ID="STR_mts_common_grasscutter_duration">
<Original>Duration</Original>
<German>Dauer</German>
</Key>
<Key ID="STR_mts_common_grasscutter_duration_tooltip">
<Original>Time it takes in seconds to remove grass.</Original>
<German>Zeit in Sekunden, um Gras zu enfernen.</German>
</Key>
</Container>
<Container name="Bushcutter">
<Key ID="STR_mts_common_bushcutter_subCategory">
<Original>Bush cutter</Original>
<German>Buschschere</German>
</Key>
<Key ID="STR_mts_common_bushcutter">
<Original>Add bush cutter</Original>
<German>Buschschere hinzufügen</German>
</Key>
<Key ID="STR_mts_common_bushcutter_tooltip">
<Original>Adds the bush cutter to ACE interaction menu.</Original>
<German>Fügt die Buschschere zu dem ACE Interaktionmenu hinzu.</German>
</Key>
<Key ID="STR_mts_common_bushcutter_removeBush">
<Original>Remove bush</Original>
<German>Busch entfernen</German>
</Key>
<Key ID="STR_mts_common_bushcutter_duration">
<Original>Duration</Original>
<German>Dauer</German>
</Key>
<Key ID="STR_mts_common_bushcutter_duration_tooltip">
<Original>Time it takes in seconds to remove a bush.</Original>
<German>Zeit in Sekunden, um einen Busch zu enfernen.</German>
</Key>
</Container>
<Container name="chatCommands">
<Key ID="STR_mts_common_chatCommands_zeusCreated">
<Original>You can now use zeus.</Original>
Expand Down
1 change: 1 addition & 0 deletions addons/cutter/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
z\mts_enhanced\addons\cutter
17 changes: 17 additions & 0 deletions addons/cutter/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};

class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};

class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
3 changes: 3 additions & 0 deletions addons/cutter/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PREP(addBushCutter);
PREP(addGrassCutter);
PREP(seesBush);
4 changes: 4 additions & 0 deletions addons/cutter/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "script_component.hpp"

call FUNC(addBushCutter);
call FUNC(addGrassCutter);
11 changes: 11 additions & 0 deletions addons/cutter/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include "script_component.hpp"

ADDON = false;

PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;

#include "initSettings.hpp"

ADDON = true;
3 changes: 3 additions & 0 deletions addons/cutter/XEH_preStart.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "script_component.hpp"

#include "XEH_PREP.hpp"
17 changes: 17 additions & 0 deletions addons/cutter/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"mts_main", "ace_common", "ace_interact_menu"};
author = ECSTRING(main,authors);
authors[] = {"PhILoX", "Timi007"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

#include "CfgEventHandlers.hpp"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Nothing
*
* Example:
* call mts_common_fnc_addBushCutter
* call mts_cutter_fnc_addBushCutter
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Nothing
*
* Example:
* call mts_common_fnc_addGrassCutter
* call mts_cutter_fnc_addGrassCutter
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* OBJECT - Bush that the given unit sees or objNull if there is no bush.
*
* Example:
* [player] call mts_common_fnc_seesBush;
* [player] call mts_cutter_fnc_seesBush;
*
*/

Expand Down
1 change: 1 addition & 0 deletions addons/cutter/functions/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "\z\mts_enhanced\addons\cutter\script_component.hpp"
File renamed without changes.
19 changes: 19 additions & 0 deletions addons/cutter/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#define COMPONENT cutter
#define COMPONENT_BEAUTIFIED Cutter
#include "\z\mts_enhanced\addons\main\script_mod.hpp"

// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS

#ifdef DEBUG_ENABLED_CUTTER
#define DEBUG_MODE_FULL
#endif

#ifdef DEBUG_SETTINGS_CUTTER
#define DEBUG_SETTINGS DEBUG_SETTINGS_CUTTER
#endif

#include "\z\mts_enhanced\addons\main\script_macros.hpp"

#define BUSH_CUTTING_DISTANCE 2
73 changes: 73 additions & 0 deletions addons/cutter/stringtable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="mts">
<Package name="cutter">
<Container name="Grasscutter">
<Key ID="STR_mts_cutter_grasscutter_subCategory">
<Original>Grass cutter</Original>
<German>Grasschneider</German>
</Key>
<Key ID="STR_mts_cutter_grasscutter">
<Original>Add grass cutter</Original>
<German>Grasschneider hinzufügen</German>
</Key>
<Key ID="STR_mts_cutter_grasscutter_tooltip">
<Original>Adds the grass cutter to ACE interaction menu.</Original>
<German>Fügt den Grasschneider zu dem ACE Interaktionmenu hinzu.</German>
</Key>
<Key ID="STR_mts_cutter_grasscutter_removeGrass">
<Original>Remove grass</Original>
<German>Gras entfernen</German>
</Key>
<Key ID="STR_mts_cutter_grasscutter_size">
<Original>Grass cutter size</Original>
<German>Grasschneidergröße</German>
</Key>
<Key ID="STR_mts_cutter_grasscutter_size_tooltip">
<Original>Changes the size of the grass cutter.</Original>
<German>Ändert die Größe des Grasschneiders.</German>
</Key>
<Key ID="STR_mts_cutter_grasscutter_size_large">
<Original>Large</Original>
<German>Groß</German>
</Key>
<Key ID="STR_mts_cutter_grasscutter_size_medium">
<Original>Medium</Original>
<German>Mittel</German>
</Key>
<Key ID="STR_mts_cutter_grasscutter_duration">
<Original>Duration</Original>
<German>Dauer</German>
</Key>
<Key ID="STR_mts_cutter_grasscutter_duration_tooltip">
<Original>Time it takes in seconds to remove grass.</Original>
<German>Zeit in Sekunden, um Gras zu enfernen.</German>
</Key>
</Container>
<Container name="Bushcutter">
<Key ID="STR_mts_cutter_bushcutter_subCategory">
<Original>Bush cutter</Original>
<German>Buschschere</German>
</Key>
<Key ID="STR_mts_cutter_bushcutter">
<Original>Add bush cutter</Original>
<German>Buschschere hinzufügen</German>
</Key>
<Key ID="STR_mts_cutter_bushcutter_tooltip">
<Original>Adds the bush cutter to ACE interaction menu.</Original>
<German>Fügt die Buschschere zu dem ACE Interaktionmenu hinzu.</German>
</Key>
<Key ID="STR_mts_cutter_bushcutter_removeBush">
<Original>Remove bush</Original>
<German>Busch entfernen</German>
</Key>
<Key ID="STR_mts_cutter_bushcutter_duration">
<Original>Duration</Original>
<German>Dauer</German>
</Key>
<Key ID="STR_mts_cutter_bushcutter_duration_tooltip">
<Original>Time it takes in seconds to remove a bush.</Original>
<German>Zeit in Sekunden, um einen Busch zu enfernen.</German>
</Key>
</Container>
</Package>
</Project>
5 changes: 5 additions & 0 deletions addons/main/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
5 changes: 5 additions & 0 deletions addons/main/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "script_component.hpp"

// Print version to rpt log
private _version = getText (configFile >> "CfgPatches" >> QUOTE(ADDON) >> "versionStr");
INFO_1("Metis Enhanced version: %1.", _version);
3 changes: 3 additions & 0 deletions addons/main/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ class CfgSettings {
};
};
};


#include "CfgEventHandlers.hpp"