This commit is contained in:
Anuken 2022-05-06 20:07:41 -04:00
parent bb6b8b020d
commit 9c0fd7c4c1
6 changed files with 10 additions and 6 deletions

View File

@ -3752,7 +3752,7 @@ public class Blocks{
requirements(Category.turret, with(Items.beryllium, 150, Items.silicon, 200, Items.graphite, 200, Items.tungsten, 50));
ammo(
Items.graphite, new BasicBulletType(8f, 44){{
Items.graphite, new BasicBulletType(8f, 41){{
knockback = 4f;
width = 25f;
hitSize = 7f;
@ -3797,7 +3797,7 @@ public class Blocks{
recoilAmount = 2f;
restitution = 0.03f;
range = 125;
shootCone = 50f;
shootCone = 40f;
scaledHealth = 210;
rotateSpeed = 3f;

View File

@ -76,6 +76,7 @@ public class Planets{
r.fog = true;
r.staticFog = true;
r.lighting = false;
r.coreDestroyClear = true;
r.onlyDepositCore = true; //TODO not sure
};
@ -124,6 +125,7 @@ public class Planets{
allowWaveSimulation = true;
allowSectorInvasion = true;
allowLaunchSchematics = true;
enemyCoreSpawnReplace = true;
allowLaunchLoadout = true;
ruleSetter = r -> {
r.waveTeam = Team.crux;

View File

@ -161,9 +161,7 @@ public class Logic implements ApplicationListener{
});
Events.on(BlockDestroyEvent.class, e -> {
//TODO maybe make it a separate rule?
//makes cores go derelict in RTS mode, helps clean things up
if(e.tile.build instanceof CoreBuild core && core.team.isAI() && core.team.rules().rtsAi){
if(e.tile.build instanceof CoreBuild core && core.team.isAI() && state.rules.coreDestroyClear){
Core.app.post(() -> {
core.team.data().timeDestroy(core.x, core.y, state.rules.enemyCoreBuildRadius);
});

View File

@ -84,6 +84,8 @@ public class Rules{
public boolean cleanupDeadTeams = true;
/** If true, items can only be deposited in the core. */
public boolean onlyDepositCore = false;
/** If true, every enemy block in the radius of the (enemy) core is destroyed upon death. Used for campaign maps. */
public boolean coreDestroyClear = false;
/** Radius around enemy wave drop zones.*/
public float dropZoneRadius = 300f;
/** Time between waves in ticks. */

View File

@ -95,6 +95,8 @@ public class Planet extends UnlockableContent{
public boolean allowSectorInvasion = false;
/** If true, sectors saves are cleared when lost. */
public boolean clearSectorOnLose = false;
/** If true, enemy cores are replaced with spawnpoints on this planet (for invasions) */
public boolean enemyCoreSpawnReplace = false;
/** If true, blocks in the radius of the core will be removed and "built up" in a shockwave upon landing. */
public boolean prebuildBase = true;
/** If true, waves are created on sector loss. TODO remove. */

View File

@ -308,7 +308,7 @@ public class CoreBlock extends StorageBlock{
}
//add a spawn to the map for future reference - waves should be disabled, so it shouldn't matter
if(state.isCampaign() && team == state.rules.waveTeam && team.cores().size <= 1){
if(state.isCampaign() && team == state.rules.waveTeam && team.cores().size <= 1 && state.rules.sector.planet.enemyCoreSpawnReplace){
//do not recache
tile.setOverlayQuiet(Blocks.spawn);