Skip to content

Commit

Permalink
ActionGrant to pAI
Browse files Browse the repository at this point in the history
  • Loading branch information
AsnDen committed Sep 21, 2024
1 parent cd761ea commit 78b6923
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 65 deletions.
8 changes: 0 additions & 8 deletions Content.Client/PAI/PAISystem.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;

namespace Content.Shared.PAI;
namespace Content.Server.PAI;

/// <summary>
/// pAIs, or Personal AIs, are essentially portable ghost role generators.
Expand All @@ -14,7 +12,7 @@ namespace Content.Shared.PAI;
/// and there's not always enough players and ghost roles to justify it.
/// All logic in PAISystem.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[RegisterComponent]
public sealed partial class PAIComponent : Component
{
/// <summary>
Expand All @@ -24,18 +22,6 @@ public sealed partial class PAIComponent : Component
[DataField, ViewVariables(VVAccess.ReadWrite)]
public EntityUid? LastUser;

[DataField(serverOnly: true)]
public EntProtoId? MidiActionId = "ActionPAIPlayMidi";

[DataField(serverOnly: true)] // server only, as it uses a server-BUI event !type
public EntityUid? MidiAction;

[DataField]
public EntProtoId MapActionId = "ActionPAIOpenMap";

[DataField, AutoNetworkedField]
public EntityUid? MapAction;

/// <summary>
/// When microwaved there is this chance to brick the pai, kicking out its player and preventing it from being used again.
/// </summary>
Expand Down
3 changes: 1 addition & 2 deletions Content.Server/PAI/PAISystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
using Content.Server.Kitchen.Components;
using Content.Shared.Interaction.Events;
using Content.Shared.Mind.Components;
using Content.Shared.PAI;
using Content.Shared.Popups;
using Robust.Shared.Random;
using System.Text;
using Robust.Shared.Player;

namespace Content.Server.PAI;

public sealed class PAISystem : SharedPAISystem
public sealed class PAISystem : EntitySystem
{
[Dependency] private readonly InstrumentSystem _instrumentSystem = default!;
[Dependency] private readonly IRobustRandom _random = default!;
Expand Down
39 changes: 0 additions & 39 deletions Content.Shared/PAI/SharedPAISystem.cs

This file was deleted.

4 changes: 4 additions & 0 deletions Resources/Prototypes/Entities/Objects/Fun/pai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
Searching: { state: pai-searching-overlay }
On: { state: pai-on-overlay }
- type: StationMap
- type: ActionGrant
actions:
- ActionPAIPlayMidi
- ActionPAIOpenMap

- type: entity
parent: [ PersonalAI, BaseSyndicateContraband]
Expand Down

0 comments on commit 78b6923

Please sign in to comment.