Potato battery update + potato AI (#21142)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Doru991
2023-10-25 16:52:49 +03:00
committed by GitHub
parent 94cda6a253
commit 6b04aaf964
23 changed files with 215 additions and 7 deletions

View File

@@ -71,6 +71,9 @@ namespace Content.Shared.Containers.ItemSlots
[DataField("whitelist")]
public EntityWhitelist? Whitelist;
[DataField("blacklist")]
public EntityWhitelist? Blacklist;
[DataField("insertSound")]
public SoundSpecifier InsertSound = new SoundPathSpecifier("/Audio/Weapons/Guns/MagIn/revolver_magin.ogg");

View File

@@ -255,7 +255,7 @@ namespace Content.Shared.Containers.ItemSlots
if (!swap && slot.HasItem)
return false;
if (slot.Whitelist != null && !slot.Whitelist.IsValid(usedUid))
if ((slot.Whitelist != null && !slot.Whitelist.IsValid(usedUid)) || (slot.Blacklist != null && slot.Blacklist.IsValid(usedUid)))
{
if (_netManager.IsClient && _timing.IsFirstTimePredicted && popup.HasValue && !string.IsNullOrWhiteSpace(slot.WhitelistFailPopup))
_popupSystem.PopupEntity(Loc.GetString(slot.WhitelistFailPopup), uid, popup.Value);