Make assembler plans support items and liquids, allow changing sap bullet regions (#9413)

* make assembler plans support items and liquids, allow changing sap bullet regions

* leftover copypaste

* hhhhhhhhhhhhhhh

* may want to add this as well

---------

Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
nullevoy
2025-02-10 03:53:52 +01:00
committed by GitHub
parent e7e1e1f786
commit 8ee02562c3
2 changed files with 97 additions and 11 deletions

View File

@@ -15,6 +15,18 @@ public class SapBulletType extends BulletType{
public float sapStrength = 0.5f;
public Color color = Color.white.cpy();
public float width = 0.4f;
public String sprite = "laser";
public TextureRegion laserRegion;
public TextureRegion laserEndRegion;
@Override
public void load(){
super.load();
laserRegion = Core.atlas.find(sprite);
laserEndRegion = Core.atlas.find(sprite + "-end");
}
public SapBulletType(){
speed = 0f;
@@ -37,7 +49,7 @@ public class SapBulletType extends BulletType{
Tmp.v1.set(data).lerp(b, b.fin());
Draw.color(color);
Drawf.laser(Core.atlas.find("laser"), Core.atlas.find("laser-end"),
Drawf.laser(laserRegion, laserEndRegion,
b.x, b.y, Tmp.v1.x, Tmp.v1.y, width * b.fout());
Draw.reset();