Core launch cost
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 237 B |
File diff suppressed because it is too large
Load Diff
@@ -159,7 +159,7 @@ public class Weathers implements ContentList{
|
|||||||
sandstorm = new Weather("sandstorm"){
|
sandstorm = new Weather("sandstorm"){
|
||||||
TextureRegion region;
|
TextureRegion region;
|
||||||
float yspeed = 0.3f, xspeed = 6f, padding = 110f, size = 110f, invDensity = 800f;
|
float yspeed = 0.3f, xspeed = 6f, padding = 110f, size = 110f, invDensity = 800f;
|
||||||
Vec2 force = new Vec2(0.4f, 0.01f);
|
Vec2 force = new Vec2(0.45f, 0.01f);
|
||||||
Color color = Color.valueOf("f7cba4");
|
Color color = Color.valueOf("f7cba4");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -247,6 +247,9 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
ent.block(Blocks.coreShard);
|
ent.block(Blocks.coreShard);
|
||||||
ent.lifetime(Vars.launchDuration);
|
ent.lifetime(Vars.launchDuration);
|
||||||
ent.add();
|
ent.add();
|
||||||
|
|
||||||
|
//remove launch requirements from core
|
||||||
|
player.team().core().items.remove(player.team().core().block.requirements);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void playSector(Sector sector){
|
public void playSector(Sector sector){
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import mindustry.mod.Mods.*;
|
|||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.storage.*;
|
import mindustry.world.blocks.storage.*;
|
||||||
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -32,8 +33,10 @@ public class Schematic implements Publishable, Comparable<Schematic>{
|
|||||||
IntIntMap amounts = new IntIntMap();
|
IntIntMap amounts = new IntIntMap();
|
||||||
|
|
||||||
tiles.each(t -> {
|
tiles.each(t -> {
|
||||||
|
if(t.block.buildVisibility == BuildVisibility.hidden) return;
|
||||||
|
|
||||||
for(ItemStack stack : t.block.requirements){
|
for(ItemStack stack : t.block.requirements){
|
||||||
amounts.getAndIncrement(stack.item.id, 0, stack.amount);
|
amounts.inc(stack.item.id, stack.amount);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Seq<ItemStack> stacks = new Seq<>();
|
Seq<ItemStack> stacks = new Seq<>();
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public class BaseGenerator{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO limit base size
|
||||||
float costBudget = 1000;
|
float costBudget = 1000;
|
||||||
|
|
||||||
Seq<Block> wallsSmall = content.blocks().select(b -> b instanceof Wall && b.size == 1);
|
Seq<Block> wallsSmall = content.blocks().select(b -> b instanceof Wall && b.size == 1);
|
||||||
|
|||||||
@@ -366,7 +366,8 @@ public class HudFragment extends Fragment{
|
|||||||
|
|
||||||
t.button("test launch", Icon.warning, () -> {
|
t.button("test launch", Icon.warning, () -> {
|
||||||
ui.planet.show(state.getSector(), ((CoreBlock)player.team().core().block).launchRange, player.team().core());
|
ui.planet.show(state.getSector(), ((CoreBlock)player.team().core().block).launchRange, player.team().core());
|
||||||
}).width(150f);
|
}).width(150f)
|
||||||
|
.disabled(!player.team().core().items.has(player.team().core().block.requirements)); //disable core when missing resources for launch
|
||||||
});
|
});
|
||||||
|
|
||||||
blockfrag.build(parent);
|
blockfrag.build(parent);
|
||||||
|
|||||||
@@ -629,11 +629,7 @@ public class Block extends UnlockableContent{
|
|||||||
//load specific team regions
|
//load specific team regions
|
||||||
teamRegions = new TextureRegion[Team.all.length];
|
teamRegions = new TextureRegion[Team.all.length];
|
||||||
for(Team team : Team.all){
|
for(Team team : Team.all){
|
||||||
if(team.hasPalette){
|
teamRegions[team.uid] = teamRegion.found() ? Core.atlas.find(name + "-team-" + team.name, teamRegion) : teamRegion;
|
||||||
teamRegions[team.uid] = Core.atlas.find(name + "-team-" + team.name);
|
|
||||||
}else{
|
|
||||||
teamRegions[team.uid] = teamRegion;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user