mirror of
https://github.com/Xevion/RimWorld-Hydroponics-Expanded.git
synced 2025-12-06 03:16:18 -06:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fab9e610a7 | |||
| 20bb5738f0 | |||
| 55b6feee4b | |||
| 9b13326fb7 | |||
| f80d87dc6d | |||
| 26565b05dc | |||
| 13250057dc |
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -28,16 +28,10 @@ jobs:
|
||||
- name: Build Mod
|
||||
run: dotnet build ${{ env.SLN_PATH }} --configuration Release --no-restore
|
||||
|
||||
- name: Setup Go environment
|
||||
uses: actions/setup-go@v5.0.1
|
||||
with:
|
||||
go-version: stable
|
||||
cache-dependency-path: .github/workflows/go.sum
|
||||
|
||||
- name: Get Version
|
||||
id: get_version
|
||||
run: |
|
||||
go install github.com/sibprogrammer/xq@latest
|
||||
curl -sf https://gobinaries.com/sibprogrammer/xq@latest | sh
|
||||
VERSION=$(xq ./About/About.xml -x "/ModMetaData/modVersion")
|
||||
echo "result=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
<supportedVersions>
|
||||
<li>1.5</li>
|
||||
</supportedVersions>
|
||||
<modVersion>0.2.2</modVersion>
|
||||
<modVersion>0.2.3</modVersion>
|
||||
<url>https://github.com/Xevion/RimWorld-Hydroponics-Expanded</url>
|
||||
</ModMetaData>
|
||||
@@ -6,4 +6,5 @@
|
||||
<HydroponicsExpanded.HarvestStage>Waiting for all plants to be harvested.</HydroponicsExpanded.HarvestStage>
|
||||
<HydroponicsExpanded.OccupiedBays>Occupied Plant Bays</HydroponicsExpanded.OccupiedBays>
|
||||
<HydroponicsExpanded.Growth>Growth</HydroponicsExpanded.Growth>
|
||||
<HydroponicsExpanded.Resting>resting</HydroponicsExpanded.Resting>
|
||||
</LanguageData>
|
||||
@@ -114,8 +114,7 @@ namespace HydroponicsExpanded {
|
||||
}
|
||||
|
||||
// Temperature & time of day check.
|
||||
float temperature = Position.GetTemperature(Map);
|
||||
if (temperature.Between(10f, 42f) && GenLocalDate.DayPercent(this).Between(0.25f, 0.8f)) {
|
||||
if (IsResting() == false) {
|
||||
float growthAmount = 1f / (60_000f * growthTrackingPlant.def.plant.growDays) * 250f;
|
||||
|
||||
// Debug gizmo can set growth to 100%, thus Math.min check here.
|
||||
@@ -129,10 +128,16 @@ namespace HydroponicsExpanded {
|
||||
Stage = HydroponicsStage.Harvest;
|
||||
}
|
||||
|
||||
private void HarvestTick() {
|
||||
// var plantsLeft = _innerContainer.Count;
|
||||
// var potentialCellCount = this.OccupiedRect().Area;
|
||||
/// <summary>
|
||||
/// Determines whether the hydroponics basin is in a resting state.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the hydroponics basin is in a resting state; otherwise, <c>false</c>.</returns>
|
||||
private bool IsResting() {
|
||||
float temperature = Position.GetTemperature(Map);
|
||||
return !(temperature.Between(10f, 42f) && GenLocalDate.DayPercent(this).Between(0.25f, 0.8f));
|
||||
}
|
||||
|
||||
private void HarvestTick() {
|
||||
// Try to place every plant in the container in any cell.
|
||||
foreach (Thing nextInnerThing in _innerContainer) {
|
||||
var nextPlant = (Plant)nextInnerThing;
|
||||
@@ -291,6 +296,10 @@ namespace HydroponicsExpanded {
|
||||
if (_innerContainer.Count > 0) {
|
||||
inspectString += "\n";
|
||||
inspectString += "HydroponicsExpanded.Growth".Translate() + $": {_highestGrowth * 100f:#0}%";
|
||||
|
||||
if (IsResting()) {
|
||||
inspectString += " (" + "HydroponicsExpanded.Resting".Translate() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
return inspectString;
|
||||
|
||||
Reference in New Issue
Block a user