v0.6.1: removed signposts from most parts of the codebase
This commit is contained in:
committed by
Evan Debenham
parent
fb5e8bc3bd
commit
49b81e0b86
@@ -94,7 +94,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.features.AlchemyPot;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.features.AlchemyPot;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Sign;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Earthroot;
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Earthroot;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Sungrass;
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Sungrass;
|
||||||
@@ -586,15 +585,10 @@ public class Hero extends Char {
|
|||||||
private boolean actMove( HeroAction.Move action ) {
|
private boolean actMove( HeroAction.Move action ) {
|
||||||
|
|
||||||
if (getCloser( action.dst )) {
|
if (getCloser( action.dst )) {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (Dungeon.level.map[pos] == Terrain.SIGN) {
|
|
||||||
Sign.read(pos);
|
|
||||||
}
|
|
||||||
ready();
|
ready();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -323,6 +323,11 @@ public abstract class Level implements Bundlable {
|
|||||||
map = Terrain.convertTilesFrom129( map );
|
map = Terrain.convertTilesFrom129( map );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// pre-0.6.1 saves
|
||||||
|
if (version <= ShatteredPixelDungeon.v0_6_0b){
|
||||||
|
map = Terrain.convertTilesFrom0_6_0b( map );
|
||||||
|
}
|
||||||
|
|
||||||
Collection<Bundlable> collection = bundle.getCollection( HEAPS );
|
Collection<Bundlable> collection = bundle.getCollection( HEAPS );
|
||||||
for (Bundlable h : collection) {
|
for (Bundlable h : collection) {
|
||||||
Heap heap = (Heap)h;
|
Heap heap = (Heap)h;
|
||||||
|
|||||||
@@ -135,4 +135,14 @@ public class Terrain {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//removes signs, places floors instead
|
||||||
|
public static int[] convertTilesFrom0_6_0b(int[] map){
|
||||||
|
for (int i = 0; i < map.length; i++){
|
||||||
|
if (map[i] == 23){
|
||||||
|
map[i] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* Pixel Dungeon
|
|
||||||
* Copyright (C) 2012-2015 Oleg Dolya
|
|
||||||
*
|
|
||||||
* Shattered Pixel Dungeon
|
|
||||||
* Copyright (C) 2014-2017 Evan Debenham
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.levels.features;
|
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.DeadEndLevel;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndMessage;
|
|
||||||
import com.watabou.noosa.audio.Sample;
|
|
||||||
|
|
||||||
public class Sign {
|
|
||||||
|
|
||||||
public static void read( int pos ) {
|
|
||||||
|
|
||||||
if (Dungeon.level instanceof DeadEndLevel) {
|
|
||||||
|
|
||||||
GameScene.show( new WndMessage( Messages.get(Sign.class, "dead_end") ) );
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if (Dungeon.depth <= 21) {
|
|
||||||
GameScene.show( new WndMessage( Messages.get(Sign.class, "tip_"+Dungeon.depth) ) );
|
|
||||||
} else {
|
|
||||||
|
|
||||||
Dungeon.level.destroy( pos );
|
|
||||||
GameScene.updateMap( pos );
|
|
||||||
GameScene.discoverTile( pos, Terrain.SIGN );
|
|
||||||
|
|
||||||
GLog.w( Messages.get(Sign.class, "burn") );
|
|
||||||
|
|
||||||
CellEmitter.get( pos ).burst( ElmoParticle.FACTORY, 6 );
|
|
||||||
Sample.INSTANCE.play( Assets.SND_BURNING );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user