Added a class to map object ids so they can be called by name

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-14 16:00:37 +01:00
parent dfc6a94e88
commit 690ac1e7e6
4 changed files with 128 additions and 31 deletions

View File

@@ -1,6 +1,7 @@
import 'dart:math' as math;
import 'package:wolf_dart/classes/matrix.dart';
import 'package:wolf_dart/features/entities/map_objects.dart';
class Pushwall {
int x;
@@ -24,8 +25,7 @@ class PushwallManager {
for (int y = 0; y < objectGrid.length; y++) {
for (int x = 0; x < objectGrid[y].length; x++) {
// Map ID 98 in the object grid marks a pushwall!
if (objectGrid[y][x] == 98) {
if (objectGrid[y][x] == MapObjectId.secretDoor) {
pushwalls['$x,$y'] = Pushwall(x, y, wallGrid[y][x]);
}
}