adds default bases + allows mms to set custom waypoints for microdagr #26

Merged
hizumi merged 3 commits from add-microdagr-waypoints into develop 2024-02-14 01:53:10 -06:00
4 changed files with 30 additions and 8 deletions
Showing only changes of commit 9f89ec12d5 - Show all commits

View File

@@ -26,7 +26,6 @@ class DOUBLES(PREFIX,client) {
class initClient {};
class addMicroDAGRWaypoints {};
class addZenModules {};
IndigoFox marked this conversation as resolved
Review

regression introduced here with bindEmptyGroupGarbageCleanup on my part due to naming convention.
postInit = 1 was to allow running on all machine, as technically the server is a client; needs to be executed on both clients and server for due to locality issues on failed ownership transfers

regression introduced here with bindEmptyGroupGarbageCleanup on my part due to naming convention. postInit = 1 was to allow running on all machine, as technically the server is a client; needs to be executed on both clients and server for due to locality issues on failed ownership transfers
Review

moved to performance module and is now managed with global setting & removal/reapply on setting change

moved to performance module and is now managed with global setting & removal/reapply on setting change
class bindEmptyGroupGarbageCleanup {};
class bindEventHandlers {};
class bindVehicleActions {};
};
@@ -106,13 +105,14 @@ class DOUBLES(PREFIX,performance) {
class functions {
file = "framework\performance\functions";
class addCBASettings {preInit=1;};
class addDNI_PlayerFPS { postInit = 1; };
class addDNI_PlayerFPS {postInit = 1;};
// PFHs managed in addCBASettings onChange code
class addClientStatsPFH {};
class calculateClientStats {};
class addServerStatsPFH {};
class calculateServerStats {};
class addEmptyGroupCleanupPFH {};
};
};

View File

@@ -5,7 +5,6 @@ if (!hasInterface) exitWith {};
call FUNC(addMicroDAGRWaypoints);
call FUNC(addZenModules);
call FUNC(bindEmptyGroupGarbageCleanup);
call FUNC(bindEventHandlers);
call FUNC(bindVehicleActions);

View File

@@ -1,5 +1,27 @@
#include "..\script_component.hpp"
[
QGVAR(emptyGroupCleanup_enable),
"CHECKBOX",
"Empty Group Cleanup Enabled",
[QUOTE(SETTINGS_GROUP_NAME), QUOTE(COMPONENT_BEAUTIFIED)],
true,
true,
{
params ["_value"];
[
QGVAR(emptyGroupCleanup_enable),
_value
] call EFUNC(common,logSettingChanged);
if (!isNull (missionNamespace getVariable [QGVAR(emptyGroupCleanupPFH), locationNull])) then {
deleteLocation GVAR(emptyGroupCleanupPFH);
};
call FUNC(addEmptyGroupCleanupPFH);
}
] call CBA_fnc_addSetting;
//---------------------
// Server CPS
//---------------------

View File

@@ -7,7 +7,7 @@
[]
] call EFUNC(common,log);
_emptyGroupPFH = [
GVAR(emptyGroupCleanupPFH) = [
{
{
if (local _x) then {
@@ -19,7 +19,7 @@ _emptyGroupPFH = [
},
300,
[],
{
{ // on creation
[
LEVEL_INFO,
QUOTE(COMPONENT),
@@ -27,15 +27,16 @@ _emptyGroupPFH = [
[]
] call EFUNC(common,log);
},
{ [
{ // on deletion
[
LEVEL_INFO,
QUOTE(COMPONENT),
"Empty group deletion PFH unloaded",
[]
] call EFUNC(common,log);
},
{ true },
{ false },
{ (missionNamespace getVariable [QGVAR(emptyGroupCleanup_enable), false]) },
{ not (missionNamespace getVariable [QGVAR(emptyGroupCleanup_enable), false]) },
[]
] call CBA_fnc_createPerFrameHandlerObject;