handdrillkit.c 718 B

12345678910111213141516171819202122232425262728293031323334353637
  1. class HandDrillKit extends ItemBase
  2. {
  3. //! Override this method and and check if the given item can be ignited. It is not necesarry to check here if the item is not in cargo of something.
  4. override bool CanIgniteItem( EntityAI ignite_target = NULL )
  5. {
  6. return true;
  7. }
  8. override void OnIgnitedTarget( EntityAI target_item )
  9. {
  10. if ( GetGame().IsServer() )
  11. {
  12. DecreaseHealth( 20 );
  13. }
  14. }
  15. override void OnIgnitedTargetFailed( EntityAI target_item )
  16. {
  17. if ( GetGame().IsServer() )
  18. {
  19. DecreaseHealth( 20 );
  20. }
  21. }
  22. override void SetActions()
  23. {
  24. super.SetActions();
  25. AddAction(ActionLightItemOnFire);
  26. }
  27. /*
  28. override bool IsTargetIgnitionSuccessful( EntityAI item_target = NULL )
  29. {
  30. }
  31. */
  32. }