Can now open secret walls and pick up machine gun

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-14 15:34:27 +01:00
parent 9f5f29100b
commit 001c7c3131
13 changed files with 545 additions and 120 deletions

View File

@@ -46,9 +46,20 @@ class DoorManager {
return offsets;
}
void tryOpenDoor(int x, int y) {
String key = '$x,$y';
if (doors.containsKey(key)) {
// If it's closed or closing, interact() will usually start it opening
if (doors[key]!.offset == 0.0) {
doors[key]!.interact();
}
}
}
bool isDoorOpenEnough(int x, int y) {
String key = '$x,$y';
if (doors.containsKey(key)) {
// 0.7 offset means 70% open, similar to the original engine's check
return doors[key]!.offset > 0.7;
}
return false; // Not a door we manage