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

Up16112024 #83

Merged
merged 46 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4ff39d4
Update Changelogs (#2382)
dvir001 Nov 9, 2024
b6a22d1
Automatic Changelog (#2382)
FrontierATC Nov 9, 2024
8454df4
Pirate bounty fixes (#2378)
whatston3 Nov 9, 2024
182fdfe
Automatic Changelog (#2378)
FrontierATC Nov 9, 2024
0d82a55
Auto rename warp points (#2383)
dvir001 Nov 9, 2024
5d53df2
More recyclable items (#2179)
ErhardSteinhauer Nov 10, 2024
bf1b214
Automatic Changelog (#2179)
FrontierATC Nov 10, 2024
daf83b2
of biogenerator and biofabricator (#2304)
ErhardSteinhauer Nov 10, 2024
28f57d4
Automatic Changelog (#2304)
FrontierATC Nov 10, 2024
ebc2a13
Stashes (#2347)
ErhardSteinhauer Nov 10, 2024
d97e2bb
Automatic Changelog (#2347)
FrontierATC Nov 10, 2024
8612ea8
Condenser Power Adjustment (#2364)
dustylens Nov 10, 2024
3121a44
Automatic Changelog (#2364)
FrontierATC Nov 10, 2024
9e282a4
Add ingot to the list of valid materials to insert in the cutter mach…
KieueCaprie Nov 10, 2024
9089839
Automatic Changelog (#2387)
FrontierATC Nov 10, 2024
02fda0f
Mass Scanner and Radar Telescreens (#2351)
Tych0theSynth Nov 11, 2024
2502761
Automatic Changelog (#2351)
FrontierATC Nov 11, 2024
1ed268b
Fix roundstart janitor access, no maid smite (#2392)
whatston3 Nov 11, 2024
affb937
Automatic Changelog (#2392)
FrontierATC Nov 11, 2024
860fdd8
Add xeno spawn markers (#2390)
ErhardSteinhauer Nov 11, 2024
5b9085c
Pills give no extra materials (#2396)
whatston3 Nov 12, 2024
ee855a8
Automatic Changelog (#2396)
FrontierATC Nov 12, 2024
b55ea2a
Arbitrage fixups (#2391)
dvir001 Nov 12, 2024
25e1bd6
Automatic Changelog (#2391)
FrontierATC Nov 12, 2024
859354f
Abstract the textile crate (#2397)
GreaseMonk Nov 12, 2024
9c8b175
Automatic Changelog (#2397)
FrontierATC Nov 12, 2024
7077bc7
Nerf (#2401)
dvir001 Nov 14, 2024
84c5c4d
Automatic Changelog (#2401)
FrontierATC Nov 14, 2024
f250524
remove glaive from salvage weapons rack (#2405)
MisterMecky Nov 15, 2024
17f5db1
Automatic Changelog (#2405)
FrontierATC Nov 15, 2024
f83cee9
Update bison.yml (#2399)
dustylens Nov 15, 2024
4e8937a
Automatic Changelog (#2399)
FrontierATC Nov 15, 2024
b4c69e6
Felinid code cleanup (#2389)
dvir001 Nov 15, 2024
0ddfc29
Restore explosive crossbow bolts, add shrapnel bolt (#2317)
ErhardSteinhauer Nov 15, 2024
7de861e
Automatic Changelog (#2317)
FrontierATC Nov 15, 2024
43018ca
Update Smuggling.xml (#2407)
dvir001 Nov 15, 2024
58904b5
Raise DroppedEvent on items in pockets/suit storage. (#2400)
whatston3 Nov 15, 2024
ffd4966
DeltaV Anti EORG Code & Species vision cvar edit (#2327)
dvir001 Nov 15, 2024
8bf9c2d
Automatic Changelog (#2327)
FrontierATC Nov 15, 2024
0338e6e
Bluespace Event NFZ announcements (#2302)
blackknight954 Nov 15, 2024
e48c526
Frontier Weapon Mags Visual Fix (#2409)
ErhardSteinhauer Nov 15, 2024
85898c5
Automatic Changelog (#2409)
FrontierATC Nov 15, 2024
8cdd529
General Bug fixing (#2410)
dvir001 Nov 15, 2024
a2df4fc
Clean AI comps on death (#2394)
dvir001 Nov 15, 2024
a1c1dbd
Automatic Changelog (#2394)
FrontierATC Nov 15, 2024
e83ebf3
upstream 16/11/2024
Sh1ntra Nov 15, 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
  •  
  •  
  •  
28 changes: 28 additions & 0 deletions Content.Client/DeltaV/RoundEnd/NoEorgPopup.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc 'no-eorg-popup-title'}"
MinSize="520 423"
MaxSize="520 423"> <!-- Frontier: height: 450<423 -->
<BoxContainer Orientation="Vertical" Margin="15"> <!-- Frontier: margin: 20<15 -->
<Label Name="TitleLabel"
StyleClasses="LabelBig"
HorizontalAlignment="Center"
Margin="0 5 0 5" />
<PanelContainer StyleClasses="BackgroundDark" Margin="0"> <!-- Frontier: no margin -->
<BoxContainer Orientation="Vertical" Margin="10">
<RichTextLabel Name="MessageLabel" HorizontalAlignment="Center" Margin="0 5 0 10"/> <!-- Frontier: added margins, removed blank Control -->
<RichTextLabel Name="RuleLabel" HorizontalAlignment="Center" Margin="0 5 0 10"/> <!-- Frontier: added margins -->
<RichTextLabel Name="RuleTextLabel" HorizontalAlignment="Center" Margin="0 5 0 0" /> <!-- Frontier: added margins -->
</BoxContainer>
</PanelContainer>
<BoxContainer Orientation="Vertical" VerticalAlignment="Bottom" Margin="0 5 0 0"> <!-- Frontier: top margin 10<5 -->
<CheckBox Name="SkipCheckBox"
Text="{Loc 'no-eorg-popup-skip-checkbox'}"
HorizontalAlignment="Center"
Margin="0 0 0 15" /> <!-- Frontier: bottom margin 10<15 -->
<Button Name="NoEorgCloseButton"
HorizontalAlignment="Center"
MinWidth="150" />
</BoxContainer>
</BoxContainer>
</controls:FancyWindow>
91 changes: 91 additions & 0 deletions Content.Client/DeltaV/RoundEnd/NoEorgPopup.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
using Content.Client.UserInterface.Controls;
using Content.Shared.DeltaV.CCVars;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Configuration;
using Robust.Shared.Timing;
using Robust.Shared.Utility;

namespace Content.Client.DeltaV.RoundEnd;

[GenerateTypedNameReferences]
public sealed partial class NoEorgPopup : FancyWindow
{
[Dependency] private readonly IConfigurationManager _cfg = default!;

private float _remainingTime;
private bool _initialSkipState;

public NoEorgPopup()
{
IoCManager.InjectDependencies(this);
RobustXamlLoader.Load(this);

InitializeUI();
InitializeEvents();
ResetTimer();
}

private void InitializeUI()
{
TitleLabel.Text = Loc.GetString("no-eorg-popup-label");
MessageLabel.SetMessage(FormattedMessage.FromMarkupOrThrow(Loc.GetString("no-eorg-popup-message")));
RuleLabel.SetMessage(FormattedMessage.FromMarkupOrThrow(Loc.GetString("no-eorg-popup-rule")));
RuleTextLabel.SetMessage(FormattedMessage.FromMarkupOrThrow(Loc.GetString("no-eorg-popup-rule-text")));

_initialSkipState =
_cfg.GetCVar(DCCVars.SkipRoundEndNoEorgPopup); // Store the initial CVar value to compare against
SkipCheckBox.Pressed = _initialSkipState;
NoEorgCloseButton.Disabled = true;

UpdateCloseButtonText();
}

private void InitializeEvents()
{
OnClose += SaveSkipState; // Only change the CVar once the close button is pressed
NoEorgCloseButton.OnPressed += OnClosePressed;
}

private void ResetTimer()
{
_remainingTime = _cfg.GetCVar(DCCVars.RoundEndNoEorgPopupTime); // Set how long to show the popup for
UpdateCloseButtonText();
}

private void SaveSkipState()
{
if (SkipCheckBox.Pressed == _initialSkipState)
return;

_cfg.SetCVar(DCCVars.SkipRoundEndNoEorgPopup, SkipCheckBox.Pressed);
_cfg.SaveToFile();
}

private void OnClosePressed(BaseButton.ButtonEventArgs args)
{
Close();
}

private void UpdateCloseButtonText()
{
var isWaiting = _remainingTime > 0f;
NoEorgCloseButton.Text = isWaiting
? Loc.GetString("no-eorg-popup-close-button-wait", ("time", (int)MathF.Ceiling(_remainingTime)))
: Loc.GetString("no-eorg-popup-close-button");
NoEorgCloseButton.Disabled = isWaiting;
}

protected override void FrameUpdate(FrameEventArgs args)
{
base.FrameUpdate(args);

if (!NoEorgCloseButton.Disabled)
return;

_remainingTime = MathF.Max(0f, _remainingTime - args.DeltaSeconds);
UpdateCloseButtonText();
}
}

36 changes: 36 additions & 0 deletions Content.Client/DeltaV/RoundEnd/NoEorgPopupSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using Content.Shared.GameTicking;
using Content.Shared.DeltaV.CCVars;
using Robust.Shared.Configuration;

namespace Content.Client.DeltaV.RoundEnd;

public sealed class NoEorgPopupSystem : EntitySystem
{
[Dependency] private readonly IConfigurationManager _cfg = default!;

private NoEorgPopup? _window;

public override void Initialize()
{
base.Initialize();
SubscribeNetworkEvent<RoundEndMessageEvent>(OnRoundEnd);
}

private void OnRoundEnd(RoundEndMessageEvent ev)
{
if (_cfg.GetCVar(DCCVars.SkipRoundEndNoEorgPopup) || _cfg.GetCVar(DCCVars.RoundEndNoEorgPopup) == false)
return;

OpenNoEorgPopup();
}

private void OpenNoEorgPopup()
{
if (_window != null)
return;

_window = new NoEorgPopup();
_window.OpenCentered();
_window.OnClose += () => _window = null;
}
}
5 changes: 0 additions & 5 deletions Content.IntegrationTests/Tests/MachineBoardTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ await server.WaitAssertion(() =>
continue;
var cId = cbc.Prototype;

// Frontier: we accept null as board prototypes, but this will fail the assertions.
if (cId == "Null")
continue;
// End Frontier

Assert.Multiple(() =>
{
Assert.That(cId, Is.Not.Null, $"Computer board \"{p.ID}\" does not have a corresponding computer.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,8 @@ private void AddSmiteVerbs(GetVerbsEvent<Verb> args)
};
args.Verbs.Add(cluwne);

// Frontier: remove maid smite due to weird ID perms
/*
Verb maiden = new()
{
Text = "admin-smite-remove-gravity-name",
Expand All @@ -581,6 +583,7 @@ private void AddSmiteVerbs(GetVerbsEvent<Verb> args)
Message = Loc.GetString("admin-smite-maid-description")
};
args.Verbs.Add(maiden);
*/
}

Verb angerPointingArrows = new()
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Administration/Systems/BwoinkSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ public async void DiscordAhelpSendMessage(BwoinkTextMessage message, EntitySessi

var nonAfkAdmins = GetNonAfkAdmins();
var messageParams = new AHelpMessageParams(
senderSession.Name,
adminNickname,
str,
!personalChannel,
_gameTicker.RoundDuration().ToString("hh\\:mm\\:ss"),
Expand Down
6 changes: 4 additions & 2 deletions Content.Server/Cloning/CloningSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,22 @@ private void OnComponentInit(EntityUid uid, CloningPodComponent clonePod, Compon
_signalSystem.EnsureSinkPorts(uid, CloningPodComponent.PodPort);
}

// Frontier: machine parts upgrades
private void OnPartsRefreshed(EntityUid uid, CloningPodComponent component, RefreshPartsEvent args)
{
var materialRating = args.PartRatings[component.MachinePartMaterialUse];
var speedRating = args.PartRatings[component.MachinePartCloningSpeed];

component.BiomassRequirementMultiplier = MathF.Pow(component.PartRatingMaterialMultiplier, materialRating - 1);
component.BiomassRequirementMultiplier = component.BaseBiomassRequirementMultiplier * MathF.Pow(component.PartRatingMaterialMultiplier, materialRating - 1);
component.CloningTime = component.BaseCloningTime * MathF.Pow(component.PartRatingSpeedMultiplier, speedRating - 1);
}

private void OnUpgradeExamine(EntityUid uid, CloningPodComponent component, UpgradeExamineEvent args)
{
args.AddPercentageUpgrade("cloning-pod-component-upgrade-speed", component.BaseCloningTime / component.CloningTime);
args.AddPercentageUpgrade("cloning-pod-component-upgrade-biomass-requirement", component.BiomassRequirementMultiplier);
args.AddPercentageUpgrade("cloning-pod-component-upgrade-biomass-requirement", component.BiomassRequirementMultiplier / component.BaseBiomassRequirementMultiplier);
}
// End Frontier

internal void TransferMindToClone(EntityUid mindId, MindComponent mind)
{
Expand Down
31 changes: 25 additions & 6 deletions Content.Server/Construction/NodeEntities/BoardNodeEntity.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Server.Construction.Components;
using Content.Server._NF.Construction.Components; // Frontier
using Content.Shared.Construction;
using Content.Shared.Construction.Components;
using JetBrains.Annotations;
Expand All @@ -15,6 +15,7 @@ namespace Content.Server.Construction.NodeEntities;
public sealed partial class BoardNodeEntity : IGraphNodeEntity
{
[DataField("container")] public string Container { get; private set; } = string.Empty;
[DataField] public ComputerType Computer { get; private set; } = ComputerType.Default; // Frontier

public string? GetId(EntityUid? uid, EntityUid? userUid, GraphNodeEntityArgs args)
{
Expand All @@ -29,13 +30,22 @@ public sealed partial class BoardNodeEntity : IGraphNodeEntity

var board = container.ContainedEntities[0];

// Frontier - adds tabletop variants
if (args.EntityManager.TryGetComponent(container.Owner, out ConstructionComponent? constructionComponent)
&& constructionComponent.Graph == "ComputerTabletop"
&& args.EntityManager.TryGetComponent(board, out ComputerTabletopBoardComponent? tabletopComputer))
// Frontier - alternative computer variants
switch (Computer)
{
return tabletopComputer.Prototype;
case ComputerType.Tabletop:
if (args.EntityManager.TryGetComponent(board, out ComputerTabletopBoardComponent? tabletopComputer))
return tabletopComputer.Prototype;
break;
case ComputerType.Wallmount:
if (args.EntityManager.TryGetComponent(board, out ComputerWallmountBoardComponent? wallmountComputer))
return wallmountComputer.Prototype;
break;
case ComputerType.Default:
default:
break;
}
// End Frontier

// There should not be a case where both of these components exist on the same entity...
if (args.EntityManager.TryGetComponent(board, out MachineBoardComponent? machine))
Expand All @@ -46,4 +56,13 @@ public sealed partial class BoardNodeEntity : IGraphNodeEntity

return null;
}

// Frontier: support for multiple computer types
public enum ComputerType : byte
{
Default, // Default machines
Tabletop,
Wallmount
}
// End Frontier
}
61 changes: 61 additions & 0 deletions Content.Server/DeltaV/RoundEnd/RoundEndSystem.Pacified.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using Content.Server.Explosion.Components;
using Content.Server.GameTicking;
using Content.Shared.CombatMode;
using Content.Shared.CombatMode.Pacification;
using Content.Shared.DeltaV.CCVars;
using Content.Shared.Explosion.Components;
using Content.Shared.Flash.Components;
using Content.Shared.Store.Components;
using Robust.Shared.Configuration;

namespace Content.Server.DeltaV.RoundEnd;

public sealed class PacifiedRoundEnd : EntitySystem
{
[Dependency] private readonly IConfigurationManager _configurationManager = default!;

private bool _enabled;

public override void Initialize()
{
base.Initialize();
_configurationManager.OnValueChanged(DCCVars.RoundEndPacifist, v => _enabled = v, true);
SubscribeLocalEvent<RoundEndTextAppendEvent>(OnRoundEnded);
}

private void OnRoundEnded(RoundEndTextAppendEvent ev)
{
if (!_enabled)
return;

var harmQuery = EntityQueryEnumerator<CombatModeComponent>();
while (harmQuery.MoveNext(out var uid, out _))
{
EnsureComp<PacifiedComponent>(uid);
}

var explosiveQuery = EntityQueryEnumerator<ExplosiveComponent>();
while (explosiveQuery.MoveNext(out var uid, out _))
{
RemComp<ExplosiveComponent>(uid);
}

var grenadeQuery = EntityQueryEnumerator<OnUseTimerTriggerComponent>();
while (grenadeQuery.MoveNext(out var uid, out _))
{
RemComp<OnUseTimerTriggerComponent>(uid);
}

var flashQuery = EntityQueryEnumerator<FlashComponent>();
while (flashQuery.MoveNext(out var uid, out _))
{
RemComp<FlashComponent>(uid);
}

var uplinkQuery = EntityQueryEnumerator<StoreComponent>();
while (uplinkQuery.MoveNext(out var uid, out _))
{
RemComp<StoreComponent>(uid);
}
}
}
24 changes: 20 additions & 4 deletions Content.Server/EntityEffects/Effects/PlantMutateGases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,28 @@ public override void Effect(EntityEffectBaseArgs args)
if (plantholder.Seed == null)
return;

// Frontier: List of gasses
Gas[] gasList =
{
Gas.Oxygen,
Gas.Nitrogen,
Gas.CarbonDioxide,
Gas.NitrousOxide,
Gas.Ammonia,
Gas.Plasma,
Gas.WaterVapor,
//Gas.Tritium,
//Gas.Frezon,
};
// End Frontier: List of gasses

var random = IoCManager.Resolve<IRobustRandom>();
var gasses = plantholder.Seed.ExudeGasses;

// Add a random amount of a random gas to this gas dictionary
float amount = random.NextFloat(MinValue, MaxValue);
Gas gas = random.Pick(Enum.GetValues(typeof(Gas)).Cast<Gas>().ToList());
//Gas gas = random.Pick(Enum.GetValues(typeof(Gas)).Cast<Gas>().ToList()); // Frontier
Gas gas = random.Pick(gasList); // Frontier
if (gasses.ContainsKey(gas))
{
gasses[gas] += amount;
Expand Down Expand Up @@ -65,7 +81,7 @@ public override void Effect(EntityEffectBaseArgs args)
return;

// Frontier: List of gasses
Gas[] GassesList =
Gas[] gasList =
{
Gas.Oxygen,
Gas.Nitrogen,
Expand All @@ -77,15 +93,15 @@ public override void Effect(EntityEffectBaseArgs args)
//Gas.Tritium,
//Gas.Frezon,
};
// Frontier: List of gasses
// End Frontier: List of gasses

var random = IoCManager.Resolve<IRobustRandom>();
var gasses = plantholder.Seed.ConsumeGasses;

// Add a random amount of a random gas to this gas dictionary
float amount = random.NextFloat(MinValue, MaxValue);
//Gas gas = random.Pick(Enum.GetValues(typeof(Gas)).Cast<Gas>().ToList()); // Frontier
Gas gas = random.Pick(GassesList); // Frontier
Gas gas = random.Pick(gasList); // Frontier
if (gasses.ContainsKey(gas))
{
gasses[gas] += amount;
Expand Down
Loading
Loading