Fixed #2735
|
Before Width: | Height: | Size: 890 B After Width: | Height: | Size: 908 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 586 B |
|
Before Width: | Height: | Size: 553 KiB After Width: | Height: | Size: 563 KiB |
|
Before Width: | Height: | Size: 662 KiB After Width: | Height: | Size: 668 KiB |
|
Before Width: | Height: | Size: 951 KiB After Width: | Height: | Size: 969 KiB |
|
Before Width: | Height: | Size: 508 KiB After Width: | Height: | Size: 518 KiB |
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 182 KiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 2.8 MiB After Width: | Height: | Size: 2.9 MiB |
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 183 KiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
@@ -43,7 +43,7 @@ public class Pathfinder implements Runnable{
|
||||
PathTile.health(tile) * 5 +
|
||||
(PathTile.nearSolid(tile) ? 2 : 0) +
|
||||
(PathTile.nearLiquid(tile) ? 6 : 0) +
|
||||
(PathTile.deep(tile) ? 70 : 0) +
|
||||
(PathTile.deep(tile) ? 6000 : 0) +
|
||||
(PathTile.damages(tile) ? 30 : 0),
|
||||
|
||||
//legs
|
||||
@@ -116,7 +116,7 @@ public class Pathfinder implements Runnable{
|
||||
}
|
||||
|
||||
return PathTile.get(
|
||||
tile.build == null ? 0 : Math.min((int)(tile.build.health / 40), 127),
|
||||
tile.build == null ? 0 : Math.min((int)(tile.build.health / 40), 80),
|
||||
tile.getTeamID(),
|
||||
tile.solid(),
|
||||
tile.floor().isLiquid,
|
||||
|
||||
@@ -333,10 +333,11 @@ public class Generators{
|
||||
outliner.get(type.baseJointRegion);
|
||||
if(type.constructor.get() instanceof Legsc) outliner.get(type.legRegion);
|
||||
|
||||
Image image = ImagePacker.get(type.region);
|
||||
Image image = outline.get(ImagePacker.get(type.region));
|
||||
|
||||
outline.get(image).save(type.name + "-outline");
|
||||
image.save(type.name + "-outline");
|
||||
|
||||
//draw mech parts
|
||||
if(type.constructor.get() instanceof Mechc){
|
||||
image.drawCenter(type.baseRegion);
|
||||
image.drawCenter(type.legRegion);
|
||||
@@ -344,6 +345,19 @@ public class Generators{
|
||||
image.draw(type.region);
|
||||
}
|
||||
|
||||
//draw outlines
|
||||
for(Weapon weapon : type.weapons){
|
||||
weapon.load();
|
||||
|
||||
image.draw(outline.get(ImagePacker.get(weapon.region)),
|
||||
(int)(weapon.x / Draw.scl + image.width / 2f - weapon.region.width / 2f),
|
||||
(int)(-weapon.y / Draw.scl + image.height / 2f - weapon.region.height / 2f),
|
||||
weapon.flipSprite, false);
|
||||
}
|
||||
|
||||
//draw base region on top to mask weapons
|
||||
image.draw(type.region);
|
||||
|
||||
Image baseCell = ImagePacker.get(type.cellRegion);
|
||||
Image cell = new Image(type.cellRegion.width, type.cellRegion.height);
|
||||
cell.each((x, y) -> cell.draw(x, y, baseCell.getColor(x, y).mul(Color.valueOf("ffa665"))));
|
||||
@@ -353,7 +367,7 @@ public class Generators{
|
||||
for(Weapon weapon : type.weapons){
|
||||
weapon.load();
|
||||
|
||||
image.draw(weapon.region,
|
||||
image.draw(weapon.top ? outline.get(ImagePacker.get(weapon.region)) : ImagePacker.get(weapon.region),
|
||||
(int)(weapon.x / Draw.scl + image.width / 2f - weapon.region.width / 2f),
|
||||
(int)(-weapon.y / Draw.scl + image.height / 2f - weapon.region.height / 2f),
|
||||
weapon.flipSprite, false);
|
||||
|
||||
@@ -182,9 +182,14 @@ class Image{
|
||||
void draw(TextureRegion region, int x, int y, boolean flipx, boolean flipy){
|
||||
GenRegion.validate(region);
|
||||
|
||||
draw(ImagePacker.get(region), x, y, flipx, flipy);
|
||||
}
|
||||
|
||||
void draw(Image region, int x, int y, boolean flipx, boolean flipy){
|
||||
|
||||
int ofx = 0, ofy = 0;
|
||||
|
||||
graphics.drawImage(ImagePacker.get(region).image,
|
||||
graphics.drawImage(region.image,
|
||||
x, y,
|
||||
x + region.width,
|
||||
y + region.height,
|
||||
|
||||