2024-01-27 16:13:43 +02:00
|
|
|
extends StaticBody3D
|
|
|
|
|
2024-05-27 13:30:43 +03:00
|
|
|
var camera_follower: CameraFollower
|
|
|
|
|
2024-05-02 20:35:47 +03:00
|
|
|
@export var entity_id: String
|
2024-04-17 17:49:58 +03:00
|
|
|
var icon = R.state("question_mark")
|
|
|
|
var icon_color = R.state(Color(1, 1, 1, 1))
|
2024-05-27 13:30:43 +03:00
|
|
|
var show_settings = R.state(false)
|
2024-01-27 16:13:43 +02:00
|
|
|
|
|
|
|
func _ready():
|
|
|
|
var movable = get_node("Movable")
|
2024-05-27 13:30:43 +03:00
|
|
|
camera_follower = get_node_or_null("CameraFollower")
|
|
|
|
|
|
|
|
if camera_follower == null:
|
|
|
|
camera_follower = CameraFollower.new()
|
|
|
|
add_child(camera_follower)
|
|
|
|
|
|
|
|
R.effect(func(_args):
|
|
|
|
if show_settings.value == true:
|
|
|
|
camera_follower.enabled=true
|
|
|
|
)
|
2024-01-27 16:13:43 +02:00
|
|
|
|
|
|
|
if movable:
|
|
|
|
movable.on_moved.connect(func():
|
2024-05-22 19:38:28 +03:00
|
|
|
App.house.save_all_entities()
|
2024-01-27 16:13:43 +02:00
|
|
|
)
|
2024-05-24 22:08:27 +03:00
|
|
|
|
2024-05-27 13:30:43 +03:00
|
|
|
func set_options(_options):
|
|
|
|
return
|
|
|
|
|
2024-05-24 22:08:27 +03:00
|
|
|
func get_options():
|
2024-05-27 13:30:43 +03:00
|
|
|
return {}
|
|
|
|
|
|
|
|
func toggle_settings():
|
|
|
|
show_settings.value = !show_settings.value
|