Files
wylab-station-14/Content.Server/_WL/AddHeightItem/AddHeightItemSystem.cs
wylab 0f4ceb13b4 feat: add 11 copy-paste features from ss14-wega and ss14-wl
From ss14-wega (_Wega):
- DeleteOnDrop: auto-delete items when dropped
- FriendlyFaction: prevent friendly fire by faction
- NullRod: holy weapon that removes magic
- EdibleMatter: edible entity component
- Ghost Respawn: allow ghosts to respawn to lobby
- Barks: NPC voice sounds system (99 audio files)

From ss14-wl (_WL):
- Day/Night Cycle: automatic lighting cycle for maps
- Sleep on Buckle: sleep action when buckled
- Height System: tall entities become large items
- Freeze Component: freeze entities at high cold damage
- Suckable Food: mouth-slot consumables (lollipops, gum, etc.)
- GolemHeat: bonus feature (heat mechanics for golems)

Includes:
- 34 C# files
- 99 audio files
- 68 texture files
- 9 prototype files
- 2 locale files
- WegaCVars configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 06:03:12 +00:00

44 lines
1.4 KiB
C#

using Content.Server.Resist;
using Content.Shared.Humanoid;
using Content.Shared.Item;
using Robust.Shared.Prototypes;
namespace Content.Server._WL.AddHeightItem
{
public sealed partial class AddHeightItemSystem : EntitySystem
{
[Dependency] private readonly SharedItemSystem _item = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<AddHeightItemComponent, ComponentInit>(OnADHI);
}
/// <summary>
/// Add item component depending on height
/// </summary>
private void OnADHI(EntityUid uid, AddHeightItemComponent com, ComponentInit args)
{
if (!TryComp<HumanoidAppearanceComponent>(uid, out var humanoid))
return;
if (!_proto.TryIndex(humanoid.Species, out var speciesProto))
return;
if (speciesProto.MaxItemHeight >= humanoid.Height)
{
var size1 = "Ginormous";
var item = EnsureComp<ItemComponent>(uid);
_item.SetSize(uid, size1, item);
EnsureComp<MultiHandedItemComponent>(uid);
var escape = EnsureComp<CanEscapeInventoryComponent>(uid);
escape.BaseResistTime = 1f;
}
}
}
}