Turrets can properly replace eachother, cores can replace conveyors and minor cleanup. (#4841)
This commit is contained in:
@@ -1370,16 +1370,12 @@ public class Blocks implements ContentList{
|
|||||||
requirements(Category.effect, with(Items.titanium, 250, Items.thorium, 125));
|
requirements(Category.effect, with(Items.titanium, 250, Items.thorium, 125));
|
||||||
size = 3;
|
size = 3;
|
||||||
itemCapacity = 1000;
|
itemCapacity = 1000;
|
||||||
flags = EnumSet.of(BlockFlag.storage);
|
|
||||||
group = BlockGroup.transportation;
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
container = new StorageBlock("container"){{
|
container = new StorageBlock("container"){{
|
||||||
requirements(Category.effect, with(Items.titanium, 100));
|
requirements(Category.effect, with(Items.titanium, 100));
|
||||||
size = 2;
|
size = 2;
|
||||||
itemCapacity = 300;
|
itemCapacity = 300;
|
||||||
flags = EnumSet.of(BlockFlag.storage);
|
|
||||||
group = BlockGroup.transportation;
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
unloader = new Unloader("unloader"){{
|
unloader = new Unloader("unloader"){{
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package mindustry.world.blocks.defense.turrets;
|
package mindustry.world.blocks.defense.turrets;
|
||||||
|
|
||||||
|
import arc.struct.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
@@ -27,6 +28,9 @@ public class BaseTurret extends Block{
|
|||||||
update = true;
|
update = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
outlineIcon = true;
|
outlineIcon = true;
|
||||||
|
priority = TargetPriority.turret;
|
||||||
|
group = BlockGroup.turrets;
|
||||||
|
flags = EnumSet.of(BlockFlag.turret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -93,12 +93,6 @@ public class Turret extends ReloadTurret{
|
|||||||
|
|
||||||
public Turret(String name){
|
public Turret(String name){
|
||||||
super(name);
|
super(name);
|
||||||
priority = TargetPriority.turret;
|
|
||||||
update = true;
|
|
||||||
solid = true;
|
|
||||||
group = BlockGroup.turrets;
|
|
||||||
flags = EnumSet.of(BlockFlag.turret);
|
|
||||||
outlineIcon = true;
|
|
||||||
liquidCapacity = 20f;
|
liquidCapacity = 20f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ public class CoreBlock extends StorageBlock{
|
|||||||
unitCapModifier = 10;
|
unitCapModifier = 10;
|
||||||
loopSound = Sounds.respawning;
|
loopSound = Sounds.respawning;
|
||||||
loopSoundVolume = 1f;
|
loopSoundVolume = 1f;
|
||||||
group = BlockGroup.none;
|
|
||||||
drawDisabled = false;
|
drawDisabled = false;
|
||||||
canOverdrive = false;
|
canOverdrive = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ public class StorageBlock extends Block{
|
|||||||
solid = true;
|
solid = true;
|
||||||
update = false;
|
update = false;
|
||||||
destructible = true;
|
destructible = true;
|
||||||
group = BlockGroup.storage;
|
group = BlockGroup.transportation;
|
||||||
|
flags = EnumSet.of(BlockFlag.storage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package mindustry.world.meta;
|
package mindustry.world.meta;
|
||||||
|
|
||||||
public enum BlockGroup{
|
public enum BlockGroup{
|
||||||
none, walls(true), projectors(true), turrets, transportation(true), power, liquids(true), drills, storage, units, logic(true);
|
none, walls(true), projectors(true), turrets(true), transportation(true), power, liquids(true), drills, units, logic(true);
|
||||||
|
|
||||||
/** if true, any block in this category replaces any other block in this category. */
|
/** if true, any block in this category replaces any other block in this category. */
|
||||||
public final boolean anyReplace;
|
public final boolean anyReplace;
|
||||||
|
|||||||
Reference in New Issue
Block a user