Inventory constant cleanup
This commit is contained in:
@@ -33,7 +33,7 @@ import static arc.scene.actions.Actions.*;
|
|||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class UI implements ApplicationListener, Loadable{
|
public class UI implements ApplicationListener, Loadable{
|
||||||
private static String billions, millions, thousands;
|
public static String billions, millions, thousands;
|
||||||
|
|
||||||
public static PixmapPacker packer;
|
public static PixmapPacker packer;
|
||||||
|
|
||||||
|
|||||||
@@ -285,8 +285,7 @@ public class Weapon implements Cloneable{
|
|||||||
can && //must be able to shoot
|
can && //must be able to shoot
|
||||||
(!useAmmo || unit.ammo > 0 || !state.rules.unitAmmo || unit.team.rules().infiniteAmmo) && //check ammo
|
(!useAmmo || unit.ammo > 0 || !state.rules.unitAmmo || unit.team.rules().infiniteAmmo) && //check ammo
|
||||||
(!alternate || mount.side == flipSprite) &&
|
(!alternate || mount.side == flipSprite) &&
|
||||||
//TODO checking for velocity this way isn't entirely correct
|
unit.vel.len() >= mount.weapon.minShootVelocity && //check velocity requirements
|
||||||
(unit.vel.len() >= mount.weapon.minShootVelocity || (net.active() && !unit.isLocal())) && //check velocity requirements
|
|
||||||
mount.reload <= 0.0001f && //reload has to be 0
|
mount.reload <= 0.0001f && //reload has to be 0
|
||||||
Angles.within(rotate ? mount.rotation : unit.rotation, mount.targetRotation, mount.weapon.shootCone) //has to be within the cone
|
Angles.within(rotate ? mount.rotation : unit.rotation, mount.targetRotation, mount.weapon.shootCone) //has to be within the cone
|
||||||
){
|
){
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import arc.scene.ui.layout.Stack;
|
|||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
|
import mindustry.core.*;
|
||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
@@ -200,9 +201,9 @@ public class BlockInventoryFragment extends Fragment{
|
|||||||
private String round(float f){
|
private String round(float f){
|
||||||
f = (int)f;
|
f = (int)f;
|
||||||
if(f >= 1000000){
|
if(f >= 1000000){
|
||||||
return (int)(f / 1000000f) + "[gray]" + Core.bundle.getOrNull("unit.millions") + "[]";
|
return (int)(f / 1000000f) + "[gray]" + UI.millions;
|
||||||
}else if(f >= 1000){
|
}else if(f >= 1000){
|
||||||
return (int)(f / 1000) + Core.bundle.getOrNull("unit.thousands");
|
return (int)(f / 1000) + UI.thousands;
|
||||||
}else{
|
}else{
|
||||||
return (int)f + "";
|
return (int)f + "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ public class CoreBlock extends StorageBlock{
|
|||||||
@Override
|
@Override
|
||||||
public void afterDestroyed(){
|
public void afterDestroyed(){
|
||||||
if(state.rules.coreCapture){
|
if(state.rules.coreCapture){
|
||||||
tile.setBlock(block, lastDamage);
|
tile.setNet(block, lastDamage, 0);
|
||||||
//core is invincible for several seconds to prevent recapture
|
//core is invincible for several seconds to prevent recapture
|
||||||
((CoreBuild)tile.build).iframes = captureInvicibility;
|
((CoreBuild)tile.build).iframes = captureInvicibility;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user