mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-04-18 10:16:39 +03:00
Organize files a bit and removed non source pbo's
This commit is contained in:
36
SQF/dayz_code/actions/dog/feed.sqf
Normal file
36
SQF/dayz_code/actions/dog/feed.sqf
Normal file
@@ -0,0 +1,36 @@
|
||||
private ["_array","_handle","_type","_onLadder","_removed","_itemIn","_countIn"];
|
||||
_array = _this select 3;
|
||||
_handle = _array select 0;
|
||||
_type = _array select 1;
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
|
||||
|
||||
player playActionNow "PutDown";
|
||||
|
||||
switch (_type) do {
|
||||
case 0: {
|
||||
// expanded to allow all meats as input
|
||||
_removed = 0;
|
||||
_itemIn = "FoodmeatRaw";
|
||||
_countIn = 1;
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_removed = _removed + ([player,_x] call BIS_fnc_invRemove);
|
||||
};
|
||||
} forEach magazines player;
|
||||
if(_removed == _countIn) then {
|
||||
_handle setFSMVariable ["_hunger",0];
|
||||
player removeAction s_player_feeddog;
|
||||
s_player_feeddog = -1;
|
||||
};
|
||||
|
||||
};
|
||||
case 1: {
|
||||
player removeMagazine "ItemWaterbottle";
|
||||
player addMagazine "ItemWaterbottleUnfilled";
|
||||
_handle setFSMVariable ["_thirst",0];
|
||||
player removeAction s_player_waterdog;
|
||||
s_player_waterdog = -1;
|
||||
};
|
||||
};
|
||||
16
SQF/dayz_code/actions/dog/follow.sqf
Normal file
16
SQF/dayz_code/actions/dog/follow.sqf
Normal file
@@ -0,0 +1,16 @@
|
||||
private["_array","_handle","_whistle","_dog"];
|
||||
_array = _this select 3;
|
||||
_handle = _array select 0;
|
||||
_whistle = _array select 1;
|
||||
_dog = _handle getFSMVariable "_dog";
|
||||
|
||||
if(_whistle) then {
|
||||
[nil,player,rSAY,["dog_callBack", 120]] call RE;
|
||||
};
|
||||
|
||||
sleep 1;
|
||||
|
||||
if (_dog distance player <= 900) then {
|
||||
_handle setFSMVariable ["_command","return"];
|
||||
};
|
||||
|
||||
4
SQF/dayz_code/actions/dog/move.sqf
Normal file
4
SQF/dayz_code/actions/dog/move.sqf
Normal file
@@ -0,0 +1,4 @@
|
||||
private ["_handle"];
|
||||
_handle = _this select 3;
|
||||
|
||||
_handle setFSMVariable ["_command","move"];
|
||||
5
SQF/dayz_code/actions/dog/speak.sqf
Normal file
5
SQF/dayz_code/actions/dog/speak.sqf
Normal file
@@ -0,0 +1,5 @@
|
||||
private ["_dog"];
|
||||
_dog = _this select 3;
|
||||
|
||||
_dog playActionNow "GestureBark";
|
||||
[_dog,"dog_bark",0,false] call dayz_zombieSpeak;
|
||||
16
SQF/dayz_code/actions/dog/speed.sqf
Normal file
16
SQF/dayz_code/actions/dog/speed.sqf
Normal file
@@ -0,0 +1,16 @@
|
||||
private ["_array", "_handle", "_speed", "_dog"];
|
||||
_array = _this select 3;
|
||||
_handle = _array select 0;
|
||||
_speed = _array select 1;
|
||||
|
||||
player removeAction s_player_speeddog;
|
||||
s_player_speeddog = -1;
|
||||
|
||||
_dog = _handle getFSMVariable "_dog";
|
||||
|
||||
if(player distance _dog > 5) then {
|
||||
[nil,player,rSAY,["dog_slowDown", 120]] call RE;
|
||||
};
|
||||
|
||||
_handle setFSMVariable ["_maxSpeed", _speed];
|
||||
_dog setVariable ["currentSpeed", _speed];
|
||||
13
SQF/dayz_code/actions/dog/stay.sqf
Normal file
13
SQF/dayz_code/actions/dog/stay.sqf
Normal file
@@ -0,0 +1,13 @@
|
||||
private ["_handle", "_dog", "_standing", "_watchDog", "_anim"];
|
||||
_handle = _this select 3;
|
||||
_dog = _handle getFSMVariable "_dog";
|
||||
_standing = _handle getFSMVariable "_standing";
|
||||
_handle setFSMVariable ["_command","stay"];
|
||||
_watchDog = _handle getFSMVariable "_watchDog";
|
||||
|
||||
_anim = animationState _dog;
|
||||
if (_anim == "Dog_SitDown" and _watchDog) then {
|
||||
//[objNull, _dog, rSwitchMove,"Dog_SitUp"] call RE;
|
||||
//sleep 0.5;
|
||||
[objNull, _dog, rSwitchMove,"Dog_LieDown"] call RE;
|
||||
};
|
||||
5
SQF/dayz_code/actions/dog/track.sqf
Normal file
5
SQF/dayz_code/actions/dog/track.sqf
Normal file
@@ -0,0 +1,5 @@
|
||||
private ["_handle"];
|
||||
_handle = _this select 3;
|
||||
|
||||
_handle setFSMVariable ["_command","track"];
|
||||
|
||||
33
SQF/dayz_code/actions/dog/warn.sqf
Normal file
33
SQF/dayz_code/actions/dog/warn.sqf
Normal file
@@ -0,0 +1,33 @@
|
||||
private ["_array", "_handle", "_watchDog", "_dog", "_warn"];
|
||||
_array = _this select 3;
|
||||
_handle = _array select 0;
|
||||
_watchDog = _array select 1;
|
||||
_dog = _handle getFSMVariable "_dog";
|
||||
|
||||
player removeAction s_player_warndog;
|
||||
s_player_warndog = -1;
|
||||
|
||||
_handle setFSMVariable ["_watchDog",_watchDog];
|
||||
|
||||
_warn = {
|
||||
_handle = _this select 0;
|
||||
while {_watchDog and alive _dog} do {
|
||||
_watchDog = _handle getFSMVariable "_watchDog";
|
||||
_senseSkill = _handle getFSMVariable "_senseSkill";
|
||||
if (_watchDog) then {
|
||||
_nearby = (getPosATL _dog) nearEntities ["CAManBase",_senseSkill];
|
||||
_nearby = _nearby - [player];
|
||||
if (count _nearby > 0) then {
|
||||
[_dog,"dog_growl",2,false] call dayz_zombieSpeak;
|
||||
};
|
||||
};
|
||||
sleep 2;
|
||||
};
|
||||
};
|
||||
|
||||
if (_watchDog) then {
|
||||
_handle setFSMVariable ["_idleTime",5];
|
||||
[_handle] spawn _warn;
|
||||
} else {
|
||||
_handle setFSMVariable ["_idleTime",1];
|
||||
};
|
||||
Reference in New Issue
Block a user