7 override void SetActions()
14 override bool GetActionWidgetOverride(out
typename name)
17 if (
Class.CastTo(owner,GetHierarchyRootPlayer()))
20 if (
Class.CastTo(action,owner.GetActionManager().GetRunningAction()) && owner.GetActionManager().GetActionState() ==
UA_PROCESSING)
29 override bool IsOpen()
34 void AnimateFishingRodEx(
float phase,
bool instant =
false)
37 SetAnimationPhaseNow(
"AnimateRod",phase);
39 SetAnimationPhase(
"AnimateRod",phase);
42 override void OnDebugSpawn()
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");
58 float GetFishingEffectivityBonus()
64 void AnimateFishingRod(
bool state)
66 AnimateFishingRodEx(state);
129 m_Player.Message(
"I have started fishing.",
"colorFriendly");
158 if (
Math.RandomInt(0, 1) )
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");
219 float agent_speed_distance =
vector.Distance(
"0 0 0",
m_Player.GetModelSpeed());
220 if (
m_Player.GetItemInHands() !=
this || !
m_Player.IsInWater() || agent_speed_distance > 1 )
230 pcatch.SetQuantity(800,
false);
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
Super root of all classes in Enforce script.
void End()
called on surrender end request end
override bool CanPutInCargo(EntityAI parent)
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 native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
class JsonUndergroundAreaTriggerData GetPosition