seeding-planets/common/inventory/scripts/items/trowel.gd

21 lines
499 B
GDScript

extends Fork
class_name Trowel
const TROWEL_ZONE_RADIUS = 50
func get_item_name() -> String:
return "Trowel"
func get_description() -> String:
return "Use it to harvest mature plants, can get a [b]bonus seed[/b] from each plant."
func get_icon() -> Texture2D:
return preload("res://common/icons/trowel.svg")
func get_usage_zone_radius() -> int:
return TROWEL_ZONE_RADIUS
func harvest(p : Plant, player: Player):
ProduceSeedsEffect.new(1).effect(p)
player.play_sfx("harvest")
p.harvest()