Fix multiplayer parity and release regressions
This commit is contained in:
parent
b18d9392d8
commit
c0ff78322d
17 changed files with 378 additions and 17 deletions
|
|
@ -60,6 +60,9 @@ func open_chat() -> void:
|
|||
_player.set_movement_enabled(false)
|
||||
_player.set_camera_input_enabled(false)
|
||||
_fishing_spot.set_local_menu_input_suppressed(INPUT_OWNER, true)
|
||||
# Send the host a zeroed frame immediately so it cannot keep applying the
|
||||
# last movement state while this LineEdit owns keyboard input.
|
||||
_session.submit_neutral_local_movement()
|
||||
_panel.show()
|
||||
_entry.show()
|
||||
_entry.grab_focus()
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ enum CloseReason {
|
|||
}
|
||||
|
||||
@onready var _wallet_label: Label = %WalletLabel
|
||||
@onready var _fish_sales: VBoxContainer = (
|
||||
$ShopPanel/Margin/Layout/Body/FishSales
|
||||
)
|
||||
@onready var _fish_list: ItemList = %FishList
|
||||
@onready var _sales_title: Label = %SalesTitle
|
||||
@onready var _fish_empty: Label = %FishEmpty
|
||||
|
|
@ -94,6 +97,9 @@ var _closing: bool = false
|
|||
|
||||
|
||||
func _ready() -> void:
|
||||
# Catch selling belongs to the Pelican action in the Player Menu. Keep the
|
||||
# legacy shop sales controls out of the active interface.
|
||||
_fish_sales.hide()
|
||||
%CloseButton.pressed.connect(close_shop)
|
||||
_fish_list.item_selected.connect(_on_fish_selected)
|
||||
_fish_list.item_clicked.connect(_on_fish_clicked)
|
||||
|
|
@ -425,8 +431,15 @@ func _refresh_upgrades() -> void:
|
|||
reel_cost < 0
|
||||
or _transaction_in_progress
|
||||
or _closing
|
||||
or _network_shop == null
|
||||
or not _network_shop.can_request_purchase()
|
||||
or not _upgrades.can_purchase_reel_speed(_wallet)
|
||||
)
|
||||
_reel_purchase.tooltip_text = (
|
||||
"Purchases are unavailable in this session."
|
||||
if _network_shop == null or not _network_shop.can_request_purchase()
|
||||
else ""
|
||||
)
|
||||
if reel_cost < 0:
|
||||
_reel_effect.text = "%.2f×" % _upgrades.get_reel_speed_multiplier()
|
||||
_reel_cost.text = "max"
|
||||
|
|
@ -447,8 +460,11 @@ func _refresh_upgrades() -> void:
|
|||
barrier_cost < 0
|
||||
or _transaction_in_progress
|
||||
or _closing
|
||||
or _network_shop == null
|
||||
or not _network_shop.can_request_purchase()
|
||||
or not _upgrades.can_purchase_barrier_power(_wallet)
|
||||
)
|
||||
_barrier_purchase.tooltip_text = _reel_purchase.tooltip_text
|
||||
if barrier_cost < 0:
|
||||
_barrier_effect.text = "%d damage" % _upgrades.get_barrier_damage()
|
||||
_barrier_cost.text = "max"
|
||||
|
|
@ -488,11 +504,18 @@ func _refresh_supplies() -> void:
|
|||
button.disabled = (
|
||||
_transaction_in_progress
|
||||
or _closing
|
||||
or _network_shop == null
|
||||
or not _network_shop.can_request_purchase()
|
||||
or not _bag.can_add_item(item_id, 1)
|
||||
or not _wallet.can_afford(
|
||||
FishingShopStockType.get_price(item_id)
|
||||
)
|
||||
)
|
||||
button.tooltip_text = (
|
||||
"Purchases are unavailable in this session."
|
||||
if _network_shop == null or not _network_shop.can_request_purchase()
|
||||
else item.description
|
||||
)
|
||||
button.pressed.connect(_purchase_supply.bind(item_id))
|
||||
_supplies_list.add_child(button)
|
||||
|
||||
|
|
@ -508,8 +531,11 @@ func _refresh_cooler_capacity() -> void:
|
|||
cost < 0
|
||||
or _transaction_in_progress
|
||||
or _closing
|
||||
or _network_shop == null
|
||||
or not _network_shop.can_request_purchase()
|
||||
or not _cooler_capacity.can_purchase(_wallet)
|
||||
)
|
||||
_cooler_purchase.tooltip_text = _reel_purchase.tooltip_text
|
||||
if cost < 0:
|
||||
_cooler_effect.text = "%d fish" % _cooler_capacity.get_capacity()
|
||||
_cooler_cost.text = "max"
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ const ChatUIType = preload("res://ui/chat_ui.gd")
|
|||
signal pixelation_settings_visibility_changed(is_visible: bool)
|
||||
signal crisp_reset_focus_requested
|
||||
signal interactive_pointer_ui_changed(is_open: bool)
|
||||
signal player_menu_backdrop_visibility_changed(is_visible: bool)
|
||||
|
||||
@onready var _status_label: Label = %StatusLabel
|
||||
@onready var _catch_track: Control = %CatchTrack
|
||||
|
|
@ -490,6 +491,7 @@ func _on_showcase_changed(
|
|||
|
||||
func _on_player_menu_visibility_changed(is_open: bool) -> void:
|
||||
_player_menu_open = is_open
|
||||
player_menu_backdrop_visibility_changed.emit(is_open)
|
||||
_refresh_chat_availability()
|
||||
_hotbar_ui.set_gameplay_input_enabled(
|
||||
_gameplay_ui_enabled and not is_open
|
||||
|
|
|
|||
|
|
@ -229,6 +229,7 @@ var _sale_service: FishSaleServiceType
|
|||
var _network_session: NetworkSessionType
|
||||
var _network_sale_service: NetworkSaleService
|
||||
var _network_mail_service: NetworkMailService
|
||||
var _reservations: PlayerAssetReservationService
|
||||
var _network_profile_service: NetworkProfileService
|
||||
var _network_player_list: NetworkPlayerListService
|
||||
var _default_buyer: FishBuyerProfileType
|
||||
|
|
@ -389,6 +390,7 @@ func setup(
|
|||
_network_session = network_session
|
||||
_network_sale_service = network_sale_service
|
||||
_network_mail_service = network_mail_service
|
||||
_reservations = reservations
|
||||
_network_profile_service = network_profile_service
|
||||
_network_player_list = network_player_list
|
||||
_mail_page.setup(
|
||||
|
|
@ -2436,6 +2438,11 @@ func _update_inventory_detail(fish_catch: FishCatchType) -> void:
|
|||
else -1
|
||||
)
|
||||
_cooler_weight_value.text = "%.2f" % fish_catch.weight_lb
|
||||
if (
|
||||
_reservations != null
|
||||
and _reservations.is_fish_reserved(fish_catch.catch_id)
|
||||
):
|
||||
_cooler_detail_name.text += " • reserved in mail"
|
||||
_cooler_weight_unit.text = "lb"
|
||||
if buyer_offer >= 0 and _default_buyer != null:
|
||||
_cooler_offer_label.text = "%s offer" % _default_buyer.display_name
|
||||
|
|
@ -2734,6 +2741,16 @@ func _on_network_sale_finished(
|
|||
)
|
||||
_refresh_all()
|
||||
if _current_section == Section.COOLER:
|
||||
call_deferred("_restore_inventory_tab_focus")
|
||||
|
||||
|
||||
func _restore_inventory_tab_focus() -> void:
|
||||
if (
|
||||
visible
|
||||
and _current_section == Section.COOLER
|
||||
and _inventory_tab.focus_mode != Control.FOCUS_NONE
|
||||
and _inventory_tab.is_visible_in_tree()
|
||||
):
|
||||
_inventory_tab.grab_focus()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -44,17 +44,6 @@ mouse_filter = 2
|
|||
theme = ExtResource("2_theme")
|
||||
script = ExtResource("1_menu")
|
||||
|
||||
[node name="Dimmer" type="ColorRect" parent="."]
|
||||
z_index = -20
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
color = Color(0.015, 0.02, 0.03, 0.72)
|
||||
|
||||
[node name="ResponsivePlayerMenuStage" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue