Added 'defence sign' (issue #26). Factory dropper GUI adapted (issue #27). Lang files updated. Credits updated.

This commit is contained in:
stfwi 2019-05-29 19:47:34 +02:00
parent f8442e36bf
commit ad93fdb302
16 changed files with 73 additions and 22 deletions

View file

@ -231,9 +231,9 @@ public class BlockDecorDropper extends BlockDecorDirected
} else if(isPointInRegion(129, 50, 44, 10, mouseX, mouseY)) {
int period = (mx-135);
if(period < -1) {
period = container.fields_[6] - 1; // -
period = container.fields_[6] - 3; // -
} else if(period >= 34) {
period = container.fields_[6] + 1; // +
period = container.fields_[6] + 3; // +
} else {
period = (int)(0.5 + ((100.0 * period)/34));
}
@ -306,7 +306,7 @@ public class BlockDecorDropper extends BlockDecorDirected
}
// drop period
{
int px = ((container.fields_[6] * 34) / 100);
int px = (int)Math.round(((33.0 * container.fields_[6]) / 100) + 1);
int x = x0 + 134 - 2 + MathHelper.clamp(px, 0, 33);
int y = y0 + 56;
drawTexturedModalRect(x, y, 190, 31, 5, 5);

View file

@ -242,6 +242,13 @@ public class ModBlocks
ModAuxiliaries.getPixeledAABB(2,2,15.6, 14,14,16)
);
public static final BlockDecorDirected SIGN_DEFENSE = new BlockDecorDirected(
"sign_defense",
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_OPPOSITE_PLACEMENT|(1<<BlockDecor.CFG_LIGHT_VALUE_SHIFT),
Material.WOOD, 0.1f, 1f, SoundType.WOOD,
ModAuxiliaries.getPixeledAABB(2,2,15.6, 14,14,16)
);
public static final BlockDecorWasteIncinerator SMALL_WASTE_INCINERATOR = new BlockDecorWasteIncinerator(
"small_waste_incinerator",
BlockDecor.CFG_DEFAULT|BlockDecor.CFG_ELECTRICAL,
@ -332,11 +339,12 @@ public class ModBlocks
SMALL_ELECTRICAL_FURNACE, SMALL_ELECTRICAL_FURNACE_TEI,
SIGN_HOTWIRE, SIGN_DANGER,
SMALL_WASTE_INCINERATOR, WASTE_INCINERATOR_TEI,
SIGN_DEFENSE,
FACTORY_DROPPER, FACTORY_DROPPER_TEI
};
private static final Object dev_content[] = {
SIGN_MINDSTEP,
FACTORY_DROPPER, FACTORY_DROPPER_TEI
};
//--------------------------------------------------------------------------------------------------------------------