12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- class YieldItemBase
- {
- protected string m_Type;
- protected int m_RegistrationIdx = -1; //mostly for sync purposes
- protected int m_BaseWeight; //occurence ratio in the enviroment
- protected float m_QualityBase = AnimalCatchingConstants.QUALITY_GENERIC_BASE;
- protected int m_EnviroMask; //which enviroment it is relevant for
- protected int m_MethodMask; //which catching method are we using
- //protected ref m_BaitCompatibilityMask; //which baits are relevant for me
-
- void YieldItemBase(int baseWeight)
- {
- m_BaseWeight = baseWeight;
-
- Init();
- }
-
- void Init();
-
- string GetType()
- {
- return m_Type;
- }
-
- int GetRegistrationIdx()
- {
- return m_RegistrationIdx;
- }
-
- void SetRegistrationIdx(int idx)
- {
- if (m_RegistrationIdx == -1)
- m_RegistrationIdx = idx;
- else
- ErrorEx("m_RegistrationIdx already set for " + this);
- }
-
- int GetYieldWeight(CatchingContextBase ctx)
- {
- return m_BaseWeight;
- }
-
- int GetEnviroMask()
- {
- return m_EnviroMask;
- }
-
- int GetMethodMask()
- {
- return m_MethodMask;
- }
-
- float GetBaitTypeSensitivity(ECatchingBaitCategories type)
- {
- return 1.0;
- }
-
- float GetQualityForYieldItem(CatchingContextBase ctx)
- {
- float res = m_QualityBase;
- res += ctx.GetQualityModifier();
-
- return res;
- }
-
- float GetChanceForYieldItem(CatchingContextBase ctx)
- {
- float ret = 1.0;
- //ctx.UpdateBaseProbability(this);
- ctx.ModifySignalProbability(ret);
- return ret;
- }
-
- ////////////////
- //effects info
- //////////////
-
- string GetCatchDeathSoundset()
- {
- return "";
- }
-
- string GetCatchAINoise()
- {
- return "";
- }
-
- float GetCatchAINoiseBaseStrength()
- {
- return 1.0;
- }
-
- int GetCatchParticleID()
- {
- return ParticleList.INVALID;
- }
- }
|