Compare commits
1 Commits
2252a80bb9
...
feature/ed
| Author | SHA1 | Date | |
|---|---|---|---|
| 89440a0180 |
@@ -0,0 +1,21 @@
|
||||
@tool
|
||||
extends GridContainer
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
refresh()
|
||||
|
||||
|
||||
func refresh() -> void:
|
||||
var characters := ESCEditorHelper.get_characters()
|
||||
for character in characters:
|
||||
var button = ESCCharacterGridButton.new()
|
||||
button.text = character
|
||||
button.character_path = characters[character]
|
||||
add_child(button)
|
||||
|
||||
|
||||
func _clear() -> void:
|
||||
for child in get_children():
|
||||
remove_child(child)
|
||||
child.queue_free()
|
||||
@@ -0,0 +1 @@
|
||||
uid://cprmhtbtpwqtn
|
||||
@@ -0,0 +1,14 @@
|
||||
@tool
|
||||
class_name ESCCharacterGridButton
|
||||
extends Button
|
||||
|
||||
var character_path: String
|
||||
|
||||
var _loaded_character = ESCPlayer
|
||||
|
||||
func _ready():
|
||||
pressed.connect(_button_pressed)
|
||||
|
||||
|
||||
func _button_pressed():
|
||||
EditorInterface.open_scene_from_path(character_path)
|
||||
@@ -0,0 +1 @@
|
||||
uid://sprnym2weug8
|
||||
@@ -0,0 +1,59 @@
|
||||
@tool
|
||||
class_name ESCItemGridButton
|
||||
extends VBoxContainer
|
||||
|
||||
const RESIZE_RATIO: float = 0.5
|
||||
|
||||
|
||||
var _item_path: String
|
||||
var _loaded_item: ESCItem
|
||||
var _use_inventory_texture: bool = false
|
||||
|
||||
func _init(item_path: String, use_inventory_texture: bool):
|
||||
_item_path = item_path
|
||||
_use_inventory_texture = use_inventory_texture
|
||||
|
||||
|
||||
func _ready():
|
||||
_loaded_item = load(_item_path).instantiate()
|
||||
|
||||
var button = TextureButton.new()
|
||||
var texture: Texture = _get_item_texture(_loaded_item)
|
||||
|
||||
#button.ignore_texture_size = true
|
||||
button.stretch_mode = TextureButton.STRETCH_KEEP_CENTERED
|
||||
button.texture_normal = texture
|
||||
|
||||
button.custom_minimum_size = Vector2i(150,150)
|
||||
button.gui_input.connect(_on_button_gui_input)
|
||||
add_child(button)
|
||||
|
||||
var label = Label.new()
|
||||
label.text = _loaded_item.global_id
|
||||
label.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS_FORCE
|
||||
label.custom_minimum_size = Vector2i(150, 0)
|
||||
label.gui_input.connect(_on_label_gui_input)
|
||||
label.tooltip_text = _item_path
|
||||
add_child(label)
|
||||
|
||||
|
||||
func _on_button_gui_input(event: InputEvent):
|
||||
if event is InputEventMouseButton:
|
||||
if event.button_index == MouseButton.MOUSE_BUTTON_LEFT and event.double_click:
|
||||
EditorInterface.open_scene_from_path(_item_path)
|
||||
EditorInterface.edit_node(EditorInterface.get_edited_scene_root())
|
||||
|
||||
|
||||
func _on_label_gui_input(event: InputEvent):
|
||||
if event is InputEventMouseButton:
|
||||
print("D")
|
||||
if event.button_index == MouseButton.MOUSE_BUTTON_LEFT and event.double_click:
|
||||
DisplayServer.clipboard_set(_item_path)
|
||||
escoria.logger.info(self, "%s copied." % _item_path)
|
||||
|
||||
func _get_item_texture(item: ESCItem):
|
||||
if _use_inventory_texture:
|
||||
return item._get_inventory_texture()
|
||||
for c in item.get_children():
|
||||
if c is TextureRect or c is Sprite2D:
|
||||
return c.texture
|
||||
@@ -0,0 +1 @@
|
||||
uid://bqll8erv6o7kd
|
||||
@@ -0,0 +1,13 @@
|
||||
@tool
|
||||
class_name ESCRoomGridButton
|
||||
extends Button
|
||||
|
||||
var room_path: String
|
||||
|
||||
|
||||
func _ready():
|
||||
pressed.connect(_button_pressed)
|
||||
|
||||
|
||||
func _button_pressed():
|
||||
EditorInterface.open_scene_from_path(room_path)
|
||||
@@ -0,0 +1 @@
|
||||
uid://da4n8ed4moe6y
|
||||
@@ -0,0 +1,22 @@
|
||||
@tool
|
||||
extends Control
|
||||
class_name ESCRoomInspectorItem
|
||||
|
||||
@onready var label: Label = %Label
|
||||
@onready var button_pinpoint: Button = %ButtonPinpoint
|
||||
|
||||
var _item: ESCItem
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
button_pinpoint.pressed.connect(_on_pinpoint_pressed)
|
||||
|
||||
|
||||
func set_item(item: ESCItem) -> void:
|
||||
_item = item
|
||||
label.text = item.global_id
|
||||
|
||||
|
||||
func _on_pinpoint_pressed():
|
||||
print("PINPOINT: %s" % _item.global_id, "Owner: %s" % _item.owner)
|
||||
EditorInterface.edit_node(_item)
|
||||
@@ -0,0 +1 @@
|
||||
uid://qk4h81i8pcsw
|
||||
@@ -0,0 +1,34 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://uii3u2y0w3yo"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://qk4h81i8pcsw" path="res://addons/escoria-ui-return-monkey-island/editor-tools/elements/esc_room_inspector_item.gd" id="1_lqbf8"]
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
custom_minimum_size = Vector2(0, 15)
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource("1_lqbf8")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "turno_cocina"
|
||||
|
||||
[node name="ButtonPinpoint" type="Button" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "."
|
||||
@@ -0,0 +1,89 @@
|
||||
@tool
|
||||
class_name ESCEditorHelper
|
||||
|
||||
const FILE_EXTENSION_ASHES = "esc"
|
||||
const DIRECTORIES_TO_EXCLUDE = ["addons"]
|
||||
const BASE_PROJECT_DIR = "res://"
|
||||
|
||||
|
||||
static func get_element(element_path: String) -> Dictionary:
|
||||
var element_list: Dictionary = {}
|
||||
var path = ProjectSettings.globalize_path(element_path)
|
||||
if not OS.has_feature("editor"):
|
||||
path = OS.get_executable_path().get_base_dir().path_join(path)
|
||||
|
||||
var dir = DirAccess.open(path)
|
||||
|
||||
if dir != null:
|
||||
dir.list_dir_begin() # TODOConverter3To4 fill missing arguments https://github.com/godotengine/godot/pull/40547
|
||||
var file_name = dir.get_next()
|
||||
while file_name != "":
|
||||
if dir.current_is_dir():
|
||||
element_list.set(file_name, "%s/%s/%s.tscn" % [element_path, file_name, file_name])
|
||||
file_name = dir.get_next()
|
||||
|
||||
element_list.sort()
|
||||
|
||||
else:
|
||||
ESCSafeLogging.log_warn(
|
||||
ESCEditorHelper, "A problem occurred while opening rooms folder %s." % str(path)
|
||||
)
|
||||
|
||||
return element_list
|
||||
|
||||
|
||||
static func get_rooms() -> Dictionary:
|
||||
var rooms_folder = ESCProjectSettingsManager.get_setting(
|
||||
ESCProjectSettingsManager.ROOM_SELECTOR_ROOM_DIR
|
||||
)
|
||||
if rooms_folder == "":
|
||||
return {}
|
||||
return get_element(rooms_folder)
|
||||
|
||||
|
||||
static func get_characters() -> Dictionary:
|
||||
var rooms_folder = "res://gymkhana/characters"
|
||||
if rooms_folder == "":
|
||||
return {}
|
||||
return get_element(rooms_folder)
|
||||
|
||||
|
||||
static func get_items() -> Array:
|
||||
var items_path = (
|
||||
ESCProjectSettingsManager
|
||||
. get_setting(ESCProjectSettingsManager.INVENTORY_ITEMS_PATH)
|
||||
. trim_suffix("/")
|
||||
)
|
||||
var files: Array = _get_files("tscn", items_path)
|
||||
#var files = []
|
||||
return files
|
||||
|
||||
|
||||
static func _get_files(extension: String, path: String) -> Array:
|
||||
var dir = DirAccess.open(path)
|
||||
var files := []
|
||||
|
||||
if dir:
|
||||
dir.list_dir_begin()
|
||||
else:
|
||||
ESCSafeLogging.log_warn(ESCEditorHelper, "Unable to open '%s'." % path)
|
||||
return files
|
||||
|
||||
var filename: String = dir.get_next()
|
||||
|
||||
while not filename.is_empty():
|
||||
var filename_with_path: String = _make_full_path(dir.get_current_dir(), filename)
|
||||
|
||||
if not dir.current_is_dir():
|
||||
if filename.get_extension() == extension:
|
||||
files.append(filename_with_path)
|
||||
|
||||
filename = dir.get_next()
|
||||
|
||||
return files
|
||||
|
||||
|
||||
static func _make_full_path(directory: String, filename: String) -> String:
|
||||
var separator: String = "" if directory.ends_with("/") else "/"
|
||||
|
||||
return directory + separator + filename
|
||||
@@ -0,0 +1 @@
|
||||
uid://dwy5heuqtglo8
|
||||
@@ -0,0 +1,12 @@
|
||||
@tool
|
||||
class_name ESCEscoriaDock
|
||||
extends Panel
|
||||
|
||||
@onready var tab_container: TabContainer = %TabContainer
|
||||
|
||||
func _ready() -> void:
|
||||
tab_container.tab_changed.connect(_on_tab_changed)
|
||||
|
||||
func _on_tab_changed(current_tab) -> void:
|
||||
print("Tab change %s" % current_tab)
|
||||
return
|
||||
@@ -0,0 +1 @@
|
||||
uid://q3bxu7fjbxrb
|
||||
@@ -0,0 +1,49 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cx10t424sepxe"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://q3bxu7fjbxrb" path="res://addons/escoria-ui-return-monkey-island/editor-tools/esc_escoria_dock.gd" id="1_ff15v"]
|
||||
[ext_resource type="Script" uid="uid://7r7dgsfeiuic" path="res://addons/escoria-ui-return-monkey-island/editor-tools/rooms_grid.gd" id="2_fm76t"]
|
||||
[ext_resource type="PackedScene" uid="uid://y1u61mgoeluv" path="res://addons/escoria-ui-return-monkey-island/editor-tools/esc_escoria_dock_items.tscn" id="3_fm76t"]
|
||||
[ext_resource type="Script" uid="uid://cprmhtbtpwqtn" path="res://addons/escoria-ui-return-monkey-island/editor-tools/characters_grid.gd" id="4_uu37h"]
|
||||
|
||||
[node name="Escoria" type="Panel"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_ff15v")
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
current_tab = 0
|
||||
|
||||
[node name="Rooms" type="ScrollContainer" parent="TabContainer"]
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 0
|
||||
|
||||
[node name="RoomsGrid" type="GridContainer" parent="TabContainer/Rooms"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
columns = 10
|
||||
script = ExtResource("2_fm76t")
|
||||
|
||||
[node name="Items" parent="TabContainer" instance=ExtResource("3_fm76t")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 1
|
||||
|
||||
[node name="Characters" type="ScrollContainer" parent="TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 2
|
||||
|
||||
[node name="CharactersGrid" type="GridContainer" parent="TabContainer/Characters"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("4_uu37h")
|
||||
@@ -0,0 +1,13 @@
|
||||
@tool
|
||||
extends VBoxContainer
|
||||
|
||||
@onready var check_inventory_texture: CheckButton = %CheckInventoryTexture
|
||||
@onready var items_grid: GridContainer = %ItemsGrid
|
||||
|
||||
func _ready():
|
||||
check_inventory_texture.toggled.connect(_on_inventory_texture_toggled)
|
||||
|
||||
func _on_inventory_texture_toggled(is_toggled: bool):
|
||||
items_grid.use_inventory_texture = is_toggled
|
||||
items_grid.refresh()
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://cqrwlqhfdth14
|
||||
@@ -0,0 +1,35 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://y1u61mgoeluv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dsrwrbxtdbccb" path="res://addons/escoria-ui-return-monkey-island/editor-tools/items_tab.gd" id="1_osotr"]
|
||||
[ext_resource type="Script" uid="uid://cqrwlqhfdth14" path="res://addons/escoria-ui-return-monkey-island/editor-tools/esc_escoria_dock_items.gd" id="1_ukssm"]
|
||||
|
||||
[node name="Items" type="VBoxContainer"]
|
||||
offset_right = 1227.0
|
||||
offset_bottom = 285.0
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource("1_ukssm")
|
||||
|
||||
[node name="MenuBar" type="MenuBar" parent="."]
|
||||
custom_minimum_size = Vector2(0, 35)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CheckInventoryTexture" type="CheckButton" parent="MenuBar"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_right = 44.0
|
||||
offset_bottom = 24.0
|
||||
text = "Invetory texture"
|
||||
|
||||
[node name="Items" type="ScrollContainer" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
metadata/_tab_index = 2
|
||||
|
||||
[node name="ItemsGrid" type="GridContainer" parent="Items"]
|
||||
unique_name_in_owner = true
|
||||
clip_contents = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
columns = 7
|
||||
script = ExtResource("1_osotr")
|
||||
@@ -0,0 +1,49 @@
|
||||
@tool
|
||||
class_name ESCRoomInspectorDock
|
||||
extends Panel
|
||||
|
||||
@onready var current_room_label: Label = %CurrentRoomLabelValue
|
||||
@onready var room_objects_list: VBoxContainer = %RoomObjectsList
|
||||
|
||||
const room_item_control = preload("res://addons/escoria-ui-return-monkey-island/editor-tools/elements/esc_room_inspector_item.tscn")
|
||||
|
||||
func scene_changed(root_node: Node) -> void:
|
||||
_clear_room_objects_list()
|
||||
|
||||
var room_objects = []
|
||||
if not root_node is ESCRoom:
|
||||
current_room_label.text = "No room selected."
|
||||
return
|
||||
|
||||
var room_node = root_node as ESCRoom
|
||||
|
||||
current_room_label.text = room_node.global_id
|
||||
for child in root_node.get_children():
|
||||
if child is ESCItem:
|
||||
var ui_item = room_item_control.instantiate()
|
||||
room_objects_list.add_child(ui_item)
|
||||
ui_item.set_item(child)
|
||||
|
||||
|
||||
func scene_closed(filepath: String) -> void:
|
||||
check_open_scenes()
|
||||
|
||||
# From: https://github.com/carenalgas/popochiu/blob/develop/addons/popochiu/editor/main_dock/popochiu_dock.gd
|
||||
func check_open_scenes() -> void:
|
||||
# Fixes #273: Since Godot is not triggering the EditorPlugin.scene_changed signal when opening a
|
||||
# scene when no other scenes are opened, listen to the EditorSelection.selection_changed signal
|
||||
await get_tree().process_frame
|
||||
if EditorInterface.get_open_scenes().is_empty():
|
||||
EditorInterface.get_selection().selection_changed.connect(_on_editor_selection_changed)
|
||||
|
||||
|
||||
func _on_editor_selection_changed() -> void:
|
||||
if EditorInterface.get_edited_scene_root():
|
||||
EditorInterface.get_selection().selection_changed.disconnect(_on_editor_selection_changed)
|
||||
scene_changed(EditorInterface.get_edited_scene_root())
|
||||
|
||||
|
||||
func _clear_room_objects_list() -> void:
|
||||
for child in room_objects_list.get_children():
|
||||
room_objects_list.remove_child(child)
|
||||
child.queue_free()
|
||||
@@ -0,0 +1 @@
|
||||
uid://b2euhjc1kb6cn
|
||||
@@ -0,0 +1,45 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dtb2gkj65kpug"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b2euhjc1kb6cn" path="res://addons/escoria-ui-return-monkey-island/editor-tools/esc_room_inspector_dock.gd" id="1_lnj8i"]
|
||||
|
||||
[node name="Room" type="Panel"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_lnj8i")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CurrentRoomLabel" type="Label" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CurrentRoomLabelValue" type="Label" parent="VBoxContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "CURRENT_ROOM"
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
current_tab = 0
|
||||
|
||||
[node name="Items" type="ScrollContainer" parent="VBoxContainer/TabContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
metadata/_tab_index = 0
|
||||
|
||||
[node name="RoomObjectsList" type="VBoxContainer" parent="VBoxContainer/TabContainer/Items"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
@@ -0,0 +1,21 @@
|
||||
@tool
|
||||
extends GridContainer
|
||||
|
||||
@onready var items_grid: GridContainer = %ItemsGrid
|
||||
|
||||
var use_inventory_texture: bool = false
|
||||
|
||||
func _ready() -> void:
|
||||
refresh()
|
||||
|
||||
func refresh() -> void:
|
||||
_clear()
|
||||
for item in ESCEditorHelper.get_items():
|
||||
var button = ESCItemGridButton.new(item,use_inventory_texture)
|
||||
items_grid.add_child(button)
|
||||
|
||||
|
||||
func _clear() -> void:
|
||||
for child in get_children():
|
||||
remove_child(child)
|
||||
child.queue_free()
|
||||
@@ -0,0 +1 @@
|
||||
uid://dsrwrbxtdbccb
|
||||
@@ -0,0 +1,21 @@
|
||||
@tool
|
||||
extends GridContainer
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
refresh()
|
||||
|
||||
|
||||
func refresh() -> void:
|
||||
var rooms := ESCEditorHelper.get_rooms()
|
||||
for room in rooms:
|
||||
var button = ESCRoomGridButton.new()
|
||||
button.text = room
|
||||
button.room_path = rooms[room]
|
||||
add_child(button)
|
||||
|
||||
|
||||
func _clear() -> void:
|
||||
for child in get_children():
|
||||
remove_child(child)
|
||||
child.queue_free()
|
||||
@@ -0,0 +1 @@
|
||||
uid://7r7dgsfeiuic
|
||||
@@ -1,15 +1,16 @@
|
||||
extends ESCCompiler
|
||||
class_name RTMICompiler
|
||||
extends ESCCompiler
|
||||
|
||||
## Cached esc files
|
||||
var _esc_cache: Dictionary
|
||||
|
||||
|
||||
func load_esc_file(path: String, associated_global_id: String = "") -> ESCScript:
|
||||
if _esc_cache.has(path):
|
||||
escoria.logger.info(self, "CACHE HIT: %s" % path)
|
||||
return _esc_cache.get(path)
|
||||
escoria.logger.info(self, "CACHE MISS: %s" % path)
|
||||
|
||||
|
||||
ESCSafeLogging.log_debug(self, "Loading file '%s' for parsing..." % path)
|
||||
|
||||
if not FileAccess.file_exists(path):
|
||||
@@ -21,6 +22,7 @@ func load_esc_file(path: String, associated_global_id: String = "") -> ESCScript
|
||||
|
||||
return _compiler_shim(file.get_as_text(), path, associated_global_id)
|
||||
|
||||
|
||||
func _compiler_shim(source: String, filename: String = "", associated_global_id: String = ""):
|
||||
var script = super._compiler_shim(source, filename, associated_global_id)
|
||||
_esc_cache[filename] = script
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# Plugin script to initialize Escoria simple mouse UI
|
||||
extends EditorPlugin
|
||||
|
||||
var room_inspector_dock: ESCRoomInspectorDock
|
||||
var escoria_dock: ESCEscoriaDock
|
||||
|
||||
var _srt_loader := SrtFormatLoader.new()
|
||||
var _srt_saver := SrtFormatSaver.new()
|
||||
|
||||
@@ -17,6 +20,15 @@ func _enter_tree() -> void:
|
||||
ResourceLoader.add_resource_format_loader(_txt_loader)
|
||||
ResourceSaver.add_resource_format_saver(_txt_saver)
|
||||
|
||||
room_inspector_dock = preload("res://addons/escoria-ui-return-monkey-island/editor-tools/esc_room_inspector_dock.tscn").instantiate()
|
||||
room_inspector_dock.ready.connect(_on_room_inspector_dock_ready)
|
||||
room_inspector_dock.focus_mode = Control.FOCUS_ALL
|
||||
add_control_to_dock(DOCK_SLOT_LEFT_BR, room_inspector_dock)
|
||||
|
||||
escoria_dock = preload("res://addons/escoria-ui-return-monkey-island/editor-tools/esc_escoria_dock.tscn").instantiate()
|
||||
#escoria_dock.ready.connect(_on_dock_ready)
|
||||
escoria_dock.focus_mode = Control.FOCUS_ALL
|
||||
add_control_to_bottom_panel(escoria_dock, "Escoria")
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
@@ -25,7 +37,14 @@ func _exit_tree() -> void:
|
||||
|
||||
ResourceLoader.remove_resource_format_loader(_txt_loader)
|
||||
ResourceSaver.remove_resource_format_saver(_txt_saver)
|
||||
# Clean-up of the plugin goes here.
|
||||
# Remove the dock.
|
||||
remove_control_from_docks(room_inspector_dock)
|
||||
# Erase the control from the memory.
|
||||
room_inspector_dock.free()
|
||||
|
||||
remove_control_from_bottom_panel(escoria_dock)
|
||||
escoria_dock.free()
|
||||
|
||||
# Override function to return the plugin name.
|
||||
func _get_plugin_name():
|
||||
@@ -56,3 +75,18 @@ func _enable_plugin():
|
||||
)
|
||||
else:
|
||||
get_editor_interface().set_plugin_enabled(_get_plugin_name(), false)
|
||||
|
||||
func _on_room_inspector_dock_ready() -> void:
|
||||
# Fill the dock with Rooms, Characters, Inventory items, Dialogs and AudioCues
|
||||
room_inspector_dock.grab_focus()
|
||||
|
||||
scene_changed.connect(room_inspector_dock.scene_changed)
|
||||
scene_closed.connect(room_inspector_dock.scene_closed)
|
||||
|
||||
|
||||
|
||||
if EditorInterface.get_edited_scene_root():
|
||||
room_inspector_dock.scene_changed(EditorInterface.get_edited_scene_root())
|
||||
else:
|
||||
room_inspector_dock.check_open_scenes()
|
||||
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
@abstract class_name BaseTextPlainFormatLoader
|
||||
class_name BaseTextPlainFormatLoader
|
||||
extends ResourceFormatLoader
|
||||
|
||||
const ResourceClass = preload("res://addons/escoria-ui-return-monkey-island/resources/text_plain_resource.gd")
|
||||
@abstract func get_recognized_extensions() -> Array
|
||||
const ResourceClass = preload(
|
||||
"res://addons/escoria-ui-return-monkey-island/resources/text_plain_resource.gd"
|
||||
)
|
||||
|
||||
|
||||
func get_recognized_extensions() -> Array:
|
||||
return []
|
||||
|
||||
|
||||
func _get_recognized_extensions() -> PackedStringArray:
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
@abstract class_name BaseTextPlainFormatSaver
|
||||
class_name BaseTextPlainFormatSaver
|
||||
extends ResourceFormatSaver
|
||||
|
||||
const ResourceClass = preload(
|
||||
"res://addons/escoria-ui-return-monkey-island/resources/text_plain_resource.gd"
|
||||
)
|
||||
@abstract func get_recognized_extensions(_resource: Resource) -> Array
|
||||
|
||||
|
||||
func get_recognized_extensions(_resource: Resource) -> Array:
|
||||
return []
|
||||
|
||||
|
||||
func _get_recognized_extensions(resource: Resource) -> PackedStringArray:
|
||||
@@ -22,7 +25,7 @@ func _recognize(resource: Resource) -> bool:
|
||||
|
||||
func _save(resource: Resource, path: String, flags: int) -> int:
|
||||
var err: int
|
||||
var file = FileAccess.open(path,flags)
|
||||
var file = FileAccess.open(path, flags)
|
||||
|
||||
file.store_string(resource.get("text"))
|
||||
file.close()
|
||||
|
||||
7
addons/kenyoni/plugin_reloader/LICENSE.md
Normal file
7
addons/kenyoni/plugin_reloader/LICENSE.md
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright 2022-present Iceflower S (iceflower@gmx.de)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
61
addons/kenyoni/plugin_reloader/internal/reloader.gd
Normal file
61
addons/kenyoni/plugin_reloader/internal/reloader.gd
Normal file
@@ -0,0 +1,61 @@
|
||||
@tool
|
||||
extends MarginContainer
|
||||
|
||||
@export var _reload_button: CheckButton
|
||||
@export var _option_button: OptionButton
|
||||
|
||||
var _last_selection: String = ""
|
||||
|
||||
func _ready() -> void:
|
||||
self._option_button.item_selected.connect(func(idx: int) -> void:
|
||||
self._last_selection = self._option_button.get_item_metadata(idx)
|
||||
self._update_button_bar()
|
||||
)
|
||||
self._reload_button.toggled.connect(func(toggled: bool) -> void:
|
||||
EditorInterface.set_plugin_enabled("res://addons/" + self._last_selection + "/plugin.cfg", toggled)
|
||||
self._reload_plugin_list()
|
||||
)
|
||||
|
||||
EditorInterface.get_resource_filesystem().filesystem_changed.connect(self._reload_plugin_list)
|
||||
self._reload_plugin_list()
|
||||
|
||||
func _update_button_bar() -> void:
|
||||
if self._last_selection != "":
|
||||
self._reload_button.set_pressed_no_signal(EditorInterface.is_plugin_enabled("res://addons/" + self._last_selection + "/plugin.cfg"))
|
||||
self._option_button.icon = null
|
||||
self._reload_button.disabled = self._last_selection == ""
|
||||
|
||||
func _reload_plugin_list() -> void:
|
||||
self._option_button.clear()
|
||||
for dir: String in DirAccess.get_directories_at("res://addons/"):
|
||||
self._add_plugin_to_list(dir)
|
||||
# subfolder
|
||||
for sub_dir: String in DirAccess.get_directories_at("res://addons/" + dir):
|
||||
self._add_plugin_to_list(dir + "/" + sub_dir)
|
||||
|
||||
if self._last_selection == "" && self._option_button.get_item_count() > 0:
|
||||
self._last_selection = self._option_button.get_item_metadata(0)
|
||||
self._update_button_bar()
|
||||
|
||||
func _add_plugin_to_list(plugin_id: String) -> void:
|
||||
# ignore the current plugin
|
||||
if plugin_id == "kenyoni/plugin_reloader":
|
||||
return
|
||||
|
||||
var cfg_path: String = "res://addons/" + plugin_id + "/plugin.cfg"
|
||||
if !FileAccess.file_exists(cfg_path):
|
||||
return
|
||||
|
||||
var plugin_cfg: ConfigFile = ConfigFile.new()
|
||||
plugin_cfg.load(cfg_path)
|
||||
var plugin_name: String = plugin_cfg.get_value("plugin", "name", plugin_id)
|
||||
self._option_button.add_item(plugin_name)
|
||||
var idx: int = self._option_button.get_item_count() - 1
|
||||
self._option_button.set_item_metadata(idx, plugin_id)
|
||||
self._option_button.set_item_tooltip(idx, "res://addons/" + plugin_id + "/")
|
||||
if EditorInterface.is_plugin_enabled(cfg_path):
|
||||
self._option_button.set_item_icon(idx, self.get_theme_icon(&"TileChecked", &"EditorIcons"))
|
||||
else:
|
||||
self._option_button.set_item_icon(idx, self.get_theme_icon(&"TileUnchecked", &"EditorIcons"))
|
||||
if plugin_id == self._last_selection:
|
||||
self._option_button.select(idx)
|
||||
1
addons/kenyoni/plugin_reloader/internal/reloader.gd.uid
Normal file
1
addons/kenyoni/plugin_reloader/internal/reloader.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b6eu3fxcktuu6
|
||||
21
addons/kenyoni/plugin_reloader/internal/reloader.tscn
Normal file
21
addons/kenyoni/plugin_reloader/internal/reloader.tscn
Normal file
@@ -0,0 +1,21 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dryoyuj4vl0l5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b6eu3fxcktuu6" path="res://addons/kenyoni/plugin_reloader/internal/reloader.gd" id="1_kd7gg"]
|
||||
|
||||
[node name="Reloader" type="MarginContainer" node_paths=PackedStringArray("_reload_button", "_option_button")]
|
||||
offset_right = 76.0
|
||||
offset_bottom = 24.0
|
||||
script = ExtResource("1_kd7gg")
|
||||
_reload_button = NodePath("HBoxContainer/reload_button")
|
||||
_option_button = NodePath("HBoxContainer/OptionButton")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 0
|
||||
|
||||
[node name="reload_button" type="CheckButton" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="OptionButton" type="OptionButton" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
19
addons/kenyoni/plugin_reloader/plugin.cfg
Normal file
19
addons/kenyoni/plugin_reloader/plugin.cfg
Normal file
@@ -0,0 +1,19 @@
|
||||
[plugin]
|
||||
|
||||
name="Plugin Reloader"
|
||||
description="Enable or disable plugins from within the editor main screen."
|
||||
author="Kenyoni Software"
|
||||
version="1.1.0"
|
||||
script="plugin.gd"
|
||||
license="MIT"
|
||||
repository="https://github.com/kenyoni-software/godot-addons"
|
||||
keywords=[
|
||||
"tool"
|
||||
]
|
||||
classifiers=[
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"License :: OSI Approved :: MIT License"
|
||||
]
|
||||
|
||||
[plugin.dependencies]
|
||||
godot=">=4.2"
|
||||
20
addons/kenyoni/plugin_reloader/plugin.gd
Normal file
20
addons/kenyoni/plugin_reloader/plugin.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
@tool
|
||||
extends EditorPlugin
|
||||
|
||||
const ReloaderScene: PackedScene = preload("res://addons/kenyoni/plugin_reloader/internal/reloader.tscn")
|
||||
const Reloader := preload("res://addons/kenyoni/plugin_reloader/internal/reloader.gd")
|
||||
|
||||
var _reloader: Reloader
|
||||
|
||||
func _get_plugin_name() -> String:
|
||||
return "Plugin Reloader"
|
||||
|
||||
func _enter_tree() -> void:
|
||||
self._reloader = ReloaderScene.instantiate()
|
||||
self.add_control_to_container(CustomControlContainer.CONTAINER_TOOLBAR, self._reloader)
|
||||
# move before editor run bar
|
||||
self._reloader.get_parent().move_child(self._reloader, self._reloader.get_parent().find_child("@EditorRunBar@*", true, false).get_index())
|
||||
|
||||
func _exit_tree() -> void:
|
||||
self.remove_control_from_container(CustomControlContainer.CONTAINER_TOOLBAR, self._reloader)
|
||||
self._reloader.queue_free()
|
||||
1
addons/kenyoni/plugin_reloader/plugin.gd.uid
Normal file
1
addons/kenyoni/plugin_reloader/plugin.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bcx3j4sbnf4mw
|
||||
@@ -10,6 +10,10 @@ DESTINATION_PATH="${1:-$DEFAULT_DESTINATION_PATH}"
|
||||
|
||||
REMOTE_PATCHES=(
|
||||
#"https://patch-diff.githubusercontent.com/raw/godot-escoria/escoria-demo-game/pull/777.patch"
|
||||
"https://patch-diff.githubusercontent.com/raw/godot-escoria/escoria-demo-game/pull/791.patch"
|
||||
"https://patch-diff.githubusercontent.com/raw/godot-escoria/escoria-demo-game/pull/792.patch"
|
||||
"https://patch-diff.githubusercontent.com/raw/godot-escoria/escoria-demo-game/pull/793.patch"
|
||||
"https://patch-diff.githubusercontent.com/raw/godot-escoria/escoria-demo-game/pull/794.patch"
|
||||
)
|
||||
|
||||
PROJECT_PATH=$PWD
|
||||
|
||||
47
examples/kenyoni/plugin_reloader/README.md
Normal file
47
examples/kenyoni/plugin_reloader/README.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Godot Addons
|
||||
|
||||

|
||||
[](https://github.com/IceflowRE/go-multiprogressbar/blob/master/LICENSE.md)
|
||||
[](https://kenyoni-software.github.io/godot-addons)
|
||||
|
||||
Download [here](https://github.com/kenyoni-software/godot-addons/releases/tag/latest).
|
||||
|
||||
You can find a documentation with examples and detailed information [here](https://kenyoni-software.github.io/godot-addons).
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](./LICENSE.md)
|
||||
|
||||
---
|
||||
|
||||
> [!NOTE]
|
||||
> **Godot 4.3. or lower**
|
||||
> If you import any plugin or open a Godot project for the first time, the plugins will throw errors. To ensure correct operation, reload the project and the errors are gone.
|
||||
> *Background: most plugins are using `preload`, but on first import there is nothing which can be preloaded.*
|
||||
|
||||
## Addons
|
||||
|
||||
- [AspectRatioResizeContainer](https://kenyoni-software.github.io/godot-addons/addons/aspect_ratio_resize_container)
|
||||
Extension of `AspectRatioContainer` to update it's own size.
|
||||
- [Custom Theme Overrides](https://kenyoni-software.github.io/godot-addons/addons/custom_theme_overrides)
|
||||
Utility to provide custom theme overrides for any node.
|
||||
- [Git SHA Project Setting](https://kenyoni-software.github.io/godot-addons/addons/git_sha_project_setting)
|
||||
Add Git SHA as project setting.
|
||||
- [Hide Private Properties](https://kenyoni-software.github.io/godot-addons/addons/hide_private_properties)
|
||||
Hide private properties of instantiated child scenes.
|
||||
- [Icon Explorer](https://kenyoni-software.github.io/godot-addons/addons/icon_explorer)
|
||||
Browse different icons and save them.
|
||||
- [Icons Patcher](https://kenyoni-software.github.io/godot-addons/addons/icons_patcher)
|
||||
Patch Pictogrammers icons to white.
|
||||
- [License Manager](https://kenyoni-software.github.io/godot-addons/addons/licenses)
|
||||
Manage license and copyright for third party graphics, software or libraries.
|
||||
- [Logging](https://kenyoni-software.github.io/godot-addons/addons/glogging)
|
||||
Simple logger.
|
||||
- [Plugin Reloader](https://kenyoni-software.github.io/godot-addons/addons/plugin_reloader)
|
||||
Enable or disable plugins from within the editor main screen.
|
||||
- [QR Code](https://kenyoni-software.github.io/godot-addons/addons/qr_code)
|
||||
QRCodeRect and QR Code generation.
|
||||
- [Remove Orphan UID](https://kenyoni-software.github.io/godot-addons/addons/remove_orphan_uid)
|
||||
Remove orphan UIDs from the project.
|
||||
- [TextureButtonColored](https://kenyoni-software.github.io/godot-addons/addons/texture_button_colored)
|
||||
Extension of `TextureButton` with color options.
|
||||
@@ -9,7 +9,7 @@ custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter="*.esc, *.csv, *.ncsv, *.cfg, *.srt"
|
||||
exclude_filter="*.xcf, saves/*, scripts/*,vscode-extension-ashes/*"
|
||||
export_path="build/LasGymkhanikasDeUli.appimage.x86_64"
|
||||
export_path="build/LasGymkhanikasDeUli.x86_64"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters="*.cfg"
|
||||
encryption_exclude_filters=""
|
||||
|
||||
@@ -384,6 +384,7 @@
|
||||
- "cocina_delante_eneko_action2_dialog_option7:Agur"
|
||||
say($current_player, "Agur yogur!", "cocina_delante_eneko_action2_dialog_end")
|
||||
done
|
||||
#!include:
|
||||
|
||||
:action3 "turno_cocina_frontal"
|
||||
if turno_cocina_frontal_debajo_sofa:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[gd_resource type="Resource" script_class="ESCAnimationResource" load_steps=7 format=3 uid="uid://c4lhcwvjqx5ty"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://sksvt0n8gle2" path="res://addons/escoria-core/game/core-scripts/resources/esc_animationresource.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://bxc3dll30x8tl" path="res://addons/escoria-core/game/core-scripts/resources/esc_directionangle.gd" id="2"]
|
||||
[ext_resource type="Script" uid="uid://clixil1u5exq7" path="res://addons/escoria-core/game/core-scripts/resources/esc_animationname.gd" id="3"]
|
||||
[ext_resource type="Script" path="res://addons/escoria-core/game/core-scripts/resources/esc_directionangle.gd" id="2"]
|
||||
[ext_resource type="Script" path="res://addons/escoria-core/game/core-scripts/resources/esc_animationname.gd" id="3"]
|
||||
|
||||
[sub_resource type="Resource" id="1"]
|
||||
script = ExtResource("2")
|
||||
@@ -18,7 +18,7 @@ animation = "speak"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1")
|
||||
dir_angles = [SubResource("1")]
|
||||
directions = [SubResource("2")]
|
||||
idles = [SubResource("2")]
|
||||
speaks = [SubResource("3")]
|
||||
dir_angles = Array[ExtResource("2")]([SubResource("1")])
|
||||
directions = Array[ExtResource("3")]([SubResource("2")])
|
||||
idles = Array[ExtResource("3")]([SubResource("2")])
|
||||
speaks = Array[ExtResource("3")]([SubResource("3")])
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[gd_resource type="Resource" script_class="ESCAnimationResource" load_steps=36 format=3 uid="uid://cyjo7aq0e4hbe"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://sksvt0n8gle2" path="res://addons/escoria-core/game/core-scripts/resources/esc_animationresource.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://bxc3dll30x8tl" path="res://addons/escoria-core/game/core-scripts/resources/esc_directionangle.gd" id="2"]
|
||||
[ext_resource type="Script" uid="uid://clixil1u5exq7" path="res://addons/escoria-core/game/core-scripts/resources/esc_animationname.gd" id="3"]
|
||||
[ext_resource type="Script" path="res://addons/escoria-core/game/core-scripts/resources/esc_directionangle.gd" id="2"]
|
||||
[ext_resource type="Script" path="res://addons/escoria-core/game/core-scripts/resources/esc_animationname.gd" id="3"]
|
||||
|
||||
[sub_resource type="Resource" id="1"]
|
||||
script = ExtResource("2")
|
||||
@@ -145,7 +145,7 @@ animation = "idle_up"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1")
|
||||
dir_angles = [SubResource("1"), SubResource("2"), SubResource("3"), SubResource("4"), SubResource("5"), SubResource("6"), SubResource("7"), SubResource("8")]
|
||||
directions = [SubResource("9"), SubResource("10"), SubResource("11"), SubResource("12"), SubResource("13"), SubResource("14"), SubResource("15"), SubResource("16")]
|
||||
idles = [SubResource("17"), SubResource("18"), SubResource("19"), SubResource("20"), SubResource("21"), SubResource("22"), SubResource("23"), SubResource("24")]
|
||||
speaks = [SubResource("25"), SubResource("26"), SubResource("27"), SubResource("28"), SubResource("29"), SubResource("30"), SubResource("31"), SubResource("32")]
|
||||
dir_angles = Array[ExtResource("2")]([SubResource("1"), SubResource("2"), SubResource("3"), SubResource("4"), SubResource("5"), SubResource("6"), SubResource("7"), SubResource("8")])
|
||||
directions = Array[ExtResource("3")]([SubResource("9"), SubResource("10"), SubResource("11"), SubResource("12"), SubResource("13"), SubResource("14"), SubResource("15"), SubResource("16")])
|
||||
idles = Array[ExtResource("3")]([SubResource("17"), SubResource("18"), SubResource("19"), SubResource("20"), SubResource("21"), SubResource("22"), SubResource("23"), SubResource("24")])
|
||||
speaks = Array[ExtResource("3")]([SubResource("25"), SubResource("26"), SubResource("27"), SubResource("28"), SubResource("29"), SubResource("30"), SubResource("31"), SubResource("32")])
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
|
||||
[ext_resource type="Script" uid="uid://c7fcpp72w3dnj" path="res://addons/escoria-core/game/core-scripts/esc_room.gd" id="1"]
|
||||
[ext_resource type="PackedScene" uid="uid://cjmsexhyhi4vs" path="res://gymkhana/characters/oier/oier.tscn" id="2"]
|
||||
[ext_resource type="Texture2D" uid="uid://ckdiqb7cmmaqb" path="res://gymkhana/rooms/turno_cocina/cocina/assets/cocina_interior_vista_completa.jpg" id="3_ccj1t"]
|
||||
[ext_resource type="Texture2D" uid="uid://c8ytapkbj5t4p" path="res://gymkhana/rooms/turno_cocina/cocina/assets/cocina_interior_vista_completa.jpg" id="3_ccj1t"]
|
||||
[ext_resource type="Script" uid="uid://5pbcieq7gpdo" path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" id="4"]
|
||||
[ext_resource type="Script" uid="uid://beh3ds4eapldu" path="res://addons/escoria-core/game/core-scripts/esc_location.gd" id="5"]
|
||||
[ext_resource type="Script" uid="uid://ceym82rf2qnxu" path="res://addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd" id="6"]
|
||||
[ext_resource type="Texture2D" uid="uid://crhfjda62540d" path="res://gymkhana/rooms/turno_cocina/cocina/assets/depth.png" id="7"]
|
||||
[ext_resource type="Texture2D" uid="uid://bss0jcop7w5cx" path="res://gymkhana/rooms/turno_cocina/cocina/assets/foreground-mesa.png" id="8"]
|
||||
[ext_resource type="Texture2D" uid="uid://bna12h746ucar" path="res://gymkhana/rooms/turno_cocina/cocina/assets/foreground-silla.png" id="9"]
|
||||
[ext_resource type="Texture2D" uid="uid://2mw8y41yha5" path="res://gymkhana/rooms/turno_cocina/cocina/assets/depth.png" id="7"]
|
||||
[ext_resource type="Texture2D" uid="uid://hfsy8yh5msgu" path="res://gymkhana/rooms/turno_cocina/cocina/assets/foreground-mesa.png" id="8"]
|
||||
[ext_resource type="Texture2D" uid="uid://p7ou513681ag" path="res://gymkhana/rooms/turno_cocina/cocina/assets/foreground-silla.png" id="9"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwlq5pqwktbul" path="res://gymkhana/items/turno_cocina_peso.tscn" id="10"]
|
||||
[ext_resource type="PackedScene" uid="uid://cpeqaymxabewi" path="res://gymkhana/items/turno_cocina_bol.tscn" id="11"]
|
||||
[ext_resource type="PackedScene" uid="uid://d1ust40cvfjtw" path="res://gymkhana/items/turno_cocina_olla_llena.tscn" id="12"]
|
||||
[ext_resource type="Texture2D" uid="uid://djkmw4bj8siok" path="res://gymkhana/items/assets/turno_cocina_patata.png" id="13"]
|
||||
[ext_resource type="Texture2D" uid="uid://brspvt17l2bsg" path="res://gymkhana/items/assets/turno_cocina_patata.png" id="13"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnf0ylqtnajms" path="res://gymkhana/items/turno_cocina_libro_de_cocina.tscn" id="14"]
|
||||
[ext_resource type="Texture2D" uid="uid://chy7hyrqi6imp" path="res://gymkhana/rooms/turno_cocina/cocina/assets/gas-apagado.png" id="15"]
|
||||
[ext_resource type="Texture2D" uid="uid://xv1xya2lcavx" path="res://gymkhana/rooms/turno_cocina/cocina/assets/gas-apagado.png" id="15"]
|
||||
[ext_resource type="Script" uid="uid://db4ghc5f2fhb2" path="res://addons/escoria-ui-return-monkey-island/item_components/esc_item_component_global_observer.gd" id="15_fji2i"]
|
||||
[ext_resource type="Texture2D" uid="uid://bebo52w582216" path="res://gymkhana/rooms/turno_cocina/cocina/assets/gas-encendido3.png" id="16"]
|
||||
[ext_resource type="Texture2D" uid="uid://c13mgcko6vbd0" path="res://gymkhana/rooms/turno_cocina/cocina/assets/gas-encendido1.png" id="17"]
|
||||
[ext_resource type="Texture2D" uid="uid://da2sep4pylffj" path="res://gymkhana/rooms/turno_cocina/cocina/assets/gas-encendido2.png" id="18"]
|
||||
[ext_resource type="Texture2D" uid="uid://cwopnwjeljhk5" path="res://gymkhana/rooms/turno_cocina/cocina/assets/gas-encendido3.png" id="16"]
|
||||
[ext_resource type="Texture2D" uid="uid://5hgjkw372o28" path="res://gymkhana/rooms/turno_cocina/cocina/assets/gas-encendido1.png" id="17"]
|
||||
[ext_resource type="Texture2D" uid="uid://dh23qb40apphb" path="res://gymkhana/rooms/turno_cocina/cocina/assets/gas-encendido2.png" id="18"]
|
||||
[ext_resource type="PackedScene" uid="uid://d7l30s558mvd" path="res://gymkhana/particles/SmokeParticles.tscn" id="19"]
|
||||
[ext_resource type="PackedScene" uid="uid://igj2f3midaad" path="res://gymkhana/items/turno_cocina_cuerno.tscn" id="20"]
|
||||
[ext_resource type="Script" uid="uid://uadel3g82io" path="res://gymkhana/items/scripts/turno_cocina_sin_olla_economica_encendida_observer.gd" id="21"]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[gd_scene load_steps=19 format=3 uid="uid://dwvu5kn7qr35s"]
|
||||
|
||||
[ext_resource type="Script" path="res://addons/escoria-core/game/core-scripts/esc_room.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://c7fcpp72w3dnj" path="res://addons/escoria-core/game/core-scripts/esc_room.gd" id="1"]
|
||||
[ext_resource type="PackedScene" uid="uid://cjmsexhyhi4vs" path="res://gymkhana/characters/oier/oier.tscn" id="2"]
|
||||
[ext_resource type="Texture2D" uid="uid://b8re6n31thdb" path="res://gymkhana/rooms/turno_cocina/cocina_delante/assets/delante_cocina_full.jpg" id="3_us6ip"]
|
||||
[ext_resource type="Script" path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" id="4"]
|
||||
[ext_resource type="Script" path="res://addons/escoria-core/game/core-scripts/esc_location.gd" id="5"]
|
||||
[ext_resource type="Script" uid="uid://5pbcieq7gpdo" path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" id="4"]
|
||||
[ext_resource type="Script" uid="uid://beh3ds4eapldu" path="res://addons/escoria-core/game/core-scripts/esc_location.gd" id="5"]
|
||||
[ext_resource type="Script" uid="uid://ceym82rf2qnxu" path="res://addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd" id="6"]
|
||||
[ext_resource type="Texture2D" uid="uid://dhj8k3ro2vayg" path="res://gymkhana/rooms/turno_cocina/cocina_delante/assets/light.png" id="6_ugqpr"]
|
||||
[ext_resource type="Texture2D" uid="uid://js3u7hbljn2x" path="res://gymkhana/rooms/turno_cocina/cocina_delante/assets/depth.png" id="7"]
|
||||
|
||||
@@ -42,8 +42,8 @@ navigation_polygon = SubResource("60")
|
||||
process_mode = 1
|
||||
position = Vector2(863, 175)
|
||||
script = ExtResource("6")
|
||||
global_id = "turno_cocina_despensa_puerta_exterior"
|
||||
custom_cursor = "east"
|
||||
global_id = "turno_cocina_despensa_puerta_exterior"
|
||||
esc_script = "res://gymkhana/rooms/turno_cocina/despensa/esc/puerta_exterior.esc"
|
||||
combine_when_selected_action_is_in = PackedStringArray()
|
||||
is_exit = true
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
diff --git a/addons/escoria-core/game/core-scripts/esc/compiler/esc_interpreter_factory.gd b/addons/escoria-core/game/core-scripts/esc/compiler/esc_interpreter_factory.gd
|
||||
index 4205f92d..26399e77 100644
|
||||
--- a/addons/escoria-core/game/core-scripts/esc/compiler/esc_interpreter_factory.gd
|
||||
+++ b/addons/escoria-core/game/core-scripts/esc/compiler/esc_interpreter_factory.gd
|
||||
@@ -3,7 +3,7 @@ extends RefCounted
|
||||
class_name ESCInterpreterFactory
|
||||
|
||||
|
||||
-static var _interpreter: ESCInterpreter = null
|
||||
+var _interpreter: ESCInterpreter = null
|
||||
|
||||
|
||||
## Produces an interpreter as a singleton.[br]
|
||||
@@ -15,7 +15,7 @@ static var _interpreter: ESCInterpreter = null
|
||||
## #### Returns[br]
|
||||
## [br]
|
||||
## Returns a `ESCInterpreter` value. (`ESCInterpreter`)
|
||||
-static func create_interpreter() -> ESCInterpreter:
|
||||
+func create_interpreter() -> ESCInterpreter:
|
||||
if not _interpreter:
|
||||
_interpreter = load("res://addons/escoria-core/game/core-scripts/esc/compiler/esc_interpreter.gd").new(ESCCompiler.load_commands(), ESCCompiler.load_globals())
|
||||
return _interpreter
|
||||
@@ -25,7 +25,7 @@ static func create_interpreter() -> ESCInterpreter:
|
||||
return _interpreter
|
||||
|
||||
|
||||
-static func reset_interpreter() -> void:
|
||||
+func reset_interpreter() -> void:
|
||||
if is_instance_valid(_interpreter):
|
||||
_interpreter.cleanup()
|
||||
_interpreter = null
|
||||
diff --git a/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd
|
||||
index 28d867c3..d9f89017 100644
|
||||
--- a/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd
|
||||
+++ b/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd
|
||||
@@ -726,7 +726,7 @@ func _telekinetic_applies_to(event: ESCGrammarStmts.Event) -> bool:
|
||||
var tk_flag_condition = event.get_flags_with_conditions().get("TK")
|
||||
|
||||
if tk_flag_condition:
|
||||
- var interpreter: ESCInterpreter = ESCInterpreterFactory.create_interpreter()
|
||||
+ var interpreter: ESCInterpreter = escoria.interpreter_factory.create_interpreter()
|
||||
|
||||
var result = interpreter.look_up_global(tk_flag_condition.get_name())
|
||||
|
||||
diff --git a/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd b/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd
|
||||
index c029f476..41536d39 100644
|
||||
--- a/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd
|
||||
+++ b/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd
|
||||
@@ -123,7 +123,7 @@ func _compiler_shim(source: String, filename: String = "", associated_global_id:
|
||||
|
||||
# Some static analysis
|
||||
if not had_error and _run_script_analysis():
|
||||
- var resolver: ESCResolver = ESCResolver.new(ESCInterpreterFactory.create_interpreter())
|
||||
+ var resolver: ESCResolver = ESCResolver.new(escoria.interpreter_factory.create_interpreter())
|
||||
resolver.resolve(parsed_statements)
|
||||
|
||||
if not filename.is_empty():
|
||||
diff --git a/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd
|
||||
index 78c992a0..6ee5381a 100644
|
||||
--- a/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd
|
||||
+++ b/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd
|
||||
@@ -229,7 +229,7 @@ func _process(delta: float) -> void:
|
||||
#var rc = _running_events[channel_name].run()
|
||||
#escoria.interpreter.reset()
|
||||
#var resolver: ESCResolver = ESCResolver.new(escoria.interpreter)
|
||||
- var interpreter: ESCInterpreter = ESCInterpreterFactory.create_interpreter()
|
||||
+ var interpreter: ESCInterpreter = escoria.interpreter_factory.create_interpreter()
|
||||
var resolver: ESCResolver = ESCResolver.new(interpreter)
|
||||
var event = _running_events[channel_name]
|
||||
|
||||
diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_statement.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_statement.gd
|
||||
index 1358239c..b91a3661 100644
|
||||
--- a/addons/escoria-core/game/core-scripts/esc/types/esc_statement.gd
|
||||
+++ b/addons/escoria-core/game/core-scripts/esc/types/esc_statement.gd
|
||||
@@ -107,7 +107,7 @@ func is_valid() -> bool:
|
||||
## Returns a `int` value. (`int`)
|
||||
func run() -> int:
|
||||
if parsed_statements.size() > 0:
|
||||
- var interpreter = ESCInterpreterFactory.create_interpreter()
|
||||
+ var interpreter = escoria.interpreter_factory.create_interpreter()
|
||||
var resolver: ESCResolver = ESCResolver.new(interpreter)
|
||||
resolver.resolve(parsed_statements)
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
diff --git a/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd
|
||||
index 7c550f2a..944aead7 100644
|
||||
--- a/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd
|
||||
+++ b/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd
|
||||
@@ -16,7 +16,9 @@ class_name ESCInventoryManager
|
||||
## [br]
|
||||
## Returns a `bool` value. (`bool`)
|
||||
func inventory_has(item: String) -> bool:
|
||||
- return escoria.globals_manager.has("i/%s" % item)
|
||||
+ if not escoria.globals_manager.has("i/%s" % item):
|
||||
+ return false
|
||||
+ return escoria.globals_manager.get_global("i/%s" % item)
|
||||
|
||||
|
||||
## Retrieves all inventory items.[br]
|
||||
@@ -1,19 +0,0 @@
|
||||
diff --git a/addons/escoria-core/game/core-scripts/esc_item.gd b/addons/escoria-core/game/core-scripts/esc_item.gd
|
||||
index cbce2e51..3164579a 100644
|
||||
--- a/addons/escoria-core/game/core-scripts/esc_item.gd
|
||||
+++ b/addons/escoria-core/game/core-scripts/esc_item.gd
|
||||
@@ -672,12 +672,12 @@ func get_animation_player() -> Node:
|
||||
child is AnimationPlayer:
|
||||
player_node_path = child.get_path()
|
||||
if player_node_path.is_empty():
|
||||
- ESCSafeLogging.log_warn(
|
||||
+ ESCSafeLogging.log_debug(
|
||||
self,
|
||||
"Can not find animation_player or animated sprite for %s." % global_id
|
||||
)
|
||||
elif not has_node(player_node_path):
|
||||
- ESCSafeLogging.log_warn(
|
||||
+ ESCSafeLogging.log_debug(
|
||||
self,
|
||||
"Can not find animation_player node at path %s for %s." % [player_node_path, global_id]
|
||||
)
|
||||
@@ -1,28 +0,0 @@
|
||||
diff --git a/addons/escoria-core/game/esc_inputs_manager.gd b/addons/escoria-core/game/esc_inputs_manager.gd
|
||||
index 762da5ea..e2686e24 100644
|
||||
--- a/addons/escoria-core/game/esc_inputs_manager.gd
|
||||
+++ b/addons/escoria-core/game/esc_inputs_manager.gd
|
||||
@@ -5,6 +5,9 @@
|
||||
extends Resource
|
||||
class_name ESCInputsManager
|
||||
|
||||
+## Emitted when input mode changes.
|
||||
+signal input_mode_changed(new_mode)
|
||||
+
|
||||
|
||||
## Valid input flags[br]
|
||||
## * INPUT_ALL: All input is allowed[br]
|
||||
@@ -27,7 +30,12 @@ const ESC_UI_PRIMARY_ACTION = "esc_ui_primary_action"
|
||||
|
||||
|
||||
## The current input mode
|
||||
-var input_mode = INPUT_ALL
|
||||
+var input_mode = INPUT_ALL:
|
||||
+ get:
|
||||
+ return input_mode
|
||||
+ set(new_mode):
|
||||
+ input_mode = new_mode
|
||||
+ input_mode_changed.emit(new_mode)
|
||||
|
||||
## A LIFO stack of hovered items
|
||||
var hover_stack: HoverStack
|
||||
@@ -26,8 +26,8 @@ buses/default_bus_layout="res://addons/escoria-core/buses/default_bus_layout.tre
|
||||
|
||||
[autoload]
|
||||
|
||||
escoria="*res://addons/escoria-core/game/esc_autoload.gd"
|
||||
gymkhana="*res://addons/escoria-ui-return-monkey-island/gymkhana_autoload.gd"
|
||||
escoria="*res://addons/escoria-core/game/esc_autoload.gd"
|
||||
|
||||
[debug]
|
||||
|
||||
@@ -47,7 +47,7 @@ search_in_file_extensions=PackedStringArray("gd", "shader", "esc")
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
enabled=PackedStringArray("res://addons/escoria-core/plugin.cfg", "res://addons/escoria-ui-return-monkey-island-dialog-simple/plugin.cfg", "res://addons/escoria-ui-return-monkey-island/plugin.cfg", "res://addons/tattomoosa.spinner/plugin.cfg")
|
||||
enabled=PackedStringArray("res://addons/escoria-core/plugin.cfg", "res://addons/escoria-ui-return-monkey-island-dialog-simple/plugin.cfg", "res://addons/escoria-ui-return-monkey-island/plugin.cfg", "res://addons/kenyoni/plugin_reloader/plugin.cfg", "res://addons/tattomoosa.spinner/plugin.cfg")
|
||||
|
||||
[escoria]
|
||||
|
||||
@@ -101,8 +101,6 @@ rtmi_dialog_simple/clear_text_by_click_only=false
|
||||
rtmi_dialog_simple/reading_speed_in_wpm=100
|
||||
rtmi_dialog_simple/left_click_action="Speed up"
|
||||
rtmi_dialog_simple/stop_talking_animation_on="End of audio"
|
||||
rtmi_ui/sound_library_folder="res://gymkhana/sounds/"
|
||||
rtmi_ui/savegame_enabled=true
|
||||
rtmi_ui/debug_enabled=true
|
||||
rtmi_ui/achievement_list=["coleccionista", "amenazas", "gourmet", "chistes", "palestina", "ordenado", "musica", "hambrientas"]
|
||||
debug/enable_hover_stack_viewer=false
|
||||
@@ -112,6 +110,8 @@ debug/perform_script_analysis_at_runtime.release=true
|
||||
debug/perform_script_analysis_at_runtime.debug=true
|
||||
debug/log_level.release="INFO"
|
||||
debug/log_level.debug="INFO"
|
||||
rtmi_ui/sound_library_folder="res://game/sounds"
|
||||
rtmi_ui/savegame_enabled=true
|
||||
|
||||
[file_customization]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user