mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-04-27 07:50:54 -07:00
Block Fields for Modding (#2538)
* quickRotate * quickRotate and rotateArrow * rotateArrow * rotateArrow * Update contributors * quickRotate * removed rotateArrow * remove rotateArrow * removal
This commit is contained in:
parent
197b67f8c1
commit
b5b75656d1
4 changed files with 5 additions and 2 deletions
|
|
@ -89,3 +89,4 @@ Daniel Dusek
|
|||
DeltaNedas
|
||||
GioIacca9
|
||||
SnakkiZXZ
|
||||
sk7725
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ public class OverlayRenderer{
|
|||
build.drawDisabled();
|
||||
}
|
||||
|
||||
if(Core.input.keyDown(Binding.rotateplaced) && build.block.rotate && build.interactable(player.team())){
|
||||
if(Core.input.keyDown(Binding.rotateplaced) && build.block.rotate && build.block.quickRotate && build.interactable(player.team())){
|
||||
control.input.drawArrow(build.block, build.tileX(), build.tileY(), build.rotation, true);
|
||||
Draw.color(Pal.accent, 0.3f + Mathf.absin(4f, 0.2f));
|
||||
Fill.square(build.x, build.y, build.block.size * tilesize/2f);
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ public class DesktopInput extends InputHandler{
|
|||
cursorType = ui.unloadCursor;
|
||||
}
|
||||
|
||||
if(cursor.build != null && cursor.interactable(player.team()) && !isPlacing() && Math.abs(Core.input.axisTap(Binding.rotate)) > 0 && Core.input.keyDown(Binding.rotateplaced) && cursor.block().rotate){
|
||||
if(cursor.build != null && cursor.interactable(player.team()) && !isPlacing() && Math.abs(Core.input.axisTap(Binding.rotate)) > 0 && Core.input.keyDown(Binding.rotateplaced) && cursor.block().rotate && cursor.block().quickRotate){
|
||||
Call.rotateBlock(player, cursor.build, Core.input.axisTap(Binding.rotate) > 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,6 +195,8 @@ public class Block extends UnlockableContent{
|
|||
public float buildCostMultiplier = 1f;
|
||||
/** Whether this block has instant transfer.*/
|
||||
public boolean instantTransfer = false;
|
||||
/** Whether you can rotate this block with Keybind rotateplaced + Scroll Wheel. */
|
||||
public boolean quickRotate = true;
|
||||
|
||||
protected Prov<Building> entityType = null; //initialized later
|
||||
public ObjectMap<Class<?>, Cons2> configurations = new ObjectMap<>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue