DIFF

class TrapSpawnBaseSource

TrapSpawnBase ItemBase InventoryItem EntityAI Entity ObjectTyped Object IEntity Managed

All members, including inherited

Constructors 2

void ~TrapSpawnBase()

Constants 1

const string m_PlaceableWaterType

Members 50

bool m_CanCatch = false
Referenced by EvaluateCatch(), and SpawnCatch()
bool m_NeedInstalation
int m_SpawnUpdateWaitTime

Catch spawn and player check interval (expensive-ish)

float m_BaitLossFraction

Normalized bait qty reduction on unsuccessful catch

float m_DefectRate

Absolute damage dealt to trap when used

private int m_InitWaitTime

After this time after deployment, the trap is activated

private int m_AdjustedMaxActiveTime

Adjusted by init wait time, when appropriate

private int m_ElapsedTime
private int m_ActivationTime
Referenced by ResetActiveProgress()
private int m_RollSuccessTime
private float m_CurrentMinimalDistance
private float m_CurrentlyUsedDelta
private bool m_IsCatchSuccessful
private int m_CatchEnviroMask = 0
Referenced by OnStoreLoad(), OnStoreSave(), SetActive()
Show 1 more, UpdateTrapEnviroMask()
private int m_YieldItemIdxLocal = -1
private int m_CatchParticleEffecterId = -1
vector m_PreyPos

The position where prey will be spawned -> Will be overriden later

protected bool m_IsActive
Referenced by IsActive(), OnStoreSave(), SetActive()
Show 2 more, SetInactive(), and SetUsed()
protected bool m_IsPastWaitingTime
protected bool m_IsDeployed
Referenced by IsDeployed(), OnStoreSave(), SetDeployed()
Show 1 more, SetUsed()
ref Timer m_Timer
Referenced by ~TrapSpawnBase(), EvaluateCatch(), RunTrappingTimer()
Show 2 more, SetInactive(), and SetUsed()
protected ref array<string> m_PlaceableWaterSurfaceList
int m_dbgAttemptCount = 0DEVELOPER
ref Timer m_PrevTimer

DEPRECATED

bool m_BaitNeeded

DEPRECATED

bool m_IsUsable

DEPRECATED

private ItemBase m_Catch

DEPRECATED, no reason to keep the information as member

ref Timer m_AlignCatchTimer

DEPRECATED

string m_InfoSetup

DEPRECATED

protected bool m_IsInProgress

DEPRECATED

protected ref EffectSound m_DeployLoopSound

DEPRECATED

protected EntityAI m_Bait
Referenced by EvaluateCatch()
float m_BaitCatchProb

DEPRECATED

float m_NoBaitCatchProb

DEPRECATED

float m_FinalCatchProb

DEPRECATED

bool m_WaterSurfaceForSetup

DEPRECATED

ref multiMap<string, float> m_CatchesPond

DEPRECATED

Referenced by TrapSpawnBase()
ref multiMap<string, float> m_CatchesSea

DEPRECATED

Referenced by TrapSpawnBase()
ref multiMap<string, float> m_CatchesGroundAnimal

DEPRECATED

Referenced by TrapSpawnBase()

Methods 60

override void OnStoreSave(ParamsWriteContext ctx)
override void OnVariablesSynchronized()

this event is called all variables are synchronized on client

override bool IsTakeable()
void SetupTrapPlayer(PlayerBase player, bool set_position = true)
void Fold()
void AddDefect()
Referenced by SetUsed()
void StartActivate(PlayerBase player)
override bool CanPutInCargo(EntityAI parent)
override bool CanPutIntoHands(EntityAI parent)
void ResetRunningTimerProgress()
void RunTrappingTimer(float duration, string fnName)

generic trapping launcher for traps, use this to store delta info

void IncreaseElapsedTime()
Referenced by EvaluateCatch(), and TrySpawnCatch()
bool IsPlayerInVicinity()
Referenced by TrySpawnCatch()
void SetCatchSuccessful(bool successful)
Referenced by SetActive(), and SpawnCatch()
void OnCatchSpawnServer()
Referenced by SpawnCatch()
void OnCatchSpawnClient()
protected void PlayCatchEffectsClient()
Referenced by OnCatchSpawnClient()
bool SetCanCatch(out EntityAI bait)
Referenced by EvaluateCatch()
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
override bool CanDisplayAttachmentSlot(int slot_id)
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
void ClearCatchingComponent()
void SetTrapEnviroMask(int value)
Referenced by SetActive()
void DetachAllAttachments()

detaches everything on catching end (some slots may not be accessible when folded)

Referenced by SetUsed()
override bool CanBePlaced(Man player, vector position)
override void SetActions()
bool CanPutInInventory(EntityAI player)

DEPRECATED

void AlignCatch(ItemBase obj, string catch_name)

DEPRECATED

void CatchSetQuant(ItemBase catch)

!DEPRECATED

void PlayDeployLoopSound()

DEPRECATED

void StopDeployLoopSound()

DEPRECATED