v0.3.1a: floors now remember their entrance and exit rooms.
This commit is contained in:
parent
7b3c7aa46d
commit
b2494fe76e
|
@ -738,12 +738,17 @@ public abstract class RegularLevel extends Level {
|
|||
public void restoreFromBundle( Bundle bundle ) {
|
||||
super.restoreFromBundle( bundle );
|
||||
|
||||
rooms = new HashSet<Room>( (Collection<Room>) ((Collection<?>) bundle.getCollection( "rooms" )) );
|
||||
rooms = new HashSet<>( (Collection<Room>) ((Collection<?>) bundle.getCollection( "rooms" )) );
|
||||
for (Room r : rooms) {
|
||||
if (r.type == Type.WEAK_FLOOR) {
|
||||
weakFloorCreated = true;
|
||||
break;
|
||||
}
|
||||
if (r.type == Type.ENTRANCE){
|
||||
roomEntrance = r;
|
||||
} else if (r.type == Type.EXIT || r.type == Type.BOSS_EXIT){
|
||||
roomExit = r;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -281,6 +281,7 @@ public class SewerBossLevel extends RegularLevel {
|
|||
public void restoreFromBundle( Bundle bundle ) {
|
||||
super.restoreFromBundle( bundle );
|
||||
stairs = bundle.getInt( STAIRS );
|
||||
roomExit = roomEntrance;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user