Merge remote-tracking branch 'space-wizards/master'

# Conflicts:
#	Resources/Locale/en-US/_strings/mind/verbs/inspect-mind.ftl
This commit is contained in:
Vigers Ray 2025-04-12 23:00:43 +03:00
commit 182415446a
7 changed files with 74 additions and 50 deletions

View file

@ -32,11 +32,26 @@ namespace Content.Client.Administration.Systems
var verb = new VvVerb()
{
Text = Loc.GetString("view-variables"),
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/vv.svg.192dpi.png")),
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/vv.svg.192dpi.png")),
Act = () => _clientConsoleHost.ExecuteCommand($"vv {GetNetEntity(args.Target)}"),
ClientExclusive = true // opening VV window is client-side. Don't ask server to run this verb.
};
args.Verbs.Add(verb);
// Inspect mind
if (TryComp<MindContainerComponent>(args.Target, out var mindContainer)
&& mindContainer.HasMind)
{
Verb mindVerb = new()
{
Text = Loc.GetString("inspect-mind-verb-get-data-text"),
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/sentient.svg.192dpi.png")),
Category = VerbCategory.Debug,
Act = () => _clientConsoleHost.ExecuteCommand($"vv {GetNetEntity(mindContainer.Mind)}"),
ClientExclusive = true
};
args.Verbs.Add(mindVerb);
}
}
if (!_admin.IsAdmin(args.User))

View file

@ -50,7 +50,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public bool AddTag(EntityUid entityUid, ProtoId<TagPrototype> tag)
public bool AddTag(EntityUid entityUid, [ForbidLiteral] ProtoId<TagPrototype> tag)
{
return AddTag((entityUid, EnsureComp<TagComponent>(entityUid)), tag);
}
@ -64,9 +64,9 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool AddTags(EntityUid entityUid, params ProtoId<TagPrototype>[] tags)
public bool AddTags(EntityUid entityUid, [ForbidLiteral] params ProtoId<TagPrototype>[] tags)
{
return AddTags(entityUid, (IEnumerable<ProtoId<TagPrototype>>)tags);
return AddTags(entityUid, (IEnumerable<ProtoId<TagPrototype>>)tags);
}
/// <summary>
@ -78,7 +78,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool AddTags(EntityUid entityUid, IEnumerable<ProtoId<TagPrototype>> tags)
public bool AddTags(EntityUid entityUid, [ForbidLiteral] IEnumerable<ProtoId<TagPrototype>> tags)
{
return AddTags((entityUid, EnsureComp<TagComponent>(entityUid)), tags);
}
@ -93,7 +93,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public bool TryAddTag(EntityUid entityUid, ProtoId<TagPrototype> tag)
public bool TryAddTag(EntityUid entityUid, [ForbidLiteral] ProtoId<TagPrototype> tag)
{
return _tagQuery.TryComp(entityUid, out var component) &&
AddTag((entityUid, component), tag);
@ -109,7 +109,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool TryAddTags(EntityUid entityUid, params ProtoId<TagPrototype>[] tags)
public bool TryAddTags(EntityUid entityUid, [ForbidLiteral] params ProtoId<TagPrototype>[] tags)
{
return TryAddTags(entityUid, (IEnumerable<ProtoId<TagPrototype>>)tags);
}
@ -124,7 +124,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool TryAddTags(EntityUid entityUid, IEnumerable<ProtoId<TagPrototype>> tags)
public bool TryAddTags(EntityUid entityUid, [ForbidLiteral] IEnumerable<ProtoId<TagPrototype>> tags)
{
return _tagQuery.TryComp(entityUid, out var component) &&
AddTags((entityUid, component), tags);
@ -139,7 +139,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public bool HasTag(EntityUid entityUid, ProtoId<TagPrototype> tag)
public bool HasTag(EntityUid entityUid, [ForbidLiteral] ProtoId<TagPrototype> tag)
{
return _tagQuery.TryComp(entityUid, out var component) &&
HasTag(component, tag);
@ -166,7 +166,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAllTags(EntityUid entityUid, params ProtoId<TagPrototype>[] tags)
public bool HasAllTags(EntityUid entityUid, [ForbidLiteral] params ProtoId<TagPrototype>[] tags)
{
return _tagQuery.TryComp(entityUid, out var component) &&
HasAllTags(component, tags);
@ -181,7 +181,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAllTags(EntityUid entityUid, HashSet<ProtoId<TagPrototype>> tags)
public bool HasAllTags(EntityUid entityUid, [ForbidLiteral] HashSet<ProtoId<TagPrototype>> tags)
{
return _tagQuery.TryComp(entityUid, out var component) &&
HasAllTags(component, tags);
@ -196,7 +196,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAllTags(EntityUid entityUid, List<ProtoId<TagPrototype>> tags)
public bool HasAllTags(EntityUid entityUid, [ForbidLiteral] List<ProtoId<TagPrototype>> tags)
{
return _tagQuery.TryComp(entityUid, out var component) &&
HasAllTags(component, tags);
@ -211,7 +211,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAllTags(EntityUid entityUid, IEnumerable<ProtoId<TagPrototype>> tags)
public bool HasAllTags(EntityUid entityUid, [ForbidLiteral] IEnumerable<ProtoId<TagPrototype>> tags)
{
return _tagQuery.TryComp(entityUid, out var component) &&
HasAllTags(component, tags);
@ -226,7 +226,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public bool HasAnyTag(EntityUid entityUid, ProtoId<TagPrototype> tag) =>
public bool HasAnyTag(EntityUid entityUid, [ForbidLiteral] ProtoId<TagPrototype> tag) =>
HasTag(entityUid, tag);
/// <summary>
@ -238,7 +238,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAnyTag(EntityUid entityUid, params ProtoId<TagPrototype>[] tags)
public bool HasAnyTag(EntityUid entityUid, [ForbidLiteral] params ProtoId<TagPrototype>[] tags)
{
return _tagQuery.TryComp(entityUid, out var component) &&
HasAnyTag(component, tags);
@ -253,7 +253,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAnyTag(EntityUid entityUid, HashSet<ProtoId<TagPrototype>> tags)
public bool HasAnyTag(EntityUid entityUid, [ForbidLiteral] HashSet<ProtoId<TagPrototype>> tags)
{
return _tagQuery.TryComp(entityUid, out var component) &&
HasAnyTag(component, tags);
@ -268,7 +268,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAnyTag(EntityUid entityUid, List<ProtoId<TagPrototype>> tags)
public bool HasAnyTag(EntityUid entityUid, [ForbidLiteral] List<ProtoId<TagPrototype>> tags)
{
return _tagQuery.TryComp(entityUid, out var component) &&
HasAnyTag(component, tags);
@ -283,7 +283,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAnyTag(EntityUid entityUid, IEnumerable<ProtoId<TagPrototype>> tags)
public bool HasAnyTag(EntityUid entityUid, [ForbidLiteral] IEnumerable<ProtoId<TagPrototype>> tags)
{
return _tagQuery.TryComp(entityUid, out var component) &&
HasAnyTag(component, tags);
@ -298,7 +298,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public bool HasTag(TagComponent component, ProtoId<TagPrototype> tag)
public bool HasTag(TagComponent component, [ForbidLiteral] ProtoId<TagPrototype> tag)
{
#if DEBUG
AssertValidTag(tag);
@ -315,7 +315,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public bool HasAllTags(TagComponent component, ProtoId<TagPrototype> tag) =>
public bool HasAllTags(TagComponent component, [ForbidLiteral] ProtoId<TagPrototype> tag) =>
HasTag(component, tag);
/// <summary>
@ -327,7 +327,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAllTags(TagComponent component, params ProtoId<TagPrototype>[] tags)
public bool HasAllTags(TagComponent component, [ForbidLiteral] params ProtoId<TagPrototype>[] tags)
{
foreach (var tag in tags)
{
@ -350,7 +350,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAllTagsArray(TagComponent component, ProtoId<TagPrototype>[] tags)
public bool HasAllTagsArray(TagComponent component, [ForbidLiteral] ProtoId<TagPrototype>[] tags)
{
foreach (var tag in tags)
{
@ -373,7 +373,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAllTags(TagComponent component, List<ProtoId<TagPrototype>> tags)
public bool HasAllTags(TagComponent component, [ForbidLiteral] List<ProtoId<TagPrototype>> tags)
{
foreach (var tag in tags)
{
@ -396,7 +396,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAllTags(TagComponent component, HashSet<ProtoId<TagPrototype>> tags)
public bool HasAllTags(TagComponent component, [ForbidLiteral] HashSet<ProtoId<TagPrototype>> tags)
{
foreach (var tag in tags)
{
@ -419,7 +419,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAllTags(TagComponent component, IEnumerable<ProtoId<TagPrototype>> tags)
public bool HasAllTags(TagComponent component, [ForbidLiteral] IEnumerable<ProtoId<TagPrototype>> tags)
{
foreach (var tag in tags)
{
@ -442,7 +442,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public bool HasAnyTag(TagComponent component, ProtoId<TagPrototype> tag) =>
public bool HasAnyTag(TagComponent component, [ForbidLiteral] ProtoId<TagPrototype> tag) =>
HasTag(component, tag);
/// <summary>
@ -454,7 +454,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAnyTag(TagComponent component, params ProtoId<TagPrototype>[] tags)
public bool HasAnyTag(TagComponent component, [ForbidLiteral] params ProtoId<TagPrototype>[] tags)
{
foreach (var tag in tags)
{
@ -477,7 +477,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAnyTag(TagComponent component, HashSet<ProtoId<TagPrototype>> tags)
public bool HasAnyTag(TagComponent component, [ForbidLiteral] HashSet<ProtoId<TagPrototype>> tags)
{
foreach (var tag in tags)
{
@ -500,7 +500,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAnyTag(TagComponent component, List<ProtoId<TagPrototype>> tags)
public bool HasAnyTag(TagComponent component, [ForbidLiteral] List<ProtoId<TagPrototype>> tags)
{
foreach (var tag in tags)
{
@ -523,7 +523,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool HasAnyTag(TagComponent component, IEnumerable<ProtoId<TagPrototype>> tags)
public bool HasAnyTag(TagComponent component, [ForbidLiteral] IEnumerable<ProtoId<TagPrototype>> tags)
{
foreach (var tag in tags)
{
@ -546,7 +546,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public bool RemoveTag(EntityUid entityUid, ProtoId<TagPrototype> tag)
public bool RemoveTag(EntityUid entityUid, [ForbidLiteral] ProtoId<TagPrototype> tag)
{
return _tagQuery.TryComp(entityUid, out var component) &&
RemoveTag((entityUid, component), tag);
@ -561,7 +561,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool RemoveTags(EntityUid entityUid, params ProtoId<TagPrototype>[] tags)
public bool RemoveTags(EntityUid entityUid, [ForbidLiteral] params ProtoId<TagPrototype>[] tags)
{
return RemoveTags(entityUid, (IEnumerable<ProtoId<TagPrototype>>)tags);
}
@ -575,7 +575,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool RemoveTags(EntityUid entityUid, IEnumerable<ProtoId<TagPrototype>> tags)
public bool RemoveTags(EntityUid entityUid, [ForbidLiteral] IEnumerable<ProtoId<TagPrototype>> tags)
{
return _tagQuery.TryComp(entityUid, out var component) &&
RemoveTags((entityUid, component), tags);
@ -590,7 +590,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public bool AddTag(Entity<TagComponent> entity, ProtoId<TagPrototype> tag)
public bool AddTag(Entity<TagComponent> entity, [ForbidLiteral] ProtoId<TagPrototype> tag)
{
#if DEBUG
AssertValidTag(tag);
@ -611,7 +611,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool AddTags(Entity<TagComponent> entity, params ProtoId<TagPrototype>[] tags)
public bool AddTags(Entity<TagComponent> entity, [ForbidLiteral] params ProtoId<TagPrototype>[] tags)
{
return AddTags(entity, (IEnumerable<ProtoId<TagPrototype>>)tags);
}
@ -625,7 +625,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool AddTags(Entity<TagComponent> entity, IEnumerable<ProtoId<TagPrototype>> tags)
public bool AddTags(Entity<TagComponent> entity, [ForbidLiteral] IEnumerable<ProtoId<TagPrototype>> tags)
{
var update = false;
foreach (var tag in tags)
@ -653,7 +653,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
/// </exception>
public bool RemoveTag(Entity<TagComponent> entity, ProtoId<TagPrototype> tag)
public bool RemoveTag(Entity<TagComponent> entity, [ForbidLiteral] ProtoId<TagPrototype> tag)
{
#if DEBUG
AssertValidTag(tag);
@ -675,7 +675,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool RemoveTags(Entity<TagComponent> entity, params ProtoId<TagPrototype>[] tags)
public bool RemoveTags(Entity<TagComponent> entity, [ForbidLiteral] params ProtoId<TagPrototype>[] tags)
{
return RemoveTags(entity, (IEnumerable<ProtoId<TagPrototype>>)tags);
}
@ -689,7 +689,7 @@ public sealed class TagSystem : EntitySystem
/// <exception cref="UnknownPrototypeException">
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
/// </exception>
public bool RemoveTags(Entity<TagComponent> entity, IEnumerable<ProtoId<TagPrototype>> tags)
public bool RemoveTags(Entity<TagComponent> entity, [ForbidLiteral] IEnumerable<ProtoId<TagPrototype>> tags)
{
var update = false;
foreach (var tag in tags)

View file

@ -1007,5 +1007,12 @@ Entries:
id: 122
time: '2025-04-11T21:04:37.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/36468
- author: slarticodefast
changes:
- message: Added debug verb for quickly inspecting someone's mind entity in VV.
type: Add
id: 123
time: '2025-04-12T13:37:07.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/36474
Name: Admin
Order: 1

View file

@ -1,12 +1,4 @@
Entries:
- author: slarticodefast
changes:
- message: Fixed windoors and high security doors not showing up on the AI's electrocution
HUD.
type: Fix
id: 7657
time: '2024-11-27T05:55:15.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/33551
- author: Beck Thompson
changes:
- message: Handheld light verbs are now predicted!
@ -3891,3 +3883,11 @@
id: 8156
time: '2025-04-11T04:58:33.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/36383
- author: PJB3005
changes:
- message: Lobby time on Wizard's Den has been increased from 2 minute 30 seconds
to 5 minutes.
type: Tweak
id: 8157
time: '2025-04-12T09:05:14.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/36476

View file

@ -5,6 +5,7 @@
desc = "Official English Space Station 14 servers. Vanilla, roleplay ruleset."
lobbyenabled = true
soft_max_players = 80
lobbyduration = 300 # 5 minutes lobby timer
panic_bunker.enabled = true
panic_bunker.min_overall_minutes = 120
panic_bunker.disable_with_admins = true

View file

@ -0,0 +1 @@
inspect-mind-verb-get-data-text = Inspect Mind

View file

@ -16,7 +16,7 @@
- type: StationEmergencyShuttle
emergencyShuttlePath: /Maps/Shuttles/emergency_lox.yml
- type: StationJobs
availableJobs: # 58 jobs total w/o latejoins & interns, 75 jobs total w/ latejoins & interns
availableJobs: # 60 jobs total w/o latejoins & interns, 77 jobs total w/ latejoins & interns
#command (7)
Captain: [ 1, 1 ]
HeadOfPersonnel: [ 1, 1 ]
@ -46,9 +46,9 @@
#science (5)
Scientist: [ 5, 5 ]
ResearchAssistant: [ 4, 4 ] #intern, not counted
#security (8)
#security (10)
Warden: [ 1, 1 ]
SecurityOfficer: [ 4, 4 ]
SecurityOfficer: [ 6, 6 ]
Detective: [ 1, 1 ]
SecurityCadet: [ 4, 4 ] #intern, not counted
Lawyer: [ 2, 2 ]