sewingkit.c 591 B

12345678910111213141516171819202122232425262728293031323334353637
  1. class SewingKit: Inventory_Base
  2. {
  3. override void SetActions()
  4. {
  5. super.SetActions();
  6. AddAction(ActionRepairTent);
  7. AddAction(ActionRepairShelter);
  8. AddAction(ActionSewTarget);
  9. AddAction(ActionSewSelf);
  10. }
  11. override float GetInfectionChance(int system = 0, Param param = null)
  12. {
  13. if(m_Cleanness == 1)
  14. {
  15. return 0;
  16. }
  17. else
  18. {
  19. return 0.3;
  20. }
  21. }
  22. override bool CanBeDisinfected()
  23. {
  24. return true;
  25. }
  26. override void OnCombine(ItemBase other_item)
  27. {
  28. super.OnCombine(other_item);
  29. if (m_Cleanness == 1 && other_item.m_Cleanness == 0)
  30. SetCleanness(0);
  31. }
  32. };