mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-08 14:24:52 +07:00
Core incineration tweaks
This commit is contained in:
parent
0cfdacdd28
commit
af636f74fc
@ -57,6 +57,8 @@ public class Logic implements ApplicationListener{
|
||||
//when loading a 'damaged' sector, propagate the damage
|
||||
Events.on(SaveLoadEvent.class, e -> {
|
||||
if(state.isCampaign()){
|
||||
state.rules.coreIncinerates = true;
|
||||
|
||||
SectorInfo info = state.rules.sector.info;
|
||||
info.write();
|
||||
|
||||
@ -107,6 +109,7 @@ public class Logic implements ApplicationListener{
|
||||
if(!(state.getSector().preset != null && !state.getSector().preset.useAI)){
|
||||
state.rules.waveTeam.rules().ai = true;
|
||||
}
|
||||
state.rules.coreIncinerates = true;
|
||||
state.rules.waveTeam.rules().aiTier = state.getSector().threat * 0.8f;
|
||||
state.rules.waveTeam.rules().infiniteResources = true;
|
||||
|
||||
|
@ -233,7 +233,7 @@ public class CoreBlock extends StorageBlock{
|
||||
|
||||
@Override
|
||||
public int getMaximumAccepted(Item item){
|
||||
return incinerate() ? storageCapacity * 2 : storageCapacity;
|
||||
return state.rules.coreIncinerates ? storageCapacity * 2 : storageCapacity;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -318,10 +318,6 @@ public class CoreBlock extends StorageBlock{
|
||||
return tile instanceof StorageBuild b && (b.linkedCore == core || b.linkedCore == null);
|
||||
}
|
||||
|
||||
public boolean incinerate(){
|
||||
return state.isCampaign() || state.rules.coreIncinerates;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float handleDamage(float amount){
|
||||
if(player != null && team == player.team()){
|
||||
@ -386,7 +382,7 @@ public class CoreBlock extends StorageBlock{
|
||||
}else{
|
||||
super.handleItem(source, item);
|
||||
}
|
||||
}else if(incinerate()){
|
||||
}else if(state.rules.coreIncinerates){
|
||||
if(items.get(item) >= storageCapacity){
|
||||
//create item incineration effect at random intervals
|
||||
if(!noEffect){
|
||||
|
Loading…
Reference in New Issue
Block a user