29 lines
681 B
GDScript
29 lines
681 B
GDScript
extends Item
|
|
class_name ShipPortal
|
|
|
|
func get_item_name() -> String:
|
|
return tr("SHIP_TELEPORT")
|
|
|
|
func get_item_type() -> ItemType:
|
|
return Item.ItemType.TOOL_ITEM
|
|
|
|
func get_description() -> String:
|
|
return tr("SHIP_TELEPORT_DESC_TEXT")
|
|
|
|
func get_icon() -> Texture2D:
|
|
return preload("res://common/icons/chevrons-up.svg")
|
|
|
|
func get_energy_used() -> int:
|
|
return 0
|
|
|
|
func get_usage_zone_radius() -> int:
|
|
return 0
|
|
|
|
func can_use(_player : Player, _zone: Player.ActionZone) -> bool:
|
|
return true
|
|
|
|
func use_text() -> String:
|
|
return tr("SHIP_TELEPORT_USE_TEXT")
|
|
|
|
func use(_player : Player, _zone: Player.ActionZone):
|
|
SceneManager.change_to_scene_id('COCKPIT') |