Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2020-12-28 14:52:33 -05:00
7 changed files with 12 additions and 10 deletions

View File

@@ -15,9 +15,6 @@ If you are submitting a new block, make sure it has a name and description, and
If you are interested in adding a large mechanic/feature or changing large amounts of code, first contact me (Anuken) via [Discord](https://discord.gg/mindustry) (preferred method) or via e-mail (*anukendev@gmail.com*). If you are interested in adding a large mechanic/feature or changing large amounts of code, first contact me (Anuken) via [Discord](https://discord.gg/mindustry) (preferred method) or via e-mail (*anukendev@gmail.com*).
For most changes, this should not be necessary. I just want to know if you're doing something big so I can offer advice and/or make sure you're not wasting your time on it. For most changes, this should not be necessary. I just want to know if you're doing something big so I can offer advice and/or make sure you're not wasting your time on it.
### Do not include packed sprites in your pull request.
When making a pull request that changes or adds new sprites, do not add the modified atlas & `spritesX.png` files to your final pull request. These are a frequent source of conflicts.
## Style Guidelines ## Style Guidelines

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@@ -2055,6 +2055,7 @@ public class Blocks implements ContentList{
//TODO remove //TODO remove
launchPadLarge = new LaunchPad("launch-pad-large"){{ launchPadLarge = new LaunchPad("launch-pad-large"){{
requirements(Category.effect, BuildVisibility.debugOnly, ItemStack.with(Items.titanium, 200, Items.silicon, 150, Items.lead, 250, Items.plastanium, 75));
size = 4; size = 4;
itemCapacity = 300; itemCapacity = 300;
launchTime = 60f * 35; launchTime = 60f * 35;

View File

@@ -1,5 +1,6 @@
package mindustry.world.blocks.experimental; package mindustry.world.blocks.experimental;
import arc.*;
import arc.graphics.g2d.*; import arc.graphics.g2d.*;
import arc.util.*; import arc.util.*;
import mindustry.entities.units.*; import mindustry.entities.units.*;
@@ -46,12 +47,13 @@ public class BlockLoader extends PayloadAcceptor{
public void setBars(){ public void setBars(){
super.setBars(); super.setBars();
bars.add("progress", entity -> new Bar("bar.progress", Pal.ammo, ((BlockLoaderBuild)entity)::fraction)); bars.add("progress", (BlockLoaderBuild entity) -> new Bar(() -> Core.bundle.format("bar.items", entity.payload == null ? 0 : entity.payload.build.items.total()), () -> Pal.items, entity::fraction));
} }
@Override @Override
public void drawRequestRegion(BuildPlan req, Eachable<BuildPlan> list){ public void drawRequestRegion(BuildPlan req, Eachable<BuildPlan> list){
Draw.rect(region, req.drawx(), req.drawy()); Draw.rect(region, req.drawx(), req.drawy());
Draw.rect(inRegion, req.drawx(), req.drawy(), req.rotation * 90);
Draw.rect(outRegion, req.drawx(), req.drawy(), req.rotation * 90); Draw.rect(outRegion, req.drawx(), req.drawy(), req.rotation * 90);
Draw.rect(topRegion, req.drawx(), req.drawy()); Draw.rect(topRegion, req.drawx(), req.drawy());
} }
@@ -76,11 +78,14 @@ public class BlockLoader extends PayloadAcceptor{
Draw.rect(region, x, y); Draw.rect(region, x, y);
//draw input //draw input
boolean fallback = true;
for(int i = 0; i < 4; i++){ for(int i = 0; i < 4; i++){
if(blends(i) && i != rotation){ if(blends(i) && i != rotation){
Draw.rect(inRegion, x, y, (i * 90) - 180); Draw.rect(inRegion, x, y, (i * 90) - 180);
fallback = false;
} }
} }
if(fallback) Draw.rect(inRegion, x, y, rotation * 90);
Draw.rect(outRegion, x, y, rotdeg()); Draw.rect(outRegion, x, y, rotdeg());

View File

@@ -54,11 +54,6 @@ public class BlockUnloader extends BlockLoader{
return items.total() >= itemCapacity; return items.total() >= itemCapacity;
} }
@Override
public float fraction(){
return payload == null ? 0f : 1f - payload.build.items.total() / (float)payload.build.block.itemCapacity;
}
@Override @Override
public boolean shouldExport(){ public boolean shouldExport(){
return payload != null && (payload.block().hasItems && payload.build.items.empty()); return payload != null && (payload.block().hasItems && payload.build.items.empty());

View File

@@ -33,6 +33,7 @@ public class Reconstructor extends UnitBlock{
@Override @Override
public void drawRequestRegion(BuildPlan req, Eachable<BuildPlan> list){ public void drawRequestRegion(BuildPlan req, Eachable<BuildPlan> list){
Draw.rect(region, req.drawx(), req.drawy()); Draw.rect(region, req.drawx(), req.drawy());
Draw.rect(inRegion, req.drawx(), req.drawy(), req.rotation * 90);
Draw.rect(outRegion, req.drawx(), req.drawy(), req.rotation * 90); Draw.rect(outRegion, req.drawx(), req.drawy(), req.rotation * 90);
Draw.rect(topRegion, req.drawx(), req.drawy()); Draw.rect(topRegion, req.drawx(), req.drawy());
} }
@@ -127,11 +128,14 @@ public class Reconstructor extends UnitBlock{
Draw.rect(region, x, y); Draw.rect(region, x, y);
//draw input //draw input
boolean fallback = true;
for(int i = 0; i < 4; i++){ for(int i = 0; i < 4; i++){
if(blends(i) && i != rotation){ if(blends(i) && i != rotation){
Draw.rect(inRegion, x, y, (i * 90) - 180); Draw.rect(inRegion, x, y, (i * 90) - 180);
fallback = false;
} }
} }
if(fallback) Draw.rect(inRegion, x, y, rotation * 90);
Draw.rect(outRegion, x, y, rotdeg()); Draw.rect(outRegion, x, y, rotdeg());

View File

@@ -53,7 +53,7 @@
}, },
{ {
"name": "ALEX", "name": "ALEX",
"address": ["alexmindustryhub.ddns.net:6568", "alexmindustry.ddns.net:6568", "alexmindustry.ddns.net:6569", "alexmindustryattac.ddns.net:2293"] "address": ["alexmindustryhub.ddns.net:6568", "alexmindustry.ddns.net:6568", "alexmindustry.ddns.net:6569", "alexmindustryattac.ddns.net:25800"]
}, },
{ {
"name": "Minty [subzero]", "name": "Minty [subzero]",