Work on the manufactory as well as multiplayer features

This commit is contained in:
2026-01-28 23:59:51 -05:00
parent 0e8769a81e
commit b90fdaad98
38 changed files with 3356 additions and 4 deletions

View File

@@ -370,6 +370,8 @@ func start_detecting() -> void:
@rpc("authority", "call_local")
func update_detect_region(update : bool) -> void:
if id != Multiplayer.id:
return
var new_square : Vector3i = (global_position - Vector3.ONE * .5).round()
if update and new_square == current_square:
return
@@ -417,10 +419,12 @@ func update_detect_region(update : bool) -> void:
func stop_detecting() -> void:
detecting = false
clear_detect_region()
clear_detect_region.rpc()
@rpc("authority")
@rpc("authority", "call_local")
func clear_detect_region() -> void:
if id != Multiplayer.id:
return
for sq in detect_squares.keys():
Game.level.detect_square(sq, false)
detect_squares = {}