worm.c 695 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. class Worm extends Edible_Base
  2. {
  3. override bool CanBeCookedOnStick()
  4. {
  5. return false;
  6. }
  7. override bool CanBeCooked()
  8. {
  9. return false;
  10. }
  11. override bool IsMeat()
  12. {
  13. return true;
  14. }
  15. override void OnWasAttached(EntityAI parent, int slot_id)
  16. {
  17. super.OnWasAttached(parent, slot_id);
  18. if (InventorySlots.GetSlotName(slot_id) == "Bait")
  19. {
  20. SetAnimationPhase("bait_unhooked",1);
  21. SetAnimationPhase("bait_hooked",0);
  22. }
  23. }
  24. override void OnWasDetached(EntityAI parent, int slot_id)
  25. {
  26. super.OnWasDetached(parent, slot_id);
  27. if (InventorySlots.GetSlotName(slot_id) == "Bait")
  28. {
  29. SetAnimationPhase("bait_unhooked",0);
  30. SetAnimationPhase("bait_hooked",1);
  31. }
  32. }
  33. }