Skip to content

Commit

Permalink
Changed prototype to syndicate observation console, added mech fixes …
Browse files Browse the repository at this point in the history
…from starlight (affects the observation console), new textures by Kazne, removed action to teleport
  • Loading branch information
AirFryerBuyOneGetOneFree2 committed Feb 6, 2025
1 parent 21dbb42 commit bb833b5
Show file tree
Hide file tree
Showing 12 changed files with 296 additions and 216 deletions.
253 changes: 177 additions & 76 deletions Content.Server/_Starlight/Antags/Abductor/AbductorSystem.Actions.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ protected void SetMoveInput(Entity<InputMoverComponent> entity, MoveButtons butt

// Relay the fact we had any movement event.
// TODO: Ideally we'd do these in a tick instead of out of sim.
Vector2 vector2 = DirVecForButtons(entity.Comp.HeldMoveButtons);
Vector2 vector2 = DirVecForButtons(buttons);
Vector2i vector2i = new Vector2i((int)vector2.X, (int)vector2.Y);
Direction dir = (vector2i == Vector2i.Zero) ? Direction.Invalid : vector2i.AsDirection();

var moveEvent = new MoveInputEvent(entity, entity.Comp.HeldMoveButtons, dir, entity.Comp.HeldMoveButtons != 0);
var moveEvent = new MoveInputEvent(entity, buttons, dir, buttons != 0);
entity.Comp.HeldMoveButtons = buttons;
RaiseLocalEvent(entity, ref moveEvent);
Dirty(entity, entity.Comp);
Expand Down
26 changes: 20 additions & 6 deletions Content.Shared/Movement/Systems/SharedMoverController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,28 +124,42 @@ protected void HandleMobMovement(
{
if (_mobState.IsIncapacitated(relayTarget.Source) ||
TryComp<SleepingComponent>(relayTarget.Source, out _) ||
!MoverQuery.TryGetComponent(relayTarget.Source, out var relayedMover))
!PhysicsQuery.TryGetComponent(relayTarget.Source, out var relayedPhysicsComponent) ||
!MoverQuery.TryGetComponent(relayTarget.Source, out var relayedMover) ||
!XformQuery.TryGetComponent(relayTarget.Source, out var relayedXform))
{
canMove = false;
}
else
{
mover.LerpTarget = relayedMover.LerpTarget;
mover.RelativeEntity = relayedMover.RelativeEntity;
mover.RelativeRotation = relayedMover.RelativeRotation;
mover.TargetRelativeRotation = relayedMover.TargetRelativeRotation;
HandleMobMovement(relayTarget.Source, relayedMover, relayTarget.Source, relayedPhysicsComponent, relayedXform, frameTime);
}
}

// Update relative movement
if (mover.LerpTarget < Timing.CurTime)
else
{
if (TryUpdateRelative(mover, xform))
if (mover.LerpTarget < Timing.CurTime)
{
Dirty(uid, mover);
if (TryComp(uid, out RelayInputMoverComponent? relay)
&& TryComp(relay.RelayEntity, out TransformComponent? relayXform))
{
if (TryUpdateRelative(mover, relayXform))
Dirty(uid, mover);
}
else
{
if (TryUpdateRelative(mover, xform))
Dirty(uid, mover);
}
}
}

LerpRotation(uid, mover, frameTime);
LerpRotation(uid, mover, frameTime);
}

if (!canMove
|| physicsComponent.BodyStatus != BodyStatus.OnGround && !CanMoveInAirQuery.HasComponent(uid)
Expand Down
12 changes: 9 additions & 3 deletions Content.Shared/Silicons/StationAi/SharedStationAiSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using Content.Shared.Starlight;
using Content.Shared.ActionBlocker;
using Content.Shared.Actions;
using Content.Shared.Administration.Managers;
Expand Down Expand Up @@ -188,10 +188,16 @@ private void OnAiBuiCheck(Entity<StationAiWhitelistComponent> ent, ref BoundUser
private void OnAiInRange(Entity<StationAiOverlayComponent> ent, ref InRangeOverrideEvent args)
{
args.Handled = true;
var targetXform = Transform(args.Target);
var target = args.Target;
if (ent.Comp.AllowCrossGrid && TryComp(ent, out RelayInputMoverComponent? relay))
{
target = relay.RelayEntity;
}

var targetXform = Transform(target);

// No cross-grid
if (targetXform.GridUid != Transform(args.User).GridUid)
if (targetXform.GridUid != Transform(args.User).GridUid && !ent.Comp.AllowCrossGrid)
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,39 +1,21 @@
#abductor
- type: entity
parent: BaseComputer
id: AbductorConsole
name: abductor console
id: SyndicateObservationConsole
name: syndicate observation console
description: A computer that is used for spying on the station.
components:
- type: AbductorConsole
- type: Sprite
sprite: _Starlight/Structures/Machines/abductor_console.rsi
layers:
- map: ["console"]
state: console
- type: ActivatableUI
key: enum.AbductorConsoleUIKey.Key
- type: UserInterface
interfaces:
enum.AbductorConsoleUIKey.Key:
type: AbductorConsoleBui
- type: PointLight
enabled: true
radius: 1.5
energy: 1.6
color: "#FC0097"

- type: entity
parent: BaseComputer
id: AbductorHumanObservationConsole
name: human observation console
description: Use this to set teleporter destination or retrieve people marked by scientist tools. Also used for buying replacement gear and linking the agent's vest.
components:
- type: Sprite
sprite: _Starlight/Structures/Machines/abductor_camera_console.rsi
layers:
- map: ["console"]
state: console
- map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: comm_syndie
- map: ["computerLayerKeys"]
state: syndie_key
- type: AbductorHumanObservationConsole
- type: ActivatableUI
key: enum.AbductorCameraConsoleUIKey.Key
Expand Down Expand Up @@ -67,7 +49,7 @@
- type: Sprite
sprite: _Starlight/Structures/Machines/abductor_camera_console.rsi
layers:
- state: nt_eye
- state: syndicate_eye
shader: unshaded
- type: Tag
tags:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,82 +6,84 @@
},
"copyright": "Taked From TG Station",
"license": "CC-BY-SA-3.0",
"states": [
{
"name": "console",
"directions": 1,
"delays": [
[
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08,
0.08
]
]
},
{
"name": "nt_eye",
"delays": [
[
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15
"states": [
{
"name": "console",
"directions": 4
},
{
"name": "comm_syndie",
"directions": 4,
"delays": [
[
0.1,
0.1
],
[
0.1,
0.1
],
[
0.1,
0.1
],
[
0.1,
0.1
]
]
]
},
{
"name": "syndicate_eye",
"directions": 1,
"delays": [
[
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075
]
]
}
]
},
{
"name": "generic_keyboard",
"directions": 4
},
{
"name": "syndie_key",
"directions": 4
},
{
"name": "nt_eye",
"delays": [
[
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.15
]
]
},
{
"name": "syndicate_eye",
"directions": 1,
"delays": [
[
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075,
0.075
]
]
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

This file was deleted.

0 comments on commit bb833b5

Please sign in to comment.