Skip to content

Commit

Permalink
Merge branch 'master' into FSB-Nightlight
Browse files Browse the repository at this point in the history
  • Loading branch information
dustylens authored Dec 28, 2024
2 parents fbc58f5 + 0686ef9 commit 69237b7
Show file tree
Hide file tree
Showing 348 changed files with 3,580 additions and 437 deletions.
10 changes: 0 additions & 10 deletions Content.Server/Shipyard/Systems/ShipyardSystem.Consoles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
using Content.Server.StationRecords.Systems;
using Content.Shared.Database;
using Content.Shared.Preferences;
using Content.Shared.Shuttles.Components;
using static Content.Shared.Shipyard.Components.ShuttleDeedComponent;
using Content.Server.Shuttles.Components;
using Content.Server.Station.Components;
Expand All @@ -38,7 +37,6 @@
using Content.Shared.UserInterface;
using Robust.Shared.Audio.Systems;
using Content.Shared.Access;
using Content.Shared.Tiles;
using Content.Server._NF.Smuggling.Components;
using Content.Shared._NF.ShuttleRecords;
using Content.Server.StationEvents.Components;
Expand Down Expand Up @@ -203,14 +201,6 @@ private void OnPurchaseMessage(EntityUid shipyardConsoleUid, ShipyardConsoleComp
shuttleStation = _station.InitializeNewStation(stationProto.Stations[vessel.ID], gridUids);
var metaData = MetaData((EntityUid)shuttleStation);
name = metaData.EntityName;
_shuttle.SetIFFColor(shuttleUid, new Color
{
R = 10,
G = 50,
B = 100,
A = 100
});
_shuttle.AddIFFFlag(shuttleUid, IFFFlags.IsPlayerShuttle);
}

if (TryComp<AccessComponent>(targetId, out var newCap))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Numerics;
using Content.Server._NF.Shuttles.Components; // Frontier: NPC knockdown immunity
using Content.Server._NF.Shuttles.Components; // Frontier: FTL knockdown immunity
using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Events;
using Content.Server.Station.Events;
Expand Down Expand Up @@ -637,11 +637,9 @@ private void DoTheDinosaur(TransformComponent xform)
{
if (!_statusQuery.TryGetComponent(child, out var status))
continue;

if (HasComp<FTLKnockdownImmuneComponent>(child)) // Frontier: NPC knockdown immunity
continue; // Frontier: NPC knockdown immunity

_stuns.TryParalyze(child, _hyperspaceKnockdownTime, true, status);
if (!HasComp<FTLKnockdownImmuneComponent>(child)) // Frontier: FTL knockdown immunity
_stuns.TryParalyze(child, _hyperspaceKnockdownTime, true, status);

// If the guy we knocked down is on a spaced tile, throw them too
if (grid != null)
Expand Down
32 changes: 32 additions & 0 deletions Content.Server/_CD/Engraving/EngraveableComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
namespace Content.Server._CD.Engraving;

/// <summary>
/// Allows an items' description to be modified with an engraving
/// </summary>
[RegisterComponent, Access(typeof(EngraveableSystem))]
public sealed partial class EngraveableComponent : Component
{
/// <summary>
/// Message given to user to notify them a message was sent
/// </summary>
[DataField]
public string EngravedMessage = string.Empty;

/// <summary>
/// The inspect text to use when there is no engraving
/// </summary>
[DataField]
public LocId NoEngravingText = "engraving-generic-no-message"; // Frontier: "dogtags"<"generic"

/// <summary>
/// The message to use when successfully engraving the item
/// </summary>
[DataField]
public LocId EngraveSuccessMessage = "engraving-generic-succeed"; // Frontier: "dogtags"<"generic"

/// <summary>
/// The inspect text to use when there is an engraving. The message will be shown seperately afterwards.
/// </summary>
[DataField]
public LocId HasEngravingText = "engraving-generic-has-message"; // Frontier: "dogtags"<"generic"
}
83 changes: 83 additions & 0 deletions Content.Server/_CD/Engraving/EngraveableSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
using Content.Server.Administration;
using Content.Server.Administration.Logs;
using Content.Server.Popups;
using Content.Shared.Database;
using Content.Shared.Popups;
using Content.Shared.Examine;
using Content.Shared.Verbs;
using Robust.Shared.Player;
using Robust.Shared.Utility;

namespace Content.Server._CD.Engraving;

public sealed class EngraveableSystem : EntitySystem
{
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly PopupSystem _popup = default!;
[Dependency] private readonly QuickDialogSystem _dialog = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<EngraveableComponent, ExaminedEvent>(OnExamined);
SubscribeLocalEvent<EngraveableComponent, GetVerbsEvent<ActivationVerb>>(AddEngraveVerb);
}

private void OnExamined(Entity<EngraveableComponent> ent, ref ExaminedEvent args)
{
var msg = new FormattedMessage();
// Frontier: don't localize the message, use args in fluent entries
if (ent.Comp.EngravedMessage == string.Empty)
msg.AddMarkupOrThrow(Loc.GetString(ent.Comp.NoEngravingText, ("object", ent)));
else
msg.AddMarkupOrThrow(Loc.GetString(ent.Comp.HasEngravingText, ("object", ent), ("message", ent.Comp.EngravedMessage)));
// End Frontier

args.PushMessage(msg, 1);
}

private void AddEngraveVerb(Entity<EngraveableComponent> ent, ref GetVerbsEvent<ActivationVerb> args)
{
// First check if it's already been engraved. If it has, don't let them do it again.
if (ent.Comp.EngravedMessage != string.Empty)
return;

// We need an actor to give the verb.
if (!EntityManager.TryGetComponent(args.User, out ActorComponent? actor))
return;

// Make sure ghosts can't engrave stuff.
if (!args.CanInteract)
return;

var engraveVerb = new ActivationVerb
{
Text = Loc.GetString("engraving-verb-engrave"),
Act = () =>
{
_dialog.OpenDialog(actor.PlayerSession,
Loc.GetString("engraving-verb-engrave"),
Loc.GetString("engraving-popup-ui-message"),
(string message) =>
{
// If either the actor or comp have magically vanished
if (actor.PlayerSession.AttachedEntity == null || !HasComp<EngraveableComponent>(ent))
return;

ent.Comp.EngravedMessage = message;
_popup.PopupEntity(Loc.GetString(ent.Comp.EngraveSuccessMessage, ("object", ent)), // Frontier: add object argument
actor.PlayerSession.AttachedEntity.Value,
actor.PlayerSession,
PopupType.Medium);
_adminLogger.Add(LogType.Action,
LogImpact.Low,
$"{ToPrettyString(actor.PlayerSession.AttachedEntity):player} engraved an item with message: {message}");
});
},
Impact = LogImpact.Low,
};
engraveVerb.Impact = LogImpact.Low;
args.Verbs.Add(engraveVerb);
}
}
13 changes: 11 additions & 2 deletions Content.Server/_NF/GameRule/PointOfInterestPrototype.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
using Content.Server.GameTicking.Presets;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
using Robust.Shared.Utility;

namespace Content.Server._NF.GameRule;

/// <summary>
/// Describes information for a single point of interest to be spawned in the world
/// </summary>
[Prototype("pointOfInterest")]
[Prototype]
[Serializable]
public sealed partial class PointOfInterestPrototype : IPrototype
public sealed partial class PointOfInterestPrototype : IPrototype, IInheritingPrototype
{
[IdDataField]
public string ID { get; private set; } = default!;

[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<PointOfInterestPrototype>))]
public string[]? Parents { get; private set; }

[NeverPushInheritance]
[AbstractDataField]
public bool Abstract { get; private set; }

/// <summary>
/// The name of this point of interest
/// </summary>
Expand Down Expand Up @@ -48,6 +56,7 @@ public sealed partial class PointOfInterestPrototype : IPrototype
/// Components to be added to any spawned grids.
/// </summary>
[DataField]
[AlwaysPushInheritance]
public ComponentRegistry AddComponents { get; set; } = new();

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;

namespace Content.Server._NF.Shuttles.Components;

/// <summary>
Expand Down
27 changes: 18 additions & 9 deletions Content.Shared/Shipyard/Prototypes/VesselPrototype.cs
Original file line number Diff line number Diff line change
@@ -1,41 +1,49 @@
using Content.Shared.Guidebook;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
using Robust.Shared.Utility;

namespace Content.Shared.Shipyard.Prototypes;

[Prototype("vessel")]
public sealed class VesselPrototype : IPrototype
[Prototype]
public sealed class VesselPrototype : IPrototype, IInheritingPrototype
{
[IdDataField]
public string ID { get; } = default!;

[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<VesselPrototype>))]
public string[]? Parents { get; private set; }

[NeverPushInheritance]
[AbstractDataField]
public bool Abstract { get; private set; }

/// <summary>
/// Vessel name.
/// </summary>
[DataField("name")] public string Name = string.Empty;
[DataField] public string Name = string.Empty;

/// <summary>
/// Short description of the vessel.
/// </summary>
[DataField("description")] public string Description = string.Empty;
[DataField] public string Description = string.Empty;

/// <summary>
/// The price of the vessel
/// </summary>
[DataField("price", required: true)]
[DataField(required: true)]
public int Price;

/// <summary>
/// The size of the vessel. (e.g. Small, Medium, Large etc.)
/// </summary>
[DataField("category", required: true)]
[DataField(required: true)]
public VesselSize Category = VesselSize.Small;

/// <summary>
/// The shipyard listing that the vessel should be in. (e.g. Civilian, Syndicate, Contraband etc.)
/// </summary>
[DataField("group", required: true)]
[DataField(required: true)]
public ShipyardConsoleUiKey Group = ShipyardConsoleUiKey.Shipyard;

/// <summary>
Expand All @@ -53,7 +61,7 @@ public sealed class VesselPrototype : IPrototype
/// <summary>
/// The access required to buy the product. (e.g. Command, Mail, Bailiff, etc.)
/// </summary>
[DataField("access")]
[DataField]
public string Access = string.Empty;

/// Frontier - Add this field for the MapChecker script.
Expand All @@ -66,7 +74,7 @@ public sealed class VesselPrototype : IPrototype
/// <summary>
/// Relative directory path to the given shuttle, i.e. `/Maps/Shuttles/yourshittle.yml`
/// </summary>
[DataField("shuttlePath", required: true)]
[DataField(required: true)]
public ResPath ShuttlePath = default!;

/// <summary>
Expand All @@ -85,6 +93,7 @@ public sealed class VesselPrototype : IPrototype
/// Components to be added to any spawned grids.
/// </summary>
[DataField]
[AlwaysPushInheritance]
public ComponentRegistry AddComponents { get; set; } = new();
}

Expand Down
56 changes: 56 additions & 0 deletions Resources/Changelog/Frontier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6122,3 +6122,59 @@ Entries:
message: Pirate PDAs now have the AstroNav program
id: 5614
time: '2024-12-26T21:07:18.0000000+00:00'
- author: whatston3
changes:
- type: Fix
message: The Menace now spawns with its IFF label hidden.
id: 5615
time: '2024-12-28T03:29:18.0000000+00:00'
- author: dvir001
changes:
- type: Add
message: Diona are now immune to the force of an FTL jump.
id: 5616
time: '2024-12-28T16:37:31.0000000+00:00'
- author: dvir001
changes:
- type: Add
message: Added the classic DeltaV Moth markings.
- type: Add
message: Added "Selene" wing customization option for moths
- type: Fix
message: Felinids and vulpkanin now have gasping sounds.
id: 5617
time: '2024-12-28T17:49:58.0000000+00:00'
- author: whatston3
changes:
- type: Fix
message: Printed empty magazines now have fill states.
id: 5618
time: '2024-12-28T17:51:26.0000000+00:00'
- author: Kr8art
changes:
- type: Add
message: Added customizable dogtags from Cosmatic Drift to the trinket loadout!
- type: Add
message: >-
Most flasks, rings, flippo lighters, and the gold watch are now
engravable.
id: 5619
time: '2024-12-28T18:12:03.0000000+00:00'
- author: deltanedas
changes:
- type: Tweak
message: Ore and plant box storage has been increased from 60 to 200 slots.
id: 5620
time: '2024-12-28T18:14:30.0000000+00:00'
- author: RangerXVII
changes:
- type: Add
message: Added new clothes to the detective's loadout.
id: 5621
time: '2024-12-28T18:26:55.0000000+00:00'
- author: Radezolid
changes:
- type: Tweak
message: All jetpacks now fit in the suit storage slot.
id: 5622
time: '2024-12-28T20:03:34.0000000+00:00'
7 changes: 7 additions & 0 deletions Resources/Locale/en-US/_CD/engraving/engraving.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
engraving-verb-engrave = Engrave
engraving-popup-ui-message = Description
# Frontier: generic engraving messages
engraving-generic-no-message = There isn't anything engraved on {THE($object)}.
engraving-generic-has-message = There's a message engraved on {THE($object)}. It reads: {$message}
engraving-generic-succeed = You successfully engrave {THE($object)} with your message.
6 changes: 6 additions & 0 deletions Resources/Locale/en-US/deltav/markings/moth.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
marking-MothWingsClassicSelene = Wings (Selene, Classic)
marking-MothWingsSelene-selene_primary = Primary
marking-MothWingsSelene-selene_secondary = Secondary
marking-MothWingsSelene-selene_tertiary = Tertiary
marking-MothWingsSelene = Wings (Selene)
Loading

0 comments on commit 69237b7

Please sign in to comment.