Compare commits
81 Commits
784236fe5c
...
release/0.
| Author | SHA1 | Date | |
|---|---|---|---|
| d075963a77 | |||
| 1d777b422b | |||
| c5ea76f7de | |||
| 62e5a044c1 | |||
| 459d1a121b | |||
| afcf8530e6 | |||
| 022d4c8a22 | |||
| 985d03c716 | |||
| 88f1973e97 | |||
| 0da6bcad9c | |||
| 8a66bd18f9 | |||
| 734a3a6bc2 | |||
| 33035e29b7 | |||
| 5490162365 | |||
| 4274570e2f | |||
| 9d1b8e069f | |||
| be10ebf97a | |||
| b22be297c4 | |||
| 3085622579 | |||
| 392e042615 | |||
| 22ed3a0fba | |||
| 712c5bc7e2 | |||
| 29ae3ae5ef | |||
| ed0ac3c59f | |||
| 3946947331 | |||
| 27820d6d99 | |||
| cc060d6147 | |||
| fba8c70103 | |||
| 2af4bea9b8 | |||
| d47b4f40cc | |||
| 7aeab80166 | |||
| 0a986268cb | |||
| f86bebd7ca | |||
| eca4cc1d7b | |||
| 372d7cb3fe | |||
| 8432bcd3f8 | |||
| a86ebb6526 | |||
| f90b094fb4 | |||
| 333b6d6824 | |||
| 9bcb4445cc | |||
| 0acd750bf5 | |||
| db03051a8d | |||
| d1dc2d1219 | |||
| d4ff624914 | |||
| 947ecc08f0 | |||
| 20098b250d | |||
| 233723e47e | |||
| 1562bcb4bb | |||
| 07b3208dfc | |||
| 7254168f23 | |||
| 05c88881db | |||
| 50e5402c40 | |||
| 1665d77602 | |||
| f367f31d28 | |||
| c41165c193 | |||
| 537a082f20 | |||
| 5bc0362918 | |||
| 13ec6d6080 | |||
| 2a5a0dfbfb | |||
| 703193513f | |||
| 2c8f2fed4b | |||
| 420a4c5cd2 | |||
| 7d32cbb659 | |||
| 8377181bef | |||
| d7d73351fc | |||
| 369628256e | |||
| 0303316c4b | |||
| ffc5491733 | |||
| cd067dd8b0 | |||
| 77520ddaea | |||
| fa0e43982d | |||
| 3e68c2eeeb | |||
| 43728d8190 | |||
| 8b7ad7fe4a | |||
| b5202e462c | |||
| 78eb9f5235 | |||
| 98ef52a19e | |||
| d1c5d159a5 | |||
| eddd73036e | |||
| 2e5895a36f | |||
| 2a15b5466d |
@@ -9,8 +9,6 @@ env:
|
||||
GODOT_VERSION: 4.5
|
||||
EXPORT_NAME: LasGymkhanikasDeUli
|
||||
PROJECT_PATH: .
|
||||
ITCHIO_ENABLED: ${{ vars.ITCHIO_ENABLED }}
|
||||
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
|
||||
|
||||
jobs:
|
||||
all-exports:
|
||||
@@ -26,6 +24,10 @@ jobs:
|
||||
- name: Setup
|
||||
run: |
|
||||
git clone https://github.com/godot-escoria/escoria-demo-game $PROJECT_PATH/../escoria-demo-game
|
||||
- name: Setup
|
||||
run: |
|
||||
mkdir -p $PROJECT_PATH/secret
|
||||
echo ${{ secrets.APPWRITE_API_CFG }} > $PROJECT_PATH/secret/api.cfg
|
||||
- name: All builds
|
||||
run: |
|
||||
./apply_patches.sh
|
||||
@@ -36,17 +38,4 @@ jobs:
|
||||
files: |
|
||||
build/**/*.appimage
|
||||
build/**/*.tar.gz
|
||||
- name: Publish binaries
|
||||
run: |
|
||||
./publish.sh
|
||||
- name: Publish web
|
||||
uses: appleboy/ssh-action@v1
|
||||
with:
|
||||
host: ${{ secrets.WEB_PUBLISH_HOST }}
|
||||
username: ${{ secrets.WEB_PUBLISH_USERNAME }}
|
||||
key: ${{ secrets.WEB_PUBLISH_KEY }}
|
||||
port: ${{ secrets.WEB_PUBLISH_PORT }}
|
||||
script: |
|
||||
cd ${{ vars.WEB_PUBLISH_PATH }}
|
||||
./update.sh
|
||||
|
||||
build/**/*.zip
|
||||
|
||||
3
.gitignore
vendored
@@ -17,6 +17,7 @@ addons/escoria-core/default_bus_layout.tres
|
||||
addons/godot-plugin-refresher/
|
||||
addons/script-ide/
|
||||
build/
|
||||
.env
|
||||
|
||||
# API credentials
|
||||
api.cfg
|
||||
secret/
|
||||
|
||||
@@ -39,8 +39,8 @@ func run(_command_params: Array) -> int:
|
||||
escoria.dialog_player.say(
|
||||
speaking_character_global_id,
|
||||
"",
|
||||
last_chosen_option,
|
||||
last_chosen_option
|
||||
last_chosen_option.get_translated_option(),
|
||||
last_chosen_option.get_translation_id()
|
||||
)
|
||||
await escoria.dialog_player.say_finished
|
||||
escoria.current_state = escoria.GAME_STATE.DEFAULT
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
extends Label
|
||||
|
||||
func _ready():
|
||||
mouse_entered.connect(_on_mouse_entered)
|
||||
|
||||
|
||||
func _on_mouse_entered() -> void:
|
||||
text = "click_to_skip_dialog_no_button"
|
||||
@@ -1 +0,0 @@
|
||||
uid://nh6csabra4mk
|
||||
@@ -1,7 +1,6 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dyi4lxm20wgne"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://dvpaon5mw2w8l" path="res://addons/escoria-ui-return-monkey-island/theme.tres" id="1_3renm"]
|
||||
[ext_resource type="Script" uid="uid://nh6csabra4mk" path="res://addons/escoria-ui-return-monkey-island-dialog-simple/dialog_tip.gd" id="2_2n8es"]
|
||||
|
||||
[node name="Label" type="Label"]
|
||||
offset_left = 1073.0
|
||||
@@ -12,4 +11,3 @@ grow_horizontal = 0
|
||||
mouse_filter = 1
|
||||
theme = ExtResource("1_3renm")
|
||||
text = "click_to_skip_dialog"
|
||||
script = ExtResource("2_2n8es")
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
extends ESCDialogManager
|
||||
class_name ESCReturnToMonekyIslandDialogs
|
||||
|
||||
|
||||
# State machine that governs how the dialog manager behaves
|
||||
var state_machine = preload("res://addons/escoria-ui-return-monkey-island-dialog-simple/rtmi_dialog_simple_state_machine.gd").new()
|
||||
var state_machine = (
|
||||
preload(
|
||||
"res://addons/escoria-ui-return-monkey-island-dialog-simple/rtmi_dialog_simple_state_machine.gd"
|
||||
)
|
||||
. new()
|
||||
)
|
||||
|
||||
# The currently running player
|
||||
var _type_player: Node = null
|
||||
@@ -26,8 +30,11 @@ var _is_saying: bool = false
|
||||
# preserving a dialog box, whether to continue using that dialog box
|
||||
var _should_preserve_dialog_box: bool = false
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
_click_to_continue = escoria.settings_manager.get_custom_setting(RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_KEY, false)
|
||||
_click_to_continue = escoria.settings_manager.get_custom_setting(
|
||||
RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_KEY, false
|
||||
)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@@ -44,6 +51,7 @@ func _ready() -> void:
|
||||
func has_type(type: String) -> bool:
|
||||
return true if type == "floating" else false
|
||||
|
||||
|
||||
# Check whether a specific chooser type is supported by the
|
||||
# dialog plugin
|
||||
#
|
||||
@@ -63,6 +71,7 @@ func has_chooser_type(type: String) -> bool:
|
||||
func enable_preserve_dialog_box() -> void:
|
||||
_should_preserve_dialog_box = true
|
||||
|
||||
|
||||
# Instructs the dialog manager to no longer preserve the currently-preserved
|
||||
# dialog box or to not preserve the next dialog box used by a `say` command
|
||||
# (this is the default state).
|
||||
@@ -109,7 +118,8 @@ func say(dialog_player: Node, global_id: String, text: String, type: String, key
|
||||
|
||||
state_machine._change_state("say")
|
||||
|
||||
func do_say(global_id: String, text: String) -> void:
|
||||
|
||||
func do_say(global_id: String, text: String, has_audio: bool = false) -> void:
|
||||
# Only add_child here in order to prevent _type_player from running its _process method
|
||||
# before we're ready, and only if it's necessary
|
||||
if not _dialog_player.get_children().has(_type_player):
|
||||
@@ -118,21 +128,28 @@ func do_say(global_id: String, text: String) -> void:
|
||||
if not _click_to_continue:
|
||||
add_dialog_tip()
|
||||
|
||||
_type_player.say(global_id, text)
|
||||
_type_player.say(global_id, text, has_audio)
|
||||
escoria.game_scene.clear_highlights()
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
|
||||
|
||||
func _init_type_player(type: String) -> void:
|
||||
if type == "floating":
|
||||
_type_player = preload(\
|
||||
"res://addons/escoria-ui-return-monkey-island-dialog-simple/types/floating.tscn"\
|
||||
).instantiate()
|
||||
_dialog_tip = preload(\
|
||||
"res://addons/escoria-ui-return-monkey-island-dialog-simple/dialog_tip.tscn"\
|
||||
).instantiate()
|
||||
_type_player = (
|
||||
preload(
|
||||
"res://addons/escoria-ui-return-monkey-island-dialog-simple/types/floating.tscn"
|
||||
)
|
||||
. instantiate()
|
||||
)
|
||||
_dialog_tip = (
|
||||
preload("res://addons/escoria-ui-return-monkey-island-dialog-simple/dialog_tip.tscn")
|
||||
. instantiate()
|
||||
)
|
||||
|
||||
_type_player.say_finished.connect(_on_say_finished)
|
||||
_type_player.say_visible.connect(_on_say_visible)
|
||||
|
||||
|
||||
func _initialize_say_states(global_id: String, text: String, type: String, key: String) -> void:
|
||||
state_machine.states_map["say"].initialize(self, global_id, text, type, key)
|
||||
state_machine.states_map["finish"].initialize(_dialog_player)
|
||||
@@ -151,6 +168,7 @@ func _on_say_finished():
|
||||
|
||||
say_finished.emit()
|
||||
|
||||
|
||||
func _on_say_visible():
|
||||
escoria.game_scene.hide_tooltips()
|
||||
say_visible.emit()
|
||||
@@ -168,19 +186,21 @@ func choose(dialog_player: Node, dialog: ESCDialog, type: String):
|
||||
|
||||
state_machine.states_map["choices"].initialize(dialog_player, self, dialog, type)
|
||||
state_machine._change_state("choices")
|
||||
|
||||
escoria.game_scene.clear_highlights()
|
||||
|
||||
|
||||
func do_choose(dialog_player: Node, dialog: ESCDialog, type: String = "simple"):
|
||||
escoria.game_scene.hide_tooltips()
|
||||
|
||||
|
||||
var chooser
|
||||
|
||||
if type == "simple" or type == "":
|
||||
chooser = preload(\
|
||||
"res://addons/escoria-ui-return-monkey-island-dialog-simple/chooser/simple.tscn"\
|
||||
).instantiate()
|
||||
chooser = (
|
||||
preload(
|
||||
"res://addons/escoria-ui-return-monkey-island-dialog-simple/chooser/simple.tscn"
|
||||
)
|
||||
. instantiate()
|
||||
)
|
||||
|
||||
dialog_player.add_child(chooser)
|
||||
chooser.set_dialog(dialog)
|
||||
@@ -191,20 +211,24 @@ func do_choose(dialog_player: Node, dialog: ESCDialog, type: String = "simple"):
|
||||
|
||||
# MODIFIED FOR RETURN TO MONKEY UI
|
||||
if option is ESCDialogOption:
|
||||
escoria.globals_manager.set_global("ESC_DIALOG_CHOSEN_OPTION", option.option)
|
||||
escoria.globals_manager.set_global("ESC_DIALOG_CHOSEN_OPTION", option)
|
||||
# END MODIFIED FOR RETURN TO MONKEY UI
|
||||
option_chosen.emit(option)
|
||||
escoria.game_scene.hide_tooltips()
|
||||
escoria.game_scene.update_highlights()
|
||||
|
||||
|
||||
|
||||
# Trigger running the dialogue faster
|
||||
func speedup():
|
||||
(escoria.object_manager.get_object(escoria.object_manager.SPEECH).node as ESCSpeechPlayer).set_state("off")
|
||||
if is_instance_valid(_type_player):
|
||||
_type_player.speedup()
|
||||
|
||||
|
||||
# Trigger an instant finish of the current dialog
|
||||
func finish():
|
||||
(escoria.object_manager.get_object(escoria.object_manager.SPEECH).node as ESCSpeechPlayer).set_state("off")
|
||||
if is_instance_valid(_type_player):
|
||||
_type_player.finish()
|
||||
|
||||
@@ -213,9 +237,12 @@ func finish():
|
||||
func interrupt():
|
||||
if _dialog_player.get_children().has(_type_player):
|
||||
(
|
||||
escoria.object_manager.get_object(escoria.object_manager.SPEECH).node\
|
||||
as ESCSpeechPlayer
|
||||
).set_state("off")
|
||||
(
|
||||
escoria.object_manager.get_object(escoria.object_manager.SPEECH).node
|
||||
as ESCSpeechPlayer
|
||||
)
|
||||
. set_state("off")
|
||||
)
|
||||
|
||||
if not _should_preserve_dialog_box and _dialog_player.get_children().has(_type_player):
|
||||
_dialog_player.remove_child(_type_player)
|
||||
@@ -229,9 +256,16 @@ func add_dialog_tip():
|
||||
_dialog_player.add_child(_dialog_tip)
|
||||
_dialog_tip.visible = true
|
||||
|
||||
|
||||
func hide_dialop_tip():
|
||||
if _dialog_player.get_children().has(_dialog_tip):
|
||||
_dialog_tip.visible = false
|
||||
|
||||
|
||||
func _on_paused():
|
||||
hide_dialop_tip()
|
||||
|
||||
## To be called if voice audio has finished.
|
||||
func voice_audio_finished():
|
||||
if is_instance_valid(_type_player) and _type_player.has_method("voice_audio_finished"):
|
||||
_type_player.voice_audio_finished()
|
||||
|
||||
@@ -5,7 +5,7 @@ func _init():
|
||||
_add_states_to_machine()
|
||||
|
||||
current_state_name = "idle"
|
||||
|
||||
START_STATE = states_map[current_state_name]
|
||||
initialize(states_map[current_state_name])
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ var _ready_to_say: bool
|
||||
# (other states rely on the setup that the dialog manager does)
|
||||
var _say_started: bool
|
||||
|
||||
var _has_audio: bool = false
|
||||
|
||||
var _stop_talking_animation_on_option: String
|
||||
|
||||
|
||||
@@ -69,6 +71,7 @@ func enter():
|
||||
escoria.logger.trace(self, "Dialog State Machine: Entered 'say'.")
|
||||
|
||||
_say_started = false
|
||||
_has_audio = false
|
||||
|
||||
if not _dialog_manager.say_visible.is_connected(_on_say_visible):
|
||||
_dialog_manager.say_visible.connect(_on_say_visible)
|
||||
@@ -86,6 +89,7 @@ func enter():
|
||||
escoria.object_manager.get_object(escoria.object_manager.SPEECH).node\
|
||||
as ESCSpeechPlayer
|
||||
).set_state(_speech_resource)
|
||||
_has_audio = true
|
||||
|
||||
if _stop_talking_animation_on_option == RTMISimpleDialogSettings.STOP_TALKING_ANIMATION_ON_END_OF_AUDIO:
|
||||
if not (
|
||||
@@ -115,13 +119,13 @@ func enter():
|
||||
|
||||
func exit() -> void:
|
||||
if not _say_started:
|
||||
_dialog_manager.do_say(_character, _text)
|
||||
_dialog_manager.do_say(_character, _text, _has_audio)
|
||||
_say_started = true
|
||||
|
||||
|
||||
func update(_delta):
|
||||
if _ready_to_say:
|
||||
_dialog_manager.do_say(_character, _text)
|
||||
_dialog_manager.do_say(_character, _text, _has_audio)
|
||||
_say_started = true
|
||||
_ready_to_say = false
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ func handle_input(_event):
|
||||
_dialog_manager.say_finished.disconnect(_on_say_finished)
|
||||
|
||||
finished.emit("interrupt")
|
||||
get_viewport().set_input_as_handled()
|
||||
#get_viewport().set_input_as_handled()
|
||||
|
||||
|
||||
# Handles the end of a say function after it has emitted say_finished.
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
# A dialog GUI showing a dialog box and character portraits
|
||||
extends Window
|
||||
|
||||
|
||||
# Signal emitted when text has been said
|
||||
signal say_finished
|
||||
|
||||
# Signal emitted when text has just become fully visible
|
||||
signal say_visible
|
||||
|
||||
const SLOW_TEXT_MODE_MULTIPLIER: float = 2
|
||||
|
||||
# Progress bar feature flag
|
||||
const PROGRESS_BAR_ENABLED: bool = false
|
||||
|
||||
const MINIMUM_TALKING_TIME: float = 2.0
|
||||
const DEFAULT_SPEECH_SPEED_MULTIPLIER: float = 1.0
|
||||
|
||||
@export var centered_text: bool
|
||||
|
||||
# The text speed per character for normal display
|
||||
var _text_time_per_character: float
|
||||
@@ -31,23 +39,19 @@ var _is_speeding_up: bool = false
|
||||
# The current line of text being displayed.
|
||||
var _current_line: String
|
||||
|
||||
# If the current line has audio or not.
|
||||
var _has_audio: bool
|
||||
|
||||
# Timer for character talking
|
||||
var _talking_timer
|
||||
|
||||
# Timer for clearing the dialog
|
||||
var _clearing_timer
|
||||
|
||||
# Whether the dialog manager is paused
|
||||
@onready var is_paused: bool = true
|
||||
var _x_position_offset: int = -10
|
||||
var _y_position_offset: int = -20
|
||||
|
||||
var dialog_location_node = null
|
||||
|
||||
@export var centered_text: bool
|
||||
|
||||
var X_POSITION_OFFSET: int = -10
|
||||
var Y_POSITION_OFFSET: int = -20
|
||||
|
||||
const SLOW_TEXT_MODE_MULTIPLIER: float = 2
|
||||
var _dialog_location_node = null
|
||||
|
||||
# Click to continue flag from settings.
|
||||
var _click_to_continue: bool = false
|
||||
@@ -58,13 +62,20 @@ var _slow_text_mode: bool = false
|
||||
# Progress var Tween reference
|
||||
var _progress_tween: Tween
|
||||
|
||||
# Progress bar feature flag
|
||||
const PROGRESS_BAR_ENABLED: bool = true
|
||||
# Whether the dialog manager is paused
|
||||
@onready var is_paused: bool = true
|
||||
|
||||
|
||||
# Build up the UI
|
||||
func _ready():
|
||||
_click_to_continue = escoria.settings_manager.get_custom_setting(RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_KEY, RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_DEFAULT_VALUE)
|
||||
_slow_text_mode = escoria.settings_manager.get_custom_setting(RTMISimpleDialogSettings.SLOW_TEXT_MODE_KEY, RTMISimpleDialogSettings.SLOW_TEXT_MODE_DEFAULT_VALUE)
|
||||
_click_to_continue = escoria.settings_manager.get_custom_setting(
|
||||
RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_KEY,
|
||||
RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_DEFAULT_VALUE
|
||||
)
|
||||
_slow_text_mode = escoria.settings_manager.get_custom_setting(
|
||||
RTMISimpleDialogSettings.SLOW_TEXT_MODE_KEY,
|
||||
RTMISimpleDialogSettings.SLOW_TEXT_MODE_DEFAULT_VALUE
|
||||
)
|
||||
|
||||
_text_time_per_character = ProjectSettings.get_setting(
|
||||
RTMISimpleDialogSettings.TEXT_TIME_PER_LETTER_MS
|
||||
@@ -73,11 +84,13 @@ func _ready():
|
||||
if _text_time_per_character < 0:
|
||||
escoria.logger.warn(
|
||||
self,
|
||||
"%s setting must be a non-negative number. Will use default value of %s." %
|
||||
[
|
||||
(
|
||||
"%s setting must be a non-negative number. Will use default value of %s."
|
||||
% [
|
||||
RTMISimpleDialogSettings.TEXT_TIME_PER_LETTER_MS,
|
||||
escoria.TEXT_TIME_PER_LETTER_MS_DEFAULT_VALUE
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
_text_time_per_character = escoria.TEXT_TIME_PER_LETTER_MS_DEFAULT_VALUE
|
||||
@@ -89,11 +102,13 @@ func _ready():
|
||||
if _fast_text_time_per_character < 0:
|
||||
escoria.logger.warn(
|
||||
self,
|
||||
"%s setting must be a non-negative number. Will use default value of %s." %
|
||||
[
|
||||
(
|
||||
"%s setting must be a non-negative number. Will use default value of %s."
|
||||
% [
|
||||
RTMISimpleDialogSettings.TEXT_TIME_PER_LETTER_MS_FAST,
|
||||
escoria.TEXT_TIME_PER_LETTER_MS_FAST_DEFAULT_VALUE
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
_fast_text_time_per_character = escoria.TEXT_TIME_PER_LETTER_MS_FAST_DEFAULT_VALUE
|
||||
@@ -105,11 +120,13 @@ func _ready():
|
||||
if _reading_speed_in_wpm <= 0:
|
||||
escoria.logger.warn(
|
||||
self,
|
||||
"%s setting must be a positive number. Will use default value of %s." %
|
||||
[
|
||||
(
|
||||
"%s setting must be a positive number. Will use default value of %s."
|
||||
% [
|
||||
RTMISimpleDialogSettings.READING_SPEED_IN_WPM,
|
||||
escoria.READING_SPEED_IN_WPM_DEFAULT_VALUE
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
_reading_speed_in_wpm = escoria.READING_SPEED_IN_WPM_DEFAULT_VALUE
|
||||
@@ -141,8 +158,9 @@ func _ready():
|
||||
# #### Parameters
|
||||
# - character: The global id of the character speaking
|
||||
# - line: Line to say
|
||||
func say(character: String, line: String) :
|
||||
func say(character: String, line: String, has_audio: bool = false):
|
||||
_current_line = line
|
||||
_has_audio = has_audio
|
||||
|
||||
show()
|
||||
# Hide in case the same box is used
|
||||
@@ -153,32 +171,35 @@ func say(character: String, line: String) :
|
||||
# Position the RichTextLabel on the character's dialog position, if any.
|
||||
_current_character = escoria.object_manager.get_object(character).node
|
||||
|
||||
var dialog_location_count:int = 0
|
||||
var dialog_location_count: int = 0
|
||||
|
||||
for c in escoria.object_manager.get_object(character).node.get_children():
|
||||
if c is Marker2D:
|
||||
# Identify any Postion2D nodes
|
||||
if c is ESCDialogLocation:
|
||||
dialog_location_count += 1
|
||||
dialog_location_node = c
|
||||
_dialog_location_node = c
|
||||
|
||||
if dialog_location_count > 1:
|
||||
escoria.logger.warn(
|
||||
self,
|
||||
"Multiple ESCDialogLocation nodes found " +
|
||||
"object %s. Last one will be used." % _current_character)
|
||||
(
|
||||
"Multiple ESCDialogLocation nodes found "
|
||||
+ "object %s. Last one will be used." % _current_character
|
||||
)
|
||||
)
|
||||
|
||||
# Set text color to color set in the actor
|
||||
var text_color = _current_character.dialog_color
|
||||
var text_color_html = text_color.to_html(false)
|
||||
|
||||
%text_node.text = "[color=#" + text_color_html + "]" \
|
||||
.format([text_color_html]) + tr(line) + "[/color]"
|
||||
%text_node.text = (
|
||||
"[color=#" + text_color_html + "]".format([text_color_html]) + tr(line) + "[/color]"
|
||||
)
|
||||
if centered_text:
|
||||
%text_node.text = "[center]" + %text_node.text + "[/center]"
|
||||
if _current_character.is_inside_tree() and \
|
||||
is_instance_valid(dialog_location_node):
|
||||
position = dialog_location_node.get_global_transform_with_canvas().origin
|
||||
if _current_character.is_inside_tree() and is_instance_valid(_dialog_location_node):
|
||||
position = _dialog_location_node.get_global_transform_with_canvas().origin
|
||||
|
||||
position.x -= size.x / 2
|
||||
else:
|
||||
@@ -191,9 +212,7 @@ func say(character: String, line: String) :
|
||||
|
||||
_current_character.start_talking()
|
||||
|
||||
var _slow_text_mode = ProjectSettings.get_setting(
|
||||
RTMISimpleDialogSettings.SLOW_TEXT_MODE
|
||||
)
|
||||
var slow_text_mode = ProjectSettings.get_setting(RTMISimpleDialogSettings.SLOW_TEXT_MODE)
|
||||
|
||||
var time_show_full_text = _calculate_talking_time()
|
||||
|
||||
@@ -201,10 +220,10 @@ func say(character: String, line: String) :
|
||||
_talking_timer.start(time_show_full_text)
|
||||
|
||||
if PROGRESS_BAR_ENABLED:
|
||||
var _total_time: float = _calculate_total_time()
|
||||
var total_time: float = _calculate_total_time()
|
||||
%ProgressBar.visible = true
|
||||
%ProgressBar.value = 0
|
||||
_progress_tween.tween_property(%ProgressBar, "value", 100, _total_time)
|
||||
_progress_tween.tween_property(%ProgressBar, "value", 100, total_time)
|
||||
|
||||
set_process(true)
|
||||
|
||||
@@ -214,6 +233,7 @@ func speedup():
|
||||
say_visible.emit()
|
||||
say_finished.emit()
|
||||
|
||||
|
||||
# Called by the dialog player when user wants to finish dialogue immediately.
|
||||
func finish():
|
||||
say_visible.emit()
|
||||
@@ -222,12 +242,16 @@ func finish():
|
||||
|
||||
# To be called if voice audio has finished.
|
||||
func voice_audio_finished():
|
||||
_stop_character_talking()
|
||||
if not _click_to_continue:
|
||||
_stop_character_talking()
|
||||
finish();
|
||||
|
||||
# Handler to deal with this node being removed
|
||||
|
||||
# Handler to deal with this node being removed
|
||||
func _on_tree_exiting() -> void:
|
||||
_stop_character_talking()
|
||||
|
||||
|
||||
# The dialog line was printed, start the waiting time and then finish
|
||||
# the dialog
|
||||
func _on_dialog_line_typed():
|
||||
@@ -236,20 +260,30 @@ func _on_dialog_line_typed():
|
||||
# This signal is for the core.
|
||||
say_visible.emit()
|
||||
|
||||
if not _click_to_continue:
|
||||
# Start time to pass line, except click is required or line has audio.
|
||||
if not _click_to_continue and not _has_audio:
|
||||
var time_to_disappear: float = _calculate_time_to_disappear()
|
||||
_clearing_timer.start(time_to_disappear)
|
||||
|
||||
|
||||
func _calculate_talking_time() -> float:
|
||||
if _slow_text_mode:
|
||||
escoria.logger.info(self, "Text in Slow mode")
|
||||
_text_time_per_character = _text_time_per_character * SLOW_TEXT_MODE_MULTIPLIER
|
||||
|
||||
return _text_time_per_character / 1000 * len(_current_line)
|
||||
var time = _text_time_per_character / 1000 * len(_current_line)
|
||||
|
||||
var minimum_time = MINIMUM_TALKING_TIME
|
||||
if _slow_text_mode:
|
||||
minimum_time = MINIMUM_TALKING_TIME * SLOW_TEXT_MODE_MULTIPLIER
|
||||
if time < minimum_time:
|
||||
return minimum_time
|
||||
|
||||
return time
|
||||
|
||||
|
||||
func _calculate_time_to_disappear() -> float:
|
||||
return (_get_number_of_words() as float / _reading_speed_in_wpm as float)
|
||||
return _get_number_of_words() as float / _reading_speed_in_wpm as float
|
||||
|
||||
|
||||
func _calculate_total_time() -> float:
|
||||
@@ -276,11 +310,13 @@ func _on_paused():
|
||||
func _on_resumed():
|
||||
_talking_timer.set_paused(false)
|
||||
|
||||
|
||||
func _stop_character_talking():
|
||||
# Make the speaking item animation stop talking, if it is still alive
|
||||
if is_instance_valid(_current_character) and _current_character != null:
|
||||
_current_character.stop_talking()
|
||||
|
||||
|
||||
func _on_tree_exited():
|
||||
_stop_character_talking()
|
||||
|
||||
@@ -289,19 +325,21 @@ func _account_for_margin_x() -> void:
|
||||
if position.x < 0:
|
||||
position.x = 0
|
||||
|
||||
var screen_margin_x = position.x + size.x - \
|
||||
ProjectSettings.get("display/window/size/viewport_width")
|
||||
var screen_margin_x = (
|
||||
position.x + size.x - ProjectSettings.get("display/window/size/viewport_width")
|
||||
)
|
||||
|
||||
if screen_margin_x > 0:
|
||||
position.x -= screen_margin_x + X_POSITION_OFFSET
|
||||
position.x -= screen_margin_x + _x_position_offset
|
||||
|
||||
|
||||
func _account_for_margin_y() -> void:
|
||||
if position.y < 0:
|
||||
position.y = 0
|
||||
|
||||
var screen_margin_y = position.y + size.y - \
|
||||
ProjectSettings.get("display/window/size/viewport_height")
|
||||
var screen_margin_y = (
|
||||
position.y + size.y - ProjectSettings.get("display/window/size/viewport_height")
|
||||
)
|
||||
|
||||
if screen_margin_y > 0:
|
||||
position.y -= screen_margin_y + Y_POSITION_OFFSET
|
||||
position.y -= screen_margin_y + _y_position_offset
|
||||
|
||||
@@ -35,6 +35,18 @@ func get_achievements() -> Dictionary:
|
||||
return _achievement_tracker.duplicate()
|
||||
|
||||
|
||||
func get_achievements_total() -> int:
|
||||
return _game_achievements.size()
|
||||
|
||||
|
||||
func get_unlocked_achievements_total() -> int:
|
||||
var unlocked_achievements_total = 0
|
||||
for key in _achievement_tracker:
|
||||
if _achievement_tracker.get(key):
|
||||
unlocked_achievements_total += 1
|
||||
return unlocked_achievements_total
|
||||
|
||||
|
||||
func reset_achievements() -> void:
|
||||
_achievement_tracker.clear()
|
||||
_load_achievements()
|
||||
@@ -72,15 +84,21 @@ func generate_achievement_literal(achievement_id: String, variant: String = "_ti
|
||||
return literal
|
||||
|
||||
|
||||
func format_time(time) -> String:
|
||||
return str(time)
|
||||
|
||||
|
||||
func start_tracking_time() -> void:
|
||||
if not time_tracker == null:
|
||||
time_tracker.restart()
|
||||
|
||||
|
||||
func pause_tracking_time() -> void:
|
||||
if not time_tracker == null:
|
||||
time_tracker.pause()
|
||||
|
||||
|
||||
func resume_tracking_time() -> void:
|
||||
if not time_tracker == null:
|
||||
time_tracker.resume()
|
||||
|
||||
|
||||
func stop_tracking_time() -> void:
|
||||
if not time_tracker == null:
|
||||
time_tracker.stop()
|
||||
|
||||
@@ -10,9 +10,10 @@ var achievement_id: String:
|
||||
return achievement_id
|
||||
set(p_achievement_id):
|
||||
achievement_id = p_achievement_id
|
||||
%AchievementTitle.text = gymkhana.achievement_manager.generate_achievement_literal(
|
||||
%AchievementTitle.text = tr(gymkhana.achievement_manager.generate_achievement_literal(
|
||||
achievement_id, "title"
|
||||
)
|
||||
))
|
||||
%AchievementCounter.text = "(%s/%s)" % [gymkhana.achievement_manager.get_unlocked_achievements_total(), gymkhana.achievement_manager.get_achievements_total()]
|
||||
|
||||
var _timer: Timer = Timer.new()
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ offset_bottom = 40.0
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 10
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 5
|
||||
theme_override_constants/margin_right = 15
|
||||
theme_override_constants/margin_bottom = 10
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/MarginContainer"]
|
||||
@@ -33,10 +33,19 @@ theme_override_constants/separation = 8
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer/VBoxContainer"]
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/MarginContainer/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "ACHIEVEMENT_UNLOCKED_NOTIFICATION_LABEL"
|
||||
|
||||
[node name="AchievementCounter" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "(1/2)"
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="AchievementTitle" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
@@ -44,6 +53,7 @@ text = "ACHIEVEMENT_ACHIVEMENT_ID_TITLE"
|
||||
label_settings = SubResource("LabelSettings_fw80s")
|
||||
|
||||
[node name="ClearButton" type="Button" parent="PanelContainer/MarginContainer/HBoxContainer"]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(30, 30)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
@@ -40,6 +40,12 @@ func stop() -> void:
|
||||
_timer.stop()
|
||||
_timer.timeout.disconnect(_timer_timeout)
|
||||
|
||||
func pause() -> void:
|
||||
_timer.paused = true
|
||||
|
||||
func resume() -> void:
|
||||
_timer.paused = false
|
||||
|
||||
func restart() -> void:
|
||||
reset()
|
||||
start()
|
||||
|
||||
@@ -6,11 +6,22 @@ const PERFECT = "perfect"
|
||||
const FASTEST = "fastest"
|
||||
const SUBMIT = "submit"
|
||||
|
||||
var url: String
|
||||
const API_CONFIG_PATH = "res://secret/api.cfg"
|
||||
const API_CONFIG_DB_SECTION = "score_db"
|
||||
const API_CONFIG_SUBMIT_SECTION = "score_submit"
|
||||
|
||||
# Variables loaded from api.cfg
|
||||
var api_url: String
|
||||
var project_id: String
|
||||
var database_id: String
|
||||
var email: String
|
||||
var password: String
|
||||
var score_submit_url: String
|
||||
var score_submit_key: String
|
||||
|
||||
# Session cookie used for authentication. Needed for score submitting. Stored encrypted in session_cookie.cfg
|
||||
# using session_cookie_encrypted_pass as key.
|
||||
var session_cookie: String = ""
|
||||
# Session cookie expiry date in seconds from Unix epoch.
|
||||
var session_cookie_expiry_date: int = -1
|
||||
|
||||
var http_requests: Dictionary = {
|
||||
PERFECT: HTTPRequest.new(),
|
||||
@@ -18,12 +29,13 @@ var http_requests: Dictionary = {
|
||||
SUBMIT: HTTPRequest.new(),
|
||||
}
|
||||
|
||||
# Session cookie used for authentication. Needed for score submitting.
|
||||
var session_cookie: String = ""
|
||||
|
||||
|
||||
func _init(scene) -> void:
|
||||
_load_api_config()
|
||||
|
||||
# TODO: remove when https://functions.app.fosil.eu has a valid certificate
|
||||
http_requests[SUBMIT].set_tls_options(TLSOptions.client_unsafe())
|
||||
|
||||
scene.add_child(http_requests[PERFECT])
|
||||
scene.add_child(http_requests[FASTEST])
|
||||
scene.add_child(http_requests[SUBMIT])
|
||||
@@ -31,69 +43,67 @@ func _init(scene) -> void:
|
||||
|
||||
func _load_api_config() -> void:
|
||||
var config = ConfigFile.new()
|
||||
var error = config.load("res://api.cfg")
|
||||
var error = config.load(API_CONFIG_PATH)
|
||||
if error != OK:
|
||||
push_error("An error occurred loading api config: error=%s" % error)
|
||||
return
|
||||
|
||||
url = config.get_value("api", "url", "")
|
||||
project_id = config.get_value("api", "project_id", "")
|
||||
database_id = config.get_value("api", "database_id", "")
|
||||
email = config.get_value("api", "email", "")
|
||||
password = config.get_value("api", "password", "")
|
||||
api_url = config.get_value(API_CONFIG_DB_SECTION, "url", "")
|
||||
project_id = config.get_value(API_CONFIG_DB_SECTION, "project_id", "")
|
||||
database_id = config.get_value(API_CONFIG_DB_SECTION, "database_id", "")
|
||||
score_submit_url = config.get_value(API_CONFIG_SUBMIT_SECTION, "url", "")
|
||||
score_submit_key = config.get_value(API_CONFIG_SUBMIT_SECTION, "key", "")
|
||||
|
||||
|
||||
func get_scores(collection: String) -> Array[RTMIScoreRow]:
|
||||
var http_request = http_requests[collection]
|
||||
var data = await _score_http_request(http_request, "%s/databases/%s/collections/%s/documents" % [url, database_id, collection])
|
||||
if collection == FASTEST:
|
||||
submit_score()
|
||||
var response_data = await _score_http_request(http_request, "%s/databases/%s/collections/%s/documents" % [api_url, database_id, collection])
|
||||
|
||||
if not data:
|
||||
if not response_data:
|
||||
return []
|
||||
|
||||
# Map DB rows to RTMIScoreRow
|
||||
var scores_untyped = data.get("documents").map(func(document): return RTMIScoreRow.new(document))
|
||||
var scores_untyped = response_data.get("documents").map(func(document): return RTMIScoreRow.new(document))
|
||||
scores_untyped.sort_custom(func(first, last): return first.time < last.time)
|
||||
# Array.map() does not support typing, we need to use Array.assign to set the type.
|
||||
var scores: Array[RTMIScoreRow]
|
||||
scores.assign(scores_untyped)
|
||||
return scores
|
||||
|
||||
|
||||
func submit_score() -> void:
|
||||
var session_cookie = await get_session_cookie(http_requests[SUBMIT])
|
||||
push_error("SESSION COOKIE=%s" % session_cookie)
|
||||
return
|
||||
|
||||
|
||||
func get_session_cookie(http_request: HTTPRequest) -> String:
|
||||
if session_cookie:
|
||||
return session_cookie
|
||||
|
||||
var error = http_request.request(
|
||||
"%s/account/sessions/email" % url,
|
||||
["X-Appwrite-Project: %s" % project_id, "Content-Type: application/json"],
|
||||
HTTPClient.METHOD_POST,
|
||||
'{"email":"%s","password":"%s"}' % [email, password]
|
||||
func submit_score(collection: String, name: String, time: int) -> bool:
|
||||
var hash = ("%s_%s_%s_%s" % [collection, name, time, score_submit_key]).sha256_text()
|
||||
var request_data: String = (
|
||||
JSON
|
||||
. new()
|
||||
. stringify(
|
||||
{
|
||||
"collectionId": collection,
|
||||
"score":
|
||||
{
|
||||
"name": name,
|
||||
"time": time,
|
||||
},
|
||||
"hash": hash
|
||||
}
|
||||
)
|
||||
)
|
||||
if error != OK:
|
||||
push_error("An error occurred creating the HTTP request: error=%s" % error)
|
||||
return ""
|
||||
var response_data = await _score_http_request(http_requests[SUBMIT], score_submit_url, HTTPClient.METHOD_POST, request_data)
|
||||
|
||||
var response: Array = await http_request.request_completed
|
||||
var result: int = response[0]
|
||||
var http_status: int = response[1]
|
||||
var response_headers: PackedStringArray = response[2]
|
||||
if not response_data.success:
|
||||
push_error("Error submitting score: error=%s" % response_data.errorMsg)
|
||||
|
||||
if result != HTTPRequest.RESULT_SUCCESS or http_status < 200 or http_status >= 300:
|
||||
push_error("HTTP request returned an error: result=%s http_status=%s" % [result, http_status])
|
||||
return ""
|
||||
return response_data.success
|
||||
|
||||
var cookie_pos = Array(response_headers).find_custom(func(header: String): return header.to_lower().begins_with("set-cookie: "))
|
||||
if cookie_pos < 0:
|
||||
return ""
|
||||
|
||||
session_cookie = response_headers[cookie_pos].substr("set-cookie: ".length()).get_slice(";", 0)
|
||||
return session_cookie
|
||||
## Calculates a certain time which position would have in scoreboard. First position is 0.
|
||||
func calculate_score_position(collection: String, time: int) -> int:
|
||||
var scores: Array[RTMIScoreRow] = await get_scores(collection)
|
||||
var pos = scores.find_custom(func(score): return time < score.time)
|
||||
if pos < 0:
|
||||
return scores.size()
|
||||
|
||||
return pos
|
||||
|
||||
|
||||
func _score_http_request(
|
||||
@@ -110,18 +120,20 @@ func _score_http_request(
|
||||
var response: Array = await http_request.request_completed
|
||||
var result: int = response[0]
|
||||
var http_status: int = response[1]
|
||||
var body: PackedByteArray = response[3]
|
||||
var response_body: PackedByteArray = response[3]
|
||||
|
||||
if result != HTTPRequest.RESULT_SUCCESS or http_status < 200 or http_status >= 300:
|
||||
push_error("HTTP request returned an error: result=%s http_status=%s" % [result, http_status])
|
||||
push_error("HTTP request returned an error: result=%s http_status=%s body=%s" % [result, http_status, response_body.get_string_from_utf8()])
|
||||
return null
|
||||
|
||||
var response_data = JSON.parse_string(body.get_string_from_utf8())
|
||||
var response_data = JSON.parse_string(response_body.get_string_from_utf8())
|
||||
if not response_data:
|
||||
push_error("Error parsing HTTP body.")
|
||||
push_error("Error parsing HTTP response body.")
|
||||
return null
|
||||
|
||||
return response_data
|
||||
|
||||
|
||||
func format_time(time: int) -> String:
|
||||
var hours = time / 3600
|
||||
var minutes = (time % 3600) / 60
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cqgluci3f3v3n"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cqgluci3f3v3n"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bhi02d1pasur4" path="res://addons/escoria-ui-return-monkey-island/achievements/scoreboard/rtmi_scoreboard.gd" id="1_efvuy"]
|
||||
[ext_resource type="Theme" uid="uid://djtwqnfbbt5t8" path="res://addons/escoria-ui-return-monkey-island/theme/menu.tres" id="1_ip2kf"]
|
||||
[ext_resource type="PackedScene" uid="uid://ooknv238745j" path="res://addons/escoria-ui-return-monkey-island/achievements/scoreboard/rtmi_scoreboard_panel.tscn" id="1_o5uv4"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_efvuy"]
|
||||
bg_color = Color(0.22, 0.22, 0.22, 1)
|
||||
|
||||
[node name="RtmiScoreboard" type="PanelContainer"]
|
||||
process_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@@ -14,6 +16,7 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme = ExtResource("1_ip2kf")
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_efvuy")
|
||||
script = ExtResource("1_efvuy")
|
||||
|
||||
|
||||
@@ -7,17 +7,21 @@ const RECORDS_PER_PAGE: int = 10
|
||||
@export var collection: String
|
||||
|
||||
var scores: Array[RTMIScoreRow]
|
||||
var total_records = 0
|
||||
var current_page = 0
|
||||
var total_pages = 0
|
||||
var total_records: int = 0
|
||||
var current_page: int = 0
|
||||
var total_pages: int = 0
|
||||
|
||||
@onready var prev_button: RTMIMenuButton = %PrevButton
|
||||
@onready var next_button: RTMIMenuButton = %NextButton
|
||||
@onready var spinner: Spinner = %Spinner
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
%Title.text = str("SCOREBOARD_%s_TITLE" % collection).to_upper()
|
||||
spinner.hide()
|
||||
prev_button.pressed.connect(_prev_page)
|
||||
next_button.pressed.connect(_next_page)
|
||||
|
||||
|
||||
func refresh() -> void:
|
||||
current_page = 0
|
||||
@@ -26,34 +30,32 @@ func refresh() -> void:
|
||||
await _get_scores()
|
||||
spinner.hide()
|
||||
_fill_scores()
|
||||
_update_pager()
|
||||
|
||||
|
||||
func _fill_scores():
|
||||
_clear_scores()
|
||||
|
||||
total_records = scores.size()
|
||||
total_pages = total_records / RECORDS_PER_PAGE
|
||||
if total_records % RECORDS_PER_PAGE > 0:
|
||||
total_pages += 1
|
||||
_update_pager()
|
||||
|
||||
if scores.is_empty():
|
||||
return
|
||||
|
||||
var pos: int = RECORDS_PER_PAGE * current_page + 1
|
||||
total_records = scores.size()
|
||||
total_pages = 1
|
||||
if total_records > RECORDS_PER_PAGE:
|
||||
total_pages = 1 + floor(total_records / RECORDS_PER_PAGE)
|
||||
var start_score = current_page * RECORDS_PER_PAGE
|
||||
var end_score = (current_page + 1) * RECORDS_PER_PAGE
|
||||
if end_score >= total_records:
|
||||
end_score = total_records + 1
|
||||
var scores_slice = scores.slice(start_score, end_score)
|
||||
|
||||
var scores_slice = scores.slice(
|
||||
current_page * (RECORDS_PER_PAGE + 1), RECORDS_PER_PAGE * (current_page + 1)
|
||||
)
|
||||
#for score in range(current_page * RECORDS_PER_PAGE * current_page + 1):
|
||||
for score in scores:
|
||||
var pos: int = RECORDS_PER_PAGE * current_page + 1
|
||||
for score in scores_slice:
|
||||
# ToDo create and add rich label
|
||||
var label = Label.new()
|
||||
label.add_theme_font_override(
|
||||
"font", load("res://addons/escoria-ui-return-monkey-island/fonts/SpaceMono-Regular.ttf")
|
||||
)
|
||||
label.text = (
|
||||
" %2s. %-24s %10s %19s"
|
||||
% [pos, score.name.to_upper(), _format_time(score.time), _format_date(score.date)]
|
||||
)
|
||||
label.add_theme_font_override("font", load("res://addons/escoria-ui-return-monkey-island/fonts/SpaceMono-Regular.ttf"))
|
||||
label.text = (" %2s. %-24s %10s %19s" % [pos, score.name.to_upper(), _format_time(score.time), _format_date(score.date)])
|
||||
%Scores.add_child(label)
|
||||
pos += 1
|
||||
|
||||
@@ -71,23 +73,35 @@ func _get_scores() -> void:
|
||||
scores = await gymkhana.score_manager.get_scores(collection)
|
||||
|
||||
|
||||
func _prev_page() -> void:
|
||||
if current_page > 0:
|
||||
current_page -= 1
|
||||
_fill_scores()
|
||||
|
||||
|
||||
func _next_page() -> void:
|
||||
if current_page < total_pages - 1:
|
||||
current_page += 1
|
||||
_fill_scores()
|
||||
|
||||
|
||||
func _update_pager() -> void:
|
||||
prev_button.disabled = true
|
||||
next_button.disabled = true
|
||||
prev_button.focus_mode = FOCUS_NONE
|
||||
|
||||
if current_page > 1:
|
||||
next_button.disabled = true
|
||||
next_button.focus_mode = FOCUS_NONE
|
||||
|
||||
if current_page > 0:
|
||||
prev_button.disabled = false
|
||||
|
||||
if current_page + 1 < total_pages:
|
||||
if current_page < total_pages - 1:
|
||||
next_button.disabled = false
|
||||
|
||||
|
||||
func _format_date(iso_date: String) -> String:
|
||||
var date = Time.get_datetime_dict_from_datetime_string(iso_date, false)
|
||||
return (
|
||||
"%s/%02d/%02d %02d:%02d"
|
||||
% [date["year"], date["month"], date["day"], date["hour"], date["minute"]]
|
||||
)
|
||||
return "%s/%02d/%02d %02d:%02d" % [date["year"], date["month"], date["day"], date["hour"], date["minute"]]
|
||||
|
||||
|
||||
func _format_time(time: int) -> String:
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://ooknv238745j"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://ooknv238745j"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cxvhsdqap7w1b" path="res://addons/escoria-ui-return-monkey-island/achievements/scoreboard/rtmi_scoreboard_panel.gd" id="1_35c2h"]
|
||||
[ext_resource type="Theme" uid="uid://djtwqnfbbt5t8" path="res://addons/escoria-ui-return-monkey-island/theme/menu.tres" id="1_ine7w"]
|
||||
[ext_resource type="FontFile" uid="uid://bq0vin2knt0or" path="res://addons/escoria-ui-return-monkey-island/fonts/SpaceMono-Regular.ttf" id="2_bn406"]
|
||||
[ext_resource type="Script" uid="uid://elqkwjm0r5c7" path="res://addons/escoria-ui-return-monkey-island/menus/rtmi_menu_button.gd" id="2_hgepf"]
|
||||
[ext_resource type="Script" uid="uid://doqt8bqgwakt" path="res://addons/tattomoosa.spinner/spinner.gd" id="4_bn406"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ine7w"]
|
||||
bg_color = Color(0.2520276, 0.25202766, 0.25202754, 1)
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_hgepf"]
|
||||
|
||||
[node name="ScoreBoardPanel" type="PanelContainer"]
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme = ExtResource("1_ine7w")
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_ine7w")
|
||||
script = ExtResource("1_35c2h")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
@@ -128,7 +134,7 @@ process_thread_group = 0
|
||||
physics_interpolation_mode = 2
|
||||
auto_translate_mode = 0
|
||||
editor_description = ""
|
||||
visible = true
|
||||
visible = false
|
||||
modulate = Color(1, 1, 1, 1)
|
||||
self_modulate = Color(1, 1, 1, 1)
|
||||
show_behind_parent = false
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
class_name RTMIAchievementSummaryContainer
|
||||
extends PanelContainer
|
||||
|
||||
signal score_submitted()
|
||||
|
||||
const CHARACTER_LIMIT: int = 32
|
||||
const ALLOWED_CHARACTERS = "[à-ÿÀ-ŸA-Za-z0-9 _-]"
|
||||
|
||||
var error = false
|
||||
var _perfect = false
|
||||
var perfect = false
|
||||
var collection: String
|
||||
|
||||
@onready var input_name: LineEdit = %InputName
|
||||
@onready var total_time: Label = %TotalTime
|
||||
@onready var pos: Label = %Position
|
||||
@onready var achievement_count: Label = %AchievementCount
|
||||
@onready var unlocked_achievements_container: VBoxContainer = %UnlockedAchievementsContainer
|
||||
@onready var submit_button: RTMIMenuButton = %SubmitButton
|
||||
@onready var submit_button: Spinner = %Spinner
|
||||
@onready var spinner: Spinner = %Spinner
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@@ -19,34 +24,48 @@ func _ready() -> void:
|
||||
input_name.grab_focus()
|
||||
|
||||
|
||||
func show():
|
||||
super.show()
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_released("ui_accept"):
|
||||
if event.is_action_pressed("ui_enter"):
|
||||
_on_submit_button_up()
|
||||
|
||||
|
||||
func refresh() -> void:
|
||||
_fill()
|
||||
|
||||
|
||||
func _fill():
|
||||
_clear()
|
||||
total_time.text = gymkhana.achievement_manager.format_time(
|
||||
gymkhana.achievement_manager.played_time
|
||||
)
|
||||
total_time.text = gymkhana.score_manager.format_time(gymkhana.achievement_manager.played_time)
|
||||
var achievements = gymkhana.achievement_manager.get_achievements()
|
||||
var unlocked = 0
|
||||
for achievement_key in achievements:
|
||||
var label = Label.new()
|
||||
label.text = achievement_key
|
||||
label.text = tr(gymkhana.achievement_manager.generate_achievement_literal(
|
||||
achievement_key, "title"
|
||||
))
|
||||
label.add_theme_color_override("font_color", Color.DIM_GRAY)
|
||||
if achievements.get(achievement_key):
|
||||
label.add_theme_color_override("font_color", Color.GREEN)
|
||||
unlocked += 1
|
||||
unlocked_achievements_container.add_child(label)
|
||||
|
||||
achievement_count.text = "%s / %s" % [unlocked, achievements.size()]
|
||||
|
||||
if unlocked == achievements.size():
|
||||
submit_button.text = tr("SUBMIT_PERFECT_SCORE")
|
||||
_perfect = true
|
||||
perfect = true
|
||||
|
||||
collection = gymkhana.score_manager.PERFECT if perfect else gymkhana.score_manager.FASTEST
|
||||
check_score()
|
||||
|
||||
|
||||
func check_score():
|
||||
if perfect:
|
||||
escoria.game_scene.launch_confetti()
|
||||
|
||||
var played_time = floor(randf() * 1000)
|
||||
var pos_int = await gymkhana.score_manager.calculate_score_position(collection, gymkhana.achievement_manager.played_time)
|
||||
pos.text = "#" + str(pos_int + 1)
|
||||
|
||||
|
||||
func _clear() -> void:
|
||||
@@ -68,22 +87,29 @@ func _on_input_name_changed(_new_text: String):
|
||||
var valid = _validate_name()
|
||||
|
||||
if not valid:
|
||||
_set_error()
|
||||
_set_label_error()
|
||||
return
|
||||
_set_no_error()
|
||||
_set_label_no_error()
|
||||
|
||||
|
||||
func _on_submit_button_up() -> void:
|
||||
# ToDo:
|
||||
# - send data
|
||||
var valid = _validate_name()
|
||||
if not valid:
|
||||
_set_error()
|
||||
_set_label_error()
|
||||
return
|
||||
|
||||
spinner.show()
|
||||
#gymkhana.score_manager.submit_score()
|
||||
_set_submit_ok()
|
||||
var success: bool = await gymkhana.score_manager.submit_score(collection, input_name.text, gymkhana.achievement_manager.played_time)
|
||||
if success:
|
||||
_set_submit_ok()
|
||||
input_name.editable = false
|
||||
input_name.selecting_enabled = false
|
||||
input_name.focus_mode = FOCUS_NONE
|
||||
submit_button.disabled = true
|
||||
submit_button.focus_mode = FOCUS_NONE
|
||||
score_submitted.emit()
|
||||
else:
|
||||
_set_submit_error()
|
||||
spinner.hide()
|
||||
|
||||
|
||||
@@ -105,20 +131,17 @@ func _validate_name() -> bool:
|
||||
return true
|
||||
|
||||
|
||||
func _set_error() -> void:
|
||||
if not error:
|
||||
input_name.modulate.b = 0.0
|
||||
input_name.modulate.g = 0.0
|
||||
error = true
|
||||
func _set_label_error() -> void:
|
||||
input_name.modulate = Color.RED
|
||||
|
||||
|
||||
func _set_no_error() -> void:
|
||||
if error:
|
||||
input_name.modulate.b = 1.0
|
||||
input_name.modulate.g = 1.0
|
||||
error = false
|
||||
func _set_label_no_error() -> void:
|
||||
input_name.modulate = Color.WHITE
|
||||
|
||||
|
||||
func _set_submit_ok() -> void:
|
||||
submit_button.modulate.r = 0.0
|
||||
submit_button.modulate.b = 0.0
|
||||
submit_button.modulate = Color.GREEN
|
||||
|
||||
|
||||
func _set_submit_error() -> void:
|
||||
submit_button.modulate = Color.RED
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://ch5d4emoxq6t4"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://ch5d4emoxq6t4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://wor3bvk7tdh0" path="res://addons/escoria-ui-return-monkey-island/achievements/summary/rtmi_achievement_summary.gd" id="1_vcqj7"]
|
||||
[ext_resource type="Script" uid="uid://elqkwjm0r5c7" path="res://addons/escoria-ui-return-monkey-island/menus/rtmi_menu_button.gd" id="2_3d1qx"]
|
||||
[ext_resource type="Script" uid="uid://doqt8bqgwakt" path="res://addons/tattomoosa.spinner/spinner.gd" id="3_co5jd"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_co5jd"]
|
||||
|
||||
[node name="AchievementSummary" type="PanelContainer"]
|
||||
custom_minimum_size = Vector2(300, 0)
|
||||
offset_right = 40.0
|
||||
@@ -20,32 +22,71 @@ theme_override_constants/margin_bottom = 10
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 23
|
||||
text = "ACHIEVEMENT_SUMMARY"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="TotalTimeLabel" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="TotalTimeLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "TOTAL_TIME"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="TotalTime" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
[node name="TotalTime" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 41
|
||||
text = "00:00:00s"
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "0h 00m 00s"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="PositionLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "POSITION"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Position" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer2"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "-"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/separator = SubResource("StyleBoxEmpty_co5jd")
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="AchievementTitle" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "ACHIEVEMENT_SUMMARY"
|
||||
|
||||
[node name="AchievementCount" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "1 / 7"
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 5
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 5
|
||||
theme_override_constants/margin_bottom = 10
|
||||
|
||||
[node name="UnlockedAchievementsContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/MarginContainer"]
|
||||
@@ -77,6 +118,10 @@ text = "ACHIEVEMENT TEXT PLACEHOLDER"
|
||||
layout_mode = 2
|
||||
text = "ACHIEVEMENT TEXT PLACEHOLDER"
|
||||
|
||||
[node name="HSeparator3" type="HSeparator" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/separator = SubResource("StyleBoxEmpty_co5jd")
|
||||
|
||||
[node name="InputName" type="LineEdit" parent="MarginContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 60)
|
||||
@@ -85,6 +130,10 @@ placeholder_text = "NAME_PLACEHOLDER"
|
||||
clear_button_enabled = true
|
||||
caret_blink = true
|
||||
|
||||
[node name="HSeparator2" type="HSeparator" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/separator = SubResource("StyleBoxEmpty_co5jd")
|
||||
|
||||
[node name="SubmitButton" type="Button" parent="MarginContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 60)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="left_ptr.svg"
|
||||
sodipodi:docname="arrow.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
@@ -21,13 +21,13 @@
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="22.589975"
|
||||
inkscape:cx="-0.68614506"
|
||||
inkscape:cy="8.0788047"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="971"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:zoom="11.294988"
|
||||
inkscape:cx="17.397098"
|
||||
inkscape:cy="20.053143"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" />
|
||||
<g
|
||||
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
79
addons/escoria-ui-return-monkey-island/cursors/blank.svg
Normal file
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="blank.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="11.294988"
|
||||
inkscape:cx="17.485632"
|
||||
inkscape:cy="20.141677"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" />
|
||||
<g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)" />
|
||||
<defs
|
||||
id="defs5">
|
||||
<filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB">
|
||||
<feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" />
|
||||
<feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" />
|
||||
<feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" />
|
||||
<feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" />
|
||||
<feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" />
|
||||
<feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" />
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
81
addons/escoria-ui-return-monkey-island/cursors/east.svg
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="east.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="3.9933811"
|
||||
inkscape:cx="57.219683"
|
||||
inkscape:cy="60.224655"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" /><g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)"><g
|
||||
style="fill:none"
|
||||
id="g1"
|
||||
transform="matrix(-0.82301095,0,0,-0.82301095,182.41215,136.85333)"><path
|
||||
d="m 42.8435,124.893 c -1.433,0.787 -2.3236,2.292 -2.3236,3.927 0,1.635 0.8906,3.14 2.3236,3.927 l 54.7779,30.08 c 0.627191,0.34422 1.302043,0.52288 1.973343,0.54975 1.581207,0.0633 3.142697,-0.71559 4.015257,-2.15675 l -3.8322,-2.32 c 3.8322,2.32 3.8332,2.319 3.8332,2.319 l 10e-4,-0.002 0.002,-0.003 0.006,-0.01 0.018,-0.03 0.063,-0.106 c 0.054,-0.091 0.131,-0.221 0.228,-0.387 0.194,-0.333 0.469,-0.812 0.807,-1.418 0.675,-1.21 1.601,-2.93 2.619,-4.992 1.631,-3.303 3.548,-7.578 5.037,-12.096 0.307,-0.002 0.635,-0.003 0.982,-0.004 2.728,-0.008 6.629,-0.009 11.318,-0.006 9.291,0.006 21.656,0.029 34.074,0.052 l 0.342,10e-4 c 12.53,0.023 25.088,0.047 34.56,0.052 4.735,0.003 8.704,0.002 11.516,-0.007 1.404,-0.004 2.528,-0.009 3.317,-0.017 0.392,-0.004 0.717,-0.009 0.958,-0.014 0.117,-0.003 0.238,-0.006 0.347,-0.011 0.051,-0.002 0.131,-0.006 0.22,-0.013 0.028,-0.003 0.07,-0.006 0.12,-0.011 0.021,-0.002 0.041,-0.004 0.062,-0.006 0.185,-0.019 0.387,-0.051 0.605,-0.099 0.437,-0.097 0.923,-0.262 1.427,-0.523 1.038,-0.539 1.973,-1.395 2.726,-2.567 1.424,-2.219 2.194,-5.552 2.194,-10.51 0,-4.959 -0.77,-8.292 -2.194,-10.511 -0.753,-1.172 -1.688,-2.028 -2.726,-2.566 -0.504,-0.262 -0.99,-0.427 -1.427,-0.524 -0.218,-0.048 -0.42,-0.08 -0.605,-0.099 -0.015,-0.001 -0.031,-0.003 -0.046,-0.004 -0.047,-0.005 -0.087,-0.009 -0.115,-0.011 -0.092,-0.008 -0.175,-0.012 -0.229,-0.015 -0.114,-0.006 -0.239,-0.009 -0.359,-0.012 -0.247,-0.007 -0.577,-0.012 -0.973,-0.016 -0.797,-0.009 -1.929,-0.015 -3.339,-0.02 -2.825,-0.009 -6.806,-0.01 -11.552,-0.007 -9.476,0.007 -22.022,0.033 -34.545,0.06 h -0.071 c -12.549,0.027 -25.067,0.053 -34.452,0.059 -4.694,0.004 -8.597,0.002 -11.327,-0.007 -0.364,-0.002 -0.706,-0.003 -1.025,-0.004 -1.494,-4.388 -3.363,-8.515 -4.946,-11.701 -0.989,-1.991 -1.884,-3.6474 -2.534,-4.8119 -0.326,-0.5829 -0.591,-1.044 -0.778,-1.3639 -0.093,-0.16 -0.167,-0.2848 -0.219,-0.372 l -0.061,-0.1022 -0.018,-0.0294 -0.005,-0.0092 -0.002,-0.0032 -10e-4,-0.0013 c 0,-5e-4 -0.001,-0.001 -3.8332,2.3188 l 3.8322,-2.3198 c -1.243,-2.0539 -3.8841,-2.7627 -5.9886,-1.607 z"
|
||||
stroke="#0000ff"
|
||||
stroke-width="8.96"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path1-3"
|
||||
sodipodi:nodetypes="csccscccccccccccccsccccsccccccccscccccccccccccccccccsccccccccc"
|
||||
style="stroke:#f2f2f2;stroke-opacity:1" /><path
|
||||
d="M 44.9999,128.82 99.7778,98.7397 c 0,0 6.1412,10.1473 9.0922,20.5063 0.06,0.213 99.974,-0.211 100.842,0 0,0 2.968,0 2.968,9.246 0,9.245 -2.968,9.245 -2.968,9.245 -0.76,0.188 -100.609,-0.186 -100.66,0 -2.87,10.583 -9.2742,21.163 -9.2742,21.163 z"
|
||||
fill="#00ff00"
|
||||
id="path2-6"
|
||||
style="fill:#666666;fill-opacity:1" /></g></g><defs
|
||||
id="defs5"><filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" /></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
110
addons/escoria-ui-return-monkey-island/cursors/hand.svg
Normal file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="hand.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="11.294988"
|
||||
inkscape:cx="17.397098"
|
||||
inkscape:cy="20.053143"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" /><g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)"><g
|
||||
style="fill:none"
|
||||
id="g3"
|
||||
transform="matrix(0.38020692,0,0,0.38020692,-9.40517,-10.599142)"><g
|
||||
filter="url(#filter0_d_21_2)"
|
||||
id="g1"><path
|
||||
d="m 117.348,35.02 c -6.215,0 -12.306,3.0662 -16.178,8.2326 -3.8717,5.1664 -5.7582,12.2574 -5.7582,20.307 V 125.03 c -4.8514,-3.593 -10.5586,-9.073 -14.807,-10.977 -8.5854,-3.847 -16.4297,-4.602 -22.759,-2.744 -12.6585,3.715 -16.7264,15.916 -16.7264,15.916 l -1.9194,6.312 5.484,3.841 c 12.0713,8.157 24.3061,28.164 35.9208,46.652 5.8073,9.243 11.5325,17.911 18.0975,24.972 6.5647,7.06 14.6697,12.962 24.6787,12.898 l 77.325,-0.274 7.952,-0.274 0.822,-7.684 8.775,-87.814 c 1.302,-12.594 -6.33,-23.323 -16.178,-26.6188 -4.753,-1.5907 -10.207,-0.7745 -15.081,1.3718 -3.201,-4.9067 -7.388,-8.6174 -12.614,-9.8788 -4.451,-1.0743 -9.19,-0.1265 -13.436,1.6465 -3.049,-4.3574 -7.035,-7.5296 -11.791,-9.0558 -3.062,-0.9828 -6.554,-0.2214 -9.871,0.2739 V 63.5602 c 0,-8.0497 -1.886,-15.1407 -5.758,-20.3071 -3.872,-5.1663 -9.963,-8.2325 -16.178,-8.2325 z"
|
||||
fill="#0000ff"
|
||||
id="path1-3"
|
||||
style="fill:#ffffff;fill-opacity:1" /></g><path
|
||||
d="m 123.063,212.94 77.496,-0.503 8.772,-88.175 c 1.84,-17.873 -20.2,-25.3098 -26.318,-8.818 0.079,-19.819 -20.208,-22.2988 -26.318,-8.817 0.765,-16.375 -19.934,-22.7127 -26.318,-8.818 V 62.5394 c 0,-26.4526 -26.318,-26.4526 -26.318,0 V 141.897 C 60.195,97.8095 49.4399,129.489 49.4399,129.489 c 29.8072,20.228 48.039,83.617 73.6231,83.451 z"
|
||||
fill="#00ff00"
|
||||
id="path2-6"
|
||||
style="fill:#666666;fill-opacity:1" /></g></g><defs
|
||||
id="defs5"><filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" /></filter><filter
|
||||
id="filter0_d_21_2"
|
||||
x="34.08"
|
||||
y="35.02"
|
||||
width="189.44"
|
||||
height="199.68"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood2" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix2" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset2" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur2" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix3-7" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_21_2"
|
||||
id="feBlend3" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_21_2"
|
||||
result="shape"
|
||||
id="feBlend4-5" /></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
81
addons/escoria-ui-return-monkey-island/cursors/north.svg
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="north.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="3.9933811"
|
||||
inkscape:cx="57.720512"
|
||||
inkscape:cy="68.989158"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" /><g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)"><g
|
||||
style="fill:none"
|
||||
id="g1"
|
||||
transform="matrix(0,0.82301095,-0.82301095,0,138.15081,-30.958707)"><path
|
||||
d="m 42.8435,124.893 c -1.433,0.787 -2.3236,2.292 -2.3236,3.927 0,1.635 0.8906,3.14 2.3236,3.927 l 54.7779,30.08 c 0.627191,0.34422 1.302043,0.52288 1.973343,0.54975 1.581207,0.0633 3.142697,-0.71559 4.015257,-2.15675 l -3.8322,-2.32 c 3.8322,2.32 3.8332,2.319 3.8332,2.319 l 10e-4,-0.002 0.002,-0.003 0.006,-0.01 0.018,-0.03 0.063,-0.106 c 0.054,-0.091 0.131,-0.221 0.228,-0.387 0.194,-0.333 0.469,-0.812 0.807,-1.418 0.675,-1.21 1.601,-2.93 2.619,-4.992 1.631,-3.303 3.548,-7.578 5.037,-12.096 0.307,-0.002 0.635,-0.003 0.982,-0.004 2.728,-0.008 6.629,-0.009 11.318,-0.006 9.291,0.006 21.656,0.029 34.074,0.052 l 0.342,10e-4 c 12.53,0.023 25.088,0.047 34.56,0.052 4.735,0.003 8.704,0.002 11.516,-0.007 1.404,-0.004 2.528,-0.009 3.317,-0.017 0.392,-0.004 0.717,-0.009 0.958,-0.014 0.117,-0.003 0.238,-0.006 0.347,-0.011 0.051,-0.002 0.131,-0.006 0.22,-0.013 0.028,-0.003 0.07,-0.006 0.12,-0.011 0.021,-0.002 0.041,-0.004 0.062,-0.006 0.185,-0.019 0.387,-0.051 0.605,-0.099 0.437,-0.097 0.923,-0.262 1.427,-0.523 1.038,-0.539 1.973,-1.395 2.726,-2.567 1.424,-2.219 2.194,-5.552 2.194,-10.51 0,-4.959 -0.77,-8.292 -2.194,-10.511 -0.753,-1.172 -1.688,-2.028 -2.726,-2.566 -0.504,-0.262 -0.99,-0.427 -1.427,-0.524 -0.218,-0.048 -0.42,-0.08 -0.605,-0.099 -0.015,-0.001 -0.031,-0.003 -0.046,-0.004 -0.047,-0.005 -0.087,-0.009 -0.115,-0.011 -0.092,-0.008 -0.175,-0.012 -0.229,-0.015 -0.114,-0.006 -0.239,-0.009 -0.359,-0.012 -0.247,-0.007 -0.577,-0.012 -0.973,-0.016 -0.797,-0.009 -1.929,-0.015 -3.339,-0.02 -2.825,-0.009 -6.806,-0.01 -11.552,-0.007 -9.476,0.007 -22.022,0.033 -34.545,0.06 h -0.071 c -12.549,0.027 -25.067,0.053 -34.452,0.059 -4.694,0.004 -8.597,0.002 -11.327,-0.007 -0.364,-0.002 -0.706,-0.003 -1.025,-0.004 -1.494,-4.388 -3.363,-8.515 -4.946,-11.701 -0.989,-1.991 -1.884,-3.6474 -2.534,-4.8119 -0.326,-0.5829 -0.591,-1.044 -0.778,-1.3639 -0.093,-0.16 -0.167,-0.2848 -0.219,-0.372 l -0.061,-0.1022 -0.018,-0.0294 -0.005,-0.0092 -0.002,-0.0032 -10e-4,-0.0013 c 0,-5e-4 -0.001,-0.001 -3.8332,2.3188 l 3.8322,-2.3198 c -1.243,-2.0539 -3.8841,-2.7627 -5.9886,-1.607 z"
|
||||
stroke="#0000ff"
|
||||
stroke-width="8.96"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path1-3"
|
||||
sodipodi:nodetypes="csccscccccccccccccsccccsccccccccscccccccccccccccccccsccccccccc"
|
||||
style="stroke:#f2f2f2;stroke-opacity:1" /><path
|
||||
d="M 44.9999,128.82 99.7778,98.7397 c 0,0 6.1412,10.1473 9.0922,20.5063 0.06,0.213 99.974,-0.211 100.842,0 0,0 2.968,0 2.968,9.246 0,9.245 -2.968,9.245 -2.968,9.245 -0.76,0.188 -100.609,-0.186 -100.66,0 -2.87,10.583 -9.2742,21.163 -9.2742,21.163 z"
|
||||
fill="#00ff00"
|
||||
id="path2-6"
|
||||
style="fill:#666666;fill-opacity:1" /></g></g><defs
|
||||
id="defs5"><filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" /></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
81
addons/escoria-ui-return-monkey-island/cursors/south.svg
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="south.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="3.9933811"
|
||||
inkscape:cx="57.219683"
|
||||
inkscape:cy="60.224655"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" /><g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)"><g
|
||||
style="fill:none"
|
||||
id="g1"
|
||||
transform="matrix(0,-0.82301095,0.82301095,0,-73.90381,181.97657)"><path
|
||||
d="m 42.8435,124.893 c -1.433,0.787 -2.3236,2.292 -2.3236,3.927 0,1.635 0.8906,3.14 2.3236,3.927 l 54.7779,30.08 c 0.627191,0.34422 1.302043,0.52288 1.973343,0.54975 1.581207,0.0633 3.142697,-0.71559 4.015257,-2.15675 l -3.8322,-2.32 c 3.8322,2.32 3.8332,2.319 3.8332,2.319 l 10e-4,-0.002 0.002,-0.003 0.006,-0.01 0.018,-0.03 0.063,-0.106 c 0.054,-0.091 0.131,-0.221 0.228,-0.387 0.194,-0.333 0.469,-0.812 0.807,-1.418 0.675,-1.21 1.601,-2.93 2.619,-4.992 1.631,-3.303 3.548,-7.578 5.037,-12.096 0.307,-0.002 0.635,-0.003 0.982,-0.004 2.728,-0.008 6.629,-0.009 11.318,-0.006 9.291,0.006 21.656,0.029 34.074,0.052 l 0.342,10e-4 c 12.53,0.023 25.088,0.047 34.56,0.052 4.735,0.003 8.704,0.002 11.516,-0.007 1.404,-0.004 2.528,-0.009 3.317,-0.017 0.392,-0.004 0.717,-0.009 0.958,-0.014 0.117,-0.003 0.238,-0.006 0.347,-0.011 0.051,-0.002 0.131,-0.006 0.22,-0.013 0.028,-0.003 0.07,-0.006 0.12,-0.011 0.021,-0.002 0.041,-0.004 0.062,-0.006 0.185,-0.019 0.387,-0.051 0.605,-0.099 0.437,-0.097 0.923,-0.262 1.427,-0.523 1.038,-0.539 1.973,-1.395 2.726,-2.567 1.424,-2.219 2.194,-5.552 2.194,-10.51 0,-4.959 -0.77,-8.292 -2.194,-10.511 -0.753,-1.172 -1.688,-2.028 -2.726,-2.566 -0.504,-0.262 -0.99,-0.427 -1.427,-0.524 -0.218,-0.048 -0.42,-0.08 -0.605,-0.099 -0.015,-0.001 -0.031,-0.003 -0.046,-0.004 -0.047,-0.005 -0.087,-0.009 -0.115,-0.011 -0.092,-0.008 -0.175,-0.012 -0.229,-0.015 -0.114,-0.006 -0.239,-0.009 -0.359,-0.012 -0.247,-0.007 -0.577,-0.012 -0.973,-0.016 -0.797,-0.009 -1.929,-0.015 -3.339,-0.02 -2.825,-0.009 -6.806,-0.01 -11.552,-0.007 -9.476,0.007 -22.022,0.033 -34.545,0.06 h -0.071 c -12.549,0.027 -25.067,0.053 -34.452,0.059 -4.694,0.004 -8.597,0.002 -11.327,-0.007 -0.364,-0.002 -0.706,-0.003 -1.025,-0.004 -1.494,-4.388 -3.363,-8.515 -4.946,-11.701 -0.989,-1.991 -1.884,-3.6474 -2.534,-4.8119 -0.326,-0.5829 -0.591,-1.044 -0.778,-1.3639 -0.093,-0.16 -0.167,-0.2848 -0.219,-0.372 l -0.061,-0.1022 -0.018,-0.0294 -0.005,-0.0092 -0.002,-0.0032 -10e-4,-0.0013 c 0,-5e-4 -0.001,-0.001 -3.8332,2.3188 l 3.8322,-2.3198 c -1.243,-2.0539 -3.8841,-2.7627 -5.9886,-1.607 z"
|
||||
stroke="#0000ff"
|
||||
stroke-width="8.96"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path1-3"
|
||||
sodipodi:nodetypes="csccscccccccccccccsccccsccccccccscccccccccccccccccccsccccccccc"
|
||||
style="stroke:#f2f2f2;stroke-opacity:1" /><path
|
||||
d="M 44.9999,128.82 99.7778,98.7397 c 0,0 6.1412,10.1473 9.0922,20.5063 0.06,0.213 99.974,-0.211 100.842,0 0,0 2.968,0 2.968,9.246 0,9.245 -2.968,9.245 -2.968,9.245 -0.76,0.188 -100.609,-0.186 -100.66,0 -2.87,10.583 -9.2742,21.163 -9.2742,21.163 z"
|
||||
fill="#00ff00"
|
||||
id="path2-6"
|
||||
style="fill:#666666;fill-opacity:1" /></g></g><defs
|
||||
id="defs5"><filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" /></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
92
addons/escoria-ui-return-monkey-island/cursors/wait.svg
Normal file
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="wait.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="22.589975"
|
||||
inkscape:cx="8.9198859"
|
||||
inkscape:cy="13.435163"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" /><g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)"><g
|
||||
id="g1"
|
||||
transform="matrix(0.59297639,0,0,0.60377959,-187.61608,-90.048853)"><path
|
||||
d="m 351.44777,217.73491 c 26.5867,0 30.72994,-21.55277 30.72994,-48.1394 h -59.67743 c 0,26.58663 2.36086,48.1394 28.94749,48.1394 z m 0,0 c 26.5867,0 32.15216,21.55269 32.15216,48.13939 h -60.49837 c 0,-26.5867 1.75958,-48.13939 28.34621,-48.13939 z"
|
||||
stroke="#000000"
|
||||
stroke-width="10.3156"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path1"
|
||||
style="fill:#666666;fill-opacity:1;stroke:#f2f2f2;stroke-opacity:1"
|
||||
sodipodi:nodetypes="sccssccs" /><path
|
||||
d="m 324.48025,154.99424 28.56986,-0.59425 h 30.04925"
|
||||
stroke="#000000"
|
||||
stroke-width="10.3156"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path2"
|
||||
style="stroke:#f2f2f2;stroke-opacity:1"
|
||||
sodipodi:nodetypes="ccc" /><path
|
||||
d="m 321.60178,280.75129 29.97802,0.69482 32.82485,0.16418"
|
||||
stroke="#000000"
|
||||
stroke-width="10.3156"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path3"
|
||||
style="stroke:#f2f2f2;stroke-opacity:1"
|
||||
sodipodi:nodetypes="ccc" /></g></g><defs
|
||||
id="defs5"><filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" /></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
81
addons/escoria-ui-return-monkey-island/cursors/west.svg
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
sodipodi:docname="west.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview5"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="3.9933811"
|
||||
inkscape:cx="57.219683"
|
||||
inkscape:cy="60.224655"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" /><g
|
||||
id="g5"
|
||||
transform="matrix(0.28239848,0,0,0.28239848,1.1963533e-7,0.36640485)"><g
|
||||
style="fill:none"
|
||||
id="g1"
|
||||
transform="matrix(0.82301095,0,0,0.82301095,-29.661233,-75.201285)"><path
|
||||
d="m 42.8435,124.893 c -1.433,0.787 -2.3236,2.292 -2.3236,3.927 0,1.635 0.8906,3.14 2.3236,3.927 l 54.7779,30.08 c 0.627191,0.34422 1.302043,0.52288 1.973343,0.54975 1.581207,0.0633 3.142697,-0.71559 4.015257,-2.15675 l -3.8322,-2.32 c 3.8322,2.32 3.8332,2.319 3.8332,2.319 l 10e-4,-0.002 0.002,-0.003 0.006,-0.01 0.018,-0.03 0.063,-0.106 c 0.054,-0.091 0.131,-0.221 0.228,-0.387 0.194,-0.333 0.469,-0.812 0.807,-1.418 0.675,-1.21 1.601,-2.93 2.619,-4.992 1.631,-3.303 3.548,-7.578 5.037,-12.096 0.307,-0.002 0.635,-0.003 0.982,-0.004 2.728,-0.008 6.629,-0.009 11.318,-0.006 9.291,0.006 21.656,0.029 34.074,0.052 l 0.342,10e-4 c 12.53,0.023 25.088,0.047 34.56,0.052 4.735,0.003 8.704,0.002 11.516,-0.007 1.404,-0.004 2.528,-0.009 3.317,-0.017 0.392,-0.004 0.717,-0.009 0.958,-0.014 0.117,-0.003 0.238,-0.006 0.347,-0.011 0.051,-0.002 0.131,-0.006 0.22,-0.013 0.028,-0.003 0.07,-0.006 0.12,-0.011 0.021,-0.002 0.041,-0.004 0.062,-0.006 0.185,-0.019 0.387,-0.051 0.605,-0.099 0.437,-0.097 0.923,-0.262 1.427,-0.523 1.038,-0.539 1.973,-1.395 2.726,-2.567 1.424,-2.219 2.194,-5.552 2.194,-10.51 0,-4.959 -0.77,-8.292 -2.194,-10.511 -0.753,-1.172 -1.688,-2.028 -2.726,-2.566 -0.504,-0.262 -0.99,-0.427 -1.427,-0.524 -0.218,-0.048 -0.42,-0.08 -0.605,-0.099 -0.015,-0.001 -0.031,-0.003 -0.046,-0.004 -0.047,-0.005 -0.087,-0.009 -0.115,-0.011 -0.092,-0.008 -0.175,-0.012 -0.229,-0.015 -0.114,-0.006 -0.239,-0.009 -0.359,-0.012 -0.247,-0.007 -0.577,-0.012 -0.973,-0.016 -0.797,-0.009 -1.929,-0.015 -3.339,-0.02 -2.825,-0.009 -6.806,-0.01 -11.552,-0.007 -9.476,0.007 -22.022,0.033 -34.545,0.06 h -0.071 c -12.549,0.027 -25.067,0.053 -34.452,0.059 -4.694,0.004 -8.597,0.002 -11.327,-0.007 -0.364,-0.002 -0.706,-0.003 -1.025,-0.004 -1.494,-4.388 -3.363,-8.515 -4.946,-11.701 -0.989,-1.991 -1.884,-3.6474 -2.534,-4.8119 -0.326,-0.5829 -0.591,-1.044 -0.778,-1.3639 -0.093,-0.16 -0.167,-0.2848 -0.219,-0.372 l -0.061,-0.1022 -0.018,-0.0294 -0.005,-0.0092 -0.002,-0.0032 -10e-4,-0.0013 c 0,-5e-4 -0.001,-0.001 -3.8332,2.3188 l 3.8322,-2.3198 c -1.243,-2.0539 -3.8841,-2.7627 -5.9886,-1.607 z"
|
||||
stroke="#0000ff"
|
||||
stroke-width="8.96"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path1-3"
|
||||
sodipodi:nodetypes="csccscccccccccccccsccccsccccccccscccccccccccccccccccsccccccccc"
|
||||
style="stroke:#f2f2f2;stroke-opacity:1" /><path
|
||||
d="M 44.9999,128.82 99.7778,98.7397 c 0,0 6.1412,10.1473 9.0922,20.5063 0.06,0.213 99.974,-0.211 100.842,0 0,0 2.968,0 2.968,9.246 0,9.245 -2.968,9.245 -2.968,9.245 -0.76,0.188 -100.609,-0.186 -100.66,0 -2.87,10.583 -9.2742,21.163 -9.2742,21.163 z"
|
||||
fill="#00ff00"
|
||||
id="path2-6"
|
||||
style="fill:#666666;fill-opacity:1" /></g></g><defs
|
||||
id="defs5"><filter
|
||||
id="filter0_d_18_113"
|
||||
x="58.7948"
|
||||
y="28.784901"
|
||||
width="135.694"
|
||||
height="197.15401"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"><feFlood
|
||||
flood-opacity="0"
|
||||
result="BackgroundImageFix"
|
||||
id="feFlood3" /><feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
||||
result="hardAlpha"
|
||||
id="feColorMatrix3" /><feOffset
|
||||
dy="7.68"
|
||||
id="feOffset3" /><feGaussianBlur
|
||||
stdDeviation="2.56"
|
||||
id="feGaussianBlur3" /><feColorMatrix
|
||||
type="matrix"
|
||||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
||||
id="feColorMatrix4" /><feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_18_113"
|
||||
id="feBlend4" /><feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_18_113"
|
||||
result="shape"
|
||||
id="feBlend5" /></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
@@ -3,8 +3,8 @@
|
||||
# Enable music volume
|
||||
#
|
||||
# @ESC
|
||||
extends ESCBaseCommand
|
||||
class_name PlayMenuMusic
|
||||
extends ESCBaseCommand
|
||||
|
||||
# Return the descriptor of the arguments of this command
|
||||
func configure() -> ESCCommandArgumentDescriptor:
|
||||
@@ -17,7 +17,7 @@ func validate(arguments: Array):
|
||||
|
||||
|
||||
# Run the command
|
||||
func run(command_params: Array) -> int:
|
||||
func run(_command_params: Array) -> int:
|
||||
gymkhana.music_manager.play_menu()
|
||||
return ESCExecution.RC_OK
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# `play_menu_music`
|
||||
# `play_palestina_music`
|
||||
#
|
||||
# Enable music volume
|
||||
#
|
||||
# @ESC
|
||||
extends ESCBaseCommand
|
||||
class_name PlayPalestinaMusic
|
||||
extends ESCBaseCommand
|
||||
|
||||
# Return the descriptor of the arguments of this command
|
||||
func configure() -> ESCCommandArgumentDescriptor:
|
||||
@@ -17,7 +17,7 @@ func validate(arguments: Array):
|
||||
|
||||
|
||||
# Run the command
|
||||
func run(command_params: Array) -> int:
|
||||
func run(_command_params: Array) -> int:
|
||||
gymkhana.music_manager.play_palestina()
|
||||
return ESCExecution.RC_OK
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@tool
|
||||
@icon("res://addons/escoria-core/design/esc_item.svg")
|
||||
extends ESCItem
|
||||
class_name ESCItemWithTooltip
|
||||
extends ESCItem
|
||||
|
||||
# custom_data["target_tooltips"]: Dictionary[String, Dictionary]
|
||||
# Tooltip texts if item is target. Dictionary with action as key ("action3" or "action4") and an inner dictionary as value.
|
||||
@@ -10,21 +10,28 @@ class_name ESCItemWithTooltip
|
||||
## Enables automatic ESCItemComponetPickedObserver loading.
|
||||
@export var with_is_picked_component = false
|
||||
|
||||
## Custom cursor
|
||||
@export var custom_cursor: String = ""
|
||||
|
||||
## ESCItemComponents children of this node
|
||||
var components: Dictionary = {}
|
||||
|
||||
var cursor: String:
|
||||
get:
|
||||
return custom_cursor if custom_cursor != "" else "hand"
|
||||
|
||||
|
||||
func _ready():
|
||||
super._ready()
|
||||
register_components()
|
||||
|
||||
|
||||
func has_component(key: String)->bool:
|
||||
func has_component(key: String) -> bool:
|
||||
return components.has(key)
|
||||
|
||||
|
||||
func get_component(key: String):
|
||||
if(has_component(key)):
|
||||
if has_component(key):
|
||||
return components[key]
|
||||
return null
|
||||
|
||||
@@ -32,7 +39,7 @@ func get_component(key: String):
|
||||
func register_components():
|
||||
autoload_components()
|
||||
for child in get_children():
|
||||
if(child is ESCItemComponent):
|
||||
if child is ESCItemComponent:
|
||||
child = child as ESCItemComponent
|
||||
components[child.get_component_type()] = child
|
||||
child.register(custom_data)
|
||||
@@ -46,16 +53,17 @@ func autoload_components():
|
||||
add_child(ESCItemComponentPickedObserver.new())
|
||||
|
||||
|
||||
|
||||
func set_custom_data(data: Dictionary) -> void:
|
||||
super.set_custom_data(data)
|
||||
if custom_data.has("count"):
|
||||
ESCItemCountManager.new().update_sprite(self)
|
||||
|
||||
|
||||
func _get_inventory_texture_hovered() -> Texture2D:
|
||||
if custom_data.has("count"):
|
||||
return inventory_texture
|
||||
elif inventory_texture_hovered == null:
|
||||
|
||||
if inventory_texture_hovered == null:
|
||||
return _get_inventory_texture()
|
||||
else:
|
||||
return inventory_texture_hovered
|
||||
|
||||
return inventory_texture_hovered
|
||||
|
||||
@@ -58,14 +58,14 @@ const ESC_UI_CHANGE_VERB_ACTION = "esc_change_verb"
|
||||
@export var dev_tools_node: Control
|
||||
@export var video_player: RTMIVideoPlayer
|
||||
@export var language_selector: RTMILanguageSelector
|
||||
|
||||
var last_target: Object
|
||||
@export var confetti: RTMIConfetti
|
||||
|
||||
# Tracks the mouse's current position onscreen.
|
||||
var _current_mouse_pos = Vector2.ZERO
|
||||
|
||||
|
||||
func _init():
|
||||
|
||||
gymkhana.item_count_manager = ESCItemCountManager.new()
|
||||
gymkhana.tooltip_manager = ESCTootltipManager.new()
|
||||
gymkhana.global_observer = RTMIGlobalObserver.new()
|
||||
@@ -143,12 +143,14 @@ func _ready():
|
||||
var esc_music_player = escoria.object_manager.get_object("_music").node
|
||||
gymkhana.music_manager.esc_music_player = esc_music_player
|
||||
|
||||
gymkhana.score_manager = RTMIScoreManager.new(self)
|
||||
gymkhana.score_manager = RTMIScoreManager.new(get_node(pause_menu))
|
||||
|
||||
tooltip_node = rtmi_tooltip_node
|
||||
# We need a slightly modified version of Action Manager to combine items with different actions.
|
||||
escoria.action_manager = ESCActionManagerMonkey.new()
|
||||
escoria.action_manager.action_input_state_changed.connect(_on_input_state_changed)
|
||||
|
||||
# We need to connect inside the scene_tree. Cursor manager is in the singelton.
|
||||
escoria.inputs_manager.input_mode_changed.connect(_on_input_mode_changed)
|
||||
|
||||
#escoria.di = RTMIDependencyInjector.new()
|
||||
|
||||
@@ -187,8 +189,6 @@ func toggle_room_selector_visibility():
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if escoria.inputs_manager.input_mode == escoria.inputs_manager.INPUT_NONE:
|
||||
return
|
||||
if event.is_action_pressed("ui_cancel") && escoria.current_state == escoria.GAME_STATE.DEFAULT:
|
||||
request_pause_menu.emit()
|
||||
|
||||
@@ -199,6 +199,10 @@ func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_dev_tools"):
|
||||
dev_tools_node.visible = !dev_tools_node.visible
|
||||
|
||||
if event.is_action("ui_show_hints"):
|
||||
gymkhana.is_hint_active = event.pressed
|
||||
update_highlights()
|
||||
|
||||
|
||||
## BACKGROUND ##
|
||||
func click_on_bg(position: Vector2) -> void:
|
||||
@@ -214,8 +218,8 @@ func click_on_bg(position: Vector2) -> void:
|
||||
escoria.action_manager.action_state
|
||||
== ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM
|
||||
):
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
escoria.action_manager.clear_current_tool()
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
|
||||
if escoria.main.current_scene.player:
|
||||
escoria.action_manager.do(
|
||||
@@ -223,6 +227,7 @@ func click_on_bg(position: Vector2) -> void:
|
||||
[escoria.main.current_scene.player.global_id, position],
|
||||
true
|
||||
)
|
||||
update_highlights()
|
||||
|
||||
|
||||
func left_click_on_bg(position: Vector2) -> void:
|
||||
@@ -240,6 +245,7 @@ func left_double_click_on_bg(position: Vector2) -> void:
|
||||
[escoria.main.current_scene.player.global_id, position, true],
|
||||
true
|
||||
)
|
||||
update_highlights()
|
||||
|
||||
|
||||
func mousewheel_action(direction: int) -> void:
|
||||
@@ -252,7 +258,7 @@ func element_focused(element_id: String) -> void:
|
||||
if escoria.current_state != escoria.GAME_STATE.DEFAULT:
|
||||
return
|
||||
|
||||
if escoria.inputs_manager.input_mode != escoria.inputs_manager.INPUT_ALL:
|
||||
if not _is_input_all():
|
||||
return
|
||||
|
||||
var target_obj = escoria.object_manager.get_object(element_id).node
|
||||
@@ -260,23 +266,24 @@ func element_focused(element_id: String) -> void:
|
||||
tooltip_node.set_target(target_obj.tooltip_name)
|
||||
tooltip_node.set_target_object(target_obj)
|
||||
|
||||
if is_instance_valid(last_target):
|
||||
last_target.get_component("outline").highlight(false)
|
||||
|
||||
if escoria.action_manager.has_actions(target_obj):
|
||||
if target_obj is ESCItemWithTooltip:
|
||||
target_obj.get_component("outline").highlight(true)
|
||||
last_target = target_obj
|
||||
if target_obj.is_interactive:
|
||||
gymkhana.cursor_manager.handle_item_cursor(target_obj)
|
||||
update_highlights()
|
||||
|
||||
|
||||
func element_unfocused() -> void:
|
||||
if not _is_input_all():
|
||||
return
|
||||
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
|
||||
tooltip_node.set_target("")
|
||||
tooltip_node.set_target_object(null)
|
||||
|
||||
if last_target != null:
|
||||
if not Input.is_action_pressed("ui_show_hints"):
|
||||
last_target.get_component("outline").highlight(false)
|
||||
last_target = null
|
||||
update_highlights()
|
||||
|
||||
|
||||
## ITEMS ##
|
||||
@@ -322,10 +329,14 @@ func left_double_click_on_item(item_global_id: String, event: InputEvent) -> voi
|
||||
|
||||
## INVENTORY ##
|
||||
func click_on_inventory_item(item_global_id: String, event: InputEvent, action: String) -> void:
|
||||
if not _is_input_all():
|
||||
return
|
||||
|
||||
# Skip inventory clicks when eneko_catando
|
||||
if _check_eneko_catando():
|
||||
return
|
||||
|
||||
clear_highlights()
|
||||
# If we are using an inventory item reset mouse cursor
|
||||
if escoria.action_manager.action_state == null:
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
@@ -336,6 +347,7 @@ func click_on_inventory_item(item_global_id: String, event: InputEvent, action:
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
|
||||
escoria.action_manager.set_current_action(action)
|
||||
|
||||
var target_obj = escoria.object_manager.get_object(item_global_id).node
|
||||
|
||||
# If item needs combination with this action, use the item texture as mouse cursor
|
||||
@@ -343,13 +355,14 @@ func click_on_inventory_item(item_global_id: String, event: InputEvent, action:
|
||||
action in target_obj.combine_when_selected_action_is_in
|
||||
and escoria.action_manager.current_tool == null
|
||||
):
|
||||
var texture = target_obj.inventory_texture
|
||||
gymkhana.cursor_manager.set_cursor(texture)
|
||||
gymkhana.cursor_manager.set_texture_cursor(target_obj.inventory_texture)
|
||||
|
||||
escoria.action_manager.do(
|
||||
escoria.action_manager.ACTION.ITEM_LEFT_CLICK, [item_global_id, event], true
|
||||
)
|
||||
|
||||
update_highlights()
|
||||
|
||||
# Hide tooltip if some action is being performed
|
||||
# Disabled: leaves the tooltips hidden. ToDo: check if has other implications.
|
||||
#if escoria.action_manager.action_state == ESCActionManager.ACTION_INPUT_STATE.COMPLETED:
|
||||
@@ -430,6 +443,7 @@ func unpause_game():
|
||||
escoria.main.current_scene.show()
|
||||
escoria.set_game_paused(false)
|
||||
gymkhana.music_manager.resume()
|
||||
gymkhana.achievement_manager.resume_tracking_time()
|
||||
|
||||
|
||||
func pause_game():
|
||||
@@ -449,7 +463,8 @@ func pause_game():
|
||||
escoria.main.current_scene.game.hide_ui()
|
||||
escoria.main.current_scene.hide()
|
||||
escoria.set_game_paused(true)
|
||||
gymkhana.music_manager.play_menu()
|
||||
gymkhana.music_manager.play_menu(false)
|
||||
gymkhana.achievement_manager.pause_tracking_time()
|
||||
|
||||
|
||||
func get_custom_data() -> Dictionary:
|
||||
@@ -504,7 +519,9 @@ func update_tooltip_following_mouse_position(tooltip: RTMIRichTooltip):
|
||||
)
|
||||
|
||||
|
||||
func set_tooltip_position(node_id: String, tooltip: RTMIRichTooltip, size: Vector2, offset: Vector2):
|
||||
func set_tooltip_position(
|
||||
node_id: String, tooltip: RTMIRichTooltip, size: Vector2, offset: Vector2
|
||||
):
|
||||
var mouse_position = calculate_mouse_position(size)
|
||||
var corrected_position = correct_position(tooltip, size, mouse_position, offset)
|
||||
tooltip.get_node(node_id).position = corrected_position
|
||||
@@ -542,11 +559,9 @@ func correct_position(
|
||||
func _on_event_done(return_code: int, _event_name: String):
|
||||
escoria.logger.info(self, "EVENT DONE! code= %s" % [return_code])
|
||||
|
||||
# Reset mouse cursor (should be not needed, but avoids not resetting the cursor on bugs)
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
|
||||
# Show tooltips, they were hidden while performing action
|
||||
tooltip_node.show()
|
||||
update_highlights()
|
||||
|
||||
|
||||
func _on_MenuButton_pressed() -> void:
|
||||
@@ -596,6 +611,12 @@ func _on_say_finished() -> void:
|
||||
_current_mouse_pos = get_viewport().get_mouse_position()
|
||||
update_tooltip_following_mouse_position(tooltip_node)
|
||||
|
||||
await get_tree().create_timer(0.01).timeout
|
||||
update_highlights()
|
||||
|
||||
func _is_input_all():
|
||||
return escoria.inputs_manager.input_mode == ESCInputsManager.INPUT_ALL
|
||||
|
||||
|
||||
func _check_eneko_catando() -> bool:
|
||||
if escoria.globals_manager.has("cocina_delante_catando"):
|
||||
@@ -625,6 +646,27 @@ func _item_has_event_and_target(item_global_id: String, action: String) -> bool:
|
||||
return target_object.events.has(event_name)
|
||||
|
||||
|
||||
func _on_input_state_changed(new_state: ESCActionManager.ACTION_INPUT_STATE):
|
||||
if new_state == ESCActionManager.ACTION_INPUT_STATE.AWAITING_ITEM:
|
||||
gymkhana.cursor_manager.clear_cursor()
|
||||
func _on_input_mode_changed(new_mode):
|
||||
gymkhana.cursor_manager.handle_input_mode_change(new_mode)
|
||||
update_highlights()
|
||||
|
||||
|
||||
func clear_highlights():
|
||||
for child in escoria.main.get_children():
|
||||
if child is ESCRoom:
|
||||
for room_child in child.get_children():
|
||||
if room_child is ESCItemWithTooltip:
|
||||
room_child.get_component("outline").highlight(false)
|
||||
|
||||
|
||||
func update_highlights():
|
||||
for child in inventory_ui.get_node(inventory_ui.inventory_ui_container).get_children():
|
||||
child.update_highlight()
|
||||
for child in escoria.main.get_children():
|
||||
if child is ESCRoom:
|
||||
for room_child in child.get_children():
|
||||
if room_child is ESCItemWithTooltip:
|
||||
room_child.get_component("outline").update_highlight()
|
||||
|
||||
func launch_confetti():
|
||||
confetti.launch()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=26 format=3 uid="uid://cabos3cse6b71"]
|
||||
[gd_scene load_steps=32 format=3 uid="uid://cabos3cse6b71"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bl50queikqfjc" path="res://addons/escoria-ui-return-monkey-island/inventory/inventory_ui.tscn" id="1"]
|
||||
[ext_resource type="Script" path="res://addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd" id="2"]
|
||||
@@ -6,6 +6,7 @@
|
||||
[ext_resource type="Shader" uid="uid://bgopfs5nlgkcu" path="res://addons/escoria-ui-return-monkey-island/shaders/black_and_white.gdshader" id="2_ssxmx"]
|
||||
[ext_resource type="PackedScene" uid="uid://dmw5gicuenj53" path="res://addons/escoria-core/game/scenes/camera_player/camera.tscn" id="3"]
|
||||
[ext_resource type="PackedScene" uid="uid://d2kogebvoxy51" path="res://addons/escoria-ui-return-monkey-island/rtmi_rich_tooltip.tscn" id="4"]
|
||||
[ext_resource type="PackedScene" uid="uid://c7mjom1gqkjwv" path="res://addons/escoria-ui-return-monkey-island/ui/confetti.tscn" id="4_ixq7a"]
|
||||
[ext_resource type="Script" uid="uid://lkc4isk3g0rj" path="res://addons/escoria-ui-return-monkey-island/game.gd" id="5"]
|
||||
[ext_resource type="Texture2D" uid="uid://ce2rx8nm1s6gh" path="res://addons/escoria-ui-return-monkey-island/icons/music-double-note.svg" id="6"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3wdxi18u52c5" path="res://addons/escoria-ui-return-monkey-island/menus/main_menu/main_menu.tscn" id="7"]
|
||||
@@ -13,12 +14,17 @@
|
||||
[ext_resource type="PackedScene" uid="uid://dl7w8oqk1rmhw" path="res://addons/escoria-ui-return-monkey-island/menus/pause_menu/pause_menu.tscn" id="8"]
|
||||
[ext_resource type="Theme" uid="uid://bf2eet52fueam" path="res://addons/escoria-ui-return-monkey-island/theme/ui.tres" id="9"]
|
||||
[ext_resource type="PackedScene" uid="uid://ctg3fukoficqk" path="res://addons/escoria-ui-return-monkey-island/video_player/video_player.tscn" id="12"]
|
||||
[ext_resource type="Texture2D" uid="uid://cy3eeo64v6ddw" path="res://addons/escoria-ui-return-monkey-island/icons/fullscreen_hover.svg" id="12_te176"]
|
||||
[ext_resource type="Texture2D" uid="uid://dghklsdy5nmcg" path="res://addons/escoria-ui-return-monkey-island/icons/music-double-note-hover.svg" id="13"]
|
||||
[ext_resource type="Script" uid="uid://do70qpvafu5my" path="res://addons/escoria-ui-return-monkey-island/ui/full_screen_button.gd" id="13_6rlck"]
|
||||
[ext_resource type="Texture2D" uid="uid://b35fk7ltvp1hc" path="res://addons/escoria-ui-return-monkey-island/icons/menu.svg" id="13_we0hb"]
|
||||
[ext_resource type="Script" uid="uid://chas0xyx88njl" path="res://addons/escoria-ui-return-monkey-island/buttons/music_button.gd" id="14"]
|
||||
[ext_resource type="Texture2D" uid="uid://d0fbiaksfmg7j" path="res://addons/escoria-ui-return-monkey-island/icons/exit_fullscreen.svg" id="14_c6byj"]
|
||||
[ext_resource type="Texture2D" uid="uid://c6hw4fs6aoydo" path="res://addons/escoria-ui-return-monkey-island/icons/menu_hover.svg" id="14_parhr"]
|
||||
[ext_resource type="Texture2D" uid="uid://d2sehci16hioi" path="res://addons/escoria-ui-return-monkey-island/icons/music-double-note-hover-disabled.svg" id="15"]
|
||||
[ext_resource type="Texture2D" uid="uid://y2hfekr163su" path="res://addons/escoria-ui-return-monkey-island/icons/exit_fullscreen_hover.svg" id="15_j7gr8"]
|
||||
[ext_resource type="Texture2D" uid="uid://e2xk0aimdte" path="res://addons/escoria-ui-return-monkey-island/icons/music-double-note-disabled.svg" id="16"]
|
||||
[ext_resource type="Texture2D" uid="uid://nsthsaybnd71" path="res://addons/escoria-ui-return-monkey-island/icons/fullscreen.svg" id="18_ixq7a"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3kgkl2r5xe4d" path="res://addons/escoria-ui-return-monkey-island/achievements/rtmi_achievement_notification_container.tscn" id="18_ssxmx"]
|
||||
[ext_resource type="PackedScene" uid="uid://c0066wpl3qky4" path="res://addons/escoria-ui-return-monkey-island/menus/language_selector/language_selector.tscn" id="19_we0hb"]
|
||||
[ext_resource type="Shader" uid="uid://iehp1eakxyak" path="res://addons/escoria-ui-return-monkey-island/shaders/vignette.gdshader" id="20_parhr"]
|
||||
@@ -35,17 +41,19 @@ shader_parameter/vignette_strength = 0.9
|
||||
shader_parameter/dither_strength = 0.03
|
||||
shader_parameter/vignette_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="game" type="Node2D" node_paths=PackedStringArray("inventory_ui", "rtmi_tooltip_node", "dev_tools_node", "video_player", "language_selector")]
|
||||
[node name="game" type="Node2D" node_paths=PackedStringArray("inventory_ui", "rtmi_tooltip_node", "dev_tools_node", "video_player", "language_selector", "confetti")]
|
||||
script = ExtResource("5")
|
||||
inventory_ui = NodePath("game_layer/ui_layer/Inventory")
|
||||
rtmi_tooltip_node = NodePath("game_layer/tooltip_layer/tooltip")
|
||||
dev_tools_node = NodePath("game_layer/ui_layer/DevTools")
|
||||
video_player = NodePath("menu_layer/video_player")
|
||||
language_selector = NodePath("menu_layer/language_selector")
|
||||
confetti = NodePath("CanvasLayer/Confetti")
|
||||
main_menu = NodePath("menu_layer/main_menu")
|
||||
pause_menu = NodePath("menu_layer/pause_menu")
|
||||
mouse_tooltip_margin = 70.0
|
||||
editor_debug_mode = 1
|
||||
ui_parent_control_node = NodePath("game_layer/ui_layer/Tools")
|
||||
|
||||
[node name="black_and_white_shader" type="CanvasLayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
@@ -60,6 +68,10 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="Confetti" parent="CanvasLayer" instance=ExtResource("4_ixq7a")]
|
||||
|
||||
[node name="Vignette" type="CanvasLayer" parent="."]
|
||||
process_mode = 4
|
||||
|
||||
@@ -114,6 +126,17 @@ layout_mode = 2
|
||||
layout_mode = 2
|
||||
alignment = 2
|
||||
|
||||
[node name="FullScreenButton" type="TextureButton" parent="game_layer/ui_layer/Tools/MarginContainer/HBoxContainer2"]
|
||||
process_mode = 3
|
||||
layout_mode = 2
|
||||
texture_normal = ExtResource("18_ixq7a")
|
||||
texture_hover = ExtResource("12_te176")
|
||||
script = ExtResource("13_6rlck")
|
||||
fullscreen_active_texture = ExtResource("14_c6byj")
|
||||
fullscreen_active_hover_texture = ExtResource("15_j7gr8")
|
||||
fullscreen_default_texture = ExtResource("18_ixq7a")
|
||||
fullscreen_default_hover_texture = ExtResource("12_te176")
|
||||
|
||||
[node name="MusicButton" type="TextureButton" parent="game_layer/ui_layer/Tools/MarginContainer/HBoxContainer2"]
|
||||
custom_minimum_size = Vector2(64, 0)
|
||||
layout_mode = 2
|
||||
@@ -160,5 +183,6 @@ visible = false
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[connection signal="button_down" from="game_layer/ui_layer/Tools/MarginContainer/HBoxContainer2/FullScreenButton" to="game_layer/ui_layer/Tools/MarginContainer/HBoxContainer2/FullScreenButton" method="_on_button_down"]
|
||||
[connection signal="pressed" from="game_layer/ui_layer/Tools/MarginContainer/HBoxContainer2/MusicButton" to="." method="_on_MusicButton_pressed"]
|
||||
[connection signal="pressed" from="game_layer/ui_layer/Tools/MarginContainer/HBoxContainer2/MenuButton" to="." method="_on_MenuButton_pressed"]
|
||||
|
||||
@@ -22,10 +22,15 @@ var achievement_manager: RTMIAchievementManager = RTMIAchievementManager.new()
|
||||
|
||||
var score_manager: RTMIScoreManager
|
||||
|
||||
var fullscreen_manager: RTMIFullscreenManager = RTMIFullscreenManager.new()
|
||||
|
||||
var version: GymnkhanaVersion = GymnkhanaVersion.new()
|
||||
|
||||
var is_hint_active: bool = false
|
||||
|
||||
var _debug_time_start: float
|
||||
|
||||
|
||||
func get_item(global_id: String) -> ESCItem:
|
||||
var object = escoria.object_manager.get_object(global_id)
|
||||
if !object:
|
||||
@@ -33,26 +38,30 @@ func get_item(global_id: String) -> ESCItem:
|
||||
|
||||
var node = object.node
|
||||
if not node is ESCItem:
|
||||
escoria.logger.error(
|
||||
self,
|
||||
"Object is not an ESCItem"
|
||||
)
|
||||
escoria.logger.error(self, "Object is not an ESCItem")
|
||||
return null
|
||||
|
||||
return node
|
||||
|
||||
|
||||
func start_time() -> void:
|
||||
_debug_time_start = Time.get_unix_time_from_system()
|
||||
pass
|
||||
|
||||
|
||||
func stop_time(custom_source: String = "") -> void:
|
||||
var elapsed = Time.get_unix_time_from_system() - _debug_time_start
|
||||
var source = custom_source if custom_source != "" else escoria.object_manager.current_room_key.room_global_id
|
||||
print('RTMI_DEBUG: "%s" loading time: %s' % [source,elapsed])
|
||||
pass
|
||||
var source = (
|
||||
custom_source
|
||||
if custom_source != ""
|
||||
else escoria.object_manager.current_room_key.room_global_id
|
||||
)
|
||||
print('RTMI_DEBUG: "%s" loading time: %s' % [source, elapsed])
|
||||
|
||||
|
||||
func is_item_under_mouse(global_id: String):
|
||||
var physics2d_dss: PhysicsDirectSpaceState2D = escoria.game_scene.get_world_2d().direct_space_state
|
||||
var physics2d_dss: PhysicsDirectSpaceState2D = (
|
||||
escoria.game_scene.get_world_2d().direct_space_state
|
||||
)
|
||||
var params := PhysicsPointQueryParameters2D.new()
|
||||
params.position = escoria.main.current_scene.game.get_global_mouse_position()
|
||||
params.collision_mask = 0x7FFFFFFF
|
||||
@@ -68,23 +77,35 @@ func is_item_under_mouse(global_id: String):
|
||||
|
||||
return false
|
||||
|
||||
|
||||
func has_combination_with_current_tool(global_id: String):
|
||||
if escoria.action_manager.current_tool == null:
|
||||
return false
|
||||
|
||||
var current_object = escoria.object_manager.get_object(global_id)
|
||||
return current_object.events.has("action3 %s" % escoria.action_manager.current_tool.global_id)\
|
||||
return (
|
||||
current_object.events.has("action3 %s" % escoria.action_manager.current_tool.global_id)
|
||||
or current_object.events.has("action4 %s" % escoria.action_manager.current_tool.global_id)
|
||||
)
|
||||
|
||||
|
||||
func warm_esc_cache() -> void:
|
||||
# Instance analizer
|
||||
var _ashes_analyzer = ESCAshesAnalyzer.new()
|
||||
var ashes_analyzer = ESCAshesAnalyzer.new()
|
||||
|
||||
# From ESCAshesAnalyzer
|
||||
var files: Array[String] = _ashes_analyzer._get_script_files_recursive(ESCAshesAnalyzer.BASE_PROJECT_DIR)
|
||||
var files: Array[String] = ashes_analyzer._get_script_files_recursive(
|
||||
ESCAshesAnalyzer.BASE_PROJECT_DIR
|
||||
)
|
||||
|
||||
files.sort()
|
||||
|
||||
for file in files:
|
||||
# We need to use the compiler from the escoria singelton for the cache to work.
|
||||
escoria.esc_compiler.load_esc_file(file)
|
||||
|
||||
func toogle_fullscreen():
|
||||
pass
|
||||
|
||||
func set_fullscreen(value: bool):
|
||||
pass
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="64"
|
||||
height="64"
|
||||
stroke-width="1.5"
|
||||
viewBox="0 0 64 64"
|
||||
fill="none"
|
||||
color="#000000"
|
||||
version="1.1"
|
||||
id="svg3"
|
||||
sodipodi:docname="exit_fullscreen.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs3" />
|
||||
<sodipodi:namedview
|
||||
id="namedview3"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="7.5520836"
|
||||
inkscape:cx="21.914482"
|
||||
inkscape:cy="41.114481"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g1" />
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:0.330383;stroke:none;stroke-width:3.41;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:normal"
|
||||
id="rect1"
|
||||
width="64"
|
||||
height="64"
|
||||
x="0"
|
||||
y="0"
|
||||
ry="11.032078" />
|
||||
<g
|
||||
id="g3"
|
||||
transform="matrix(0.72808748,0,0,0.72808748,8.7012004,8.7012005)"
|
||||
style="stroke-width:6.24650214;stroke-dasharray:none">
|
||||
<g
|
||||
id="g1">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 5.7411847,39.334608 H 24.137035 l -0.05328,18.906603"
|
||||
id="path1"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 58.258814,39.334609 H 39.862965 l 0.05328,18.906602"
|
||||
id="path1-3"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 5.741185,24.665391 H 24.137034 L 24.083754,5.7587889"
|
||||
id="path2"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 58.258814,24.665391 H 39.862965 l 0.05328,-18.9066019"
|
||||
id="path3"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="64"
|
||||
height="64"
|
||||
stroke-width="1.5"
|
||||
viewBox="0 0 64 64"
|
||||
fill="none"
|
||||
color="#000000"
|
||||
version="1.1"
|
||||
id="svg3"
|
||||
sodipodi:docname="exit_fullscreen_hover.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs3" />
|
||||
<sodipodi:namedview
|
||||
id="namedview3"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="7.5520836"
|
||||
inkscape:cx="24.827585"
|
||||
inkscape:cy="29.859309"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg3" />
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:0.546763;stroke:#ffffff;stroke-width:0.666668;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
id="rect1"
|
||||
width="64"
|
||||
height="64"
|
||||
x="0"
|
||||
y="0"
|
||||
ry="11.032078" />
|
||||
<g
|
||||
id="g2"
|
||||
style="stroke-width:6.2465;stroke-dasharray:none"
|
||||
transform="matrix(0.72808748,0,0,0.72808748,8.7012011,8.7012006)">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 5.7411851,39.334609 H 24.137034 l -0.05328,18.906602"
|
||||
id="path1"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 58.258814,39.334609 H 39.862965 l 0.05328,18.906602"
|
||||
id="path1-3"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 5.741185,24.665391 H 24.137034 L 24.083754,5.7587889"
|
||||
id="path2"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 58.258814,24.665391 H 39.862965 l 0.05328,-18.9066019"
|
||||
id="path3"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
73
addons/escoria-ui-return-monkey-island/icons/fullscreen.svg
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="64"
|
||||
height="64"
|
||||
stroke-width="1.5"
|
||||
viewBox="0 0 64 64"
|
||||
fill="none"
|
||||
color="#000000"
|
||||
version="1.1"
|
||||
id="svg3"
|
||||
sodipodi:docname="fullscreen.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs3" />
|
||||
<sodipodi:namedview
|
||||
id="namedview3"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="7.5520836"
|
||||
inkscape:cx="21.914482"
|
||||
inkscape:cy="41.114481"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g3" />
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:0.330383;stroke:none;stroke-width:3.41;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:normal"
|
||||
id="rect1"
|
||||
width="64"
|
||||
height="64"
|
||||
x="0"
|
||||
y="0"
|
||||
ry="11.032078" />
|
||||
<g
|
||||
id="g3"
|
||||
transform="matrix(0.72808748,0,0,0.72808748,8.7012004,8.7012005)"
|
||||
style="stroke-width:6.24650214;stroke-dasharray:none">
|
||||
<g
|
||||
id="g1">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 24.145849,58.25 H 5.7499995 l 0.053284,-18.906602"
|
||||
id="path1"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 39.854151,58.25 H 58.25 L 58.19672,39.343398"
|
||||
id="path1-3"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 24.145849,5.75 H 5.7499995 l 0.053284,18.906602"
|
||||
id="path2"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 39.854151,5.75 H 58.25 l -0.05328,18.906602"
|
||||
id="path3"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="64"
|
||||
height="64"
|
||||
stroke-width="1.5"
|
||||
viewBox="0 0 64 64"
|
||||
fill="none"
|
||||
color="#000000"
|
||||
version="1.1"
|
||||
id="svg3"
|
||||
sodipodi:docname="fullscreen_hover.svg"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs3" />
|
||||
<sodipodi:namedview
|
||||
id="namedview3"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="7.5520836"
|
||||
inkscape:cx="24.827585"
|
||||
inkscape:cy="29.859309"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg3" />
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:0.546763;stroke:#ffffff;stroke-width:0.666668;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
id="rect1"
|
||||
width="64"
|
||||
height="64"
|
||||
x="0"
|
||||
y="0"
|
||||
ry="11.032078" />
|
||||
<g
|
||||
id="g2"
|
||||
style="stroke-width:6.2465;stroke-dasharray:none"
|
||||
transform="matrix(0.72808748,0,0,0.72808748,8.7012011,8.7012006)">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 24.145849,58.25 H 5.7499995 l 0.053284,-18.906602"
|
||||
id="path1"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 39.854151,58.25 H 58.25 L 58.19672,39.343398"
|
||||
id="path1-3"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 24.145849,5.75 H 5.7499995 l 0.053284,18.906602"
|
||||
id="path2"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:6.2465;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 39.854151,5.75 H 58.25 l -0.05328,18.906602"
|
||||
id="path3"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
48
addons/escoria-ui-return-monkey-island/images/confetti.svg
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 8.4666665 8.4666667"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
||||
sodipodi:docname="confetti.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="9.9062851"
|
||||
inkscape:cx="15.192375"
|
||||
inkscape:cy="18.422648"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="941"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs1" />
|
||||
<g
|
||||
inkscape:label="Capa 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<circle
|
||||
style="fill:#ffffff;stroke:#f2f2f2;stroke-width:0.0312208;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1"
|
||||
id="path1"
|
||||
cx="4.2333331"
|
||||
cy="4.2333331"
|
||||
r="4.2333331" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -39,14 +39,14 @@ func _on_inventory_item_mouse_enter():
|
||||
_is_hovered = true
|
||||
if escoria.current_state != escoria.GAME_STATE.DEFAULT:
|
||||
return
|
||||
self.material = shader_material
|
||||
update_highlight()
|
||||
|
||||
|
||||
# Handle mouse leaving the item and send the respecitve signal
|
||||
func _on_inventory_item_mouse_exit():
|
||||
super._on_inventory_item_mouse_exit()
|
||||
_is_hovered = false
|
||||
self.material = null
|
||||
update_highlight()
|
||||
|
||||
|
||||
func set_texture(texture: Texture):
|
||||
@@ -54,24 +54,21 @@ func set_texture(texture: Texture):
|
||||
self.texture_hover = texture
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if not event.is_action("ui_show_hints") or escoria.current_state != escoria.GAME_STATE.DEFAULT:
|
||||
return
|
||||
|
||||
func update_highlight():
|
||||
if (
|
||||
escoria.action_manager.action_state
|
||||
!= escoria.action_manager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM
|
||||
):
|
||||
highlight(_is_hovered)
|
||||
return
|
||||
|
||||
if escoria.action_manager.current_tool == null:
|
||||
return
|
||||
|
||||
if gymkhana.has_combination_with_current_tool(global_id):
|
||||
if event.pressed:
|
||||
self.material = shader_material
|
||||
elif not _is_hovered:
|
||||
self.material = null
|
||||
highlight(gymkhana.is_hint_active)
|
||||
|
||||
|
||||
func highlight(value: bool) -> void:
|
||||
self.material = shader_material if value else null
|
||||
|
||||
|
||||
## Handles the gui input and emits the respective signals.[br]
|
||||
|
||||
@@ -8,12 +8,13 @@ func get_component_type() -> String:
|
||||
return ""
|
||||
|
||||
|
||||
func register(custom_data: Dictionary) -> void:
|
||||
func register(_custom_data: Dictionary) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func get_global_id() -> String:
|
||||
return self.get_parent().global_id
|
||||
|
||||
|
||||
func get_object() -> ESCObject:
|
||||
return escoria.object_manager.get_object(get_global_id())
|
||||
|
||||
@@ -3,9 +3,11 @@ extends ESCItemComponent
|
||||
|
||||
var outline: ItemOutline
|
||||
|
||||
|
||||
func get_component_type():
|
||||
return "outline"
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
var collision = get_parent().collision
|
||||
if collision is CollisionPolygon2D:
|
||||
@@ -25,32 +27,45 @@ func highlight(value: bool) -> void:
|
||||
if node is ItemOutline:
|
||||
node.visible = value
|
||||
|
||||
func _input(event) -> void:
|
||||
if not event.is_action("ui_show_hints"):
|
||||
func _input(event) -> void :
|
||||
if event.is_action("ui_show_hints"):
|
||||
update_highlight()
|
||||
|
||||
func update_highlight():
|
||||
if escoria.current_state != escoria.GAME_STATE.DEFAULT:
|
||||
highlight(false)
|
||||
return
|
||||
|
||||
if escoria.current_state != escoria.GAME_STATE.DEFAULT:
|
||||
if escoria.inputs_manager.input_mode != ESCInputsManager.INPUT_ALL:
|
||||
highlight(false)
|
||||
return
|
||||
|
||||
if get_object() and not get_object().interactive:
|
||||
highlight(false)
|
||||
return
|
||||
|
||||
#if gymkhana.is_item_under_mouse(get_global_id()):
|
||||
# highlight(true)
|
||||
# return
|
||||
|
||||
# No tool selected
|
||||
if escoria.action_manager.action_state == escoria.action_manager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM:
|
||||
if event.pressed:
|
||||
highlight(true)
|
||||
elif not gymkhana.is_item_under_mouse(get_global_id()):
|
||||
highlight(false)
|
||||
if (
|
||||
escoria.action_manager.action_state
|
||||
<= escoria.action_manager.ACTION_INPUT_STATE.AWAITING_ITEM
|
||||
):
|
||||
highlight(gymkhana.is_hint_active or gymkhana.is_item_under_mouse(get_global_id()))
|
||||
return
|
||||
|
||||
# Only with tool selected
|
||||
if escoria.action_manager.action_state != escoria.action_manager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM:
|
||||
return
|
||||
#if escoria.action_manager.action_state != escoria.action_manager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM:
|
||||
# highlight(false)
|
||||
# return
|
||||
|
||||
if not gymkhana.has_combination_with_current_tool(get_global_id()):
|
||||
highlight(false)
|
||||
return
|
||||
|
||||
if event.pressed:
|
||||
highlight(true)
|
||||
elif not gymkhana.is_item_under_mouse(get_global_id()):
|
||||
highlight(false)
|
||||
#if gymkhana.is_hint_active:
|
||||
# highlight(true)
|
||||
#elif not gymkhana.is_item_under_mouse(get_global_id()):
|
||||
#highlight(false)
|
||||
highlight(gymkhana.is_hint_active or gymkhana.is_item_under_mouse(get_global_id()))
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
extends ESCItemComponent
|
||||
class_name ESCItemComponentPickedObserver
|
||||
extends ESCItemComponent
|
||||
|
||||
|
||||
func get_component_type():
|
||||
return "picked-observer"
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if "globals_manager" not in escoria:
|
||||
return
|
||||
|
||||
var is_picked = escoria.globals_manager.get_global(get_global_id() + RTMIGlobalObserver.PICKED_SUFFIX )
|
||||
var is_picked = escoria.globals_manager.get_global(
|
||||
get_global_id() + RTMIGlobalObserver.PICKED_SUFFIX
|
||||
)
|
||||
|
||||
if is_picked == null:
|
||||
return
|
||||
@@ -21,4 +25,3 @@ func _process(delta: float) -> void:
|
||||
# Exclusively set to false when picked. Other events and and strategies may use the active property before being picked.
|
||||
if is_picked:
|
||||
esc_object.active = false
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
extends Control
|
||||
class_name RTMILanguageSelector
|
||||
extends Control
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
for child in %languageItems.get_children():
|
||||
@@ -7,11 +8,12 @@ func _ready() -> void:
|
||||
child.queue_free()
|
||||
|
||||
for lang in gymkhana.language_manager.get_languages():
|
||||
var _lang_button = RTMIMenuButton.new()
|
||||
_lang_button.custom_minimum_size = Vector2i(0,40)
|
||||
_lang_button.text = gymkhana.language_manager.get_languages()[lang]
|
||||
%languageItems.add_child(_lang_button)
|
||||
_lang_button.connect("gui_input", Callable(self, "_on_language_input").bind(lang))
|
||||
var lang_button = RTMIMenuButton.new()
|
||||
lang_button.custom_minimum_size = Vector2i(0, 40)
|
||||
lang_button.text = gymkhana.language_manager.get_languages()[lang]
|
||||
%languageItems.add_child(lang_button)
|
||||
lang_button.connect("gui_input", Callable(self, "_on_language_input").bind(lang))
|
||||
|
||||
|
||||
func _on_language_input(event: InputEvent, language: String):
|
||||
if event.is_pressed():
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://c0066wpl3qky4"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://c0066wpl3qky4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bb2dncmckwtj2" path="res://addons/escoria-ui-return-monkey-island/menus/language_selector/language_selector.gd" id="1_rfy64"]
|
||||
[ext_resource type="Theme" uid="uid://djtwqnfbbt5t8" path="res://addons/escoria-ui-return-monkey-island/theme/menu.tres" id="1_ygmpa"]
|
||||
[ext_resource type="Texture2D" uid="uid://d0ta8viehhtdj" path="res://addons/escoria-ui-return-monkey-island/icons/translation.svg" id="2_502ci"]
|
||||
[ext_resource type="Theme" uid="uid://dvpaon5mw2w8l" path="res://addons/escoria-ui-return-monkey-island/theme.tres" id="2_jw4w0"]
|
||||
|
||||
[node name="language_selector" type="Control"]
|
||||
clip_contents = true
|
||||
@@ -24,7 +23,7 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
scale = Vector2(1.02084, 1)
|
||||
theme = ExtResource("2_jw4w0")
|
||||
theme = ExtResource("1_ygmpa")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
|
||||
@@ -1,29 +1,24 @@
|
||||
# An options menu
|
||||
extends Control
|
||||
|
||||
|
||||
# The back button was pressed
|
||||
signal back_button_pressed
|
||||
|
||||
|
||||
# Custom setting key
|
||||
const SPEECH_SPEED_SETTING: String = "speech_speed"
|
||||
|
||||
|
||||
# The current settings
|
||||
var backup_settings
|
||||
|
||||
|
||||
# A list of languages already added to the language selection
|
||||
var _loaded_languages: Array = []
|
||||
|
||||
|
||||
# The settings changed
|
||||
@onready var changed = false
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
for lang in gymkhana.language_manager.get_languages():
|
||||
(%options.get_node("language_selector") as OptionButton).add_item(gymkhana.language_manager.get_languages()[lang])
|
||||
(%options.get_node("language_selector") as OptionButton).add_item(
|
||||
gymkhana.language_manager.get_languages()[lang]
|
||||
)
|
||||
|
||||
|
||||
# Show the options
|
||||
@@ -38,25 +33,37 @@ func show():
|
||||
# #### Parameters
|
||||
# - p_settings: The settings to use
|
||||
func initialize_options(p_settings):
|
||||
var _options = %options
|
||||
var options = %options
|
||||
|
||||
(%options.get_node("language_selector") as OptionButton).select(gymkhana.language_manager.get_current_language_index())
|
||||
(%options.get_node("language_selector") as OptionButton).select(
|
||||
gymkhana.language_manager.get_current_language_index()
|
||||
)
|
||||
|
||||
_options.get_node("general_volume").value = p_settings["master_volume"]
|
||||
_options.get_node("sound_volume").value = p_settings["sfx_volume"]
|
||||
_options.get_node("music_volume").value = p_settings["music_volume"]
|
||||
_options.get_node("speech_volume").value = p_settings["speech_volume"]
|
||||
options.get_node("general_volume").value = p_settings["master_volume"]
|
||||
options.get_node("sound_volume").value = p_settings["sfx_volume"]
|
||||
options.get_node("music_volume").value = p_settings["music_volume"]
|
||||
options.get_node("speech_volume").value = p_settings["speech_volume"]
|
||||
|
||||
_options.get_node("fullscreen").set_pressed_no_signal(p_settings["fullscreen"])
|
||||
options.get_node("fullscreen").set_pressed_no_signal(p_settings["fullscreen"])
|
||||
|
||||
var video_subtitles = _get_custom_setting(p_settings["custom_settings"], RTMIUiSettings.VIDEO_SUBTITLES_KEY, false)
|
||||
_options.get_node("video_subtitles").set_pressed_no_signal(video_subtitles)
|
||||
var video_subtitles = _get_custom_setting(
|
||||
p_settings["custom_settings"], RTMIUiSettings.VIDEO_SUBTITLES_KEY, false
|
||||
)
|
||||
options.get_node("video_subtitles").set_pressed_no_signal(video_subtitles)
|
||||
|
||||
var click_to_continue = _get_custom_setting(p_settings["custom_settings"], RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_KEY, RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_DEFAULT_VALUE)
|
||||
_options.get_node("click_to_continue").set_pressed_no_signal(click_to_continue)
|
||||
var click_to_continue = _get_custom_setting(
|
||||
p_settings["custom_settings"],
|
||||
RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_KEY,
|
||||
RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_DEFAULT_VALUE,
|
||||
)
|
||||
options.get_node("click_to_continue").set_pressed_no_signal(click_to_continue)
|
||||
|
||||
var slow_text_mode = _get_custom_setting(p_settings["custom_settings"], RTMISimpleDialogSettings.SLOW_TEXT_MODE_KEY, RTMISimpleDialogSettings.SLOW_TEXT_MODE_DEFAULT_VALUE)
|
||||
_options.get_node("slow_text_mode").set_pressed_no_signal(slow_text_mode)
|
||||
var slow_text_mode = _get_custom_setting(
|
||||
p_settings["custom_settings"],
|
||||
RTMISimpleDialogSettings.SLOW_TEXT_MODE_KEY,
|
||||
RTMISimpleDialogSettings.SLOW_TEXT_MODE_DEFAULT_VALUE
|
||||
)
|
||||
options.get_node("slow_text_mode").set_pressed_no_signal(slow_text_mode)
|
||||
|
||||
|
||||
# The language was changed
|
||||
@@ -67,10 +74,7 @@ func initialize_options(p_settings):
|
||||
func _on_language_input(event: InputEvent, language: String):
|
||||
if event.is_pressed():
|
||||
TranslationServer.set_locale(language)
|
||||
ESCProjectSettingsManager.set_setting(
|
||||
ESCProjectSettingsManager.TEXT_LANG,
|
||||
language
|
||||
)
|
||||
ESCProjectSettingsManager.set_setting(ESCProjectSettingsManager.TEXT_LANG, language)
|
||||
changed = true
|
||||
|
||||
|
||||
@@ -79,13 +83,8 @@ func _on_language_input(event: InputEvent, language: String):
|
||||
# #### Parameters
|
||||
# - value: The new volume level
|
||||
func _on_sound_volume_changed(value):
|
||||
if ESCProjectSettingsManager.get_setting(
|
||||
ESCProjectSettingsManager.SFX_VOLUME
|
||||
) != value:
|
||||
ESCProjectSettingsManager.set_setting(
|
||||
ESCProjectSettingsManager.SFX_VOLUME,
|
||||
value
|
||||
)
|
||||
if ESCProjectSettingsManager.get_setting(ESCProjectSettingsManager.SFX_VOLUME) != value:
|
||||
ESCProjectSettingsManager.set_setting(ESCProjectSettingsManager.SFX_VOLUME, value)
|
||||
escoria.settings_manager.apply_settings()
|
||||
changed = true
|
||||
|
||||
@@ -95,13 +94,8 @@ func _on_sound_volume_changed(value):
|
||||
# #### Parameters
|
||||
# - value: The new volume level
|
||||
func _on_music_volume_changed(value):
|
||||
if ESCProjectSettingsManager.get_setting(
|
||||
ESCProjectSettingsManager.MUSIC_VOLUME
|
||||
) != value:
|
||||
ESCProjectSettingsManager.set_setting(
|
||||
ESCProjectSettingsManager.MUSIC_VOLUME,
|
||||
value
|
||||
)
|
||||
if ESCProjectSettingsManager.get_setting(ESCProjectSettingsManager.MUSIC_VOLUME) != value:
|
||||
ESCProjectSettingsManager.set_setting(ESCProjectSettingsManager.MUSIC_VOLUME, value)
|
||||
escoria.settings_manager.apply_settings()
|
||||
changed = true
|
||||
|
||||
@@ -111,13 +105,8 @@ func _on_music_volume_changed(value):
|
||||
# #### Parameters
|
||||
# - value: The new volume level
|
||||
func _on_general_volume_changed(value):
|
||||
if ESCProjectSettingsManager.get_setting(
|
||||
ESCProjectSettingsManager.MASTER_VOLUME
|
||||
) != value:
|
||||
ESCProjectSettingsManager.set_setting(
|
||||
ESCProjectSettingsManager.MASTER_VOLUME,
|
||||
value
|
||||
)
|
||||
if ESCProjectSettingsManager.get_setting(ESCProjectSettingsManager.MASTER_VOLUME) != value:
|
||||
ESCProjectSettingsManager.set_setting(ESCProjectSettingsManager.MASTER_VOLUME, value)
|
||||
escoria.settings_manager.apply_settings()
|
||||
changed = true
|
||||
|
||||
@@ -127,13 +116,8 @@ func _on_general_volume_changed(value):
|
||||
# #### Parameters
|
||||
# - value: The new volume level
|
||||
func _on_speech_volume_value_changed(value: float) -> void:
|
||||
if ESCProjectSettingsManager.get_setting(
|
||||
ESCProjectSettingsManager.SPEECH_VOLUME
|
||||
) != value:
|
||||
ESCProjectSettingsManager.set_setting(
|
||||
ESCProjectSettingsManager.SPEECH_VOLUME,
|
||||
value
|
||||
)
|
||||
if ESCProjectSettingsManager.get_setting(ESCProjectSettingsManager.SPEECH_VOLUME) != value:
|
||||
ESCProjectSettingsManager.set_setting(ESCProjectSettingsManager.SPEECH_VOLUME, value)
|
||||
escoria.settings_manager.apply_settings()
|
||||
changed = true
|
||||
|
||||
@@ -143,14 +127,11 @@ func _on_speech_volume_value_changed(value: float) -> void:
|
||||
# #### Parameters
|
||||
# - button_pressed: Fullscreen (true) or windowed (false)
|
||||
func _on_fullscreen_toggled(toggle_pressed: bool) -> void:
|
||||
if ESCProjectSettingsManager.get_setting(
|
||||
ESCProjectSettingsManager.FULLSCREEN
|
||||
) != toggle_pressed:
|
||||
ESCProjectSettingsManager.set_setting(
|
||||
ESCProjectSettingsManager.FULLSCREEN,
|
||||
toggle_pressed
|
||||
)
|
||||
escoria.settings_manager.apply_settings()
|
||||
if (
|
||||
ESCProjectSettingsManager.get_setting(ESCProjectSettingsManager.FULLSCREEN)
|
||||
!= toggle_pressed
|
||||
):
|
||||
gymkhana.fullscreen_manager.active = toggle_pressed
|
||||
changed = true
|
||||
|
||||
|
||||
@@ -168,9 +149,6 @@ func _on_video_subtitles_toggled(button_pressed: bool) -> void:
|
||||
|
||||
# Save the settings
|
||||
func _on_apply_pressed():
|
||||
escoria.settings_manager.custom_settings[RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_KEY] = ESCProjectSettingsManager.get_setting(
|
||||
RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY
|
||||
)
|
||||
escoria.settings_manager.save_settings()
|
||||
changed = false
|
||||
emit_signal("back_button_pressed")
|
||||
@@ -184,13 +162,8 @@ func _on_back_pressed():
|
||||
|
||||
|
||||
func _on_click_to_continue_toggled(toggle_pressed: bool) -> void:
|
||||
if ESCProjectSettingsManager.get_setting(
|
||||
RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY
|
||||
) != toggle_pressed:
|
||||
ESCProjectSettingsManager.set_setting(
|
||||
RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY,
|
||||
toggle_pressed
|
||||
)
|
||||
if escoria.settings_manager.get_custom_setting(RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_KEY, false) != toggle_pressed:
|
||||
escoria.settings_manager.custom_settings.set(RTMISimpleDialogSettings.CLEAR_TEXT_BY_CLICK_ONLY_KEY, toggle_pressed)
|
||||
escoria.settings_manager.apply_settings()
|
||||
changed = true
|
||||
|
||||
@@ -201,17 +174,13 @@ func _on_language_selector_item_selected(index: int) -> void:
|
||||
changed = true
|
||||
|
||||
|
||||
func _on_slow_text_mode_toggled(toggled_on: bool) -> void:
|
||||
if ESCProjectSettingsManager.get_setting(
|
||||
RTMISimpleDialogSettings.SLOW_TEXT_MODE
|
||||
) != toggled_on:
|
||||
ESCProjectSettingsManager.set_setting(
|
||||
RTMISimpleDialogSettings.SLOW_TEXT_MODE,
|
||||
toggled_on
|
||||
)
|
||||
func _on_slow_text_mode_toggled(toggle_pressed: bool) -> void:
|
||||
if escoria.settings_manager.get_custom_setting(RTMISimpleDialogSettings.SLOW_TEXT_MODE_KEY, false) != toggle_pressed:
|
||||
escoria.settings_manager.custom_settings.set(RTMISimpleDialogSettings.SLOW_TEXT_MODE_KEY, toggle_pressed)
|
||||
escoria.settings_manager.apply_settings()
|
||||
changed = true
|
||||
|
||||
|
||||
func _get_custom_setting(custom_settings: Dictionary, key: String, default_value = null):
|
||||
if custom_settings.has(key):
|
||||
return custom_settings.get(key)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# A menu shown in game
|
||||
extends Control
|
||||
|
||||
|
||||
# Make the pause menu process in pause mode and hide it just to be sure
|
||||
func _ready():
|
||||
self.process_mode = Node.PROCESS_MODE_ALWAYS
|
||||
@@ -14,6 +15,7 @@ func _ready():
|
||||
func _on_continue_pressed():
|
||||
_unpause()
|
||||
|
||||
|
||||
# Show the save slots
|
||||
func _on_save_game_pressed():
|
||||
$VBoxContainer.hide()
|
||||
@@ -74,12 +76,19 @@ func _on_new_game_pressed():
|
||||
escoria.new_game()
|
||||
_unpause()
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_cancel") and escoria.current_state == escoria.GAME_STATE.PAUSED:
|
||||
call_deferred("_unpause")
|
||||
|
||||
|
||||
func _unpause():
|
||||
escoria.main.current_scene.game.unpause_game()
|
||||
|
||||
|
||||
func _on_time_updated(current_time):
|
||||
%CurrentTime.text = gymkhana.achievement_manager.format_time(current_time)
|
||||
%CurrentTime.text = gymkhana.score_manager.format_time(current_time)
|
||||
|
||||
|
||||
func _on_highscores_button_up() -> void:
|
||||
escoria.game_scene.show_highscores()
|
||||
|
||||
@@ -87,6 +87,14 @@ size_flags_vertical = 3
|
||||
text = "CONTINUE_GAME"
|
||||
script = ExtResource("6_31lra")
|
||||
|
||||
[node name="highscores" type="Button" parent="VBoxContainer/menuitems"]
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_e0gqa")
|
||||
text = "HIGHSCORES"
|
||||
script = ExtResource("6_31lra")
|
||||
metadata/_custom_type_script = "uid://elqkwjm0r5c7"
|
||||
|
||||
[node name="new_game" type="Button" parent="VBoxContainer/menuitems"]
|
||||
custom_minimum_size = Vector2(0, 30)
|
||||
layout_mode = 2
|
||||
@@ -125,6 +133,7 @@ script = ExtResource("6_31lra")
|
||||
[connection signal="back_button_pressed" from="load_game" to="." method="_on_load_game_back_button_pressed"]
|
||||
[connection signal="back_button_pressed" from="options" to="." method="_on_options_back_button_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/menuitems/continue" to="." method="_on_continue_pressed"]
|
||||
[connection signal="button_up" from="VBoxContainer/menuitems/highscores" to="." method="_on_highscores_button_up"]
|
||||
[connection signal="pressed" from="VBoxContainer/menuitems/new_game" to="." method="_on_new_game_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/menuitems/save_game" to="." method="_on_save_game_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/menuitems/load_game" to="." method="_on_load_game_pressed"]
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
extends Button
|
||||
class_name RTMIMenuButton
|
||||
|
||||
@onready var hover_sound = AudioStreamPlayer.new()
|
||||
@onready var click_sound = AudioStreamPlayer.new()
|
||||
extends Button
|
||||
|
||||
# Enables hover and click sound
|
||||
@export var with_sound: bool = true
|
||||
|
||||
@onready var hover_sound = AudioStreamPlayer.new()
|
||||
@onready var click_sound = AudioStreamPlayer.new()
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if with_sound:
|
||||
hover_sound.stream = preload("res://addons/escoria-ui-return-monkey-island/sounds/menu_button.ogg")
|
||||
click_sound.stream = preload("res://addons/escoria-ui-return-monkey-island/sounds/menu_button.ogg")
|
||||
click_sound.stream = hover_sound.stream
|
||||
hover_sound.volume_db = -20
|
||||
click_sound.volume_db = -20
|
||||
click_sound.pitch_scale = 1.5
|
||||
@@ -19,4 +20,3 @@ func _ready() -> void:
|
||||
|
||||
pressed.connect(func(): click_sound.play())
|
||||
mouse_entered.connect(func(): hover_sound.play())
|
||||
|
||||
|
||||
@@ -2,47 +2,57 @@
|
||||
# Plugin script to initialize Escoria simple mouse UI
|
||||
extends EditorPlugin
|
||||
|
||||
var _srt_loader := SrtFormatLoader.new()
|
||||
var _srt_saver := SrtFormatSaver.new()
|
||||
|
||||
var _txt_loader := TxtResourceLoader.new()
|
||||
var _txt_saver := TxtResourceSaver.new()
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
# Set up the loader and saver.
|
||||
ResourceLoader.add_resource_format_loader(_srt_loader)
|
||||
ResourceSaver.add_resource_format_saver(_srt_saver)
|
||||
|
||||
ResourceLoader.add_resource_format_loader(_txt_loader)
|
||||
ResourceSaver.add_resource_format_saver(_txt_saver)
|
||||
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
ResourceLoader.remove_resource_format_loader(_srt_loader)
|
||||
ResourceSaver.remove_resource_format_saver(_srt_saver)
|
||||
|
||||
ResourceLoader.remove_resource_format_loader(_txt_loader)
|
||||
ResourceSaver.remove_resource_format_saver(_txt_saver)
|
||||
|
||||
|
||||
# Override function to return the plugin name.
|
||||
func _get_plugin_name():
|
||||
return "escoria-ui-return-monkey-island"
|
||||
|
||||
|
||||
# Deregister UI
|
||||
func _disable_plugin():
|
||||
print("Disabling plugin Escoria UI Return to Monkey Island.")
|
||||
EscoriaPlugin.deregister_ui("res://addons/escoria-ui-return-monkey-island/game.tscn")
|
||||
ESCProjectSettingsManager.remove_setting(
|
||||
RTMIUiSettings.SOUND_LIBRARY_FOLDER
|
||||
)
|
||||
ESCProjectSettingsManager.remove_setting(
|
||||
RTMIUiSettings.SAVEGAME_ENABLED
|
||||
)
|
||||
ESCProjectSettingsManager.remove_setting(RTMIUiSettings.SOUND_LIBRARY_FOLDER)
|
||||
ESCProjectSettingsManager.remove_setting(RTMIUiSettings.SAVEGAME_ENABLED)
|
||||
|
||||
|
||||
# Register UI with Escoria
|
||||
func _enable_plugin():
|
||||
print("Enabling plugin Escoria UI Return to Monkey Island.")
|
||||
add_autoload_singleton(
|
||||
"gymkhana",
|
||||
"res://addons/escoria-ui-return-monkey-island/gymkhana_autoload.gd"
|
||||
"gymkhana", "res://addons/escoria-ui-return-monkey-island/gymkhana_autoload.gd"
|
||||
)
|
||||
|
||||
if EscoriaPlugin.register_ui(self, "res://addons/escoria-ui-return-monkey-island/game.tscn"):
|
||||
ESCProjectSettingsManager.register_setting(
|
||||
RTMIUiSettings.SOUND_LIBRARY_FOLDER,
|
||||
"res://game/sounds",
|
||||
{
|
||||
"type": TYPE_STRING
|
||||
}
|
||||
RTMIUiSettings.SOUND_LIBRARY_FOLDER, "res://game/sounds", {"type": TYPE_STRING}
|
||||
)
|
||||
ESCProjectSettingsManager.register_setting(
|
||||
RTMIUiSettings.SAVEGAME_ENABLED,
|
||||
true ,
|
||||
{
|
||||
"type": TYPE_BOOL
|
||||
}
|
||||
RTMIUiSettings.SAVEGAME_ENABLED, true, {"type": TYPE_BOOL}
|
||||
)
|
||||
else:
|
||||
get_editor_interface().set_plugin_enabled(
|
||||
_get_plugin_name(),
|
||||
false
|
||||
)
|
||||
get_editor_interface().set_plugin_enabled(_get_plugin_name(), false)
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
@abstract 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
|
||||
|
||||
|
||||
func _get_recognized_extensions() -> PackedStringArray:
|
||||
return PackedStringArray(get_recognized_extensions())
|
||||
|
||||
|
||||
func _get_resource_type(path: String) -> String:
|
||||
var ext = path.get_extension().to_lower()
|
||||
|
||||
if get_recognized_extensions().has(ext):
|
||||
return "Resource"
|
||||
|
||||
return ""
|
||||
|
||||
|
||||
func _handles_type(typename: StringName) -> bool:
|
||||
return ClassDB.is_parent_class(typename, "Resource")
|
||||
|
||||
|
||||
func _load(path: String, _original_path: String, _use_sub_threads: bool, _cache_mode: int):
|
||||
var res := TextPlainResource.new()
|
||||
|
||||
var file = FileAccess.open(path, FileAccess.READ)
|
||||
if file != null:
|
||||
res.text = file.get_as_text()
|
||||
file.close()
|
||||
|
||||
return res
|
||||
@@ -0,0 +1 @@
|
||||
uid://cug1ohj0d6n0y
|
||||
@@ -0,0 +1,29 @@
|
||||
@abstract 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) -> PackedStringArray:
|
||||
return get_recognized_extensions(resource)
|
||||
|
||||
|
||||
func _recognize(resource: Resource) -> bool:
|
||||
resource = resource as ResourceClass
|
||||
|
||||
if resource:
|
||||
return true
|
||||
|
||||
return false
|
||||
|
||||
|
||||
func _save(resource: Resource, path: String, flags: int) -> int:
|
||||
var err: int
|
||||
var file = FileAccess.open(path,flags)
|
||||
|
||||
file.store_string(resource.get("text"))
|
||||
file.close()
|
||||
return OK
|
||||
@@ -0,0 +1 @@
|
||||
uid://pqbdpwsvm4vh
|
||||
@@ -0,0 +1,7 @@
|
||||
class_name TextPlainResource
|
||||
extends Resource
|
||||
|
||||
@export_multiline var text: String = "":
|
||||
set(value):
|
||||
text = value
|
||||
emit_changed()
|
||||
@@ -0,0 +1 @@
|
||||
uid://b6f8ogiirps2b
|
||||
@@ -0,0 +1,5 @@
|
||||
class_name TxtResourceLoader
|
||||
extends BaseTextPlainFormatLoader
|
||||
|
||||
func get_recognized_extensions() -> Array:
|
||||
return ["txt"]
|
||||
@@ -0,0 +1 @@
|
||||
uid://2gvou7rj0pmj
|
||||
@@ -0,0 +1,5 @@
|
||||
class_name TxtResourceSaver
|
||||
extends BaseTextPlainFormatSaver
|
||||
|
||||
func get_recognized_extensions(_resource) -> Array:
|
||||
return ["txt"]
|
||||
@@ -0,0 +1 @@
|
||||
uid://b45a4s3k4ysmk
|
||||
@@ -1,29 +1,114 @@
|
||||
class_name RTMICursorManager
|
||||
## Valid direction
|
||||
enum DIRECTIONS {
|
||||
NORTH,
|
||||
EAST,
|
||||
SOUTH,
|
||||
WEST,
|
||||
}
|
||||
const RESIZE_RATIO: float = 0.5
|
||||
|
||||
const RESIZE_RATIO: float = 1.0
|
||||
const BASE_CURSOR := "res://addons/escoria-ui-return-monkey-island/cursors/arrow.svg"
|
||||
|
||||
const BASE_CURSOR := "res://addons/escoria-ui-return-monkey-island/cursors/left_ptr.svg"
|
||||
var base_cursor_texture := preload(BASE_CURSOR)
|
||||
const CURSORS: Dictionary = {
|
||||
"arrow": preload(BASE_CURSOR),
|
||||
"blank": preload("res://addons/escoria-ui-return-monkey-island/cursors/blank.svg"),
|
||||
"wait": preload("res://addons/escoria-ui-return-monkey-island/cursors/wait.svg"),
|
||||
"hand": preload("res://addons/escoria-ui-return-monkey-island/cursors/hand.svg"),
|
||||
"north": preload("res://addons/escoria-ui-return-monkey-island/cursors/north.svg"),
|
||||
"east": preload("res://addons/escoria-ui-return-monkey-island/cursors/east.svg"),
|
||||
"south": preload("res://addons/escoria-ui-return-monkey-island/cursors/south.svg"),
|
||||
"west": preload("res://addons/escoria-ui-return-monkey-island/cursors/west.svg"),
|
||||
}
|
||||
|
||||
const CURSOR_HOTSPOTS: Dictionary = {
|
||||
"arrow": Vector2i.ZERO,
|
||||
"blank": Vector2i.ZERO,
|
||||
"wait": Vector2i.ZERO,
|
||||
"hand": Vector2i(10, 2),
|
||||
"north": Vector2i(9, 2),
|
||||
"east": Vector2i(42, 9),
|
||||
"south": Vector2i(8, 41),
|
||||
"west": Vector2i(3, 9),
|
||||
}
|
||||
|
||||
|
||||
func set_cursor(texture: Texture2D) -> void:
|
||||
func set_cursor(cursor_id: String):
|
||||
Input.set_custom_mouse_cursor(
|
||||
CURSORS[cursor_id], Input.CURSOR_ARROW, CURSOR_HOTSPOTS[cursor_id]
|
||||
)
|
||||
|
||||
|
||||
func set_texture_cursor(texture: Texture2D, custom_hotspot = null) -> void:
|
||||
var image = texture.get_image()
|
||||
image.resize(image.get_width() * RESIZE_RATIO, image.get_height() * RESIZE_RATIO)
|
||||
|
||||
var rect = Rect2i(Vector2i.ZERO, Vector2i(127,127))
|
||||
var newImage = base_cursor_texture.get_image()
|
||||
var cursor_width = image.get_width() * RESIZE_RATIO
|
||||
var cursor_height = image.get_height() * RESIZE_RATIO
|
||||
|
||||
newImage.blend_rect(image, rect, Vector2i.ZERO)
|
||||
image.resize(cursor_width, cursor_height)
|
||||
|
||||
var rect = Rect2i(Vector2i.ZERO, Vector2i(127, 127))
|
||||
var new_image = CURSORS["blank"].get_image()
|
||||
|
||||
new_image.blend_rect(image, rect, Vector2i.ZERO)
|
||||
|
||||
var hotspot = Vector2i(cursor_width / 2, cursor_height / 2)
|
||||
|
||||
if custom_hotspot != null and custom_hotspot is Vector2i:
|
||||
hotspot = custom_hotspot
|
||||
|
||||
# Hotspot es una coordenada x,y de dentro de la imagen. En este caso (0,0)
|
||||
Input.set_custom_mouse_cursor( newImage, Input.CURSOR_ARROW, Vector2i.ZERO)
|
||||
Input.set_custom_mouse_cursor(
|
||||
new_image, Input.CURSOR_ARROW, Vector2i(cursor_width / 2, cursor_height / 2)
|
||||
)
|
||||
|
||||
|
||||
func clear_cursor():
|
||||
Input.set_custom_mouse_cursor(base_cursor_texture)
|
||||
if escoria.inputs_manager.input_mode == ESCInputsManager.INPUT_NONE:
|
||||
Input.set_custom_mouse_cursor(CURSORS["wait"], Input.CURSOR_ARROW)
|
||||
return
|
||||
if (
|
||||
escoria.action_manager.action_state
|
||||
== ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM
|
||||
):
|
||||
return
|
||||
Input.set_custom_mouse_cursor(CURSORS["arrow"], Input.CURSOR_ARROW)
|
||||
|
||||
|
||||
func hide_cursor():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
|
||||
|
||||
func show_cursor():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
|
||||
|
||||
func set_hand_cursor():
|
||||
Input.set_custom_mouse_cursor(CURSORS["hand"], Input.CURSOR_ARROW, CURSOR_HOTSPOTS["hand"])
|
||||
Input.set_default_cursor_shape(Input.CURSOR_ARROW)
|
||||
|
||||
|
||||
func set_waiting_cursor():
|
||||
Input.set_custom_mouse_cursor(CURSORS["wait"], Input.CURSOR_ARROW, CURSOR_HOTSPOTS["wait"])
|
||||
Input.set_default_cursor_shape(Input.CURSOR_ARROW)
|
||||
|
||||
|
||||
func set_direction_cursor(direction: String):
|
||||
Input.set_custom_mouse_cursor(
|
||||
CURSORS[direction], Input.CURSOR_ARROW, CURSOR_HOTSPOTS[direction]
|
||||
)
|
||||
Input.set_default_cursor_shape(Input.CURSOR_ARROW)
|
||||
|
||||
|
||||
func handle_input_mode_change(_new_mode):
|
||||
clear_cursor()
|
||||
|
||||
|
||||
func handle_item_cursor(item: ESCItemWithTooltip):
|
||||
if (
|
||||
escoria.action_manager.action_state
|
||||
== ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM
|
||||
):
|
||||
return
|
||||
|
||||
gymkhana.cursor_manager.set_cursor(item.cursor)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
class_name RTMIFullscreenManager
|
||||
|
||||
signal changed(new_value)
|
||||
|
||||
var active: bool:
|
||||
get = _is_fullscreen, set = _set_fullscreen
|
||||
|
||||
func _is_fullscreen() -> bool:
|
||||
return ESCProjectSettingsManager.get_setting(ESCProjectSettingsManager.FULLSCREEN)
|
||||
|
||||
func _set_fullscreen(value: bool):
|
||||
active = value
|
||||
ESCProjectSettingsManager.set_setting(ESCProjectSettingsManager.FULLSCREEN, value)
|
||||
escoria.settings_manager.apply_settings()
|
||||
changed.emit(value)
|
||||
@@ -0,0 +1 @@
|
||||
uid://cby0its5nubwq
|
||||
@@ -15,9 +15,6 @@ var esc_music_player: ESCMusicPlayer:
|
||||
esc_music_player = music_player_node
|
||||
esc_music_player.stream.connect("finished", _on_song_finished)
|
||||
|
||||
var _menu_song: String = "res://gymkhana/sounds/intro_menu_loop.ogg"
|
||||
var _palestina_song: String = "res://gymkhana/sounds/music/leve palestina.ogg"
|
||||
|
||||
var game_songs: Array[String] = [
|
||||
"res://gymkhana/sounds/music/Bossa do Uli.ogg",
|
||||
"res://gymkhana/sounds/music/Orient minor.ogg",
|
||||
@@ -26,6 +23,10 @@ var game_songs: Array[String] = [
|
||||
"res://gymkhana/sounds/music/Windy chill.ogg",
|
||||
]
|
||||
|
||||
var _intro_menu_song: String = "res://gymkhana/sounds/intro_menu_loop.ogg"
|
||||
var _pause_menu_song: String = "res://gymkhana/sounds/pause_menu_loop.ogg"
|
||||
var _palestina_song: String = "res://gymkhana/sounds/music/leve palestina.ogg"
|
||||
|
||||
var _is_menu = false
|
||||
|
||||
var _current_song_index: int = 0
|
||||
@@ -46,50 +47,51 @@ var _filter_gain_ratio: float = 0.3
|
||||
var _panner_effect: AudioEffectPanner
|
||||
var _panner_default: float = 0
|
||||
|
||||
var _played_songs: Array = []
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
#_filter_effect = AudioEffectFilter.new()
|
||||
_filter_effect = AudioEffectLowPassFilter.new()
|
||||
_filter_effect.cutoff_hz = _filter_map[0]
|
||||
_filter_effect.resonance = 1.0
|
||||
AudioServer.add_bus_effect(
|
||||
AudioServer.get_bus_index(escoria.BUS_MUSIC),
|
||||
_filter_effect)
|
||||
|
||||
AudioServer.add_bus_effect(AudioServer.get_bus_index(escoria.BUS_MUSIC), _filter_effect)
|
||||
|
||||
_panner_effect = AudioEffectPanner.new()
|
||||
_panner_effect.pan = _panner_default
|
||||
AudioServer.add_bus_effect(
|
||||
AudioServer.get_bus_index(escoria.BUS_MUSIC),
|
||||
_panner_effect)
|
||||
|
||||
AudioServer.add_bus_effect(AudioServer.get_bus_index(escoria.BUS_MUSIC), _panner_effect)
|
||||
|
||||
|
||||
func toggle() -> void:
|
||||
music_enabled = !music_enabled
|
||||
|
||||
AudioServer.set_bus_mute(
|
||||
AudioServer.get_bus_index(escoria.BUS_MUSIC),
|
||||
!music_enabled
|
||||
)
|
||||
AudioServer.set_bus_mute(AudioServer.get_bus_index(escoria.BUS_MUSIC), !music_enabled)
|
||||
toggled.emit(music_enabled)
|
||||
|
||||
func play_menu() -> void:
|
||||
|
||||
## Play intro menu music. If `intro` is `false` play pause menu music.
|
||||
func play_menu(intro = true) -> void:
|
||||
_disable_effects()
|
||||
if state != "off" or state != "default":
|
||||
_last_playback_position = esc_music_player.get_playback_position()
|
||||
_play(_menu_song, true)
|
||||
if intro:
|
||||
_play(_intro_menu_song, true)
|
||||
else:
|
||||
_play(_pause_menu_song, true)
|
||||
|
||||
|
||||
func play_game() -> void:
|
||||
_enable_effects()
|
||||
if state == "off" or state == "default":
|
||||
_play(game_songs[_current_song_index])
|
||||
|
||||
|
||||
func select_song(index: int) -> void:
|
||||
_enable_effects()
|
||||
_play(game_songs[index])
|
||||
pass
|
||||
|
||||
func play_palestina(index: int = 0) -> void:
|
||||
|
||||
func play_palestina() -> void:
|
||||
if state != _palestina_song:
|
||||
_last_playback_position = esc_music_player.get_playback_position()
|
||||
_play(_palestina_song)
|
||||
@@ -100,43 +102,43 @@ func pause() -> void:
|
||||
_last_playback_position = esc_music_player.get_playback_position()
|
||||
esc_music_player.set_state("paused")
|
||||
|
||||
|
||||
func resume() -> void:
|
||||
_enable_effects()
|
||||
if state == "paused" or state == _menu_song:
|
||||
if state == "paused" or state == _intro_menu_song or state == _pause_menu_song:
|
||||
_play(_get_song_by_index(_current_song_index), false, _last_playback_position)
|
||||
|
||||
|
||||
|
||||
func _play(song_resource: String, loop: bool = false, from_seconds: float = 0.0) -> void:
|
||||
var resource = load(song_resource)
|
||||
if resource == null:
|
||||
escoria.logger.error(self, "Can't load %s file" % song_resource)
|
||||
return
|
||||
|
||||
if game_songs.has(song_resource):
|
||||
_add_played_song(song_resource)
|
||||
_check_achievement()
|
||||
|
||||
resource.loop = loop
|
||||
esc_music_player.state = song_resource
|
||||
esc_music_player.stream.stream = resource
|
||||
esc_music_player.stream.play(from_seconds)
|
||||
|
||||
|
||||
func stop() -> void:
|
||||
esc_music_player.set_state("off")
|
||||
|
||||
|
||||
func force_music() -> void:
|
||||
_disable_effects()
|
||||
AudioServer.set_bus_mute(
|
||||
AudioServer.get_bus_index(escoria.BUS_MUSIC),
|
||||
false
|
||||
)
|
||||
AudioServer.set_bus_volume_db(
|
||||
AudioServer.get_bus_index(escoria.BUS_MUSIC),
|
||||
linear_to_db(
|
||||
1.0
|
||||
)
|
||||
)
|
||||
AudioServer.set_bus_mute(AudioServer.get_bus_index(escoria.BUS_MUSIC), false)
|
||||
AudioServer.set_bus_volume_db(AudioServer.get_bus_index(escoria.BUS_MUSIC), linear_to_db(1.0))
|
||||
|
||||
|
||||
func _on_song_finished() -> void:
|
||||
play_next_song()
|
||||
|
||||
|
||||
func play_next_song() -> void:
|
||||
_update_next_song_index()
|
||||
_play(_get_song_by_index(_current_song_index))
|
||||
@@ -145,19 +147,33 @@ func play_next_song() -> void:
|
||||
func _get_song_by_index(index: int) -> String:
|
||||
return game_songs[index]
|
||||
|
||||
|
||||
func _update_next_song_index() -> void:
|
||||
_current_song_index += 1
|
||||
if _current_song_index == game_songs.size():
|
||||
_current_song_index = 0
|
||||
|
||||
|
||||
func _disable_effects() -> void:
|
||||
AudioServer.set_bus_bypass_effects(AudioServer.get_bus_index(escoria.BUS_MUSIC), true)
|
||||
|
||||
|
||||
func _enable_effects() -> void:
|
||||
AudioServer.set_bus_bypass_effects(AudioServer.get_bus_index(escoria.BUS_MUSIC), false)
|
||||
|
||||
|
||||
func set_distance_to_music(distance: int, pan: float = 0) -> void:
|
||||
_filter_effect.gain = _filter_base_gain - distance * _filter_gain_ratio
|
||||
_filter_effect.cutoff_hz = _filter_map[distance]
|
||||
|
||||
_panner_effect.pan = pan
|
||||
|
||||
|
||||
func _add_played_song(song: String) -> void:
|
||||
if not _played_songs.has(song):
|
||||
_played_songs.append(song)
|
||||
|
||||
|
||||
func _check_achievement() -> void:
|
||||
if _played_songs.size() == game_songs.size():
|
||||
gymkhana.achievement_manager.unlock_achievement("musica")
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
uid://50obw3tgp33n
|
||||
@@ -12,7 +12,7 @@ corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tpolp"]
|
||||
bg_color = Color(0.144063, 0.144063, 0.144062, 1)
|
||||
bg_color = Color(0.14902, 0.14902, 0.14902, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="2"]
|
||||
bg_color = Color(0, 0, 0, 0.509804)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
[gd_resource type="Theme" load_steps=11 format=3 uid="uid://djtwqnfbbt5t8"]
|
||||
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://djtwqnfbbt5t8"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_aw8ss"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="1"]
|
||||
bg_color = Color(0.14902, 0.14902, 0.14902, 0.784314)
|
||||
@@ -9,7 +11,11 @@ corner_radius_bottom_left = 5
|
||||
expand_margin_bottom = 5.0
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="2"]
|
||||
bg_color = Color(0.285156, 0.285156, 0.285156, 0.784314)
|
||||
bg_color = Color(0.48570347, 0.48570353, 0.48570347, 0.78431374)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="3"]
|
||||
bg_color = Color(0.027451, 0.027451, 0.027451, 0.745098)
|
||||
@@ -35,7 +41,7 @@ bg_color = Color(0.219501, 0.219501, 0.219501, 1)
|
||||
|
||||
[resource]
|
||||
Button/font_sizes/font_size = 18
|
||||
Button/styles/disabled = null
|
||||
Button/styles/disabled = SubResource("StyleBoxEmpty_aw8ss")
|
||||
Button/styles/focus = SubResource("1")
|
||||
Button/styles/hover = SubResource("2")
|
||||
Button/styles/normal = SubResource("1")
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
@tool
|
||||
extends Control
|
||||
|
||||
|
||||
func get_registry_id():
|
||||
return "global_inspector"
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
escoria.globals_manager.global_changed.connect(_on_escoria_global_changed)
|
||||
|
||||
func _on_escoria_global_changed(global: String, old_value, new_value) -> void:
|
||||
|
||||
func _on_escoria_global_changed(_global: String, _old_value, _new_value) -> void:
|
||||
clear()
|
||||
var global_variables = escoria.globals_manager._globals
|
||||
global_variables.sort()
|
||||
for variable_name in global_variables:
|
||||
#labelContainer\
|
||||
# .add_child(UiEscoriaVariableBuilder\
|
||||
# .create(variable_name, escoria.globals_manager._globals[variable_name]))
|
||||
%Container.add_child(
|
||||
UiEscoriaVariableBuilder.create(
|
||||
variable_name, "%s" % escoria.globals_manager._globals[variable_name]
|
||||
)
|
||||
UiEscoriaVariableBuilder.prepare().name(
|
||||
variable_name).value(escoria.globals_manager._globals[variable_name]).build()
|
||||
)
|
||||
|
||||
|
||||
|
||||
func clear():
|
||||
for child in %Container.get_children():
|
||||
%Container.remove_child(child)
|
||||
|
||||
@@ -21,9 +21,10 @@ func _on_room_ready() -> void:
|
||||
var object = room_objects[object_id]
|
||||
%ObjectContainer.add_child(
|
||||
UiEscoriaVariableBuilder.prepare().name(object.global_id)\
|
||||
.valueFunc( func set_value():
|
||||
.value_func( func set_value():
|
||||
return "Active" if object.active else "Off"
|
||||
)
|
||||
.color(Color.GREEN_YELLOW if object.active else Color.GRAY)
|
||||
.build()
|
||||
)
|
||||
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
extends Control
|
||||
class_name UIEscoriaVariable
|
||||
extends Control
|
||||
|
||||
enum {
|
||||
STRING,
|
||||
NUMBER,
|
||||
BOOL
|
||||
}
|
||||
var var_name: String
|
||||
var var_value
|
||||
|
||||
var custom_color: Color
|
||||
|
||||
var _copied: bool = false
|
||||
|
||||
|
||||
func set_variable(name: String, value):
|
||||
var_name = name
|
||||
var_value = value
|
||||
@@ -16,11 +24,19 @@ func set_variable(name: String, value):
|
||||
format_value()
|
||||
|
||||
func format_value():
|
||||
#if custom_color != null:
|
||||
# $Value.add_theme_color_override("font_color", custom_color)
|
||||
# return
|
||||
|
||||
if var_value is bool:
|
||||
var boolean_color = Color.GREEN if var_value else Color.RED
|
||||
$Value.add_theme_color_override("font_color", boolean_color)
|
||||
return
|
||||
if var_value == null:
|
||||
$Value.add_theme_color_override("font_color", Color.CORAL)
|
||||
return
|
||||
if var_value is int or var_value is float:
|
||||
$Value.add_theme_color_override("font_color", Color.NAVAJO_WHITE)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
class_name UiEscoriaVariableBuilder
|
||||
|
||||
const _scene = preload("res://addons/escoria-ui-return-monkey-island/tools/dev/ui/ui_escoria_variable.tscn")
|
||||
var _scene = preload(
|
||||
"res://addons/escoria-ui-return-monkey-island/tools/dev/ui/ui_escoria_variable.tscn"
|
||||
)
|
||||
|
||||
var _var_name: String
|
||||
var _var_value
|
||||
|
||||
var _custom_color: Color
|
||||
|
||||
func _init(key: String = "", value = null):
|
||||
_var_name = key
|
||||
_var_value = value
|
||||
|
||||
|
||||
func name(name: String) -> UiEscoriaVariableBuilder:
|
||||
_var_name = name
|
||||
return self
|
||||
@@ -18,22 +23,31 @@ func value(value) -> UiEscoriaVariableBuilder:
|
||||
_var_value = value
|
||||
return self
|
||||
|
||||
func nameFunc(callable: Callable) -> UiEscoriaVariableBuilder:
|
||||
|
||||
func name_func(callable: Callable) -> UiEscoriaVariableBuilder:
|
||||
_var_name = callable.call()
|
||||
return self
|
||||
|
||||
func valueFunc(callable: Callable) -> UiEscoriaVariableBuilder:
|
||||
|
||||
func value_func(callable: Callable) -> UiEscoriaVariableBuilder:
|
||||
_var_value = callable.call()
|
||||
return self
|
||||
|
||||
func color(color: Color) -> UiEscoriaVariableBuilder:
|
||||
_custom_color = color
|
||||
return self
|
||||
|
||||
func build() -> UIEscoriaVariable:
|
||||
var ui_variable = _scene.instantiate()
|
||||
ui_variable.set_variable(_var_name, _var_value)
|
||||
if _custom_color != null:
|
||||
ui_variable.custom_color = _custom_color
|
||||
return ui_variable
|
||||
|
||||
|
||||
static func prepare():
|
||||
return UiEscoriaVariableBuilder.new()
|
||||
|
||||
|
||||
static func create(name: String, value):
|
||||
return UiEscoriaVariableBuilder.new(name, value).build()
|
||||
|
||||
|
||||
21
addons/escoria-ui-return-monkey-island/ui/confetti.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
class_name RTMIConfetti
|
||||
extends Node2D
|
||||
|
||||
|
||||
@onready var cpu_particles_2d: CPUParticles2D = $CPUParticles2D
|
||||
@onready var cpu_particles_2d_2: CPUParticles2D = $CPUParticles2D2
|
||||
|
||||
func launch():
|
||||
visible = true
|
||||
cpu_particles_2d.emitting = true
|
||||
cpu_particles_2d_2.emitting = true
|
||||
cpu_particles_2d.restart()
|
||||
cpu_particles_2d_2.restart()
|
||||
|
||||
|
||||
func stop():
|
||||
visible = true
|
||||
cpu_particles_2d.emitting = false
|
||||
cpu_particles_2d_2.emitting = false
|
||||
cpu_particles_2d_2.restart()
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://s1s08sgq8te7
|
||||
52
addons/escoria-ui-return-monkey-island/ui/confetti.tscn
Normal file
@@ -0,0 +1,52 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://c7mjom1gqkjwv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://s1s08sgq8te7" path="res://addons/escoria-ui-return-monkey-island/ui/confetti.gd" id="1_5ccud"]
|
||||
[ext_resource type="Texture2D" uid="uid://1gbwusfgagys" path="res://addons/escoria-ui-return-monkey-island/images/confetti.svg" id="1_akxxl"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_akxxl"]
|
||||
_limits = [-360.0, 360.0, 0.0, 1.0]
|
||||
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.33557048, 42.711853), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_akxxl"]
|
||||
offsets = PackedFloat32Array(0.12351544, 0.31591448, 0.4631829, 0.6128266, 0.7672209, 0.89548695, 0.94299287, 1)
|
||||
colors = PackedColorArray(1, 0, 0.016666412, 1, 0.98333335, 1, 0, 1, 0, 1, 0.3166666, 1, 0, 0.7999997, 1, 1, 0.3166666, 0, 1, 1, 0.8333335, 0, 1, 1, 1, 0, 0.016666412, 1, 1, 1, 1, 1)
|
||||
|
||||
[node name="Confetti" type="Node2D"]
|
||||
script = ExtResource("1_5ccud")
|
||||
|
||||
[node name="CPUParticles2D" type="CPUParticles2D" parent="."]
|
||||
position = Vector2(416, -42)
|
||||
emitting = false
|
||||
amount = 40
|
||||
texture = ExtResource("1_akxxl")
|
||||
lifetime = 1.9000000000000001
|
||||
one_shot = true
|
||||
emission_shape = 3
|
||||
emission_rect_extents = Vector2(640, 1)
|
||||
initial_velocity_min = 136.76
|
||||
initial_velocity_max = 136.76
|
||||
angular_velocity_min = -1.0
|
||||
angular_velocity_max = -1.0
|
||||
angular_velocity_curve = SubResource("Curve_akxxl")
|
||||
angle_min = -166.2
|
||||
angle_max = 160.0
|
||||
color_initial_ramp = SubResource("Gradient_akxxl")
|
||||
|
||||
[node name="CPUParticles2D2" type="CPUParticles2D" parent="."]
|
||||
position = Vector2(948, -39)
|
||||
emitting = false
|
||||
amount = 40
|
||||
texture = ExtResource("1_akxxl")
|
||||
lifetime = 1.9000000000000001
|
||||
one_shot = true
|
||||
emission_shape = 3
|
||||
emission_rect_extents = Vector2(640, 1)
|
||||
direction = Vector2(-5, 0)
|
||||
initial_velocity_min = 136.76
|
||||
initial_velocity_max = 136.76
|
||||
angular_velocity_min = -1.0
|
||||
angular_velocity_max = -1.0
|
||||
angular_velocity_curve = SubResource("Curve_akxxl")
|
||||
color_initial_ramp = SubResource("Gradient_akxxl")
|
||||
hue_variation_max = 0.38
|
||||
@@ -0,0 +1,25 @@
|
||||
extends TextureButton
|
||||
|
||||
@export var fullscreen_active_texture: Texture2D
|
||||
@export var fullscreen_active_hover_texture: Texture2D
|
||||
|
||||
@export var fullscreen_default_texture: Texture2D
|
||||
@export var fullscreen_default_hover_texture: Texture2D
|
||||
|
||||
func _ready() -> void:
|
||||
gymkhana.fullscreen_manager.changed.connect(_on_fullscreen_change)
|
||||
|
||||
func _on_fullscreen_change(new_state: bool):
|
||||
set_texture(new_state)
|
||||
|
||||
func set_texture(state: bool) -> void:
|
||||
if state:
|
||||
texture_normal = fullscreen_active_texture
|
||||
texture_hover = fullscreen_active_hover_texture
|
||||
else:
|
||||
texture_normal = fullscreen_default_texture
|
||||
texture_hover = fullscreen_default_hover_texture
|
||||
|
||||
|
||||
func _on_button_down() -> void:
|
||||
gymkhana.fullscreen_manager.active = !gymkhana.fullscreen_manager.active
|
||||
@@ -0,0 +1 @@
|
||||
uid://do70qpvafu5my
|
||||
@@ -0,0 +1,7 @@
|
||||
class_name SubtitleResource
|
||||
extends Resource
|
||||
|
||||
@export_multiline var text: String = "":
|
||||
set(value):
|
||||
text = value
|
||||
emit_changed()
|
||||
@@ -0,0 +1 @@
|
||||
uid://dqn54bl8n206s
|
||||
@@ -0,0 +1,39 @@
|
||||
@tool
|
||||
class_name SrtFormatLoader
|
||||
extends ResourceFormatLoader
|
||||
|
||||
const SrtClass = preload(
|
||||
"res://addons/escoria-ui-return-monkey-island/video_player/subtitles/subtitle_resource.gd"
|
||||
)
|
||||
|
||||
|
||||
func _get_recognized_extensions() -> PackedStringArray:
|
||||
return PackedStringArray(["srt"])
|
||||
|
||||
|
||||
func _get_resource_type(path: String) -> String:
|
||||
var ext = path.get_extension().to_lower()
|
||||
if ext == "srt":
|
||||
return "Resource"
|
||||
|
||||
return ""
|
||||
|
||||
|
||||
func _handles_type(typename: StringName) -> bool:
|
||||
return ClassDB.is_parent_class(typename, "Resource")
|
||||
|
||||
|
||||
func _load(path: String, _original_path: String, _use_sub_threads: bool, _cache_mode: int):
|
||||
var res := SubtitleResource.new()
|
||||
|
||||
var file = FileAccess.open(path, FileAccess.READ)
|
||||
if (not file):
|
||||
push_error("Error loading SRT: path=%s error=%s" % [path, FileAccess.get_open_error()])
|
||||
res.text = ""
|
||||
return res
|
||||
|
||||
res.text = file.get_as_text()
|
||||
printt( "Loaded SRT: path=%s" % path)
|
||||
|
||||
file.close()
|
||||
return res
|
||||
@@ -0,0 +1 @@
|
||||
uid://ll3uu8sb7gm4
|
||||
@@ -0,0 +1,30 @@
|
||||
@tool
|
||||
class_name SrtFormatSaver
|
||||
extends ResourceFormatSaver
|
||||
|
||||
# Preload to avoid problems with project.godot
|
||||
const SubtitleResource = preload(
|
||||
"res://addons/escoria-ui-return-monkey-island/video_player/subtitles/subtitle_resource.gd"
|
||||
)
|
||||
|
||||
|
||||
func _get_recognized_extensions(_resource: Resource) -> PackedStringArray:
|
||||
return PackedStringArray(["srt"])
|
||||
|
||||
|
||||
func _recognize(resource: Resource) -> bool:
|
||||
resource = resource as SubtitleResource
|
||||
|
||||
if resource:
|
||||
return true
|
||||
|
||||
return false
|
||||
|
||||
|
||||
func _save(resource: Resource, path: String, flags: int) -> int:
|
||||
var err: int
|
||||
var file = FileAccess.open(path,flags)
|
||||
|
||||
file.store_string(resource.get("text"))
|
||||
file.close()
|
||||
return OK
|
||||
@@ -0,0 +1 @@
|
||||
uid://dqx5rtx4qul7h
|
||||
@@ -46,8 +46,8 @@ func parse_subtitles_file(path: String) -> Error:
|
||||
text = ""
|
||||
visible = false
|
||||
|
||||
var file := FileAccess.open(path, FileAccess.READ)
|
||||
if not file:
|
||||
var resource : SubtitleResource = await load(path)
|
||||
if not resource:
|
||||
return FAILED
|
||||
|
||||
var state := 0 # 0: read id, 1: read time, 2: read content
|
||||
@@ -59,10 +59,11 @@ func parse_subtitles_file(path: String) -> Error:
|
||||
# Compile regex patterns
|
||||
var time_regex = RegEx.new()
|
||||
time_regex.compile("(?<start>[0-9,:]+)\\s*-->\\s*(?<end>[0-9,:]+)")
|
||||
|
||||
while not file.eof_reached():
|
||||
var line := file.get_line().strip_edges()
|
||||
|
||||
var lines = resource.text.split("\n")
|
||||
for line in lines:
|
||||
#while not file.text.eof_reached():
|
||||
# var line = file.get_line().strip_edges()
|
||||
prints(line)
|
||||
match state:
|
||||
0: # Read ID
|
||||
if line.is_empty():
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
class_name RTMIVideoManager
|
||||
|
||||
var _video_player: RTMIVideoPlayer
|
||||
|
||||
var is_playing: bool:
|
||||
get:
|
||||
return _video_player.is_playing()
|
||||
|
||||
var _video_player: RTMIVideoPlayer
|
||||
|
||||
|
||||
func _init(video_player: RTMIVideoPlayer) -> void:
|
||||
_video_player = video_player
|
||||
|
||||
# Show inventory when video player finishes playing a video (inventory is hidden when a video starts)
|
||||
_video_player.connect("finished", _on_video_player_finished)
|
||||
|
||||
|
||||
func play_video(video_file: String) -> void:
|
||||
escoria.game_scene.hide_ui()
|
||||
escoria.game_scene.clear_tooltip()
|
||||
@@ -19,12 +21,15 @@ func play_video(video_file: String) -> void:
|
||||
_video_player.visible = true
|
||||
_video_player.play(video_file)
|
||||
|
||||
|
||||
func skip() -> void:
|
||||
_video_player.skip()
|
||||
|
||||
|
||||
func _on_video_player_finished() -> void:
|
||||
escoria.game_scene.show_ui()
|
||||
gymkhana.music_manager.resume()
|
||||
|
||||
|
||||
func get_video_player():
|
||||
return _video_player
|
||||
@@ -0,0 +1 @@
|
||||
uid://de3trrng81u4d
|
||||
@@ -1,21 +1,25 @@
|
||||
@tool
|
||||
extends Node
|
||||
class_name RTMIVideoPlayer
|
||||
extends Node
|
||||
|
||||
signal finished
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
%CursorTimer.connect("timeout", _on_cursor_hide_timer_timeout)
|
||||
|
||||
|
||||
func play(video_path: String):
|
||||
# Load subtitles if option enabled
|
||||
if escoria.settings_manager.custom_settings[RTMIUiSettings.VIDEO_SUBTITLES_KEY]:
|
||||
$VideoStreamPlayer/SubtitlesLabel.parse_subtitles_file(_get_srt_path(video_path))
|
||||
|
||||
var video = await load(video_path)
|
||||
# Play video
|
||||
$VideoStreamPlayer.set_stream(load(video_path))
|
||||
$VideoStreamPlayer.set_stream(video)
|
||||
$VideoStreamPlayer.play()
|
||||
|
||||
|
||||
func _on_VideoPlayer_finished():
|
||||
self.visible = false
|
||||
gymkhana.cursor_manager.show_cursor()
|
||||
@@ -45,15 +49,18 @@ func _get_srt_path(video_path: String):
|
||||
var locale = TranslationServer.get_locale()
|
||||
return video_path.left(-3) + locale + ".srt"
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if not self.visible or Input.mouse_mode == Input.MOUSE_MODE_HIDDEN or not is_playing():
|
||||
return
|
||||
if %CursorTimer.is_stopped():
|
||||
%CursorTimer.start()
|
||||
|
||||
|
||||
func _on_cursor_hide_timer_timeout() -> void:
|
||||
gymkhana.cursor_manager.hide_cursor()
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseMotion:
|
||||
gymkhana.cursor_manager.show_cursor()
|
||||
|
||||
1
addons/tattomoosa.spinner/LICENSE.txt.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cpebpyckwc5i2
|
||||
@@ -1,6 +1,10 @@
|
||||
#!/bin/bash
|
||||
source bash_colors.sh
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
fi
|
||||
|
||||
DEFAULT_DESTINATION_PATH="../escoria-demo-game"
|
||||
DESTINATION_PATH="${1:-$DEFAULT_DESTINATION_PATH}"
|
||||
|
||||
|
||||
96
build.sh
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
source bash_colors.sh
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
fi
|
||||
|
||||
# Output to stdout for godot export. --quiet or --verbose
|
||||
STD_OUTPUT="--quiet"
|
||||
@@ -6,70 +11,75 @@ STD_OUTPUT="--quiet"
|
||||
PROJECT_PATH=$PWD
|
||||
echo "Project path: $PROJECT_PATH"
|
||||
|
||||
cp override.cfg.debug override.cfg
|
||||
|
||||
VERSION=`git branch --show-current | sed 's/release\///'`
|
||||
|
||||
EXPORT_NAME="LasGymkhanikasDeUli-$VERSION"
|
||||
EXPORT_DIR="build"
|
||||
|
||||
echo >> override.cfg
|
||||
echo "escoria/main/game_version=\"$VERSION\"" >> override.cfg
|
||||
|
||||
echo "Building $VERSION version"
|
||||
|
||||
echo "Release builds"
|
||||
mkdir -p $PROJECT_PATH/$EXPORT_DIR
|
||||
|
||||
RELEASE_EXPORT_DIR=$EXPORT_DIR/release
|
||||
BUILD_TYPES=(
|
||||
"release"
|
||||
"debug"
|
||||
)
|
||||
|
||||
AMD64=amd64
|
||||
ARM64=arm64
|
||||
WEB=web
|
||||
PLATFORMS=(
|
||||
"amd"
|
||||
"arm"
|
||||
"web"
|
||||
)
|
||||
|
||||
#sed -i "s/res\:\/\/saves\//user\:\/\/saves\//" project.godot
|
||||
#sed -i "s/savegame_enabled\=true/savegame_enabled\=false/" project.godot
|
||||
#sed -i "s/debug_enabled\=true/savegame_enabled\=false/" project.godot
|
||||
declare -A PLATFORM_NAMES
|
||||
PLATFORM_NAMES["amd"]=$EXPORT_NAME
|
||||
PLATFORM_NAMES["arm"]=$EXPORT_NAME
|
||||
PLATFORM_NAMES["web"]="index"
|
||||
|
||||
#sed -i "s/INFO/ERROR/" project.godot
|
||||
#sed -i "s/TRACE/ERROR/" project.godot
|
||||
declare -A PLATFORM_EXTENSIONS
|
||||
PLATFORM_EXTENSIONS["amd"]=".x86_64.appimage"
|
||||
PLATFORM_EXTENSIONS["arm"]=".arm_64.appimage"
|
||||
PLATFORM_EXTENSIONS["web"]=".html"
|
||||
|
||||
echo "Building $AMD64..."
|
||||
mkdir -p $RELEASE_EXPORT_DIR/$AMD64
|
||||
godot --headless $STD_OUTPUT --export-release "Linux" "$RELEASE_EXPORT_DIR/$AMD64/$EXPORT_NAME.x86_64.appimage"
|
||||
declare -A PLATFORM_EXPORTS
|
||||
PLATFORM_EXPORTS["amd"]="Linux"
|
||||
PLATFORM_EXPORTS["arm"]="LinuxARM"
|
||||
PLATFORM_EXPORTS["web"]="Web"
|
||||
|
||||
echo "Building $ARM64..."
|
||||
mkdir -p $RELEASE_EXPORT_DIR/$ARM64
|
||||
godot --headless $STD_OUTPUT --export-release "LinuxARM" "$RELEASE_EXPORT_DIR/$ARM64/$EXPORT_NAME.arm_64.appimage"
|
||||
declare -A PLATFORM_OVERRIDES
|
||||
PLATFORM_OVERRIDES["amd"]="debug"
|
||||
PLATFORM_OVERRIDES["arm"]="debug"
|
||||
PLATFORM_OVERRIDES["web"]="web"
|
||||
|
||||
echo "Building $WEB..."
|
||||
mkdir -p $RELEASE_EXPORT_DIR/$WEB
|
||||
godot --headless $STD_OUTPUT --export-release "Web" "$RELEASE_EXPORT_DIR/$WEB/index.html"
|
||||
cd $RELEASE_EXPORT_DIR
|
||||
tar cfz $WEB.tar.gz web
|
||||
cd $PROJECT_PATH
|
||||
CURRENT_EXPORT_DIR=$EXPORT_DIR/release
|
||||
|
||||
echo "Debug builds..."
|
||||
for TYPE in "${BUILD_TYPES[@]}"; do
|
||||
echo "$TYPE builds..."
|
||||
|
||||
DEBUG_EXPORT_DIR=$EXPORT_DIR/debug
|
||||
EXPORT_NAME=$EXPORT_NAME-debug
|
||||
|
||||
mkdir -p $DEBUG_EXPORT_DIR
|
||||
|
||||
echo "Building $AMD64..."
|
||||
mkdir -p $DEBUG_EXPORT_DIR/$AMD64
|
||||
godot --headless $STD_OUTPUT --export-debug "Linux" "$DEBUG_EXPORT_DIR/$AMD64/$EXPORT_NAME.x86_64.appimage"
|
||||
CURRENT_EXPORT_DIR=$PROJECT_PATH/$EXPORT_DIR/$TYPE
|
||||
mkdir -p $CURRENT_EXPORT_DIR
|
||||
|
||||
|
||||
echo "Building $ARM64..."
|
||||
mkdir -p $DEBUG_EXPORT_DIR/$ARM64
|
||||
godot --headless $STD_OUTPUT --export-debug "LinuxARM" "$DEBUG_EXPORT_DIR/$ARM64/$EXPORT_NAME.arm_64.appimage"
|
||||
|
||||
echo "Building $WEB..."
|
||||
mkdir -p $DEBUG_EXPORT_DIR/$WEB
|
||||
godot --headless $STD_OUTPUT --export-debug "Web" "$DEBUG_EXPORT_DIR/$WEB/index.html"
|
||||
cd $DEBUG_EXPORT_DIR
|
||||
tar cfz $WEB-debug.tar.gz web
|
||||
for PLATFORM in "${PLATFORMS[@]}"; do
|
||||
if [ "$TYPE" == "release" ]; then CURRENT_EXPORT_NAME=${PLATFORM_NAMES[$PLATFORM]}; else CURRENT_EXPORT_NAME="${PLATFORM_NAMES[$PLATFORM]}-$TYPE"; fi
|
||||
|
||||
echo "Building $PLATFORM..."
|
||||
mkdir -p $CURRENT_EXPORT_DIR/$PLATFORM
|
||||
|
||||
cp $PROJECT_PATH/override.cfg.${PLATFORM_OVERRIDES[$PLATFORM]} $PROJECT_PATH/override.cfg
|
||||
echo "escoria/main/game_version=\"$VERSION\"" >> $PROJECT_PATH/override.cfg
|
||||
|
||||
if [ "$PLATFORM" == "web" ]; then CURRENT_EXPORT_NAME=${PLATFORM_NAMES[$PLATFORM]}; else CURRENT_EXPORT_NAME=$CURRENT_EXPORT_NAME; fi
|
||||
godot --headless $STD_OUTPUT --export-$TYPE "${PLATFORM_EXPORTS[$PLATFORM]}" "$CURRENT_EXPORT_DIR/$PLATFORM/$CURRENT_EXPORT_NAME${PLATFORM_EXTENSIONS[$PLATFORM]}"
|
||||
done
|
||||
|
||||
cd $CURRENT_EXPORT_DIR/web
|
||||
tar cfz ../web-$TYPE.tar.gz .
|
||||
zip ../web-$TYPE.zip *
|
||||
cd $PROJECT_PATH
|
||||
done
|
||||
|
||||
rm $PROJECT_PATH/override.cfg
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@ advanced_options=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter="*.esc, *.csv, *.ncsv, *.cfg"
|
||||
include_filter="*.esc, *.csv, *.ncsv, *.cfg, *.srt"
|
||||
exclude_filter="*.xcf, saves/*, scripts/*,vscode-extension-ashes/*"
|
||||
export_path="build/LasGymkhanikasDeUli.appimage.x86_64"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters=""
|
||||
encryption_include_filters="*.cfg"
|
||||
encryption_exclude_filters=""
|
||||
seed=0
|
||||
encrypt_pck=false
|
||||
@@ -55,7 +55,7 @@ advanced_options=false
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter="*.esc, *.csv, *.ncsv, *.cfg"
|
||||
include_filter="*.esc, *.csv, *.ncsv, *.cfg, *.srt"
|
||||
exclude_filter="*.xcf, saves/*, scripts/*,vscode-extension-ashes/*"
|
||||
export_path="build/web/index.html"
|
||||
patches=PackedStringArray()
|
||||
@@ -101,11 +101,11 @@ advanced_options=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter="*.esc, *.csv, *.ncsv, *.cfgs"
|
||||
include_filter="*.esc, *.csv, *.ncsv, *.cfg, *.srt"
|
||||
exclude_filter="*.xcf, saves/*, scripts/*,vscode-extension-ashes/*"
|
||||
export_path="LasGymkhanikasDeUli.appimage.arm_64"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters=""
|
||||
encryption_include_filters="*.cfg"
|
||||
encryption_exclude_filters=""
|
||||
seed=0
|
||||
encrypt_pck=false
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
:init
|
||||
:ready
|
||||
global turno_cocina_ingrediente_lentejas
|
||||
global turno_cocina_tutorial_done
|
||||
global zorionak_eneko
|
||||
global cocina_delante_catando
|
||||
global turno_cocina_frontal_debajo_sofa
|
||||
global turno_cocina_economica_encendida
|
||||
global turno_cocina_frontal_entregado
|
||||
global turno_cocina_eneko_cata_ok
|
||||
global turno_cocina_ajo_picked
|
||||
global turno_cocina_eneko_nombre_dicho
|
||||
@@ -14,6 +13,12 @@
|
||||
global cocina_delante_dialog_option6_done
|
||||
global they_live_visible
|
||||
global tips_eneko_porfa
|
||||
global achievement_amenazas_cuchillo
|
||||
global achievement_amenazas_madera
|
||||
global achievement_chistes_pan
|
||||
global achievement_chistes_susto
|
||||
global turno_cocina_frontal_entregado
|
||||
global achievement_ordenado_cuchillo
|
||||
|
||||
|
||||
:action1
|
||||
@@ -77,23 +82,27 @@
|
||||
say($player, "¡Claro, es muy fácil!","cocina_delante_intro_dialog_option6_res_player")
|
||||
say($eneko_smoking, "¿Y podrías meter imágenes subliminales para que la gente haga lo que yo quiera?", "cocina_delante_intro_dialog_option6_res3")
|
||||
say($player, "No veo por que no, la mayoría de juegos lo hacen, es una práctica habitual en la industria.", "cocina_delante_intro_dialog_option6_res_player2")
|
||||
they_live_visible = true
|
||||
accept_input("NONE")
|
||||
global they_live_visible = true
|
||||
anim($eneko_smoking, "they_live")
|
||||
wait(1)
|
||||
they_live_visible = false
|
||||
global they_live_visible = false
|
||||
accept_input("ALL")
|
||||
say($eneko_smoking, "Suena interesante, ya hablaremos más adelante, pero para hoy tienes que pensar otra cosa que hacer.", "cocina_delante_intro_dialog_option6_res4")
|
||||
cocina_delante_intro_dialog_option6_done = true
|
||||
- "cocina_delante_intro_dialog_end:¿Que te parece que haga la comida?" [cocina_delante_intro_dialog_option4_done and cocina_delante_intro_dialog_option5_done and cocina_delante_intro_dialog_option6_done]
|
||||
say_last_dialog_option()
|
||||
say($eneko_smoking, "Hmm, podría servir, pero no te pases con la cantidad, no quiero estar cinco días comiendo lo mismo.", "cocina_delante_intro_dialog_end_res")
|
||||
say($player, "¡Ningún problema! En cuanto decida que hacer de comer me pongo a cocinar.", "cocina_delante_intro_dialog_end_res_player")
|
||||
say($player, "¡Oído cocina! En cuanto decida que hacer de comer me pongo a cocinar.", "cocina_delante_intro_dialog_end_res_player")
|
||||
done
|
||||
|
||||
:intro_dialog2
|
||||
say($player, "Ya me he decidido, voy a hacer lentejas.", "cocina_delante_intro_dialog2_player_decision")
|
||||
say($eneko_smoking, "Vale, pero avísame cuando las tengas listas, quiero asegurarme de que se puedan comer.", "cocina_delante_intro_dialog2_player_decision_res")
|
||||
say($eneko_smoking, "Y si necesitas algún ingrediente y no lo encuentras búscalo mejor. A mí no me molestes, estoy ocupado.", "cocina_delante_intro_dialog2_player_decision_res_2")
|
||||
accept_input("NONE")
|
||||
walk_block($player, $eneko_smoking)
|
||||
accept_input("ALL")
|
||||
set_angle($player, 180)
|
||||
say($player, "Ya tenemos una misión, hacer lentejas!", "cocina_delante_intro_dialog2_player_decision_to_user1")
|
||||
say($player, "Si vuelves a leer el libro de recetas sabrás la lista con los ingredientes necesarios.", "cocina_delante_intro_dialog2_player_decision_to_user2")
|
||||
@@ -129,8 +138,11 @@
|
||||
:pan_mojado_dialog
|
||||
say($player, "Se ha caído un poco de agua sobre el pan y está blando.", "cocina_delante_pan_mojado_dialog_1")
|
||||
say($eneko_smoking, "Está hablando? Y que es lo que dice?", "cocina_delante_pan_mojado_dialog_2")
|
||||
say($eneko_smoking, "Ja ja ja!", "cocina_delante_pan_mojado_dialog_3")
|
||||
say($eneko_smoking, "Je je je!", "cocina_delante_pan_mojado_dialog_3")
|
||||
say($player, "...", "cocina_delante_pan_mojado_dialog_4")
|
||||
if not achievement_chistes_pan and achievement_chistes_susto:
|
||||
unlock_achievement("chistes")
|
||||
set_global("achievement_chistes_pan", true)
|
||||
|
||||
:action2
|
||||
var comida_lista_para_catar = turno_cocina_ingrediente_lentejas and turno_cocina_ingrediente_patatas and turno_cocina_economica_encendida
|
||||
@@ -186,8 +198,7 @@
|
||||
turno_cocina_eneko_nombre_dicho = true
|
||||
else:
|
||||
say($eneko_smoking, "Ya te he dicho mi nombre!!", "cocina_delante_eneko_action2_dialog_option3_name_known_res_1")
|
||||
say($eneko_smoking, "NO PREGUNTES", "cocina_delante_eneko_action2_dialog_option3_name_known_res_2")
|
||||
say($eneko_smoking, "NI ME CONTACTES POR WHATSAPP O TE BLOQUEARÉ", "cocina_delante_eneko_action2_dialog_option3_name_known_res_3")
|
||||
say($eneko_smoking, "NO PREGUNTES NI ME CONTACTES POR WHATSAPP O TE BLOQUEARÉ", "cocina_delante_eneko_action2_dialog_option3_name_known_res_2")
|
||||
cocina_delante_dialog_option3_done = true
|
||||
- "cocina_delante_eneko_action2_dialog_option4:Qué haces?" [!cocina_delante_dialog_option4_done]
|
||||
say_last_dialog_option()
|
||||
@@ -239,6 +250,7 @@
|
||||
- "tips_eneko_porfa_8:¿Porfa please recubierto de nata?" [tips_eneko_porfa == 8]
|
||||
say_last_dialog_option()
|
||||
say($eneko_smoking, "Vale, llorica.", "tips_eneko_porfa_8_res")
|
||||
say($eneko_smoking, "Si quieres te ayudo, pero si te gustan los retos y las aventuras no deberías usar estas ayudas.", "tips_eneko_porfa_8_res2")
|
||||
say($eneko_smoking, "¿Qué es lo que quieres saber?", "tips_eneko_helping")
|
||||
tips_eneko_porfa = 9
|
||||
tips_eneko_helping = true
|
||||
@@ -258,7 +270,15 @@
|
||||
tips_eneko_patata_grande = 2
|
||||
- "tips_eneko_patata_grande_2_spoiler:SPOILER ALERT - Me rindo, chívame que hacer con la patata grande." [tips_eneko_helping and tips_eneko_patata_grande == 2]
|
||||
say($player, "Me rindo, chívame que hacer con la patata grande.", "tips_eneko_patata_grande_2")
|
||||
say($eneko_smoking, "Coge un cuchillo de la cocina y úsalo para partir la patata grande en dos.", "tips_eneko_patata_grande_2_res")
|
||||
say($eneko_smoking, "¿Tienes claro que quieres que te dé la solución? Esta acción es [b]IRREVERSIBLE[/b].", "tips_eneko_spoiler_confirmation")
|
||||
?!
|
||||
- "tips_eneko_spoiler_confirmation_yes_spoiler:SPOILER ALERT - Sí, no se me ocurre nada más y me aburro."
|
||||
say($player, "Sí, no se me ocurre nada más y me aburro.", "tips_eneko_spoiler_confirmation_yes")
|
||||
say($eneko_smoking, "Coge un cuchillo de la cocina y úsalo para partir la patata grande en dos.", "tips_eneko_patata_grande_2_res")
|
||||
done
|
||||
- "tips_eneko_spoiler_confirmation_no:No, quiero intentarlo un poco más."
|
||||
say_last_dialog_option()
|
||||
done
|
||||
# Patata debajo sofa
|
||||
- "tips_eneko_patata_sofa_0:Me falta otra patata." [tips_eneko_helping and tips_eneko_patata_sofa == 0]
|
||||
say_last_dialog_option()
|
||||
@@ -270,7 +290,15 @@
|
||||
tips_eneko_patata_sofa = 2
|
||||
- "tips_eneko_patata_sofa_2_spoiler:SPOILER ALERT - Me rindo, chívame como conseguir la patata." [tips_eneko_helping and tips_eneko_patata_sofa == 2]
|
||||
say($player, "Me rindo, chívame como conseguir la patata.", "tips_eneko_patata_sofa_2")
|
||||
say($eneko_smoking, "Usa la linterna debajo del sofá y mete la mano.", "tips_eneko_patata_sofa_2_res")
|
||||
say($eneko_smoking, "¿Tienes claro que quieres que te dé la solución? Esta acción es [b]IRREVERSIBLE[/b].", "tips_eneko_spoiler_confirmation")
|
||||
?!
|
||||
- "tips_eneko_spoiler_confirmation_yes_spoiler:SPOILER ALERT - Sí, no se me ocurre nada más y me aburro."
|
||||
say($player, "Sí, no se me ocurre nada más y me aburro.", "tips_eneko_spoiler_confirmation_yes")
|
||||
say($eneko_smoking, "Usa la linterna debajo del sofá y mete la mano.", "tips_eneko_patata_sofa_2_res")
|
||||
done
|
||||
- "tips_eneko_spoiler_confirmation_no:No, quiero intentarlo un poco más."
|
||||
say_last_dialog_option()
|
||||
done
|
||||
# Lentejas
|
||||
- "tips_eneko_lentejas_0:¿Cómo consigo las lentejas?" [tips_eneko_helping and tips_eneko_lentejas == 0]
|
||||
say_last_dialog_option()
|
||||
@@ -282,7 +310,15 @@
|
||||
tips_eneko_lentejas = 2
|
||||
- "tips_eneko_lentejas_2_spoiler:SPOILER ALERT - Me rindo, chívame como conseguir las lentejas." [tips_eneko_helping and tips_eneko_lentejas == 2]
|
||||
say($player, "Me rindo, chívame como conseguir las lentejas.", "tips_eneko_lentejas_2")
|
||||
say($eneko_smoking, "Usa el bol con el peso para juntarlos en un nuevo item. Usa el nuevo item con el bidón de lentejas.", "tips_eneko_lentejas_2_res")
|
||||
say($eneko_smoking, "¿Tienes claro que quieres que te dé la solución? Esta acción es [b]IRREVERSIBLE[/b].", "tips_eneko_spoiler_confirmation")
|
||||
?!
|
||||
- "tips_eneko_spoiler_confirmation_yes_spoiler:SPOILER ALERT - Sí, no se me ocurre nada más y me aburro."
|
||||
say($player, "Sí, no se me ocurre nada más y me aburro.", "tips_eneko_spoiler_confirmation_yes")
|
||||
say($eneko_smoking, "Usa el bol con el peso para juntarlos en un nuevo item. Usa el nuevo item con el bidón de lentejas.", "tips_eneko_lentejas_2_res")
|
||||
done
|
||||
- "tips_eneko_spoiler_confirmation_no:No, quiero intentarlo un poco más."
|
||||
say_last_dialog_option()
|
||||
done
|
||||
# Encender económica
|
||||
- "tips_eneko_fuego_0:¿Cómo enciendo la económica?" [tips_eneko_helping and tips_eneko_fuego == 0]
|
||||
say_last_dialog_option()
|
||||
@@ -294,11 +330,19 @@
|
||||
tips_eneko_fuego = 2
|
||||
- "tips_eneko_fuego_2_spoiler:SPOILER ALERT - Me rindo, chívame como encender la económica." [tips_eneko_helping and tips_eneko_fuego == 2]
|
||||
say($player, "Me rindo, chívame como encender la económica.", "tips_eneko_fuego_2")
|
||||
say($eneko_smoking, "Mete madera en la económica. Coge el mechero que está encima de la silla detrás de la cocina y úsalo con la cocina de gas. Enciende la caja de cartón y úsala con la económica.", "tips_eneko_fuego_2_res")
|
||||
say($eneko_smoking, "¿Tienes claro que quieres que te dé la solución? Esta acción es [b]IRREVERSIBLE[/b].", "tips_eneko_spoiler_confirmation")
|
||||
?!
|
||||
- "tips_eneko_spoiler_confirmation_yes_spoiler:SPOILER ALERT - Sí, no se me ocurre nada más y me aburro."
|
||||
say($player, "Sí, no se me ocurre nada más y me aburro.", "tips_eneko_spoiler_confirmation_yes")
|
||||
say($eneko_smoking, "Mete madera en la económica. Coge el mechero que está encima de la silla detrás de la cocina y úsalo con la cocina de gas. Enciende la caja de cartón y úsala con la económica.", "tips_eneko_fuego_2_res")
|
||||
done
|
||||
- "tips_eneko_spoiler_confirmation_no:No, quiero intentarlo un poco más."
|
||||
say_last_dialog_option()
|
||||
done
|
||||
# Ajo
|
||||
- "tips_eneko_ajo_0:¿Cómo consigo el ajo?" [tips_eneko_helping and tips_eneko_ajo == 0]
|
||||
say_last_dialog_option()
|
||||
say($eneko_smoking, "Digamos que el ajo es el boss final. Vete haciendo todo lo demás y déjate el ajo para el final.", "tips_eneko_ajo_0_res")
|
||||
say($eneko_smoking, "Digamos que el ajo es el boss final. Vete haciendo todo lo demás y déjate el ajo para lo último.", "tips_eneko_ajo_0_res")
|
||||
tips_eneko_ajo = 1
|
||||
- "tips_eneko_ajo_1:Necesito más ayuda con el ajo." [tips_eneko_helping and tips_eneko_ajo == 1]
|
||||
say_last_dialog_option()
|
||||
@@ -310,7 +354,15 @@
|
||||
tips_eneko_ajo = 3
|
||||
- "tips_eneko_ajo_3_spoiler:SUPER SPOILER ALERT - Me rindo, chívame como conseguir el ajo." [tips_eneko_helping and tips_eneko_ajo == 3]
|
||||
say($player, "Me rindo, chívame como conseguir el ajo.", "tips_eneko_ajo_3")
|
||||
say($eneko_smoking, "Tengo el ajo debajo del culo. Puedes cogerlo mientras estoy probando la comida.", "tips_eneko_ajo_3_res")
|
||||
say($eneko_smoking, "¿Tienes claro que quieres que te dé la solución? Esta acción es [b]IRREVERSIBLE[/b].", "tips_eneko_spoiler_confirmation")
|
||||
?!
|
||||
- "tips_eneko_spoiler_confirmation_yes_super_spoiler:SUPER SPOILER ALERT - Sí, no se me ocurre nada más y me aburro."
|
||||
say($player, "Sí, no se me ocurre nada más y me aburro.", "tips_eneko_spoiler_confirmation_yes")
|
||||
say($eneko_smoking, "Tengo el ajo debajo del culo. Puedes cogerlo mientras estoy probando la comida.", "tips_eneko_ajo_3_res")
|
||||
done
|
||||
- "tips_eneko_spoiler_confirmation_no:No, quiero intentarlo un poco más."
|
||||
say_last_dialog_option()
|
||||
done
|
||||
# Exit tips
|
||||
- "tips_eneko_done:Ya no necesito más ayuda." [tips_eneko_helping]
|
||||
say_last_dialog_option()
|
||||
@@ -321,10 +373,7 @@
|
||||
say($eneko_smoking, "Sé exactamente a lo que te refieres. Algo no funciona en el mundo. No sabes lo que es, pero ahí está, como una astilla clavada en tu mente, y te está enloqueciendo. Esta sensación te ha traído hasta mí. ¿Sabes de lo que te estoy hablando?", "cocina_delante_eneko_action2_dialog_option6_1")
|
||||
say($player, "¿De Las Gymkhanikas de Uli?", "cocina_delante_eneko_action2_dialog_option6_2")
|
||||
say($eneko_smoking, "¿Te gustaría saber lo que son Las Gymkhanikas de Uli? Las Gymkhanikas de Uli nos rodean, están por todas partes. Es el mundo que ha sido puesto ante tus ojos para ocultarte la verdad.", "cocina_delante_eneko_action2_dialog_option6_3")
|
||||
they_live_visible = true
|
||||
anim($eneko_smoking, "they_live")
|
||||
say($player, "¿Qué verdad?", "cocina_delante_eneko_action2_dialog_option6_4")
|
||||
they_live_visible = false
|
||||
say($eneko_smoking, "Que eres un esclavo Oier. Igual que yo naciste en cautiverio, naciste en una prisión que no puedes ni saborear, ni oler, ni tocar. Una prisión para tu mente. Por desgracia no se puede explicar lo que son Las Gymkhanikas de Uli. Has de verlas con tus propios ojos.", "cocina_delante_eneko_action2_dialog_option6_5")
|
||||
say($player, "¿Ahora no deberías ofrecerme una pastilla roja y otra azul?", "cocina_delante_eneko_action2_dialog_option6_6")
|
||||
say($eneko_smoking, "¿Pastillas? ¿Por la mañana? ¡Anda y vete a hacer la comida!", "cocina_delante_eneko_action2_dialog_option6_7")
|
||||
@@ -345,7 +394,9 @@
|
||||
say($eneko_smoking, "Bueno, no me acuerdo, fue hace mucho tiempo.", "cocina_delante_eneko_action3_frontal_4")
|
||||
say($eneko_smoking, "Pero es mía, eso seguro.", "cocina_delante_eneko_action3_frontal_5")
|
||||
say($eneko_smoking, "De toda la vida.", "cocina_delante_eneko_action3_frontal_6")
|
||||
turno_cocina_frontal_entregado = true
|
||||
if turno_cocina_cuchillo_en_su_sitio:
|
||||
unlock_achievement("ordenado")
|
||||
set_global("turno_cocina_frontal_entregado", true)
|
||||
else:
|
||||
say($eneko_smoking, "No tengas prisa por devolvérmela, aun puede serte de utilidad.", "cocina_delante_eneko_action3_frontal_not_yet_1")
|
||||
say($eneko_smoking, "(guiño, guiño)", "cocina_delante_eneko_action3_frontal_not_yet_2")
|
||||
@@ -361,9 +412,9 @@
|
||||
say($eneko_smoking, "Y que quieres que haga con un leño?", "cocina_delante_eneko_madera_option1_1")
|
||||
say($eneko_smoking, "No se te ha ocurrido que si quisiera leña iría a por ella?", "cocina_delante_eneko_madera_option1_2")
|
||||
say($eneko_smoking, "Acaso te he pedido leña?", "cocina_delante_eneko_madera_option1_3")
|
||||
say($current_player, "Vale, pillo la idea.", "cocina_delante_eneko_madera_option1_4")
|
||||
say($current_player, "Vale vale vale, pillo la idea.", "cocina_delante_eneko_madera_option1_4")
|
||||
say($current_player, "Yo...", "cocina_delante_eneko_madera_option1_5")
|
||||
say($current_player, "creía que te gustaría...", "cocina_delante_eneko_madera_option1_6")
|
||||
say($current_player, "pues, creía que te gustaría...", "cocina_delante_eneko_madera_option1_6")
|
||||
say($eneko_smoking, "Ya lo siento, a veces soy un borde.", "cocina_delante_eneko_madera_option1_7")
|
||||
say($eneko_smoking ,"Pero es que era una idea de mierda.", "cocina_delante_eneko_madera_option1_8")
|
||||
global eneko_madera_option1_done = true
|
||||
@@ -372,7 +423,7 @@
|
||||
say($eneko_smoking, "Sí, es lo que he dicho.", "cocina_delante_eneko_madera_option2_1")
|
||||
say($current_player, "Kung Fu? No querrías decir Karate?", "cocina_delante_eneko_madera_option2_2")
|
||||
say($eneko_smoking, "Pues no, quería decir Kung Fu.", "cocina_delante_eneko_madera_option2_3")
|
||||
say($current_player, "No sabía que había cinturón negro de Kung Fu.", "cocina_delante_eneko_madera_option2_4")
|
||||
say($current_player, "Ah, no sabía que había cinturón negro de Kung Fu.", "cocina_delante_eneko_madera_option2_4")
|
||||
say($eneko_smoking, "Pues mira, ya lo sabes.", "cocina_delante_eneko_madera_option2_5")
|
||||
global eneko_madera_option2_done = true
|
||||
- "cocina_delante_eneko_madera_option3:Te veo muy tenso, creo que deberías trabajar tu mal humor." [!eneko_madera_option3_done]
|
||||
@@ -384,12 +435,18 @@
|
||||
say($eneko_smoking, "Bien haces, no durarías ni un segundo.", "cocina_delante_eneko_madera_option4_1")
|
||||
say($eneko_smoking, "Me he visto todas las películas de Bruce Lee.", "cocina_delante_eneko_madera_option4_2")
|
||||
say($eneko_smoking, "Varias veces.", "cocina_delante_eneko_madera_option4_3")
|
||||
if not achievement_amenazas_madera and achievement_amenazas_cuchillo:
|
||||
unlock_achievement("amenazas")
|
||||
set_global("achievement_amenazas_madera", true)
|
||||
done
|
||||
|
||||
:action3 "turno_cocina_cuchillo"
|
||||
play_video("res://gymkhana/videos/turno_cocina/oier_amenaza_con_cuchillo.ogv")
|
||||
inventory_remove($turno_cocina_cuchillo)
|
||||
set_global("turno_cocina_cuchillo_picked", false)
|
||||
if not achievement_amenazas_cuchillo and achievement_amenazas_madera:
|
||||
unlock_achievement("amenazas")
|
||||
set_global("achievement_amenazas_cuchillo", true)
|
||||
|
||||
:action3 "turno_cocina_mechero"
|
||||
say($eneko_smoking, "Enserio!?!? Me das un mechero sin gas? No lo quiero.", "turno_cocina_eneko_action3_mechero")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[gd_resource type="Resource" script_class="ESCAnimationResource" load_steps=36 format=3 uid="uid://cyjo7aq0e4hbe"]
|
||||
|
||||
[ext_resource type="Script" path="res://addons/escoria-core/game/core-scripts/resources/esc_animationresource.gd" id="1"]
|
||||
[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"]
|
||||
[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"]
|
||||
|
||||
[sub_resource type="Resource" id="1"]
|
||||
script = ExtResource("2")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://84h4l81cuwdv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ceym82rf2qnxu" path="res://addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd" id="1"]
|
||||
[ext_resource type="Texture2D" uid="uid://h10gbl56mvgm" path="res://gymkhana/items/assets/turno_cocina_ajo.png" id="2"]
|
||||
[ext_resource type="Texture2D" uid="uid://cueb8gkqhbads" path="res://gymkhana/items/assets/turno_cocina_ajo.png" id="2"]
|
||||
|
||||
[node name="turno_cocina_ajo" type="Area2D"]
|
||||
process_mode = 1
|
||||
|
||||
@@ -8,6 +8,7 @@ process_mode = 1
|
||||
script = ExtResource("1")
|
||||
with_is_picked_component = true
|
||||
global_id = "turno_cocina_bol"
|
||||
interaction_angle = 270
|
||||
esc_script = "res://gymkhana/items/turno_cocina_bol.esc"
|
||||
combine_when_selected_action_is_in = PackedStringArray("action4")
|
||||
inventory_texture = ExtResource("2")
|
||||
|
||||
@@ -9,6 +9,7 @@ process_mode = 1
|
||||
script = ExtResource("1")
|
||||
with_is_picked_component = true
|
||||
global_id = "turno_cocina_carton"
|
||||
interaction_angle = 90
|
||||
esc_script = "res://gymkhana/items/turno_cocina_carton.esc"
|
||||
combine_when_selected_action_is_in = PackedStringArray("action4")
|
||||
inventory_texture = ExtResource("3")
|
||||
|
||||
@@ -1,6 +1,2 @@
|
||||
:action3
|
||||
say($player, "Tiene una inscripción: 'Para Uli-Alto de parte de Tronceda'.", "cocina_cuchillos_action3")
|
||||
|
||||
:action3 "cocina_cuchillos"
|
||||
say($player, "El cuchillo a su sitio!", "cocina_cuchillos_action3_cuchillo_say")
|
||||
inventory_remove("turno_cocina_cuchillo")
|
||||
@@ -18,11 +18,13 @@
|
||||
say($player, "Debería pedirle a Eneko que pruebe las lentejas antes de llamar a la gente.", "cocina_cuerno_action4_hint")
|
||||
stop
|
||||
if ESC_CURRENT_SCENE == "cocina_delante":
|
||||
accept_input("SKIP")
|
||||
accept_input("NONE")
|
||||
walk_block($player, $puerta_cocina_start)
|
||||
accept_input("SKIP")
|
||||
set_angle($player, 180)
|
||||
if turno_cocina_eneko_cata_ok:
|
||||
set_gui_visible(false)
|
||||
play_video("res://gymkhana/videos/turno_cocina/cuerno_epico.ogv")
|
||||
change_scene("res://gymkhana/rooms/turno_cocina/creditos/creditos.tscn")
|
||||
stop
|
||||
play_video("res://gymkhana/videos/turno_cocina/cuerno_antes_de_tiempo.ogv")
|
||||
|
||||
@@ -9,6 +9,7 @@ process_mode = 1
|
||||
script = ExtResource("1")
|
||||
with_is_picked_component = true
|
||||
global_id = "turno_cocina_cuerno"
|
||||
interaction_angle = 90
|
||||
esc_script = "res://gymkhana/items/turno_cocina_cuerno.esc"
|
||||
combine_when_selected_action_is_in = PackedStringArray()
|
||||
inventory_texture = ExtResource("3")
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
inventory_add("turno_cocina_libro_de_cocina")
|
||||
set_active($turno_cocina_libro_de_cocina, false)
|
||||
set_angle($player, 180)
|
||||
say($player, "He guardado el libro en el inventario. Lo verás abajo a la izquierda de la pantalla.", "cocina_libro_de_cocina_action2_say_2")
|
||||
say($player, "He guardado el libro en el inventario. Lo verás más abajo a la izquierda de la pantalla.", "cocina_libro_de_cocina_action2_say_2")
|
||||
say($player, "Algunos objetos del inventario pueden combinarse entre ellos usándolos. Acuérdate más tarde, te hará falta.", "cocina_libro_de_cocina_action2_say_3")
|
||||
say($player, "Por ahora, con leer el libro de recetas bastará.", "cocina_libro_de_cocina_action2_say_4")
|
||||
|
||||
@@ -19,16 +19,18 @@
|
||||
set_angle($player, 90)
|
||||
block_say()
|
||||
say($player, "'Carpaccio de gambas aderezadas con huevas de lumpo negras'", "cocina_libro_de_cocina_intro_action3_1")
|
||||
say($player, "No, es demasiado sencillo y vulgar.", "cocina_libro_de_cocina_intro_action3_2")
|
||||
say($player, "Hmm no, es demasiado sencillo y vulgar.", "cocina_libro_de_cocina_intro_action3_2")
|
||||
set_angle($player, 270)
|
||||
say($player, "'Huevo frito'", "cocina_libro_de_cocina_intro_action3_3")
|
||||
say($player, "Uff, demasiado complicado.", "cocina_libro_de_cocina_intro_action3_4")
|
||||
set_angle($player, 180)
|
||||
say($player, "'Lentejas con patatas'", "cocina_libro_de_cocina_intro_action3_5")
|
||||
say($player, "Lentejas! Voy a hacer lentejas!!", "cocina_libro_de_cocina_intro_action3_6")
|
||||
say($player, "Lentejas! Uuh, voy a hacer lentejas!!", "cocina_libro_de_cocina_intro_action3_6")
|
||||
say($player, "Sanas y nutritivas, tienen más hierro que las espinacas.", "cocina_libro_de_cocina_intro_action3_7")
|
||||
say($player, "Y además están riquísimas!", "cocina_libro_de_cocina_intro_action3_8")
|
||||
say_to_camera($player, "Voy a contárselo a Eneko.", "cocina_libro_de_cocina_intro_action3_9")
|
||||
end_block_say()
|
||||
accept_input("NONE")
|
||||
walk_block($player, $puerta_delante_start)
|
||||
set_global("intro_dialog2_playing", true)
|
||||
# Go to delante_cocina
|
||||
@@ -37,7 +39,7 @@
|
||||
say($player, "A ver....", "cocina_libro_de_cocina_action3_1")
|
||||
say($player, "Lentejas con patatas:", "cocina_libro_de_cocina_action3_2")
|
||||
say($player, "4 patatas medianas", "cocina_libro_de_cocina_action3_3")
|
||||
say($player, "1 kg de lentejas", "cocina_libro_de_cocina_action3_4")
|
||||
say($player, "1 kilo exacto de lentejas", "cocina_libro_de_cocina_action3_4")
|
||||
say($player, "Una cabeza de ajo.", "cocina_libro_de_cocina_action3_5")
|
||||
inc_global("turno_cocina_libro_leido_count")
|
||||
if turno_cocina_libro_leido_count == 4:
|
||||
|
||||