Skip to content

Commit

Permalink
Add more scriptName to KPLIB scripts for easier debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
veteran29 committed Oct 28, 2023
1 parent 5a52036 commit ed3b899
Show file tree
Hide file tree
Showing 34 changed files with 69 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Missionframework/scripts/client/misc/secondary_jip.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "secondary_jip";

waitUntil {
time > 20;
};
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/ai/add_defense_waypoints.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "add_defense_waypoints";

private _grp = _this select 0;
private _flagpos = _this select 1;
private _basepos = getpos (leader _grp);
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/ai/building_defence_ai.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "building_defence_ai";

params ["_unit", ["_sector", ""]];

_unit setUnitPos "UP";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "asymmetric_loop";

waitUntil {!isNil "KPLIB_saveLoaded"};
waitUntil {!isNil "KPLIB_civ_rep"};
waitUntil {KPLIB_saveLoaded};
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/base/huron_manager.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "huron_manager";

waitUntil {!isNil "KPLIB_saveLoaded"};
waitUntil {KPLIB_saveLoaded};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "counter_battle_group";

if (isNil "infantry_weight") then {infantry_weight = 33;};
if (isNil "armor_weight") then {armor_weight = 33;};
if (isNil "air_weight") then {air_weight = 33;};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "random_battlegroups";

sleep (900 / KPLIB_param_aggressivity);
private _sleeptime = 0;
while {KPLIB_param_aggressivity > 0.9 && KPLIB_endgame == 0} do {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "readiness_increase";

waitUntil {!isNil "KPLIB_saveLoaded" && {KPLIB_saveLoaded}};

while {true} do {
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/civinformant/civinfo_loop.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "civinfo_loop";

waitUntil {sleep 10; ({_x in KPLIB_sectors_city || _x in KPLIB_sectors_capital} count KPLIB_sectors_player) > 0};

if (KPLIB_civinfo_debug > 0) then {[format ["Loop spawned on: %1", debug_source], "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "apply_default_permissions";

if (!KPLIB_param_permissions) exitWith {};

waitUntil {!isNil "KPLIB_permissions"};
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/game/cleanup_vehicles.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "cleanup_vehicles";

private [ "_nextvehicle", "_nearestfob", "_reset_ticker" ];

_cleanup_classnames = [];
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/game/manage_time.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "manage_time";

while {true} do {
if (KPLIB_param_shorterNights && (daytime > 20 || daytime < 4)) then {
setTimeMultiplier (KPLIB_param_timeMulti * 4);
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/game/manage_weather.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "manage_weather";

private _weathers = [
[0.25],
[0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55],
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/game/playtime.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "KPLIB_playtime";

waitUntil { !isNil "KPLIB_saveLoaded" };
waitUntil { KPLIB_saveLoaded };

Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/game/server_restart.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "server_restart";

if (!isDedicated) exitWith {};

_serverDuration = (KPLIB_param_restart * 60 * 60);
Expand Down
4 changes: 4 additions & 0 deletions Missionframework/scripts/server/game/synchronise_eco.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
scriptName "synchronize_eco";

publicVariable "synchronise_eco";

sync_eco = []; publicVariable "sync_eco";

waitUntil{!isNil "KPLIB_saveLoaded"};
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/game/synchronise_vars.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "synchronise_vars";

sync_vars = []; publicVariable "sync_vars";

waitUntil{!isNil "KPLIB_saveLoaded"};
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/game/zeus_synchro.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "zeus_synchro";

waitUntil {!isNil "KPLIB_b_potato01"};

// Classnames of objects which should be added as editable for Zeus
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/offloading/group_diag.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "group_diag";

waitUntil {sleep 1; !isNil "KPLIB_sectors_active"};

while {true} do {
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/offloading/show_fps.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "show_fps";

private _sourcestr = "Server";
private _position = 0;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "manage_one_civilian_patrol";

private [ "_spawnsector", "_grp", "_usable_sectors", "_spawntype", "_civnumber", "_vehdriver", "_spawnpos", "_civveh", "_sectors_patrol",
"_patrol_startpos", "_waypoint", "_grpspeed", "_sectors_patrol_random", "_sectorcount", "_nextsector", "_nearestroad" ];

Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/patrols/manage_one_patrol.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "manage_one_patrol";

params [ "_minimum_readiness", "_is_infantry" ];
private [ "_headless_client" ];

Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/patrols/manage_patrols.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "manage_patrols";

_combat_triggers = [20,40,50,65,80,95];
if ( KPLIB_param_unitcap < 0.9 ) then { _combat_triggers = [20,45,90]; };
if ( KPLIB_param_unitcap > 1.3 ) then { _combat_triggers = [15,25,40,65,75,85,95]; };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "reinforcements_resetter";

_reset_time = 1800;

reinforcements_set = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "manage_logistics";

waitUntil {!isNil "KPLIB_saveLoaded"};
waitUntil {!isNil "KPLIB_logistics"};
waitUntil {KPLIB_saveLoaded};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "manage_resources";

waitUntil {!isNil "KPLIB_saveLoaded"};
waitUntil {!isNil "KPLIB_production"};
waitUntil {KPLIB_saveLoaded};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "recalculate_resources";

waitUntil {!isNil "KPLIB_saveLoaded"};
waitUntil {KPLIB_saveLoaded};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "recalculate_timer";

waitUntil { !isNil "KPLIB_saveLoaded" };
waitUntil {KPLIB_saveLoaded};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "recalculate_timer_sector";

waitUntil {!isNil "KPLIB_saveLoaded"};
waitUntil {KPLIB_saveLoaded};

Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/resources/unit_cap.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "unit_cap";

unitcap = 0;
KPLIB_heli_count = 0;
KPLIB_plane_count = 0;
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/server/sector/lose_sectors.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "lose_sectors";

waitUntil { !isNil "KPLIB_sectors_fob" };
waitUntil { !isNil "KPLIB_sectors_player" };

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
scriptName "manage_one_sector";
// base amount of sector lifetime tickets
// if there are no enemies one ticket is removed every SECTOR_TICK_TIME seconds
// 12 * 5 = 60s by default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "wait_to_spawn_sector";

params ["_sector", "_opforcount"];

private _start = diag_tickTime;
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/shared/diagnostics.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scriptName "KPLIB_diagnostics";

private _source = "";

["------------------------------------", "MISSIONSTART"] call KPLIB_fnc_log;
Expand Down

0 comments on commit ed3b899

Please sign in to comment.