Finished working on the minimap system for the test level, shows pawns, enemy and friendly traps, and unfinished 'items'

This commit is contained in:
2026-01-19 00:46:32 -05:00
parent bc48e9cea2
commit b69691c186
26 changed files with 375 additions and 26 deletions

View File

@@ -9,7 +9,9 @@ enum State {
DEAD
}
const trap_template = preload("res://templates/trap.tscn")
const remove_trap_modal = preload("res://templates/remove_trap_modal.tscn")
const disarm_trap_modal = preload("res://templates/disarm_trap_modal.tscn")
@@ -74,6 +76,13 @@ signal combat_target_changed(melee : bool)
signal ammo_changed(current : int, max : int)
signal struggling(value : float)
func _enter_tree() -> void:
Game.level.add_map_marker(self)
func _exit_tree() -> void:
Game.level.remove_map_marker(self)
func _physics_process(delta: float) -> void:
if attack_timer > 0:
attack_timer -= delta
@@ -359,7 +368,7 @@ func start_detecting() -> void:
detecting = true
update_detect_region.rpc(false)
@rpc("authority")
@rpc("authority", "call_local")
func update_detect_region(update : bool) -> void:
var new_square : Vector3i = (global_position - Vector3.ONE * .5).round()
if update and new_square == current_square: