12 m_AnimationPhaseUsed =
"triggered";
14 m_MinimalDistanceFromPlayersToCatch = 15;
17 m_NoBaitCatchProb = 15;
19 m_WaterSurfaceForSetup =
true;
21 m_CatchesPond =
new multiMap<string, float>;
22 m_CatchesPond.Insert(
"Bitterlings", 1);
24 m_CatchesSea =
new multiMap<string, float>;
25 m_CatchesSea.Insert(
"Sardines",1);
30 super.OnVariablesSynchronized();
38 override void SpawnCatch()
45 multiMap<string, float> catches;
50 if (
GetGame().SurfaceIsSea( pos[0], pos[2] ) )
52 catches = m_CatchesSea;
54 else if (
GetGame().SurfaceIsPond( pos[0], pos[2] ) )
56 catches = m_CatchesPond;
59 if ( catches && catches.Count() > 0 )
62 int count = catches.Count() - 1;
63 int randomCatchIndex =
Math.RandomInt( 0, count );
65 if (
Math.RandomFloat(0, 100) < m_FinalCatchProb )
67 catch =
ItemBase.Cast(
GetGame().CreateObjectEx( catches.GetKeyByIndex(randomCatchIndex), m_PreyPos,
ECE_NONE ) );
71 CatchSetQuant(
catch );
93 return IsSurfaceWater( position );
98 if ( !attachment.IsInherited( Worm ) )
101 return super.CanReceiveAttachment( attachment, slotId );
104 #ifdef PLATFORM_WINDOWS
106 override int GetViewIndex()
108 if ( MemoryPointExists(
"invView2" ) )
111 GetInventory().GetCurrentInventoryLocation( il );
155 class SmallFishTrap
extends Trap_SmallFish
166 super.OnPlacementComplete( player, position, orientation );
178 return "placeSmallFishTrap_SoundSet";
183 return "fishtrap_deploy_SoundSet";