Files
wylab-station-14/Content.Server/_Wega/NullRod/NullRodSystem.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

51 lines
1.6 KiB
C#

using Content.Server.Bible.Components;
using Content.Shared.Hands;
using Content.Shared.Inventory.Events;
using Content.Shared.NullRod.Components;
namespace Content.Server.NullRod;
public sealed class NullRodSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<NullRodComponent, GotEquippedEvent>(OnDidEquip);
SubscribeLocalEvent<NullRodComponent, GotEquippedHandEvent>(OnHandEquipped);
SubscribeLocalEvent<NullRodComponent, GotUnequippedEvent>(OnDidUnequip);
SubscribeLocalEvent<NullRodComponent, GotUnequippedHandEvent>(OnHandUnequipped);
}
private void OnDidEquip(Entity<NullRodComponent> ent, ref GotEquippedEvent args)
{
if (!HasComp<BibleUserComponent>(args.Equipee) || HasComp<NullRodOwnerComponent>(args.Equipee))
return;
EnsureComp<NullRodOwnerComponent>(args.Equipee);
}
private void OnHandEquipped(Entity<NullRodComponent> ent, ref GotEquippedHandEvent args)
{
if (!HasComp<BibleUserComponent>(args.User) || HasComp<NullRodOwnerComponent>(args.User))
return;
EnsureComp<NullRodOwnerComponent>(args.User);
}
private void OnDidUnequip(Entity<NullRodComponent> ent, ref GotUnequippedEvent args)
{
if (!HasComp<NullRodOwnerComponent>(args.Equipee))
return;
RemComp<NullRodOwnerComponent>(args.Equipee);
}
private void OnHandUnequipped(Entity<NullRodComponent> ent, ref GotUnequippedHandEvent args)
{
if (!HasComp<NullRodOwnerComponent>(args.User))
return;
RemComp<NullRodOwnerComponent>(args.User);
}
}