Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plantbot #1831

Merged
merged 4 commits into from
Feb 21, 2025
Merged

Plantbot #1831

merged 4 commits into from
Feb 21, 2025

Conversation

Timfa2112
Copy link
Contributor

@Timfa2112 Timfa2112 commented Feb 21, 2025

Description

Adds the Plantbot!
The Plantbot will help keep Hydroponics Trays filled with water and cleared of weeds.
It will add water in 10u steps if there is less than 80u in the tray, and will clear weeds with 10% per step if there are more than 10% weeds in the tray.
If the bot is destroyed, it will spill a bunch of water.

It does not add nutrients, sample, harvest or plant.

If emagged, it'll drink water from trays until no water remains.


Media

image

20250221135110.mp4


Changelog

🆑

  • add: Added Plantbot

@github-actions github-actions bot added Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: YML Changes any yml files Changes: Sprite Changes any png or json in an RSI Status: Needs Review Someone please review this labels Feb 21, 2025
@SimpleStation14 SimpleStation14 changed the title plantbot Plantbot Feb 21, 2025
Copy link
Contributor

github-actions bot commented Feb 21, 2025

RSI Diff Bot; head commit e0e7f87 merging into 77159c2
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Mobs/Silicon/Bots/plantbot.rsi

State Old New Status
plantbot Added

Edit: diff updated after e0e7f87

private EntityLookupSystem _lookup = default!;
private PathfindingSystem _pathfinding = default!;

[DataField] public string RangeKey = NPCBlackboard.PlantbotServiceRange;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

separate lines, add a summary

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(specifically the datafield)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in e0e7f87

Comment on lines 66 to 86
{
_plantHolderSystem.AdjustWater(target, -10f);
_audio.PlayPvs(botComp.RemoveWaterSound, target);
}
else
{
if (plantHolderComponent.WaterLevel < 80f)
{
_plantHolderSystem.AdjustWater(target, 10);
_audio.PlayPvs(botComp.WaterSound, target);
_chat.TrySendInGameICMessage(owner, Loc.GetString("plantbot-add-water"), InGameICChatType.Speak, hideChat: true, hideLog: true);
}
else if (plantHolderComponent.WeedLevel > 1)
{
plantHolderComponent.WeedLevel -= 1;
_audio.PlayPvs(botComp.WeedSound, target);
_chat.TrySendInGameICMessage(owner, Loc.GetString("plantbot-remove-weeds"), InGameICChatType.Speak, hideChat: true, hideLog: true);
}
else
return HTNOperatorStatus.Failed;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use constants to make this easily readable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in e0e7f87

Timfa2112 and others added 2 commits February 21, 2025 16:51
Part 1/2

Co-authored-by: sleepyyapril <[email protected]>
Signed-off-by: Timfa <[email protected]>
@sleepyyapril
Copy link
Contributor

Will merge if tests fine, ping in discord if ends up okay

@sleepyyapril sleepyyapril merged commit 5602211 into Simple-Station:master Feb 21, 2025
13 of 14 checks passed
SimpleStation14 added a commit that referenced this pull request Feb 21, 2025
@jimmy12or
Copy link
Contributor

Love this addition, but shouldn't it use a mini-hoe instead of clippers in it's recipe since it clears weeds and doesn't clip?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: Sprite Changes any png or json in an RSI Changes: YML Changes any yml files Status: Needs Review Someone please review this
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants