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
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());
}

View file

@ -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){

View file

@ -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);

View file

@ -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;

View file

@ -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;
}
}
}

View file

@ -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.

View file

@ -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;

View file

@ -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);
}