Merge remote-tracking branch 'origin/erekir' into erekir

This commit is contained in:
Epowerj
2022-05-09 12:54:28 -04:00
6 changed files with 9 additions and 4 deletions
@@ -72,7 +72,7 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{
}
boolean canPickupPayload(Payload pay){
return payloadUsed() + pay.size()*pay.size() <= type.payloadCapacity + 0.001f;
return payloadUsed() + pay.size()*pay.size() <= type.payloadCapacity + 0.001f && (type.pickupUnits || !(pay instanceof UnitPayload));
}
boolean hasPayload(){
+1 -1
View File
@@ -163,7 +163,7 @@ public class Universe{
//export to another sector
if(sector.info.destination != null){
Sector to = sector.info.destination;
if(to.hasBase()){
if(to.hasBase() && to.planet == planet){
ItemSeq items = new ItemSeq();
//calculated exported items to this sector
sector.info.export.each((item, stat) -> items.add(item, (int)(stat.mean * newSecondsPassed * sector.getProductionScale())));
@@ -162,6 +162,10 @@ public class MinimapRenderer{
//crisp pixels
dynamicTex.setFilter(TextureFilter.nearest);
if(worldSpace){
region.set(0f, 0f, 1f, 1f);
}
Tmp.tr1.set(dynamicTex);
Tmp.tr1.set(region.u, 1f - region.v, region.u2, 1f - region.v2);
@@ -19,7 +19,7 @@ public class MissileUnitType extends UnitType{
isEnemy = false;
useUnitCap = false;
allowedInPayloads = false;
aiController = MissileAI::new;
controller = u -> new MissileAI();
flying = true;
constructor = TimedKillUnit::create;
envEnabled = Env.any;
+1
View File
@@ -621,6 +621,7 @@ public class Block extends UnlockableContent implements Senseable{
public boolean canReplace(Block other){
if(other.alwaysReplace) return true;
if(other.privileged) return false;
return other.replaceable && (other != this || (rotate && quickRotate)) && this.group != BlockGroup.none && other.group == this.group &&
(size == other.size || (size >= other.size && ((subclass != null && subclass == other.subclass) || group.anyReplace)));
}
@@ -168,7 +168,7 @@ public class LaunchPad extends Block{
table.button(Icon.upOpen, Styles.cleari, () -> {
ui.planet.showSelect(state.rules.sector, other -> {
if(state.isCampaign()){
if(state.isCampaign() && other.planet == state.rules.sector.planet){
state.rules.sector.info.destination = other;
}
});