283 : CatchingContextBase
284{
288
292
294 {
297 {
300 }
301 }
302
304 {
306
307 super.CreateResultDataStructure();
308 }
309
311 {
312 super.ClearCatchingItemData();
313
318 }
319
321 {
322
323 if (
item.IsRuined() ||
item.IsSetForDeletion())
324 return;
325
328 {
329 if (
GetGame().ConfigIsExisting(
path +
" baitTypes") &&
GetGame().ConfigIsExisting(
path +
" baitTypeChances"))
330 {
337 {
341 {
345 {
347 }
348 }
349 }
350 else
351 {
353 }
354 }
355 if (
GetGame().ConfigIsExisting(
path +
" resultQuantityBaseMod"))
357 if (
GetGame().ConfigIsExisting(
path +
" resultQuantityDispersionMin"))
359 if (
GetGame().ConfigIsExisting(
path +
" resultQuantityDispersionMax"))
361 }
362 }
363
366 {
370 {
371
372 }
373
375 }
376
378 {
380 if (
GetGame().SurfaceIsSea(pos[0], pos[2]))
382 else if (
GetGame().SurfaceIsPond( pos[0], pos[2]))
384 else
386 }
387
389 {
391
393 }
394
396 {
397 #ifdef DEVELOPER
399 {
400 Print(
"********************");
401 Print(
"dbgTrapz | START");
402 Print(
"********************");
403 }
404 #endif
405
406 super.SetupInitialTypes();
407
408 #ifdef DEVELOPER
410 {
412 }
413 #endif
414 }
415
417 {
420
423 }
424
426 {
429 }
430
432 {
434 }
435
438 {
441 {
444 {
448 }
449 else
450 ErrorEx(
"failed to acquire BaitData from type: " + type);
451 }
452
453 #ifdef DEVELOPER
455 {
458 else
459 Print(
"dbgTrapz | UpdateUsedBait to 'null'!");
460 }
461 #endif
462 }
463
465 {
472 {
476 {
479 }
480 }
481
483 #ifdef DEVELOPER
485 {
486
488 }
489 #endif
491
492 #ifdef DEVELOPER
494 {
498 }
499 #endif
500 }
501
503 {
505
506 return true;
507 }
508
510 {
513 }
514
516 {
518 {
521 else
523 }
524 }
525}
526
528{
530 {
532 }
533}
534
536{
538 {
540 }
541}
542
544{
546 {
548 }
549}
void GenerateResult()
Definition CatchingContextBase.c:257
void SetupInitialTypes()
Definition CatchingContextTraps.c:358
void ClearCatchingItemData()
Definition CatchingContextTraps.c:273
ItemBase m_Bait
Definition CatchingContextTraps.c:254
void DeserializeData(Param par)
Definition CatchingContextTraps.c:256
override bool ModifySignalProbability(inout float probability)
Definition CatchingContextTraps.c:465
int UpdateTrapEnviroMask()
Definition CatchingContextTraps.c:388
CatchingContextTrapsBase CatchingContextBase InitCatchMethodMask()
Definition CatchingContextTraps.c:247
void UpdateUsedBait(ECatchingBaitCategories type)
if non-empty bait type is used, some 'Bait' attachment is picked as an active bait (currently no dire...
Definition CatchingContextTraps.c:400
void InitItemValues(EntityAI item)
override to init context-specific values
Definition CatchingContextTraps.c:283
float m_CumulativeTrappingSuccess
after N attempts, the chance to catch should be this. Only highest one applies. @NOTE: Take care,...
Definition CatchingContextTraps.c:252
void UpdateDataAndMasks()
Definition CatchingContextTraps.c:379
void ReduceBaitQty(float qtyNorm)
Definition CatchingContextTraps.c:478
void CreateResultDataStructure()
Definition CatchingContextTraps.c:266
override void UpdateBaseProbability(YieldItemBase yItem)
updates base probability when catching the specific item (some context subclasses only)
Definition CatchingContextTraps.c:427
int m_AttemptsCount
Definition CatchingContextTraps.c:253
void InitCatchEnviroMask()
Definition CatchingContextTraps.c:340
float AdjustBaitItemChance(EntityAI item)
Allows for adjustment of all catch probabilities from item qualities (damage, qty....
Definition CatchingContextTraps.c:328
void RemoveBait()
Definition CatchingContextTraps.c:472
void SetTrapEnviroMask(int value)
Definition CatchingContextTraps.c:394
string path
Definition OptionSelectorMultistate.c:142
static const int MASK_ENVIRO_LAND_ALL
Definition CatchingConstants.c:16
static const int MASK_METHOD_LANDTRAP_SNARE
Definition CatchingConstants.c:22
static const int MASK_ENVIRO_SEA
Definition CatchingConstants.c:12
static const int MASK_ENVIRO_POND
Definition CatchingConstants.c:11
static const int MASK_METHOD_FISHTRAP_SMALL
Definition CatchingConstants.c:21
Definition CatchingContextBase.c:2
Definition UtilityClasses.c:41
static ref TIntArray ARRAY_INT
Definition UtilityClasses.c:51
static ref TFloatArray ARRAY_FLOAT
Definition UtilityClasses.c:50
Definition CatchingContextTraps.c:254
void InitCatchMethodMask()
Definition CatchingContextTraps.c:255
Definition CarchingResultTrapBase.c:2
Definition InventoryItem.c:731
override bool CanBeSplit()
Definition Rag.c:34
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
Definition EnConvert.c:106
static proto float Pow(float v, float power)
Return power of v ^ power.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.