Cleanup dead references; update gitignore

This commit is contained in:
Jennie Robinson Faber 2026-05-10 15:20:48 +01:00
parent 0bf60b7363
commit f2b176c978
4 changed files with 10 additions and 102 deletions

3
.gitignore vendored
View file

@ -2,4 +2,5 @@
.godot/ .godot/
/android/ /android/
/.DS_Store /.DS_Store
jennie-docs /*.md
/jennie-notes/

View file

@ -19,20 +19,6 @@ var points_per_person := 100 # base + bonus per person above threshold
var people_in_elevator := 0 var people_in_elevator := 0
# PLACEHOLDER: replaced by Henry's robot collision signal.
# Handler is _on_timer_expired().
var floor_time_limit := 10.0
# PLACEHOLDER: remove when Henry's spawning system is in.
@onready var spawner = get_node("../../Node3D")
signal floor_changed(floor_num: int)
signal saved_changed(count: int)
signal score_changed(new_score: int)
signal people_changed(count: int, threshold_val: int)
signal game_won
signal game_lost
func _ready(): func _ready():
var button = $PanelMargin/PanelColumn/CloseButton var button = $PanelMargin/PanelColumn/CloseButton
button.text = "BLOCK" button.text = "BLOCK"
@ -59,29 +45,13 @@ func _start_floor():
var floors_remaining = current_floor - 1 var floors_remaining = current_floor - 1
survivors_remaining = base_survivors + (floors_remaining * survivors_per_floor_increase) survivors_remaining = base_survivors + (floors_remaining * survivors_per_floor_increase)
people_changed.emit(people_in_elevator, threshold) EventBus.people_changed.emit(people_in_elevator, threshold)
floor_changed.emit(current_floor) EventBus.floor_changed.emit(current_floor)
# Spawn 3D survivors (placeholder)
print("spawner: ", spawner, " survivors: ", survivors_remaining)
if spawner:
spawner.start_spawning(survivors_remaining)
var screen = $PanelMargin/PanelColumn/Screen var screen = $PanelMargin/PanelColumn/Screen
screen.start() screen.start()
screen.launch_pulse() # first survivor arrives screen.launch_pulse() # first survivor arrives
# Floor timer (placeholder for robot collision)
if has_node("FloorTimer"):
$FloorTimer.queue_free()
var timer = Timer.new()
timer.name = "FloorTimer"
timer.wait_time = floor_time_limit
timer.one_shot = true
timer.timeout.connect(_on_timer_expired)
add_child(timer)
timer.start()
# --- Input --- # --- Input ---
func _on_block_pressed(): func _on_block_pressed():
@ -95,7 +65,7 @@ func _on_pulse_blocked():
# This survivor made it in # This survivor made it in
survivors_remaining -= 1 survivors_remaining -= 1
people_in_elevator += 1 people_in_elevator += 1
people_changed.emit(people_in_elevator, threshold) EventBus.people_changed.emit(people_in_elevator, threshold)
if survivors_remaining <= 0: if survivors_remaining <= 0:
# Everyone's in, close doors (auto-success) # Everyone's in, close doors (auto-success)
@ -117,19 +87,12 @@ func _on_doors_closing():
return return
doors_closing_flag = true doors_closing_flag = true
# Stop spawning (placeholder)
if spawner:
spawner.stop_spawning()
if has_node("FloorTimer"):
$FloorTimer.stop()
var screen = $PanelMargin/PanelColumn/Screen var screen = $PanelMargin/PanelColumn/Screen
# Lose: not enough people # Lose: not enough people
if people_in_elevator < threshold: if people_in_elevator < threshold:
screen.show_loss("TOO FEW") screen.show_loss("TOO FEW")
game_lost.emit() EventBus.game_lost.emit()
return return
# Score this floor # Score this floor
@ -138,16 +101,16 @@ func _on_doors_closing():
score += base_points + bonus score += base_points + bonus
saved_count += people_in_elevator saved_count += people_in_elevator
score_changed.emit(score) EventBus.score_changed.emit(score)
saved_changed.emit(saved_count) EventBus.saved_changed.emit(saved_count)
current_floor -= 1 current_floor -= 1
# Win: reached ground floor # Win: reached ground floor
if current_floor <= 1: if current_floor <= 1:
screen.show_win() screen.show_win()
floor_changed.emit(current_floor) EventBus.floor_changed.emit(current_floor)
game_won.emit() EventBus.game_won.emit()
return return
# Next floor after countdown # Next floor after countdown
@ -157,15 +120,3 @@ func _on_doors_closing():
var tween = create_tween() var tween = create_tween()
tween.tween_interval(2.0) tween.tween_interval(2.0)
tween.tween_callback(_start_floor) tween.tween_callback(_start_floor)
# --- Timer (placeholder for robot collision) ---
func _on_timer_expired():
if doors_closing_flag:
return
doors_closing_flag = true
# Stop spawning (placeholder)
if spawner:
spawner.stop_spawning()
$PanelMargin/PanelColumn/Screen.show_loss("TOO LATE")
game_lost.emit()

View file

@ -1,43 +0,0 @@
extends Node3D
@export var spawn_position := Vector3(0, 0, -20)
@export var spawn_spread := 2.0
@export var spawn_interval := 1.5
var survivor_scene := preload("res://scenes/survivor.tscn")
var survivors_to_spawn := 0
var spawn_timer: Timer
func start_spawning(count: int):
survivors_to_spawn = count
if not spawn_timer:
spawn_timer = Timer.new()
spawn_timer.one_shot = false
spawn_timer.wait_time = spawn_interval
spawn_timer.timeout.connect(_spawn_one)
add_child(spawn_timer)
spawn_timer.start()
_spawn_one() # first one immediately
func stop_spawning():
if spawn_timer:
spawn_timer.stop()
survivors_to_spawn = 0
func _spawn_one():
if survivors_to_spawn <= 0:
if spawn_timer:
spawn_timer.stop()
return
var survivor = survivor_scene.instantiate()
var offset_x = randf_range(-spawn_spread, spawn_spread)
var xform = Transform3D()
xform.origin = spawn_position + Vector3(offset_x, 0, 0)
survivors_to_spawn -= 1
_deferred_add.call_deferred(survivor, xform)
func _deferred_add(survivor, xform):
get_tree().current_scene.add_child(survivor)
survivor.owner = get_tree().current_scene
survivor.start(xform)

View file

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