Arachnid 2: Episode 2 (#19984)
* Shield * minor sprite changes and buffs * structure buff * Crafting stuff * tweaks * 88-88 * Better web pocket sprites. * yeah it's fine now.
This commit is contained in:
@@ -15,6 +15,7 @@ using Content.Shared.Hands.EntitySystems;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Storage;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Timing;
|
||||
@@ -29,6 +30,8 @@ namespace Content.Server.Construction
|
||||
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
|
||||
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
||||
[Dependency] private readonly EntityLookupSystem _lookupSystem = default!;
|
||||
[Dependency] private readonly StorageSystem _storageSystem = default!;
|
||||
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||
|
||||
// --- WARNING! LEGACY CODE AHEAD! ---
|
||||
// This entire file contains the legacy code for initial construction.
|
||||
@@ -330,6 +333,12 @@ namespace Content.Server.Construction
|
||||
return false;
|
||||
}
|
||||
|
||||
if (constructionPrototype.EntityWhitelist != null && !constructionPrototype.EntityWhitelist.IsValid(user))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("construction-system-cannot-start"), user, user);
|
||||
return false;
|
||||
}
|
||||
|
||||
var startNode = constructionGraph.Nodes[constructionPrototype.StartNode];
|
||||
var targetNode = constructionGraph.Nodes[constructionPrototype.TargetNode];
|
||||
var pathFind = constructionGraph.Path(startNode.Name, targetNode.Name);
|
||||
@@ -383,7 +392,6 @@ namespace Content.Server.Construction
|
||||
// LEGACY CODE. See warning at the top of the file!
|
||||
private async void HandleStartStructureConstruction(TryStartStructureConstructionMessage ev, EntitySessionEventArgs args)
|
||||
{
|
||||
|
||||
if (!_prototypeManager.TryIndex(ev.PrototypeName, out ConstructionPrototype? constructionPrototype))
|
||||
{
|
||||
_sawmill.Error($"Tried to start construction of invalid recipe '{ev.PrototypeName}'!");
|
||||
@@ -404,6 +412,12 @@ namespace Content.Server.Construction
|
||||
return;
|
||||
}
|
||||
|
||||
if (constructionPrototype.EntityWhitelist != null && !constructionPrototype.EntityWhitelist.IsValid(user))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("construction-system-cannot-start"), user, user);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_container.IsEntityInContainer(user))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("construction-system-inside-container"), user, user);
|
||||
|
||||
Reference in New Issue
Block a user