Advertisement
Guest User

Untitled

a guest
Jan 29th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. local function on_use(inst, target, pos)
  2.  
  3. -- So we don't have to type 'target.components' before each component.
  4. local target = target and target.components
  5.  
  6. -- For growables.
  7. if target and target.growable then
  8. -- Technically this is infinite, but it'll cap out at the max growth state.
  9. target.growable:SetStage(4)
  10. end
  11.  
  12. -- For crops.
  13. if target and target.crop then
  14. target.crop:Mature()
  15. end
  16.  
  17. -- For other pickables.
  18. if target and target.pickable then
  19. target.pickable:Regen()
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement