741 {
743
744 delta *= DayZGame.Cast(
GetGame()).GetFoodDecayModifier();
746 if ( hasRootAsPlayer )
748
749
750
751
752
753
754
756 {
757
759 {
761 {
763 m_DecayTimer = ( GameConstants.DECAY_FOOD_RAW_FRVG + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_RAW_FRVG * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
765 break;
766
768 m_DecayTimer = ( GameConstants.DECAY_FOOD_BOILED_FRVG + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_BOILED_FRVG * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
770 break;
771
773 m_DecayTimer = ( GameConstants.DECAY_FOOD_BAKED_FRVG + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_BAKED_FRVG * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
775 break;
776
780 default:
783 return;
784 }
785
786
787 }
788
790
792 {
794 {
795
797 {
799 }
801 {
802 int rng = Math.RandomIntInclusive( 0, 100 );
803 if ( rng > GameConstants.DECAY_FOOD_FRVG_DRIED_CHANCE )
804 {
806 }
807 else
808 {
810 {
812 }
813 else
814 {
816 }
817 }
818 }
819 }
820 }
821
822 }
824 {
825
827 {
829 {
831 m_DecayTimer = ( GameConstants.DECAY_FOOD_RAW_MEAT + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_RAW_MEAT * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
833 break;
834
836 m_DecayTimer = ( GameConstants.DECAY_FOOD_BOILED_MEAT + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_BOILED_MEAT * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
838 break;
839
841 m_DecayTimer = ( GameConstants.DECAY_FOOD_BAKED_MEAT + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_BAKED_MEAT * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
843 break;
844
846 m_DecayTimer = ( GameConstants.DECAY_FOOD_DRIED_MEAT + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_DRIED_MEAT * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
848 break;
849
852 default:
855 return;
856 }
857 }
858
860
862 {
864 {
865
867 {
869 }
870 }
871 }
872 }
874 {
875
877 {
879 {
881 m_DecayTimer = ( GameConstants.DECAY_FOOD_RAW_CORPSE + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_RAW_CORPSE * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
883 break;
884
887 default:
890 return;
891 }
892 }
893
895
897 {
899 {
900
902 {
904 }
905 }
906 }
907 }
908 else
909 {
910
912
914 {
915 m_DecayTimer = ( GameConstants.DECAY_FOOD_CAN_OPEN + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_DRIED_MEAT * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
917
918 }
919 else
920 {
922 {
925 }
926 }
927 }
928 }
override void InsertAgent(int agent, float count=1)
FoodStageType GetFoodStageType()
override bool IsMushroom()
void ChangeFoodStage(FoodStageType new_food_stage_type)
bool CanChangeToNewStage(CookingMethodType cooking_method)
FoodStageType m_LastDecayStage
proto native CGame GetGame()