Fixed #3082
This commit is contained in:
@@ -288,6 +288,10 @@ public class Schematics implements Loadable{
|
|||||||
return loadouts.get(block, Seq::new);
|
return loadouts.get(block, Seq::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ObjectMap<CoreBlock, Seq<Schematic>> getLoadouts(){
|
||||||
|
return loadouts;
|
||||||
|
}
|
||||||
|
|
||||||
/** Checks a schematic for deployment validity and adds it to the cache. */
|
/** Checks a schematic for deployment validity and adds it to the cache. */
|
||||||
private void checkLoadout(Schematic s, boolean validate){
|
private void checkLoadout(Schematic s, boolean validate){
|
||||||
Stile core = s.tiles.find(t -> t.block instanceof CoreBlock);
|
Stile core = s.tiles.find(t -> t.block instanceof CoreBlock);
|
||||||
|
|||||||
@@ -99,18 +99,24 @@ public class LaunchLoadoutDialog extends BaseDialog{
|
|||||||
cont.pane(t -> {
|
cont.pane(t -> {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for(Schematic s : schematics.getLoadouts(core)){
|
for(var entry : schematics.getLoadouts()){
|
||||||
|
if(entry.key.size <= core.size){
|
||||||
|
for(Schematic s : entry.value){
|
||||||
|
|
||||||
t.button(b -> b.add(new SchematicImage(s)), Styles.togglet, () -> {
|
t.button(b -> b.add(new SchematicImage(s)), Styles.togglet, () -> {
|
||||||
selected = s;
|
selected = s;
|
||||||
update.run();
|
update.run();
|
||||||
rebuildItems.run();
|
rebuildItems.run();
|
||||||
}).group(group).pad(4).disabled(!sitems.has(s.requirements())).checked(s == selected).size(200f);
|
}).group(group).pad(4).disabled(!sitems.has(s.requirements())).checked(s == selected).size(200f);
|
||||||
|
|
||||||
if(++i % cols == 0){
|
if(++i % cols == 0){
|
||||||
t.row();
|
t.row();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}).growX().get().setScrollingDisabled(true, false);
|
}).growX().get().setScrollingDisabled(true, false);
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|||||||
Reference in New Issue
Block a user