Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2019-12-14 11:05:32 -05:00
31 changed files with 23 additions and 39 deletions

View File

@@ -705,7 +705,6 @@ keybind.pick.name = Pick Block
keybind.break_block.name = Break Block keybind.break_block.name = Break Block
keybind.deselect.name = Deselect keybind.deselect.name = Deselect
keybind.shoot.name = Shoot keybind.shoot.name = Shoot
keybind.zoom_hold.name = Zoom Hold
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Pause keybind.pause.name = Pause
@@ -1046,7 +1045,7 @@ unit.eradicator.name = Eradicator
unit.lich.name = Lich unit.lich.name = Lich
unit.reaper.name = Reaper unit.reaper.name = Reaper
tutorial.next = [lightgray]<Tap to continue> tutorial.next = [lightgray]<Tap to continue>
tutorial.intro = You have entered the[scarlet] Mindustry Tutorial.[]\nUse [accent][[WASD][] to move.\n[accent]Hold [[Ctrl] while scrolling[] to zoom in and out.\nBegin by[accent] mining copper[]. Move close to it, then tap a copper ore vein near your core to do this.\n\n[accent]{0}/{1} copper tutorial.intro = You have entered the[scarlet] Mindustry Tutorial.[]\nUse[accent] [[WASD][] to move.\n[accent]Scroll[] to zoom in and out.\nBegin by[accent] mining copper[]. Move close to it, then tap a copper ore vein near your core to do this.\n\n[accent]{0}/{1} copper
tutorial.intro.mobile = You have entered the[scarlet] Mindustry Tutorial.[]\nSwipe the screen to move.\n[accent]Pinch with 2 fingers[] to zoom in and out.\nBegin by[accent] mining copper[]. Move close to it, then tap a copper ore vein near your core to do this.\n\n[accent]{0}/{1} copper tutorial.intro.mobile = You have entered the[scarlet] Mindustry Tutorial.[]\nSwipe the screen to move.\n[accent]Pinch with 2 fingers[] to zoom in and out.\nBegin by[accent] mining copper[]. Move close to it, then tap a copper ore vein near your core to do this.\n\n[accent]{0}/{1} copper
tutorial.drill = Mining manually is inefficient.\n[accent]Drills[] can mine automatically.\nClick the drill tab in the bottom right.\nSelect the[accent] mechanical drill[]. Place it on a copper vein by clicking.\nYou can also select the drill by tapping [accent][[2][] then [accent][[1][] quickly, regardless of which tab is open.\n[accent]Right-click[] to stop building. tutorial.drill = Mining manually is inefficient.\n[accent]Drills[] can mine automatically.\nClick the drill tab in the bottom right.\nSelect the[accent] mechanical drill[]. Place it on a copper vein by clicking.\nYou can also select the drill by tapping [accent][[2][] then [accent][[1][] quickly, regardless of which tab is open.\n[accent]Right-click[] to stop building.
tutorial.drill.mobile = Mining manually is inefficient.\n[accent]Drills[] can mine automatically.\nTap the drill tab in the bottom right.\nSelect the[accent] mechanical drill[].\nPlace it on a copper vein by tapping, then press the[accent] checkmark[] below to confirm your selection.\nPress the[accent] X button[] to cancel placement. tutorial.drill.mobile = Mining manually is inefficient.\n[accent]Drills[] can mine automatically.\nTap the drill tab in the bottom right.\nSelect the[accent] mechanical drill[].\nPlace it on a copper vein by tapping, then press the[accent] checkmark[] below to confirm your selection.\nPress the[accent] X button[] to cancel placement.

View File

@@ -652,7 +652,6 @@ keybind.pick.name = Pick Block
keybind.break_block.name = Break Block keybind.break_block.name = Break Block
keybind.deselect.name = Odznačit keybind.deselect.name = Odznačit
keybind.shoot.name = Střílet keybind.shoot.name = Střílet
keybind.zoom_hold.name = Přiblížení-podržení
keybind.zoom.name = přiblížení keybind.zoom.name = přiblížení
keybind.menu.name = Hlavní nabídka keybind.menu.name = Hlavní nabídka
keybind.pause.name = pauza keybind.pause.name = pauza

View File

@@ -672,7 +672,6 @@ keybind.pick.name = Block Auswählen
keybind.break_block.name = Block zerstören keybind.break_block.name = Block zerstören
keybind.deselect.name = Auswahl aufheben keybind.deselect.name = Auswahl aufheben
keybind.shoot.name = Schießen keybind.shoot.name = Schießen
keybind.zoom_hold.name = Zoom halten
keybind.zoom.name = Zoomen keybind.zoom.name = Zoomen
keybind.menu.name = Menü keybind.menu.name = Menü
keybind.pause.name = Pause keybind.pause.name = Pause

View File

@@ -652,7 +652,6 @@ keybind.pick.name = Pick Block
keybind.break_block.name = Destruir Bloque keybind.break_block.name = Destruir Bloque
keybind.deselect.name = Deseleccionar keybind.deselect.name = Deseleccionar
keybind.shoot.name = Disparar keybind.shoot.name = Disparar
keybind.zoom_hold.name = Mantener Zoom
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menú keybind.menu.name = Menú
keybind.pause.name = Pausa keybind.pause.name = Pausa

View File

@@ -652,7 +652,6 @@ keybind.pick.name = Vali blokk
keybind.break_block.name = Hävita blokk keybind.break_block.name = Hävita blokk
keybind.deselect.name = Tühista valik keybind.deselect.name = Tühista valik
keybind.shoot.name = Tulista keybind.shoot.name = Tulista
keybind.zoom_hold.name = Suumimise režiim
keybind.zoom.name = Muuda suumi keybind.zoom.name = Muuda suumi
keybind.menu.name = Menüü keybind.menu.name = Menüü
keybind.pause.name = Paus keybind.pause.name = Paus

View File

@@ -652,7 +652,6 @@ keybind.pick.name = Jaso blokea
keybind.break_block.name = Apurtu blokea keybind.break_block.name = Apurtu blokea
keybind.deselect.name = Deshautatu keybind.deselect.name = Deshautatu
keybind.shoot.name = Tirokatu keybind.shoot.name = Tirokatu
keybind.zoom_hold.name = Zoom mantenduz
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menua keybind.menu.name = Menua
keybind.pause.name = Pausatu keybind.pause.name = Pausatu

View File

@@ -547,7 +547,6 @@ keybind.pick.name = Pick Block
keybind.break_block.name = Break Block keybind.break_block.name = Break Block
keybind.deselect.name = Deselect keybind.deselect.name = Deselect
keybind.shoot.name = Shoot keybind.shoot.name = Shoot
keybind.zoom_hold.name = Zoom Hold
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Pause keybind.pause.name = Pause

View File

@@ -702,7 +702,6 @@ keybind.pick.name = Choisir un bloc
keybind.break_block.name = Supprimer un bloc keybind.break_block.name = Supprimer un bloc
keybind.deselect.name = Désélectionner keybind.deselect.name = Désélectionner
keybind.shoot.name = Tirer keybind.shoot.name = Tirer
keybind.zoom_hold.name = Maintenir pour zoomer
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Pause keybind.pause.name = Pause

View File

@@ -652,7 +652,6 @@ keybind.pick.name = Choisir un bloc
keybind.break_block.name = Supprimer un bloc keybind.break_block.name = Supprimer un bloc
keybind.deselect.name = Déselectionner keybind.deselect.name = Déselectionner
keybind.shoot.name = Tirer keybind.shoot.name = Tirer
keybind.zoom_hold.name = Tenir le zoom
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Pause keybind.pause.name = Pause

View File

@@ -652,7 +652,6 @@ keybind.pick.name = Memilih Blok
keybind.break_block.name = Menghancurkan Blok keybind.break_block.name = Menghancurkan Blok
keybind.deselect.name = Batal Memilih keybind.deselect.name = Batal Memilih
keybind.shoot.name = Menembak keybind.shoot.name = Menembak
keybind.zoom_hold.name = Tahan Mode Zoom
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Jeda keybind.pause.name = Jeda

View File

@@ -699,7 +699,6 @@ keybind.pick.name = Scegli Blocco
keybind.break_block.name = Rompi Blocco keybind.break_block.name = Rompi Blocco
keybind.deselect.name = Deseleziona keybind.deselect.name = Deseleziona
keybind.shoot.name = Spara keybind.shoot.name = Spara
keybind.zoom_hold.name = Attiva Zoom
keybind.zoom.name = Esegui Zoom keybind.zoom.name = Esegui Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Pausa keybind.pause.name = Pausa

View File

@@ -652,7 +652,6 @@ keybind.pick.name = ブロックの選択
keybind.break_block.name = ブロックの破壊 keybind.break_block.name = ブロックの破壊
keybind.deselect.name = 選択解除 keybind.deselect.name = 選択解除
keybind.shoot.name = ショット keybind.shoot.name = ショット
keybind.zoom_hold.name = 長押しズーム
keybind.zoom.name = ズーム keybind.zoom.name = ズーム
keybind.menu.name = メニュー keybind.menu.name = メニュー
keybind.pause.name = ポーズ keybind.pause.name = ポーズ

View File

@@ -704,7 +704,6 @@ keybind.pick.name = 블록 선택
keybind.break_block.name = 블록 파괴 keybind.break_block.name = 블록 파괴
keybind.deselect.name = 선택해제 keybind.deselect.name = 선택해제
keybind.shoot.name = 사격 keybind.shoot.name = 사격
keybind.zoom_hold.name = 길게 확대
keybind.zoom.name = 확대 keybind.zoom.name = 확대
keybind.menu.name = 메뉴 keybind.menu.name = 메뉴
keybind.pause.name = 일시중지 keybind.pause.name = 일시중지

View File

@@ -652,7 +652,6 @@ keybind.pick.name = Pick Block
keybind.break_block.name = Break Block keybind.break_block.name = Break Block
keybind.deselect.name = Deselect keybind.deselect.name = Deselect
keybind.shoot.name = Shoot keybind.shoot.name = Shoot
keybind.zoom_hold.name = Zoom Hold
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Pause keybind.pause.name = Pause

View File

@@ -653,7 +653,6 @@ keybind.pick.name = Pick Block
keybind.break_block.name = Break Block keybind.break_block.name = Break Block
keybind.deselect.name = Deselect keybind.deselect.name = Deselect
keybind.shoot.name = Shoot keybind.shoot.name = Shoot
keybind.zoom_hold.name = Zoom Hold
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Pause keybind.pause.name = Pause

View File

@@ -699,7 +699,6 @@ keybind.pick.name = Wybierz Blok
keybind.break_block.name = Zniszcz Blok keybind.break_block.name = Zniszcz Blok
keybind.deselect.name = Odznacz keybind.deselect.name = Odznacz
keybind.shoot.name = Strzelanie keybind.shoot.name = Strzelanie
keybind.zoom_hold.name = Inicjator przybliżania
keybind.zoom.name = Przybliżanie keybind.zoom.name = Przybliżanie
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Pauza keybind.pause.name = Pauza

View File

@@ -652,7 +652,6 @@ keybind.pick.name = Pegar bloco
keybind.break_block.name = Quebrar bloco keybind.break_block.name = Quebrar bloco
keybind.deselect.name = Deselecionar keybind.deselect.name = Deselecionar
keybind.shoot.name = Atirar keybind.shoot.name = Atirar
keybind.zoom_hold.name = segurar_zoom
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Pausar keybind.pause.name = Pausar

View File

@@ -700,7 +700,6 @@ keybind.pick.name = Pegar bloco
keybind.break_block.name = Quebrar bloco keybind.break_block.name = Quebrar bloco
keybind.deselect.name = Deselecionar keybind.deselect.name = Deselecionar
keybind.shoot.name = Atirar keybind.shoot.name = Atirar
keybind.zoom_hold.name = segurar Zoom
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Pausar keybind.pause.name = Pausar

View File

@@ -704,7 +704,6 @@ keybind.pick.name = Выбрать блок
keybind.break_block.name = Разрушить блок keybind.break_block.name = Разрушить блок
keybind.deselect.name = Снять выделение keybind.deselect.name = Снять выделение
keybind.shoot.name = Выстрел keybind.shoot.name = Выстрел
keybind.zoom_hold.name = Управление масштабом
keybind.zoom.name = Приблизить/Отдалить keybind.zoom.name = Приблизить/Отдалить
keybind.menu.name = Меню keybind.menu.name = Меню
keybind.pause.name = Пауза keybind.pause.name = Пауза

View File

@@ -652,7 +652,6 @@ keybind.pick.name = Pick Block
keybind.break_block.name = Break Block keybind.break_block.name = Break Block
keybind.deselect.name = Deselect keybind.deselect.name = Deselect
keybind.shoot.name = Shoot keybind.shoot.name = Shoot
keybind.zoom_hold.name = Zoom Hold
keybind.zoom.name = Zoom keybind.zoom.name = Zoom
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Pause keybind.pause.name = Pause

View File

@@ -652,7 +652,6 @@ keybind.pick.name = Pick Block
keybind.break_block.name = Break Block keybind.break_block.name = Break Block
keybind.deselect.name = Eldeki yapiyi birak keybind.deselect.name = Eldeki yapiyi birak
keybind.shoot.name = Sik keybind.shoot.name = Sik
keybind.zoom_hold.name = Yaklasma basili tutmasi
keybind.zoom.name = Yaklas keybind.zoom.name = Yaklas
keybind.menu.name = Menu keybind.menu.name = Menu
keybind.pause.name = Durdur keybind.pause.name = Durdur

View File

@@ -652,7 +652,6 @@ keybind.pick.name = Blok Seç
keybind.break_block.name = Blok Kır keybind.break_block.name = Blok Kır
keybind.deselect.name = Seçimleri Kaldır keybind.deselect.name = Seçimleri Kaldır
keybind.shoot.name = Ateş Et keybind.shoot.name = Ateş Et
keybind.zoom_hold.name = Zumu Sabit Tutma
keybind.zoom.name = Zum keybind.zoom.name = Zum
keybind.menu.name = Menü keybind.menu.name = Menü
keybind.pause.name = Durdur keybind.pause.name = Durdur

View File

@@ -696,7 +696,6 @@ keybind.pick.name = Вибрати блок
keybind.break_block.name = Зламати блок keybind.break_block.name = Зламати блок
keybind.deselect.name = Скасувати keybind.deselect.name = Скасувати
keybind.shoot.name = Постріл keybind.shoot.name = Постріл
keybind.zoom_hold.name = Керування масштабом
keybind.zoom.name = Приблизити keybind.zoom.name = Приблизити
keybind.menu.name = Меню keybind.menu.name = Меню
keybind.pause.name = Пауза keybind.pause.name = Пауза

View File

@@ -699,7 +699,6 @@ keybind.pick.name = 选择方块
keybind.break_block.name = 破坏方块 keybind.break_block.name = 破坏方块
keybind.deselect.name = 取消选择 keybind.deselect.name = 取消选择
keybind.shoot.name = 射击 keybind.shoot.name = 射击
keybind.zoom_hold.name = 按住调整缩放
keybind.zoom.name = 缩放 keybind.zoom.name = 缩放
keybind.menu.name = 菜单 keybind.menu.name = 菜单
keybind.pause.name = 暂停 keybind.pause.name = 暂停

View File

@@ -680,7 +680,6 @@ keybind.pick.name = 選擇方塊
keybind.break_block.name = 移除方塊 keybind.break_block.name = 移除方塊
keybind.deselect.name = 取消選取 keybind.deselect.name = 取消選取
keybind.shoot.name = 射擊 keybind.shoot.name = 射擊
keybind.zoom_hold.name = 按住縮放
keybind.zoom.name = 縮放 keybind.zoom.name = 縮放
keybind.menu.name = 主選單 keybind.menu.name = 主選單
keybind.pause.name = 暫停遊戲 keybind.pause.name = 暫停遊戲

View File

@@ -139,9 +139,19 @@ public class EventType{
} }
/** Called when a player withdraws items from a block. Tutorial only.*/ /** Called when the player withdraws items from a block. */
public static class WithdrawEvent{ public static class WithdrawEvent{
public final Tile tile;
public final Player player;
public final Item item;
public final int amount;
public WithdrawEvent(Tile tile, Player player, Item item, int amount){
this.tile = tile;
this.player = player;
this.item = item;
this.amount = amount;
}
} }
/** Called when a player deposits items to a block.*/ /** Called when a player deposits items to a block.*/

View File

@@ -40,8 +40,7 @@ public enum Binding implements KeyBind{
block_select_08(KeyCode.NUM_8), block_select_08(KeyCode.NUM_8),
block_select_09(KeyCode.NUM_9), block_select_09(KeyCode.NUM_9),
block_select_10(KeyCode.NUM_0), block_select_10(KeyCode.NUM_0),
zoom_hold(KeyCode.CONTROL_LEFT, "view"), zoom(new Axis(KeyCode.SCROLL), "view"),
zoom(new Axis(KeyCode.SCROLL)),
menu(Core.app.getType() == ApplicationType.Android ? KeyCode.BACK : KeyCode.ESCAPE), menu(Core.app.getType() == ApplicationType.Android ? KeyCode.BACK : KeyCode.ESCAPE),
fullscreen(KeyCode.F11), fullscreen(KeyCode.F11),
pause(KeyCode.SPACE), pause(KeyCode.SPACE),

View File

@@ -149,8 +149,8 @@ public class DesktopInput extends InputHandler{
if(state.is(State.menu) || Core.scene.hasDialog()) return; if(state.is(State.menu) || Core.scene.hasDialog()) return;
//zoom things //zoom camera
if(Math.abs(Core.input.axisTap(Binding.zoom)) > 0 && Core.input.keyDown(Binding.zoom_hold)){ if(Math.abs(Core.input.axisTap(Binding.zoom)) > 0 && !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((block == null || !block.rotate) && selectRequests.isEmpty()))){
renderer.scaleCamera(Core.input.axisTap(Binding.zoom)); renderer.scaleCamera(Core.input.axisTap(Binding.zoom));
} }
@@ -182,8 +182,7 @@ public class DesktopInput extends InputHandler{
selectScale = 0f; selectScale = 0f;
} }
if(!Core.input.keyDown(Binding.zoom_hold) && Math.abs((int)Core.input.axisTap(Binding.rotate)) > 0){ if(!Core.input.keyDown(Binding.diagonal_placement) && Math.abs((int)Core.input.axisTap(Binding.rotate)) > 0){
rotation = Mathf.mod(rotation + (int)Core.input.axisTap(Binding.rotate), 4); rotation = Mathf.mod(rotation + (int)Core.input.axisTap(Binding.rotate), 4);
if(sreq != null){ if(sreq != null){

View File

@@ -587,8 +587,8 @@ public class MobileInput extends InputHandler implements GestureListener{
mode = none; mode = none;
} }
//zoom things //zoom camera
if(Math.abs(Core.input.axisTap(Binding.zoom)) > 0 && (Core.input.keyDown(Binding.zoom_hold))){ if(Math.abs(Core.input.axisTap(Binding.zoom)) > 0 && !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((block == null || !block.rotate) && selectRequests.isEmpty()))){
renderer.scaleCamera(Core.input.axisTap(Binding.zoom)); renderer.scaleCamera(Core.input.axisTap(Binding.zoom));
} }

View File

@@ -42,6 +42,7 @@ public class BlockInventoryFragment extends Fragment{
int removed = tile.block().removeStack(tile, item, amount); int removed = tile.block().removeStack(tile, item, amount);
player.addItem(item, removed); player.addItem(item, removed);
Events.fire(new WithdrawEvent(tile, player, item, amount));
for(int j = 0; j < Mathf.clamp(removed / 3, 1, 8); j++){ for(int j = 0; j < Mathf.clamp(removed / 3, 1, 8); j++){
Time.run(j * 3f, () -> Call.transferItemEffect(item, tile.drawx(), tile.drawy(), player)); Time.run(j * 3f, () -> Call.transferItemEffect(item, tile.drawx(), tile.drawy(), player));
} }
@@ -100,7 +101,7 @@ public class BlockInventoryFragment extends Fragment{
holding = false; holding = false;
holdTime = 0f; holdTime = 0f;
Events.fire(new WithdrawEvent()); if(net.client()) Events.fire(new WithdrawEvent(tile, player, lastItem, amount));
} }
} }
@@ -153,7 +154,7 @@ public class BlockInventoryFragment extends Fragment{
lastItem = item; lastItem = item;
holding = true; holding = true;
holdTime = 0f; holdTime = 0f;
Events.fire(new WithdrawEvent()); if(net.client()) Events.fire(new WithdrawEvent(tile, player, item, amount));
} }
return true; return true;
} }

View File

@@ -147,8 +147,8 @@ public class MessageBlock extends Block{
} }
public class MessageBlockEntity extends TileEntity{ public class MessageBlockEntity extends TileEntity{
protected String message = ""; public String message = "";
protected String[] lines = {""}; public String[] lines = {""};
@Override @Override
public void write(DataOutput stream) throws IOException{ public void write(DataOutput stream) throws IOException{