Allow Mods To Modify RegionPart's Heat Light Region (#10048)
* actually work * betterize i think
This commit is contained in:
@@ -15,7 +15,7 @@ public class RegionPart extends DrawPart{
|
|||||||
public String suffix = "";
|
public String suffix = "";
|
||||||
/** Overrides suffix if set. */
|
/** Overrides suffix if set. */
|
||||||
public @Nullable String name;
|
public @Nullable String name;
|
||||||
public TextureRegion heat;
|
public TextureRegion heat, light;
|
||||||
public TextureRegion[] regions = {};
|
public TextureRegion[] regions = {};
|
||||||
public TextureRegion[] outlines = {};
|
public TextureRegion[] outlines = {};
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ public class RegionPart extends DrawPart{
|
|||||||
float hprog = heatProgress.getClamp(params);
|
float hprog = heatProgress.getClamp(params);
|
||||||
heatColor.write(Tmp.c1).a(hprog * heatColor.a);
|
heatColor.write(Tmp.c1).a(hprog * heatColor.a);
|
||||||
Drawf.additive(heat, Tmp.c1, rx, ry, rot, turretShading ? turretHeatLayer : Draw.z() + heatLayerOffset);
|
Drawf.additive(heat, Tmp.c1, rx, ry, rot, turretShading ? turretHeatLayer : Draw.z() + heatLayerOffset);
|
||||||
if(heatLight) Drawf.light(rx, ry, heat, rot, Tmp.c1, heatLightOpacity * hprog);
|
if(heatLight) Drawf.light(rx, ry, light.found() ? light : heat, rot, Tmp.c1, heatLightOpacity * hprog);
|
||||||
}
|
}
|
||||||
|
|
||||||
Draw.xscl *= sign;
|
Draw.xscl *= sign;
|
||||||
@@ -187,6 +187,7 @@ public class RegionPart extends DrawPart{
|
|||||||
}
|
}
|
||||||
|
|
||||||
heat = Core.atlas.find(realName + "-heat");
|
heat = Core.atlas.find(realName + "-heat");
|
||||||
|
light = Core.atlas.find(realName + "-light");
|
||||||
for(var child : children){
|
for(var child : children){
|
||||||
child.turretShading = turretShading;
|
child.turretShading = turretShading;
|
||||||
child.load(name);
|
child.load(name);
|
||||||
|
|||||||
Reference in New Issue
Block a user