From 7c4e541446a1558ca756701a6b63d1c5bc7605fe Mon Sep 17 00:00:00 2001 From: Minimata Date: Wed, 10 Dec 2025 17:10:41 +0100 Subject: [PATCH] fixed input mapping context issue --- .../base/scenes/menus/main_menu/main_menu.gd | 1 + maps/city.tscn | 4 +++- systems/inputs/input_system.gd | 1 + systems/mantle/MantleSystem.cs | 1 - tools/city_helpers.gd | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/maaacks_game_template/base/scenes/menus/main_menu/main_menu.gd b/addons/maaacks_game_template/base/scenes/menus/main_menu/main_menu.gd index 65a4c19b..97a61b0f 100644 --- a/addons/maaacks_game_template/base/scenes/menus/main_menu/main_menu.gd +++ b/addons/maaacks_game_template/base/scenes/menus/main_menu/main_menu.gd @@ -14,6 +14,7 @@ var credits_scene var sub_menu func load_game_scene() -> void: + GUIDE.disable_mapping_context(menu_context) SceneLoader.load_scene(game_scene_path) func new_game() -> void: diff --git a/maps/city.tscn b/maps/city.tscn index 11750e78..49f57f1b 100644 --- a/maps/city.tscn +++ b/maps/city.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=40 format=3 uid="uid://dmkw8cmalm5k"] +[gd_scene load_steps=41 format=3 uid="uid://dmkw8cmalm5k"] [ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://player_controller/PlayerController.tscn" id="1_2vsi6"] [ext_resource type="Script" uid="uid://blenis2y55fmg" path="res://tools/city_helpers.gd" id="1_qwuk2"] +[ext_resource type="Resource" uid="uid://bl5crtu1gkrtr" path="res://systems/inputs/base_mode/base_mode.tres" id="2_p287n"] [ext_resource type="Texture2D" uid="uid://ca4kkq3w8cd4n" path="res://assets/sky/sky_15_2k.png" id="2_ruo5i"] [ext_resource type="PackedScene" uid="uid://dkr80d2pi0d41" path="res://addons/guide/debugger/guide_debugger.tscn" id="2_uet8a"] [ext_resource type="Script" uid="uid://cyh0d64pfygbl" path="res://addons/maaacks_game_template/base/scripts/pause_menu_controller.gd" id="7_ukfuy"] @@ -91,6 +92,7 @@ adjustment_enabled = true [node name="Main" type="Node3D"] script = ExtResource("1_qwuk2") +base_mode = ExtResource("2_p287n") [node name="BackgroundMusicPlayer" parent="." instance=ExtResource("9_i2xii")] stream = ExtResource("10_eca4n") diff --git a/systems/inputs/input_system.gd b/systems/inputs/input_system.gd index 1c316c2a..529c250f 100644 --- a/systems/inputs/input_system.gd +++ b/systems/inputs/input_system.gd @@ -82,6 +82,7 @@ func on_input_hit(): input_hit.emit() func on_input_jump_started(): + print("jump") input_jump_started.emit() func on_input_jump_ongoing(): diff --git a/systems/mantle/MantleSystem.cs b/systems/mantle/MantleSystem.cs index d1f606d5..b68c0e3f 100644 --- a/systems/mantle/MantleSystem.cs +++ b/systems/mantle/MantleSystem.cs @@ -35,7 +35,6 @@ public partial class MantleSystem: Node3D } if (_wallInFrontCast3D.GetCollisionNormal(0).Y > 0.8f) { - GD.Print(_wallInFrontCast3D.GetCollisionNormal(0).Y); return Option.None; } diff --git a/tools/city_helpers.gd b/tools/city_helpers.gd index e00608b6..26f8fc52 100644 --- a/tools/city_helpers.gd +++ b/tools/city_helpers.gd @@ -5,8 +5,8 @@ extends Node3D @export_tool_button("Tuto start", "Callable") var player_tuto_start = place_player_tuto_start @export_tool_button("Playground", "Callable") var player_playground = place_player_playground -@onready var player: CharacterBody3D = $Player +@onready var player: CharacterBody3D = $Player func place_player_tuto_start(): player.position = Vector3(0, -132.75, 118)