consumables.c 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. class Bandana_ColorBase: Clothing
  2. {
  3. override void SetActions()
  4. {
  5. super.SetActions();
  6. AddAction(ActionBandageTarget);
  7. AddAction(ActionBandageSelf);
  8. AddAction(ActionWringClothes);
  9. }
  10. void Bandana_ColorBase()
  11. {
  12. }
  13. override bool CanBeDisinfected()
  14. {
  15. return true;
  16. }
  17. override float GetBandagingEffectivity()
  18. {
  19. return 0.5;
  20. };
  21. override float GetInfectionChance(int system = 0, Param param = null)
  22. {
  23. if(m_Cleanness == 1)
  24. {
  25. return 0.00;
  26. }
  27. else
  28. {
  29. return 0.15;
  30. }
  31. }
  32. override protected set<int> GetAttachmentExclusionInitSlotValue(int slotId)
  33. {
  34. set<int> ret = super.GetAttachmentExclusionInitSlotValue(slotId);
  35. switch (slotId)
  36. {
  37. case InventorySlots.HEADGEAR:
  38. return ret;//no discernable conflict here
  39. break;
  40. default:
  41. ret.Insert(EAttExclusions.EXCLUSION_MASK_3);
  42. ret.Insert(EAttExclusions.SHAVING_MASK_ATT_0);
  43. break;
  44. }
  45. return ret;
  46. }
  47. };
  48. class Bandana_RedPattern: Bandana_ColorBase {};
  49. class Bandana_BlackPattern: Bandana_ColorBase {};
  50. class Bandana_PolkaPattern: Bandana_ColorBase {};
  51. class Bandana_Greenpattern: Bandana_ColorBase {};
  52. class Bandana_CamoPattern: Bandana_ColorBase {};
  53. class Bandana_Blue: Bandana_ColorBase {};
  54. class Bandana_Pink: Bandana_ColorBase {};
  55. class Bandana_Yellow: Bandana_ColorBase {};
  56. class Shemag_ColorBase: Clothing
  57. {
  58. override void SetActions()
  59. {
  60. super.SetActions();
  61. AddAction(ActionBandageTarget);
  62. AddAction(ActionBandageSelf);
  63. AddAction(ActionWringClothes);
  64. }
  65. void Shemag_ColorBase()
  66. {
  67. }
  68. override bool CanBeDisinfected()
  69. {
  70. return true;
  71. }
  72. override float GetBandagingEffectivity()
  73. {
  74. return 0.5;
  75. };
  76. override float GetInfectionChance(int system = 0, Param param = null)
  77. {
  78. if(m_Cleanness == 1)
  79. {
  80. return 0.00;
  81. }
  82. else
  83. {
  84. return 0.15;
  85. }
  86. }
  87. override protected set<int> GetAttachmentExclusionInitSlotValue(int slotId)
  88. {
  89. set<int> ret = super.GetAttachmentExclusionInitSlotValue(slotId);
  90. switch (slotId)
  91. {
  92. case InventorySlots.HEADGEAR:
  93. ret.Insert(EAttExclusions.EXCLUSION_MASK_2);
  94. break;
  95. default:
  96. ret.Insert(EAttExclusions.EXCLUSION_MASK_2);
  97. ret.Insert(EAttExclusions.EXCLUSION_MASK_3);
  98. ret.Insert(EAttExclusions.SHAVING_MASK_ATT_0);
  99. break;
  100. }
  101. return ret;
  102. }
  103. };
  104. class Shemag_Brown: Shemag_ColorBase {};
  105. class Shemag_Green: Shemag_ColorBase {};
  106. class Shemag_Red: Shemag_ColorBase {};
  107. class Shemag_White: Shemag_ColorBase {};
  108. class BatteryD: ItemBase {};
  109. class Bone: ItemBase
  110. {
  111. override void SetActions()
  112. {
  113. super.SetActions();
  114. AddAction(ActionCraftBoneKnife);
  115. AddAction(ActionCraftBoneKnifeEnv);
  116. }
  117. };
  118. class BurlapStrip: ItemBase {};
  119. class ButaneCanister: ItemBase {};
  120. class DuctTape: ItemBase
  121. {
  122. override void SetActions()
  123. {
  124. super.SetActions();
  125. AddAction(ActionRepairTent);
  126. AddAction(ActionRepairShelter);
  127. //AddAction(ActionRepairPart);
  128. AddAction(ActionRestrainTarget);
  129. AddAction(ActionRestrainSelf);
  130. }
  131. };
  132. class Flashbang: ItemBase {};
  133. class LargeGasCanister: ItemBase
  134. {
  135. override bool CanSwitchDuringAttach(EntityAI parent)
  136. {
  137. return true;
  138. }
  139. override string GetDestructionBehaviour()
  140. {
  141. return "DestructionEffectGasCanister";
  142. }
  143. override bool IsDestructionBehaviour()
  144. {
  145. if (GetQuantity() > 0)
  146. {
  147. return true;
  148. }
  149. else
  150. {
  151. return false;
  152. }
  153. }
  154. };
  155. class MediumGasCanister: ItemBase
  156. {
  157. override bool CanSwitchDuringAttach(EntityAI parent)
  158. {
  159. return true;
  160. }
  161. override string GetDestructionBehaviour()
  162. {
  163. return "DestructionEffectGasCanister";
  164. }
  165. override bool IsDestructionBehaviour()
  166. {
  167. if (GetQuantity() > 0)
  168. {
  169. return true;
  170. }
  171. else
  172. {
  173. return false;
  174. }
  175. }
  176. };
  177. class NailBox: Box_Base {};
  178. class Netting: ItemBase {};
  179. class SmallGasCanister: ItemBase
  180. {
  181. override bool CanSwitchDuringAttach(EntityAI parent)
  182. {
  183. return true;
  184. }
  185. override string GetDestructionBehaviour()
  186. {
  187. return "DestructionEffectGasCanister";
  188. }
  189. override bool IsDestructionBehaviour()
  190. {
  191. if (GetQuantity() > 0)
  192. {
  193. return true;
  194. }
  195. else
  196. {
  197. return false;
  198. }
  199. }
  200. };
  201. class SmallStone: ItemBase
  202. {
  203. override void SetActions()
  204. {
  205. super.SetActions();
  206. AddAction(ActionCraftStoneKnifeEnv);
  207. }
  208. };
  209. class Spraycan_ColorBase: ItemBase {};
  210. class Spraycan_Black: Spraycan_ColorBase {};
  211. class Spraycan_Green: Spraycan_ColorBase {};
  212. class TannedLeather: ItemBase
  213. {
  214. override void SetActions()
  215. {
  216. super.SetActions();
  217. AddAction(ActionAttachToConstruction);
  218. }
  219. };