Skip to content

Commit

Permalink
Merge branch '2024-07-15-YeetShips' of https://github.com/dvir001/fro…
Browse files Browse the repository at this point in the history
…ntier-station-14 into 2024-07-15-YeetShips
  • Loading branch information
dvir001 committed Jul 14, 2024
2 parents 4d780a2 + d30f6a9 commit 03a85d0
Show file tree
Hide file tree
Showing 135 changed files with 14,086 additions and 4,417 deletions.
4 changes: 4 additions & 0 deletions .github/mapchecker/whitelist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ Trade: true

# 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.
#DartX:
# - HighSecDoor
Rogue:
- ShuttleGunFriendship
Bottleneck:
- PosterLegitPDAAd
1 change: 1 addition & 0 deletions Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ private void UpdateRanged(float frameTime)
return;
}

_gun.SetTarget(gun, comp.Target); // Frontier - This ensures that the bullet won't fly over the target if it's downed
_gun.AttemptShoot(uid, gunUid, gun, targetCordinates);
}
}
Expand Down
16 changes: 14 additions & 2 deletions Content.Server/StationEvents/Events/BluespaceErrorRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Content.Shared.Humanoid;
using Content.Shared.Mobs.Components;
using Robust.Shared.Random;
using Content.Server._NF.Salvage;

namespace Content.Server.StationEvents.Events;

Expand Down Expand Up @@ -75,6 +76,17 @@ protected override void Ended(EntityUid uid, BluespaceErrorRuleComponent compone

var gridValue = _pricing.AppraiseGrid(gridUid, null);

// Handle mobrestrictions getting deleted
var query = AllEntityQuery<SalvageMobRestrictionsNFComponent>();

while (query.MoveNext(out var salvUid, out var salvMob))
{
if (gridTransform.GridUid == salvMob.LinkedGridEntity)
{
QueueDel(salvUid);
}
}

var mobQuery = AllEntityQuery<HumanoidAppearanceComponent, MobStateComponent, TransformComponent>();
_playerMobs.Clear();

Expand All @@ -96,8 +108,8 @@ protected override void Ended(EntityUid uid, BluespaceErrorRuleComponent compone
_transform.SetCoordinates(mob.Entity.Owner, new EntityCoordinates(mob.MapUid, mob.LocalPosition));
}

var query = EntityQuery<StationBankAccountComponent>();
foreach (var account in query)
var queryBank = EntityQuery<StationBankAccountComponent>();
foreach (var account in queryBank)
{
_cargo.DeductFunds(account, (int)-(gridValue * component.RewardFactor));
}
Expand Down
52 changes: 40 additions & 12 deletions Content.Server/_NF/Speech/EntitySystems/GoblinAccentSystem.cs
Original file line number Diff line number Diff line change
@@ -1,31 +1,59 @@
using Content.Server._NF.Speech.Components;
using Content.Server.Speech;
using Content.Server.Speech.EntitySystems;
using System.Text.RegularExpressions;

namespace Content.Server._NF.Speech.EntitySystems;

// The whole code is a copy of SouthernAccentSystem by UBlueberry (https://github.com/UBlueberry)
public sealed class GoblinAccentSystem : EntitySystem
{
private static readonly Regex RegexIng = new(@"(in)g\b", RegexOptions.IgnoreCase);
private static readonly Regex RegexAnd = new(@"\b(an)d\b", RegexOptions.IgnoreCase);
private static readonly Regex RegexEr = new(@"([^\WpPfF])er\b"); // Keep "er", "per", "Per", "fer" and "Fer"
private static readonly Regex RegexErUpper = new(@"([^\WpPfF])ER\b"); // Keep "ER", "PER" and "FER"
private static readonly Regex RegexTwoLetterEr = new(@"(\w\w)er\b"); // Replace "..XXer", e.g. "super"->"supah"
private static readonly Regex RegexTwoLetterErUpper = new(@"(\w\w)ER\b"); // Replace "..XXER", e.g. "SUPER"->"SUPAH"
private static readonly Regex RegexErs = new(@"(\w)ers\b"); // Replace "..XXers", e.g. "fixers"->"fixas"
private static readonly Regex RegexErsUpper = new(@"(\w)ERS\b"); // Replace "..XXers", e.g. "fixers"->"fixas"
private static readonly Regex RegexTt = new(@"([aeiouy])tt", RegexOptions.IgnoreCase);
private static readonly Regex RegexOf = new(@"\b(o)f\b", RegexOptions.IgnoreCase);
private static readonly Regex RegexThe = new(@"\bthe\b");
private static readonly Regex RegexTheUpper = new(@"\bTHE\b");
private static readonly Regex RegexH = new(@"\bh", RegexOptions.IgnoreCase);
private static readonly Regex RegexSelf = new(@"self\b");
private static readonly Regex RegexSelfUpper = new(@"SELF\b");

[Dependency] private readonly ReplacementAccentSystem _replacement = default!;

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

SubscribeLocalEvent<GoblinAccentComponent, AccentGetEvent>(OnAccentGet);
SubscribeLocalEvent<GoblinAccentComponent, AccentGetEvent>(OnAccent);
}

// converts left word when typed into the right word. For example typing you becomes ye.
public string Accentuate(string message, GoblinAccentComponent component)
private void OnAccent(EntityUid uid, GoblinAccentComponent component, AccentGetEvent args)
{
var msg = message;
var message = args.Message;

msg = _replacement.ApplyReplacements(msg, "goblin");
return msg;
}
message = _replacement.ApplyReplacements(message, "goblin_accent");

private void OnAccentGet(EntityUid uid, GoblinAccentComponent component, AccentGetEvent args)
{
args.Message = Accentuate(args.Message, component);
message = RegexIng.Replace(message, "$1'"); //ing->in', ING->IN'
message = RegexAnd.Replace(message, "$1'"); //and->an', AND->AN'
message = RegexEr.Replace(message, "$1ah");
message = RegexErUpper.Replace(message, "$1AH");
message = RegexTwoLetterEr.Replace(message, "$1ah");
message = RegexTwoLetterErUpper.Replace(message, "$1AH");
message = RegexErs.Replace(message, "$1as");
message = RegexErsUpper.Replace(message, "$1AS");
message = RegexTt.Replace(message, "$1'");
message = RegexH.Replace(message, "'");
message = RegexSelf.Replace(message, "sewf");
message = RegexSelfUpper.Replace(message, "SEWF");
message = RegexOf.Replace(message, "$1'"); //of->o', OF->O'
message = RegexThe.Replace(message, "da");
message = RegexTheUpper.Replace(message, "DA");

args.Message = message;
}
}
};
2 changes: 2 additions & 0 deletions Content.Shared/Shipyard/SharedShipyardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public enum ShipyardConsoleUiKey : byte
BlackMarket,
Expedition,
Scrap,
Sr,
// Do not add any ship to this key. Shipyards using it are inherently empty and are populated using the ShipyardListingComponent.
Custom
}
Expand All @@ -36,6 +37,7 @@ public abstract class SharedShipyardSystem : EntitySystem
{ShipyardConsoleUiKey.BlackMarket, "BlackMarket"},
{ShipyardConsoleUiKey.Expedition, "Expedition"},
{ShipyardConsoleUiKey.Scrap, "Scrap"},
{ShipyardConsoleUiKey.Sr, "Sr"},
{ShipyardConsoleUiKey.Custom, "<DO NOT USE>"}
};

Expand Down
8 changes: 8 additions & 0 deletions Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@ private void StopShooting(EntityUid uid, GunComponent gun)
Dirty(uid, gun);
}

/// <summary>
/// Frontier - Sets the targeted entity of the gun. Should be called before attempting to shoot to avoid shooting over the target.
/// </summary>
public void SetTarget(GunComponent gun, EntityUid target)
{
gun.Target = target;
}

/// <summary>
/// Attempts to shoot at the target coordinates. Resets the shot counter after every shot.
/// </summary>
Expand Down
50 changes: 50 additions & 0 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5623,3 +5623,53 @@ Entries:
message: Fixed Dove atmos, interior walls and missing airlock.
id: 5110
time: '2024-07-13T09:43:55.0000000+00:00'
- author: erhardsteihauer
changes:
- type: Tweak
message: 'Updated KC Bulker: removed kitchen, replaced AME with uranium generator.'
id: 5111
time: '2024-07-13T17:41:31.0000000+00:00'
- author: erhardsteinhauer
changes:
- type: Tweak
message: Updated NC Kestrel.
id: 5112
time: '2024-07-13T17:46:03.0000000+00:00'
- author: Actualcatmoment
changes:
- type: Tweak
message: >-
Guidebook updates, extra storage, and mothership spawning for the NM
Spirit!
id: 5113
time: '2024-07-13T17:50:56.0000000+00:00'
- author: Tych0theSynth
changes:
- type: Add
message: Added the NT Bottleneck, an exclusive SR ship.
- type: Add
message: Added the SR Shipyard Console
id: 5114
time: '2024-07-13T17:56:08.0000000+00:00'
- author: arimah
changes:
- type: Add
message: Added the SBB Hammer, a medium-sized engineering shuttle.
id: 5115
time: '2024-07-13T18:18:47.0000000+00:00'
- author: ErhardSteinhauer
changes:
- type: Add
message: '@mrscratch added Novalite C1 rifle chambered in .20 round.'
id: 5116
time: '2024-07-13T21:00:10.0000000+00:00'
- author: erhardsteinhauer
changes:
- type: Tweak
message: Made goblin accent a bit thicker.
- type: Fix
message: >-
Non-goblin characters with Goblin Cant now speak the same way as
goblins.
id: 5117
time: '2024-07-14T23:42:59.0000000+00:00'
Loading

0 comments on commit 03a85d0

Please sign in to comment.