More work on pickups, started to implement the UI for data keys, swapped trap selections, FIRST PASS OF MULTIPLAYER CHECKS, title screen swapped.

This commit is contained in:
2026-03-23 02:34:25 -04:00
parent 9d931a3b46
commit 86f655ff07
57 changed files with 1714 additions and 1271 deletions

View File

@@ -219,7 +219,7 @@ func set_pawn_body(pb : PawnBody) -> void:
pb.shooting.connect(fire_ranged)
reload_sound = body.find_child("ReloadSound")
add_child(body)
body.set_animation_length("Ranged Fire", ranged_recovery_time)
body.set_animation_length("Ranged Attack", ranged_recovery_time)
struggling.connect(body._on_struggle_changed)
@@ -476,8 +476,9 @@ func start_installing() -> void:
func stop_installing() -> void:
state = State.NORMAL
range_sphere.queue_free()
range_sphere = null
if range_sphere != null:
range_sphere.queue_free()
range_sphere = null
@rpc("authority", "call_local")
func update_detect_region(update : bool) -> void:
@@ -727,7 +728,38 @@ func is_crouching() -> bool:
State.UNINSTALLING: result = true
return result
@rpc("any_peer", "call_local")
func add_hack(type : Hack.Type) -> void:
for hd : PawnLevelData.HackData in data.hacks:
if hd.type == type:
hd.max_quantity += 1
hd.quantity += 1
hack_list_changed.emit(data.hacks, data.active_hack)
return
#Adding a new one
var hd : PawnLevelData.HackData = PawnLevelData.HackData.new(type, 1, 1)
data.hacks.append(hd)
hack_list_changed.emit(data.hacks, data.active_hack)
func add_random_hack(advanced : bool) -> void:
#Get their current hack list
var choices : Dictionary = {
Hack.Type.DESTROY: true,
Hack.Type.PURGE: true,
Hack.Type.INFECT: true,
Hack.Type.REDIRECT: true,
Hack.Type.TRIGGER: true,
Hack.Type.CONTAIN: true
}
for hd : PawnLevelData.HackData in data.hacks:
if hd.max_quantity == 9:
choices.erase(hd.type)
var choice = choices.keys().pick_random()
add_hack.rpc(choice)
#Create a list of possible hacks, omitting any that they have the max in already
#Randomly pick one
#RPC Add hack to them
#TODO: Add random hack spawning using RPCs
pass