mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
Fuselage rust stage 2 (#629)
* the definition of insanity * the definition of insanity * the definition of insanity * we have hullrot at home * maybe the real hullrot was the friends we made along the way * john hullrot * i am going to hullroooooot * it's hullrotver * we're so hullback * we're rotting the hull with this one * hullmerge * the hullrot is leaking * never gonna rot you up * hullfresh * john starsector * god i wish we had grid collision damage * you can tell I am very tired because I stopped forcing a hullrot joke into every commit message * hr * this is a surprise sprite that will help us later * motherfucker * i have nothing good to say * still nothing * brb * random letter random letter random letter dash random number random number random number * ass * blast * ffs * fcuk * RE: ffs * RE: RE: ffs * гнида жестяная * continue * i hate tests * i love tests * slide to the right * i hate tests again * what the fuck * ты шиз? * ?? * bbgun
This commit is contained in:
@@ -11,19 +11,19 @@ public partial class RemoteControlSystem
|
||||
{
|
||||
private void InitializeTarget()
|
||||
{
|
||||
SubscribeLocalEvent<RemoteControlTargetComponent, MapInitEvent>(OnTargetMapInit);
|
||||
SubscribeLocalEvent<RemoteControlTargetComponent, ComponentShutdown>(OnTargetShutdown);
|
||||
SubscribeLocalEvent<RemoteControllableComponent, MapInitEvent>(OnTargetMapInit);
|
||||
SubscribeLocalEvent<RemoteControllableComponent, ComponentShutdown>(OnTargetShutdown);
|
||||
|
||||
SubscribeLocalEvent<RemoteControlTargetComponent, SpeechSourceOverrideEvent>(OnTargetSpeechSourceOverride);
|
||||
SubscribeLocalEvent<RemoteControllableComponent, SpeechSourceOverrideEvent>(OnTargetSpeechSourceOverride);
|
||||
|
||||
SubscribeLocalEvent<RemoteControlTargetComponent, GetVerbsEvent<AlternativeVerb>>(GetAltVerb);
|
||||
SubscribeLocalEvent<RemoteControllableComponent, GetVerbsEvent<AlternativeVerb>>(GetAltVerb);
|
||||
|
||||
SubscribeLocalEvent<RemoteControlTargetComponent, MobStateChangedEvent>(OnTargetMobStateChanged);
|
||||
SubscribeLocalEvent<RemoteControllableComponent, MobStateChangedEvent>(OnTargetMobStateChanged);
|
||||
|
||||
SubscribeLocalEvent<RemoteControlTargetComponent, RemoteControlExitActionEvent>(OnExitAction);
|
||||
SubscribeLocalEvent<RemoteControllableComponent, RemoteControlExitActionEvent>(OnExitAction);
|
||||
}
|
||||
|
||||
private void OnTargetMapInit(EntityUid uid, RemoteControlTargetComponent comp, MapInitEvent args)
|
||||
private void OnTargetMapInit(EntityUid uid, RemoteControllableComponent comp, MapInitEvent args)
|
||||
{
|
||||
EntityUid? actionUid = null;
|
||||
_action.AddAction(uid, ref actionUid, comp.EndRemoteControlAction);
|
||||
@@ -32,11 +32,11 @@ public partial class RemoteControlSystem
|
||||
comp.EndRemoteControlActionUid = actionUid.Value;
|
||||
}
|
||||
|
||||
private void OnTargetShutdown(EntityUid uid, RemoteControlTargetComponent comp, ComponentShutdown args)
|
||||
private void OnTargetShutdown(EntityUid uid, RemoteControllableComponent comp, ComponentShutdown args)
|
||||
{
|
||||
_action.RemoveAction(uid, comp.EndRemoteControlActionUid);
|
||||
|
||||
if (!TryComp<RemoteControlUserComponent>(comp.User, out var userComponent))
|
||||
if (!TryComp<RemoteControllingComponent>(comp.User, out var userComponent))
|
||||
return;
|
||||
|
||||
if (TryComp<RemoteControlConsoleComponent>(userComponent.Console, out var consoleComponent))
|
||||
@@ -45,15 +45,15 @@ public partial class RemoteControlSystem
|
||||
EndRemoteControl((comp.User.Value, userComponent), (uid, comp), true);
|
||||
}
|
||||
|
||||
private void OnTargetSpeechSourceOverride(EntityUid uid, RemoteControlTargetComponent comp, SpeechSourceOverrideEvent args)
|
||||
private void OnTargetSpeechSourceOverride(EntityUid uid, RemoteControllableComponent comp, SpeechSourceOverrideEvent args)
|
||||
{
|
||||
if (comp.User is { } user)
|
||||
args.Override = user;
|
||||
}
|
||||
|
||||
private void GetAltVerb(EntityUid uid, RemoteControlTargetComponent component, GetVerbsEvent<AlternativeVerb> args)
|
||||
private void GetAltVerb(EntityUid uid, RemoteControllableComponent component, GetVerbsEvent<AlternativeVerb> args)
|
||||
{
|
||||
if (!component.CanManually || !args.CanAccess || !args.CanInteract || !args.CanComplexInteract)
|
||||
if (!component.ManualControl || !args.CanAccess || !args.CanInteract || !args.CanComplexInteract)
|
||||
return;
|
||||
|
||||
args.Verbs.Add(
|
||||
@@ -82,13 +82,13 @@ public partial class RemoteControlSystem
|
||||
}
|
||||
|
||||
|
||||
private void OnExitAction(EntityUid uid, RemoteControlTargetComponent component, RemoteControlExitActionEvent args)
|
||||
private void OnExitAction(EntityUid uid, RemoteControllableComponent component, RemoteControlExitActionEvent args)
|
||||
{
|
||||
if(component.User is not null)
|
||||
EndRemoteControl(component.User.Value, (uid, component));
|
||||
}
|
||||
|
||||
private void OnTargetMobStateChanged(EntityUid uid, RemoteControlTargetComponent component, MobStateChangedEvent args)
|
||||
private void OnTargetMobStateChanged(EntityUid uid, RemoteControllableComponent component, MobStateChangedEvent args)
|
||||
{
|
||||
if (args.NewMobState != MobState.Alive && component.User.HasValue)
|
||||
EndRemoteControl(component.User.Value, (uid, component), true);
|
||||
|
||||
Reference in New Issue
Block a user