745 {
747
748 delta *= DayZGame.Cast(
g_Game).GetFoodDecayModifier();
750 if ( hasRootAsPlayer )
752
753
754
755
756
757
758
760 {
761
763 {
765 {
767 m_DecayTimer = ( GameConstants.DECAY_FOOD_RAW_FRVG + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_RAW_FRVG * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
769 break;
770
772 m_DecayTimer = ( GameConstants.DECAY_FOOD_BOILED_FRVG + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_BOILED_FRVG * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
774 break;
775
777 m_DecayTimer = ( GameConstants.DECAY_FOOD_BAKED_FRVG + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_BAKED_FRVG * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
779 break;
780
784 default:
787 return;
788 }
789
790
791 }
792
794
796 {
798 {
799
801 {
803 }
805 {
806 int rng = Math.RandomIntInclusive( 0, 100 );
807 if ( rng > GameConstants.DECAY_FOOD_FRVG_DRIED_CHANCE )
808 {
810 }
811 else
812 {
814 {
816 }
817 else
818 {
820 }
821 }
822 }
823 }
824 }
825
826 }
828 {
829
831 {
833 {
835 m_DecayTimer = ( GameConstants.DECAY_FOOD_RAW_MEAT + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_RAW_MEAT * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
837 break;
838
840 m_DecayTimer = ( GameConstants.DECAY_FOOD_BOILED_MEAT + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_BOILED_MEAT * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
842 break;
843
845 m_DecayTimer = ( GameConstants.DECAY_FOOD_BAKED_MEAT + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_BAKED_MEAT * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
847 break;
848
850 m_DecayTimer = ( GameConstants.DECAY_FOOD_DRIED_MEAT + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_DRIED_MEAT * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
852 break;
853
856 default:
859 return;
860 }
861 }
862
864
866 {
868 {
869
871 {
873 }
874 }
875 }
876 }
878 {
879
881 {
883 {
885 m_DecayTimer = ( GameConstants.DECAY_FOOD_RAW_CORPSE + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_RAW_CORPSE * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
887 break;
888
891 default:
894 return;
895 }
896 }
897
899
901 {
903 {
904
906 {
908 }
909 }
910 }
911 }
912 else
913 {
914
916
918 {
919 m_DecayTimer = ( GameConstants.DECAY_FOOD_CAN_OPEN + ( Math.RandomFloat01() * ( GameConstants.DECAY_FOOD_DRIED_MEAT * ( GameConstants.DECAY_TIMER_RANDOM_PERCENTAGE / 100.0 ) ) ) );
921
922 }
923 else
924 {
926 {
929 }
930 }
931 }
932 }
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