This commit is contained in:
Rendo 2025-11-29 02:11:21 +05:00
commit 6422ffb13c
13 changed files with 142 additions and 5 deletions

View file

@ -0,0 +1,13 @@
extends Node3D
var plant: StringName
func _ready() -> void:
if multiplayer.is_server():
$Timer.timeout.connect(on_timeout)
func on_timeout():
if multiplayer.is_server() == false:
return
Session.kill_site(plant)

View file

@ -0,0 +1 @@
uid://boftqgpgqf56g

View file

@ -8,5 +8,5 @@ func exit() -> void:
pass
func state_input(event: InputEvent) -> void:
if event.is_action("plr_bomb"):
if event.is_action("plr_bomb") and Session.is_on_site():
transition.emit("Plant")

View file

@ -14,7 +14,7 @@ func exit():
func on_animation_finished(animation: StringName):
if animation == machine.animation_prefix + "plant":
Session.spawn({"scene": active_bomb, "position": machine.player_camera.get_parent().global_position})
Session.spawn({"scene": active_bomb, "position": machine.player_camera.get_parent().global_position,"plant": Session.get_site().name})
machine.ammo -= 1
return_to_previous.emit()