mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-06-09 10:06:43 +02:00
Merge branch 'master' into second-hand-traitor-test
This commit is contained in:
@@ -83,7 +83,7 @@ public sealed class GasCanisterSystem : SharedGasCanisterSystem
|
||||
|
||||
private void ToggleSafetyValve(Entity<GasCanisterComponent> entity, bool open)
|
||||
{
|
||||
entity.Comp.SafetyValveOpen = true;
|
||||
entity.Comp.SafetyValveOpen = open;
|
||||
Audio.PlayPvs(entity.Comp.ValveSound, entity);
|
||||
}
|
||||
|
||||
@@ -117,7 +117,8 @@ public sealed class GasCanisterSystem : SharedGasCanisterSystem
|
||||
? _atmos.GetContainingMixture(entity.Owner, args.Grid, args.Map, false, true)
|
||||
: CompOrNull<GasTankComponent>(entity.Comp.GasTankSlot.Item.Value)?.Air;
|
||||
|
||||
_atmos.FlowGas(entity.Comp.Air, output, entity.Comp.ReleasePressure, args.dt,ReleaseArea);
|
||||
// Only let gas flow one way!
|
||||
_atmos.ReleaseGasTo(entity.Comp.Air, output, entity.Comp.ReleasePressure);
|
||||
}
|
||||
|
||||
// If last pressure is very close to the current pressure, do nothing.
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Administration;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Toolshed;
|
||||
|
||||
namespace Content.Server.Containers;
|
||||
|
||||
[ToolshedCommand, AdminCommand(AdminFlags.Debug)]
|
||||
public sealed class ContainerCommand : ToolshedCommand
|
||||
{
|
||||
private SharedContainerSystem? _container;
|
||||
|
||||
[CommandImplementation("contents")]
|
||||
public IEnumerable<EntityUid> ContainerQuery([PipedArgument] IEnumerable<EntityUid> storageEnts, string id) =>
|
||||
storageEnts.SelectMany(x => ContainerQueryBase(x, id));
|
||||
|
||||
|
||||
public IEnumerable<EntityUid> ContainerQueryBase(EntityUid ent, string id)
|
||||
{
|
||||
_container ??= GetSys<SharedContainerSystem>();
|
||||
|
||||
if (!_container.TryGetContainer(ent, id, out var container))
|
||||
return [];
|
||||
|
||||
return container.ContainedEntities;
|
||||
}
|
||||
|
||||
[CommandImplementation("get")]
|
||||
public IEnumerable<BaseContainer> ContainerGet([PipedArgument] IEnumerable<EntityUid> storageEnts, string id) =>
|
||||
storageEnts.Select(x => ContainerGetBase(x, id)).Where(s => s != null).Select(s => s!);
|
||||
|
||||
[CommandImplementation("id")]
|
||||
public IEnumerable<string> ContainerId([PipedArgument] IEnumerable<BaseContainer> containers) =>
|
||||
containers.Select(x => x.ID);
|
||||
|
||||
|
||||
public BaseContainer? ContainerGetBase(EntityUid ent, string id)
|
||||
{
|
||||
_container ??= GetSys<SharedContainerSystem>();
|
||||
|
||||
if (!_container.TryGetContainer(ent, id, out var container))
|
||||
return null;
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
[CommandImplementation("insertmultiple")]
|
||||
public BaseContainer ContainerInsert([PipedArgument] BaseContainer container, bool doForce, IEnumerable<EntityUid> ents)
|
||||
{
|
||||
_container ??= GetSys<SharedContainerSystem>();
|
||||
|
||||
foreach (var ent in ents)
|
||||
{
|
||||
if (doForce)
|
||||
{
|
||||
_container.Insert(ent, container, null, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_container.InsertOrDrop(ent, container);
|
||||
}
|
||||
}
|
||||
return container;
|
||||
}
|
||||
|
||||
[CommandImplementation("insert")]
|
||||
public BaseContainer ContainerInsert([PipedArgument] BaseContainer container, bool doForce, EntityUid ent)
|
||||
{
|
||||
return ContainerInsert(container, doForce, [ent]);
|
||||
}
|
||||
|
||||
[CommandImplementation("list")]
|
||||
public IEnumerable<string> ContainerList([PipedArgument] EntityUid ent)
|
||||
{
|
||||
_container ??= GetSys<SharedContainerSystem>();
|
||||
|
||||
return _container.GetAllContainers(ent).Select(container => container.ID);
|
||||
}
|
||||
[CommandImplementation("getall")]
|
||||
public IEnumerable<BaseContainer> ContainerGetAll([PipedArgument] EntityUid ent)
|
||||
{
|
||||
_container ??= GetSys<SharedContainerSystem>();
|
||||
|
||||
return _container.GetAllContainers(ent);
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ public sealed class InventoryCommand : ToolshedCommand
|
||||
{
|
||||
private InventorySystem? _inventorySystem;
|
||||
|
||||
[CommandImplementation("query")]
|
||||
[CommandImplementation("contents")]
|
||||
public IEnumerable<EntityUid> InventoryQuery([PipedArgument] IEnumerable<EntityUid> entities) =>
|
||||
entities.SelectMany(InventoryQuery);
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public sealed class StorageCommand : ToolshedCommand
|
||||
return null;
|
||||
}
|
||||
|
||||
[CommandImplementation("query")]
|
||||
[CommandImplementation("contents")]
|
||||
public IEnumerable<EntityUid> StorageQuery([PipedArgument] IEnumerable<EntityUid> storageEnts, bool recursive) =>
|
||||
storageEnts.SelectMany(x => StorageQueryRecursiveBase(x, recursive));
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@ public sealed partial class GasCanisterComponent : GasMaxPressureHolderComponent
|
||||
[DataField]
|
||||
public ItemSlot GasTankSlot = new();
|
||||
|
||||
/// <summary>
|
||||
/// The safety release valve on this gas canister. Automatically opens
|
||||
/// when <see cref="GasMaxPressureHolderComponent.SafetyPressure"/> is reached.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public bool SafetyValveOpen;
|
||||
|
||||
|
||||
@@ -154,8 +154,8 @@ public sealed partial class CCVars
|
||||
CVarDef.Create("atmos.heat_scale", 8f, CVar.REPLICATED | CVar.SERVER);
|
||||
|
||||
/// <summary>
|
||||
/// Maximum explosion radius for explosions caused by bursting a gas tank ("max caps").
|
||||
/// Setting this to zero disables the explosion but still allows the tank to burst and leak.
|
||||
/// Maximum explosion intensity for explosions caused by bursting a gas tank ("max caps").
|
||||
/// Setting this to zero disables the limits.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<float> AtmosTankFragment =
|
||||
CVarDef.Create("atmos.max_explosion_range", 0f, CVar.SERVER);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Ghost;
|
||||
|
||||
namespace Content.Shared.Warps;
|
||||
@@ -16,7 +16,7 @@ public sealed class WarpPointSystem : EntitySystem
|
||||
if (!HasComp<GhostComponent>(args.Examiner))
|
||||
return;
|
||||
|
||||
var loc = component.Location == null ? "<null>" : $"'{component.Location}'";
|
||||
var loc = component.Location == null ? Name(uid) : component.Location;
|
||||
args.PushText(Loc.GetString("warp-point-component-on-examine-success", ("location", loc)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1707,5 +1707,14 @@ Entries:
|
||||
id: 208
|
||||
time: '2026-04-09T05:05:01.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/43346
|
||||
- author: UpAndLeaves
|
||||
changes:
|
||||
- message: Added container toolshed commands!
|
||||
type: Add
|
||||
- message: storage:query and inventory:query are now storage:contents and inventory:contents.
|
||||
type: Tweak
|
||||
id: 209
|
||||
time: '2026-04-19T17:47:31.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/43098
|
||||
Name: Admin
|
||||
Order: 3
|
||||
|
||||
@@ -52,7 +52,7 @@ alert.min_players_sharing_connection = 2
|
||||
allow_multi_server_play = false
|
||||
|
||||
[atmos]
|
||||
max_explosion_range = 10
|
||||
max_explosion_range = 0
|
||||
|
||||
[status]
|
||||
privacy_policy_link = "https://spacestation14.com/about/privacy/#game-server-privacy-policy"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
command-description-container-contents =
|
||||
Gets all entities inside a container on an entity via the container's ID.
|
||||
command-description-container-get =
|
||||
Gets a container on an entity via the container's ID.
|
||||
command-description-container-insert =
|
||||
Puts an entity inside the piped container.
|
||||
command-description-container-insertmultiple =
|
||||
Put multiple entities inside the piped container.
|
||||
command-description-container-list =
|
||||
Gets the IDs of all containers in an entity.
|
||||
command-description-container-getall =
|
||||
Gets all containers in an entity.
|
||||
command-description-container-id =
|
||||
Gets the string id of the piped in containers.
|
||||
@@ -18,5 +18,5 @@ command-description-inventory-ensure =
|
||||
Puts a given entity on the first piped entity that has a slot matching the given flag if none exists, passing through the UID of whatever is in the slot by the end.
|
||||
command-description-inventory-ensurespawn =
|
||||
Spawns a given prototype on the first piped entity that has a slot matching the given flag if none exists, passing through the UID of whatever is in the slot by the end.
|
||||
command-description-inventory-query =
|
||||
command-description-inventory-contents =
|
||||
Gets the entities in the inventory slots of the piped entities and passes them along.
|
||||
|
||||
@@ -2,5 +2,5 @@ command-description-storage-fasttake =
|
||||
Takes the most recently placed item from the piped storage entity.
|
||||
command-description-storage-insert =
|
||||
Inserts the piped entity into the given storage entity.
|
||||
command-description-storage-query =
|
||||
command-description-storage-contents =
|
||||
Gets the entities in the storagebase of the piped entities and passes them along.
|
||||
|
||||
@@ -1 +1 @@
|
||||
warp-point-component-on-examine-success = This one's location ID is {$location}
|
||||
warp-point-component-on-examine-success = This one's location ID is '{$location}'
|
||||
|
||||
@@ -127,8 +127,8 @@
|
||||
maxIntegrity: 25 # 5 times stronger than a gas tank
|
||||
integrity: 25
|
||||
maxReleasePressure: 1013.25
|
||||
safetyPressure: 5066.25
|
||||
overpressure: 15198.75 # Purposefully high because cans react really fucking fast, may need to redo this value if reactions change!
|
||||
safetyPressure: 7599.375 # High enough that liquid tanks don't burst immediately
|
||||
overpressure: 20265 # Purposefully high because cans react really fucking fast, may need to redo this value if reactions change!
|
||||
gasTankSlot:
|
||||
name: comp-gas-canister-slot-name-gas-tank
|
||||
ejectOnBreak: true
|
||||
|
||||
Reference in New Issue
Block a user