mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
Fixed bizzare single type generator initialization
This commit is contained in:
parent
dd3fd97b43
commit
0509c28576
@ -1083,11 +1083,12 @@ public class Blocks implements ContentList{
|
||||
size = 2;
|
||||
}};
|
||||
|
||||
differentialGenerator = new SingleTypeGenerator(true, false, "differential-generator"){{
|
||||
differentialGenerator = new SingleTypeGenerator("differential-generator"){{
|
||||
requirements(Category.power, ItemStack.with(Items.copper, 70, Items.titanium, 50, Items.lead, 100, Items.silicon, 65, Items.metaglass, 50));
|
||||
powerProduction = 16f;
|
||||
itemDuration = 120f;
|
||||
hasLiquids = true;
|
||||
hasItems = true;
|
||||
size = 3;
|
||||
|
||||
consumes.item(Items.pyratite).optional(true, false);
|
||||
|
@ -289,9 +289,12 @@ public class ContentParser{
|
||||
}
|
||||
|
||||
currentMod = mod;
|
||||
boolean exists = Vars.content.getByName(type, name) != null;
|
||||
Content c = parsers.get(type).parse(mod.name, name, value);
|
||||
c.sourceFile = file;
|
||||
c.mod = mod;
|
||||
if(!exists){
|
||||
c.sourceFile = file;
|
||||
c.mod = mod;
|
||||
}
|
||||
checkNulls(c);
|
||||
return c;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import io.anuke.arc.math.*;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.mindustry.content.*;
|
||||
import io.anuke.mindustry.entities.*;
|
||||
import io.anuke.mindustry.entities.Effects.*;
|
||||
import io.anuke.mindustry.entities.type.*;
|
||||
import io.anuke.mindustry.type.*;
|
||||
import io.anuke.mindustry.world.*;
|
||||
@ -28,8 +29,8 @@ public class ItemLiquidGenerator extends PowerGenerator{
|
||||
/** Maximum liquid used per frame. */
|
||||
protected float maxLiquidGenerate = 0.4f;
|
||||
|
||||
protected Effects.Effect generateEffect = Fx.generatespark;
|
||||
protected Effects.Effect explodeEffect = Fx.generatespark;
|
||||
protected Effect generateEffect = Fx.generatespark;
|
||||
protected Effect explodeEffect = Fx.generatespark;
|
||||
protected Color heatColor = Color.valueOf("ff9b59");
|
||||
protected TextureRegion topRegion, liquidRegion;
|
||||
protected boolean randomlyExplode = true;
|
||||
|
@ -5,12 +5,9 @@ import io.anuke.mindustry.type.Liquid;
|
||||
|
||||
public class SingleTypeGenerator extends ItemLiquidGenerator{
|
||||
|
||||
public SingleTypeGenerator(boolean hasItems, boolean hasLiquids, String name){
|
||||
super(hasItems, hasLiquids, name);
|
||||
}
|
||||
|
||||
public SingleTypeGenerator(String name){
|
||||
super(name);
|
||||
defaults = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user