Merge pull request #2892 from DeltaNedas/storage

make storageblock instantiable
This commit is contained in:
Anuken
2020-10-10 11:19:05 -04:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@ -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"){{

View File

@ -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)

View File

@ -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