v0.3.1a: floors now remember their entrance and exit rooms.
This commit is contained in:
@@ -738,12 +738,17 @@ public abstract class RegularLevel extends Level {
|
|||||||
public void restoreFromBundle( Bundle bundle ) {
|
public void restoreFromBundle( Bundle bundle ) {
|
||||||
super.restoreFromBundle( 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) {
|
for (Room r : rooms) {
|
||||||
if (r.type == Type.WEAK_FLOOR) {
|
if (r.type == Type.WEAK_FLOOR) {
|
||||||
weakFloorCreated = true;
|
weakFloorCreated = true;
|
||||||
break;
|
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 ) {
|
public void restoreFromBundle( Bundle bundle ) {
|
||||||
super.restoreFromBundle( bundle );
|
super.restoreFromBundle( bundle );
|
||||||
stairs = bundle.getInt( STAIRS );
|
stairs = bundle.getInt( STAIRS );
|
||||||
|
roomExit = roomEntrance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user