@tool extends Item class_name Seed @export var plant_type: PlantType : set(v): plant_type = v if plant_type: name = plant_type.name description = plant_type.description icon = plant_type.seed_texture func _init(_plant_type : PlantType = null): plant_type = _plant_type func use_text() -> String: return "Plant " + plant_type.name func is_one_time_use(): return true func can_use(player : Player, zone : Area2D) -> bool: var is_there_a_plant_here = false for area in zone.get_overlapping_areas() : if area is Plant: is_there_a_plant_here = true return not is_there_a_plant_here and not player.planet.is_there_contamination(zone.global_position) func use(player : Player, zone : Area2D) -> bool: player.play_sfx("dig") return player.planet.plant(plant_type, zone.global_position)