Skip to content

Commit

Permalink
Merge branch 'new-frontiers-14:master' into 2024-01-13-VendPrice-Refa…
Browse files Browse the repository at this point in the history
…ctor
  • Loading branch information
dvir001 authored Feb 7, 2024
2 parents a619edf + bc02774 commit d4efd0a
Show file tree
Hide file tree
Showing 369 changed files with 30,693 additions and 25,585 deletions.
24 changes: 0 additions & 24 deletions .github/mapchecker/whitelist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,15 @@ Lodge:

# TECHNICAL DEBT BELOW. These ones were added to this list to ensure other PR's would not break upon merging. It is
# the intention for this list to become empty in separate PR's.
Esquire:
- ToyFigurineSecurity
- AirlockSecurity
- SignSec
Bison:
- WallPlastitanium
- WallPlastitaniumDiagonal
Sprinter:
- WallPlastitanium
- IntercomSecurity
- IntercomCommand
Courser:
- HighSecDoor
Metastable:
- SignSec
DartX:
- HighSecDoor
Praeda:
- ClothingEyesGlassesSecurity
- EncryptionKeyCommand
- EncryptionKeyEngineering
Pheonix:
- DebugSubstation
- WallPlastitanium
Expand All @@ -49,11 +37,6 @@ Anchor:
DecadeDove:
- EncryptionKeyCargo
- EncryptionKeyEngineering
RosebudMKI:
- EncryptionKeyCargo
- EncryptionKeyEngineering
- EncryptionKeyScience
- EncryptionKeyService
Dragonfly:
- EncryptionKeyCargo
- EncryptionKeyEngineering
Expand All @@ -64,14 +47,7 @@ RosebudMKII:
- EncryptionKeyEngineering
- EncryptionKeyScience
- EncryptionKeyService
Crescent:
- EncryptionKeyScience
- IntercomCommand
Pathfinder:
- IntercomCommand
Schooner:
- IntercomCommand
Marauder:
- IntercomCommand
Empress:
- IntercomAll
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private void FixGridAtmosCommand(IConsoleShell shell, string argstr, string[] ar
return;
}

var mixtures = new GasMixture[10]; // Add one per added array
var mixtures = new GasMixture[11]; // Add one per added array
for (var i = 0; i < mixtures.Length; i++)
mixtures[i] = new GasMixture(Atmospherics.CellVolume) { Temperature = Atmospherics.T20C };

Expand Down Expand Up @@ -76,6 +76,13 @@ private void FixGridAtmosCommand(IConsoleShell shell, string argstr, string[] ar
mixtures[9].Clear();
mixtures[9].AdjustMoles(Gas.Plasma, Atmospherics.MolesCellShuttle);

// Frontier - 10: Sauna (GM)
mixtures[10].Clear();
mixtures[10].AdjustMoles(Gas.Oxygen, Atmospherics.OxygenMolesStandard);
mixtures[10].AdjustMoles(Gas.Nitrogen, Atmospherics.NitrogenMolesStandard);
mixtures[10].AdjustMoles(Gas.WaterVapor, Atmospherics.NitrogenMolesStandard);
mixtures[10].Temperature = 340f; // Sauna

foreach (var arg in args)
{
if (!NetEntity.TryParse(arg, out var netEntity) || !TryGetEntity(netEntity, out var euid))
Expand Down
5 changes: 5 additions & 0 deletions Content.Server/Guardian/GuardianComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,10 @@ public sealed partial class GuardianComponent : Component
/// </summary>
public bool GuardianLoose = false;

/// <summary>
/// If the guardian can be AI based
/// </summary>
[DataField("ai")]
public bool Ai;
}
}
11 changes: 11 additions & 0 deletions Content.Server/Guardian/GuardianSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ private void CheckGuardianMove(
RetractGuardian(hostUid, hostComponent, guardianUid, guardianComponent);
}

private bool CanRelease(EntityUid guardian)
{
return HasComp<ActorComponent>(guardian);
}

private void ReleaseGuardian(EntityUid host, GuardianHostComponent hostComponent, EntityUid guardian, GuardianComponent guardianComponent)
{
if (guardianComponent.GuardianLoose)
Expand All @@ -309,6 +314,12 @@ private void ReleaseGuardian(EntityUid host, GuardianHostComponent hostComponent
return;
}

if (!guardianComponent.Ai && !CanRelease(guardian))
{
_popupSystem.PopupEntity(Loc.GetString("guardian-no-soul"), host, host);
return;
}

DebugTools.Assert(hostComponent.GuardianContainer.Contains(guardian));
hostComponent.GuardianContainer.Remove(guardian);
DebugTools.Assert(!hostComponent.GuardianContainer.Contains(guardian));
Expand Down
10 changes: 9 additions & 1 deletion Content.Server/Power/Generator/PortableGeneratorSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Server.DoAfter;
using Content.Server.DoAfter;
using Content.Server.Popups;
using Content.Shared.DoAfter;
using Content.Shared.Power.Generator;
Expand Down Expand Up @@ -38,6 +38,14 @@ public override void Initialize()
SubscribeLocalEvent<PortableGeneratorComponent, PortableGeneratorSwitchOutputMessage>(GeneratorSwitchOutputMessage);

SubscribeLocalEvent<FuelGeneratorComponent, SwitchPowerCheckEvent>(OnSwitchPowerCheck);

SubscribeLocalEvent<PortableGeneratorComponent, MapInitEvent>(GeneratorMapInit); // Frontier
}

private void GeneratorMapInit(EntityUid uid, PortableGeneratorComponent component, MapInitEvent args) // Frontier - Init on map generator
{
if (component.StartOnMapInit)
_generator.SetFuelGeneratorOn(uid, true);
}

private void GeneratorSwitchOutputMessage(EntityUid uid, PortableGeneratorComponent component, PortableGeneratorSwitchOutputMessage args)
Expand Down
26 changes: 18 additions & 8 deletions Content.Server/Puppet/VentriloquistPuppetSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
using Content.Server.Speech.Muting;
using Content.Shared.CombatMode;
using Content.Shared.Hands;
using Robust.Shared.Random;

namespace Content.Server.Puppet
{
public sealed class VentriloquistPuppetSystem : SharedVentriloquistPuppetSystem
{
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly IRobustRandom _random = default!;

public override void Initialize()
{
Expand All @@ -36,22 +38,27 @@ private void OnUseInHand(EntityUid uid, VentriloquistPuppetComponent component,

if (!RemComp<MutedComponent>(uid))
{
_popupSystem.PopupEntity(Loc.GetString("ventriloquist-puppet-remove-hand"), uid, args.User);
_popupSystem.PopupEntity(Loc.GetString(_random.Pick(component.RemoveHand)), uid, args.User); // Frontier
//_popupSystem.PopupEntity(Loc.GetString("ventriloquist-puppet-remove-hand"), uid, args.User);
MuteDummy(uid, component);
return;
}

// TODO why does this need a combat component???
EnsureComp<CombatModeComponent>(uid);
_popupSystem.PopupEntity(Loc.GetString("ventriloquist-puppet-insert-hand"), uid, args.User);
_popupSystem.PopupEntity(Loc.GetString("ventriloquist-puppet-inserted-hand"), uid, uid);
_popupSystem.PopupEntity(Loc.GetString(_random.Pick(component.InsertHand)), uid, args.User); // Frontier
_popupSystem.PopupEntity(Loc.GetString(_random.Pick(component.InsertedHand)), uid, uid); // Frontier
// _popupSystem.PopupEntity(Loc.GetString("ventriloquist-puppet-insert-hand"), uid, args.User);
// _popupSystem.PopupEntity(Loc.GetString("ventriloquist-puppet-inserted-hand"), uid, uid);

if (!HasComp<GhostTakeoverAvailableComponent>(uid))
{
AddComp<GhostTakeoverAvailableComponent>(uid);
var ghostRole = EnsureComp<GhostRoleComponent>(uid);
ghostRole.RoleName = Loc.GetString("ventriloquist-puppet-role-name");
ghostRole.RoleDescription = Loc.GetString("ventriloquist-puppet-role-description");
ghostRole.RoleName = Loc.GetString(_random.Pick(component.PuppetRoleName)); // Frontier
ghostRole.RoleDescription = Loc.GetString(_random.Pick(component.PuppetRoleDescription)); // Frontier
//ghostRole.RoleName = Loc.GetString("ventriloquist-puppet-role-name");
//ghostRole.RoleDescription = Loc.GetString("ventriloquist-puppet-role-description");
}

args.Handled = true;
Expand All @@ -65,7 +72,8 @@ private void OnDropped(EntityUid uid, VentriloquistPuppetComponent component, Dr
if (HasComp<MutedComponent>(uid))
return;

_popupSystem.PopupEntity(Loc.GetString("ventriloquist-puppet-remove-hand"), uid, args.User);
_popupSystem.PopupEntity(Loc.GetString(_random.Pick(component.RemoveHand)), uid, args.User); // Frontier
//_popupSystem.PopupEntity(Loc.GetString("ventriloquist-puppet-remove-hand"), uid, args.User);
MuteDummy(uid, component);
}

Expand All @@ -77,7 +85,8 @@ private void OnUnequippedHand(EntityUid uid, VentriloquistPuppetComponent compon
if (HasComp<MutedComponent>(uid))
return;

_popupSystem.PopupEntity(Loc.GetString("ventriloquist-puppet-remove-hand"), uid, args.User);
_popupSystem.PopupEntity(Loc.GetString(_random.Pick(component.RemoveHand)), uid, args.User); // Frontier
//_popupSystem.PopupEntity(Loc.GetString("ventriloquist-puppet-remove-hand"), uid, args.User);
MuteDummy(uid, component);
}

Expand All @@ -86,7 +95,8 @@ private void OnUnequippedHand(EntityUid uid, VentriloquistPuppetComponent compon
/// </summary>
private void MuteDummy(EntityUid uid, VentriloquistPuppetComponent component)
{
_popupSystem.PopupEntity(Loc.GetString("ventriloquist-puppet-removed-hand"), uid, uid);
_popupSystem.PopupEntity(Loc.GetString(_random.Pick(component.RemovedHand)), uid, uid); // Frontier
//_popupSystem.PopupEntity(Loc.GetString("ventriloquist-puppet-removed-hand"), uid, uid);
EnsureComp<MutedComponent>(uid);
RemComp<CombatModeComponent>(uid);
RemComp<GhostTakeoverAvailableComponent>(uid);
Expand Down
11 changes: 7 additions & 4 deletions Content.Server/_NF/SizeAttribute/SizeAttributeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ private void OnComponentInit(EntityUid uid, SizeAttributeComponent component, Co

if (whitelist.Tall && component.Tall)
{
Scale(uid, component, whitelist.TallScale, whitelist.TallDensity);
Scale(uid, component, whitelist.TallScale, whitelist.TallDensity, whitelist.TallCosmeticOnly);
PseudoItem(uid, component, whitelist.TallPseudoItem);
}
else if (whitelist.Short && component.Short)
{
Scale(uid, component, whitelist.ShortScale, whitelist.ShortDensity);
Scale(uid, component, whitelist.ShortScale, whitelist.ShortDensity, whitelist.ShortCosmeticOnly);
PseudoItem(uid, component, whitelist.ShortPseudoItem);
}
}
Expand All @@ -54,7 +54,7 @@ private void PseudoItem(EntityUid uid, SizeAttributeComponent component, bool ac
}
}

private void Scale(EntityUid uid, SizeAttributeComponent component, float scale, float density)
private void Scale(EntityUid uid, SizeAttributeComponent component, float scale, float density, bool cosmeticOnly)
{
if (scale <= 0f && density <= 0f)
return;
Expand All @@ -67,10 +67,13 @@ private void Scale(EntityUid uid, SizeAttributeComponent component, float scale,

_appearance.SetData(uid, ScaleVisuals.Scale, oldScale * scale, appearanceComponent);

if (_entityManager.TryGetComponent(uid, out FixturesComponent? manager))
if (!cosmeticOnly && _entityManager.TryGetComponent(uid, out FixturesComponent? manager))
{
foreach (var (id, fixture) in manager.Fixtures)
{
if (!fixture.Hard || fixture.Density <= 1f)
continue; // This will skip the flammable fixture and any other fixture that is not supposed to contribute to mass

switch (fixture.Shape)
{
case PhysShapeCircle circle:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public sealed partial class SizeAttributeWhitelistComponent : Component
[DataField("shortPseudoItem")]
public bool ShortPseudoItem = false;

[DataField("shortCosmeticOnly")]
public bool ShortCosmeticOnly = true;

// Tall
[DataField("tall")]
public bool Tall = false;
Expand All @@ -30,5 +33,8 @@ public sealed partial class SizeAttributeWhitelistComponent : Component

[DataField("tallPseudoItem")]
public bool TallPseudoItem = false;

[DataField("tallCosmeticOnly")]
public bool TallCosmeticOnly = true;
}
}
2 changes: 1 addition & 1 deletion Content.Shared/CCVar/CCVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public static readonly CVarDef<bool>
/// Whether a random position offset will be applied to the station on roundstart.
/// </summary>
public static readonly CVarDef<bool> StationOffset =
CVarDef.Create("game.station_offset", true);
CVarDef.Create("game.station_offset", false);

/// <summary>
/// When the default blueprint is loaded what is the maximum amount it can be offset from 0,0.
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Power/Generator/FuelGeneratorComponent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Robust.Shared.GameStates;
using Robust.Shared.GameStates;

namespace Content.Shared.Power.Generator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Robust.Shared.Audio;
using Robust.Shared.Audio;
using Robust.Shared.Serialization;

namespace Content.Shared.Power.Generator;
Expand Down Expand Up @@ -42,6 +42,12 @@ public sealed partial class PortableGeneratorComponent : Component
[DataField("startSoundEmpty")]
[ViewVariables(VVAccess.ReadWrite)]
public SoundSpecifier? StartSoundEmpty { get; set; }

/// <summary>
/// Frontier - Start the generator with the map.
/// </summary>
[DataField("startOnMapInit")]
public bool StartOnMapInit { get; set; } = false;
}

/// <summary>
Expand Down
19 changes: 18 additions & 1 deletion Content.Shared/Puppet/VentriloquistPuppetComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,21 @@ namespace Content.Shared.Puppet;
[RegisterComponent, NetworkedComponent]
public sealed partial class VentriloquistPuppetComponent : Component
{
}
[DataField, ViewVariables(VVAccess.ReadWrite)]
public List<LocId> RemoveHand = new ();

[DataField, ViewVariables(VVAccess.ReadWrite)]
public List<LocId> RemovedHand = new();

[DataField, ViewVariables(VVAccess.ReadWrite)]
public List<LocId> InsertHand = new ();

[DataField, ViewVariables(VVAccess.ReadWrite)]
public List<LocId> InsertedHand = new ();

[DataField, ViewVariables(VVAccess.ReadWrite)]
public List<LocId> PuppetRoleName = new ();

[DataField, ViewVariables(VVAccess.ReadWrite)]
public List<LocId> PuppetRoleDescription = new ();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Robust.Shared.GameStates;

namespace Content.Shared.StepTrigger.Components;

/// <summary>
/// Frontier - This is used for immunity to cancelling step trigger events if the user is wearing shoes, such as for glass shards.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class ShoesRequiredStepTriggerImmuneComponent : Component // Frontier
{
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Shared.Examine;
using Content.Shared.Examine;
using Content.Shared.Inventory;
using Content.Shared.StepTrigger.Components;
using Content.Shared.Tag;
Expand All @@ -25,6 +25,12 @@ private void OnStepTriggerAttempt(EntityUid uid, ShoesRequiredStepTriggerCompone
return;
}

if (HasComp<ShoesRequiredStepTriggerImmuneComponent>(args.Tripper)) // Frontier
{
args.Cancelled = true;
return;
}

if (!TryComp<InventoryComponent>(args.Tripper, out var inventory))
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ public sealed partial class MaterialReclaimerMagnetPickupComponent : Component

[ViewVariables(VVAccess.ReadWrite), DataField("range")]
public float Range = 1f;

/// <summary>
/// Frontier - Is the magnet currently enabled?
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("magnetEnabled")]
public bool MagnetEnabled = false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ public sealed partial class MaterialStorageMagnetPickupComponent : Component

[ViewVariables(VVAccess.ReadWrite), DataField("range")]
public float Range = 1f;

/// <summary>
/// Frontier - Is the magnet currently enabled?
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("magnetEnabled")]
public bool MagnetEnabled = false;
}
1 change: 0 additions & 1 deletion Content.Shared/Storage/EntitySystems/MagnetPickupSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public bool ToggleMagnet(EntityUid uid, MagnetPickupComponent comp)
return comp.MagnetEnabled;
}


public override void Update(float frameTime)
{
base.Update(frameTime);
Expand Down
Loading

0 comments on commit d4efd0a

Please sign in to comment.