Always fetch params by using "BIS_fnc_getParamValue"

If statement checking if mission is run on server is unnecessary, bis function works on singleplayer and will return correct values in SP enviroment
This commit is contained in:
Filip Maciejewski 2018-01-27 18:51:29 +01:00
parent 89d6de65b1
commit 07f74566c4
1 changed files with 43 additions and 89 deletions

View File

@ -1,92 +1,46 @@
if ( isMultiplayer ) then {
GRLIB_difficulty_modifier = ["Difficulty",2] call bis_fnc_getParamValue;
GRLIB_time_factor = ["DayDuration",12] call bis_fnc_getParamValue;
GRLIB_resources_multiplier = ["ResourcesMultiplier",3] call bis_fnc_getParamValue;
GRLIB_fatigue = ["Fatigue",1] call bis_fnc_getParamValue;
GRLIB_introduction = ["Introduction",1] call bis_fnc_getParamValue;
GRLIB_deployment_cinematic = ["DeploymentCinematic",1] call bis_fnc_getParamValue;
GRLIB_unitcap = ["Unitcap",2] call bis_fnc_getParamValue;
GRLIB_adaptive_opfor = ["AdaptToPlayercount",1] call bis_fnc_getParamValue;
GRLIB_civilian_activity = ["civilians",1] call bis_fnc_getParamValue;
GRLIB_teamkill_penalty = ["TeamkillPenalty",0] call bis_fnc_getParamValue;
GRLIB_build_first_fob = ["FirstFob",0] call bis_fnc_getParamValue;
GRLIB_param_wipe_savegame_1 = ["WipeSave1",0] call bis_fnc_getParamValue;
GRLIB_param_wipe_savegame_2 = ["WipeSave2",0] call bis_fnc_getParamValue;
GRLIB_permissions_param = ["Permissions",1] call bis_fnc_getParamValue;
GRLIB_halo_param = ["HaloJump",1] call bis_fnc_getParamValue;
GRLIB_use_whitelist = ["Whitelist",0] call bis_fnc_getParamValue;
GRLIB_cleanup_vehicles = ["CleanupVehicles",2] call bis_fnc_getParamValue;
GRLIB_csat_aggressivity = ["Aggressivity",2] call bis_fnc_getParamValue;
GRLIB_weather_param = ["Weather",3] call bis_fnc_getParamValue;
GRLIB_shorter_nights = ["ShorterNights",0] call bis_fnc_getParamValue;
GRLIB_remote_sensors = 0;
GRLIB_blufor_defenders = [ "BluforDefenders",1] call bis_fnc_getParamValue;
GRLIB_autodanger = [ "Autodanger",0] call bis_fnc_getParamValue;
GRLIB_maximum_fobs = [ "MaximumFobs",26] call bis_fnc_getParamValue;
GRLIB_max_squad_size = ["MaxSquadSize",10] call bis_fnc_getParamValue;
KP_liberation_arsenalUsePreset = ["ArsenalUsePreset",1] call BIS_fnc_getParamValue;
KP_liberation_mapmarkers = ["MapMarkers",1] call bis_fnc_getParamValue;
KP_liberation_mobilerespawn = ["MobileRespawn",1] call bis_fnc_getParamValue;
KP_liberation_mobilearsenal = ["MobileArsenal",1] call bis_fnc_getParamValue;
KP_liberation_ailogistics = ["AiLogistics",1] call bis_fnc_getParamValue;
// Arty Supp deactivated for now - KP_liberation_suppMod_enb = ["SuppMod",1] call BIS_fnc_getParamValue;
KP_liberation_restart = ["ServerRestart",0] call BIS_fnc_getParamValue;
KP_liberation_cr_param_buildings = ["CR_Building",0] call BIS_fnc_getParamValue;
KP_liberation_civinfo_debug = ["DebugCivInfo",0] call bis_fnc_getParamValue;
KP_liberation_civrep_debug = ["DebugCivRep",0] call bis_fnc_getParamValue;
KP_liberation_savegame_debug = ["DebugSave",0] call bis_fnc_getParamValue;
KP_liberation_asymmetric_debug = ["DebugAsymmetric",0] call bis_fnc_getParamValue;
KP_liberation_logistic_debug = ["DebugLogistic",0] call bis_fnc_getParamValue;
KP_liberation_sectorspawn_debug = ["DebugSectorSpawn",0] call bis_fnc_getParamValue;
KP_liberation_kill_debug = ["DebugKill",0] call bis_fnc_getParamValue;
KP_liberation_production_debug = ["DebugProduction",0] call bis_fnc_getParamValue;
KP_liberation_respawn_cooldown = ["RespawnCooldown",900] call bis_fnc_getParamValue;
KP_liberation_clear_cargo = ["ClearCargo",1] call bis_fnc_getParamValue;
} else {
GRLIB_difficulty_modifier = 2;
GRLIB_time_factor = 12;
GRLIB_resources_multiplier = 3;
GRLIB_fatigue = 1;
GRLIB_introduction = 1;
GRLIB_deployment_cinematic = 1;
GRLIB_adaptive_opfor = 1;
GRLIB_unitcap = 2;
GRLIB_civilian_activity = 1;
GRLIB_teamkill_penalty = 0;
GRLIB_build_first_fob = 0;
GRLIB_param_wipe_savegame_1 = 0;
GRLIB_param_wipe_savegame_2 = 0;
GRLIB_permissions_param = 0;
GRLIB_halo_param = 1;
GRLIB_use_whitelist = 0;
GRLIB_cleanup_vehicles = 2;
GRLIB_csat_aggressivity = 2;
GRLIB_weather_param = 3;
GRLIB_shorter_nights = 0;
GRLIB_remote_sensors = 0;
GRLIB_blufor_defenders = 1;
GRLIB_autodanger = 0;
GRLIB_maximum_fobs = 26;
GRLIB_max_squad_size = 10;
KP_liberation_arsenalUsePreset = 1;
KP_liberation_mapmarkers = 1;
KP_liberation_mobilerespawn = 1;
KP_liberation_mobilearsenal = 1;
KP_liberation_ailogistics = 1;
// Arty Supp deactivated for now - KP_liberation_suppMod_enb = 1;
KP_liberation_restart = 0;
KP_liberation_cr_param_buildings = 0;
KP_liberation_civinfo_debug = 0;
KP_liberation_civrep_debug = 0;
KP_liberation_savegame_debug = 0;
KP_liberation_asymmetric_debug = 0;
KP_liberation_logistic_debug = 0;
KP_liberation_sectorspawn_debug = 0;
KP_liberation_kill_debug = 0;
KP_liberation_production_debug = 0;
KP_liberation_respawn_cooldown = 900;
KP_liberation_clear_cargo = 1;
};
GRLIB_difficulty_modifier = ["Difficulty",2] call bis_fnc_getParamValue;
GRLIB_time_factor = ["DayDuration",12] call bis_fnc_getParamValue;
GRLIB_resources_multiplier = ["ResourcesMultiplier",3] call bis_fnc_getParamValue;
GRLIB_fatigue = ["Fatigue",1] call bis_fnc_getParamValue;
GRLIB_introduction = ["Introduction",1] call bis_fnc_getParamValue;
GRLIB_deployment_cinematic = ["DeploymentCinematic",1] call bis_fnc_getParamValue;
GRLIB_unitcap = ["Unitcap",2] call bis_fnc_getParamValue;
GRLIB_adaptive_opfor = ["AdaptToPlayercount",1] call bis_fnc_getParamValue;
GRLIB_civilian_activity = ["civilians",1] call bis_fnc_getParamValue;
GRLIB_teamkill_penalty = ["TeamkillPenalty",0] call bis_fnc_getParamValue;
GRLIB_build_first_fob = ["FirstFob",0] call bis_fnc_getParamValue;
GRLIB_param_wipe_savegame_1 = ["WipeSave1",0] call bis_fnc_getParamValue;
GRLIB_param_wipe_savegame_2 = ["WipeSave2",0] call bis_fnc_getParamValue;
GRLIB_permissions_param = ["Permissions",1] call bis_fnc_getParamValue;
GRLIB_halo_param = ["HaloJump",1] call bis_fnc_getParamValue;
GRLIB_use_whitelist = ["Whitelist",0] call bis_fnc_getParamValue;
GRLIB_cleanup_vehicles = ["CleanupVehicles",2] call bis_fnc_getParamValue;
GRLIB_csat_aggressivity = ["Aggressivity",2] call bis_fnc_getParamValue;
GRLIB_weather_param = ["Weather",3] call bis_fnc_getParamValue;
GRLIB_shorter_nights = ["ShorterNights",0] call bis_fnc_getParamValue;
GRLIB_remote_sensors = 0;
GRLIB_blufor_defenders = ["BluforDefenders",1] call bis_fnc_getParamValue;
GRLIB_autodanger = ["Autodanger",0] call bis_fnc_getParamValue;
GRLIB_maximum_fobs = ["MaximumFobs",26] call bis_fnc_getParamValue;
GRLIB_max_squad_size = ["MaxSquadSize",10] call bis_fnc_getParamValue;
KP_liberation_arsenalUsePreset = ["ArsenalUsePreset",1] call BIS_fnc_getParamValue;
KP_liberation_mapmarkers = ["MapMarkers",1] call bis_fnc_getParamValue;
KP_liberation_mobilerespawn = ["MobileRespawn",1] call bis_fnc_getParamValue;
KP_liberation_mobilearsenal = ["MobileArsenal",1] call bis_fnc_getParamValue;
KP_liberation_ailogistics = ["AiLogistics",1] call bis_fnc_getParamValue;
// Arty Supp deactivated for now - KP_liberation_suppMod_enb = ["SuppMod",1] call BIS_fnc_getParamValue;
KP_liberation_restart = ["ServerRestart",0] call BIS_fnc_getParamValue;
KP_liberation_cr_param_buildings = ["CR_Building",0] call BIS_fnc_getParamValue;
KP_liberation_civinfo_debug = ["DebugCivInfo",0] call bis_fnc_getParamValue;
KP_liberation_civrep_debug = ["DebugCivRep",0] call bis_fnc_getParamValue;
KP_liberation_savegame_debug = ["DebugSave",0] call bis_fnc_getParamValue;
KP_liberation_asymmetric_debug = ["DebugAsymmetric",0] call bis_fnc_getParamValue;
KP_liberation_logistic_debug = ["DebugLogistic",0] call bis_fnc_getParamValue;
KP_liberation_sectorspawn_debug = ["DebugSectorSpawn",0] call bis_fnc_getParamValue;
KP_liberation_kill_debug = ["DebugKill",0] call bis_fnc_getParamValue;
KP_liberation_production_debug = ["DebugProduction",0] call bis_fnc_getParamValue;
KP_liberation_respawn_cooldown = ["RespawnCooldown",900] call bis_fnc_getParamValue;
KP_liberation_clear_cargo = ["ClearCargo",1] call bis_fnc_getParamValue;
if (GRLIB_fatigue < 0.1) then {GRLIB_fatigue = false} else {GRLIB_fatigue = true};
if (GRLIB_introduction == 1) then {GRLIB_introduction = true} else {GRLIB_introduction = false};