Refactor actions to be entities with components (#19900)

This commit is contained in:
DrSmugleaf
2023-09-08 18:16:05 -07:00
committed by GitHub
parent e18f731b91
commit c71f97e3a2
210 changed files with 10693 additions and 11714 deletions

View File

@@ -1,16 +1,15 @@
using System.Linq;
using Content.Server.Actions;
using Content.Server.Administration.Logs;
using Content.Server.PDA.Ringer;
using Content.Server.Stack;
using Content.Server.Store.Components;
using Content.Server.UserInterface;
using Content.Shared.Actions.ActionTypes;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Store;
using Content.Shared.Database;
using Robust.Server.GameObjects;
using System.Linq;
namespace Content.Server.Store.Systems;
@@ -162,10 +161,9 @@ public sealed partial class StoreSystem
}
//give action
if (listing.ProductAction != null)
if (!string.IsNullOrWhiteSpace(listing.ProductAction))
{
var action = new InstantAction(_proto.Index<InstantActionPrototype>(listing.ProductAction));
_actions.AddAction(buyer, action, null);
_actions.AddAction(buyer, Spawn(listing.ProductAction), null);
}
//broadcast event