fix: gestion du verouillage, gratuité des cellules de la grille en mode debogue
This commit is contained in:
parent
942c0a7e7a
commit
f248885260
|
@ -121,7 +121,7 @@ public class Menu extends Actor {
|
||||||
Gdx.app.debug("wirechem-Menu","Coordonnées:" + x + "x" + y + " Menu:" + coords.x
|
Gdx.app.debug("wirechem-Menu","Coordonnées:" + x + "x" + y + " Menu:" + coords.x
|
||||||
+ "," + coords.y + " Ecran :" + coords2.x
|
+ "," + coords.y + " Ecran :" + coords2.x
|
||||||
+ "x" + coords2.y + " type:"
|
+ "x" + coords2.y + " type:"
|
||||||
+ tile.get("type"));
|
+ tile.get("type")+" selection:"+getSelection());
|
||||||
selected.setBounds(coords2.x, coords2.y, 60, 60);
|
selected.setBounds(coords2.x, coords2.y, 60, 60);
|
||||||
onchanged();
|
onchanged();
|
||||||
}
|
}
|
||||||
|
@ -230,6 +230,11 @@ public class Menu extends Actor {
|
||||||
|
|
||||||
public void update() {
|
public void update() {
|
||||||
clearall();
|
clearall();
|
||||||
|
if (worlds.isDebug())
|
||||||
|
{
|
||||||
|
this.setMenuTile(0, 4, 87, "gold_pen",0);
|
||||||
|
this.setMenuTile(1, 4, 88, "lock_pen",0);
|
||||||
|
}
|
||||||
if (worlds.getInformations().Cout>=0 || worlds.isDebug())
|
if (worlds.getInformations().Cout>=0 || worlds.isDebug())
|
||||||
{
|
{
|
||||||
this.setMenuTile(0, 7, 71, "copper_pen",0);
|
this.setMenuTile(0, 7, 71, "copper_pen",0);
|
||||||
|
|
|
@ -26,6 +26,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ActorGestureListener;
|
||||||
|
|
||||||
import fr.evolving.assets.AssetLoader;
|
import fr.evolving.assets.AssetLoader;
|
||||||
import fr.evolving.automata.Level;
|
import fr.evolving.automata.Level;
|
||||||
|
import fr.evolving.automata.Worlds;
|
||||||
import fr.evolving.screens.GameScreen.calling;
|
import fr.evolving.screens.GameScreen.calling;
|
||||||
|
|
||||||
public class TouchMaptiles extends Actor implements GestureListener,InputProcessor {
|
public class TouchMaptiles extends Actor implements GestureListener,InputProcessor {
|
||||||
|
@ -40,8 +41,10 @@ public class TouchMaptiles extends Actor implements GestureListener,InputProcess
|
||||||
private String selected;
|
private String selected;
|
||||||
private boolean mapexit;
|
private boolean mapexit;
|
||||||
private int clearsprite;
|
private int clearsprite;
|
||||||
|
private Worlds worlds;
|
||||||
|
|
||||||
public TouchMaptiles(Level level, int sizex, int sizey) {
|
public TouchMaptiles(Worlds worlds,Level level, int sizex, int sizey) {
|
||||||
|
this.worlds=worlds;
|
||||||
this.level = level;
|
this.level = level;
|
||||||
this.sizex = sizex;
|
this.sizex = sizex;
|
||||||
this.sizey = sizey;
|
this.sizey = sizey;
|
||||||
|
@ -60,7 +63,7 @@ public class TouchMaptiles extends Actor implements GestureListener,InputProcess
|
||||||
for(int i=0;i<max;i++)
|
for(int i=0;i<max;i++)
|
||||||
if (layers.get(0)!=null)
|
if (layers.get(0)!=null)
|
||||||
layers.remove(0);
|
layers.remove(0);
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 7; i++) {
|
||||||
TiledMapTileLayer layer = new TiledMapTileLayer(level.Grid.sizeX, level.Grid.sizeY, sizex, sizey);
|
TiledMapTileLayer layer = new TiledMapTileLayer(level.Grid.sizeX, level.Grid.sizeY, sizex, sizey);
|
||||||
for (int x = 0; x < layer.getWidth(); x++) {
|
for (int x = 0; x < layer.getWidth(); x++) {
|
||||||
for (int y = 0; y < layer.getHeight(); y++) {
|
for (int y = 0; y < layer.getHeight(); y++) {
|
||||||
|
@ -162,50 +165,37 @@ public class TouchMaptiles extends Actor implements GestureListener,InputProcess
|
||||||
public void redraw() {
|
public void redraw() {
|
||||||
for (int x = 0; x < level.Grid.sizeX; x++)
|
for (int x = 0; x < level.Grid.sizeX; x++)
|
||||||
for (int y = 0; y < level.Grid.sizeY; y++) {
|
for (int y = 0; y < level.Grid.sizeY; y++) {
|
||||||
((TiledMapTileLayer) map.getLayers().get(2)).getCell((int) x,(int) y).setTile(null);
|
if (worlds.isDebug()) {
|
||||||
((TiledMapTileLayer) map.getLayers().get(1)).getCell((int) x,(int) y).setTile(null);
|
if (level.Grid.GetXY(x,y).Locked)
|
||||||
((TiledMapTileLayer) map.getLayers().get(0)).getCell((int) x,(int) y).setTile(AssetLoader.tileSet.getTile(this.clearsprite));
|
((TiledMapTileLayer) map.getLayers().get(5)).getCell((int) x,(int) y).setTile(AssetLoader.tileSet.getTile(90));
|
||||||
|
else
|
||||||
|
((TiledMapTileLayer) map.getLayers().get(5)).getCell((int) x,(int) y).setTile(null);
|
||||||
|
if (level.Grid.GetXY(x,y).Free)
|
||||||
|
((TiledMapTileLayer) map.getLayers().get(6)).getCell((int) x,(int) y).setTile(AssetLoader.tileSet.getTile(89));
|
||||||
|
else
|
||||||
|
((TiledMapTileLayer) map.getLayers().get(6)).getCell((int) x,(int) y).setTile(null);
|
||||||
}
|
}
|
||||||
for (int x = 0; x < level.Grid.sizeX; x++)
|
|
||||||
for (int y = 0; y < level.Grid.sizeY; y++) {
|
|
||||||
if (level.Grid.getCopper(x, y))
|
if (level.Grid.getCopper(x, y))
|
||||||
((TiledMapTileLayer) map.getLayers().get(1)).getCell(
|
((TiledMapTileLayer) map.getLayers().get(1)).getCell((int) x, (int) y).setTile(AssetLoader.tileSet.getTile(level.Grid.getCoppercalc(x, y)));
|
||||||
(int) x, (int) y).setTile(
|
else
|
||||||
AssetLoader.tileSet.getTile(level.Grid
|
((TiledMapTileLayer) map.getLayers().get(1)).getCell((int) x,(int) y).setTile(null);
|
||||||
.getCoppercalc(x, y)));
|
|
||||||
if (level.Grid.getFiber(x, y))
|
if (level.Grid.getFiber(x, y))
|
||||||
((TiledMapTileLayer) map.getLayers().get(0)).getCell(
|
((TiledMapTileLayer) map.getLayers().get(0)).getCell((int) x, (int) y).setTile(AssetLoader.tileSet.getTile(61));
|
||||||
(int) x, (int) y).setTile(
|
else
|
||||||
AssetLoader.tileSet.getTile(61));
|
((TiledMapTileLayer) map.getLayers().get(0)).getCell((int) x,(int) y).setTile(AssetLoader.tileSet.getTile(this.clearsprite));
|
||||||
if (level.Grid.getTransmutercalc(x, y) != 0) {
|
if (level.Grid.getTransmutercalc(x, y) != 0) {
|
||||||
((TiledMapTileLayer) map.getLayers().get(2)).getCell(
|
((TiledMapTileLayer) map.getLayers().get(2)).getCell((int) x, (int) y).setTile(AssetLoader.tileSet.getTile(level.Grid.getTransmutercalc(x, y)));
|
||||||
(int) x, (int) y).setTile(
|
((TiledMapTileLayer) map.getLayers().get(2)).getCell((int) x, (int) y).setRotation(level.Grid.getTransmuterrot(x, y));
|
||||||
AssetLoader.tileSet.getTile(level.Grid
|
((TiledMapTileLayer) map.getLayers().get(2)).getCell((int) x, (int) y).getTile().getProperties().put("movex",level.Grid.GetXY(x, y).Transmuter_movex);
|
||||||
.getTransmutercalc(x, y)));
|
((TiledMapTileLayer) map.getLayers().get(2)).getCell((int) x, (int) y).getTile().getProperties().put("movey",level.Grid.GetXY(x, y).Transmuter_movex);
|
||||||
((TiledMapTileLayer) map.getLayers().get(2)).getCell(
|
|
||||||
(int) x, (int) y).setRotation(
|
|
||||||
level.Grid.getTransmuterrot(x, y));
|
|
||||||
((TiledMapTileLayer) map.getLayers().get(2))
|
|
||||||
.getCell((int) x, (int) y)
|
|
||||||
.getTile()
|
|
||||||
.getProperties()
|
|
||||||
.put("movex",
|
|
||||||
level.Grid.GetXY(x, y).Transmuter_movex);
|
|
||||||
((TiledMapTileLayer) map.getLayers().get(2))
|
|
||||||
.getCell((int) x, (int) y)
|
|
||||||
.getTile()
|
|
||||||
.getProperties()
|
|
||||||
.put("movey",
|
|
||||||
level.Grid.GetXY(x, y).Transmuter_movex);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
((TiledMapTileLayer) map.getLayers().get(2)).getCell((int) x,(int) y).setTile(null);
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
((TiledMapTileLayer) map.getLayers().get(0)).getCell((int) 0, (int) 0)
|
((TiledMapTileLayer) map.getLayers().get(0)).getCell((int) 0, (int) 0).setTile(AssetLoader.tileSet.getTile(1010));
|
||||||
.setTile(AssetLoader.tileSet.getTile(1010));
|
((TiledMapTileLayer) map.getLayers().get(0)).getCell((int) 1, (int) 0).setTile(AssetLoader.tileSet.getTile(1010));
|
||||||
((TiledMapTileLayer) map.getLayers().get(0)).getCell((int) 1, (int) 0)
|
((TiledMapTileLayer) map.getLayers().get(0)).getCell((int) 2, (int) 0).setTile(AssetLoader.tileSet.getTile(1010));
|
||||||
.setTile(AssetLoader.tileSet.getTile(1010));
|
|
||||||
((TiledMapTileLayer) map.getLayers().get(0)).getCell((int) 2, (int) 0)
|
|
||||||
.setTile(AssetLoader.tileSet.getTile(1010));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initzoom() {
|
public void initzoom() {
|
||||||
|
@ -274,7 +264,7 @@ public class TouchMaptiles extends Actor implements GestureListener,InputProcess
|
||||||
@Override
|
@Override
|
||||||
public boolean touchDown(float x, float y, int pointer, int button) {
|
public boolean touchDown(float x, float y, int pointer, int button) {
|
||||||
String[] exec = { "cleaner", "infos", "zoomp", "zoomm",
|
String[] exec = { "cleaner", "infos", "zoomp", "zoomm",
|
||||||
"copper_pen", "fiber_pen", "copper_eraser",
|
"copper_pen", "fiber_pen", "gold_pen","lock_pen","copper_eraser",
|
||||||
"fiber_eraser", "transmuter_eraser", "all_eraser",
|
"fiber_eraser", "transmuter_eraser", "all_eraser",
|
||||||
"blank", "transmuter", "copper_brush", "fiber_brush" };
|
"blank", "transmuter", "copper_brush", "fiber_brush" };
|
||||||
return event_coordination(x, y, button, calling.mouseclick,
|
return event_coordination(x, y, button, calling.mouseclick,
|
||||||
|
|
|
@ -6,6 +6,8 @@ public class Cell implements Serializable,Cloneable {
|
||||||
public int Fiber;
|
public int Fiber;
|
||||||
public boolean Copper;
|
public boolean Copper;
|
||||||
public Transmuter Transmuter;
|
public Transmuter Transmuter;
|
||||||
|
public boolean Locked;
|
||||||
|
public boolean Free;
|
||||||
|
|
||||||
public transient int Copper_calc;
|
public transient int Copper_calc;
|
||||||
public transient int Fiber_old;
|
public transient int Fiber_old;
|
||||||
|
@ -16,6 +18,8 @@ public class Cell implements Serializable,Cloneable {
|
||||||
public Cell() {
|
public Cell() {
|
||||||
this.Fiber = 0;
|
this.Fiber = 0;
|
||||||
this.Copper = false;
|
this.Copper = false;
|
||||||
|
this.Locked = false;
|
||||||
|
this.Free = false;
|
||||||
this.Fiber_old = 0;
|
this.Fiber_old = 0;
|
||||||
this.Transmuter = null;
|
this.Transmuter = null;
|
||||||
this.Transmuter_calc = 0;
|
this.Transmuter_calc = 0;
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class Grid implements Serializable,Cloneable {
|
||||||
for (int y = 0; y < this.sizeY; y++)
|
for (int y = 0; y < this.sizeY; y++)
|
||||||
{
|
{
|
||||||
GetXY(x, y).Transmuter_calc = 0;
|
GetXY(x, y).Transmuter_calc = 0;
|
||||||
if (GetXY(x, y).Transmuter!=null)
|
if (GetXY(x, y).Transmuter!=null && !GetXY(x, y).Free)
|
||||||
result+=GetXY(x, y).Transmuter.getPrice();
|
result+=GetXY(x, y).Transmuter.getPrice();
|
||||||
}
|
}
|
||||||
for (int x = 0; x < this.sizeX; x++)
|
for (int x = 0; x < this.sizeX; x++)
|
||||||
|
@ -59,12 +59,15 @@ public class Grid implements Serializable,Cloneable {
|
||||||
int result=0;
|
int result=0;
|
||||||
for (int x = 0; x < this.sizeX; x++)
|
for (int x = 0; x < this.sizeX; x++)
|
||||||
for (int y = 0; y < this.sizeY; y++) {
|
for (int y = 0; y < this.sizeY; y++) {
|
||||||
if (getFiber(x,y))
|
if (getFiber(x,y) && !GetXY(x, y).Free)
|
||||||
result+=5;
|
result+=5;
|
||||||
if (getCopper(x, y)) {
|
if (getCopper(x, y)) {
|
||||||
|
if (!GetXY(x, y).Free)
|
||||||
|
{
|
||||||
result++;
|
result++;
|
||||||
if (getFiber(x,y))
|
if (getFiber(x,y))
|
||||||
result+=45;
|
result+=45;
|
||||||
|
}
|
||||||
int value = 0;
|
int value = 0;
|
||||||
if (getCopper(x, y + 1))
|
if (getCopper(x, y + 1))
|
||||||
value++;
|
value++;
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class Negativer extends Transmuter {
|
||||||
this.Name = AssetLoader.language.get("[negativer-name]");
|
this.Name = AssetLoader.language.get("[negativer-name]");
|
||||||
this.Desc = AssetLoader.language.get("[negativer-desc]");
|
this.Desc = AssetLoader.language.get("[negativer-desc]");
|
||||||
this.theClass = Class.Scenario;
|
this.theClass = Class.Scenario;
|
||||||
this.Price = 0;
|
this.Price = 20;
|
||||||
this.Technology = 0;
|
this.Technology = 0;
|
||||||
this.Research = 0;
|
this.Research = 0;
|
||||||
this.Upgrade = null;
|
this.Upgrade = null;
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class Positiver extends Transmuter {
|
||||||
this.Name = AssetLoader.language.get("[positiver-name]");
|
this.Name = AssetLoader.language.get("[positiver-name]");
|
||||||
this.Desc = AssetLoader.language.get("[positiver-desc]");
|
this.Desc = AssetLoader.language.get("[positiver-desc]");
|
||||||
this.theClass = Class.Scenario;
|
this.theClass = Class.Scenario;
|
||||||
this.Price = 0;
|
this.Price = 20;
|
||||||
this.Technology = 0;
|
this.Technology = 0;
|
||||||
this.Research = 0;
|
this.Research = 0;
|
||||||
this.Upgrade = null;
|
this.Upgrade = null;
|
||||||
|
|
|
@ -325,7 +325,7 @@ public class GameScreen implements Screen {
|
||||||
});
|
});
|
||||||
dialog = new WarnDialog(AssetLoader.Skin_ui);
|
dialog = new WarnDialog(AssetLoader.Skin_ui);
|
||||||
Gdx.app.debug("wirechem-GameScreen", "Création d'une tilemap");
|
Gdx.app.debug("wirechem-GameScreen", "Création d'une tilemap");
|
||||||
map = new TouchMaptiles(level, 128, 128);
|
map = new TouchMaptiles(worlds,level, 128, 128);
|
||||||
if (Preference.prefs.getBoolean("Grid"))
|
if (Preference.prefs.getBoolean("Grid"))
|
||||||
map.setClearsprite(60);
|
map.setClearsprite(60);
|
||||||
else
|
else
|
||||||
|
@ -518,10 +518,13 @@ public class GameScreen implements Screen {
|
||||||
int button, calling call) {
|
int button, calling call) {
|
||||||
for (x = 0; x < level.Grid.sizeX; x++)
|
for (x = 0; x < level.Grid.sizeX; x++)
|
||||||
for (y = 0; y < level.Grid.sizeY; y++)
|
for (y = 0; y < level.Grid.sizeY; y++)
|
||||||
|
if (!level.Grid.GetXY(x, y).Locked)
|
||||||
map_transmuter_eraser(0, 0, x, y, false, button, call);
|
map_transmuter_eraser(0, 0, x, y, false, button, call);
|
||||||
level.Cout_transmuter=level.Grid.tiling_transmuter();
|
level.Cout_transmuter=level.Grid.tiling_transmuter();
|
||||||
for (x = 0; x < level.Grid.sizeX; x++)
|
for (x = 0; x < level.Grid.sizeX; x++)
|
||||||
for (y = 0; y < level.Grid.sizeY; y++) {
|
for (y = 0; y < level.Grid.sizeY; y++)
|
||||||
|
if (!level.Grid.GetXY(x, y).Locked)
|
||||||
|
{
|
||||||
map_fiber_eraser(0, 0, x, y, false, button, call);
|
map_fiber_eraser(0, 0, x, y, false, button, call);
|
||||||
map_copper_eraser(0, 0, x, y, false, button, call);
|
map_copper_eraser(0, 0, x, y, false, button, call);
|
||||||
}
|
}
|
||||||
|
@ -538,7 +541,7 @@ public class GameScreen implements Screen {
|
||||||
|
|
||||||
public void map_transmuter_eraser(float realx, float realy, int x, int y,
|
public void map_transmuter_eraser(float realx, float realy, int x, int y,
|
||||||
boolean alone, int button, calling call) {
|
boolean alone, int button, calling call) {
|
||||||
if (level.Grid.GetXY(x, y).Transmuter_calc != 0) {
|
if (level.Grid.GetXY(x, y).Transmuter_calc != 0 && !level.Grid.GetXY(x, y).Locked) {
|
||||||
level.Grid.GetXY(x + level.Grid.GetXY(x, y).Transmuter_movex, y
|
level.Grid.GetXY(x + level.Grid.GetXY(x, y).Transmuter_movex, y
|
||||||
+ level.Grid.GetXY(x, y).Transmuter_movey).Transmuter = null;
|
+ level.Grid.GetXY(x, y).Transmuter_movey).Transmuter = null;
|
||||||
Gdx.app.debug("wirechem-GameScreen", "transmuter deplacement vers origine:"
|
Gdx.app.debug("wirechem-GameScreen", "transmuter deplacement vers origine:"
|
||||||
|
@ -555,7 +558,7 @@ public class GameScreen implements Screen {
|
||||||
|
|
||||||
public void map_fiber_eraser(float realx, float realy, int x, int y,
|
public void map_fiber_eraser(float realx, float realy, int x, int y,
|
||||||
boolean alone, int button, calling call) {
|
boolean alone, int button, calling call) {
|
||||||
if (level.Grid.GetXY(x, y).Transmuter_calc == 0) {
|
if (level.Grid.GetXY(x, y).Transmuter_calc == 0 && !level.Grid.GetXY(x, y).Locked) {
|
||||||
level.Grid.GetXY(x, y).Fiber = 0;
|
level.Grid.GetXY(x, y).Fiber = 0;
|
||||||
if (alone) {
|
if (alone) {
|
||||||
level.Cout_copperfiber=level.Grid.tiling_copper();
|
level.Cout_copperfiber=level.Grid.tiling_copper();
|
||||||
|
@ -568,7 +571,7 @@ public class GameScreen implements Screen {
|
||||||
int button, calling call) {
|
int button, calling call) {
|
||||||
if (!worlds.isDebug() && level.Cout<5)
|
if (!worlds.isDebug() && level.Cout<5)
|
||||||
return;
|
return;
|
||||||
if (level.Grid.GetXY(x, y).Transmuter_calc == 0)
|
if (level.Grid.GetXY(x, y).Transmuter_calc == 0 && !level.Grid.GetXY(x, y).Locked)
|
||||||
level.Grid.GetXY(x, y).Fiber = -1 * level.Grid.GetXY(x, y).Fiber
|
level.Grid.GetXY(x, y).Fiber = -1 * level.Grid.GetXY(x, y).Fiber
|
||||||
+ 1;
|
+ 1;
|
||||||
if (alone) {
|
if (alone) {
|
||||||
|
@ -581,7 +584,7 @@ public class GameScreen implements Screen {
|
||||||
int button, calling call) {
|
int button, calling call) {
|
||||||
if (!worlds.isDebug() && level.Cout<5)
|
if (!worlds.isDebug() && level.Cout<5)
|
||||||
return;
|
return;
|
||||||
if (level.Grid.GetXY(x, y).Transmuter_calc == 0)
|
if (level.Grid.GetXY(x, y).Transmuter_calc == 0 && !level.Grid.GetXY(x, y).Locked)
|
||||||
level.Grid.GetXY(x, y).Fiber = 1;
|
level.Grid.GetXY(x, y).Fiber = 1;
|
||||||
if (alone) {
|
if (alone) {
|
||||||
level.Cout_copperfiber=level.Grid.tiling_copper();
|
level.Cout_copperfiber=level.Grid.tiling_copper();
|
||||||
|
@ -591,7 +594,7 @@ public class GameScreen implements Screen {
|
||||||
|
|
||||||
public void map_copper_eraser(float realx, float realy, int x, int y,
|
public void map_copper_eraser(float realx, float realy, int x, int y,
|
||||||
boolean alone, int button, calling call) {
|
boolean alone, int button, calling call) {
|
||||||
if (level.Grid.GetXY(x, y).Transmuter_calc == 0) {
|
if (level.Grid.GetXY(x, y).Transmuter_calc == 0 && !level.Grid.GetXY(x, y).Locked) {
|
||||||
level.Grid.GetXY(x, y).Copper = false;
|
level.Grid.GetXY(x, y).Copper = false;
|
||||||
if (alone) {
|
if (alone) {
|
||||||
level.Cout_copperfiber=level.Grid.tiling_copper();
|
level.Cout_copperfiber=level.Grid.tiling_copper();
|
||||||
|
@ -604,7 +607,7 @@ public class GameScreen implements Screen {
|
||||||
int button, calling call) {
|
int button, calling call) {
|
||||||
if (!worlds.isDebug() && level.Cout<1)
|
if (!worlds.isDebug() && level.Cout<1)
|
||||||
return;
|
return;
|
||||||
if (level.Grid.GetXY(x, y).Transmuter_calc == 0)
|
if (level.Grid.GetXY(x, y).Transmuter_calc == 0 && !level.Grid.GetXY(x, y).Locked)
|
||||||
level.Grid.GetXY(x, y).Copper = !level.Grid.GetXY(x, y).Copper;
|
level.Grid.GetXY(x, y).Copper = !level.Grid.GetXY(x, y).Copper;
|
||||||
if (alone) {
|
if (alone) {
|
||||||
level.Cout_copperfiber=level.Grid.tiling_copper();
|
level.Cout_copperfiber=level.Grid.tiling_copper();
|
||||||
|
@ -612,10 +615,24 @@ public class GameScreen implements Screen {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void map_gold_pen(float realx, float realy, int x, int y, boolean alone,
|
||||||
|
int button, calling call) {
|
||||||
|
level.Grid.GetXY(x, y).Free=!level.Grid.GetXY(x, y).Free;
|
||||||
|
level.Cout_copperfiber=level.Grid.tiling_copper();
|
||||||
|
level.Cout_transmuter=level.Grid.tiling_transmuter();
|
||||||
|
map.redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void map_lock_pen(float realx, float realy, int x, int y, boolean alone,
|
||||||
|
int button, calling call) {
|
||||||
|
level.Grid.GetXY(x, y).Locked=!level.Grid.GetXY(x, y).Locked;
|
||||||
|
map.redraw();
|
||||||
|
}
|
||||||
|
|
||||||
public void map_copper_brush(float realx, float realy, int x, int y,boolean alone, int button, calling call) {
|
public void map_copper_brush(float realx, float realy, int x, int y,boolean alone, int button, calling call) {
|
||||||
if (!worlds.isDebug() && level.Cout<1)
|
if (!worlds.isDebug() && level.Cout<1)
|
||||||
return;
|
return;
|
||||||
if (level.Grid.GetXY(x, y).Transmuter_calc == 0)
|
if (level.Grid.GetXY(x, y).Transmuter_calc == 0 && !level.Grid.GetXY(x, y).Locked)
|
||||||
level.Grid.GetXY(x, y).Copper = true;
|
level.Grid.GetXY(x, y).Copper = true;
|
||||||
if (alone) {
|
if (alone) {
|
||||||
level.Cout_copperfiber=level.Grid.tiling_copper();
|
level.Cout_copperfiber=level.Grid.tiling_copper();
|
||||||
|
|
Loading…
Reference in New Issue