Tweaked sector dialog / Item icons fixed / Bugfixes

This commit is contained in:
Anuken
2019-02-09 23:20:20 -05:00
parent 533ddb874e
commit 29821003fe
56 changed files with 1907 additions and 1492 deletions
@@ -22,10 +22,7 @@ import io.anuke.mindustry.entities.units.UnitState;
import io.anuke.mindustry.game.Team;
import io.anuke.mindustry.gen.Call;
import io.anuke.mindustry.net.Net;
import io.anuke.mindustry.type.ContentType;
import io.anuke.mindustry.type.StatusEffect;
import io.anuke.mindustry.type.UnitType;
import io.anuke.mindustry.type.Weapon;
import io.anuke.mindustry.type.*;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.meta.BlockFlag;
@@ -151,14 +148,14 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
}
protected void drawItems(){
float backTrns = 4f, itemSize = 5f;
float backTrns = 4f;
if(item.amount > 0){
int stored = Mathf.clamp(item.amount / 6, 1, 8);
for(int i = 0; i < stored; i++){
float angT = i == 0 ? 0 : Mathf.randomSeedRange(i + 2, 60f);
float lenT = i == 0 ? 0 : Mathf.randomSeedRange(i + 3, 1f) - 1f;
Draw.rect(item.item.region,
Draw.rect(item.item.icon(Item.Icon.large),
x + Angles.trnsx(rotation + 180f + angT, backTrns + lenT),
y + Angles.trnsy(rotation + 180f + angT, backTrns + lenT),
itemSize, itemSize, rotation);
@@ -334,7 +334,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
rotation - 90);
}
float backTrns = 4f, itemSize = 5f;
float backTrns = 4f;
if(item.amount > 0){
ItemStack stack = item;
int stored = Mathf.clamp(stack.amount / 6, 1, 8);
@@ -342,7 +342,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
for(int i = 0; i < stored; i++){
float angT = i == 0 ? 0 : Mathf.randomSeedRange(i + 1, 60f);
float lenT = i == 0 ? 0 : Mathf.randomSeedRange(i + 2, 1f) - 1f;
Draw.rect(stack.item.region,
Draw.rect(stack.item.icon(Item.Icon.large),
x + Angles.trnsx(rotation + 180f + angT, backTrns + lenT),
y + Angles.trnsy(rotation + 180f + angT, backTrns + lenT),
itemSize, itemSize, rotation);