mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 21:48:58 +03:00
* I hate it * Added ability to choose target body part on item throwing * забыл * WeaponRandom works with throwable weapon * RadialEntityMorph & RadialBUI fix * ru&en localization * Я себя зарежу нахуй за такое * Правки рисованной хуйни и прототипы с лодаутами * fuck * ну хорошо блять, убедил, одну пустую строчку уберу * loadout move to _White * Я после тех 3х банок не помню нахуй это нужно было * 1 more fix
29 lines
877 B
C#
29 lines
877 B
C#
using Content.Shared.Verbs;
|
|
|
|
namespace Content.Shared._White.EntityGenerator;
|
|
|
|
|
|
public abstract class SharedEntityGeneratorSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<EntityGeneratorComponent, GetVerbsEvent<AlternativeVerb>>(AddExtractVerb);
|
|
}
|
|
|
|
private void AddExtractVerb(EntityUid uid, EntityGeneratorComponent component, GetVerbsEvent<AlternativeVerb> args)
|
|
{
|
|
if (!args.CanAccess || !args.CanInteract)
|
|
return;
|
|
|
|
args.Verbs.Add(new AlternativeVerb()
|
|
{
|
|
Act = () => Extract(uid, args.User, component),
|
|
Text = Loc.GetString("entity-generator-extract-verb"),
|
|
Disabled = component.Charges < 0
|
|
});
|
|
}
|
|
|
|
protected abstract void Extract(EntityUid uid, EntityUid user, EntityGeneratorComponent component);
|
|
}
|