Block classes are now responsible for flipping of blocks in schematics. (#6254)
This commit is contained in:
@@ -468,7 +468,7 @@ public class Block extends UnlockableContent{
|
||||
if(hasItems && configurable){
|
||||
bars.add("items", entity -> new Bar(() -> Core.bundle.format("bar.items", entity.items.total()), () -> Pal.items, () -> (float)entity.items.total() / itemCapacity));
|
||||
}
|
||||
|
||||
|
||||
if(unitCapModifier != 0){
|
||||
stats.add(Stat.maxUnits, (unitCapModifier < 0 ? "-" : "+") + Math.abs(unitCapModifier));
|
||||
}
|
||||
@@ -824,7 +824,7 @@ public class Block extends UnlockableContent{
|
||||
}
|
||||
|
||||
clipSize = Math.max(clipSize, size * tilesize);
|
||||
|
||||
|
||||
//only kept to ensure compatibility with v6 mods.
|
||||
if(expanded){
|
||||
clipSize += tilesize * 10f;
|
||||
@@ -989,4 +989,9 @@ public class Block extends UnlockableContent{
|
||||
packer.add(PageType.editor, name + "-icon-editor", editorBase);
|
||||
}
|
||||
|
||||
public void flipRotation(BuildPlan req, boolean x){
|
||||
if(x == (req.rotation % 2 == 0)){
|
||||
req.rotation = Mathf.mod(req.rotation + 2, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user