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

Milking Machine #384

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,10 @@ public sealed partial class SolutionRegenerationComponent : Component
[DataField("nextChargeTime", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
[AutoPausedField]
public TimeSpan NextRegenTime = TimeSpan.FromSeconds(0);

/// <summary>
/// Whether the entity with the solution needs to be equipped
/// </summary>
[DataField("needsEquipped"), ViewVariables(VVAccess.ReadWrite)]
public bool NeedsEquipped = false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Components.SolutionManager;
using Content.Shared.Clothing.Components;
using Content.Shared.FixedPoint;
using Robust.Shared.Timing;

Expand All @@ -22,6 +23,9 @@ public override void Update(float frameTime)
if (_timing.CurTime < regen.NextRegenTime)
continue;

if (regen.NeedsEquipped && TryComp(uid, out ClothingComponent? clothing) && clothing.InSlot == null)
continue;

// timer ignores if its full, it's just a fixed cycle
regen.NextRegenTime = _timing.CurTime + regen.Duration;
if (_solutionContainer.ResolveSolution((uid, manager), regen.SolutionName, ref regen.Solution, out var solution))
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Clothing/EntitySystems/ClothingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,4 +288,4 @@ public void SetLayerState(ClothingComponent clothing, string slot, string mapKey
}

#endregion
}
}
32 changes: 32 additions & 0 deletions Resources/Prototypes/Floof/Entities/Clothing/Uniforms/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,35 @@
sprite: Floof/Clothing/Uniforms/musiciankingblack.rsi
- type: Clothing
sprite: Floof/Clothing/Uniforms/musiciankingblack.rsi

- type: entity
parent: ClothingUniformBase
id: ClothingUniformMilkingMachine
name: milking machine
components:
- type: Sprite #sprite is placeholder as I cannot sprite :((
sprite: Floof/Clothing/Uniforms/codervalidthong.rsi
- type: Clothing
sprite: Floof/Clothing/Uniforms/codervalidthong.rsi
- type: Tag #DeltaV, needed for species with nonhuman legs/can only wear skirts
tags:
- Skirt
- type: SolutionContainerManager
solutions:
tank:
maxVol: 100
- type: DrawableSolution
solution: tank
- type: DrainableSolution
solution: tank
- type: ExaminableSolution
solution: tank
- type: SolutionItemStatus
solution: tank
- type: SolutionRegeneration
solution: tank
generated:
reagents:
- ReagentId: Cum
Quantity: 0.01
needsEquipped: true