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();
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;
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 );
155class SmallFishTrap
extends Trap_SmallFish
166 super.OnPlacementComplete( player, position, orientation );
178 return "placeSmallFishTrap_SoundSet";
183 return "fishtrap_deploy_SoundSet";
InventoryLocationType
types of Inventory Location
string GetLoopDeploySoundset()
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
void SetIsPlaceSound(bool is_place_sound)
string GetDeploySoundset()
class Trap_SmallFish extends TrapSpawnBase m_RainProcurement
override bool DoPlacingHeightCheck()
string m_AnimationPhaseTriggered
string m_AnimationPhaseSet
class JsonUndergroundAreaTriggerData GetPosition
proto native int GetType()
returns type of InventoryLocation
DEPRECATED, done through the RainProcurementHandler / component instead.
override void OnVariablesSynchronized()
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override void SpawnCatch()
override bool IsPlaceableAtPosition(vector position)
proto native CGame GetGame()
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].