mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 06:51:30 -08:00
parent
3c36749990
commit
b46676014b
8 changed files with 12 additions and 7 deletions
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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){
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue