Merge remote-tracking branch 'space-wizards/master'
This commit is contained in:
commit
a72edb0b90
12 changed files with 287 additions and 55 deletions
|
|
@ -1,18 +1,24 @@
|
|||
using System.Linq;
|
||||
using Content.Server.Chat.Systems;
|
||||
using Content.Server.Containers;
|
||||
using Content.Server.StationRecords.Systems;
|
||||
using Content.Shared.Access.Components;
|
||||
using static Content.Shared.Access.Components.IdCardConsoleComponent;
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.Access;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Construction;
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.StationRecords;
|
||||
using Content.Shared.StatusIcon;
|
||||
using Content.Shared.Throwing;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Prototypes;
|
||||
using System.Linq;
|
||||
using static Content.Shared.Access.Components.IdCardConsoleComponent;
|
||||
using Content.Shared.Access;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.Access.Systems;
|
||||
|
||||
|
|
@ -26,6 +32,10 @@ public sealed class IdCardConsoleSystem : SharedIdCardConsoleSystem
|
|||
[Dependency] private readonly AccessSystem _access = default!;
|
||||
[Dependency] private readonly IdCardSystem _idCard = default!;
|
||||
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
|
||||
[Dependency] private readonly SharedContainerSystem _container = default!;
|
||||
[Dependency] private readonly ThrowingSystem _throwing = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly ChatSystem _chat = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
|
@ -37,6 +47,11 @@ public sealed class IdCardConsoleSystem : SharedIdCardConsoleSystem
|
|||
SubscribeLocalEvent<IdCardConsoleComponent, ComponentStartup>(UpdateUserInterface);
|
||||
SubscribeLocalEvent<IdCardConsoleComponent, EntInsertedIntoContainerMessage>(UpdateUserInterface);
|
||||
SubscribeLocalEvent<IdCardConsoleComponent, EntRemovedFromContainerMessage>(UpdateUserInterface);
|
||||
SubscribeLocalEvent<IdCardConsoleComponent, DamageChangedEvent>(OnDamageChanged);
|
||||
|
||||
// Intercept the event before anyone can do anything with it!
|
||||
SubscribeLocalEvent<IdCardConsoleComponent, MachineDeconstructedEvent>(OnMachineDeconstructed,
|
||||
before: [typeof(EmptyOnMachineDeconstructSystem), typeof(ItemSlotsSystem)]);
|
||||
}
|
||||
|
||||
private void OnWriteToTargetIdMessage(EntityUid uid, IdCardConsoleComponent component, WriteToTargetIdMessage args)
|
||||
|
|
@ -213,4 +228,46 @@ public sealed class IdCardConsoleSystem : SharedIdCardConsoleSystem
|
|||
|
||||
_record.Synchronize(key);
|
||||
}
|
||||
|
||||
private void OnMachineDeconstructed(Entity<IdCardConsoleComponent> entity, ref MachineDeconstructedEvent args)
|
||||
{
|
||||
TryDropAndThrowIds(entity.AsNullable());
|
||||
}
|
||||
|
||||
private void OnDamageChanged(Entity<IdCardConsoleComponent> entity, ref DamageChangedEvent args)
|
||||
{
|
||||
if (TryDropAndThrowIds(entity.AsNullable()))
|
||||
_chat.TrySendInGameICMessage(entity, Loc.GetString("id-card-console-damaged"), InGameICChatType.Speak, true);
|
||||
}
|
||||
|
||||
#region PublicAPI
|
||||
|
||||
/// <summary>
|
||||
/// Tries to drop any IDs stored in the console, and then tries to throw them away.
|
||||
/// Returns true if anything was ejected and false otherwise.
|
||||
/// </summary>
|
||||
public bool TryDropAndThrowIds(Entity<IdCardConsoleComponent?, ItemSlotsComponent?> ent)
|
||||
{
|
||||
if (!Resolve(ent, ref ent.Comp1, ref ent.Comp2))
|
||||
return false;
|
||||
|
||||
var didEject = false;
|
||||
|
||||
foreach (var slot in ent.Comp2.Slots.Values)
|
||||
{
|
||||
if (slot.Item == null || slot.ContainerSlot == null)
|
||||
continue;
|
||||
|
||||
var item = slot.Item.Value;
|
||||
if (_container.Remove(item, slot.ContainerSlot))
|
||||
{
|
||||
_throwing.TryThrow(item, _random.NextVector2(), baseThrowSpeed: 5f);
|
||||
didEject = true;
|
||||
}
|
||||
}
|
||||
|
||||
return didEject;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,7 +214,14 @@ public sealed class SpawnSalvageMissionJob : Job<bool>
|
|||
if (!lootProto.Guaranteed)
|
||||
continue;
|
||||
|
||||
await SpawnDungeonLoot(lootProto, mapUid);
|
||||
try
|
||||
{
|
||||
await SpawnDungeonLoot(lootProto, mapUid);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_sawmill.Error($"Failed to spawn guaranteed loot {lootProto.ID}: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
// Handle boss loot (when relevant).
|
||||
|
|
@ -244,7 +251,14 @@ public sealed class SpawnSalvageMissionJob : Job<bool>
|
|||
if (entry == null)
|
||||
break;
|
||||
|
||||
await SpawnRandomEntry(grid, entry, dungeon, random);
|
||||
try
|
||||
{
|
||||
await SpawnRandomEntry(grid, entry, dungeon, random);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_sawmill.Error($"Failed to spawn mobs for {entry.Proto}: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
var allLoot = _prototypeManager.Index<SalvageLootPrototype>(SharedSalvageSystem.ExpeditionsLootProto);
|
||||
|
|
|
|||
37
Content.Shared/GPS/Systems/HandheldGpsSystem.cs
Normal file
37
Content.Shared/GPS/Systems/HandheldGpsSystem.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using Content.Shared.GPS.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Shared.GPS.Systems;
|
||||
|
||||
public sealed class HandheldGpsSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<HandheldGPSComponent, ExaminedEvent>(OnExamine);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles showing the coordinates when a GPS is examined.
|
||||
/// </summary>
|
||||
private void OnExamine(Entity<HandheldGPSComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
var posText = "Error";
|
||||
|
||||
var pos = _transform.GetMapCoordinates(ent);
|
||||
|
||||
if (pos.MapId != MapId.Nullspace)
|
||||
{
|
||||
var x = (int) pos.Position.X;
|
||||
var y = (int) pos.Position.Y;
|
||||
posText = $"({x}, {y})";
|
||||
}
|
||||
|
||||
args.PushMarkup(Loc.GetString("handheld-gps-coordinates-title", ("coordinates", posText)));
|
||||
}
|
||||
}
|
||||
|
|
@ -106,7 +106,9 @@ namespace Content.Shared.Interaction
|
|||
_uiQuery = GetEntityQuery<ActivatableUIComponent>();
|
||||
|
||||
SubscribeLocalEvent<BoundUserInterfaceCheckRangeEvent>(HandleUserInterfaceRangeCheck);
|
||||
SubscribeLocalEvent<ActivatableUIComponent, BoundUserInterfaceMessageAttempt>(OnBoundInterfaceInteractAttempt);
|
||||
|
||||
// TODO make this a broadcast event subscription again when engine has updated.
|
||||
SubscribeLocalEvent<UserInterfaceComponent, BoundUserInterfaceMessageAttempt>(OnBoundInterfaceInteractAttempt);
|
||||
|
||||
SubscribeAllEvent<InteractInventorySlotEvent>(HandleInteractInventorySlotEvent);
|
||||
|
||||
|
|
@ -151,12 +153,15 @@ namespace Content.Shared.Interaction
|
|||
/// <summary>
|
||||
/// Check that the user that is interacting with the BUI is capable of interacting and can access the entity.
|
||||
/// </summary>
|
||||
private void OnBoundInterfaceInteractAttempt(Entity<ActivatableUIComponent> ent, ref BoundUserInterfaceMessageAttempt ev)
|
||||
private void OnBoundInterfaceInteractAttempt(Entity<UserInterfaceComponent> ent, ref BoundUserInterfaceMessageAttempt ev)
|
||||
{
|
||||
_uiQuery.TryComp(ev.Target, out var aUiComp);
|
||||
if (!_actionBlockerSystem.CanInteract(ev.Actor, ev.Target))
|
||||
{
|
||||
// We permit ghosts to open uis unless explicitly blocked
|
||||
if (ev.Message is not OpenBoundInterfaceMessage || !HasComp<GhostComponent>(ev.Actor) || ent.Comp.BlockSpectators)
|
||||
if (ev.Message is not OpenBoundInterfaceMessage
|
||||
|| !HasComp<GhostComponent>(ev.Actor)
|
||||
|| aUiComp?.BlockSpectators == true)
|
||||
{
|
||||
ev.Cancel();
|
||||
return;
|
||||
|
|
@ -174,14 +179,16 @@ namespace Content.Shared.Interaction
|
|||
return;
|
||||
}
|
||||
|
||||
if (aUiComp == null)
|
||||
return;
|
||||
|
||||
if (ent.Comp.SingleUser && ent.Comp.CurrentSingleUser != null && ent.Comp.CurrentSingleUser != ev.Actor)
|
||||
if (aUiComp.SingleUser && aUiComp.CurrentSingleUser != null && aUiComp.CurrentSingleUser != ev.Actor)
|
||||
{
|
||||
ev.Cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
if (ent.Comp.RequiresComplex && !_actionBlockerSystem.CanComplexInteract(ev.Actor))
|
||||
if (aUiComp.RequiresComplex && !_actionBlockerSystem.CanComplexInteract(ev.Actor))
|
||||
ev.Cancel();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,44 +1,4 @@
|
|||
Entries:
|
||||
- author: VlaDOS1408
|
||||
changes:
|
||||
- message: Locale to shuttle-ftl-status-Invalid
|
||||
type: Add
|
||||
id: 7663
|
||||
time: '2024-11-30T02:54:37.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/33651
|
||||
- author: jbox144
|
||||
changes:
|
||||
- message: Fixed the link on Marathon's TEG exterior airlock
|
||||
type: Fix
|
||||
- message: Fixed Cog's exterior atmospherics airlock
|
||||
type: Fix
|
||||
id: 7664
|
||||
time: '2024-11-30T06:23:50.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/33621
|
||||
- author: Plykiya
|
||||
changes:
|
||||
- message: You can no longer cuff someone multiple times if multiple cuff do-afters
|
||||
are completed at the exact same time.
|
||||
type: Fix
|
||||
id: 7665
|
||||
time: '2024-11-30T15:58:56.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/33646
|
||||
- author: Plykiya
|
||||
changes:
|
||||
- message: You can now inspect the entity in your hand instead of the entity that
|
||||
happened to be underneath your hand.
|
||||
type: Fix
|
||||
id: 7666
|
||||
time: '2024-11-30T16:14:39.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/33642
|
||||
- author: Plykiya
|
||||
changes:
|
||||
- message: You can now inspect entities in the stripping window instead of the entity
|
||||
that happened to be underneath the window.
|
||||
type: Fix
|
||||
id: 7667
|
||||
time: '2024-11-30T16:23:27.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/33644
|
||||
- author: Winkarst-cpu
|
||||
changes:
|
||||
- message: Now borgs get names on roundstart.
|
||||
|
|
@ -3898,3 +3858,44 @@
|
|||
id: 8162
|
||||
time: '2025-04-13T14:24:11.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/36503
|
||||
- author: ScarKy0
|
||||
changes:
|
||||
- message: Oxygen, Carbon Dioxide, Nitrous Oxide and Frezon can now metabolize when
|
||||
digested/injected.
|
||||
type: Tweak
|
||||
id: 8163
|
||||
time: '2025-04-13T15:21:55.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/31648
|
||||
- author: ArchRBX
|
||||
changes:
|
||||
- message: Handheld GPS's can now be examined to read their displays
|
||||
type: Add
|
||||
- message: Handheld GPS's now update their displays much more frequently
|
||||
type: Tweak
|
||||
id: 8164
|
||||
time: '2025-04-13T15:29:13.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/31814
|
||||
- author: Beck Thompson, Kaz Wooblie
|
||||
changes:
|
||||
- message: Computers now wont delete items inside of them when deconstructing.
|
||||
type: Fix
|
||||
- message: The ID card computer now throws the IDs out when deconstructed or damaged!
|
||||
type: Add
|
||||
id: 8165
|
||||
time: '2025-04-13T15:51:35.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/32308
|
||||
- author: ElectroJr
|
||||
changes:
|
||||
- message: Fixed a bug that allowed dead or incapacitated people to potentially
|
||||
interact with some UIs.
|
||||
type: Fix
|
||||
id: 8166
|
||||
time: '2025-04-13T16:09:56.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/36480
|
||||
- author: K-Dynamic
|
||||
changes:
|
||||
- message: Stinger grenades no longer flash on detonation.
|
||||
type: Tweak
|
||||
id: 8167
|
||||
time: '2025-04-13T17:23:35.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/36394
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ appeal = "https://appeal.ss14.io"
|
|||
rules_file = "StandardRuleset"
|
||||
|
||||
[movement]
|
||||
mob_pushing = true
|
||||
mob_pushing = false
|
||||
|
||||
[net]
|
||||
max_connections = 1024
|
||||
|
|
|
|||
|
|
@ -10,3 +10,4 @@ id-card-console-window-job-selection-label = Job presets (sets department and jo
|
|||
access-id-card-console-component-no-hands-error = You have no hands.
|
||||
id-card-console-privileged-id = Privileged ID
|
||||
id-card-console-target-id = Target ID
|
||||
id-card-console-damaged = Structural integrity compromised, ejecting contents.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
character-info-title = Character
|
||||
character-info-roles-antagonist-text = Antagonist Roles
|
||||
character-info-roles-antagonist-text = You have no special Roles
|
||||
character-info-objectives-label = Objectives
|
||||
character-info-no-profession = No Profession
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@
|
|||
- type: ProjectileGrenade
|
||||
fillPrototype: PelletClusterRubber
|
||||
capacity: 30
|
||||
- type: FlashOnTrigger
|
||||
range: 7
|
||||
- type: EmitSoundOnTrigger
|
||||
sound:
|
||||
path: "/Audio/Effects/flash_bang.ogg"
|
||||
|
|
|
|||
|
|
@ -599,6 +599,9 @@
|
|||
type: WiresBoundUserInterface
|
||||
- type: CrewManifestViewer
|
||||
ownerKey: enum.IdCardConsoleUiKey.Key
|
||||
- type: Speech
|
||||
speechVerb: Robotic
|
||||
speechSounds: Pai
|
||||
- type: Sprite
|
||||
layers:
|
||||
- map: ["computerLayerBody"]
|
||||
|
|
|
|||
|
|
@ -8,6 +8,52 @@
|
|||
boilingPoint: -183.0
|
||||
meltingPoint: -218.4
|
||||
metabolisms:
|
||||
Poison:
|
||||
effects:
|
||||
- !type:Oxygenate
|
||||
conditions:
|
||||
- !type:OrganType
|
||||
type: Human
|
||||
- !type:Oxygenate
|
||||
conditions:
|
||||
- !type:OrganType
|
||||
type: Animal
|
||||
- !type:Oxygenate
|
||||
conditions:
|
||||
- !type:OrganType
|
||||
type: Rat
|
||||
- !type:Oxygenate
|
||||
conditions:
|
||||
- !type:OrganType
|
||||
type: Plant
|
||||
# Convert Oxygen into CO2.
|
||||
- !type:ModifyLungGas
|
||||
conditions:
|
||||
- !type:OrganType
|
||||
type: Vox
|
||||
shouldHave: false
|
||||
ratios:
|
||||
CarbonDioxide: 1.0
|
||||
Oxygen: -1.0
|
||||
- !type:HealthChange
|
||||
conditions:
|
||||
- !type:OrganType
|
||||
type: Vox
|
||||
scaleByQuantity: true
|
||||
ignoreResistances: true
|
||||
damage:
|
||||
types:
|
||||
Poison:
|
||||
3
|
||||
- !type:AdjustAlert
|
||||
alertType: Toxins
|
||||
conditions:
|
||||
- !type:ReagentThreshold
|
||||
min: 0.5
|
||||
- !type:OrganType
|
||||
type: Vox
|
||||
clear: true
|
||||
time: 5
|
||||
Gas:
|
||||
effects:
|
||||
- !type:Oxygenate
|
||||
|
|
@ -150,6 +196,32 @@
|
|||
flavor: bitter
|
||||
color: "#66ff33"
|
||||
metabolisms:
|
||||
Poison:
|
||||
effects:
|
||||
- !type:Oxygenate
|
||||
conditions:
|
||||
- !type:OrganType
|
||||
type: Plant
|
||||
- !type:HealthChange
|
||||
conditions:
|
||||
- !type:OrganType
|
||||
type: Plant
|
||||
shouldHave: false
|
||||
- !type:OrganType
|
||||
type: Vox
|
||||
shouldHave: false
|
||||
scaleByQuantity: true
|
||||
ignoreResistances: true
|
||||
damage:
|
||||
types:
|
||||
Poison:
|
||||
0.8
|
||||
- !type:Oxygenate
|
||||
conditions:
|
||||
- !type:OrganType
|
||||
type: Plant
|
||||
shouldHave: false
|
||||
factor: -4
|
||||
Gas:
|
||||
effects:
|
||||
- !type:Oxygenate
|
||||
|
|
@ -236,6 +308,12 @@
|
|||
boilingPoint: -88
|
||||
meltingPoint: -90
|
||||
metabolisms:
|
||||
Poison:
|
||||
effects:
|
||||
- !type:HealthChange
|
||||
damage:
|
||||
types:
|
||||
Poison: 2
|
||||
Gas:
|
||||
effects:
|
||||
- !type:Emote
|
||||
|
|
@ -317,6 +395,39 @@
|
|||
boilingPoint: -195.8
|
||||
meltingPoint: -210.0
|
||||
metabolisms:
|
||||
Narcotic:
|
||||
effects:
|
||||
- !type:HealthChange
|
||||
scaleByQuantity: true
|
||||
ignoreResistances: true
|
||||
damage:
|
||||
types:
|
||||
Cellular: 1
|
||||
- !type:GenericStatusEffect
|
||||
key: SeeingRainbows
|
||||
component: SeeingRainbows
|
||||
type: Add
|
||||
time: 100
|
||||
refresh: false
|
||||
- !type:Drunk
|
||||
boozePower: 100
|
||||
- !type:PopupMessage
|
||||
type: Local
|
||||
messages: [ "frezon-lungs-cold" ]
|
||||
probability: 0.1
|
||||
conditions:
|
||||
- !type:ReagentThreshold
|
||||
reagent: Frezon
|
||||
min: 0.5
|
||||
- !type:PopupMessage
|
||||
type: Local
|
||||
visualType: Medium
|
||||
messages: [ "frezon-euphoric" ]
|
||||
probability: 0.1
|
||||
conditions:
|
||||
- !type:ReagentThreshold
|
||||
reagent: Frezon
|
||||
min: 1
|
||||
Gas:
|
||||
effects:
|
||||
- !type:HealthChange
|
||||
|
|
|
|||
|
|
@ -123,6 +123,9 @@
|
|||
entity: !type:BoardNodeEntity { container: board }
|
||||
edges:
|
||||
- to: monitorUnsecured
|
||||
completed:
|
||||
- !type:RaiseEvent
|
||||
event: !type:MachineDeconstructedEvent
|
||||
steps:
|
||||
- tool: Prying
|
||||
doAfter: 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue