mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-09-22 13:01:12 +03:00
Merge branch 'master' of https://github.com/Anuken/Mindustry into array-textures
This commit is contained in:
@@ -82,7 +82,7 @@ public class MapContentView implements AssetView{
|
||||
list.add().size(h);
|
||||
}
|
||||
|
||||
list.button(content.content instanceof UnlockableContent u && (u.uiIcon.found() || u.fullIcon.found()) ? new TextureRegionDrawable(u.uiIcon.found() ? u.uiIcon : u.fullIcon) :
|
||||
list.button(content.content instanceof UnlockableContent u && u.uiIcon != null && (u.uiIcon.found() || u.fullIcon.found()) ? new TextureRegionDrawable(u.uiIcon.found() ? u.uiIcon : u.fullIcon) :
|
||||
contentIcons.get(content.type, Icon.warning), Styles.graySquarei, iconMed, () -> {}).touchable(Touchable.disabled).size(h);
|
||||
|
||||
list.button(("[accent]" + content.name + "\n") + "[lightgray]" + Core.bundle.get("content." + content.type), Styles.grayt, () -> {
|
||||
|
||||
@@ -630,6 +630,12 @@ public class TypeIO{
|
||||
int x = read.us();
|
||||
int y = read.us();
|
||||
Block block = Vars.content.block(read.us());
|
||||
if(block == null){
|
||||
// Skip unrecognised block IDs (e.g. from a modded client)
|
||||
read.b(); // consume rotation byte
|
||||
readClientPlanConfig(read); // consume config
|
||||
continue;
|
||||
}
|
||||
int rotation = (block.rotate ? read.b() : 0);
|
||||
Object config = readClientPlanConfig(read);
|
||||
BuildPlan plan = new BuildPlan(x, y, rotation, block, config);
|
||||
|
||||
@@ -197,13 +197,6 @@ public class DataPatcher{
|
||||
|
||||
parser.finishParsing();
|
||||
|
||||
for(var errored : dpMod.erroredContent){
|
||||
if(errored.minfo.error != null && errored.minfo.asset != null){
|
||||
errored.minfo.asset.warnings.add(errored.minfo.error);
|
||||
}
|
||||
Vars.content.remove(errored);
|
||||
}
|
||||
|
||||
addedContent.clear();
|
||||
Seq<Content> all = addedContent;
|
||||
|
||||
@@ -211,6 +204,13 @@ public class DataPatcher{
|
||||
all.addAll(arr.select(c -> c.minfo.mod == dpMod));
|
||||
}
|
||||
|
||||
for(var errored : dpMod.erroredContent){
|
||||
if(errored.minfo.error != null && errored.minfo.asset != null){
|
||||
errored.minfo.asset.warnings.add(errored.minfo.error);
|
||||
}
|
||||
Vars.content.remove(errored);
|
||||
}
|
||||
|
||||
for(var cont : all){
|
||||
try{
|
||||
cont.init();
|
||||
|
||||
@@ -575,6 +575,8 @@ public class LogicBlock extends Block{
|
||||
}
|
||||
|
||||
public void updateLinks(){
|
||||
if(linksVar == null) return;
|
||||
|
||||
int valids = links.count(l -> l.valid);
|
||||
executor.links = new Building[valids];
|
||||
executor.linkIds.clear();
|
||||
|
||||
Reference in New Issue
Block a user