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() {
|
protected ArrayList<Room> initRooms() {
|
||||||
return Wandmaker.Quest.spawnRoom(super.initRooms());
|
return Wandmaker.Quest.spawnRoom(super.initRooms());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void createMobs() {
|
||||||
|
Wandmaker.Quest.spawnWandmaker(this, roomEntrance);
|
||||||
|
super.createMobs();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int standardRooms(boolean forceMax) {
|
protected int standardRooms(boolean forceMax) {
|
||||||
if (forceMax) return 6;
|
if (forceMax) return 6;
|
||||||
|
|||||||
@@ -115,11 +115,10 @@ public class SewerLevel extends RegularLevel {
|
|||||||
2, 2,
|
2, 2,
|
||||||
1, 1, 1, 1, 1};
|
1, 1, 1, 1, 1};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createItems() {
|
protected void createMobs() {
|
||||||
Ghost.Quest.spawn( this, roomExit );
|
Ghost.Quest.spawn( this, roomExit );
|
||||||
|
|
||||||
super.createItems();
|
super.createItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-9
@@ -21,11 +21,9 @@
|
|||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.levels.painters;
|
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.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.EntranceRoom;
|
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -35,13 +33,6 @@ public class PrisonPainter extends RegularPainter {
|
|||||||
@Override
|
@Override
|
||||||
protected void decorate(Level level, ArrayList<Room> rooms) {
|
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 w = level.width();
|
||||||
int l = level.length();
|
int l = level.length();
|
||||||
int[] map = level.map;
|
int[] map = level.map;
|
||||||
|
|||||||
Reference in New Issue
Block a user