Files

99 lines
3.2 KiB
C#
Raw Permalink Normal View History

2024-09-04 22:39:24 +03:00
using Content.Server.Chat.Systems;
2024-09-05 18:12:46 +03:00
using Content.Server.Fluids.EntitySystems;
2024-09-04 22:39:24 +03:00
using Content.Shared._Honk.Cunt;
using Content.Shared.Chemistry.Components;
2024-09-05 00:11:21 +03:00
using Content.Shared.Chemistry.EntitySystems;
2024-09-04 22:39:24 +03:00
2024-09-05 18:12:46 +03:00
namespace Content.Server._Honk.Cunt;
2024-09-04 22:39:24 +03:00
2024-09-05 00:11:21 +03:00
// ДРД ИДИ НАХУЙ!!!!!!!!!!!!!!!!!!!!!
2024-09-04 22:39:24 +03:00
public sealed class CuntSystem : EntitySystem
{
2024-09-05 18:12:46 +03:00
[Dependency] private readonly PuddleSystem _puddle = default!;
2024-09-05 00:11:21 +03:00
//[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!;
2024-09-04 22:39:24 +03:00
public override void Initialize()
{
2024-09-05 00:11:21 +03:00
SubscribeLocalEvent<CuntableComponent, EmoteEvent>(OnCunt);
SubscribeLocalEvent<CuntableComponent, ComponentStartup>(OnStartup);
SubscribeLocalEvent<CuntableComponent, EntityUnpausedEvent>(OnUnpaused);
2024-09-04 22:39:24 +03:00
}
private void OnStartup(EntityUid uid, CuntableComponent component, ComponentStartup args)
{
2024-09-08 13:14:19 +03:00
_solutionContainer.EnsureSolution(uid, CuntableComponent.CuntSolutionName , out _, 50);
2024-09-04 22:39:24 +03:00
}
private void OnCunt(EntityUid uid, CuntableComponent component, ref EmoteEvent args)
{
if (args.Emote.ID == "Squelch")
{
GenCum(uid, component);
TryCunt(uid, component);
}
}
2024-09-08 13:14:19 +03:00
public void TryCunt(EntityUid uid, CuntableComponent? component = null)
2024-09-04 22:39:24 +03:00
{
if (!Resolve(uid, ref component))
2024-09-08 13:14:19 +03:00
return;
2024-09-04 22:39:24 +03:00
2024-09-08 13:14:19 +03:00
if(!_solutionContainer.TryGetSolution(uid,CuntableComponent.CuntSolutionName, out var solution))
return;
2024-09-04 22:39:24 +03:00
2024-09-05 00:11:21 +03:00
if (solution.Value != default)
2024-09-08 13:14:19 +03:00
return ;
2024-09-04 22:39:24 +03:00
2024-09-05 00:11:21 +03:00
var cum = new Solution("Cunt", 5);
2024-09-05 18:12:46 +03:00
_puddle.TrySpillAt(uid, cum, out _, false);
2024-09-05 00:11:21 +03:00
_solutionContainer.SplitSolution(uid!, 50);
2024-09-04 22:39:24 +03:00
}
public void GenCum(EntityUid uid, CuntableComponent? component = null)
{
if (!Resolve(uid, ref component))
2024-09-08 13:14:19 +03:00
return;
2024-09-04 22:39:24 +03:00
if (_solutionContainer.TryGetSolution(uid, CuntableComponent.CuntSolutionName, out var solution))
{
2024-09-05 00:11:21 +03:00
if (solution.Value != default)
2024-09-04 22:39:24 +03:00
return;
var generated = new Solution("Cunt", 2);
2024-09-05 00:11:21 +03:00
_solutionContainer.AddSolution(uid!, generated);
2024-09-04 22:39:24 +03:00
}
}
2024-09-05 00:11:21 +03:00
//Я хуй знает что оно делает
2024-09-04 22:39:24 +03:00
//public override void Update(float frameTime)
//{
// base.Update(frameTime);
2024-09-05 00:11:21 +03:00
//
2024-09-04 22:39:24 +03:00
// var query = EntityQueryEnumerator<CuntableComponent, SolutionContainerManagerComponent>();
2024-09-05 00:11:21 +03:00
// while (query.MoveNext(out var uid, out var regen, out var manager))
// {
// if (_timing.CurTime < regen.NextRegenTime)
// continue;
// regen.NextRegenTime = _timing.CurTime + regen.Duration;
// if (_solutionContainer.TryGetSolution(uid, CuntableComponent.CuntSolutionName, out var solution, manager))
// {
// if (solution.AvailableVolume <= FixedPoint2.Zero)
// continue;
//
// var generated = new Solution("Cunt", 5);
//
// _solutionContainer.TryAddSolution(uid, solution, generated);
// }
// }
2024-09-04 22:39:24 +03:00
//}
private void OnUnpaused(EntityUid uid, CuntableComponent comp, ref EntityUnpausedEvent args)
{
comp.NextRegenTime += args.PausedTime;
}
}