mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-13 12:16:53 +07:00
New sorted update script
This commit is contained in:
parent
e30347a11f
commit
f59441005e
@ -73,6 +73,7 @@ text.nextmission = Next Mission
|
||||
text.maps.none = [LIGHT_GRAY]No maps found\!
|
||||
text.about.button = About
|
||||
text.name = Name\:
|
||||
text.filename = File Name\:
|
||||
text.unlocked = New Block Unlocked\!
|
||||
text.unlocked.plural = New Blocks Unlocked\!
|
||||
text.players = {0} players online
|
||||
@ -766,16 +767,10 @@ block.bridge-conduit.description = Advanced liquid transport block. Allows trans
|
||||
block.mechanical-pump.description = A cheap pump with slow output, but no power consumption.
|
||||
block.rotary-pump.description = An advanced pump which doubles up speed by using power.
|
||||
block.thermal-pump.description = The ultimate pump. Three times as fast as a mechanical pump and the only pump which is able to retrieve lava.
|
||||
block.router.description = Accepts items from one direction and outputs them to up to 3 other directions equally. Useful for splitting the materials from one source to multiple targets.
|
||||
block.distributor.description = An advanced router which splits items to up to 7 other directions equally.
|
||||
block.bridge-conveyor.description = Advanced item transport block. Allows transporting items over up to 3 tiles of any terrain or building.
|
||||
liquid.water.description = Commonly used for cooling machines and waste processing.
|
||||
liquid.lava.description = Can be transformed into[LIGHT_GRAY] stone[], used for generating power or used as ammo for certain turrets.
|
||||
liquid.oil.description = Can be burnt, exploded or used as a coolant.
|
||||
liquid.cryofluid.description = The most efficient liquid for cooling things down.
|
||||
|
||||
# TODO: These descriptions have been changed. Let translators find them easily.
|
||||
block.router.description = Accepts items from one direction and outputs them to up to 3 other directions equally. Useful for splitting the materials from one source to multiple targets.
|
||||
block.distributor.description = An advanced router which splits items to up to 7 other directions equally.
|
||||
block.bridge-conveyor.description = Advanced item transport block. Allows transporting items over up to 3 tiles of any terrain or building.
|
||||
|
||||
# TODO: To be deleted in all translations: block.bridgeconveyor.name, block.bridgeconveyor.description
|
||||
# (There are additional elements for bridge-conveyor already)
|
||||
text.filename = File Name\:
|
||||
|
@ -4,6 +4,7 @@ import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.ObjectMap;
|
||||
import com.badlogic.gdx.utils.OrderedMap;
|
||||
import com.badlogic.gdx.utils.PropertiesUtils;
|
||||
import io.anuke.ucore.function.BiFunction;
|
||||
import io.anuke.ucore.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
@ -54,15 +55,26 @@ public class BundleLauncher {
|
||||
}
|
||||
}
|
||||
|
||||
BiFunction<String, String, String> processor = (key, value) -> (key + " = " + value).replace("\\", "\\\\").replace("\n", "\\n") + "\n";
|
||||
|
||||
Path output = child.resolveSibling("output/" + child.getFileName());
|
||||
|
||||
Log.info("&lc{0} keys added.", added);
|
||||
Log.info("Writing bundle to {0}", output);
|
||||
StringBuilder result = new StringBuilder();
|
||||
for(ObjectMap.Entry<String, String> e : other.entries()){
|
||||
result.append((e.key + " = " + e.value).replace("\\", "\\\\").replace("\n", "\\n"));
|
||||
result.append("\n");
|
||||
|
||||
//add everything ordered
|
||||
for(String key : base.orderedKeys()){
|
||||
result.append(processor.get(key, other.get(key)));
|
||||
other.remove(key);
|
||||
}
|
||||
|
||||
result.append("\n#Additional Entries\n\n");
|
||||
|
||||
for(ObjectMap.Entry<String, String> e : other.entries()){
|
||||
result.append(processor.get(e.key, e.value));
|
||||
}
|
||||
|
||||
Files.write(child, result.toString().getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
}catch (IOException e){
|
||||
|
Loading…
Reference in New Issue
Block a user