DayZ
1.27
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
YieldsFish.c
См. документацию.
1
class
FishYieldItemBase
:
YieldItemBase
2
{
3
//used for interpolation between min/max times (UAFishingConstants.CYCLE_LENGTH_MIN/UAFishingConstants.CYCLE_LENGTH_MAX)
4
protected
float
m_HourlyCycleLengthCoefs
[24];
//0 - 23h;
5
6
override
void
Init
()
7
{
8
super.Init();
9
10
m_HourlyCycleLengthCoefs
= {1,1,1,1,0.5,0.2,0,0,0,0.2,0.5,1,1
/*12h*/
,1,1,1,0.75,0.5,0.2,0,0,0,0.2,0.5};
11
m_QualityBase
=
AnimalCatchingConstants
.
QUALITY_FISH_BASE
;
//base quality of the fish
12
}
13
14
float
GetCycleTimeForYieldItem
(
CatchingContextFishingRodAction
ctx)
15
{
16
int
hour =
Math
.
Floor
(
GetGame
().GetDayTime());
17
float
res =
Math
.
Lerp
(
UAFishingConstants
.
CYCLE_LENGTH_MIN
,
UAFishingConstants
.
CYCLE_LENGTH_MAX
,
m_HourlyCycleLengthCoefs
[hour]);
18
return
res;
19
}
20
21
override
float
GetBaitTypeSensitivity
(ECatchingBaitCategories type)
22
{
23
switch
(type)
24
{
25
case
ECatchingBaitCategories.BAIT_TYPE_EMPTY:
26
case
ECatchingBaitCategories.BAIT_TYPE_MEAT_SMALL:
27
return
1;
28
}
29
30
return
0.0;
31
}
32
33
override
string
GetCatchDeathSoundset
()
34
{
35
return
"Fishing_splash_SoundSet"
;
36
}
37
38
override
string
GetCatchAINoise
()
39
{
40
return
""
;
41
}
42
43
override
int
GetCatchParticleID
()
44
{
45
return
ParticleList
.
FISHING_SIGNAL_SPLASH
;
46
}
47
}
48
49
//----------------------------------//
50
//generic fish with basic info only //
51
//----------------------------------//
52
class
YieldItemGenericFish
:
FishYieldItemBase
53
{
54
void
YieldItemGenericFish
(
int
baseWeight,
string
type,
int
enviroMask,
int
methodMask)
55
{
56
m_Type
= type;
57
m_EnviroMask
= enviroMask;
58
m_MethodMask
= methodMask;
59
}
60
}
61
62
//------------------------------//
63
//detailed yield items over nyah//
64
//------------------------------//
65
//--------------//
66
//temperate fish//
67
//--------------//
68
class
YieldItemMackerel
:
FishYieldItemBase
69
{
70
override
void
Init
()
71
{
72
super.Init();
73
74
//m_HourlyCycleLengthCoefs = {1,1,1,1,1,1,1,1,1,1,1,1,1/*12h*/,1,1,1,1,1,1,1,1,1,1,1};
75
//m_QualityBase = some custom value here;
76
m_Type
=
"Mackerel"
;
77
m_EnviroMask
=
AnimalCatchingConstants
.
MASK_ENVIRO_SEA
;
78
m_MethodMask
=
AnimalCatchingConstants
.
MASK_METHOD_ROD
|
AnimalCatchingConstants
.
MASK_METHOD_FISHTRAP_LARGE
;
79
}
80
}
81
82
class
YieldItemCarp :
FishYieldItemBase
83
{
84
override
void
Init
()
85
{
86
super.
Init
();
87
88
//m_HourlyCycleLengthCoefs = {1,1,1,1,1,1,1,1,1,1,1,1,1/*12h*/,1,1,1,1,1,1,1,1,1,1,1};
89
//m_QualityBase = some custom value here;
90
m_Type
=
"Carp"
;
91
m_EnviroMask
=
AnimalCatchingConstants
.
MASK_ENVIRO_POND
;
92
m_MethodMask
=
AnimalCatchingConstants
.
MASK_METHOD_ROD
|
AnimalCatchingConstants
.
MASK_METHOD_FISHTRAP_LARGE
;
93
}
94
}
95
96
class
YieldItemSardines
:
FishYieldItemBase
97
{
98
override
void
Init
()
99
{
100
super.Init();
101
102
//m_HourlyCycleLengthCoefs = {1,1,1,1,1,1,1,1,1,1,1,1,1/*12h*/,1,1,1,1,1,1,1,1,1,1,1};
103
//m_QualityBase = some custom value here;
104
m_Type
=
"Sardines"
;
105
m_EnviroMask
=
AnimalCatchingConstants
.
MASK_ENVIRO_SEA
;
106
m_MethodMask
=
AnimalCatchingConstants
.
MASK_METHOD_FISHTRAP_SMALL
;
107
}
108
}
109
110
class
YieldItemBitterlings :
FishYieldItemBase
111
{
112
override
void
Init
()
113
{
114
super.
Init
();
115
116
//m_HourlyCycleLengthCoefs = {1,1,1,1,1,1,1,1,1,1,1,1,1/*12h*/,1,1,1,1,1,1,1,1,1,1,1};
117
//m_QualityBase = some custom value here;
118
m_Type
=
"Bitterlings"
;
119
m_EnviroMask
= AnimalCatchingConstants.MASK_ENVIRO_POND;
120
m_MethodMask
= AnimalCatchingConstants.MASK_METHOD_FISHTRAP_SMALL;
121
}
122
}
123
124
//---------//
125
//cool fish//
126
//---------//
127
class
YieldItemWalleyePollock
:
FishYieldItemBase
128
{
129
override
void
Init
()
130
{
131
super.Init();
132
133
m_HourlyCycleLengthCoefs
= {1,1,1,1,1,1,1,0.8,0.7,0.5,0.2,0,0
/*12h*/
,0,0,0,0.2,0.5,0.7,0.8,1,1,1,1};
134
//m_QualityBase = some custom value here;
135
m_Type
=
"WalleyePollock"
;
136
m_EnviroMask
=
AnimalCatchingConstants
.
MASK_ENVIRO_SEA
;
137
m_MethodMask
=
AnimalCatchingConstants
.
MASK_METHOD_ROD
|
AnimalCatchingConstants
.
MASK_METHOD_FISHTRAP_LARGE
;
138
}
139
}
140
141
class
YieldItemSteelheadTrout :
FishYieldItemBase
142
{
143
override
void
Init
()
144
{
145
super.
Init
();
146
147
m_HourlyCycleLengthCoefs
= {1,1,1,1,1,1,1,1,1,0.5,0.2,0,0
/*12h*/
,0,0,0.2,0.5,0.7,1,1,1,1,1,1};
148
//m_QualityBase = some custom value here;
149
m_Type
=
"SteelheadTrout"
;
150
m_EnviroMask
= AnimalCatchingConstants.MASK_ENVIRO_SEA;
151
m_MethodMask
= AnimalCatchingConstants.MASK_METHOD_ROD|AnimalCatchingConstants.MASK_METHOD_FISHTRAP_LARGE;
152
}
153
}
154
155
class
YieldItemShrimp
:
FishYieldItemBase
156
{
157
override
void
Init
()
158
{
159
super.Init();
160
161
m_HourlyCycleLengthCoefs
= {1,1,1,1,1,1,1,1,1,1,0,0,0
/*12h*/
,0,0,0,0,1,1,1,1,1,1,1};
162
//m_QualityBase = some custom value here;
163
m_Type
=
"Shrimp"
;
164
m_EnviroMask
=
AnimalCatchingConstants
.
MASK_ENVIRO_SEA
;
165
m_MethodMask
=
AnimalCatchingConstants
.
MASK_METHOD_FISHTRAP_SMALL
;
166
}
167
}
m_Type
eBleedingSourceType m_Type
Определения
BleedingSource.c:25
m_MethodMask
int m_MethodMask
Определения
CatchingContextBase.c:18
m_EnviroMask
int m_EnviroMask
Определения
CatchingContextBase.c:19
YieldItemGenericFish
FishYieldItemBase YieldItemBase YieldItemGenericFish(int baseWeight, string type, int enviroMask, int methodMask)
Определения
YieldsFish.c:54
m_HourlyCycleLengthCoefs
float m_HourlyCycleLengthCoefs[24]
Определения
YieldsFish.c:56
AnimalCatchingConstants::QUALITY_FISH_BASE
const float QUALITY_FISH_BASE
Определения
CatchingConstants.c:4
AnimalCatchingConstants::MASK_ENVIRO_POND
static const int MASK_ENVIRO_POND
Определения
CatchingConstants.c:11
AnimalCatchingConstants::MASK_METHOD_FISHTRAP_LARGE
static const int MASK_METHOD_FISHTRAP_LARGE
Определения
CatchingConstants.c:20
AnimalCatchingConstants::MASK_METHOD_ROD
static const int MASK_METHOD_ROD
Определения
CatchingConstants.c:19
AnimalCatchingConstants::MASK_ENVIRO_SEA
static const int MASK_ENVIRO_SEA
Определения
CatchingConstants.c:12
AnimalCatchingConstants::MASK_METHOD_FISHTRAP_SMALL
static const int MASK_METHOD_FISHTRAP_SMALL
Определения
CatchingConstants.c:21
AnimalCatchingConstants
Определения
CatchingConstants.c:2
CatchingContextFishingRodAction
Определения
CatchingContextFishingRodAction.c:2
FishYieldItemBase::GetCatchParticleID
override int GetCatchParticleID()
Определения
YieldsFish.c:43
FishYieldItemBase::GetCatchAINoise
override string GetCatchAINoise()
Определения
YieldsFish.c:38
FishYieldItemBase::GetBaitTypeSensitivity
override float GetBaitTypeSensitivity(ECatchingBaitCategories type)
Определения
YieldsFish.c:21
FishYieldItemBase::GetCatchDeathSoundset
override string GetCatchDeathSoundset()
Определения
YieldsFish.c:33
FishYieldItemBase::m_HourlyCycleLengthCoefs
float m_HourlyCycleLengthCoefs[24]
Определения
YieldsFish.c:4
FishYieldItemBase::GetCycleTimeForYieldItem
float GetCycleTimeForYieldItem(CatchingContextFishingRodAction ctx)
Определения
YieldsFish.c:14
FishYieldItemBase::Init
override void Init()
Определения
YieldsFish.c:6
FishYieldItemBase
Определения
YieldsFish.c:2
Math
Определения
EnMath.c:7
ParticleList::FISHING_SIGNAL_SPLASH
static const int FISHING_SIGNAL_SPLASH
Определения
ParticleList.c:351
ParticleList
Определения
ParticleList.c:12
UAFishingConstants::CYCLE_LENGTH_MAX
const float CYCLE_LENGTH_MAX
Определения
ActionConstants.c:182
UAFishingConstants::CYCLE_LENGTH_MIN
const float CYCLE_LENGTH_MIN
Определения
ActionConstants.c:181
UAFishingConstants
Определения
ActionConstants.c:179
YieldItemBase::m_EnviroMask
int m_EnviroMask
Определения
CatchYieldItemBase.c:7
YieldItemBase::m_QualityBase
float m_QualityBase
Определения
CatchYieldItemBase.c:6
YieldItemBase::m_Type
string m_Type
Определения
CatchYieldItemBase.c:3
YieldItemBase::YieldItemBase
void YieldItemBase(int baseWeight)
Определения
CatchYieldItemBase.c:11
YieldItemBase::m_MethodMask
int m_MethodMask
Определения
CatchYieldItemBase.c:8
YieldItemMackerel::Init
override void Init()
Определения
YieldsFish.c:70
YieldItemMackerel
Определения
YieldsFish.c:69
YieldItemSardines::Init
override void Init()
Определения
YieldsFish.c:98
YieldItemSardines
Определения
YieldsFish.c:97
YieldItemShrimp::Init
override void Init()
Определения
YieldsFish.c:157
YieldItemShrimp
Определения
YieldsFish.c:156
YieldItemWalleyePollock::Init
override void Init()
Определения
YieldsFish.c:129
YieldItemWalleyePollock
Определения
YieldsFish.c:128
GetGame
proto native CGame GetGame()
Math::Floor
static proto float Floor(float f)
Returns floor of value.
Math::Lerp
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
Ishodniki
scripts
4_World
Systems
AnimalCatchingSystem
YieldItems
YieldsFish.c
Создано системой
1.13.2