take care of warnings

This commit is contained in:
veclavtalica 2025-02-13 08:13:56 +03:00
parent 3a5d90e50a
commit 43a63dbe91
6 changed files with 10 additions and 5 deletions

View File

@ -144,7 +144,7 @@ func _add_chat_message(username: String, text: String) -> void:
func _on_chat_history_scroll_changed(history: ScrollContainer) -> void:
# keep history scrolled to the bottom
history.scroll_vertical = history.get_v_scroll_bar().max_value
history.scroll_vertical = int(history.get_v_scroll_bar().max_value)
func _make_chat_message(username: String, text: String) -> RichTextLabel:
@ -160,6 +160,6 @@ func _on_chat_message_submitted(new_text := "") -> void:
_deactivate_chat()
return
_submit_chat_message.rpc_id(1, _chat_input.text)
_submit_chat_message.rpc_id(1, new_text)
_chat_input.clear()
_deactivate_chat()

View File

@ -2,6 +2,7 @@ extends Node3D
@export var _projectile_scene: PackedScene
@export var _projectile_holder: Node
@warning_ignore("unused_private_class_variable")
@export var _production_timer: Timer

View File

@ -17,7 +17,7 @@ const JUMP_VELOCITY = 4.5
@export var input_dir := Vector2()
@export var input_jumped := false
var _max_speed := 12
var _max_speed := 16
var _mouse_sensitivity := 0.008 # radians/pixel
var _projectile_speed := 12.0
@ -85,6 +85,9 @@ func _physics_process(delta: float) -> void:
velocity.x = move_toward(velocity.x, 0, SPEED)
velocity.z = move_toward(velocity.z, 0, SPEED)
if velocity.length() > _max_speed:
velocity = velocity.clampf(0, _max_speed)
call("stair_step_up", direction)
if move_and_slide() and is_on_floor():

View File

@ -151,7 +151,7 @@ func stair_step_up(wish_dir: Vector3):
# 6. Move player up
var global_pos = global_position
var step_up_dist = test_transform.origin.y - global_pos.y
#var step_up_dist = test_transform.origin.y - global_pos.y
global_pos.y = test_transform.origin.y
global_position = global_pos

View File

@ -5,6 +5,7 @@ extends Resource
## How many plants are watered in a time window.
var _water_combo: int
@warning_ignore("unused_signal")
signal water_combo_update(current: int)

View File

@ -91,7 +91,7 @@ func _add_chat_message(username: String, text: String) -> void:
# keep chat scrolled to the bottom
await _chat_history_scroll.get_v_scroll_bar().changed
_chat_history_scroll.scroll_vertical = _chat_history_scroll.get_v_scroll_bar().max_value
_chat_history_scroll.scroll_vertical = int(_chat_history_scroll.get_v_scroll_bar().max_value)
@rpc("authority", "call_local", "reliable")