Replaced old function calls in client build scripts

This commit is contained in:
Wyqer 2019-12-04 19:13:59 +01:00
parent d00a2709a3
commit c99b25ef2f
No known key found for this signature in database
GPG Key ID: D7E2F8BD7F1E48FA
3 changed files with 8 additions and 8 deletions

View File

@ -36,7 +36,7 @@ while { true } do {
_price_a = ((build_lists select buildtype) select buildindex) select 2;
_price_f = ((build_lists select buildtype) select buildindex) select 3;
_nearfob = [] call F_getNearestFob;
_nearfob = [] call KPLIB_fnc_getNearestFob;
_storage_areas = (_nearfob nearobjects (GRLIB_fob_range * 2)) select {(_x getVariable ["KP_liberation_storage_type",-1]) == 0};
[_price_s, _price_a, _price_f, _classname, buildtype, _storage_areas] remoteExec ["build_remote_call",2];
@ -73,7 +73,7 @@ while { true } do {
} else {
_posfob = getpos player;
if (buildtype != 99) then {
_posfob = [] call F_getNearestFob;
_posfob = [] call KPLIB_fnc_getNearestFob;
};
_idactcancel = -1;
@ -259,7 +259,7 @@ while { true } do {
_price_a = ((build_lists select buildtype) select buildindex) select 2;
_price_f = ((build_lists select buildtype) select buildindex) select 3;
_nearfob = [] call F_getNearestFob;
_nearfob = [] call KPLIB_fnc_getNearestFob;
_storage_areas = (_nearfob nearobjects (GRLIB_fob_range * 2)) select {(_x getVariable ["KP_liberation_storage_type",-1]) == 0};
_supplyCrates = ceil (_price_s / 100);
@ -323,10 +323,10 @@ while { true } do {
};*/
if ( (unitIsUAV _vehicle) || manned ) then {
[ _vehicle ] call F_forceBluforCrew;
[ _vehicle ] call KPLIB_fnc_forceBluforCrew;
};
[_vehicle] call F_addObjectInit;
[_vehicle] call KPLIB_fnc_addObjectInit;
sleep 0.3;
_vehicle allowDamage true;

View File

@ -8,7 +8,7 @@ if (((_this select 3) select 0) == KP_liberation_small_storage_building) then {
build_invalid = 0;
KP_vector = true;
_sectorpos = getMarkerPos ([GRLIB_fob_range] call F_getNearestSector);
_sectorpos = getMarkerPos ([GRLIB_fob_range] call KPLIB_fnc_getNearestSector);
_idactcancel = player addAction ["<t color='#B0FF00'>" + localize "STR_CANCEL" + "</t> <img size='2' image='res\ui_cancel.paa'/>",{build_confirmed = 3;},"",-725,false,true,"","build_confirmed == 1"];
_idactplace = player addAction ["<t color='#B0FF00'>" + localize "STR_PLACEMENT" + "</t> <img size='2' image='res\ui_confirm.paa'/>",{build_confirmed = 2;},"",-775,false,true,"","build_invalid == 0 && build_confirmed == 1"];

View File

@ -33,7 +33,7 @@ localize "STR_BUILD7",
localize "STR_BUILD8"
];
_nearfob = [] call F_getNearestFob;
_nearfob = [] call KPLIB_fnc_getNearestFob;
_actual_fob = KP_liberation_fob_resources select {((_x select 0) distance _nearfob) < GRLIB_fob_range};
while {dialog && alive player && (dobuild == 0 || buildtype == 1)} do {
@ -127,7 +127,7 @@ while {dialog && alive player && (dobuild == 0 || buildtype == 1)} do {
((_build_item select 2 == 0 ) || ((_build_item select 2) <= ((_actual_fob select 0) select 2))) &&
((_build_item select 3 == 0 ) || ((_build_item select 3) <= ((_actual_fob select 0) select 3)))
) then {
if (((_build_item select 0) in KP_liberation_friendly_air_classnames) && !([_build_item select 0] call F_isClassUAV)) then {
if (((_build_item select 0) in KP_liberation_friendly_air_classnames) && !([_build_item select 0] call KPLIB_fnc_isClassUAV)) then {
if (KP_liberation_air_vehicle_building_near &&
((((_build_item select 0) isKindOf "Helicopter") && (KP_liberation_heli_count < KP_liberation_heli_slots)) ||
(((_build_item select 0) isKindOf "Plane") && (KP_liberation_plane_count < KP_liberation_plane_slots)))