WE LOVE SHITMED!!!!

This commit is contained in:
kotobdev
2025-09-27 15:37:40 -07:00
parent 6cc28a3e92
commit 8150aba854
5 changed files with 34 additions and 8 deletions
@@ -9,6 +9,17 @@ public sealed class CursorOffsetActionSystem : SharedCursorOffsetActionSystem
{
[Dependency] private readonly IClientGameTiming _gameTiming = default!;
protected override void OnInit(Entity<CursorOffsetActionComponent> ent, ref ComponentInit args)
{
base.OnInit(ent, ref args);
if (!TryComp<EyeCursorOffsetComponent>(ent, out var eyeOffset))
return;
eyeOffset.Enabled = ent.Comp.Active;
eyeOffset.CurrentPosition = Vector2.Zero;
}
protected override void OnAction(Entity<CursorOffsetActionComponent> ent, ref CursorOffsetActionEvent args)
{
base.OnAction(ent, ref args);
@@ -10,12 +10,18 @@ public abstract class SharedCursorOffsetActionSystem : EntitySystem
{
base.Initialize();
SubscribeLocalEvent<CursorOffsetActionComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<CursorOffsetActionComponent, ComponentRemove>(OnRemove);
SubscribeLocalEvent<CursorOffsetActionComponent, CursorOffsetActionEvent>(OnAction);
}
private void OnInit(Entity<CursorOffsetActionComponent> ent, ref ComponentInit args)
protected virtual void OnInit(Entity<CursorOffsetActionComponent> ent, ref ComponentInit args)
{
_actions.AddAction(ent, ref ent.Comp.CursorOffsetActionEntity, ent.Comp.CursorOffsetActionId );
_actions.AddAction(ent, ref ent.Comp.CursorOffsetActionEntity, ent.Comp.CursorOffsetActionId);
}
private void OnRemove(Entity<CursorOffsetActionComponent> ent, ref ComponentRemove args)
{
_actions.RemoveAction(ent.Owner, ent.Comp.CursorOffsetActionEntity);
}
protected virtual void OnAction(Entity<CursorOffsetActionComponent> ent, ref CursorOffsetActionEvent args)
@@ -3,3 +3,17 @@
id: OrganAvaliStomach
name: avali stomach
categories: [ HideSpawnMenu ]
- type: entity
parent: OrganHumanEyes
id: OrganAvaliEyes
name: avali eyes
description: They seem as if they're looking at something far away...
components:
- type: Organ
onAdd:
- type: EyeCursorOffset
maxOffset: 5
pvsIncrease: 0.5
enabled: false
- type: CursorOffsetAction
@@ -9,7 +9,7 @@
- torso
organs:
brain: OrganHumanBrain
eyes: OrganHumanEyes
eyes: OrganAvaliEyes
torso:
part: TorsoAvali
connections:
@@ -111,11 +111,6 @@
279: 0.95
265: 0.9
240: 0.85
- type: EyeCursorOffset
maxOffset: 5
pvsIncrease: 0.5
enabled: false
- type: CursorOffsetAction
# End DeltaV additions
- type: entity