actionattachseeds.c 414 B

12345678910111213
  1. class ActionAttachSeeds : ActionAttach
  2. {
  3. override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
  4. {
  5. EntityAI targetEntity = EntityAI.Cast(target.GetObject());
  6. if (targetEntity && !GardenBase.Cast(targetEntity) && item)
  7. {
  8. return targetEntity.GetInventory() && targetEntity.GetInventory().CanAddAttachment(item) && !targetEntity.CanUseConstruction());
  9. }
  10. return false;
  11. }
  12. }