Inline GenDraw.FillableBarRequest constructor

This commit is contained in:
2023-07-16 05:10:31 -05:00
parent fdb9c7537e
commit bc2a5abf7c

View File

@@ -196,19 +196,17 @@ namespace HydroponicsExpanded {
// Only draw growth percentage bar during Sowing stage // Only draw growth percentage bar during Sowing stage
if (_stage == HydroponicsStage.Grow) { if (_stage == HydroponicsStage.Grow) {
var bar = default(GenDraw.FillableBarRequest); var bar = new GenDraw.FillableBarRequest {
center = DrawPos + Vector3.up * 0.1f,
bar.center = DrawPos + Vector3.up * 0.1f; size = new Vector2(DrawSize.y - 0.4f, DrawSize.x - 0.4f),
bar.size = new Vector2(3.6f, 0.6f); margin = 0.15f,
bar.margin = 0.15f; fillPercent = _highestGrowth,
bar.fillPercent = _highestGrowth; // Switch to red when no power is provided.
filledMat = base.CanAcceptSowNow()
// Switch to red when no power is provided. ? HydroponicPoweredFillMaterial
bar.filledMat = base.CanAcceptSowNow() : HydroponicUnpoweredFillMaterial,
? HydroponicPoweredFillMaterial unfilledMat = HydroponicUnfilledMaterial
: HydroponicUnpoweredFillMaterial; };
bar.unfilledMat = HydroponicUnfilledMaterial;
Rot4 rotation = Rotation; Rot4 rotation = Rotation;
rotation.Rotate(RotationDirection.Clockwise); rotation.Rotate(RotationDirection.Clockwise);