Merge branch 'develop' into track-unconscious-duration-in-respawn-msg

This commit is contained in:
2024-02-14 01:58:47 -06:00
5 changed files with 92 additions and 8 deletions

View File

@@ -0,0 +1,62 @@
name: Generate testing snapshot
on:
push:
branches: [develop]
jobs:
Clean:
name: Create testing release
runs-on: windows
steps:
- name: Diagnostics
run: |
echo "repository: ${{ gitea.repository }}"
echo "ref: ${{ gitea.ref }}"
echo "ref_name: ${{ gitea.ref_name }}"
echo "api_url: ${{ gitea.api_url }}"
echo "workflow: ${{ gitea.workflow }}"
- name: Checkout framework
uses: actions/checkout@v3
with:
path: MissionFramework
- name: Clean framework
run: |
Remove-Item -Recurse MissionFramework\aaFrameworkUtils
Remove-Item -Recurse MissionFramework\framework\x
Remove-Item -Recurse MissionFramework\.git*
- name: Backup artifacts from runner
uses: actions/upload-artifact@v3
with:
name: framework-test-snapshot
path: MissionFramework
- name: Create archive
run: Compress-Archive MissionFramework framework-test-snapshot.zip
- name: Delete old testing-release release
run: |
$headers = @{
"accept" = "application/json"
"Authorization" = "token ${{secrets.RELEASE_TOKEN}}"
}
Invoke-WebRequest -Uri "${{ gitea.api_url }}/repos/${{ gitea.repository }}/releases/tags/testing-release" -Method Delete -Headers $headers
- name: Delete old testing-release tag
run: |
$headers = @{
"accept" = "application/json"
"Authorization" = "token ${{secrets.RELEASE_TOKEN}}"
}
Invoke-WebRequest -Uri "${{ gitea.api_url }}/repos/${{ gitea.repository }}/tags/testing-release" -Method Delete -Headers $headers
- name: Create new testing-release
uses: https://gitea.com/actions/gitea-release-action@v1.1.6
with:
tag_name: 'testing-release'
name: 'testing-release'
prerelease: true
files: |-
framework-test-snapshot.zip

View File

@@ -26,7 +26,6 @@ class DOUBLES(PREFIX,client) {
class initClient {}; class initClient {};
class addMicroDAGRWaypoints {}; class addMicroDAGRWaypoints {};
class addZenModules {}; class addZenModules {};
class bindEmptyGroupGarbageCleanup {};
class bindEventHandlers {}; class bindEventHandlers {};
class bindUnconsciousListener {}; class bindUnconsciousListener {};
class bindVehicleActions {}; class bindVehicleActions {};
@@ -107,13 +106,14 @@ class DOUBLES(PREFIX,performance) {
class functions { class functions {
file = "framework\performance\functions"; file = "framework\performance\functions";
class addCBASettings {preInit=1;}; class addCBASettings {preInit=1;};
class addDNI_PlayerFPS { postInit = 1; }; class addDNI_PlayerFPS {postInit = 1;};
// PFHs managed in addCBASettings onChange code // PFHs managed in addCBASettings onChange code
class addClientStatsPFH {}; class addClientStatsPFH {};
class calculateClientStats {}; class calculateClientStats {};
class addServerStatsPFH {}; class addServerStatsPFH {};
class calculateServerStats {}; class calculateServerStats {};
class addEmptyGroupCleanupPFH {};
}; };
}; };

View File

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

View File

@@ -1,5 +1,27 @@
#include "..\script_component.hpp" #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 // Server CPS
//--------------------- //---------------------

View File

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