Skip to content

Commit

Permalink
Merge branch 'master' into Asterisk1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin-Tel authored Nov 1, 2023
2 parents 7f868fa + ce1c86d commit d8b970f
Show file tree
Hide file tree
Showing 23 changed files with 33,183 additions and 31,021 deletions.
26 changes: 19 additions & 7 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
"Changes: Sprites":
- '**/*.rsi/*.png'
"Changes: C#":
- "**/*.cs"

"Changes: Documentation":
- "**/*.xml"
- "**/*.md"

"Changes: Localization":
- 'Resources/Locale/**/*.ftl'

"Changes: Map":
- 'Resources/Maps/*.yml'
- 'Resources/Prototypes/Maps/*.yml'
- "Resources/Maps/**/*.yml"
- "Resources/Prototypes/Maps/**/*.yml"

"Changes: Sprite":
- "**/*.rsi/*.png"
- "**/*.rsi/*.json"

"Changes: UI":
- '**/*.xaml*'
- "**/*.xaml*"

"No C#":
- all: ["!**/*.cs"]
"Changes: YML":
- any: ["**/*.yml"]
all: ["!Resources/Maps/**/*.yml", "!Resources/Prototypes/Maps/**/*.yml"]
2 changes: 1 addition & 1 deletion .github/workflows/conflict-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
- name: Check for Merge Conflicts
uses: ike709/actions-label-merge-conflict@9eefdd17e10566023c46d2dc6dc04fcb8ec76142
with:
dirtyLabel: "Merge Conflict"
dirtyLabel: "Status: Merge Conflict"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
4 changes: 3 additions & 1 deletion Content.Client/MainMenu/UI/MainMenuControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
<LayoutContainer>
<BoxContainer Name="VBox"
Orientation="Vertical"
StyleIdentifier="mainMenuVBox">
StyleIdentifier="mainMenuVBox"
MinWidth="512">
<TextureRect Name="Logo"
Stretch="KeepCentered" />
<Control MinSize="0 24" />
<BoxContainer Orientation="Horizontal"
SeparationOverride="4">
<Label Text="{Loc 'main-menu-username-label'}" />
Expand Down
11 changes: 9 additions & 2 deletions Content.Server/Labels/Label/HandLabelerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Content.Shared.Database;
using Content.Shared.Interaction;
using Content.Shared.Labels;
using Content.Shared.Tag;
using Content.Shared.Verbs;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
Expand All @@ -22,6 +23,10 @@ public sealed class HandLabelerSystem : EntitySystem
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly LabelSystem _labelSystem = default!;
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly TagSystem _tagSystem = default!;

[ValidatePrototypeId<TagPrototype>]
private const string PreventTag = "PreventLabel";

public override void Initialize()
{
Expand All @@ -35,7 +40,8 @@ public override void Initialize()

private void OnUtilityVerb(EntityUid uid, HandLabelerComponent handLabeler, GetVerbsEvent<UtilityVerb> args)
{
if (args.Target is not { Valid: true } target || !handLabeler.Whitelist.IsValid(target) || !args.CanAccess)
if (args.Target is not { Valid: true } target || !handLabeler.Whitelist.IsValid(target) || !args.CanAccess
|| _tagSystem.HasTag(target, PreventTag)) // DeltaV - Prevent labels on certain items
return;

string labelerText = handLabeler.AssignedLabel == string.Empty ? Loc.GetString("hand-labeler-remove-label-text") : Loc.GetString("hand-labeler-add-label-text");
Expand All @@ -56,7 +62,8 @@ private void OnUtilityVerb(EntityUid uid, HandLabelerComponent handLabeler, GetV

private void AfterInteractOn(EntityUid uid, HandLabelerComponent handLabeler, AfterInteractEvent args)
{
if (args.Target is not {Valid: true} target || !handLabeler.Whitelist.IsValid(target) || !args.CanReach)
if (args.Target is not {Valid: true} target || !handLabeler.Whitelist.IsValid(target) || !args.CanReach
|| _tagSystem.HasTag(target, PreventTag)) // DeltaV - Prevent labels on certain items
return;

AddLabelTo(uid, handLabeler, target, out string? result);
Expand Down
6 changes: 6 additions & 0 deletions Content.Server/Labels/Label/LabelSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Examine;
using Content.Shared.Labels;
using Content.Shared.Tag;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
Expand All @@ -19,8 +20,11 @@ public sealed class LabelSystem : EntitySystem
[Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
[Dependency] private readonly TagSystem _tagSystem = default!;

public const string ContainerName = "paper_label";
[ValidatePrototypeId<TagPrototype>]
private const string PreventTag = "PreventLabel";

public override void Initialize()
{
Expand All @@ -45,6 +49,8 @@ public void Label(EntityUid uid, string? text, MetaDataComponent? metadata = nul
{
if (!Resolve(uid, ref metadata))
return;
if (_tagSystem.HasTag(uid, PreventTag)) // DeltaV - Prevent labels on certain items
return;
if (!Resolve(uid, ref label, false))
label = EnsureComp<LabelComponent>(uid);

Expand Down
16 changes: 11 additions & 5 deletions Content.Server/Nyanotrasen/Item/PseudoItem/PseudoItemSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Content.Shared.Storage;
using Content.Server.Storage.EntitySystems;
using Content.Server.DoAfter;
using Content.Shared.Tag;
using Robust.Shared.Containers;

namespace Content.Server.Item.PseudoItem;
Expand All @@ -16,6 +17,11 @@ public sealed partial class PseudoItemSystem : EntitySystem
[Dependency] private readonly StorageSystem _storageSystem = default!;
[Dependency] private readonly ItemSystem _itemSystem = default!;
[Dependency] private readonly DoAfterSystem _doAfter = default!;
[Dependency] private readonly TagSystem _tagSystem = default!;

[ValidatePrototypeId<TagPrototype>]
private const string PreventTag = "PreventLabel";

public override void Initialize()
{
base.Initialize();
Expand Down Expand Up @@ -122,19 +128,19 @@ public bool TryInsert(EntityUid storageUid, EntityUid toInsert, PseudoItemCompon
return false;

var item = EnsureComp<ItemComponent>(toInsert);
_tagSystem.TryAddTag(toInsert, PreventTag);
_itemSystem.SetSize(toInsert, component.Size, item);

if (!_storageSystem.Insert(storageUid, toInsert, out _, null, storage))
{
component.Active = false;
RemComp<ItemComponent>(toInsert);
return false;
} else
{
component.Active = true;
Transform(storageUid).AttachToGridOrMap();
return true;
}

component.Active = true;
Transform(storageUid).AttachToGridOrMap();
return true;
}
private void StartInsertDoAfter(EntityUid inserter, EntityUid toInsert, EntityUid storageEntity, PseudoItemComponent? pseudoItem = null)
{
Expand Down
6 changes: 6 additions & 0 deletions Resources/Changelog/DeltaVChangelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -756,3 +756,9 @@ Entries:
message: Asterisk station has been added to the game.
id: 115
time: '2023-11-01T16:32:48.0000000+00:00'
- author: leonardo-dabepis
changes:
- type: Tweak
message: Switched logos around
id: 116
time: '2023-11-01T22:45:55.0000000+00:00'
Loading

0 comments on commit d8b970f

Please sign in to comment.