feat: impossible d'ajouter de la fibre ou cuivre sur un transmuteur déjà posé modification des positiveur ii et negativeur ii pour l'élément fibre.

This commit is contained in:
Nicolas Hordé 2016-01-04 19:15:47 +01:00
parent bba8260d15
commit f3f98d564f
3 changed files with 10 additions and 6 deletions

View File

@ -69,7 +69,7 @@ public class Negativer_II extends Transmuter {
this.ActivationLevel=0; this.ActivationLevel=0;
this.Tilestype= new OrderedMap<Vector2, CaseType>(); this.Tilestype= new OrderedMap<Vector2, CaseType>();
this.Tilestype.put(new Vector2(0,0), CaseType.Cuivre); this.Tilestype.put(new Vector2(0,0), CaseType.Cuivre);
this.Tilestype.put(new Vector2(1,0), CaseType.Fibre); this.Tilestype.put(new Vector2(1,0), CaseType.Fibre_seul);
this.Tilesid= new OrderedMap<Vector2, Integer>(); this.Tilesid= new OrderedMap<Vector2, Integer>();
this.Tilesid.put(new Vector2(0,0), 109); this.Tilesid.put(new Vector2(0,0), 109);
this.Tilesid.put(new Vector2(1,0), 107); this.Tilesid.put(new Vector2(1,0), 107);

View File

@ -69,7 +69,7 @@ public class Positiver_II extends Transmuter {
this.ActivationLevel=0; this.ActivationLevel=0;
this.Tilestype= new OrderedMap<Vector2, CaseType>(); this.Tilestype= new OrderedMap<Vector2, CaseType>();
this.Tilestype.put(new Vector2(0,0), CaseType.Cuivre); this.Tilestype.put(new Vector2(0,0), CaseType.Cuivre);
this.Tilestype.put(new Vector2(1,0), CaseType.Fibre); this.Tilestype.put(new Vector2(1,0), CaseType.Fibre_seul);
this.Tilesid= new OrderedMap<Vector2, Integer>(); this.Tilesid= new OrderedMap<Vector2, Integer>();
this.Tilesid.put(new Vector2(0,0), 106); this.Tilesid.put(new Vector2(0,0), 106);
this.Tilesid.put(new Vector2(1,0), 107); this.Tilesid.put(new Vector2(1,0), 107);

View File

@ -475,7 +475,8 @@ public class GameScreen implements Screen {
} }
void map_fiber_pen(float realx, float realy,int x, int y,boolean alone,int button,calling call) { void map_fiber_pen(float realx, float realy,int x, int y,boolean alone,int button,calling call) {
level.Grid.GetXY(x,y).Fiber=-1*level.Grid.GetXY(x,y).Fiber+1; if (level.Grid.GetXY(x,y).Transmuter_calc==0)
level.Grid.GetXY(x,y).Fiber=-1*level.Grid.GetXY(x,y).Fiber+1;
if (alone) { if (alone) {
level.Grid.tiling_copper(); level.Grid.tiling_copper();
map.redraw(60); map.redraw(60);
@ -483,7 +484,8 @@ public class GameScreen implements Screen {
} }
void map_fiber_brush(float realx, float realy,int x, int y,boolean alone,int button,calling call) { void map_fiber_brush(float realx, float realy,int x, int y,boolean alone,int button,calling call) {
level.Grid.GetXY(x,y).Fiber=1; if (level.Grid.GetXY(x,y).Transmuter_calc==0)
level.Grid.GetXY(x,y).Fiber=1;
if (alone) { if (alone) {
level.Grid.tiling_copper(); level.Grid.tiling_copper();
map.redraw(60); map.redraw(60);
@ -501,7 +503,8 @@ public class GameScreen implements Screen {
} }
void map_copper_pen(float realx, float realy,int x, int y,boolean alone,int button,calling call) { void map_copper_pen(float realx, float realy,int x, int y,boolean alone,int button,calling call) {
level.Grid.GetXY(x,y).Copper=!level.Grid.GetXY(x,y).Copper; if (level.Grid.GetXY(x,y).Transmuter_calc==0)
level.Grid.GetXY(x,y).Copper=!level.Grid.GetXY(x,y).Copper;
if (alone) { if (alone) {
level.Grid.tiling_copper(); level.Grid.tiling_copper();
map.redraw(60); map.redraw(60);
@ -509,7 +512,8 @@ public class GameScreen implements Screen {
} }
void map_copper_brush(float realx, float realy,int x, int y,boolean alone,int button,calling call) { void map_copper_brush(float realx, float realy,int x, int y,boolean alone,int button,calling call) {
level.Grid.GetXY(x,y).Copper=true; if (level.Grid.GetXY(x,y).Transmuter_calc==0)
level.Grid.GetXY(x,y).Copper=true;
if (alone) { if (alone) {
level.Grid.tiling_copper(); level.Grid.tiling_copper();
map.redraw(60); map.redraw(60);