Skip to content

Commit

Permalink
Merge branch 'master' into Simple-Food-PR-Cheese-Sandwich
Browse files Browse the repository at this point in the history
  • Loading branch information
dvir001 authored Jan 4, 2025
2 parents aa17694 + 78a4933 commit 982707a
Show file tree
Hide file tree
Showing 100 changed files with 3,060 additions and 1,905 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public sealed class GuidebookUIController : UIController, IOnStateEntered<LobbyS
[Dependency] private readonly IConfigurationManager _configuration = default!;
[Dependency] private readonly JobRequirementsManager _jobRequirements = default!;

private const int PlaytimeOpenGuidebook = 60;
private const int PlaytimeOpenGuidebook = 180; // Frontier 60<180

private GuidebookWindow? _guideWindow;
private MenuButton? GuidebookButton => UIManager.GetActiveUIWidgetOrNull<MenuBar.Widgets.GameTopMenuBar>()?.GuidebookButton;
Expand Down
10 changes: 10 additions & 0 deletions Content.Server/Ghost/GhostSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Content.Server.Administration.Logs;
using Content.Server.Administration.Managers; // Frontier
using Content.Server.Cargo.Systems; // Frontier
using Content.Server.Chat.Managers;
using Content.Server.GameTicking;
using Content.Server.Ghost.Components;
Expand Down Expand Up @@ -93,6 +94,7 @@ public override void Initialize()
SubscribeLocalEvent<GhostComponent, BooActionEvent>(OnActionPerform);
SubscribeLocalEvent<GhostComponent, ToggleGhostHearingActionEvent>(OnGhostHearingAction);
SubscribeLocalEvent<GhostComponent, InsertIntoEntityStorageAttemptEvent>(OnEntityStorageInsertAttempt);
SubscribeLocalEvent<GhostComponent, PriceCalculationEvent>(OnPriceCalculation); // Frontier

SubscribeLocalEvent<RoundEndTextAppendEvent>(_ => MakeVisible(true));
SubscribeLocalEvent<ToggleGhostVisibilityToAllEvent>(OnToggleGhostVisibilityToAll);
Expand Down Expand Up @@ -592,6 +594,14 @@ public bool OnGhostAttempt(EntityUid mindId, bool canReturnGlobal, bool viaComma

return true;
}

// Frontier: worthless ghosts
private void OnPriceCalculation(Entity<GhostComponent> ent, ref PriceCalculationEvent args)
{
args.Price = 0;
args.Handled = true;
}
// End Frontier
}

public sealed class GhostAttemptHandleEvent(MindComponent mind, bool canReturnGlobal) : HandledEntityEventArgs
Expand Down
23 changes: 23 additions & 0 deletions Content.Shared/_NF/Clothing/Components/NFMoonBootsComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Content.Shared.Alert;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Content.Shared._NF.Clothing.EntitySystems;

namespace Content.Shared._NF.Clothing.Components;

/// <summary>
/// This is used for clothing that makes an entity weightless when worn.
/// </summary>
[RegisterComponent, NetworkedComponent]
[Access(typeof(SharedNFMoonBootsSystem))]
public sealed partial class NFMoonBootsComponent : Component
{
[DataField]
public ProtoId<AlertPrototype> MoonBootsAlert = "MoonBoots";

/// <summary>
/// Slot the clothing has to be worn in to work.
/// </summary>
[DataField]
public string Slot = "shoes";
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Robust.Shared.Physics.Components;
using Robust.Shared.Timing;

namespace Content.Shared._NF.Clothing.Systems;
namespace Content.Shared._NF.Clothing.EntitySystems;

public sealed class EmitsSoundOnMoveSystem : EntitySystem
{
Expand Down
81 changes: 81 additions & 0 deletions Content.Shared/_NF/Clothing/EntitySystems/NFMoonBootsSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
using Content.Shared.Gravity;
using Content.Shared.Inventory;
using Content.Shared.Item.ItemToggle.Components;
using Content.Shared.Alert;
using Content.Shared.Item;
using Content.Shared.Item.ItemToggle;
using Robust.Shared.Containers;
using Content.Shared.Clothing.EntitySystems;
using Content.Shared._NF.Clothing.Components;
using Content.Shared.Clothing;

namespace Content.Shared._NF.Clothing.EntitySystems;

public sealed class SharedNFMoonBootsSystem : EntitySystem
{
[Dependency] private readonly AlertsSystem _alerts = default!;
[Dependency] private readonly ClothingSystem _clothing = default!;
[Dependency] private readonly InventorySystem _inventory = default!;
[Dependency] private readonly ItemToggleSystem _toggle = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
[Dependency] private readonly SharedItemSystem _item = default!;

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

SubscribeLocalEvent<NFMoonBootsComponent, ItemToggledEvent>(OnToggled);
SubscribeLocalEvent<NFMoonBootsComponent, ClothingGotEquippedEvent>(OnGotEquipped);
SubscribeLocalEvent<NFMoonBootsComponent, ClothingGotUnequippedEvent>(OnGotUnequipped);
SubscribeLocalEvent<NFMoonBootsComponent, IsWeightlessEvent>(OnIsWeightless);
SubscribeLocalEvent<NFMoonBootsComponent, InventoryRelayedEvent<IsWeightlessEvent>>(OnIsWeightless);
}

private void OnToggled(Entity<NFMoonBootsComponent> ent, ref ItemToggledEvent args)
{
var (uid, comp) = ent;
// only works if being worn in the correct slot
if (_container.TryGetContainingContainer((uid, null, null), out var container) &&
_inventory.TryGetSlotEntity(container.Owner, comp.Slot, out var worn)
&& uid == worn)
{
UpdateMoonbootEffects(container.Owner, ent, args.Activated);
}

var prefix = args.Activated ? "on" : null;
_item.SetHeldPrefix(ent, prefix);
_clothing.SetEquippedPrefix(ent, prefix);
}

private void OnGotUnequipped(Entity<NFMoonBootsComponent> ent, ref ClothingGotUnequippedEvent args)
{
UpdateMoonbootEffects(args.Wearer, ent, false);
}

private void OnGotEquipped(Entity<NFMoonBootsComponent> ent, ref ClothingGotEquippedEvent args)
{
UpdateMoonbootEffects(args.Wearer, ent, _toggle.IsActivated(ent.Owner));
}

public void UpdateMoonbootEffects(EntityUid user, Entity<NFMoonBootsComponent> ent, bool state)
{
if (state)
_alerts.ShowAlert(user, ent.Comp.MoonBootsAlert);
else
_alerts.ClearAlert(user, ent.Comp.MoonBootsAlert);
}

private void OnIsWeightless(Entity<NFMoonBootsComponent> ent, ref IsWeightlessEvent args)
{
if (args.Handled || !_toggle.IsActivated(ent.Owner))
return;

args.Handled = true;
args.IsWeightless = true;
}

private void OnIsWeightless(Entity<NFMoonBootsComponent> ent, ref InventoryRelayedEvent<IsWeightlessEvent> args)
{
OnIsWeightless(ent, ref args.Args);
}
}
11 changes: 11 additions & 0 deletions Content.Shared/_NF/Containers/CondimentCupComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Robust.Shared.GameStates;

namespace Content.Shared._NF.Containers.Components;
/// <summary>
/// CondimentCup empty component
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class CondimentCupComponent : Component
{

}
11 changes: 11 additions & 0 deletions Content.Shared/_NF/Containers/CondimentKetchupComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Robust.Shared.GameStates;

namespace Content.Shared._NF.Containers.Components;
/// <summary>
/// CondimentKetchup empty component
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class CondimentKetchupComponent : Component
{

}
11 changes: 11 additions & 0 deletions Content.Shared/_NF/Containers/CondimentMustardComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Robust.Shared.GameStates;

namespace Content.Shared._NF.Containers.Components;
/// <summary>
/// CondimentMustard empty component
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class CondimentMustardComponent : Component
{

}
11 changes: 11 additions & 0 deletions Content.Shared/_NF/Containers/CondimentSqueezeBottleComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Robust.Shared.GameStates;

namespace Content.Shared._NF.Containers.Components;
/// <summary>
/// CondimentSqueezeBottle empty component
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class CondimentSqueezeBottleComponent : Component
{

}
48 changes: 48 additions & 0 deletions Resources/Changelog/Frontier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6194,3 +6194,51 @@ Entries:
unable to fit inside a donut box.
id: 5624
time: '2025-01-03T01:21:06.0000000+00:00'
- author: dustylens
changes:
- type: Add
message: ATM flatpack to flatpack vend.
id: 5625
time: '2025-01-03T12:49:10.0000000+00:00'
- author: dustylens
changes:
- type: Tweak
message: Add toggle feature to moon boots.
id: 5626
time: '2025-01-03T13:22:59.0000000+00:00'
- author: PeccNeck
changes:
- type: Tweak
message: Bocakillo now uses directional fans
- type: Tweak
message: Moved Bocakillo plasma into wall locker
- type: Fix
message: Fixed loose piping on Bocakillo
id: 5627
time: '2025-01-03T16:44:50.0000000+00:00'
- author: chrome-cirrus
changes:
- type: Add
message: Charon gets shutters and some cameras.
- type: Tweak
message: Charon had a bunch of small fixes and additions made.
id: 5628
time: '2025-01-03T17:32:24.0000000+00:00'
- author: dustylens
changes:
- type: Add
message: Adds clear condiment bottle and lathe recipe.
id: 5629
time: '2025-01-04T16:53:52.0000000+00:00'
- author: dustylens
changes:
- type: Add
message: Condiment dispenser.
id: 5630
time: '2025-01-04T20:32:57.0000000+00:00'
- author: dustylens
changes:
- type: Add
message: Colored craftable lightbulbs and prefilled light strobes.!
id: 5631
time: '2025-01-04T23:23:37.0000000+00:00'
3 changes: 3 additions & 0 deletions Resources/Locale/en-US/_NF/alerts/alerts.ftl
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
alerts-pacified-zone-name = [color=royalblue]Pacified Zone[/color]
alerts-pacified-zone-desc = You're in a pacified zone, you need to leave before harming living things.
alerts-moon-boots-name = Moon Boots
alerts-moon-boots-desc = Gravity? What's that?
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Toggle Moon Boots Verb
toggle-moon-boots-verb-get-data-text = Toggle Moon Boots
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/_NF/guidebook/guides.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
guide-entry-nf14 = Frontier Guide
guide-entry-bank = NT Galactic Bank
guide-entry-piloting = Piloting
guide-entry-startinggear = Starting Equipment
guide-entry-hiring = Hiring Crew
guide-entry-expeditions = Expeditions
guide-entry-shipyard = Shipyard
Expand Down Expand Up @@ -72,6 +73,7 @@ guide-entry-shipyard-sparrow = Sparrow
guide-entry-shipyard-skipper = Skipper
guide-entry-shipyard-spirit = Spirit
guide-entry-shipyard-stasis = Stasis
guide-entry-shipyard-tide = Tide
guide-entry-shipyard-vagabond = Vagabond
# Rules entries
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
reagent-name-coldsauce = coldsauce
reagent-desc-coldsauce = Coldsauce. Leaves the tongue numb in its passage.
Loading

0 comments on commit 982707a

Please sign in to comment.