Skip to content

Commit

Permalink
Merge pull request #17 from Apricot-ale/v0.96.8-APR
Browse files Browse the repository at this point in the history
change dev and stable
  • Loading branch information
Apricot-ale authored Jun 24, 2024
2 parents 5573404 + 6f152ef commit 8d745b2
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 11 deletions.
69 changes: 61 additions & 8 deletions Missionframework/KPLIB_classnameLists.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@

// Vehicle classnames which should be ignored on kp_fuel_consumption.
kp_fuel_ignore_vehicles = [
"gm_ge_army_bicycle_01_oli"
"gm_ge_army_bicycle_01_oli",
"C_Cher90s_Civ_Bike",
"RDS_MMT_Civ_01",
"vn_c_bicycle_01",
"vn_c_bicycle_02",
"RDS_Old_bike_Civ_01",
"rhsgref_hidf_canoe"
];

// Vehicle classnames which also function as ACE medical vehicles.
Expand All @@ -38,15 +44,18 @@ KPLIB_medical_vehicles = [
"CUP_O_BMP2_AMB_sla",
"CUP_O_LR_Ambulance_TKA",
"CUP_O_M113_Med_TKA",
"gm_gc_airforce_mi2sr",
"gm_gc_army_ural375d_medic_win",
"gm_gc_army_ural375d_medic",
"gm_ge_airforce_do28d2_medevac",
"gm_ge_army_u1300l_medic_win_rc",
"gm_ge_army_u1300l_medic",
"I_E_Truck_02_Medical_F",
"I_E_Van_02_medevac_F",
"O_T_Truck_03_medical_ghex_F",
"O_Truck_03_medical_F",
"RHS_UH60M_MEV_d",
"rhs_gaz66_ap2_vmf",
"RHS_UH60M_MEV",
"RHS_UH60M_MEV2_d",
"RHS_UH60M_MEV2",
Expand All @@ -61,15 +70,31 @@ KPLIB_medical_vehicles = [
"uns_ch47a_medevac",
"uns_H13_medevac_CAV",
"uns_M577_amb",
"uns_uh1D_med"
"uns_uh1D_med",
"vn_b_air_uh1d_01_01",
"C_Cher90s_Civ_Amb",
"vn_b_wheeled_m54_repair_airport"
];

// Building classnames which also function as ACE medical facilities.
KPLIB_medical_facilities = [
"Land_Medevac_house_V1_F",
"Land_Medevac_HQ_V1_F",
"Land_MedicalTent_01_tropic_closed_F",
"Land_PartyTent_01_F",
"LAND_uns_army_med",
"LAND_uns_tent3mash",
"Land_tent_east",
"CampEast_EP1",
"Land_vn_tent_mash_01_01",
"Land_vn_tent_mash_01_02",
"Land_vn_tent_mash_01_03",
"Land_vn_tent_mash_01_04",
"Land_vn_tent_mash_01",
"Land_vn_tent_mash_02_01",
"Land_vn_tent_mash_02_02",
"Land_vn_tent_mash_02_03",
"Land_vn_tent_mash_02_04",
"uns_mash_main",
"uns_mash",
"US_Tent_2",
Expand All @@ -91,6 +116,7 @@ KPLIB_aiResupplySources = [
"B_Slingload_01_Ammo_F",
"B_T_APC_Tracked_01_CRV_F",
"B_T_Truck_01_ammo_F",
"Misc_Cargo1B_military",
"B_Truck_01_ammo_F",
"BW_LKW15T_Ammo_F",
"CUP_B_Kamaz_Reammo_CDF",
Expand All @@ -103,6 +129,7 @@ KPLIB_aiResupplySources = [
"CUP_O_Ural_Reammo_SLA",
"CUP_O_Ural_Reammo_TKA",
"CUP_O_V3S_Rearm_TKA",
"B_AFBiH_GAZ66_Ammo",
"gm_gc_army_ural4320_reammo_win",
"gm_gc_army_ural4320_reammo",
"gm_ge_army_kat1_451_reammo_win",
Expand All @@ -125,16 +152,19 @@ KPLIB_aiResupplySources = [
"sfp_tgb40_ammo",
"uns_M113_ENG",
"uns_M35A2_ammo",
"uns_motorpool1_repair"
"uns_motorpool1_repair",
"vn_b_wheeled_m54_ammo"
];

// Everything that can repair other vehicles.
vehicle_repair_sources = [
"B_APC_Tracked_01_CRV_F",
"rhs_gaz66_repair_vmf",
"B_Slingload_01_Repair_F",
"B_T_APC_Tracked_01_CRV_F",
"B_T_Truck_01_Repair_F",
"B_Truck_01_Repair_F",
"RHS_Ural_Repair_MSV_01",
"BW_LKW15T_Repair_F",
"C_Offroad_01_repair_F",
"CUP_B_Kamaz_Repair_CDF",
Expand All @@ -154,6 +184,7 @@ vehicle_repair_sources = [
"O_Heli_Transport_04_repair_F",
"O_T_Truck_03_repair_ghex_F",
"O_Truck_03_repair_F",
"Land_Workbench_01_F",
"RHS_Ural_Repair_VDV_01",
"rhsusf_M1078A1R_SOV_M2_D_fmtv_socom",
"rhsusf_M1239_M2_Deploy_socom_d",
Expand All @@ -168,16 +199,21 @@ vehicle_repair_sources = [
"UNS_Hanger_repair",
"uns_M113_ENG",
"uns_M35A2_repair",
"uns_motorpool1_repair"
"uns_motorpool1_repair",
"vn_b_wheeled_m54_repair"
];

// Everything that can rearm other vehicles.
vehicle_rearm_sources = [
"B_APC_Tracked_01_CRV_F",
"rhs_gaz66_ammo_vmf",
"B_AFBiH_GAZ66_Ammo",
"Misc_Cargo1B_military",
"B_Slingload_01_Ammo_F",
"B_T_APC_Tracked_01_CRV_F",
"B_T_Truck_01_ammo_F",
"B_Truck_01_ammo_F",
"RHS_Ural_Ammo_MSV_01",
"BW_LKW15T_Ammo_F",
"CUP_B_Kamaz_Reammo_CDF",
"CUP_B_MTVR_Ammo_USA",
Expand Down Expand Up @@ -210,14 +246,18 @@ vehicle_rearm_sources = [
"rhsusf_M977A4_AMMO_usarmy_wd",
"sfp_tgb40_ammo",
"uns_M113_ENG",
"uns_M35A2_ammo"
"uns_M35A2_ammo",
"vn_b_wheeled_m54_ammo"
];

// Everything that can refuel other vehicles.
vehicle_refuel_sources = [
"B_AFBiH_URAL_Fuel",
"B_APC_Tracked_01_CRV_F",
"B_Slingload_01_Fuel_F",
"RHS_Ural_Fuel_MSV_01",
"B_T_APC_Tracked_01_CRV_F",
"Land_Ind_TankSmall2",
"B_T_Truck_01_fuel_F",
"B_Truck_01_fuel_F",
"BW_LKW15T_Fuel_F",
Expand Down Expand Up @@ -253,21 +293,28 @@ vehicle_refuel_sources = [
"sfp_tgb40_fuel",
"uns_M113_ENG",
"uns_M35A2_fuel",
"uns_M35A2_fueltanker"
"uns_M35A2_fueltanker",
"vn_b_wheeled_m54_fuel"
];

// Classnames of boats, so they can be built on water.
boats_names = [
"B_Boat_Armed_01_minigun_F",
"C_Scooter_Transport_01_F",
"B_Boat_Transport_01_F",
"B_SDV_01_F",
"rhsgref_hidf_canoe",
"B_T_Boat_Armed_01_minigun_F",
"B_T_Boat_Transport_01_F",
"CUP_B_LCU1600_USMC",
"CUP_B_MK10_GB",
"CUP_B_RHIB_USMC",
"CUP_B_RHIB2Turret_USMC",
"I_C_Boat_Transport_02_F",
"rhs_bmk_t",
"walker_A3_boat_f",
"CUP_O_LCVP_SLA",
"rhsgref_hidf_rhib",
"CUP_O_LCVP_VIV_SLA",
"CUP_O_PBX_SLA",
"O_Boat_Armed_01_hmg_F",
Expand All @@ -282,7 +329,9 @@ boats_names = [
"uns_PBR_M10",
"uns_pbr_mk18",
"uns_pbr",
"UNS_Zodiac_W"
"UNS_Zodiac_W",
"B_Lifeboat",
"vn_b_boat_05_01"
];

// Classnames of artillery vehicles, which should be added to the support module
Expand Down Expand Up @@ -404,7 +453,9 @@ KPLIB_param_supportModule_artyVeh = [
"uns_M2_60mm_mortar_pvp",
"uns_M2_60mm_mortar",
"uns_M30_107mm_mortar",
"uns_Type55_mortar"
"uns_Type55_mortar",
"vn_b_army_static_mortar_m2",
"vn_b_army_static_mortar_m29"
];

// Objects which are spawned as intel objects for pickup
Expand Down Expand Up @@ -492,6 +543,7 @@ KPLIB_radioTowerClassnames = [
// Classnames of objects which should be ignored when building
KPLIB_collisionIgnoreObjects = [
"Land_HelipadSquare_F",
"Land_vn_b_helipad_01",
"Land_TentHangar_V1_F",
"Land_runway_edgelight",
"Land_runway_edgelight_blue_F",
Expand All @@ -515,6 +567,7 @@ KPLIB_collisionIgnoreObjects = [
"PortableHelipadLight_01_blue_F",
"PortableHelipadLight_01_green_F",
"PortableHelipadLight_01_red_F",
"Land_Airport_01_hangar_F",
"Land_BagFence_Round_F",
"Land_BagFence_Short_F",
"Land_BagFence_Long_F",
Expand Down
10 changes: 10 additions & 0 deletions Missionframework/KPLIB_objectInits.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ KPLIB_objectInits = [
}
],

// Add KPLQ Radio to static radios
[
["Land_FMradio_F", "Land_SurvivalRadio_F", "CUP_radio_b", "Radio", "Radio_Old"],
{
if (KPLIB_klpq) then {
[_this, false] call klpq_musicRadio_fnc_addRadio;
};
}
],

// Disable autocombat (if set in parameters) and fleeing
[
["CAManBase"],
Expand Down
2 changes: 1 addition & 1 deletion Missionframework/functions/fn_fullHeal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if (isClass (configfile >> "CfgPatches" >> "ace_field_ration")) then {_acefr = t
_target setVariable ["lastHealTime", _localtime];
if (KPLIB_ace_med) then {[_caller, _target] call ace_medical_treatment_fnc_fullHeal;} else {_target setDamage 0;};
if (isPlayer _target) then {
if (_acefr) then {_target setVariable ["acex_field_rations_thirst",0]; _target setVariable ["acex_field_rations_hunger",0];};
if (_acefr) then {_target setVariable ["acex_field_rations_thirst",0,true]; _target setVariable ["acex_field_rations_hunger",0,true];};
if (_target isNotEqualTo _caller) then {_healedunits pushBack _target;};
};
} else {
Expand Down
4 changes: 2 additions & 2 deletions Missionframework/scripts/server/ai/prisonner_ai.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ if ((side group _unit == KPLIB_side_enemy) && (_unit isKindOf "CAManBase") && (a

if (alive _unit) then {
private _CapturedPlayer = _unit getVariable ["KPLIB_prisonner_whois", objNull];
if (_CapturedPlayer == objNull) then {
if (isNull _capturedPlayer) then {
private _players = allPlayers;
private _nearestPlayer = objNull;
private _nearestPlayer = player;
private _minDistance = 100;
{
private _distance = _unit distance _x;
Expand Down
2 changes: 2 additions & 0 deletions Missionframework/scripts/shared/fetch_params.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
if (isClass (configfile >> "CfgPatches" >> "ace_common")) then {KPLIB_ace = true; ["ACE detected. Deactivating resupply script from Liberation.", "MOD"] call KPLIB_fnc_log;} else {KPLIB_ace = false};
// Check if ACE Medical is running
if (isClass (configfile >> "CfgPatches" >> "ace_medical")) then {KPLIB_ace_med = true; ["ACE Medical detected. switch some script for ACE Medical.", "MOD"] call KPLIB_fnc_log;} else {KPLIB_ace_med = false};
// Check if KLPQ is running
if (isClass (configfile >> "CfgPatches" >> "klpq_musicRadio")) then {KPLIB_klpq = true;} else {KPLIB_klpq = false};

/* Not saveable params */
KPLIB_param_wipe_savegame_1 = ["WipeSave1", 0] call bis_fnc_getParamValue;
Expand Down

0 comments on commit 8d745b2

Please sign in to comment.