big refactor, WIP!
This commit is contained in:
16
framework/init/functions/fn_addAARChatHandler.sqf
Normal file
16
framework/init/functions/fn_addAARChatHandler.sqf
Normal file
@@ -0,0 +1,16 @@
|
||||
[
|
||||
"saveaar",
|
||||
{
|
||||
[] remoteExec["ocap_fnc_exportData", 2];
|
||||
},
|
||||
"admin"
|
||||
] call CBA_fnc_registerChatCommand;
|
||||
|
||||
[
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
"OCAP chat handler registered",
|
||||
[player] call EFUNC(common,addPlayerInfoToArray)
|
||||
] call EFUNC(common,log);
|
||||
|
||||
nil;
|
||||
31
framework/init/functions/fn_addRespawnChatHandler.sqf
Normal file
31
framework/init/functions/fn_addRespawnChatHandler.sqf
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
[
|
||||
"respawn",
|
||||
{
|
||||
_clientID = _thisArgs select 0;
|
||||
player setDamage 1;
|
||||
|
||||
// log to server RPT
|
||||
[
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
"CHAT COMMAND RESPAWN",
|
||||
[player] call EFUNC(common,addPlayerInfoToArray)
|
||||
] remoteExec [QEFUNC(common,log), 2];
|
||||
|
||||
// systemChat to all remote machines
|
||||
format["%1 claims they were glitched and respawned (%2)", name player, netID player] remoteExec["systemChat", -_clientID];
|
||||
},
|
||||
"all",
|
||||
[clientOwner]
|
||||
] call CBA_fnc_registerChatCommand;
|
||||
|
||||
[
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
"Respawn chat handler registered",
|
||||
[player] call EFUNC(common,addPlayerInfoToArray)
|
||||
] call EFUNC(common,log);
|
||||
|
||||
nil;
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
if ( !hasInterface ) exitWith {};
|
||||
|
||||
if (!isServer) then {
|
||||
@@ -11,4 +13,11 @@ if (!isServer) then {
|
||||
|
||||
["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups;
|
||||
|
||||
[
|
||||
LEVEL_DEBUG,
|
||||
QUOTE(COMPONENT),
|
||||
"postInit complete",
|
||||
[]
|
||||
] call EFUNC(common,log);
|
||||
|
||||
nil;
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
|
||||
// array of all respawn modules in the mission representing "bases"
|
||||
GVARMAIN(baseObjects) = allMissionObjects "ModuleRespawnPosition_F";
|
||||
publicVariable "milsim_baseObjects";
|
||||
|
||||
@@ -16,11 +18,18 @@ publicVariable "milsim_baseObjects";
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
missionNamespace setVariable [QGVARMAIN(complete), true];
|
||||
publicVariable QGVARMAIN(complete);
|
||||
|
||||
[
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
format["%1: version %2", QGVARMAIN(complete), QUOTE(VERSION_STR)],
|
||||
[["version", QUOTE(VERSION_STR)]]
|
||||
] call EFUNC(util,log);
|
||||
] call EFUNC(common,log);
|
||||
|
||||
publicVariable "milsim_complete";
|
||||
[
|
||||
LEVEL_DEBUG,
|
||||
QUOTE(COMPONENT),
|
||||
"postInit complete",
|
||||
[]
|
||||
] call EFUNC(common,log);
|
||||
34
framework/init/functions/fn_setDefaults.sqf
Normal file
34
framework/init/functions/fn_setDefaults.sqf
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
enableSaving[false, false];
|
||||
|
||||
enableRadio false;
|
||||
enableSentences false;
|
||||
|
||||
missionNamespace setVariable ["ACE_maxWeightDrag", 2400];
|
||||
missionNamespace setVariable ["ACE_maxWeightCarry", 1800];
|
||||
|
||||
if(isClass(configfile >> "CfgPatches" >> "rhs_main")) then {
|
||||
rhs_vehicleRadioChatter = 0;
|
||||
};
|
||||
|
||||
waitUntil {time > 0};
|
||||
|
||||
enableEnvironment[false, true];
|
||||
|
||||
[
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
"Defaults set",
|
||||
[
|
||||
["enableSaving", [false, false]],
|
||||
["enableRadio", false],
|
||||
["enableSentences", false],
|
||||
["ACE_maxWeightDrag", 2400],
|
||||
["ACE_maxWeightCarry", 1800],
|
||||
["rhs_vehicleRadioChatter", 0],
|
||||
["enableEnvironment", [false, true]]
|
||||
]
|
||||
] call EFUNC(common,log);
|
||||
|
||||
nil;
|
||||
Reference in New Issue
Block a user