Fixed #3431 / Fixed #3432 / Fixed #3429 / Fixed #3435 / Fixed #3434

This commit is contained in:
Anuken
2020-11-17 10:18:08 -05:00
parent 3c36749990
commit b46676014b
8 changed files with 12 additions and 7 deletions

View File

@@ -490,7 +490,7 @@ public class Control implements ApplicationListener, Loadable{
//unlock core items //unlock core items
var core = state.rules.defaultTeam.core(); 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()); core.items.each((i, a) -> i.unlock());
} }

View File

@@ -123,7 +123,7 @@ public class Logic implements ApplicationListener{
}); });
Events.on(SectorCaptureEvent.class, e -> { Events.on(SectorCaptureEvent.class, e -> {
if(!net.client()){ if(!net.client() && e.sector == state.getSector()){
for(Tile tile : world.tiles){ for(Tile tile : world.tiles){
//convert all blocks to neutral, randomly killing them //convert all blocks to neutral, randomly killing them
if(tile.isCenter() && tile.build != null && tile.build.team == state.rules.waveTeam){ if(tile.isCenter() && tile.build != null && tile.build.team == state.rules.waveTeam){

View File

@@ -519,7 +519,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
public void dumpLiquid(Liquid liquid){ public void dumpLiquid(Liquid liquid){
int dump = this.cdump; int dump = this.cdump;
if(!net.client()) liquid.unlock(); if(!net.client() && state.isCampaign()) liquid.unlock();
for(int i = 0; i < proximity.size; i++){ for(int i = 0; i < proximity.size; i++){
incrementDump(proximity.size); incrementDump(proximity.size);
@@ -620,7 +620,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
*/ */
public void offload(Item item){ public void offload(Item item){
int dump = this.cdump; int dump = this.cdump;
if(!net.client()) item.unlock(); if(!net.client() && state.isCampaign()) item.unlock();
for(int i = 0; i < proximity.size; i++){ for(int i = 0; i < proximity.size; i++){
incrementDump(proximity.size); incrementDump(proximity.size);

View File

@@ -24,8 +24,8 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc, Statusc{
/** weapon mount array, never null */ /** weapon mount array, never null */
@SyncLocal WeaponMount[] mounts = {}; @SyncLocal WeaponMount[] mounts = {};
@ReadOnly transient float aimX, aimY;
@ReadOnly transient boolean isRotate; @ReadOnly transient boolean isRotate;
transient float aimX, aimY;
boolean isShooting; boolean isShooting;
float ammo; float ammo;

View File

@@ -142,6 +142,10 @@ public class AIController implements UnitController{
mount.rotate = shoot; mount.rotate = shoot;
unit.isShooting |= shoot; unit.isShooting |= shoot;
if(shoot){
unit.aimX = mount.aimX;
unit.aimY = mount.aimY;
}
} }
} }

View File

@@ -198,7 +198,7 @@ public class Sector{
} }
public String toString(){ 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. /** Projects this sector onto a 4-corner square for use in map gen.

View File

@@ -61,6 +61,7 @@ public class ResearchDialog extends BaseDialog{
for(Sector sector : planet.sectors){ for(Sector sector : planet.sectors){
if(sector.hasSave() && sector.hasBase()){ if(sector.hasSave() && sector.hasBase()){
ItemSeq cached = sector.items(); ItemSeq cached = sector.items();
cache.put(sector, cached);
cached.each((item, amount) -> { cached.each((item, amount) -> {
values[item.id] += amount; values[item.id] += amount;
total += amount; total += amount;

View File

@@ -101,7 +101,7 @@ public abstract class Turret extends ReloadTurret{
super.setStats(); super.setStats();
stats.add(Stat.inaccuracy, (int)inaccuracy, StatUnit.degrees); 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.targetsAir, targetAir);
stats.add(Stat.targetsGround, targetGround); stats.add(Stat.targetsGround, targetGround);
} }