feat: ajout de l'affichage des transmuters

This commit is contained in:
Nicolas Hordé 2015-08-05 12:03:53 +02:00
parent ee17dfd5d5
commit 7a3e33dd6b
9 changed files with 224 additions and 49 deletions

View File

@ -13,6 +13,7 @@ import com.badlogic.gdx.scenes.scene2d.Actor;
import fr.evolving.assets.AssetLoader;
import fr.evolving.automata.Level;
import fr.evolving.automata.Transmuter;
public class TouchMaptiles extends Actor{
@ -71,6 +72,12 @@ public void redraw(int tile) {
((TiledMapTileLayer)map.getLayers().get(0)).getCell((int)x, (int)y).setTile(AssetLoader.tileSet.getTile(61));
else
((TiledMapTileLayer)map.getLayers().get(0)).getCell((int)x, (int)y).setTile(AssetLoader.tileSet.getTile(tile));
if (level.Grid.getTransmutercalc(x, y)==0)
((TiledMapTileLayer)map.getLayers().get(2)).getCell((int)x, (int)y).setTile(null);
else {
((TiledMapTileLayer)map.getLayers().get(2)).getCell((int)x, (int)y).setTile(AssetLoader.tileSet.getTile(level.Grid.getTransmutercalc(x, y)));
((TiledMapTileLayer)map.getLayers().get(2)).getCell((int)x, (int)y).setRotation(level.Grid.getTransmuterrot(x, y));
}
}
}

View File

@ -29,6 +29,11 @@ import com.badlogic.gdx.utils.viewport.FitViewport;
import com.badlogic.gdx.utils.viewport.ScalingViewport;
import com.badlogic.gdx.utils.viewport.StretchViewport;
import fr.evolving.automata.Positiver_I;
import fr.evolving.automata.Positiver_II;
import fr.evolving.automata.Positiver_III;
import fr.evolving.automata.Transmuter;
public class AssetLoader {
public static Skin Skin_level;
public static TextureAtlas Atlas_level;
@ -52,6 +57,7 @@ public class AssetLoader {
public static NinePatch full;
public static AssetManager manager;
public static TiledMapTileSet tileSet;
public static Transmuter[] allTransmuter;
public static void addstyle(TextureAtlas Atlas_level,String Name) {
AtlasRegion AnAtlasRegion = Atlas_level.findRegion(Name);
@ -125,6 +131,23 @@ public class AssetLoader {
Gdx.app.debug("AssetLoader","Tiles N°:"+String.valueOf(i));
}
}
allTransmuter=new Transmuter[3];
allTransmuter[0]=new Positiver_I(null);
allTransmuter[1]=new Positiver_II(null);
allTransmuter[2]=new Positiver_III(null);
for(int i=0;i<allTransmuter.length;i++) {
int[] result;
result=allTransmuter[i].getallTiles();
for (int j=0;j<result.length;j++) {
TextureRegion tileText = Atlas_level.findRegion("sprite"+result[j]);
if (tileText != null) {
StaticTiledMapTile atile= new StaticTiledMapTile(tileText);
atile.setId(result[j]);
tileSet.putTile(result[j], atile);
Gdx.app.debug("AssetLoader","Tiles N°:"+String.valueOf(result[j]));
}
}
}
}
public static int setpref() {

View File

@ -8,15 +8,15 @@ public class Cell implements Serializable{
public boolean Copper;
public transient int Copper_calc;
public transient int Fiber_old;
public transient Sprite Sprite ;
public Transmuter Transmuter;
public transient int Transmuter_calc;
public Cell() {
this.Fiber=0;
this.Copper=false;
this.Fiber_old=0;
this.Sprite=null;
this.Transmuter=null;
this.Transmuter_calc=0;
}
}

View File

@ -1,7 +1,13 @@
package fr.evolving.automata;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Iterator;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.Vector2;
import fr.evolving.automata.Transmuter.CaseType;
public class Grid implements Serializable{
public Cell[][] Cells;
@ -18,7 +24,30 @@ public class Grid implements Serializable{
}
}
public void tiling() {
public void tiling_transmuter() {
for (int x=0;x<this.sizeX;x++)
for (int y=0;y<this.sizeY;y++) {
Transmuter transmuter=getTransmuter(x,y);
if (transmuter!=null)
{
Iterator<Vector2> keySetIterator = transmuter.getTiles().keySet().iterator();
int MainTile=transmuter.getMainTile();
GetXY(x,y).Transmuter_calc=(1<<16)*transmuter.getRotation().ordinal()+MainTile++;
while(keySetIterator.hasNext()){
Vector2 key = keySetIterator.next();
GetXY(x+key.x,y+key.y).Transmuter_calc=(1<<16)*transmuter.getRotation().ordinal()+MainTile++;
}
}
}
for (int x=0;x<this.sizeX;x++)
for (int y=0;y<this.sizeY;y++)
{
if (GetXY(x, y).Transmuter_calc>0)
Gdx.app.debug("info",x+","+y+">"+GetXY(x, y).Transmuter_calc);
}
}
public void tiling_copper() {
for (int x=0;x<this.sizeX;x++)
for (int y=0;y<this.sizeY;y++)
if (getCopper(x,y))
@ -154,6 +183,30 @@ public class Grid implements Serializable{
return this.Cells[(int)X][(int)Y];
}
public Transmuter getTransmuter(float X,float Y) {
Cell cell=GetXY(X,Y);
if (cell==null)
return null;
else
return cell.Transmuter;
}
public int getTransmutercalc(float X,float Y) {
Cell cell=GetXY(X,Y);
if (cell==null)
return 0;
else
return cell.Transmuter_calc & 0xFFFF;
}
public int getTransmuterrot(float X,float Y) {
Cell cell=GetXY(X,Y);
if (cell==null)
return 0;
else
return cell.Transmuter_calc>>16;
}
public boolean getCopper(float X,float Y) {
Cell cell=GetXY(X,Y);
if (cell==null)

View File

@ -1,6 +1,7 @@
package fr.evolving.automata;
import java.util.HashMap;
import java.util.Iterator;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.Vector2;
@ -34,6 +35,7 @@ public class Positiver_I extends Transmuter {
private static int Id;
private static boolean Activable;
private int ActivationLevel;
private int Rotation;
private static HashMap<Vector2,CaseType> Tiles;
public Positiver_I(Level level) {
@ -137,8 +139,25 @@ public class Positiver_I extends Transmuter {
return thesize*100+((int)(deltaid/thesize))*thesize;
}
public int[] getallTiles() {
int thesize=Tiles.size()+1;
int[] result;
result=new int[thesize];
for(int i=0;i<thesize;i++)
result[i]=thesize*100+this.Id*thesize+i;
return result;
}
public HashMap<Vector2,CaseType> getTiles() {
return this.Tiles;
HashMap<Vector2,CaseType> newTiles= new HashMap<Vector2,CaseType>();
Iterator<Vector2> keySetIterator = this.Tiles.keySet().iterator();
while(keySetIterator.hasNext()){
Vector2 key = keySetIterator.next();
double delta=key.len();
double alpha=key.angleRad()+this.getRotation().ordinal()*Math.PI/2;
newTiles.put(new Vector2((float)Math.round(delta*Math.cos(alpha)),(float)Math.round(delta*Math.sin(alpha))), this.Tiles.get(key));
}
return newTiles;
}
public boolean isActivable() {
@ -254,4 +273,5 @@ public class Positiver_I extends Transmuter {
public Transmuter getUnlock() {
return this.Unlock;
}
}

View File

@ -1,6 +1,7 @@
package fr.evolving.automata;
import java.util.HashMap;
import java.util.Iterator;
import com.badlogic.gdx.math.Vector2;
@ -136,8 +137,25 @@ public class Positiver_II extends Transmuter {
return thesize*100+((int)(deltaid/thesize))*thesize;
}
public int[] getallTiles() {
int thesize=Tiles.size()+1;
int[] result;
result=new int[thesize];
for(int i=0;i<thesize;i++)
result[i]=thesize*100+this.Id*thesize+i;
return result;
}
public HashMap<Vector2,CaseType> getTiles() {
return this.Tiles;
HashMap<Vector2,CaseType> newTiles= new HashMap<Vector2,CaseType>();
Iterator<Vector2> keySetIterator = this.Tiles.keySet().iterator();
while(keySetIterator.hasNext()){
Vector2 key = keySetIterator.next();
double delta=key.len();
double alpha=key.angleRad()+this.getRotation().ordinal()*Math.PI/2;
newTiles.put(new Vector2((float)Math.round(delta*Math.cos(alpha)),(float)Math.round(delta*Math.sin(alpha))), this.Tiles.get(key));
}
return newTiles;
}
public boolean isActivable() {

View File

@ -1,6 +1,7 @@
package fr.evolving.automata;
import java.util.HashMap;
import java.util.Iterator;
import com.badlogic.gdx.math.Vector2;
@ -59,7 +60,7 @@ public class Positiver_III extends Transmuter {
this.TurnTemp=0f;
this.TurnRayon=0f;
this.TurnNrj=0f;
this.Id=1;
this.Id=2;
this.Activable=true;
this.ActivationLevel=0;
this.Tiles= new HashMap<Vector2,CaseType>();
@ -136,8 +137,25 @@ public class Positiver_III extends Transmuter {
return thesize*100+((int)(deltaid/thesize))*thesize;
}
public int[] getallTiles() {
int thesize=Tiles.size()+1;
int[] result;
result=new int[thesize];
for(int i=0;i<thesize;i++)
result[i]=thesize*100+this.Id*thesize+i;
return result;
}
public HashMap<Vector2,CaseType> getTiles() {
return this.Tiles;
HashMap<Vector2,CaseType> newTiles= new HashMap<Vector2,CaseType>();
Iterator<Vector2> keySetIterator = this.Tiles.keySet().iterator();
while(keySetIterator.hasNext()){
Vector2 key = keySetIterator.next();
double delta=key.len();
double alpha=key.angleRad()+this.getRotation().ordinal()*Math.PI/2;
newTiles.put(new Vector2((float)Math.round(delta*Math.cos(alpha)),(float)Math.round(delta*Math.sin(alpha))), this.Tiles.get(key));
}
return newTiles;
}
public boolean isActivable() {

View File

@ -9,10 +9,13 @@ import com.badlogic.gdx.math.Vector2;
public abstract class Transmuter {
public enum CaseType{Rien,Cuivre,Fibre,Tout,Nimporte};
public enum Class{Structure,Charge,Direction,Filtrage,Synthèse,Détection,Divers,Scénario};
public enum Angular{A00,A90,A180,A270};
protected Level level;
protected Angular Rotation;
public Transmuter(Level level) {
this.level=level;
this.Rotation=Angular.A00;
}
public String getName() {
@ -169,16 +172,30 @@ public abstract class Transmuter {
return 0;
}
public int[] getallTiles() {
return null;
}
public String getInformations() {
Iterator<Vector2> keySetIterator = this.getTiles().keySet().iterator();
HashMap<Vector2,CaseType> tiles=this.getTiles();
Iterator<Vector2> keySetIterator = tiles.keySet().iterator();
String result;
result="**********************************\n"+"Name:"+this.getName()+"\nClass:"+this.getaClass()+" Id:"+this.getMainTile()+"\nPrice:"+this.getPrice()+" Tech:"+this.getTechnology()+"\nResearch:"+this.getResearch()+" Size:"+this.getSize()+"\nActivable:"+this.isActivable()+" Activation:"+this.getActivationLevel()+" Visible:"+this.isShowed()+"\nUpgradable:"+((this.isUpgradable())?this.getUpgrade().getName():this.isUpgradable())+" Unlockable:"+((this.isUnlockable())?this.getUnlock().getName():this.isUnlockable())+"\nUpgrade Cycle:"+this.getUpgradeCycle()+" upgrade:"+this.isUpgradableCycle()+"\nUpgrade Temperature:"+this.getUpgradeTemp()+" upgrade:"+this.isUpgradableTemp()+"\nUpgrade Nrj:"+this.getUpgradeNrj()+" upgrade:"+this.isUpgradableNrj()+"\nUpgrade Rayon:"+this.getUpgradeRayon()+" upgrade:"+this.isUpgradableRayon()+"\nTemperature /turn:"+this.getTurnTemp()+" Rayon /turn:"+this.getTurnRayon()+" Nrj /turn:"+this.getTurnNrj()+"\nTemperature /use:"+this.getUsedTemp()+" Rayon /use:"+this.getUsedRayon()+" Nrj /use:"+this.getUsedNrj()+"\n";
result="**********************************\n"+"Name:"+this.getName()+"\nClass:"+this.getaClass()+" Id:"+this.getMainTile()+" Rotation:"+this.getRotation()+"\nPrice:"+this.getPrice()+" Tech:"+this.getTechnology()+"\nResearch:"+this.getResearch()+" Size:"+this.getSize()+"\nActivable:"+this.isActivable()+" Activation:"+this.getActivationLevel()+" Visible:"+this.isShowed()+"\nUpgradable:"+((this.isUpgradable())?this.getUpgrade().getName():this.isUpgradable())+" Unlockable:"+((this.isUnlockable())?this.getUnlock().getName():this.isUnlockable())+"\nUpgrade Cycle:"+this.getUpgradeCycle()+" upgrade:"+this.isUpgradableCycle()+"\nUpgrade Temperature:"+this.getUpgradeTemp()+" upgrade:"+this.isUpgradableTemp()+"\nUpgrade Nrj:"+this.getUpgradeNrj()+" upgrade:"+this.isUpgradableNrj()+"\nUpgrade Rayon:"+this.getUpgradeRayon()+" upgrade:"+this.isUpgradableRayon()+"\nTemperature /turn:"+this.getTurnTemp()+" Rayon /turn:"+this.getTurnRayon()+" Nrj /turn:"+this.getTurnNrj()+"\nTemperature /use:"+this.getUsedTemp()+" Rayon /use:"+this.getUsedRayon()+" Nrj /use:"+this.getUsedNrj()+"\n";
while(keySetIterator.hasNext()){
Vector2 key = keySetIterator.next();
result+="coords:" + key + " type: " + this.getTiles().get(key);
result+="\ncoords:" + key.x+","+key.y + " type: " + tiles.get(key);
}
result+="\n**********************************";
return result;
}
public Angular getRotation() {
return this.Rotation;
}
public void setRotation(Angular rotation) {
this.Rotation=rotation;
}
}

View File

@ -45,6 +45,8 @@ import fr.evolving.assets.AssetLoader;
import fr.evolving.automata.Level;
import fr.evolving.automata.Positiver_I;
import fr.evolving.automata.Positiver_II;
import fr.evolving.automata.Positiver_III;
import fr.evolving.automata.Transmuter.Angular;
import fr.evolving.inputs.InputHandler;
public class GameScreen implements Screen {
@ -131,40 +133,57 @@ public class GameScreen implements Screen {
@Override
public void clicked(InputEvent event, float x, float y) {
Gdx.app.debug(event.getListenerActor().toString(),"tests");
level.Grid.Cells[0][0].Transmuter=new Positiver_I(level);
level.Grid.Cells[0][1].Transmuter=new Positiver_II(level);
level.Grid.Cells[0][2].Transmuter=new Positiver_I(level);
Gdx.app.debug("0 upgrade",String.valueOf(level.Grid.Cells[0][0].Transmuter.getUpgradeCycle()));
Gdx.app.debug("0 activation",String.valueOf(level.Grid.Cells[0][0].Transmuter.getActivationLevel()));
Gdx.app.debug("2 activation",String.valueOf(level.Grid.Cells[0][2].Transmuter.getActivationLevel()));
level.Grid.Cells[0][0].Transmuter.Activate();
level.Grid.Cells[0][0].Transmuter.UpgradeCycle();
Gdx.app.debug("0 activation",String.valueOf(level.Grid.Cells[0][0].Transmuter.getActivationLevel()));
Gdx.app.debug("2 activation",String.valueOf(level.Grid.Cells[0][2].Transmuter.getActivationLevel()));
level.Grid.Cells[0][0].Transmuter.Activate();
Gdx.app.debug("0 activation",String.valueOf(level.Grid.Cells[0][0].Transmuter.getActivationLevel()));
Gdx.app.debug("2 upgrade",String.valueOf(level.Grid.Cells[0][2].Transmuter.getUpgradeCycle()));
Gdx.app.debug("0 upgrade",String.valueOf(level.Grid.Cells[0][0].Transmuter.getUpgradeCycle()));
level.Grid.Cells[0][0].Transmuter.UpgradeCycle();
Gdx.app.debug("2 upgrade",String.valueOf(level.Grid.Cells[0][2].Transmuter.getUpgradeCycle()));
Gdx.app.debug("0 upgrade",String.valueOf(level.Grid.Cells[0][0].Transmuter.getUpgradeCycle()));
level.Grid.Cells[0][0].Transmuter.UpgradeCycle();
Gdx.app.debug("2 upgrade",String.valueOf(level.Grid.Cells[0][2].Transmuter.getUpgradeCycle()));
Gdx.app.debug("0 upgrade",String.valueOf(level.Grid.Cells[0][0].Transmuter.getUpgradeCycle()));
level.Grid.Cells[0][0].Transmuter.UpgradeCycle();
Gdx.app.debug("2 upgrade",String.valueOf(level.Grid.Cells[0][2].Transmuter.getUpgradeCycle()));
Gdx.app.debug("0 upgrade",String.valueOf(level.Grid.Cells[0][0].Transmuter.getUpgradeCycle()));
Gdx.app.debug("1 upgrade",String.valueOf(level.Grid.Cells[0][1].Transmuter.getUpgradeCycle()));
Gdx.app.debug("0 nom",String.valueOf(level.Grid.Cells[0][0].Transmuter.getName()));
Gdx.app.debug("1 nom",String.valueOf(level.Grid.Cells[0][1].Transmuter.getName()));
Gdx.app.debug("1 taille",String.valueOf(level.Grid.Cells[0][1].Transmuter.getTiles().size()));
level.Grid.Cells[0][0].Transmuter.UpgradeTemp();
level.Grid.Cells[0][1].Transmuter.UpgradeTemp();
level.Grid.Cells[0][2].Transmuter.UpgradeTemp();
level.Grid.Cells[0][2].Transmuter.UpgradeNrj();
Gdx.app.debug("0 informations",String.valueOf(level.Grid.Cells[0][0].Transmuter.getInformations()));
Gdx.app.debug("1 informations",String.valueOf(level.Grid.Cells[0][1].Transmuter.getInformations()));
Gdx.app.debug("2 informations",String.valueOf(level.Grid.Cells[0][2].Transmuter.getInformations()));
level.Grid.Cells[10][0].Transmuter=new Positiver_I(level);
level.Grid.Cells[10][1].Transmuter=new Positiver_II(level);
level.Grid.Cells[10][2].Transmuter=new Positiver_I(level);
Gdx.app.debug("0 upgrade",String.valueOf(level.Grid.Cells[10][0].Transmuter.getUpgradeCycle()));
Gdx.app.debug("0 activation",String.valueOf(level.Grid.Cells[10][0].Transmuter.getActivationLevel()));
Gdx.app.debug("2 activation",String.valueOf(level.Grid.Cells[10][2].Transmuter.getActivationLevel()));
level.Grid.Cells[10][0].Transmuter.Activate();
level.Grid.Cells[10][0].Transmuter.UpgradeCycle();
Gdx.app.debug("0 activation",String.valueOf(level.Grid.Cells[10][0].Transmuter.getActivationLevel()));
Gdx.app.debug("2 activation",String.valueOf(level.Grid.Cells[10][2].Transmuter.getActivationLevel()));
level.Grid.Cells[10][0].Transmuter.Activate();
Gdx.app.debug("0 activation",String.valueOf(level.Grid.Cells[10][0].Transmuter.getActivationLevel()));
Gdx.app.debug("2 upgrade",String.valueOf(level.Grid.Cells[10][2].Transmuter.getUpgradeCycle()));
Gdx.app.debug("0 upgrade",String.valueOf(level.Grid.Cells[10][0].Transmuter.getUpgradeCycle()));
level.Grid.Cells[10][0].Transmuter.UpgradeCycle();
Gdx.app.debug("2 upgrade",String.valueOf(level.Grid.Cells[10][2].Transmuter.getUpgradeCycle()));
Gdx.app.debug("0 upgrade",String.valueOf(level.Grid.Cells[10][0].Transmuter.getUpgradeCycle()));
level.Grid.Cells[10][0].Transmuter.UpgradeCycle();
Gdx.app.debug("2 upgrade",String.valueOf(level.Grid.Cells[10][2].Transmuter.getUpgradeCycle()));
Gdx.app.debug("0 upgrade",String.valueOf(level.Grid.Cells[10][0].Transmuter.getUpgradeCycle()));
level.Grid.Cells[10][0].Transmuter.UpgradeCycle();
Gdx.app.debug("2 upgrade",String.valueOf(level.Grid.Cells[10][2].Transmuter.getUpgradeCycle()));
Gdx.app.debug("0 upgrade",String.valueOf(level.Grid.Cells[10][0].Transmuter.getUpgradeCycle()));
Gdx.app.debug("1 upgrade",String.valueOf(level.Grid.Cells[10][1].Transmuter.getUpgradeCycle()));
Gdx.app.debug("0 nom",String.valueOf(level.Grid.Cells[10][0].Transmuter.getName()));
Gdx.app.debug("1 nom",String.valueOf(level.Grid.Cells[10][1].Transmuter.getName()));
Gdx.app.debug("1 taille",String.valueOf(level.Grid.Cells[10][1].Transmuter.getTiles().size()));
level.Grid.Cells[10][0].Transmuter.UpgradeTemp();
level.Grid.Cells[10][1].Transmuter.UpgradeTemp();
level.Grid.Cells[10][2].Transmuter.UpgradeTemp();
level.Grid.Cells[10][2].Transmuter.UpgradeNrj();
level.Grid.Cells[10][2].Transmuter.setRotation(Angular.A90);
Gdx.app.debug("2 informations",String.valueOf(level.Grid.Cells[10][0].Transmuter.getInformations()));
Gdx.app.debug("2 informations",String.valueOf(level.Grid.Cells[10][1].Transmuter.getInformations()));
Gdx.app.debug("2 informations",String.valueOf(level.Grid.Cells[10][2].Transmuter.getInformations()));
level.Grid.Cells[5][5].Transmuter=new Positiver_I(level);
level.Grid.Cells[5][5].Transmuter.setRotation(Angular.A90);
level.Grid.Cells[8][8].Transmuter=new Positiver_II(level);
level.Grid.Cells[8][8].Transmuter.setRotation(Angular.A180);
level.Grid.Cells[2][2].Transmuter=new Positiver_I(level);
level.Grid.Cells[2][2].Transmuter.setRotation(Angular.A270);
level.Grid.Cells[7][2].Transmuter=new Positiver_III(level);
level.Grid.Cells[7][2].Transmuter.setRotation(Angular.A270);
level.Grid.tiling_transmuter();
int[] result;
result=level.Grid.Cells[5][5].Transmuter.getallTiles();
for (int i=0;i<result.length;i++)
Gdx.app.debug("getalltiles 5,5",String.valueOf(result[i]));
result=level.Grid.Cells[8][8].Transmuter.getallTiles();
for (int i=0;i<result.length;i++)
Gdx.app.debug("getalltiles 8,8",String.valueOf(result[i]));
}
});
if (Gdx.graphics.isFullscreen())
@ -360,7 +379,7 @@ public class GameScreen implements Screen {
level.Grid.GetXY(coords.x,coords.y).Copper=true;
else
level.Grid.GetXY(coords.x,coords.y).Copper=false;
level.Grid.tiling();
level.Grid.tiling_copper();
map.redraw(60);
}
}
@ -385,7 +404,7 @@ public class GameScreen implements Screen {
Gdx.app.debug(event.getListenerActor().toString(),"Screen coordinates translated to world coordinates: "+ "X: " + coords.x + " Y: " + coords.y);
level.Grid.GetXY(coords.x,coords.y).Fiber=0;
level.Grid.GetXY(coords.x,coords.y).Copper=false;
level.Grid.tiling();
level.Grid.tiling_copper();
map.redraw(60);
}
}
@ -412,7 +431,7 @@ public class GameScreen implements Screen {
{
Gdx.app.debug(event.getListenerActor().toString(),"Screen coordinates translated to world coordinates: "+ "X: " + coords.x + " Y: " + coords.y);
level.Grid.GetXY(coords.x,coords.y).Copper=true;
level.Grid.tiling();
level.Grid.tiling_copper();
map.redraw(60);
}
}
@ -434,7 +453,7 @@ public class GameScreen implements Screen {
Gdx.app.debug(event.getListenerActor().toString(),"Screen coordinates translated to world coordinates: "+ "X: " + coords.x + " Y: " + coords.y);
level.Grid.GetXY(coords.x,coords.y).Fiber=0;
level.Grid.GetXY(coords.x,coords.y).Copper=false;
level.Grid.tiling();
level.Grid.tiling_copper();
map.redraw(60);
}
}