20 if (
Class.
CastTo(action,owner.GetActionManager().GetRunningAction()) && owner.GetActionManager().GetActionState() ==
UA_PROCESSING)
37 SetAnimationPhaseNow(
"AnimateRod",phase);
39 SetAnimationPhase(
"AnimateRod",phase);
45 for (
int i = 0; i < 6; ++i)
48 hook.GetInventory().CreateAttachment(
"Worm");
51 if (
Class.
CastTo(hook,GetInventory().CreateAttachment(
"Hook")))
52 hook.GetInventory().CreateAttachment(
"Worm");
129 m_Player.Message(
"I have started fishing.",
"colorFriendly");
186 m_Cycler.Run(0.3,
this,
"Pulling", NULL,
true);
202 m_Player.Message(
"",
"colorStatusChannel");
203 m_Player.Message(
"HOLD right mouse button to pull the fishing line",
"colorAction");
204 m_Player.Message(
"",
"colorStatusChannel");
205 m_Player.Message(
"",
"colorStatusChannel");
206 m_Player.Message(
"",
"colorStatusChannel");
207 m_Player.Message(
"Start pulling when J and <*)))>< meet:",
"colorStatusChannel");
208 m_Player.Message(
"",
"colorStatusChannel");
209 m_Player.Message(
"J"+fline+
" <*)))><",
"colorImportant");
220 if (
m_Player.GetItemInHands() !=
this || !
m_Player.IsInWater() || agent_speed_distance > 1 )
272 m_Player.Message(
"",
"colorStatusChannel");
273 m_Player.Message(
"",
"colorStatusChannel");
274 m_Player.Message(
"",
"colorStatusChannel");
275 m_Player.Message(
"The fish had broken the fishing line and swam away.",
"colorImportant");
276 m_Player.Message(
"",
"colorStatusChannel");
277 m_Player.Message(
"",
"colorStatusChannel");
278 m_Player.Message(
"",
"colorStatusChannel");
279 m_Player.Message(
"",
"colorStatusChannel");
283 m_Player.Message(
"",
"colorStatusChannel");
284 m_Player.Message(
"",
"colorStatusChannel");
285 m_Player.Message(
"",
"colorStatusChannel");
286 m_Player.Message(
"The fish escaped.",
"colorImportant");
287 m_Player.Message(
"",
"colorStatusChannel");
288 m_Player.Message(
"",
"colorStatusChannel");
289 m_Player.Message(
"",
"colorStatusChannel");
290 m_Player.Message(
"",
"colorStatusChannel");
294 m_Player.Message(
"",
"colorStatusChannel");
295 m_Player.Message(
"",
"colorStatusChannel");
296 m_Player.Message(
"",
"colorStatusChannel");
297 m_Player.Message(
"I caught the fish!",
"colorFriendly");
298 m_Player.Message(
"",
"colorStatusChannel");
299 m_Player.Message(
"",
"colorStatusChannel");
300 m_Player.Message(
"",
"colorStatusChannel");
301 m_Player.Message(
"",
"colorStatusChannel");
305 m_Player.Message(
"",
"colorStatusChannel");
306 m_Player.Message(
"",
"colorStatusChannel");
307 m_Player.Message(
"",
"colorStatusChannel");
308 m_Player.Message(
"Fishing time is over.",
"colorFriendly");
309 m_Player.Message(
"",
"colorStatusChannel");
310 m_Player.Message(
"",
"colorStatusChannel");
311 m_Player.Message(
"",
"colorStatusChannel");
312 m_Player.Message(
"",
"colorStatusChannel");
316 Print(
"Wrong number");
330 for (
int i = 0; i <
m_Pull; i++)
334 m_Player.Message(
"",
"colorStatusChannel");
335 m_Player.Message(
"HOLD right mouse button to pull the fishing line",
"colorAction");
336 m_Player.Message(
"RELEASE right mouse button to loosen the fishing line",
"colorAction");
337 m_Player.Message(
"",
"colorStatusChannel");
338 m_Player.Message(
"",
"colorStatusChannel");
339 m_Player.Message(
"Fishing line stretch :",
"colorStatusChannel");
340 m_Player.Message(
"",
"colorStatusChannel");
343 m_Player.Message(
"<"+fline+
">",
"colorImportant");
347 m_Player.Message(
"<"+fline+
">",
"colorAction");
351 m_Player.Message(
"<"+fline+
">",
"colorFriendly");
355 m_Player.Message(
"<"+fline+
">",
"colorStatusChannel");
359 m_Player.Message(
"<"+fline+
">",
"colorImportant");
366 if( !super.CanPutInCargo(parent) ) {
return false;}
void AddAction(typename actionName)
const int ECE_PLACE_ON_SURFACE
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
const float MIN_FISHING_TIME
const float TOO_MUCH_PULL
ref Timer m_CyclerCatching
void AddPull(float delta)
float GetFishingEffectivityBonus()
FishingRod_Base_New ANIM_PHASE_OPENED
const string ANIM_PHASE_CLOSED
const int FISH_PULL_CHANCE
const float MAX_FISHING_TIME
const float INIT_LINE_STRETCH
proto static native void End()
Finalizes the testing process.
Super root of all classes in Enforce script.
override void OnDebugSpawn()
void AnimateFishingRod(bool state)
DEPRECATED.
void FishingRod_Base_New()
override void SetActions()
void AnimateFishingRodEx(float phase, bool instant=false)
float GetFishingEffectivityBonus()
DEPRECATED, used to dictate catch chance.
override bool GetActionWidgetOverride(out typename name)
override void SetActions()
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
override bool CanPutInCargo(EntityAI parent)
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
class JsonUndergroundAreaTriggerData GetPosition