mirror of
https://github.com/Xevion/RimWorld-Hydroponics-Expanded.git
synced 2025-12-06 05:16:20 -06:00
Inline GenDraw.FillableBarRequest constructor
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user