diff --git a/core/assets-raw/sprites/blocks/production/blast-mixer.png b/core/assets-raw/sprites/blocks/production/blast-mixer.png index 9effafb9c8..52e7a3020e 100644 Binary files a/core/assets-raw/sprites/blocks/production/blast-mixer.png and b/core/assets-raw/sprites/blocks/production/blast-mixer.png differ diff --git a/core/assets/bundles/bundle_fr.properties b/core/assets/bundles/bundle_fr.properties index 5a4641638d..307a8f586b 100644 --- a/core/assets/bundles/bundle_fr.properties +++ b/core/assets/bundles/bundle_fr.properties @@ -284,15 +284,15 @@ selectschematic = [accent][[{0}][] pour sélectionner et copier pausebuilding = [accent][[{0}][] pour mettre la construction en pause resumebuilding = [scarlet][[{0}][] pour reprendre la construction wave = [accent]Vague {0} -wave.cap = [accent]Wave {0}/{1} +wave.cap = [accent]Vague {0}/{1} wave.waiting = [lightgray]Vague dans {0} wave.waveInProgress = [lightgray]Vague en cours waiting = [lightgray]En attente... waiting.players = En attente de joueurs... wave.enemies = [lightgray]{0} Ennemis restants wave.enemy = [lightgray]{0} Ennemi restant -wave.guardianwarn = Guardian approaching in [accent]{0}[] waves. -wave.guardianwarn.one = Guardian approaching in [accent]{0}[] wave. +wave.guardianwarn = Gardien à l'approche dans [accent]{0}[] vagues. +wave.guardianwarn.one = Gardien à l'approche dans [accent]{0}[] vague. loadimage = Charger l'image saveimage = Sauvegarder l'image unknown = Inconnu @@ -331,7 +331,7 @@ editor.generation = Génération: editor.ingame = Éditer dans le jeu editor.publish.workshop = Publier sur le Workshop editor.newmap = Nouvelle carte -editor.center = Center +editor.center = Centrer workshop = Steam Workshop waves.title = Vagues waves.remove = Supprimer @@ -445,7 +445,7 @@ filter.option.amount = Quantité filter.option.block = Bloc filter.option.floor = Sol filter.option.flooronto = Sol en question -filter.option.target = Target +filter.option.target = Cible filter.option.wall = Mur filter.option.ore = Minerai filter.option.floor2 = Sol secondaire diff --git a/core/assets/bundles/bundle_fr_BE.properties b/core/assets/bundles/bundle_fr_BE.properties index 0ec65d8cc1..411f45a8e6 100644 --- a/core/assets/bundles/bundle_fr_BE.properties +++ b/core/assets/bundles/bundle_fr_BE.properties @@ -1066,7 +1066,7 @@ block.message.name = Message block.illuminator.name = Illuminator block.illuminator.description = A small, compact, configurable light source. Requires power to function. block.overflow-gate.name = Barrière de Débordement -block.underflow-gate.name = Underflow Gate +block.underflow-gate.name = Barrière de Refoulement block.silicon-smelter.name = Fonderie de silicium block.phase-weaver.name = Tisseur à phase block.pulverizer.name = Pulvérisateur @@ -1274,7 +1274,7 @@ block.inverted-sorter.description = Processes items like a standard sorter, but block.router.description = Accepte les éléments d'une direction et les envoie dans 3 autres directions de manière égale. Utile pour séparer les matériaux d'une source en plusieurs cibles. block.distributor.description = Un routeur avancé qui divise les articles en 7 autres directions de manière égale. [scarlet]Seule et unique ![] block.overflow-gate.description = C'est la combinaison entre un routeur et un diviseur qui peut seulement distribuer à gauche et à droite si le chemin de devant est bloqué. -block.underflow-gate.description = The opposite of an overflow gate. Outputs to the front if the left and right paths are blocked. +block.underflow-gate.description = Le contraire d'une barrière de débordement.\nEnvoie les ressources vers l'avant si les chemins de gauche et de droite sont bloqués. block.mass-driver.description = Bloc de transport d'articles ultime.\nRecueille plusieurs objets et les envoie ensuite à un autre pilote de masse sur une longue distance. block.mechanical-pump.description = Une pompe bon marché avec un débit lent, mais aucune consommation d'énergie. block.rotary-pump.description = Une pompe avancée qui double la vitesse en utilisant l’énergie. diff --git a/core/src/mindustry/logic/DataType.java b/core/src/mindustry/logic/DataType.java deleted file mode 100644 index d216313ce0..0000000000 --- a/core/src/mindustry/logic/DataType.java +++ /dev/null @@ -1,24 +0,0 @@ -package mindustry.logic; - -import arc.graphics.*; -import mindustry.graphics.*; - -/** The types of data a node field can be. */ -public enum DataType{ - /** A double. Used for integer calculations as well. */ - number(Pal.place), - /** Any type of content, e.g. item. */ - content(Color.cyan), - /** A building of a tile. */ - building(Pal.items), - /** A unit on the map. */ - unit(Pal.health), - /** Java string */ - string(Color.royal); - - public final Color color; - - DataType(Color color){ - this.color = color; - } -} diff --git a/core/src/mindustry/logic/LAccess.java b/core/src/mindustry/logic/LAccess.java index 669e447a57..d8175053fa 100644 --- a/core/src/mindustry/logic/LAccess.java +++ b/core/src/mindustry/logic/LAccess.java @@ -39,9 +39,7 @@ public enum LAccess{ enabled("to"), //"to" is standard for single parameter access shoot("x", "y", "shoot"), shootp(true, "unit", "shoot"), - configure(true, 30, "to") - - ; + configure(true, 30, "to"); public final String[] params; public final boolean isObj; diff --git a/core/src/mindustry/logic/LAssembler.java b/core/src/mindustry/logic/LAssembler.java index 57c2004320..23293d6b14 100644 --- a/core/src/mindustry/logic/LAssembler.java +++ b/core/src/mindustry/logic/LAssembler.java @@ -17,9 +17,9 @@ public class LAssembler{ private int lastVar; /** Maps names to variable IDs. */ - ObjectMap vars = new ObjectMap<>(); + public ObjectMap vars = new ObjectMap<>(); /** All instructions to be executed. */ - LInstruction[] instructions; + public LInstruction[] instructions; public LAssembler(){ //instruction counter @@ -105,7 +105,7 @@ public class LAssembler{ if(index++ > max) break; line = line.replace("\t", "").trim(); - + try{ String[] arr; diff --git a/core/src/mindustry/logic/LCanvas.java b/core/src/mindustry/logic/LCanvas.java index 728441cb5a..056c6f2ca5 100644 --- a/core/src/mindustry/logic/LCanvas.java +++ b/core/src/mindustry/logic/LCanvas.java @@ -22,10 +22,10 @@ public class LCanvas extends Table{ //ew static variables static LCanvas canvas; - DragLayout statements; + public DragLayout statements; + public ScrollPane pane; + public Group jumps; StatementElem dragging; - ScrollPane pane; - Group jumps; StatementElem hovered; float targetWidth; int jumpCount = 0; @@ -78,18 +78,18 @@ public class LCanvas extends Table{ super.draw(); } - void add(LStatement statement){ + public void add(LStatement statement){ statements.addChild(new StatementElem(statement)); } - String save(){ + public String save(){ Seq st = statements.getChildren().as().map(s -> s.st); st.each(LStatement::saveUI); return LAssembler.write(st); } - void load(String asm){ + public void load(String asm){ jumps.clear(); Seq statements = LAssembler.read(asm); @@ -261,7 +261,7 @@ public class LCanvas extends Table{ } public class StatementElem extends Table{ - LStatement st; + public LStatement st; public StatementElem(LStatement st){ this.st = st; @@ -341,7 +341,7 @@ public class LCanvas extends Table{ marginBottom(7); } - void copy(){ + public void copy(){ LStatement copy = st.copy(); if(copy != null){ StatementElem s = new StatementElem(copy); @@ -374,7 +374,7 @@ public class LCanvas extends Table{ float mx, my; ClickListener listener; - JumpCurve curve; + public JumpCurve curve; public JumpButton(Prov getter, Cons setter){ super(Tex.logicNode, Styles.colori); @@ -437,7 +437,7 @@ public class LCanvas extends Table{ } public static class JumpCurve extends Element{ - JumpButton button; + public JumpButton button; public JumpCurve(JumpButton button){ this.button = button; @@ -492,7 +492,7 @@ public class LCanvas extends Table{ } } - void drawCurve(float x, float y, float x2, float y2){ + public void drawCurve(float x, float y, float x2, float y2){ Lines.stroke(4f, button.color); Draw.alpha(parentAlpha); @@ -518,8 +518,7 @@ public class LCanvas extends Table{ x + dist, y, x2 + dist, y2, x2, y2, - Math.max(18, (int)(Mathf.dst(x, y, x2, y2) / 6)) - ); + Math.max(18, (int)(Mathf.dst(x, y, x2, y2) / 6))); } } } diff --git a/core/src/mindustry/logic/LogicDialog.java b/core/src/mindustry/logic/LogicDialog.java index ccc9690fc5..8a0dd896a9 100644 --- a/core/src/mindustry/logic/LogicDialog.java +++ b/core/src/mindustry/logic/LogicDialog.java @@ -11,7 +11,7 @@ import mindustry.ui.dialogs.*; import static mindustry.Vars.*; public class LogicDialog extends BaseDialog{ - LCanvas canvas; + public LCanvas canvas; Cons consumer = s -> {}; public LogicDialog(){ @@ -25,7 +25,7 @@ public class LogicDialog extends BaseDialog{ addCloseListener(); buttons.defaults().size(160f, 64f); - buttons.button("@back", Icon.left, this::hide); + buttons.button("@back", Icon.left, this::hide).name("back"); buttons.button("@edit", Icon.edit, () -> { BaseDialog dialog = new BaseDialog("@editor.export"); @@ -53,7 +53,7 @@ public class LogicDialog extends BaseDialog{ dialog.addCloseButton(); dialog.show(); - }); + }).name("edit"); buttons.button("@add", Icon.add, () -> { BaseDialog dialog = new BaseDialog("@add"); @@ -79,11 +79,11 @@ public class LogicDialog extends BaseDialog{ dialog.show(); }).disabled(t -> canvas.statements.getChildren().size >= LExecutor.maxInstructions); - add(canvas).grow(); + add(canvas).grow().name("canvas"); row(); - add(buttons).growX(); + add(buttons).growX().name("canvas"); hidden(() -> consumer.get(canvas.save())); diff --git a/core/src/mindustry/logic/LogicOp.java b/core/src/mindustry/logic/LogicOp.java index 40d02a8345..3d7d60a8d9 100644 --- a/core/src/mindustry/logic/LogicOp.java +++ b/core/src/mindustry/logic/LogicOp.java @@ -38,9 +38,7 @@ public enum LogicOp{ floor("floor", Math::floor), ceil("ceil", Math::ceil), sqrt("sqrt", Math::sqrt), - rand("rand", d -> Mathf.rand.nextDouble() * d), - - ; + rand("rand", d -> Mathf.rand.nextDouble() * d); public static final LogicOp[] all = values(); diff --git a/core/src/mindustry/world/blocks/logic/LogicBlock.java b/core/src/mindustry/world/blocks/logic/LogicBlock.java index 4b8367d75e..df469b8f7c 100644 --- a/core/src/mindustry/world/blocks/logic/LogicBlock.java +++ b/core/src/mindustry/world/blocks/logic/LogicBlock.java @@ -324,7 +324,8 @@ public class LogicBlock extends Block{ executor.load(asm); }catch(Exception e){ - e.printStackTrace(); + Log.err("Failed to compile logic program @", code); + Log.err(e); //handle malformed code and replace it with nothing executor.load("", LExecutor.maxInstructions);