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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user