JSON UnitType type: support
This commit is contained in:
@@ -143,7 +143,6 @@ public class RegionPart extends DrawPart{
|
|||||||
String realName = this.name == null ? name + suffix : this.name;
|
String realName = this.name == null ? name + suffix : this.name;
|
||||||
|
|
||||||
if(drawRegion){
|
if(drawRegion){
|
||||||
//TODO l/r
|
|
||||||
if(mirror && turretShading){
|
if(mirror && turretShading){
|
||||||
regions = new TextureRegion[]{
|
regions = new TextureRegion[]{
|
||||||
Core.atlas.find(realName + "-r"),
|
Core.atlas.find(realName + "-r"),
|
||||||
|
|||||||
@@ -437,7 +437,9 @@ public class ContentParser{
|
|||||||
|
|
||||||
UnitType unit;
|
UnitType unit;
|
||||||
if(locate(ContentType.unit, name) == null){
|
if(locate(ContentType.unit, name) == null){
|
||||||
unit = new UnitType(mod + "-" + name);
|
|
||||||
|
unit = make(resolve(value.getString("type", ""), UnitType.class), mod + "-" + name);
|
||||||
|
|
||||||
var typeVal = value.get("type");
|
var typeVal = value.get("type");
|
||||||
|
|
||||||
if(typeVal != null && !typeVal.isString()){
|
if(typeVal != null && !typeVal.isString()){
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import mindustry.gen.*;
|
|||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
//TODO remake/remove
|
|
||||||
public class DrawFlame extends DrawBlock{
|
public class DrawFlame extends DrawBlock{
|
||||||
public Color flameColor = Color.valueOf("ffc999");
|
public Color flameColor = Color.valueOf("ffc999");
|
||||||
public TextureRegion top;
|
public TextureRegion top;
|
||||||
|
|||||||
Reference in New Issue
Block a user