Merge remote-tracking branch 'refs/remotes/wizards/master'
This commit is contained in:
commit
e143d83463
14 changed files with 1705 additions and 1687 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Client.Clothing.Systems;
|
||||
using Content.Client.Stylesheets;
|
||||
|
|
@ -74,13 +74,9 @@ public sealed partial class ChameleonMenu : DefaultWindow
|
|||
};
|
||||
button.OnPressed += _ => OnIdSelected?.Invoke(id);
|
||||
Grid.AddChild(button);
|
||||
|
||||
var texture = _sprite.GetPrototypeIcon(proto);
|
||||
button.AddChild(new TextureRect
|
||||
{
|
||||
Stretch = TextureRect.StretchMode.KeepAspectCentered,
|
||||
Texture = texture.Default
|
||||
});
|
||||
var entityPrototypeView = new EntityPrototypeView();
|
||||
entityPrototypeView.SetPrototype(proto);
|
||||
button.AddChild(entityPrototypeView);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ namespace Content.Server.Atmos.Piping.Other.Components
|
|||
[DataField("spawnTemperature")]
|
||||
public float SpawnTemperature { get; set; } = Atmospherics.T20C;
|
||||
|
||||
/// <summary>
|
||||
/// Number of moles created per second when the miner is working.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("spawnAmount")]
|
||||
public float SpawnAmount { get; set; } = Atmospherics.MolesCellStandard * 20f;
|
||||
|
|
|
|||
|
|
@ -24,18 +24,22 @@ namespace Content.Server.Atmos.Piping.Other.EntitySystems
|
|||
private void OnMinerUpdated(Entity<GasMinerComponent> ent, ref AtmosDeviceUpdateEvent args)
|
||||
{
|
||||
var miner = ent.Comp;
|
||||
if (!CheckMinerOperation(ent, out var environment) || !miner.Enabled || !miner.SpawnGas.HasValue || miner.SpawnAmount <= 0f)
|
||||
|
||||
// SpawnAmount is declared in mol/s so to get the amount of gas we hope to mine, we have to multiply this by
|
||||
// how long we have been waiting to spawn it.
|
||||
var toSpawn = miner.SpawnAmount * args.dt;
|
||||
if (!CheckMinerOperation(ent, toSpawn, out var environment) || !miner.Enabled || !miner.SpawnGas.HasValue || toSpawn <= 0f)
|
||||
return;
|
||||
|
||||
// Time to mine some gas.
|
||||
|
||||
var merger = new GasMixture(1) { Temperature = miner.SpawnTemperature };
|
||||
merger.SetMoles(miner.SpawnGas.Value, miner.SpawnAmount);
|
||||
merger.SetMoles(miner.SpawnGas.Value, toSpawn);
|
||||
|
||||
_atmosphereSystem.Merge(environment, merger);
|
||||
}
|
||||
|
||||
private bool CheckMinerOperation(Entity<GasMinerComponent> ent, [NotNullWhen(true)] out GasMixture? environment)
|
||||
private bool CheckMinerOperation(Entity<GasMinerComponent> ent, float toSpawn, [NotNullWhen(true)] out GasMixture? environment)
|
||||
{
|
||||
var (uid, miner) = ent;
|
||||
var transform = Transform(uid);
|
||||
|
|
@ -59,7 +63,7 @@ namespace Content.Server.Atmos.Piping.Other.EntitySystems
|
|||
|
||||
// External pressure above threshold.
|
||||
if (!float.IsInfinity(miner.MaxExternalPressure) &&
|
||||
environment.Pressure > miner.MaxExternalPressure - miner.SpawnAmount * miner.SpawnTemperature * Atmospherics.R / environment.Volume)
|
||||
environment.Pressure > miner.MaxExternalPressure - toSpawn * miner.SpawnTemperature * Atmospherics.R / environment.Volume)
|
||||
{
|
||||
miner.Broken = true;
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
using Content.Shared.Whitelist;
|
||||
|
||||
namespace Content.Shared.Armor;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -6,5 +8,12 @@ namespace Content.Shared.Armor;
|
|||
[RegisterComponent]
|
||||
public sealed partial class AllowSuitStorageComponent : Component
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Whitelist for what entities are allowed in the suit storage slot.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public EntityWhitelist Whitelist = new()
|
||||
{
|
||||
Components = new[] {"Item"}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -248,9 +248,17 @@ public abstract partial class InventorySystem
|
|||
return false;
|
||||
|
||||
if (slotDefinition.DependsOnComponents is { } componentRegistry)
|
||||
{
|
||||
foreach (var (_, entry) in componentRegistry)
|
||||
{
|
||||
if (!HasComp(slotEntity, entry.Component.GetType()))
|
||||
return false;
|
||||
|
||||
if (TryComp<AllowSuitStorageComponent>(slotEntity, out var comp) &&
|
||||
_whitelistSystem.IsWhitelistFailOrNull(comp.Whitelist, itemUid))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var fittingInPocket = slotDefinition.SlotFlags.HasFlag(SlotFlags.POCKET) &&
|
||||
|
|
|
|||
|
|
@ -1,28 +1,4 @@
|
|||
Entries:
|
||||
- author: Flareguy
|
||||
changes:
|
||||
- message: Added emergency nitrogen lockers. You can scarcely find them in public
|
||||
areas, or scattered around in maintenance tunnels.
|
||||
type: Add
|
||||
id: 6330
|
||||
time: '2024-04-10T21:20:05.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/26752
|
||||
- author: Jark255
|
||||
changes:
|
||||
- message: Door electronics now require network configurators to change their access
|
||||
settings, rather than doing so by hand.
|
||||
type: Fix
|
||||
id: 6331
|
||||
time: '2024-04-11T12:21:15.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/26888
|
||||
- author: lunarcomets
|
||||
changes:
|
||||
- message: Cryogenic sleep units now remove crew members from the manifest, and
|
||||
announce when crew members go into cryogenic storage.
|
||||
type: Tweak
|
||||
id: 6332
|
||||
time: '2024-04-11T20:48:46.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/26813
|
||||
- author: Vermidia
|
||||
changes:
|
||||
- message: Salt and Pepper shakers look like shakers.
|
||||
|
|
@ -3832,3 +3808,24 @@
|
|||
id: 6829
|
||||
time: '2024-06-28T03:34:24.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/29487
|
||||
- author: slarticodefast
|
||||
changes:
|
||||
- message: Passive vents now have the correct sprite.
|
||||
type: Fix
|
||||
id: 6830
|
||||
time: '2024-06-28T12:33:03.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/29536
|
||||
- author: Plykiya
|
||||
changes:
|
||||
- message: Icons in the chameleon menu now appear correctly.
|
||||
type: Fix
|
||||
id: 6831
|
||||
time: '2024-06-28T21:21:36.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/29539
|
||||
- author: DogZeroX
|
||||
changes:
|
||||
- message: Bananium no longer emit rads
|
||||
type: Remove
|
||||
id: 6832
|
||||
time: '2024-06-28T23:28:27.0000000+00:00'
|
||||
url: https://github.com/space-wizards/space-station-14/pull/29545
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -493,8 +493,6 @@
|
|||
layerStates:
|
||||
- bananium
|
||||
- bananium_1
|
||||
- type: RadiationSource
|
||||
intensity: 0.1
|
||||
- type: FlavorProfile
|
||||
flavors:
|
||||
- banana
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
- type: AtmosDevice
|
||||
- type: GasMiner
|
||||
maxExternalPressure: 300
|
||||
spawnAmount: 200
|
||||
spawnAmount: 400
|
||||
|
||||
- type: entity
|
||||
name: O2 gas miner
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@
|
|||
placement:
|
||||
mode: SnapgridCenter
|
||||
components:
|
||||
# TODO ATMOS: Find sprite for this.
|
||||
- type: Sprite
|
||||
drawdepth: FloorObjects
|
||||
sprite: Structures/Piping/Atmospherics/vent.rsi
|
||||
|
|
@ -84,7 +83,7 @@
|
|||
- sprite: Structures/Piping/Atmospherics/pipe.rsi
|
||||
state: pipeHalf
|
||||
map: [ "enum.PipeVisualLayers.Pipe" ]
|
||||
- state: vent_off
|
||||
- state: vent_passive
|
||||
map: [ "enum.SubfloorLayers.FirstLayer" ]
|
||||
- type: Appearance
|
||||
- type: PipeColorVisuals
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@
|
|||
- type: entity
|
||||
parent: BaseAPC
|
||||
id: APCBasic
|
||||
suffix: Basic, 50kW
|
||||
suffix: Basic, 50kJ
|
||||
components:
|
||||
- type: Battery
|
||||
maxCharge: 50000
|
||||
|
|
@ -213,7 +213,7 @@
|
|||
- type: entity
|
||||
parent: BaseAPC
|
||||
id: APCHighCapacity
|
||||
suffix: High Capacity, 100kW
|
||||
suffix: High Capacity, 100kJ
|
||||
components:
|
||||
- type: Battery
|
||||
maxCharge: 100000
|
||||
|
|
@ -222,7 +222,7 @@
|
|||
- type: entity
|
||||
parent: BaseAPC
|
||||
id: APCSuperCapacity
|
||||
suffix: Super Capacity, 150kW
|
||||
suffix: Super Capacity, 150kJ
|
||||
components:
|
||||
- type: Battery
|
||||
maxCharge: 150000
|
||||
|
|
@ -231,7 +231,7 @@
|
|||
- type: entity
|
||||
parent: BaseAPC
|
||||
id: APCHyperCapacity
|
||||
suffix: Hyper Capacity, 200kW
|
||||
suffix: Hyper Capacity, 200kJ
|
||||
components:
|
||||
- type: Battery
|
||||
maxCharge: 200000
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
- type: entity
|
||||
parent: BaseSMES
|
||||
id: SMESBasic
|
||||
suffix: Basic, 8MW
|
||||
suffix: Basic, 8MJ
|
||||
components:
|
||||
- type: Battery
|
||||
maxCharge: 8000000
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@
|
|||
"license":"CC-BY-SA-3.0",
|
||||
"copyright":"Taken from https://github.com/BeeStation/BeeStation-Hornet at commit 4ccd79de285e79e504308bcd6fa5908d6b7685f7",
|
||||
"states":[
|
||||
{
|
||||
"name":"vent_passive",
|
||||
"directions" : 4
|
||||
},
|
||||
{
|
||||
"name":"vent_off",
|
||||
"directions" : 4
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Loading…
Add table
Reference in a new issue