Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -57,7 +57,7 @@ abstract class TankComp implements Posc, Hitboxc, Unitc, ElevationMovec{
|
|||||||
lastDeepFloor = null;
|
lastDeepFloor = null;
|
||||||
boolean anyNonDeep = false;
|
boolean anyNonDeep = false;
|
||||||
|
|
||||||
if(type.crushFragile){
|
if(type.crushFragile && !disarmed){
|
||||||
for(int i = 0; i < 8; i++){
|
for(int i = 0; i < 8; i++){
|
||||||
Point2 offset = Geometry.d8[i];
|
Point2 offset = Geometry.d8[i];
|
||||||
var other = Vars.world.buildWorld(x + offset.x * tilesize, y + offset.y * tilesize);
|
var other = Vars.world.buildWorld(x + offset.x * tilesize, y + offset.y * tilesize);
|
||||||
|
|||||||
@@ -1625,22 +1625,18 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
if(withText){
|
if(withText){
|
||||||
Font font = Fonts.outline;
|
Font font = Fonts.outline;
|
||||||
font.setColor(col2);
|
font.setColor(col2);
|
||||||
var ints = font.usesIntegerPositions();
|
boolean ints = font.usesIntegerPositions();
|
||||||
font.setUseIntegerPositions(false);
|
font.setUseIntegerPositions(false);
|
||||||
var z = Draw.z();
|
float z = Draw.z();
|
||||||
Draw.z(Layer.endPixeled);
|
Draw.z(Layer.endPixeled);
|
||||||
font.getData().setScale(1 / renderer.camerascale);
|
font.getData().setScale(1 / renderer.camerascale);
|
||||||
var snapToCursor = Core.settings.getBool("selectionsizeoncursor");
|
|
||||||
var textOffset = Core.settings.getInt("selectionsizeoncursoroffset", 5);
|
|
||||||
int width = (int)((result.x2 - result.x) / 8);
|
int width = (int)((result.x2 - result.x) / 8);
|
||||||
int height = (int)((result.y2 - result.y) / 8);
|
int height = (int)((result.y2 - result.y) / 8);
|
||||||
int area = width * height;
|
int area = width * height;
|
||||||
|
|
||||||
// FINISHME: When not snapping to cursor, perhaps it would be best to choose the corner closest to the cursor that's at least a block away?
|
|
||||||
font.draw(width + "x" + height + " (" + area + ")",
|
font.draw(width + "x" + height + " (" + area + ")",
|
||||||
snapToCursor ? input.mouseWorldX() + textOffset * (4 / renderer.camerascale) : result.x2,
|
input.mouseWorldX() + 5 * (4 / renderer.camerascale),
|
||||||
snapToCursor ? input.mouseWorldY() - textOffset * (4 / renderer.camerascale) : result.y
|
input.mouseWorldY() - 5 * (4 / renderer.camerascale));
|
||||||
);
|
|
||||||
font.setColor(Color.white);
|
font.setColor(Color.white);
|
||||||
font.getData().setScale(1);
|
font.getData().setScale(1);
|
||||||
font.setUseIntegerPositions(ints);
|
font.setUseIntegerPositions(ints);
|
||||||
|
|||||||
@@ -238,8 +238,7 @@ public class LStatements{
|
|||||||
|
|
||||||
row(s);
|
row(s);
|
||||||
|
|
||||||
s.add("align ");
|
fields(s, "align", p1, v -> p1 = v).width(170f);
|
||||||
fields(s, "align", p1, v -> p1 = v);
|
|
||||||
fieldAlignSelect(s, () -> p1, v -> {
|
fieldAlignSelect(s, () -> p1, v -> {
|
||||||
p1 = v;
|
p1 = v;
|
||||||
rebuild(table);
|
rebuild(table);
|
||||||
|
|||||||
@@ -699,7 +699,34 @@ public class ContentParser{
|
|||||||
read(() -> readFields(liquid, value));
|
read(() -> readFields(liquid, value));
|
||||||
return liquid;
|
return liquid;
|
||||||
},
|
},
|
||||||
ContentType.status, parser(ContentType.status, StatusEffect::new),
|
ContentType.status, (TypeParser<StatusEffect>)(mod, name, value) -> {
|
||||||
|
StatusEffect status;
|
||||||
|
if(locate(ContentType.status, name) != null){
|
||||||
|
status = locate(ContentType.status, name);
|
||||||
|
readBundle(ContentType.status, name, value);
|
||||||
|
}else{
|
||||||
|
readBundle(ContentType.status, name, value);
|
||||||
|
status = new StatusEffect(mod + "-" + name);
|
||||||
|
}
|
||||||
|
currentContent = status;
|
||||||
|
read(() -> readFields(status, value));
|
||||||
|
|
||||||
|
status.init(() -> {
|
||||||
|
var oldOpposite = status.opposites.copy();
|
||||||
|
status.opposites.clear();
|
||||||
|
status.opposite(oldOpposite.toSeq().toArray(StatusEffect.class));
|
||||||
|
|
||||||
|
var oldAffinities = status.affinities.copy();
|
||||||
|
status.affinities.clear();
|
||||||
|
for(StatusEffect affinity: oldAffinities){
|
||||||
|
status.affinity(affinity, (unit, result, time) -> {
|
||||||
|
unit.damagePierce(status.transitionDamage);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return status;
|
||||||
|
},
|
||||||
ContentType.sector, (TypeParser<SectorPreset>)(mod, name, value) -> {
|
ContentType.sector, (TypeParser<SectorPreset>)(mod, name, value) -> {
|
||||||
if(value.isString()){
|
if(value.isString()){
|
||||||
return locate(ContentType.sector, name);
|
return locate(ContentType.sector, name);
|
||||||
|
|||||||
@@ -176,13 +176,13 @@ public class StatusEffect extends UnlockableContent{
|
|||||||
transitions.put(effect, handler);
|
transitions.put(effect, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void affinity(StatusEffect effect, TransitionHandler handler){
|
public void affinity(StatusEffect effect, TransitionHandler handler){
|
||||||
affinities.add(effect);
|
affinities.add(effect);
|
||||||
effect.affinities.add(this);
|
effect.affinities.add(this);
|
||||||
trans(effect, handler);
|
trans(effect, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void opposite(StatusEffect... effect){
|
public void opposite(StatusEffect... effect){
|
||||||
for(var other : effect){
|
for(var other : effect){
|
||||||
handleOpposite(other);
|
handleOpposite(other);
|
||||||
other.handleOpposite(this);
|
other.handleOpposite(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user