Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced alcoholism v2 #1

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3c119ed
Clean VendPrice to not suck (#1612)
dvir001 Jul 6, 2024
adb575f
Update meta.json for pride drobe (#1617)
vitalvitriol Jul 6, 2024
66344da
RPED Fixes, Minor Cleanup (#1613)
whatston3 Jul 6, 2024
b1377aa
Automatic Changelog (#1613)
FrontierATC Jul 6, 2024
fd92a3e
ATM? LFG. change chatsan entries (#1619)
whatston3 Jul 6, 2024
5ccef87
ATM: Feedback on invalid items (#1598)
whatston3 Jul 6, 2024
ad4eaaa
Chemist Wall Lockers. Filled and empty. (#1616)
dustylens Jul 6, 2024
d5d736d
MailTruck - Parcel (Update) (#1610)
dvir001 Jul 6, 2024
f7fca87
Automatic Changelog (#1610)
FrontierATC Jul 6, 2024
9cd2e22
NFSD Access Overhaul (#1459)
neuPanda Jul 7, 2024
ebd1a37
Automatic Changelog (#1459)
FrontierATC Jul 7, 2024
517c3be
adds SSS Camper (#1568)
AF-Buyrcsp2 Jul 7, 2024
7780850
Automatic Changelog (#1568)
FrontierATC Jul 7, 2024
96bd03b
Multiple fixes (#1630)
MagnusCrowe Jul 7, 2024
c57f6cf
Another admeme teleporter fix (#1631)
Myzumi Jul 8, 2024
0c93099
Add SVT Mid-tier Weapon (#1417)
VividPups Jul 8, 2024
deb7d2b
Automatic Changelog (#1417)
FrontierATC Jul 8, 2024
d75da8b
Loadouts: fallback to free items when character cannot afford mandato…
whatston3 Jul 8, 2024
1c8c757
Expedition Bestiary: guidebook entries and mob tweaks (#1548)
ErhardSteinhauer Jul 8, 2024
af32742
Automatic Changelog (#1548)
FrontierATC Jul 8, 2024
c9e7330
Tactical maid harduits (#1551)
Leander-0 Jul 8, 2024
ea756ae
Automatic Changelog (#1551)
FrontierATC Jul 8, 2024
b5c3dea
Pumpkin Spice Latte (#1558)
whatston3 Jul 8, 2024
c33d23f
Automatic Changelog (#1558)
FrontierATC Jul 8, 2024
ccea7ba
PTK-800 Require Power (#1621)
dvir001 Jul 8, 2024
af74f2c
Added Maximum IFF Distance Slider to NavScreen (#1563)
BoettcherDasOriginal Jul 8, 2024
6d04ff0
Automatic Changelog (#1563)
FrontierATC Jul 8, 2024
7858b3a
Space Blades (Let it drip!) (#1596)
dvir001 Jul 10, 2024
e051f36
Automatic Changelog (#1596)
FrontierATC Jul 10, 2024
661888c
shuttles: get entity's listing if none provided (#1643)
whatston3 Jul 10, 2024
9ecd964
Add Whiskey Echoes barsign (#1636)
whatston3 Jul 10, 2024
8e0469b
Automatic Changelog (#1636)
FrontierATC Jul 10, 2024
f027264
Oni Accuracy: Wieldable Check (#1638)
whatston3 Jul 10, 2024
44e82e8
Automatic Changelog (#1638)
FrontierATC Jul 10, 2024
c47c652
Job icons & ID cards (#1628)
whatston3 Jul 10, 2024
7fbfbc4
Emotional support RPG (#1633)
VividPups Jul 10, 2024
7a5380d
Add four tgstation bar signs (#1642)
whatston3 Jul 10, 2024
0d99d27
Automatic Changelog (#1633)
FrontierATC Jul 10, 2024
74efbc8
Automatic Changelog (#1642)
FrontierATC Jul 10, 2024
9b001af
Unique glove fibers (#1455) (#1645)
dvir001 Jul 10, 2024
8113134
Adjust solution size on slicing/eating food (#1644)
whatston3 Jul 10, 2024
b1472ee
Automatic Changelog (#1644)
FrontierATC Jul 10, 2024
cd0472a
3 new additions to jukebox (#1361) (#1646)
dvir001 Jul 10, 2024
4a5dcdd
DeltaV species updates (#1647)
dvir001 Jul 11, 2024
e88da4d
Add Frontier Arrivals to Jukebox (#1635)
whatston3 Jul 11, 2024
3951fba
Automatic Changelog (#1635)
FrontierATC Jul 11, 2024
169ac6c
Expeditionary Lodge: Small QoL Update (#1653)
ErhardSteinhauer Jul 11, 2024
6fea568
Automatic Changelog (#1653)
FrontierATC Jul 11, 2024
780f020
missed those (#1658)
ErhardSteinhauer Jul 12, 2024
361c97d
Automatic Changelog (#1658)
FrontierATC Jul 12, 2024
27890bd
Update FactionClothingSystem.cs (#1659)
dvir001 Jul 12, 2024
0a384a2
Remove invisible IFF from prowler (#1649)
Leander-0 Jul 12, 2024
23e87a4
Automatic Changelog (#1649)
FrontierATC Jul 12, 2024
ad3623f
Bazaar (Update) (#1639)
ErhardSteinhauer Jul 12, 2024
671b4b5
Automatic Changelog (#1639)
FrontierATC Jul 12, 2024
118a58e
Sheriff, ERT Mail Carrier Starting Gear: vacate suitstorage (#1654)
whatston3 Jul 12, 2024
cd425e7
Automatic Changelog (#1654)
FrontierATC Jul 12, 2024
d6eb455
Liquidator (Update) (#1624)
ErhardSteinhauer Jul 12, 2024
2b93e54
Automatic Changelog (#1624)
FrontierATC Jul 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 10 additions & 2 deletions Content.Client/Bank/UI/BankATMMenu.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* New Frontiers - This file is licensed under AGPLv3
* Copyright (c) 2024 New Frontiers Contributors
* See AGPLv3.txt for details.
*/
using Content.Client.UserInterface.Controls;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
Expand All @@ -22,13 +27,16 @@ public BankATMMenu()

public void SetBalance(int amount)
{
BalanceLabel.Text = Loc.GetString("cargo-console-menu-points-amount", ("amount", amount.ToString()));
BalanceLabel.Text = Loc.GetString("bank-atm-menu-cash-amount", ("amount", amount.ToString()));
}

public void SetDeposit(int amount)
{
DepositButton.Disabled = amount <= 0;
DepositLabel.Text = Loc.GetString("cargo-console-menu-points-amount", ("amount", amount.ToString()));
if (amount >= 0) // Valid
DepositLabel.Text = Loc.GetString("bank-atm-menu-cash-amount", ("amount", amount.ToString()));
else
DepositLabel.Text = Loc.GetString("bank-atm-menu-cash-error");
}

public void SetEnabled(bool enabled)
Expand Down
12 changes: 10 additions & 2 deletions Content.Client/Bank/UI/StationBankATMMenu.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* New Frontiers - This file is licensed under AGPLv3
* Copyright (c) 2024 New Frontiers Contributors
* See AGPLv3.txt for details.
*/
using Content.Client.UserInterface.Controls;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
Expand Down Expand Up @@ -36,13 +41,16 @@ private void OnReasonSelected(OptionButton.ItemSelectedEventArgs args)
}
public void SetBalance(int amount)
{
BalanceLabel.Text = Loc.GetString("cargo-console-menu-points-amount", ("amount", amount.ToString()));
BalanceLabel.Text = Loc.GetString("bank-atm-menu-cash-amount", ("amount", amount.ToString()));
}

public void SetDeposit(int amount)
{
DepositButton.Disabled = amount <= 0;
DepositLabel.Text = Loc.GetString("cargo-console-menu-points-amount", ("amount", amount.ToString()));
if (amount >= 0) // Valid
DepositLabel.Text = Loc.GetString("bank-atm-menu-cash-amount", ("amount", amount.ToString()));
else
DepositLabel.Text = Loc.GetString("bank-atm-menu-cash-error");
}

public void SetEnabled(bool enabled)
Expand Down
7 changes: 6 additions & 1 deletion Content.Client/Bank/UI/WithdrawBankATMMenu.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* New Frontiers - This file is licensed under AGPLv3
* Copyright (c) 2024 New Frontiers Contributors
* See AGPLv3.txt for details.
*/
using Content.Client.UserInterface.Controls;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
Expand All @@ -21,7 +26,7 @@ public WithdrawBankATMMenu()

public void SetBalance(int amount)
{
BalanceLabel.Text = Loc.GetString("cargo-console-menu-points-amount", ("amount", amount.ToString()));
BalanceLabel.Text = Loc.GetString("bank-atm-menu-cash-amount", ("amount", amount.ToString()));
}

public void SetEnabled(bool enabled)
Expand Down
11 changes: 11 additions & 0 deletions Content.Client/Shuttles/UI/NavScreen.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,16 @@
<controls:Label Text="{controls:Loc 'shuttle-console-iff-search'}"></controls:Label>
<controls:LineEdit Name="IffSearchCriteria" Access="Public" HorizontalExpand="True"></controls:LineEdit>
</controls:BoxContainer>

<!-- Frontier - Maximum IFF Distance -->
<controls:BoxContainer Orientation="Vertical" HorizontalExpand="True" Name="MaximumIFFDistanceBox">
<controls:Label Text="{controls:Loc 'shuttle-console-maximum-iff-distance'}"/>
<controls:SliderIntInput Name="MaximumIFFDistanceValue"
Access="Public"
MinValue="0"
MaxValue="3000"
Value="3000"
HorizontalExpand="True"/>
</controls:BoxContainer>
</controls:BoxContainer>
</controls:BoxContainer>
10 changes: 10 additions & 0 deletions Content.Client/Shuttles/UI/NavScreen.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public NavScreen()

// Frontier - IFF search
IffSearchCriteria.OnTextChanged += args => OnIffSearchChanged(args.Text);

// Frontier - Maximum IFF Distance
MaximumIFFDistanceValue.GetChild(0).GetChild(1).Margin = new Thickness(8,0,0,0);
MaximumIFFDistanceValue.OnValueChanged += args => OnRangeFilterChanged(args);
}

// Frontier - IFF search
Expand All @@ -51,6 +55,12 @@ private void OnIffSearchChanged(string text)
};
}

// Frontier - Maximum IFF Distance
private void OnRangeFilterChanged(int value)
{
NavRadar.MaximumIFFDistance = (float) value;
}

public void SetShuttle(EntityUid? shuttle)
{
_shuttleEntity = shuttle;
Expand Down
16 changes: 16 additions & 0 deletions Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public sealed partial class ShuttleNavControl : BaseShuttleControl
public bool ShowIFFShuttles { get; set; } = true;
public bool ShowDocks { get; set; } = true;

public float MaximumIFFDistance { get; set; } = -1f; // Frontier

/// <summary>
/// If present, called for every IFF. Must determine if it should or should not be shown.
/// </summary>
Expand Down Expand Up @@ -224,6 +226,20 @@ protected override void Draw(DrawingHandleScreen handle)
shouldDrawIFF &= ShowIFFShuttles;
}

// New Frontiers - Maximum IFF Distance - checks distance to object, draws if closer than max range
// This code is licensed under AGPLv3. See AGPLv3.txt
if (shouldDrawIFF && MaximumIFFDistance >= 0.0f)
{
var gridCentre = Vector2.Transform(gridBody.LocalCenter, matty);
var distance = gridCentre.Length();

if (distance > MaximumIFFDistance)
{
shouldDrawIFF = false;
}
}
// End of modified code

if (shouldDrawIFF)
{
var gridCentre = Vector2.Transform(gridBody.LocalCenter, matty);
Expand Down
5 changes: 2 additions & 3 deletions Content.Client/VendingMachines/UI/VendingMachineMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Content.Client.UserInterface.Controls;
using Content.Shared.VendingMachines;
using Content.Shared.Cargo.Components;
using Content.Shared._NF.Cargo.Components;
using Content.Shared.Stacks;
using Robust.Client.AutoGenerated;
using Robust.Client.GameObjects;
Expand Down Expand Up @@ -150,9 +149,9 @@ public void Populate(List<VendingMachineInventoryEntry> inventory, float priceMo
}

// This block exists to allow the VendPrice flag to set a vending machine item price.
if (prototype != null && prototype.TryGetComponent<VendPriceComponent>(out var vendPriceComponent) && vendPriceComponent.Price != 0 && cost <= (float) vendPriceComponent.Price)
if (prototype != null && prototype.TryGetComponent<StaticPriceComponent>(out var vendPriceComponent) && vendPriceComponent.VendPrice != 0 && cost <= (float) vendPriceComponent.VendPrice)
{
var price = (float) vendPriceComponent.Price;
var price = (float) vendPriceComponent.VendPrice;
cost = (int) price;
}
// This block exists to allow the VendPrice flag to set a vending machine item price.
Expand Down
7 changes: 3 additions & 4 deletions Content.Server/Cargo/Systems/PricingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Content.Shared.Administration;
using Content.Shared.Body.Components;
using Content.Shared.Cargo.Components;
using Content.Shared._NF.Cargo.Components;
using Content.Shared.Chemistry.Components.SolutionManager;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Materials;
Expand Down Expand Up @@ -385,10 +384,10 @@ private double GetVendPrice(EntityPrototype prototype)
{
var price = 0.0;

if (prototype.Components.TryGetValue(_factory.GetComponentName(typeof(VendPriceComponent)), out var vendProto))
if (prototype.Components.TryGetValue(_factory.GetComponentName(typeof(StaticPriceComponent)), out var vendProto))
{
var vendPrice = (VendPriceComponent) vendProto.Component;
price += vendPrice.Price;
var vendPrice = (StaticPriceComponent) vendProto.Component;
price += vendPrice.VendPrice;
}

return price;
Expand Down
3 changes: 3 additions & 0 deletions Content.Server/Forensics/Components/FiberComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ public sealed partial class FiberComponent : Component

[DataField]
public string? FiberColor;

[DataField]
public string? Fiberprint; // DeltaV, unique glove fibers
}
}
21 changes: 18 additions & 3 deletions Content.Server/Forensics/Systems/ForensicsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public sealed class ForensicsSystem : EntitySystem
public override void Initialize()
{
SubscribeLocalEvent<FingerprintComponent, ContactInteractionEvent>(OnInteract);
SubscribeLocalEvent<FiberComponent, MapInitEvent>(OnFiberInit); // DeltaV #1455 - unique glove fibers
SubscribeLocalEvent<FingerprintComponent, MapInitEvent>(OnFingerprintInit);
SubscribeLocalEvent<DnaComponent, MapInitEvent>(OnDNAInit);

Expand All @@ -44,6 +45,13 @@ private void OnInteract(EntityUid uid, FingerprintComponent component, ContactIn
ApplyEvidence(uid, args.Other);
}

// DeltaV #1455 - unique glove fibers
private void OnFiberInit(EntityUid uid, FiberComponent component, MapInitEvent args)
{
component.Fiberprint = GenerateFingerprint(length: 7);
}
// End of DeltaV code

private void OnFingerprintInit(EntityUid uid, FingerprintComponent component, MapInitEvent args)
{
component.Fingerprint = GenerateFingerprint();
Expand Down Expand Up @@ -203,9 +211,9 @@ private void OnCleanForensicsDoAfter(EntityUid uid, ForensicsComponent component
targetComp.Residues.Add(string.IsNullOrEmpty(residue.ResidueColor) ? Loc.GetString("forensic-residue", ("adjective", residue.ResidueAdjective)) : Loc.GetString("forensic-residue-colored", ("color", residue.ResidueColor), ("adjective", residue.ResidueAdjective)));
}

public string GenerateFingerprint()
public string GenerateFingerprint(int length = 16) // DeltaV #1455 - allow changing the length of the fingerprint hash
{
var fingerprint = new byte[16];
var fingerprint = new byte[length]; // DeltaV #1455 - allow changing the length of the fingerprint hash
_random.NextBytes(fingerprint);
return Convert.ToHexString(fingerprint);
}
Expand All @@ -231,8 +239,15 @@ private void ApplyEvidence(EntityUid user, EntityUid target)
var component = EnsureComp<ForensicsComponent>(target);
if (_inventory.TryGetSlotEntity(user, "gloves", out var gloves))
{
// DeltaV #1455 - unique glove fibers
if (TryComp<FiberComponent>(gloves, out var fiber) && !string.IsNullOrEmpty(fiber.FiberMaterial))
component.Fibers.Add(string.IsNullOrEmpty(fiber.FiberColor) ? Loc.GetString("forensic-fibers", ("material", fiber.FiberMaterial)) : Loc.GetString("forensic-fibers-colored", ("color", fiber.FiberColor), ("material", fiber.FiberMaterial)));
{
var fiberLocale = string.IsNullOrEmpty(fiber.FiberColor)
? Loc.GetString("forensic-fibers", ("material", fiber.FiberMaterial))
: Loc.GetString("forensic-fibers-colored", ("color", fiber.FiberColor), ("material", fiber.FiberMaterial));
component.Fibers.Add(fiberLocale + " ; " + fiber.Fiberprint);
}
// End of DeltaV code

if (HasComp<FingerprintMaskComponent>(gloves))
return;
Expand Down
2 changes: 2 additions & 0 deletions Content.Server/Nutrition/EntitySystems/FoodSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ private void OnDoAfter(Entity<FoodComponent> entity, ref ConsumeDoAfterEvent arg

args.Repeat = !forceFeed;

_solutionContainer.SetCapacity(soln.Value, soln.Value.Comp.Solution.MaxVolume - transferAmount); // Frontier: remove food capacity after taking a bite.

if (TryComp<StackComponent>(entity, out var stack))
{
//Not deleting whole stack piece will make troubles with grinding object
Expand Down
2 changes: 2 additions & 0 deletions Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ private bool TrySliceFood(EntityUid uid, EntityUid user, EntityUid usedItem,

var lostSolution = _solutionContainerSystem.SplitSolution(soln.Value, solution.Volume / FixedPoint2.New(component.Count));

_solutionContainerSystem.SetCapacity(soln.Value, soln.Value.Comp.Solution.MaxVolume - solution.MaxVolume / FixedPoint2.New(component.Count)); // Frontier: remove food capacity after taking a slice.

// Fill new slice
FillSlice(sliceUid, lostSolution);

Expand Down
7 changes: 4 additions & 3 deletions Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
using Content.Shared.Damage.Events;
using Content.Shared.Weapons.Melee.Events;
using Content.Shared.Weapons.Ranged.Components;
using Robust.Shared.Containers;
using Content.Shared.Weapons.Ranged.Systems;
using Content.Shared.Wieldable.Components;
using Robust.Shared.Containers;

namespace Content.Server.Abilities.Oni
{
Expand Down Expand Up @@ -32,8 +33,8 @@ private void OnEntInserted(EntityUid uid, OniComponent component, EntInsertedInt

if (TryComp<GunComponent>(args.Entity, out var gun))
{
// Frontier: adjust penalty for wielded malus
if (TryComp<GunWieldBonusComponent>(args.Entity, out var bonus))
// Frontier: adjust penalty for wielded malus (ensuring it's actually wieldable)
if (TryComp<GunWieldBonusComponent>(args.Entity, out var bonus) && HasComp<WieldableComponent>(args.Entity))
{
//GunWieldBonus values are stored as negative.
heldComp.minAngleAdded = (gun.MinAngle + bonus.MinAngle) * GunInaccuracyFactor;
Expand Down
Loading
Loading