- add: interface for interaction

This commit is contained in:
2024-02-20 14:28:01 +03:00
parent c3135f160e
commit 28c8b45eec
32 changed files with 319 additions and 14 deletions

View File

@@ -1,4 +1,6 @@
using Robust.Shared.Containers;
using Content.Shared._Amour.Arousal;
using Content.Shared._Amour.HumanoidAppearanceExtension;
using Robust.Shared.Containers;
using Robust.Shared.Prototypes;
namespace Content.Shared._Amour.Hole;
@@ -10,6 +12,15 @@ public abstract partial class SharedHoleSystem
public void InitializeContainer()
{
SubscribeLocalEvent<HoleContainerComponent,ComponentInit>(OnContainerInit);
SubscribeLocalEvent<HoleContainerComponent,HumanoidAppearanceLoadedEvent>(OnAppearanceLoaded);
}
private void OnAppearanceLoaded(EntityUid uid, HoleContainerComponent component, HumanoidAppearanceLoadedEvent args)
{
foreach (var genitals in args.Profile.Appearance.Genitals)
{
AddHole(new Entity<HoleContainerComponent?>(uid,component),genitals.GenitalId,genitals.Color);
}
}
private void OnContainerInit(EntityUid uid, HoleContainerComponent component, ComponentInit args)

View File

@@ -1,4 +1,5 @@
using Robust.Shared.Containers;
using Content.Shared._Amour.Arousal;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
namespace Content.Shared._Amour.Hole;
@@ -24,7 +25,9 @@ public abstract partial class SharedHoleSystem : EntitySystem
public virtual void Exide(Entity<HoleComponent?> entity, bool value = true)
{
if(!Resolve(entity.Owner,ref entity.Comp)) return;
if(!Resolve(entity.Owner,ref entity.Comp))
return;
entity.Comp.IsExcited = value;
Dirty(entity);
}