v2.2.0: standardized code for how quest NPCs are spawned
This commit is contained in:
@@ -72,7 +72,13 @@ public class PrisonLevel extends RegularLevel {
|
||||
protected ArrayList<Room> initRooms() {
|
||||
return Wandmaker.Quest.spawnRoom(super.initRooms());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void createMobs() {
|
||||
Wandmaker.Quest.spawnWandmaker(this, roomEntrance);
|
||||
super.createMobs();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int standardRooms(boolean forceMax) {
|
||||
if (forceMax) return 6;
|
||||
|
||||
@@ -115,11 +115,10 @@ public class SewerLevel extends RegularLevel {
|
||||
2, 2,
|
||||
1, 1, 1, 1, 1};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void createItems() {
|
||||
protected void createMobs() {
|
||||
Ghost.Quest.spawn( this, roomExit );
|
||||
|
||||
super.createItems();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,9 @@
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.levels.painters;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Wandmaker;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.EntranceRoom;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -35,13 +33,6 @@ public class PrisonPainter extends RegularPainter {
|
||||
@Override
|
||||
protected void decorate(Level level, ArrayList<Room> rooms) {
|
||||
|
||||
for (Room r : rooms) {
|
||||
if (r instanceof EntranceRoom) {
|
||||
Wandmaker.Quest.spawnWandmaker(level, r);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int w = level.width();
|
||||
int l = level.length();
|
||||
int[] map = level.map;
|
||||
|
||||
Reference in New Issue
Block a user