mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Rename _playerUID to _id in fn_selfActions
Since this variable can also equal dayz_characterID if DZE_permanentPlot = false; it makes more sense to name it _id.
This commit is contained in:
@@ -5,7 +5,7 @@ scriptName "Functions\misc\fn_selfActions.sqf";
|
|||||||
- [] call fnc_usec_selfActions;
|
- [] call fnc_usec_selfActions;
|
||||||
************************************************************/
|
************************************************************/
|
||||||
if (DZE_ActionInProgress) exitWith {};
|
if (DZE_ActionInProgress) exitWith {};
|
||||||
private ["_canPickLight","_text","_dir","_canDoThis","_w2m","_bb","_waterHoles","_unlock","_lock","_totalKeys","_temp_keys","_temp_keys_names","_hasKey","_oldOwner","_hasAttached","_isAnimal","_isZombie","_isHarvested","_isMan","_isFuel","_hasRawMeat","_hastinitem","_player_deleteBuild","_player_lockUnlock_crtl","_displayName","_hasIgnators","_menu","_menu1","_allowTow","_liftHeli","_found","_posL","_posC","_height","_attached","_combi","_findNearestGen","_humanity_logic","_low_high","_cancel","_buy","_buyV","_humanity","_traderMenu","_warn","_typeOfCursorTarget","_isVehicle","_isBicycle","_isDestructable","_isGenerator","_ownerID","_isVehicletype","_hasBarrel","_hasFuel20","_hasFuel5","_hasEmptyFuelCan","_itemsPlayer","_hasToolbox","_hasbottleitem","_isAlive","_isPlant","_istypeTent","_upgradeItems","_isCampSite","_isDisallowRefuel","_isDog","_isModular","_isModularDoor","_isHouse","_isGate","_isFence","_isLockableGate","_isUnlocked","_isOpen","_isClosed","_ownerArray","_ownerBuildLock","_ownerPID","_speed","_dog","_vehicle","_inVehicle","_cursorTarget","_primaryWeapon","_currentWeapon","_magazinesPlayer","_onLadder","_canDo","_nearLight","_vehicleOwnerID","_hasHotwireKit","_isPZombie","_dogHandle","_allowedDistance"];
|
private ["_canPickLight","_text","_dir","_canDoThis","_w2m","_bb","_waterHoles","_unlock","_lock","_totalKeys","_temp_keys","_temp_keys_names","_hasKey","_oldOwner","_hasAttached","_isAnimal","_isZombie","_isHarvested","_isMan","_isFuel","_hasRawMeat","_hastinitem","_player_deleteBuild","_player_lockUnlock_crtl","_displayName","_hasIgnators","_menu","_menu1","_allowTow","_liftHeli","_found","_posL","_posC","_height","_attached","_combi","_findNearestGen","_humanity_logic","_low_high","_cancel","_buy","_buyV","_humanity","_traderMenu","_warn","_typeOfCursorTarget","_isVehicle","_isBicycle","_isDestructable","_isGenerator","_ownerID","_isVehicletype","_hasBarrel","_hasFuel20","_hasFuel5","_hasEmptyFuelCan","_itemsPlayer","_hasToolbox","_hasbottleitem","_isAlive","_isPlant","_istypeTent","_upgradeItems","_isCampSite","_isDisallowRefuel","_isDog","_isModular","_isModularDoor","_isHouse","_isGate","_isFence","_isLockableGate","_isUnlocked","_isOpen","_isClosed","_ownerArray","_ownerBuildLock","_ownerPID","_speed","_dog","_vehicle","_inVehicle","_cursorTarget","_primaryWeapon","_currentWeapon","_magazinesPlayer","_onLadder","_canDo","_nearLight","_vehicleOwnerID","_hasHotwireKit","_isPZombie","_dogHandle","_allowedDistance","_id"];
|
||||||
|
|
||||||
_vehicle = vehicle player;
|
_vehicle = vehicle player;
|
||||||
_inVehicle = (_vehicle != player);
|
_inVehicle = (_vehicle != player);
|
||||||
@@ -246,15 +246,16 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
|||||||
_isPlant = _typeOfCursorTarget in Dayz_plants;
|
_isPlant = _typeOfCursorTarget in Dayz_plants;
|
||||||
_istypeTent = (_cursorTarget isKindOf "TentStorage_base") or (_cursorTarget isKindOf "IC_Tent");
|
_istypeTent = (_cursorTarget isKindOf "TentStorage_base") or (_cursorTarget isKindOf "IC_Tent");
|
||||||
_upgradeItems = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4"];
|
_upgradeItems = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4"];
|
||||||
_isCampSite = _cursorTarget isKindOf "IC_Fireplace1";
|
_isCampSite = _cursorTarget isKindOf "IC_Fireplace1";
|
||||||
_ownerID = _cursorTarget getVariable ["characterID","0"];
|
|
||||||
_playerUID = dayz_characterID;
|
|
||||||
|
|
||||||
if (DZE_permanentPlot) then {
|
|
||||||
_playerUID = [player] call FNC_GetPlayerUID;
|
|
||||||
_ownerID = _cursorTarget getVariable ["ownerPUID","0"];
|
|
||||||
};
|
|
||||||
_characterID = _cursorTarget getVariable ["CharacterID","0"];
|
_characterID = _cursorTarget getVariable ["CharacterID","0"];
|
||||||
|
|
||||||
|
if (DZE_permanentPlot) then {
|
||||||
|
_id = [player] call FNC_GetPlayerUID;
|
||||||
|
_ownerID = _cursorTarget getVariable ["ownerPUID","0"];
|
||||||
|
} else {
|
||||||
|
_id = dayz_characterID;
|
||||||
|
_ownerID = _characterID;
|
||||||
|
};
|
||||||
|
|
||||||
_isDisallowRefuel = _typeOfCursorTarget in ["M240Nest_DZ","MMT_Civ","MMT_USMC","Old_bike_TK_CIV_EP1","Old_bike_TK_INS_EP1"];
|
_isDisallowRefuel = _typeOfCursorTarget in ["M240Nest_DZ","MMT_Civ","MMT_USMC","Old_bike_TK_CIV_EP1","Old_bike_TK_INS_EP1"];
|
||||||
_isDog = (_cursorTarget isKindOf "DZ_Pastor" || _cursorTarget isKindOf "DZ_Fin");
|
_isDog = (_cursorTarget isKindOf "DZ_Pastor" || _cursorTarget isKindOf "DZ_Fin");
|
||||||
@@ -444,7 +445,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
|||||||
};
|
};
|
||||||
|
|
||||||
//remove Own objects
|
//remove Own objects
|
||||||
if (_ownerID == _playerUID) then {
|
if (_ownerID == _id) then {
|
||||||
//upgrade items
|
//upgrade items
|
||||||
if (_typeOfCursorTarget in _upgradeItems) then {
|
if (_typeOfCursorTarget in _upgradeItems) then {
|
||||||
if (s_player_upgradestroage < 0) then {
|
if (s_player_upgradestroage < 0) then {
|
||||||
@@ -1018,7 +1019,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
|||||||
player removeAction s_player_tamedog;
|
player removeAction s_player_tamedog;
|
||||||
s_player_tamedog = -1;
|
s_player_tamedog = -1;
|
||||||
};
|
};
|
||||||
if (_isDog && {_ownerID == _playerUID} && {_isAlive}) then {
|
if (_isDog && {_ownerID == _id} && {_isAlive}) then {
|
||||||
if (s_player_feeddog < 0 && _hasRawMeat) then {
|
if (s_player_feeddog < 0 && _hasRawMeat) then {
|
||||||
s_player_feeddog = player addAction [localize "str_actions_feeddog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,0], 0, false, true];
|
s_player_feeddog = player addAction [localize "str_actions_feeddog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,0], 0, false, true];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user