36 lines
880 B
Dart
36 lines
880 B
Dart
part of 'generator.dart';
|
|
|
|
VaultTile mergeVaultTile(VaultTile bottom, VaultTile top) {
|
|
if (bottom == VaultTile.wall && top == VaultTile.archpronewall) {
|
|
return VaultTile.wall;
|
|
}
|
|
if (bottom == VaultTile.wall && top == VaultTile.archwall) {
|
|
return VaultTile.wall;
|
|
}
|
|
if (bottom == VaultTile.archwall && top == VaultTile.archpronewall) {
|
|
return VaultTile.archwall;
|
|
}
|
|
return top;
|
|
}
|
|
|
|
LevelTile flattenVaultTile(VaultTile vt) {
|
|
switch (vt) {
|
|
case VaultTile.meta0:
|
|
case VaultTile.defaultwall:
|
|
case VaultTile.archpronewall:
|
|
case VaultTile.archwall:
|
|
case VaultTile.wall:
|
|
return LevelTile.wall;
|
|
|
|
case VaultTile.exit:
|
|
return LevelTile.exit;
|
|
case VaultTile.door:
|
|
return LevelTile.closedDoor;
|
|
|
|
case VaultTile.doorpronefloor:
|
|
case VaultTile.bspfloor:
|
|
case VaultTile.floor:
|
|
return LevelTile.floor;
|
|
}
|
|
}
|