Files
Cozypaw-Hospital/docs/superpowers/plans/2026-04-17-sprint-8-10-obergeschoss.md
2026-04-17 21:15:07 +02:00

805 lines
26 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Sprint 8-10: 1. Obergeschoss — Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Four fully interactive first-floor rooms (XRay, Pharmacy, Lab, Patient Room) with the X-ray machine's plate slide-in animation as the highlight feature.
**Architecture:** Floor 1 follows the same side-by-side room layout as Floor 0 — four rooms at X offsets 0, 1280, 2560, 3840 within the `Floor1` node. `XRayMachine` is a new custom component (like `Ambulance`) with its own state machine. The existing `NavigationArrow` and `ElevatorButton` components are reused unchanged. `Main.tscn` is updated to replace the Floor 1 placeholder nodes with the real room scenes.
**Tech Stack:** Godot 4.6.2, GDScript (static typing), existing `InteractiveObject` base class, placeholder ColorRect graphics.
---
## File Map
| Action | File | Responsibility |
|--------|------|----------------|
| Create | `scripts/objects/xray_machine.gd` | Plate slide-in animation, 4-state machine (IDLE → SLIDING_IN → EXPOSING → SLIDING_OUT) |
| Create | `scenes/objects/XRayMachine.tscn` | Machine body + viewer screen + sliding plate (all ColorRect) |
| Create | `scenes/rooms/floor1/XRay.tscn` | Exam table, XRayMachine instance, PlasterStation |
| Create | `scenes/rooms/floor1/Pharmacy.tscn` | Medicine shelf, counter, 4 positive medicine objects |
| Create | `scenes/rooms/floor1/Lab.tscn` | Lab bench, 4 interactive lab objects |
| Create | `scenes/rooms/floor1/PatientRoom.tscn` | 2 beds, TV, bedside table |
| Modify | `scenes/main/Main.tscn` | Replace Floor1 placeholder with 4 rooms + nav arrows; move elevator buttons |
**Room layout in Floor1 (local X positions):**
- XRay: x=0 (room index 0) — camera center world (640, -360)
- Pharmacy: x=1280 (room index 1) — camera center world (1920, -360)
- Lab: x=2560 (room index 2) — camera center world (3200, -360)
- PatientRoom: x=3840 (room index 3) — camera center world (4480, -360)
**XRayMachine visual layout (local space, origin = machine base center):**
- MachineBody: grey ColorRect 80×200 at local (-40, -200) — tall vertical machine
- MachineArm: grey ColorRect 220×24 at local (-40, -180) — horizontal arm over table
- ViewerFrame: dark ColorRect 80×60 at local (-40, -195) — screen housing on machine
- Viewer: very dark ColorRect 66×46 at local (-33, -189) — screen, lights up during scan
- Plate: Node2D child, starts at local (-50, 20); contains PlateBody (200×14 ColorRect)
- PLATE_PARKED_X = -50.0 (behind/inside machine, hidden)
- PLATE_ACTIVE_X = 130.0 (extends to the right, under the exam table)
**Floor1 elevator buttons (moved to avoid overlap with nav arrows at x=1200):**
- ElevatorDown1: position (1100, 540) → target_floor = 0
- ElevatorUp1: position (1100, 180) → target_floor = 2
---
## Task 1: XRayMachine component
**Files:**
- Create: `scripts/objects/xray_machine.gd`
- Create: `scenes/objects/XRayMachine.tscn`
- [ ] **Step 1: Create xray_machine.gd**
```gdscript
## XRayMachine — X-ray plate slides out when tapped; viewer lights up during exposure.
class_name XRayMachine extends Node2D
enum State { IDLE, SLIDING_IN, EXPOSING, SLIDING_OUT }
const SLIDE_DURATION: float = 0.8
const EXPOSE_DURATION: float = 1.5
const BUTTON_HALF_WIDTH: float = 50.0
const BUTTON_HALF_HEIGHT: float = 100.0
const PLATE_PARKED_X: float = -50.0
const PLATE_ACTIVE_X: float = 130.0
const VIEWER_LIT_COLOR: Color = Color(0.75, 0.90, 1.0, 1)
const VIEWER_DARK_COLOR: Color = Color(0.06, 0.08, 0.12, 1)
var _state: State = State.IDLE
func _ready() -> void:
var plate: Node2D = get_node_or_null("Plate") as Node2D
if plate != null:
plate.position.x = PLATE_PARKED_X
func _input(event: InputEvent) -> void:
if _state != State.IDLE:
return
var screen_pos: Vector2
if event is InputEventScreenTouch and event.pressed:
screen_pos = event.position
elif event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
screen_pos = event.position
else:
return
var canvas_transform: Transform2D = get_viewport().get_canvas_transform()
var world_pos: Vector2 = canvas_transform.affine_inverse() * screen_pos
var local_pos: Vector2 = to_local(world_pos)
if abs(local_pos.x) <= BUTTON_HALF_WIDTH and abs(local_pos.y) <= BUTTON_HALF_HEIGHT:
_start_scan()
func _start_scan() -> void:
_state = State.SLIDING_IN
var plate: Node2D = get_node_or_null("Plate") as Node2D
if plate == null:
_state = State.IDLE
return
var tween: Tween = create_tween()
tween.set_ease(Tween.EASE_IN_OUT)
tween.set_trans(Tween.TRANS_QUAD)
tween.tween_property(plate, "position:x", PLATE_ACTIVE_X, SLIDE_DURATION)
tween.finished.connect(_on_plate_in)
func _on_plate_in() -> void:
_state = State.EXPOSING
var viewer: ColorRect = get_node_or_null("Viewer") as ColorRect
if viewer != null:
viewer.color = VIEWER_LIT_COLOR
var timer: SceneTreeTimer = get_tree().create_timer(EXPOSE_DURATION)
timer.timeout.connect(_start_slide_out)
func _start_slide_out() -> void:
_state = State.SLIDING_OUT
var viewer: ColorRect = get_node_or_null("Viewer") as ColorRect
if viewer != null:
viewer.color = VIEWER_DARK_COLOR
var plate: Node2D = get_node_or_null("Plate") as Node2D
if plate == null:
_state = State.IDLE
return
var tween: Tween = create_tween()
tween.set_ease(Tween.EASE_IN_OUT)
tween.set_trans(Tween.TRANS_QUAD)
tween.tween_property(plate, "position:x", PLATE_PARKED_X, SLIDE_DURATION)
tween.finished.connect(func() -> void: _state = State.IDLE)
```
- [ ] **Step 2: Create XRayMachine.tscn**
```
[gd_scene load_steps=2 format=3 uid="uid://cozypaw_xraymachine"]
[ext_resource type="Script" path="res://scripts/objects/xray_machine.gd" id="1_xraymachine"]
[node name="XRayMachine" type="Node2D"]
script = ExtResource("1_xraymachine")
[node name="MachineBody" type="ColorRect" parent="."]
color = Color(0.68, 0.70, 0.76, 1)
size = Vector2(80, 200)
position = Vector2(-40, -200)
[node name="MachineArm" type="ColorRect" parent="."]
color = Color(0.62, 0.64, 0.70, 1)
size = Vector2(220, 24)
position = Vector2(-40, -180)
[node name="ViewerFrame" type="ColorRect" parent="."]
color = Color(0.20, 0.22, 0.26, 1)
size = Vector2(80, 60)
position = Vector2(-40, -195)
[node name="Viewer" type="ColorRect" parent="."]
color = Color(0.06, 0.08, 0.12, 1)
size = Vector2(66, 46)
position = Vector2(-33, -189)
[node name="Plate" type="Node2D" parent="."]
position = Vector2(-50, 20)
[node name="PlateBody" type="ColorRect" parent="Plate"]
color = Color(0.28, 0.32, 0.38, 1)
size = Vector2(200, 14)
position = Vector2(0, -7)
```
- [ ] **Step 3: Commit**
```bash
cd "F:/Development/_gameDev/Cozypaw-Hospital"
git add scripts/objects/xray_machine.gd scenes/objects/XRayMachine.tscn
git commit -m "feat(xray): add XRayMachine component with plate slide-in animation"
```
---
## Task 2: XRay Room scene
**Files:**
- Create: `scenes/rooms/floor1/XRay.tscn`
The XRayMachine is placed at (500, 510) in this room. The exam table is to its right. Tapping the machine triggers the plate animation.
- [ ] **Step 1: Create XRay.tscn**
```
[gd_scene load_steps=3 format=3 uid="uid://cozypaw_xray"]
[ext_resource type="PackedScene" path="res://scenes/objects/InteractiveObject.tscn" id="1_iobj"]
[ext_resource type="PackedScene" path="res://scenes/objects/XRayMachine.tscn" id="2_xraymachine"]
[node name="XRay" type="Node2D"]
[node name="Background" type="ColorRect" parent="."]
color = Color(0.88, 0.92, 0.96, 1)
size = Vector2(1280, 720)
position = Vector2(0, 0)
[node name="Floor" type="ColorRect" parent="."]
color = Color(0.78, 0.80, 0.86, 1)
size = Vector2(1280, 100)
position = Vector2(0, 620)
[node name="WallLeft" type="ColorRect" parent="."]
color = Color(0.88, 0.90, 0.94, 1)
size = Vector2(40, 620)
position = Vector2(0, 0)
[node name="WallRight" type="ColorRect" parent="."]
color = Color(0.88, 0.90, 0.94, 1)
size = Vector2(40, 620)
position = Vector2(1240, 0)
[node name="ExamTable" type="ColorRect" parent="."]
color = Color(0.84, 0.86, 0.90, 1)
size = Vector2(320, 40)
position = Vector2(480, 490)
[node name="ExamTableLeg1" type="ColorRect" parent="."]
color = Color(0.65, 0.68, 0.74, 1)
size = Vector2(16, 130)
position = Vector2(500, 530)
[node name="ExamTableLeg2" type="ColorRect" parent="."]
color = Color(0.65, 0.68, 0.74, 1)
size = Vector2(16, 130)
position = Vector2(768, 530)
[node name="LeadApron" type="ColorRect" parent="."]
color = Color(0.30, 0.40, 0.35, 1)
size = Vector2(60, 120)
position = Vector2(1100, 480)
[node name="CharacterSpawn" type="Marker2D" parent="."]
position = Vector2(200, 490)
[node name="XRayMachine" parent="." instance=ExtResource("2_xraymachine")]
position = Vector2(500, 510)
[node name="PlasterStation" parent="." instance=ExtResource("1_iobj")]
position = Vector2(900, 560)
```
- [ ] **Step 2: Commit**
```bash
git add scenes/rooms/floor1/XRay.tscn
git commit -m "feat(xray): add XRay Room scene with exam table and XRayMachine"
```
---
## Task 3: Pharmacy scene
**Files:**
- Create: `scenes/rooms/floor1/Pharmacy.tscn`
All medicine items are positive (vitamins, bandages, syrup, medicine box) — no poison or harmful items per product principles.
- [ ] **Step 1: Create Pharmacy.tscn**
```
[gd_scene load_steps=2 format=3 uid="uid://cozypaw_pharmacy"]
[ext_resource type="PackedScene" path="res://scenes/objects/InteractiveObject.tscn" id="1_iobj"]
[node name="Pharmacy" type="Node2D"]
[node name="Background" type="ColorRect" parent="."]
color = Color(0.96, 0.94, 0.82, 1)
size = Vector2(1280, 720)
position = Vector2(0, 0)
[node name="Floor" type="ColorRect" parent="."]
color = Color(0.88, 0.80, 0.68, 1)
size = Vector2(1280, 100)
position = Vector2(0, 620)
[node name="WallLeft" type="ColorRect" parent="."]
color = Color(0.96, 0.94, 0.86, 1)
size = Vector2(40, 620)
position = Vector2(0, 0)
[node name="WallRight" type="ColorRect" parent="."]
color = Color(0.96, 0.94, 0.86, 1)
size = Vector2(40, 620)
position = Vector2(1240, 0)
[node name="MedicineShelf" type="ColorRect" parent="."]
color = Color(0.75, 0.55, 0.30, 1)
size = Vector2(700, 20)
position = Vector2(290, 300)
[node name="MedicineShelfLegLeft" type="ColorRect" parent="."]
color = Color(0.62, 0.44, 0.22, 1)
size = Vector2(16, 320)
position = Vector2(290, 300)
[node name="MedicineShelfLegRight" type="ColorRect" parent="."]
color = Color(0.62, 0.44, 0.22, 1)
size = Vector2(16, 320)
position = Vector2(974, 300)
[node name="MedicineShelf2" type="ColorRect" parent="."]
color = Color(0.75, 0.55, 0.30, 1)
size = Vector2(700, 20)
position = Vector2(290, 460)
[node name="Counter" type="ColorRect" parent="."]
color = Color(0.62, 0.44, 0.22, 1)
size = Vector2(300, 80)
position = Vector2(490, 540)
[node name="CounterTop" type="ColorRect" parent="."]
color = Color(0.78, 0.62, 0.36, 1)
size = Vector2(300, 12)
position = Vector2(490, 528)
[node name="CharacterSpawn" type="Marker2D" parent="."]
position = Vector2(200, 520)
[node name="VitaminBottle" parent="." instance=ExtResource("1_iobj")]
position = Vector2(380, 270)
[node name="BandageRoll" parent="." instance=ExtResource("1_iobj")]
position = Vector2(640, 270)
[node name="SyrupBottle" parent="." instance=ExtResource("1_iobj")]
position = Vector2(900, 270)
[node name="MedicineBox" parent="." instance=ExtResource("1_iobj")]
position = Vector2(640, 430)
```
- [ ] **Step 2: Commit**
```bash
git add scenes/rooms/floor1/Pharmacy.tscn
git commit -m "feat(pharmacy): add Pharmacy room with double medicine shelf and positive medicine objects"
```
---
## Task 4: Lab scene
**Files:**
- Create: `scenes/rooms/floor1/Lab.tscn`
- [ ] **Step 1: Create Lab.tscn**
```
[gd_scene load_steps=2 format=3 uid="uid://cozypaw_lab"]
[ext_resource type="PackedScene" path="res://scenes/objects/InteractiveObject.tscn" id="1_iobj"]
[node name="Lab" type="Node2D"]
[node name="Background" type="ColorRect" parent="."]
color = Color(0.90, 0.94, 0.96, 1)
size = Vector2(1280, 720)
position = Vector2(0, 0)
[node name="Floor" type="ColorRect" parent="."]
color = Color(0.78, 0.82, 0.86, 1)
size = Vector2(1280, 100)
position = Vector2(0, 620)
[node name="WallLeft" type="ColorRect" parent="."]
color = Color(0.88, 0.92, 0.94, 1)
size = Vector2(40, 620)
position = Vector2(0, 0)
[node name="WallRight" type="ColorRect" parent="."]
color = Color(0.88, 0.92, 0.94, 1)
size = Vector2(40, 620)
position = Vector2(1240, 0)
[node name="LabBench" type="ColorRect" parent="."]
color = Color(0.88, 0.88, 0.92, 1)
size = Vector2(800, 40)
position = Vector2(240, 480)
[node name="LabBenchFront" type="ColorRect" parent="."]
color = Color(0.70, 0.72, 0.78, 1)
size = Vector2(800, 16)
position = Vector2(240, 520)
[node name="LabBenchLegLeft" type="ColorRect" parent="."]
color = Color(0.70, 0.72, 0.78, 1)
size = Vector2(16, 140)
position = Vector2(260, 536)
[node name="LabBenchLegRight" type="ColorRect" parent="."]
color = Color(0.70, 0.72, 0.78, 1)
size = Vector2(16, 140)
position = Vector2(1008, 536)
[node name="Sink" type="ColorRect" parent="."]
color = Color(0.75, 0.80, 0.84, 1)
size = Vector2(100, 50)
position = Vector2(1060, 430)
[node name="SinkBase" type="ColorRect" parent="."]
color = Color(0.60, 0.64, 0.68, 1)
size = Vector2(100, 190)
position = Vector2(1060, 480)
[node name="CharacterSpawn" type="Marker2D" parent="."]
position = Vector2(200, 490)
[node name="Microscope" parent="." instance=ExtResource("1_iobj")]
position = Vector2(380, 450)
[node name="TestTubeRack" parent="." instance=ExtResource("1_iobj")]
position = Vector2(600, 450)
[node name="ReagentBottle" parent="." instance=ExtResource("1_iobj")]
position = Vector2(820, 450)
[node name="PetriDish" parent="." instance=ExtResource("1_iobj")]
position = Vector2(490, 450)
```
- [ ] **Step 2: Commit**
```bash
git add scenes/rooms/floor1/Lab.tscn
git commit -m "feat(lab): add Lab room with bench, sink, and interactive lab equipment"
```
---
## Task 5: Patient Room scene
**Files:**
- Create: `scenes/rooms/floor1/PatientRoom.tscn`
Two beds, a TV on the wall (interactive object), and a bedside table. The room has a calm, warm feel.
- [ ] **Step 1: Create PatientRoom.tscn**
```
[gd_scene load_steps=2 format=3 uid="uid://cozypaw_patientroom"]
[ext_resource type="PackedScene" path="res://scenes/objects/InteractiveObject.tscn" id="1_iobj"]
[node name="PatientRoom" type="Node2D"]
[node name="Background" type="ColorRect" parent="."]
color = Color(0.96, 0.94, 0.88, 1)
size = Vector2(1280, 720)
position = Vector2(0, 0)
[node name="Floor" type="ColorRect" parent="."]
color = Color(0.88, 0.82, 0.72, 1)
size = Vector2(1280, 100)
position = Vector2(0, 620)
[node name="WallLeft" type="ColorRect" parent="."]
color = Color(0.94, 0.92, 0.86, 1)
size = Vector2(40, 620)
position = Vector2(0, 0)
[node name="WallRight" type="ColorRect" parent="."]
color = Color(0.94, 0.92, 0.86, 1)
size = Vector2(40, 620)
position = Vector2(1240, 0)
[node name="Bed1Frame" type="ColorRect" parent="."]
color = Color(0.85, 0.85, 0.90, 1)
size = Vector2(260, 50)
position = Vector2(120, 490)
[node name="Bed1Pillow" type="ColorRect" parent="."]
color = Color(0.96, 0.96, 1.0, 1)
size = Vector2(80, 50)
position = Vector2(120, 440)
[node name="Bed1Leg1" type="ColorRect" parent="."]
color = Color(0.70, 0.70, 0.76, 1)
size = Vector2(14, 130)
position = Vector2(136, 540)
[node name="Bed1Leg2" type="ColorRect" parent="."]
color = Color(0.70, 0.70, 0.76, 1)
size = Vector2(14, 130)
position = Vector2(350, 540)
[node name="Bed2Frame" type="ColorRect" parent="."]
color = Color(0.85, 0.85, 0.90, 1)
size = Vector2(260, 50)
position = Vector2(680, 490)
[node name="Bed2Pillow" type="ColorRect" parent="."]
color = Color(0.96, 0.96, 1.0, 1)
size = Vector2(80, 50)
position = Vector2(680, 440)
[node name="Bed2Leg1" type="ColorRect" parent="."]
color = Color(0.70, 0.70, 0.76, 1)
size = Vector2(14, 130)
position = Vector2(696, 540)
[node name="Bed2Leg2" type="ColorRect" parent="."]
color = Color(0.70, 0.70, 0.76, 1)
size = Vector2(14, 130)
position = Vector2(910, 540)
[node name="TVFrame" type="ColorRect" parent="."]
color = Color(0.18, 0.18, 0.20, 1)
size = Vector2(200, 130)
position = Vector2(1000, 200)
[node name="TVScreen" type="ColorRect" parent="."]
color = Color(0.08, 0.10, 0.14, 1)
size = Vector2(184, 114)
position = Vector2(1008, 208)
[node name="CharacterSpawn" type="Marker2D" parent="."]
position = Vector2(480, 490)
[node name="TV" parent="." instance=ExtResource("1_iobj")]
position = Vector2(1100, 265)
[node name="BedsideTable" parent="." instance=ExtResource("1_iobj")]
position = Vector2(500, 540)
```
- [ ] **Step 2: Commit**
```bash
git add scenes/rooms/floor1/PatientRoom.tscn
git commit -m "feat(patientroom): add Patient Room with two beds, TV, and bedside table"
```
---
## Task 6: Update Main.tscn — wire up Floor 1
**Files:**
- Modify: `scenes/main/Main.tscn`
**Changes from current file:**
1. `load_steps` increases from 13 → 17 (add 4 new ext_resources: XRay, Pharmacy, Lab, PatientRoom)
2. Add 4 new ext_resource declarations (ids 1215)
3. In the Floor1 section: **remove** the placeholder `Background`, `FloorLabel`, `FloorRect` nodes
4. **Add** 4 room instances to Floor1 at x offsets 0, 1280, 2560, 3840
5. **Move** ElevatorDown1 from (1200, 540) → (1100, 540) and ElevatorUp1 from (1200, 180) → (1100, 180)
6. **Add** 6 NavigationArrow instances for Floor1 room navigation
**NavigationArrow positions in Floor1 local space:**
| Node | X | Y | target_floor | target_room | label |
|------|---|---|---|---|---|
| NavRight0to1_F1 | 1200 | 480 | 1 | 1 | → |
| NavLeft1to0_F1 | 1340 | 480 | 1 | 0 | ← |
| NavRight1to2_F1 | 2480 | 480 | 1 | 2 | → |
| NavLeft2to1_F1 | 2600 | 480 | 1 | 1 | ← |
| NavRight2to3_F1 | 3760 | 480 | 1 | 3 | → |
| NavLeft3to2_F1 | 3920 | 480 | 1 | 2 | ← |
- [ ] **Step 1: Read current Main.tscn**
Read `F:/Development/_gameDev/Cozypaw-Hospital/scenes/main/Main.tscn` to confirm the current content before replacing.
- [ ] **Step 2: Write the complete new Main.tscn**
```
[gd_scene load_steps=17 format=3 uid="uid://cozypaw_main"]
[ext_resource type="Script" path="res://scripts/main/main.gd" id="1_main"]
[ext_resource type="PackedScene" path="res://scenes/rooms/floor0/Reception.tscn" id="2_reception"]
[ext_resource type="PackedScene" path="res://scenes/characters/Character.tscn" id="3_char"]
[ext_resource type="PackedScene" path="res://scenes/ui/HUD.tscn" id="4_hud"]
[ext_resource type="PackedScene" path="res://scenes/ui/SettingsMenu.tscn" id="5_settings"]
[ext_resource type="PackedScene" path="res://scenes/objects/ElevatorButton.tscn" id="6_elevbtn"]
[ext_resource type="Script" path="res://scripts/characters/character_data.gd" id="7_chardata"]
[ext_resource type="PackedScene" path="res://scenes/rooms/floor0/GiftShop.tscn" id="8_giftshop"]
[ext_resource type="PackedScene" path="res://scenes/rooms/floor0/Restaurant.tscn" id="9_restaurant"]
[ext_resource type="PackedScene" path="res://scenes/rooms/floor0/EmergencyRoom.tscn" id="10_emergency"]
[ext_resource type="PackedScene" path="res://scenes/objects/NavigationArrow.tscn" id="11_navarrow"]
[ext_resource type="PackedScene" path="res://scenes/rooms/floor1/XRay.tscn" id="12_xray"]
[ext_resource type="PackedScene" path="res://scenes/rooms/floor1/Pharmacy.tscn" id="13_pharmacy"]
[ext_resource type="PackedScene" path="res://scenes/rooms/floor1/Lab.tscn" id="14_lab"]
[ext_resource type="PackedScene" path="res://scenes/rooms/floor1/PatientRoom.tscn" id="15_patientroom"]
[sub_resource type="Resource" id="CharacterData_bunny1"]
script = ExtResource("7_chardata")
id = "bunny_01"
display_name = "Bunny"
species = 0
state = 0
current_floor = 0
position = Vector2(0, 0)
[node name="Main" type="Node2D"]
script = ExtResource("1_main")
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2(640, 360)
zoom = Vector2(1, 1)
[node name="Hospital" type="Node2D" parent="."]
[node name="Floor0" type="Node2D" parent="Hospital"]
position = Vector2(0, 0)
[node name="Reception" parent="Hospital/Floor0" instance=ExtResource("2_reception")]
position = Vector2(0, 0)
[node name="GiftShop" parent="Hospital/Floor0" instance=ExtResource("8_giftshop")]
position = Vector2(1280, 0)
[node name="Restaurant" parent="Hospital/Floor0" instance=ExtResource("9_restaurant")]
position = Vector2(2560, 0)
[node name="EmergencyRoom" parent="Hospital/Floor0" instance=ExtResource("10_emergency")]
position = Vector2(3840, 0)
[node name="ElevatorUp0" parent="Hospital/Floor0" instance=ExtResource("6_elevbtn")]
position = Vector2(1100, 160)
target_floor = 1
[node name="NavRight0to1" parent="Hospital/Floor0" instance=ExtResource("11_navarrow")]
position = Vector2(1200, 480)
target_floor = 0
target_room = 1
label_text = "→"
[node name="NavLeft1to0" parent="Hospital/Floor0" instance=ExtResource("11_navarrow")]
position = Vector2(1340, 480)
target_floor = 0
target_room = 0
label_text = "←"
[node name="NavRight1to2" parent="Hospital/Floor0" instance=ExtResource("11_navarrow")]
position = Vector2(2480, 480)
target_floor = 0
target_room = 2
label_text = "→"
[node name="NavLeft2to1" parent="Hospital/Floor0" instance=ExtResource("11_navarrow")]
position = Vector2(2600, 480)
target_floor = 0
target_room = 1
label_text = "←"
[node name="NavRight2to3" parent="Hospital/Floor0" instance=ExtResource("11_navarrow")]
position = Vector2(3760, 480)
target_floor = 0
target_room = 3
label_text = "→"
[node name="NavLeft3to2" parent="Hospital/Floor0" instance=ExtResource("11_navarrow")]
position = Vector2(3920, 480)
target_floor = 0
target_room = 2
label_text = "←"
[node name="Floor1" type="Node2D" parent="Hospital"]
position = Vector2(0, -720)
[node name="XRay" parent="Hospital/Floor1" instance=ExtResource("12_xray")]
position = Vector2(0, 0)
[node name="Pharmacy" parent="Hospital/Floor1" instance=ExtResource("13_pharmacy")]
position = Vector2(1280, 0)
[node name="Lab" parent="Hospital/Floor1" instance=ExtResource("14_lab")]
position = Vector2(2560, 0)
[node name="PatientRoom" parent="Hospital/Floor1" instance=ExtResource("15_patientroom")]
position = Vector2(3840, 0)
[node name="ElevatorDown1" parent="Hospital/Floor1" instance=ExtResource("6_elevbtn")]
position = Vector2(1100, 540)
target_floor = 0
[node name="ElevatorUp1" parent="Hospital/Floor1" instance=ExtResource("6_elevbtn")]
position = Vector2(1100, 180)
target_floor = 2
[node name="NavRight0to1_F1" parent="Hospital/Floor1" instance=ExtResource("11_navarrow")]
position = Vector2(1200, 480)
target_floor = 1
target_room = 1
label_text = "→"
[node name="NavLeft1to0_F1" parent="Hospital/Floor1" instance=ExtResource("11_navarrow")]
position = Vector2(1340, 480)
target_floor = 1
target_room = 0
label_text = "←"
[node name="NavRight1to2_F1" parent="Hospital/Floor1" instance=ExtResource("11_navarrow")]
position = Vector2(2480, 480)
target_floor = 1
target_room = 2
label_text = "→"
[node name="NavLeft2to1_F1" parent="Hospital/Floor1" instance=ExtResource("11_navarrow")]
position = Vector2(2600, 480)
target_floor = 1
target_room = 1
label_text = "←"
[node name="NavRight2to3_F1" parent="Hospital/Floor1" instance=ExtResource("11_navarrow")]
position = Vector2(3760, 480)
target_floor = 1
target_room = 3
label_text = "→"
[node name="NavLeft3to2_F1" parent="Hospital/Floor1" instance=ExtResource("11_navarrow")]
position = Vector2(3920, 480)
target_floor = 1
target_room = 2
label_text = "←"
[node name="Floor2" type="Node2D" parent="Hospital"]
position = Vector2(0, -1440)
[node name="Background" type="ColorRect" parent="Hospital/Floor2"]
color = Color(0.96, 0.88, 0.96, 1)
size = Vector2(1280, 720)
position = Vector2(0, 0)
[node name="FloorLabel" type="Label" parent="Hospital/Floor2"]
offset_left = 560.0
offset_top = 300.0
offset_right = 720.0
offset_bottom = 360.0
text = "2. OG"
theme_override_font_sizes/font_size = 32
[node name="FloorRect" type="ColorRect" parent="Hospital/Floor2"]
color = Color(0.88, 0.80, 0.68, 1)
size = Vector2(1280, 100)
position = Vector2(0, 620)
[node name="ElevatorDown2" parent="Hospital/Floor2" instance=ExtResource("6_elevbtn")]
position = Vector2(1200, 360)
target_floor = 1
[node name="Characters" type="Node2D" parent="."]
[node name="Bunny1" parent="Characters" instance=ExtResource("3_char")]
position = Vector2(300, 400)
data = SubResource("CharacterData_bunny1")
[node name="UI" type="CanvasLayer" parent="."]
[node name="HUD" parent="UI" instance=ExtResource("4_hud")]
[node name="SettingsMenu" parent="UI" instance=ExtResource("5_settings")]
```
- [ ] **Step 3: Commit and push**
```bash
cd "F:/Development/_gameDev/Cozypaw-Hospital"
git add scenes/main/Main.tscn
git commit -m "feat(floor1): wire up all four first-floor rooms with horizontal navigation arrows"
git push origin develop
```
---
## Self-Review: Spec Coverage Check
| Sprint 8-10 requirement | Covered by |
|-------------------------|-----------|
| Röntgen mit Slide-Animation | Task 1+2: XRayMachine with 4-state plate animation |
| Apotheke (alle Medikamente positiv) | Task 3: Pharmacy with VitaminBottle, BandageRoll, SyrupBottle, MedicineBox |
| Labor | Task 4: Lab with Microscope, TestTubeRack, ReagentBottle, PetriDish |
| Patientenzimmer | Task 5: PatientRoom with 2 beds, TV, BedsideTable |
| All rooms accessible via elevator + horizontal nav | Task 6: Full Main.tscn wiring |
**Placeholder scan:** All code blocks complete. No "TBD" or "TODO". ViewerFrame/Viewer nodes referenced in script by node name — both exist in XRayMachine.tscn. ✓
**Type consistency:**
- `XRayMachine._on_plate_in()` used as signal callback: matches `tween.finished.connect(_on_plate_in)`
- `VIEWER_LIT_COLOR` / `VIEWER_DARK_COLOR` used in `_on_plate_in()` and `_start_slide_out()`
- `Plate` node accessed as `Node2D` (not `ColorRect`) — correct, Plate is a Node2D in the scene ✓
- `Viewer` node accessed as `ColorRect` — correct, Viewer is a ColorRect in the scene ✓
---
## Smoke Test Checklist (manual, on device after completion)
- [ ] Elevator from Floor 0 lands at Floor 1 XRay room
- [ ] "→" navigates Floor 1: XRay → Pharmacy → Lab → PatientRoom and back
- [ ] Tapping XRayMachine: plate slides out to the right, viewer lights up blue-white, plate slides back, viewer goes dark
- [ ] Tapping XRayMachine again during animation: nothing happens (state guard)
- [ ] All medicine objects in Pharmacy bounce when tapped (all positive, no harmful items)
- [ ] All lab objects in Lab bounce when tapped
- [ ] TV and BedsideTable in PatientRoom bounce when tapped
- [ ] Elevator Up from Floor 1 navigates to Floor 2 placeholder
- [ ] Elevator Down from Floor 1 lands at Floor 0 Reception (room 0)
- [ ] Bunny character can be dragged to Floor 1 and position is saved