mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-08 23:07:33 +07:00
Merge pull request #2892 from DeltaNedas/storage
make storageblock instantiable
This commit is contained in:
@ -1358,14 +1358,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;
|
||||||
group = BlockGroup.storage;
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
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;
|
||||||
group = BlockGroup.storage;
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
unloader = new Unloader("unloader"){{
|
unloader = new Unloader("unloader"){{
|
||||||
|
@ -50,6 +50,7 @@ public class CoreBlock extends StorageBlock{
|
|||||||
unitCapModifier = 10;
|
unitCapModifier = 10;
|
||||||
activeSound = Sounds.respawning;
|
activeSound = Sounds.respawning;
|
||||||
activeSoundVolume = 1f;
|
activeSoundVolume = 1f;
|
||||||
|
group = BlockGroup.none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Remote(called = Loc.server)
|
@Remote(called = Loc.server)
|
||||||
|
@ -5,15 +5,16 @@ import arc.util.*;
|
|||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
public abstract class StorageBlock extends Block{
|
public class StorageBlock extends Block{
|
||||||
|
|
||||||
public StorageBlock(String name){
|
public StorageBlock(String name){
|
||||||
super(name);
|
super(name);
|
||||||
hasItems = true;
|
hasItems = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
update = false;
|
update = false;
|
||||||
destructible = true;
|
destructible = true;
|
||||||
|
group = BlockGroup.storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user