diff options
Diffstat (limited to 'game/src')
-rw-r--r-- | game/src/Autoload/Events.gd | 31 | ||||
-rw-r--r-- | game/src/GameSession/GameSession.tscn | 7 | ||||
-rw-r--r-- | game/src/GameSession/MapControlPanel/MapControlPanel.gd (renamed from game/src/GameSession/MapControlPanel.gd) | 9 | ||||
-rw-r--r-- | game/src/GameSession/MapControlPanel/MapControlPanel.tscn (renamed from game/src/GameSession/MapControlPanel.tscn) | 7 | ||||
-rw-r--r-- | game/src/GameSession/MapControlPanel/Minimap.gd (renamed from game/src/GameSession/Minimap.gd) | 1 | ||||
-rw-r--r-- | game/src/GameSession/MapControlPanel/Minimap.gdshader (renamed from game/src/GameSession/Minimap.gdshader) | 2 | ||||
-rw-r--r-- | game/src/GameSession/MapView.gd | 11 | ||||
-rw-r--r-- | game/src/GameSession/ProvinceOverviewPanel.gd | 99 | ||||
-rw-r--r-- | game/src/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd | 121 | ||||
-rw-r--r-- | game/src/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn (renamed from game/src/GameSession/ProvinceOverviewPanel.tscn) | 23 | ||||
-rw-r--r-- | game/src/GameSession/TerrainMap.gdshader | 2 | ||||
-rw-r--r-- | game/src/MainMenu/ReleaseInfoBox.gd | 2 |
12 files changed, 172 insertions, 143 deletions
diff --git a/game/src/Autoload/Events.gd b/game/src/Autoload/Events.gd index 47c3b88..db63330 100644 --- a/game/src/Autoload/Events.gd +++ b/game/src/Autoload/Events.gd @@ -5,23 +5,22 @@ var Options = preload("Events/Options.gd").new() var Localisation = preload("Events/Localisation.gd").new() var ShaderManager = preload("Events/ShaderManager.gd").new() -const _province_identifier_file : String = "res://common/map/provinces.json" -const _water_province_file : String = "res://common/map/water.json" -const _region_file : String = "res://common/map/regions.json" -const _terrain_file : String = "res://common/map/terrain.json" -const _province_image_file : String = "res://common/map/provinces.png" -const _terrain_image_file : String = "res://common/map/terrain.png" +var _define_filepaths_dict : Dictionary = { + GameSingleton.get_province_identifier_file_key(): "res://common/map/provinces.json", + GameSingleton.get_water_province_file_key(): "res://common/map/water.json", + GameSingleton.get_region_file_key(): "res://common/map/regions.json", + GameSingleton.get_terrain_variant_file_key(): "res://common/map/terrain.json", + GameSingleton.get_province_image_file_key(): "res://common/map/provinces.png", + GameSingleton.get_terrain_image_file_key(): "res://common/map/terrain.png", + GameSingleton.get_goods_file_key(): "res://common/goods.json", + GameSingleton.get_good_icons_dir_key(): "res://art/economy/goods" +} # REQUIREMENTS # * FS-333, FS-334, FS-335, FS-341 func _ready(): - if GameSingleton.load_province_identifier_file(_province_identifier_file) != OK: - push_error("Failed to load province identifiers") - if GameSingleton.load_water_province_file(_water_province_file) != OK: - push_error("Failed to load water provinces") - if GameSingleton.load_region_file(_region_file) != OK: - push_error("Failed to load regions") - if GameSingleton.load_terrain_file(_terrain_file) != OK: - push_error("Failed to load terrain variants") - if GameSingleton.load_map_images(_province_image_file, _terrain_image_file) != OK: - push_error("Failed to load map images") + var start := Time.get_ticks_usec() + if GameSingleton.load_defines(_define_filepaths_dict) != OK: + push_error("Failed to load game defines!") + var end := Time.get_ticks_usec() + print("Loading took ", float(end - start) / 1000000, " seconds") diff --git a/game/src/GameSession/GameSession.tscn b/game/src/GameSession/GameSession.tscn index cad6a96..ce3471f 100644 --- a/game/src/GameSession/GameSession.tscn +++ b/game/src/GameSession/GameSession.tscn @@ -2,10 +2,10 @@ [ext_resource type="Script" path="res://src/GameSession/GameSession.gd" id="1_eklvp"] [ext_resource type="PackedScene" uid="uid://cvl76duuym1wq" path="res://src/MusicConductor/MusicPlayer.tscn" id="2_kt6aa"] -[ext_resource type="PackedScene" uid="uid://g524p8lr574w" path="res://src/GameSession/MapControlPanel.tscn" id="3_afh6d"] +[ext_resource type="PackedScene" uid="uid://g524p8lr574w" path="res://src/GameSession/MapControlPanel/MapControlPanel.tscn" id="3_afh6d"] [ext_resource type="PackedScene" uid="uid://dvdynl6eir40o" path="res://src/GameSession/GameSessionMenu.tscn" id="3_bvmqh"] [ext_resource type="PackedScene" uid="uid://dkehmdnuxih2r" path="res://src/GameSession/MapView.tscn" id="4_xkg5j"] -[ext_resource type="PackedScene" uid="uid://byq323jbel48u" path="res://src/GameSession/ProvinceOverviewPanel.tscn" id="5_osjnn"] +[ext_resource type="PackedScene" uid="uid://byq323jbel48u" path="res://src/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn" id="5_osjnn"] [ext_resource type="PackedScene" uid="uid://cnbfxjy1m6wja" path="res://src/OptionMenu/OptionsMenu.tscn" id="6_p5mnx"] [ext_resource type="PackedScene" uid="uid://dd8k3p7r3huwc" path="res://src/GameSession/GameSpeedPanel.tscn" id="7_myy4q"] @@ -66,8 +66,6 @@ offset_right = 0.0 grow_horizontal = 0 [connection signal="map_view_camera_changed" from="MapView" to="MapControlPanel" method="_on_map_view_camera_changed"] -[connection signal="province_selected" from="MapView" to="MapControlPanel" method="_on_province_selected"] -[connection signal="province_selected" from="MapView" to="ProvinceOverviewPanel" method="_on_province_selected"] [connection signal="options_button_pressed" from="GameSessionMenu" to="OptionsMenu" method="show"] [connection signal="game_session_menu_button_pressed" from="MapControlPanel" to="." method="_on_game_session_menu_button_pressed"] [connection signal="minimap_clicked" from="MapControlPanel" to="MapView" method="_on_minimap_clicked"] @@ -77,6 +75,5 @@ grow_horizontal = 0 [connection signal="zoom_out_button_pressed" from="MapControlPanel" to="MapView" method="zoom_out"] [connection signal="mouse_entered" from="ProvinceOverviewPanel" to="MapView" method="_on_mouse_exited_viewport"] [connection signal="mouse_exited" from="ProvinceOverviewPanel" to="MapView" method="_on_mouse_entered_viewport"] -[connection signal="province_deselected" from="ProvinceOverviewPanel" to="MapView" method="_deselect_province"] [connection signal="back_button_pressed" from="OptionsMenu" to="MapView" method="enable_processing"] [connection signal="back_button_pressed" from="OptionsMenu" to="OptionsMenu" method="hide"] diff --git a/game/src/GameSession/MapControlPanel.gd b/game/src/GameSession/MapControlPanel/MapControlPanel.gd index e9249b3..0cef057 100644 --- a/game/src/GameSession/MapControlPanel.gd +++ b/game/src/GameSession/MapControlPanel/MapControlPanel.gd @@ -3,7 +3,6 @@ extends PanelContainer signal game_session_menu_button_pressed signal map_view_camera_changed(near_left : Vector2, far_left : Vector2, far_right : Vector2, near_right : Vector2) signal minimap_clicked(pos_clicked : Vector2) -signal province_selcted(index : int) signal zoom_in_button_pressed signal zoom_out_button_pressed @@ -12,7 +11,7 @@ signal zoom_out_button_pressed var _mapmode_button_group : ButtonGroup # REQUIREMENTS: -# * UI-550, UI-554 +# * UI-550, UI-552, UI-554, UI-561 func _add_mapmode_button(identifier : String) -> void: var button := Button.new() button.text = identifier @@ -37,10 +36,9 @@ func _on_game_session_menu_button_pressed() -> void: # REQUIREMENTS: # * SS-76 -# * UIFUN-129, UIFUN-133 +# * UIFUN-129, UIFUN-131, UIFUN-133 func _mapmode_pressed(button : BaseButton) -> void: GameSingleton.set_mapmode(button.tooltip_text) - GameSingleton.update_colour_image() func _on_map_view_camera_changed(near_left : Vector2, far_left : Vector2, far_right : Vector2, near_right : Vector2) -> void: map_view_camera_changed.emit(near_left, far_left, far_right, near_right) @@ -48,9 +46,6 @@ func _on_map_view_camera_changed(near_left : Vector2, far_left : Vector2, far_ri func _on_minimap_clicked(pos_clicked : Vector2) -> void: minimap_clicked.emit(pos_clicked) -func _on_province_selected(index : int) -> void: - province_selcted.emit(index) - # REQUIREMENTS: # * UIFUN-269 func _on_zoom_in_button_pressed() -> void: diff --git a/game/src/GameSession/MapControlPanel.tscn b/game/src/GameSession/MapControlPanel/MapControlPanel.tscn index 82b9c86..91e2e7e 100644 --- a/game/src/GameSession/MapControlPanel.tscn +++ b/game/src/GameSession/MapControlPanel/MapControlPanel.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=7 format=3 uid="uid://g524p8lr574w"] -[ext_resource type="Script" path="res://src/GameSession/MapControlPanel.gd" id="1_ign64"] -[ext_resource type="Shader" path="res://src/GameSession/Minimap.gdshader" id="2_rinsg"] -[ext_resource type="Script" path="res://src/GameSession/Minimap.gd" id="3_s4dml"] +[ext_resource type="Script" path="res://src/GameSession/MapControlPanel/MapControlPanel.gd" id="1_ign64"] +[ext_resource type="Shader" path="res://src/GameSession/MapControlPanel/Minimap.gdshader" id="2_rinsg"] +[ext_resource type="Script" path="res://src/GameSession/MapControlPanel/Minimap.gd" id="3_s4dml"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_bhuqb"] shader = ExtResource("2_rinsg") @@ -101,7 +101,6 @@ mouse_filter = 1 text = "-" [connection signal="map_view_camera_changed" from="." to="MapPanelMargin/MapPanelList/MapDisplayList/Minimap/ViewportQuad" method="_on_map_view_camera_changed"] -[connection signal="province_selcted" from="." to="MapPanelMargin/MapPanelList/MapDisplayList/Minimap/ViewportQuad" method="_on_province_selected"] [connection signal="minimap_clicked" from="MapPanelMargin/MapPanelList/MapDisplayList/Minimap/ViewportQuad" to="." method="_on_minimap_clicked"] [connection signal="pressed" from="MapPanelMargin/MapPanelList/AuxiliaryPanel/GameSessionMenuButton" to="." method="_on_game_session_menu_button_pressed"] [connection signal="pressed" from="MapPanelMargin/MapPanelList/AuxiliaryPanel/ZoomButtonsContainer/ZoomInButton" to="." method="_on_zoom_in_button_pressed"] diff --git a/game/src/GameSession/Minimap.gd b/game/src/GameSession/MapControlPanel/Minimap.gd index f5d972a..1f9b75e 100644 --- a/game/src/GameSession/Minimap.gd +++ b/game/src/GameSession/MapControlPanel/Minimap.gd @@ -16,6 +16,7 @@ func _ready(): push_error("Failed to set up minimap shader") else: _minimap_shader = minimap_material + GameSingleton.province_selected.connect(_on_province_selected) func _on_province_selected(index : int) -> void: if _minimap_shader != null: diff --git a/game/src/GameSession/Minimap.gdshader b/game/src/GameSession/MapControlPanel/Minimap.gdshader index 8b68108..608abe2 100644 --- a/game/src/GameSession/Minimap.gdshader +++ b/game/src/GameSession/MapControlPanel/Minimap.gdshader @@ -1,6 +1,6 @@ shader_type canvas_item; -#include "ProvinceIndexSampler.gdshaderinc" +#include "res://src/GameSession/ProvinceIndexSampler.gdshaderinc" // Index of the currently selected province uniform uint selected_index; diff --git a/game/src/GameSession/MapView.gd b/game/src/GameSession/MapView.gd index c3b5cbb..22a7e6b 100644 --- a/game/src/GameSession/MapView.gd +++ b/game/src/GameSession/MapView.gd @@ -1,6 +1,5 @@ extends Node3D -signal province_selected(index : int) signal map_view_camera_changed(near_left : Vector2, far_left : Vector2, far_right : Vector2, near_right : Vector2) const _action_north : StringName = &"map_north" @@ -83,6 +82,8 @@ func _ready(): map_mesh_aabb.position.z - map_mesh_aabb.end.z )) + GameSingleton.province_selected.connect(_on_province_selected) + func _notification(what : int): match what: NOTIFICATION_WM_MOUSE_ENTER: # Mouse inside window @@ -112,12 +113,8 @@ func zoom_in() -> void: func zoom_out() -> void: _zoom_target += _zoom_target_step -func _select_province(index : int) -> void: +func _on_province_selected(index : int) -> void: _map_shader_material.set_shader_parameter(Events.ShaderManager.param_selected_index, index) - province_selected.emit(index) - -func _deselect_province() -> void: - _select_province(0) # REQUIREMENTS # * SS-31 @@ -125,7 +122,7 @@ func _unhandled_input(event : InputEvent): if _mouse_over_viewport and event.is_action_pressed(_action_click): # Check if the mouse is outside of bounds if _map_mesh.is_valid_uv_coord(_mouse_pos_map): - _select_province(GameSingleton.get_province_index_from_uv_coords(_mouse_pos_map)) + GameSingleton.set_selected_province(GameSingleton.get_province_index_from_uv_coords(_mouse_pos_map)) else: print("Clicked outside the map!") elif event.is_action_pressed(_action_drag): diff --git a/game/src/GameSession/ProvinceOverviewPanel.gd b/game/src/GameSession/ProvinceOverviewPanel.gd deleted file mode 100644 index 80f02c5..0000000 --- a/game/src/GameSession/ProvinceOverviewPanel.gd +++ /dev/null @@ -1,99 +0,0 @@ -extends PanelContainer - -signal province_deselected - -@export var _province_name_label : Label -@export var _region_name_label : Label -@export var _life_rating_bar : ProgressBar -@export var _buildings_container : Container - -const _missing_suffix : String = "_MISSING" - -var _selected_index : int: - get: return _selected_index - set(v): - _selected_index = v - update_info() -var _province_info : Dictionary - -func _ready(): - GameSingleton.state_updated.connect(update_info) - update_info() - -enum { CANNOT_EXPAND, CAN_EXPAND, PREPARING, EXPANDING } - -func _expand_building(building_identifier : String) -> void: - if GameSingleton.expand_building(_selected_index, building_identifier) != OK: - push_error("Failed to expand ", building_identifier, " in province #", _selected_index); - -# REQUIREMENTS: -# * UI-183, UI-185, UI-186, UI-765, UI-187, UI-188, UI-189 -# * UI-191, UI-193, UI-194, UI-766, UI-195, UI-196, UI-197 -# * UI-199, UI-201, UI-202, UI-767, UI-203, UI-204, UI-205 -func _add_building(building : Dictionary) -> void: - const _building_key : StringName = &"building" - const _level_key : StringName = &"level" - const _expansion_state_key : StringName = &"expansion_state" - const _start_key : StringName = &"start" - const _end_key : StringName = &"end" - const _expansion_progress_key : StringName = &"expansion_progress" - - const _expand_province_building : String = "EXPAND_PROVINCE_BUILDING" - - var level_label := Label.new() - level_label.text = str(building.get(_level_key, 0)) - _buildings_container.add_child(level_label) - - var building_label := Label.new() - building_label.text = building.get(_building_key, _building_key + _missing_suffix) - _buildings_container.add_child(building_label) - - var expansion_state : int = building.get(_expansion_state_key, CANNOT_EXPAND) - if expansion_state == PREPARING or expansion_state == EXPANDING: - var progress_bar := ProgressBar.new() - progress_bar.max_value = 1 - progress_bar.value = building.get(_expansion_progress_key, 0) - progress_bar.size_flags_horizontal = Control.SIZE_EXPAND_FILL - progress_bar.mouse_filter = Control.MOUSE_FILTER_PASS - _buildings_container.add_child(progress_bar) - else: - var expand_button := Button.new() - expand_button.text = _expand_province_building - expand_button.size_flags_horizontal = Control.SIZE_EXPAND_FILL - expand_button.mouse_filter = Control.MOUSE_FILTER_PASS - expand_button.disabled = expansion_state != CAN_EXPAND - expand_button.pressed.connect(func(): _expand_building(building_label.text)) - _buildings_container.add_child(expand_button) - -func update_info() -> void: - const _province_key : StringName = &"province" - const _region_key : StringName = &"region" - const _life_rating_key : StringName = &"life_rating" - const _buildings_key : StringName = &"buildings" - - const _life_rating_tooltip : String = "LIFE_RATING_TOOLTIP" - - _province_info = GameSingleton.get_province_info_from_index(_selected_index) - if _province_info: - _province_name_label.text = _province_info.get(_province_key, _province_key + _missing_suffix) - _region_name_label.text = _province_info.get(_region_key, _region_key + _missing_suffix) - - _life_rating_bar.value = _province_info.get(_life_rating_key, 0) - _life_rating_bar.tooltip_text = tr(_life_rating_tooltip) % _life_rating_bar.value - - for child in _buildings_container.get_children(): - _buildings_container.remove_child(child) - child.queue_free() - var buildings : Array = _province_info.get(_buildings_key, []) - for building in buildings: - _add_building(building) - - show() - else: - hide() - -func _on_province_selected(index : int) -> void: - _selected_index = index - -func _on_close_button_pressed() -> void: - province_deselected.emit() diff --git a/game/src/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd b/game/src/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd new file mode 100644 index 0000000..0d8d8b7 --- /dev/null +++ b/game/src/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd @@ -0,0 +1,121 @@ +extends PanelContainer + +@export var _province_name_label : Label +@export var _region_name_label : Label +@export var _life_rating_bar : ProgressBar +@export var _rgo_icon_texture_rect : TextureRect +@export var _rgo_name_label : Label +@export var _buildings_container : Container + +const _missing_suffix : String = "_MISSING" + +var _selected_index : int: + get: return _selected_index + set(v): + _selected_index = v + update_info() +var _province_info : Dictionary + +func _ready(): + GameSingleton.province_selected.connect(_on_province_selected) + GameSingleton.state_updated.connect(update_info) + update_info() + +enum { CANNOT_EXPAND, CAN_EXPAND, PREPARING, EXPANDING } + +func _expand_building(building_identifier : String) -> void: + if GameSingleton.expand_building(_selected_index, building_identifier) != OK: + push_error("Failed to expand ", building_identifier, " in province #", _selected_index); + +# Each building row contains: +# level - Level Label +# name - Name Label +# button - Expansion Button +# progress_bar - Expansion ProgressBar +var _building_rows : Array[Dictionary] + +# REQUIREMENTS: +# * UI-183, UI-185, UI-186, UI-765, UI-187, UI-188, UI-189 +# * UI-191, UI-193, UI-194, UI-766, UI-195, UI-196, UI-197 +# * UI-199, UI-201, UI-202, UI-767, UI-203, UI-204, UI-205 +func _add_building_row() -> void: + var row : Dictionary + + row.level = Label.new() + row.level.text = "X" + _buildings_container.add_child(row.level) + + row.name = Label.new() + row.name.text = GameSingleton.get_building_info_building_key() + _missing_suffix + _buildings_container.add_child(row.name) + + row.button = Button.new() + row.button.text = "EXPAND_PROVINCE_BUILDING" + row.button.size_flags_horizontal = Control.SIZE_EXPAND_FILL + row.button.mouse_filter = Control.MOUSE_FILTER_PASS + row.button.pressed.connect(func(): _expand_building(row.name.text)) + _buildings_container.add_child(row.button) + + row.progress_bar = ProgressBar.new() + row.progress_bar.max_value = 1 + row.progress_bar.size_flags_horizontal = Control.SIZE_EXPAND_FILL + row.progress_bar.mouse_filter = Control.MOUSE_FILTER_PASS + _buildings_container.add_child(row.progress_bar) + + _building_rows.append(row) + _set_building_row(_building_rows.size() - 1, {}) + +func _set_building_row(index : int, building : Dictionary) -> void: + if index < 0 or index > _building_rows.size(): + push_error("Invalid building row index: ", index, " (max ", _building_rows.size(), ")") + return + if index == _building_rows.size(): _add_building_row() + var row := _building_rows[index] + if building.is_empty(): + row.level.visible = false + row.name.visible = false + row.progress_bar.visible = false + row.button.visible = false + return + row.level.text = str(building.get(GameSingleton.get_building_info_level_key(), 0)) + row.level.visible = true + row.name.text = building.get(GameSingleton.get_building_info_building_key(), + GameSingleton.get_building_info_building_key() + _missing_suffix) + row.name.visible = true + + var expansion_state : int = building.get(GameSingleton.get_building_info_expansion_state_key(), + CANNOT_EXPAND) + var show_progress_bar := expansion_state == PREPARING or expansion_state == EXPANDING + row.progress_bar.value = building.get(GameSingleton.get_building_info_expansion_progress_key(), 0) + row.progress_bar.visible = show_progress_bar + row.button.disabled = expansion_state != CAN_EXPAND + row.button.visible = not show_progress_bar + +func update_info() -> void: + _province_info = GameSingleton.get_province_info_from_index(_selected_index) + if _province_info: + _province_name_label.text = _province_info.get(GameSingleton.get_province_info_province_key(), + GameSingleton.get_province_info_province_key() + _missing_suffix) + _region_name_label.text = _province_info.get(GameSingleton.get_province_info_region_key(), + GameSingleton.get_province_info_region_key() + _missing_suffix) + + _life_rating_bar.value = _province_info.get(GameSingleton.get_province_info_life_rating_key(), 0) + _life_rating_bar.tooltip_text = tr("LIFE_RATING_TOOLTIP").format({ "life_rating": _life_rating_bar.value }) + + _rgo_name_label.text = _province_info.get(GameSingleton.get_province_info_rgo_key(), + GameSingleton.get_province_info_rgo_key() + _missing_suffix) + _rgo_icon_texture_rect.texture = GameSingleton.get_good_icon_texture(_rgo_name_label.text) + + var buildings : Array = _province_info.get(GameSingleton.get_province_info_buildings_key(), []) + for i in max(buildings.size(), _building_rows.size()): + _set_building_row(i, buildings[i] if i < buildings.size() else {}) + + show() + else: + hide() + +func _on_province_selected(index : int) -> void: + _selected_index = index + +func _on_close_button_pressed() -> void: + GameSingleton.set_selected_province(0) diff --git a/game/src/GameSession/ProvinceOverviewPanel.tscn b/game/src/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn index 8c83baa..a233db0 100644 --- a/game/src/GameSession/ProvinceOverviewPanel.tscn +++ b/game/src/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=2 format=3 uid="uid://byq323jbel48u"] -[ext_resource type="Script" path="res://src/GameSession/ProvinceOverviewPanel.gd" id="1_3n8k5"] +[ext_resource type="Script" path="res://src/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd" id="1_3n8k5"] -[node name="ProvinceOverviewPanel" type="PanelContainer" node_paths=PackedStringArray("_province_name_label", "_region_name_label", "_life_rating_bar", "_buildings_container")] +[node name="ProvinceOverviewPanel" type="PanelContainer" node_paths=PackedStringArray("_province_name_label", "_region_name_label", "_life_rating_bar", "_rgo_icon_texture_rect", "_rgo_name_label", "_buildings_container")] editor_description = "UI-56" anchors_preset = 2 anchor_top = 1.0 @@ -15,6 +15,8 @@ script = ExtResource("1_3n8k5") _province_name_label = NodePath("PanelList/TopBarList/NameList/ProvinceName") _region_name_label = NodePath("PanelList/TopBarList/NameList/RegionName") _life_rating_bar = NodePath("PanelList/TopBarList/NameList/LifeRatingBar") +_rgo_icon_texture_rect = NodePath("PanelList/InteractList/RGOInfo/RGOIcon") +_rgo_name_label = NodePath("PanelList/InteractList/RGOInfo/RGOName") _buildings_container = NodePath("PanelList/InteractList/BuildingsContainer") [node name="PanelList" type="VBoxContainer" parent="."] @@ -60,6 +62,23 @@ size_flags_vertical = 3 layout_mode = 2 mouse_filter = 1 +[node name="RGOInfo" type="HBoxContainer" parent="PanelList/InteractList"] +editor_description = "UI-112" +layout_mode = 2 + +[node name="RGOIcon" type="TextureRect" parent="PanelList/InteractList/RGOInfo"] +editor_description = "UI-100" +layout_mode = 2 + +[node name="RGOName" type="Label" parent="PanelList/InteractList/RGOInfo"] +layout_mode = 2 +text = "rgo_MISSING" +vertical_alignment = 1 + +[node name="HSeparator2" type="HSeparator" parent="PanelList/InteractList"] +layout_mode = 2 +mouse_filter = 1 + [node name="BuildingsContainer" type="GridContainer" parent="PanelList/InteractList"] layout_mode = 2 columns = 3 diff --git a/game/src/GameSession/TerrainMap.gdshader b/game/src/GameSession/TerrainMap.gdshader index 7d160f0..88e7019 100644 --- a/game/src/GameSession/TerrainMap.gdshader +++ b/game/src/GameSession/TerrainMap.gdshader @@ -2,7 +2,7 @@ shader_type spatial; render_mode unshaded; -#include "ProvinceIndexSampler.gdshaderinc" +#include "res://src/GameSession/ProvinceIndexSampler.gdshaderinc" // Province colour texture uniform sampler2D province_colour_tex: source_color, repeat_enable, filter_nearest; diff --git a/game/src/MainMenu/ReleaseInfoBox.gd b/game/src/MainMenu/ReleaseInfoBox.gd index ca03af3..e363162 100644 --- a/game/src/MainMenu/ReleaseInfoBox.gd +++ b/game/src/MainMenu/ReleaseInfoBox.gd @@ -28,7 +28,7 @@ func _notification(what : int): _update_checksum_label_text() func _update_checksum_label_text() -> void: - _checksum_label.tooltip_text = tr("MAINMENU_CHECKSUM") % _checksum + _checksum_label.tooltip_text = tr("MAINMENU_CHECKSUM").format({ "checksum": _checksum }) _checksum_label.text = "(%s)" % _checksum.substr(0, 4) func _on_version_label_pressed(): |