actioneatmeat.c 756 B

12345678910111213141516171819202122232425262728293031
  1. class ActionEatMeatCB : ActionContinuousBaseCB
  2. {
  3. override void CreateActionComponent()
  4. {
  5. m_ActionData.m_ActionComponent = new CAContinuousQuantityEdible(UAQuantityConsumed.EAT_NORMAL,UATimeSpent.DEFAULT);
  6. }
  7. };
  8. class ActionEatMeat: ActionEatBig
  9. {
  10. void ActionEatMeat()
  11. {
  12. m_CallbackClass = ActionEatMeatCB;
  13. }
  14. override void ApplyModifiers( ActionData action_data )
  15. {
  16. Edible_Base food_item = Edible_Base.Cast( action_data.m_MainItem );
  17. if ( food_item )
  18. {
  19. if ( food_item.IsMeat() && food_item.IsFoodRaw() )
  20. {
  21. PluginLifespan module_lifespan = PluginLifespan.Cast( GetPlugin( PluginLifespan ) );
  22. if( module_lifespan )
  23. {
  24. module_lifespan.UpdateBloodyHandsVisibility( action_data.m_Player, true );
  25. }
  26. }
  27. }
  28. }
  29. }