diff --git a/core/src/mindustry/core/Control.java b/core/src/mindustry/core/Control.java index ffb45b182f..1c0d2cf267 100644 --- a/core/src/mindustry/core/Control.java +++ b/core/src/mindustry/core/Control.java @@ -490,7 +490,7 @@ public class Control implements ApplicationListener, Loadable{ //unlock core items var core = state.rules.defaultTeam.core(); - if(!net.client() && core != null){ + if(!net.client() && core != null && state.isCampaign()){ core.items.each((i, a) -> i.unlock()); } diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index 3e976642a7..c38bec0afa 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -123,7 +123,7 @@ public class Logic implements ApplicationListener{ }); Events.on(SectorCaptureEvent.class, e -> { - if(!net.client()){ + if(!net.client() && e.sector == state.getSector()){ for(Tile tile : world.tiles){ //convert all blocks to neutral, randomly killing them if(tile.isCenter() && tile.build != null && tile.build.team == state.rules.waveTeam){ diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 9cfc87f5e9..2dc21c8c66 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -519,7 +519,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, public void dumpLiquid(Liquid liquid){ int dump = this.cdump; - if(!net.client()) liquid.unlock(); + if(!net.client() && state.isCampaign()) liquid.unlock(); for(int i = 0; i < proximity.size; i++){ incrementDump(proximity.size); @@ -620,7 +620,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, */ public void offload(Item item){ int dump = this.cdump; - if(!net.client()) item.unlock(); + if(!net.client() && state.isCampaign()) item.unlock(); for(int i = 0; i < proximity.size; i++){ incrementDump(proximity.size); diff --git a/core/src/mindustry/entities/comp/WeaponsComp.java b/core/src/mindustry/entities/comp/WeaponsComp.java index ab4321393a..8a8d17dd60 100644 --- a/core/src/mindustry/entities/comp/WeaponsComp.java +++ b/core/src/mindustry/entities/comp/WeaponsComp.java @@ -24,8 +24,8 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc, Statusc{ /** weapon mount array, never null */ @SyncLocal WeaponMount[] mounts = {}; - @ReadOnly transient float aimX, aimY; @ReadOnly transient boolean isRotate; + transient float aimX, aimY; boolean isShooting; float ammo; diff --git a/core/src/mindustry/entities/units/AIController.java b/core/src/mindustry/entities/units/AIController.java index c572aa368f..40d509b116 100644 --- a/core/src/mindustry/entities/units/AIController.java +++ b/core/src/mindustry/entities/units/AIController.java @@ -142,6 +142,10 @@ public class AIController implements UnitController{ mount.rotate = shoot; unit.isShooting |= shoot; + if(shoot){ + unit.aimX = mount.aimX; + unit.aimY = mount.aimY; + } } } diff --git a/core/src/mindustry/type/Sector.java b/core/src/mindustry/type/Sector.java index 89b650dd83..c38d3c6b04 100644 --- a/core/src/mindustry/type/Sector.java +++ b/core/src/mindustry/type/Sector.java @@ -198,7 +198,7 @@ public class Sector{ } public String toString(){ - return planet.name + "#" + id; + return planet.name + "#" + id + " (" + name() + ")"; } /** Projects this sector onto a 4-corner square for use in map gen. diff --git a/core/src/mindustry/ui/dialogs/ResearchDialog.java b/core/src/mindustry/ui/dialogs/ResearchDialog.java index c6d3f8409f..ccefa203d0 100644 --- a/core/src/mindustry/ui/dialogs/ResearchDialog.java +++ b/core/src/mindustry/ui/dialogs/ResearchDialog.java @@ -61,6 +61,7 @@ public class ResearchDialog extends BaseDialog{ for(Sector sector : planet.sectors){ if(sector.hasSave() && sector.hasBase()){ ItemSeq cached = sector.items(); + cache.put(sector, cached); cached.each((item, amount) -> { values[item.id] += amount; total += amount; diff --git a/core/src/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/mindustry/world/blocks/defense/turrets/Turret.java index 0a7777daa5..43465fface 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/Turret.java @@ -101,7 +101,7 @@ public abstract class Turret extends ReloadTurret{ super.setStats(); stats.add(Stat.inaccuracy, (int)inaccuracy, StatUnit.degrees); - stats.add(Stat.reload, 60f / reloadTime * shots, StatUnit.none); + stats.add(Stat.reload, 60f / reloadTime * (alternate ? 1 : shots), StatUnit.none); stats.add(Stat.targetsAir, targetAir); stats.add(Stat.targetsGround, targetGround); }