Skip to content

Commit

Permalink
Merge branch 'chinese,-guns-and-the-fun-police' of https://github.com…
Browse files Browse the repository at this point in the history
…/PatoGrone/nuclear-14 into chinese,-guns-and-the-fun-police
  • Loading branch information
PatoGrone committed Dec 9, 2024
2 parents f7f5f76 + 36d0699 commit aab9394
Show file tree
Hide file tree
Showing 730 changed files with 256,061 additions and 176,630 deletions.
9 changes: 1 addition & 8 deletions Content.Server/Body/Systems/MetabolizerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,8 @@ public override void Update(float frameTime)
{
base.Update(frameTime);

var metabolizers = new ValueList<(EntityUid Uid, MetabolizerComponent Component)>(Count<MetabolizerComponent>());
var query = EntityQueryEnumerator<MetabolizerComponent>();

while (query.MoveNext(out var uid, out var comp))
{
metabolizers.Add((uid, comp));
}

foreach (var (uid, metab) in metabolizers)
while (query.MoveNext(out var uid, out var metab))
{
// Only update as frequently as it should
if (_gameTiming.CurTime < metab.NextUpdate)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ namespace Content.Server.Cargo.Components;
[Access(typeof(CargoSystem))]
public sealed partial class CargoPalletConsoleComponent : Component
{
[ViewVariables(VVAccess.ReadWrite), DataField("cashType", customTypeSerializer:typeof(PrototypeIdSerializer<StackPrototype>))]
public string CashType = "Credit";
[ViewVariables(VVAccess.ReadWrite), DataField("cashType", customTypeSerializer: typeof(PrototypeIdSerializer<StackPrototype>))]
public string CashType = "Caps";
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ namespace Content.Server.Cargo.Components;
public sealed partial class StationBankAccountComponent : Component
{
[ViewVariables(VVAccess.ReadWrite), DataField("balance")]
public int Balance = 2000;
public int Balance = 500;

/// <summary>
/// How much the bank balance goes up per second, every Delay period. Rounded down when multiplied.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("increasePerSecond")]
public int IncreasePerSecond = 1;
public float IncreasePerSecond = 0.05f;
}
4 changes: 2 additions & 2 deletions Content.Server/Cargo/Systems/CargoSystem.Orders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public sealed partial class CargoSystem
/// <summary>
/// How much time to wait (in seconds) before increasing bank accounts balance.
/// </summary>
private const int Delay = 10;
private const int Delay = 200;

/// <summary>
/// Keeps track of how much time has elapsed since last balance increase.
Expand Down Expand Up @@ -84,7 +84,7 @@ private void UpdateConsole(float frameTime)

foreach (var account in EntityQuery<StationBankAccountComponent>())
{
account.Balance += account.IncreasePerSecond * Delay;
account.Balance += (int) (account.IncreasePerSecond * Delay);
}

var query = EntityQueryEnumerator<CargoOrderConsoleComponent>();
Expand Down
19 changes: 11 additions & 8 deletions Content.Server/Fluids/EntitySystems/DrainSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public sealed class DrainSystem : SharedDrainSystem
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;

private float DrainRunPeriod = 1f; // 1 second to make multiplying by DrainFrequency correct
private float Accumulator;

public override void Initialize()
{
base.Initialize();
Expand Down Expand Up @@ -108,7 +111,14 @@ private void Empty(EntityUid container, SpillableComponent spillable, EntityUid

public override void Update(float frameTime)
{
base.Update(frameTime);
Accumulator += frameTime;
if (Accumulator < DrainRunPeriod)
{
return;
}
Accumulator -= DrainRunPeriod;

base.Update(DrainRunPeriod);
var managerQuery = GetEntityQuery<SolutionContainerManagerComponent>();
var xformQuery = GetEntityQuery<TransformComponent>();
var puddleQuery = GetEntityQuery<PuddleComponent>();
Expand All @@ -117,13 +127,6 @@ public override void Update(float frameTime)
var query = EntityQueryEnumerator<DrainComponent>();
while (query.MoveNext(out var uid, out var drain))
{
drain.Accumulator += frameTime;
if (drain.Accumulator < drain.DrainFrequency)
{
continue;
}
drain.Accumulator -= drain.DrainFrequency;

// Disable ambient sound from emptying manually
if (!drain.AutoDrain)
{
Expand Down
4 changes: 4 additions & 0 deletions Content.Server/Radio/Components/RadioSpeakerComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ public sealed partial class RadioSpeakerComponent : Component

[DataField("enabled")]
public bool Enabled;

[DataField("IsSpeaker")] // Set to true for broadcast radio speakers so that it speaks instead of whispers the message.
public bool IsSpeaker;

}
4 changes: 3 additions & 1 deletion Content.Server/Radio/EntitySystems/RadioDeviceSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ private void OnReceiveRadio(EntityUid uid, RadioSpeakerComponent component, ref

// log to chat so people can identity the speaker/source, but avoid clogging ghost chat if there are many radios
var message = args.OriginalChatMsg.Message; // The chat system will handle the rest and re-obfuscate if needed.
_chat.TrySendInGameICMessage(uid, message, InGameICChatType.Whisper, ChatTransmitRange.GhostRangeLimit, nameOverride: name, checkRadioPrefix: false, languageOverride: args.Language);
var chatType = component.IsSpeaker ? InGameICChatType.Speak : InGameICChatType.Whisper;
_chat.TrySendInGameICMessage(uid, message, chatType, ChatTransmitRange.GhostRangeLimit, nameOverride: name, checkRadioPrefix: false, languageOverride: args.Language);

}

private void OnBeforeIntercomUiOpen(EntityUid uid, IntercomComponent component, BeforeActivatableUIOpenEvent args)
Expand Down
4 changes: 2 additions & 2 deletions Content.Shared/CCVar/CCVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ public static readonly CVarDef<bool>
/// Config for when the restart vote should be allowed to be called based on percentage of ghosts.
///
public static readonly CVarDef<int> VoteRestartGhostPercentage =
CVarDef.Create("vote.restart_ghost_percentage", 50, CVar.SERVERONLY);
CVarDef.Create("vote.restart_ghost_percentage", 20, CVar.SERVERONLY);

/// <summary>
/// See vote.enabled, but specific to preset votes
Expand All @@ -1417,7 +1417,7 @@ public static readonly CVarDef<bool>
/// The required ratio of the server that must agree for a restart round vote to go through.
/// </summary>
public static readonly CVarDef<float> VoteRestartRequiredRatio =
CVarDef.Create("vote.restart_required_ratio", 0.85f, CVar.SERVERONLY);
CVarDef.Create("vote.restart_required_ratio", 0.75f, CVar.SERVERONLY);

/// <summary>
/// Whether or not to prevent the restart vote from having any effect when there is an online admin
Expand Down
11 changes: 7 additions & 4 deletions Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,13 @@ protected void SetCartridgeSpent(EntityUid uid, CartridgeAmmoComponent cartridge

cartridge.Spent = spent;
Appearance.SetData(uid, AmmoVisuals.Spent, spent);

// Reduce entity spam from cartridges for N14.
if (spent)
{
var despawn = EnsureComp<TimedDespawnComponent>(uid);
despawn.Lifetime = 15f * 60; // 15 minutes
}
}

/// <summary>
Expand Down Expand Up @@ -458,10 +465,6 @@ protected void EjectCartridge(
{
Audio.PlayPvs(cartridge.EjectSound, entity, AudioParams.Default.WithVariation(SharedContentAudioSystem.DefaultVariation).WithVolume(-1f));
}

// Reduce entity spam from cartridges for N14.
var despawn = EnsureComp<TimedDespawnComponent>(entity);
despawn.Lifetime = 15f * 60; // 15 minutes
}

protected IShootable EnsureShootable(EntityUid uid)
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions Resources/Audio/_Nuclear14/attributions2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- files: ["you_should_upgrade_for_this.ogg"]
license: "CC-BY-NC-SA-3.0"
copyright: "Taken from Bloomberg News broadcast, in turn taken from Todd Howard 'you may need to upgrade your PC for this game' green screen by Green Screen Videos by Murdoink. Not sure how to attribute this.."
source: "https://www.youtube.com/watch?v=dgzlXXCV3NQ , the video"
6 changes: 4 additions & 2 deletions Resources/Credits/Patrons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
- Name: "TheTrueRatKing"
Tier: Nuclear
- Name: "maxxorion"
Tier: Silver
Tier: Nuclear
- Name: "Baron216"
Tier: Silver
- Name: "Gruinspace"
Tier: Gold
Tier: Gold
- Name: "DeadManWalking97" # jado
Tier: Silver
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/_Nuclear14/N14GodHowardAS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
todd-has-risen = Todd has risen!
todd-has-risen-sender = ???
141 changes: 141 additions & 0 deletions Resources/Locale/en-US/_Nuclear14/Tiles/floors.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
tiles-metal-blue = metal blue
tiles-metal-blue-solid = metal blue solid
tiles-metal-green = metal green
tiles-metal-green-solid = metal green solid
tiles-metal-grey = metal grey
tiles-metal-grey-solid = metal grey solid
tiles-metal-grey-dark = metal grey dark
tiles-metal-grey-dark-solid = metal grey dark solid
tiles-metal-purple = metal purple
tiles-metal-purple-solid = metal purple solid
tiles-metal-red = metal red
tiles-metal-red-solid = metal red solid
tiles-metal-teal = metal teal
tiles-metal-teal-solid = metal teal solid
tiles-metal-white = metal white
tiles-metal-white-solid = metal white solid
tiles-metal-yellow = metal yellow
tiles-metal-yellow-solid = metal yellow solid
tiles-metal-freezer = metal freezer
tiles-metal-tunnel = metal tunnel
tiles-metal-tunnel-rusty = rusty metal tunnel
tiles-metal-tunnel-wasteland = metal tunnel wasteland
tiles-ms13-metal-industrial = ms13 metal industrial
tiles-ms13-metal-tile = ms13 metal tile
tiles-ms13-metal-grate = ms13 metal grate
tiles-ms13-metal-solid = ms13 metal solid
tiles-wood-oak = wood oak
tiles-wood-oak-broken = broken wood oak
tiles-wood-house = wood house
tiles-wood-house-broken = broken wood house
tiles-wood-burnt-broken = burnt broken wood
tiles-wood-maple = wood maple
tiles-ms13-wood-common = ms13 wood common
tiles-ms13-wood-common-damaged = damaged ms13 wood common
tiles-ms13-wood-fancy = ms13 wood fancy
tiles-ms13-wood-fancy-damaged = damaged ms13 wood fancy
tiles-ms13-wood-mosaic = ms13 wood mosaic
tiles-ms13-wood-mosaic-damaged = damaged ms13 wood mosaic
tiles-ms13-wood-wide = ms13 wood wide
tiles-ms13-wood-wide-damaged = damaged ms13 wood wide
tiles-carpet-red = carpet red
tiles-ms13-carpet-red = ms13 carpet red
tiles-ms13-carpet-fancy-red = ms13 carpet fancy red
tiles-ms13-carpet-blue = ms13 carpet blue
tiles-ms13-carpet-fancy-blue = ms13 carpet fancy blue
tiles-ms13-carpet-green = ms13 carpet green
tiles-ms13-carpet-fancy-green = ms13 carpet fancy green
tiles-ms13-carpet-violet = ms13 carpet violet
tiles-concrete = concrete
tiles-concrete-tile = concrete tile
tiles-concrete-grey = concrete grey
tiles-concrete-hexacrete = concrete hexacrete
tiles-concrete-hexacrete-dark = dark concrete hexacrete
tiles-concrete-dark = dark concrete
tiles-concrete-road = concrete road
tiles-ms13-brick-concrete = ms13 brick concrete
tiles-ms13-brick-horizontal = ms13 brick horizontal
tiles-ms13-brick-vertical = ms13 brick vertical
tiles-ms13-concrete = ms13 concrete
tiles-ms13-concrete-industrial = ms13 concrete industrial
tiles-ms13-concrete-industrial-alt = ms13 concrete industrial alt
tiles-ms13-concrete-industrial-split = ms13 concrete industrial split
tiles-ms13-tile-concrete-small = ms13 tile concrete small
tiles-ms13-tile-fancy = ms13 tile fancy
tiles-ms13-tile-sierra = ms13 tile sierra
tiles-ms13-tile-sierra-broken = ms13 tile sierra broken
tiles-ms13-tile-black = ms13 tile black
tiles-ms13-tile-black-full = ms13 tile black full
tiles-ms13-tile-black-large = ms13 tile black large
tiles-ms13-tile-long-blue = ms13 tile long blue
tiles-ms13-tile-brown = ms13 tile brown
tiles-ms13-tile-cafe = ms13 tile cafe
tiles-ms13-tile-ceramic = ms13 tile ceramic
tiles-ms13-tile-ceramic-broken = ms13 tile ceramic broken
tiles-ms13-tile-check = ms13 tile check
tiles-ms13-tile-green = ms13 tile green
tiles-ms13-tile-green-full = ms13 tile green full
tiles-ms13-tile-grey = ms13 tile grey
tiles-ms13-tile-grey-large = ms13 tile grey large
tiles-ms13-tile-grey-long = ms13 tile grey long
tiles-ms13-tile-navy = ms13 tile navy
tiles-ms13-tile-navy-full = ms13 tile navy full
tiles-ms13-tile-navy-large = ms13 tile navy large
tiles-ms13-tile-white-large = ms13 tile white large
tiles-ms13-tile-white-full = ms13 tile white full
tiles-ms13-tile-ornate = ms13 tile ornate
tiles-road-inner-middle = road inner middle
tiles-road-outer-middle-path = road outer middle path
tiles-road-corner1 = road corner 1
tiles-road-corner2 = road corner 2
tiles-road-corner3 = road corner 3
tiles-road-corner4 = road corner 4
tiles-road-bottom = road bottom
tiles-road-left = road left
tiles-road-right = road right
tiles-road-top = road top
tiles-road-outer-turn-north = road outer turn north
tiles-road-outer-turn-south = road outer turn south
tiles-road-outer-turn-west = road outer turn west
tiles-road-outer-turn-east = road outer turn east
tiles-road-outer-corner-1 = road outer corner 1
tiles-road-outer-corner-2 = road outer corner 2
tiles-road-outer-corner-3 = road outer corner 3
tiles-road-outer-corner-4 = road outer corner 4
tiles-road-inner-turn-1 = road inner turn 1
tiles-road-inner-turn-2 = road inner turn 2
tiles-road-inner-turn-3 = road inner turn 3
tiles-road-inner-turn-4 = road inner turn 4
tiles-road-tiny-corner-horizontal-1 = road tiny corner horizontal 1
tiles-road-tiny-corner-horizontal-2 = road tiny corner horizontal 2
tiles-road-tiny-corner-horizontal-3 = road tiny corner horizontal 3
tiles-road-tiny-corner-horizontal-4 = road tiny corner horizontal 4
tiles-road-tiny-corner-vertical-1 = road tiny corner vertical 1
tiles-road-tiny-corner-vertical-2 = road tiny corner vertical 2
tiles-road-tiny-corner-vertical-3 = road tiny corner vertical 3
tiles-road-tiny-corner-vertical-4 = road tiny corner vertical 4
tiles-road-inner-middle-with-top = road inner middle with top
tiles-road-outer-turn-south-top = road outer turn south top
tiles-road-outer-turn-west-top = road outer turn west top
tiles-wasteland = wasteland
tiles-dirt = dirt
tiles-dirt-indoors = dirt indoors
tiles-rubble = rubble
tiles-rubble-indoors = rubble indoors
tiles-river-water = river water
tiles-water-deep = water deep
tiles-water-medium = water medium
tiles-water-shallow = water shallow
tiles-swampland = swampland
tiles-wasteland-swamp-bottom = wasteland swamp bottom
tiles-wasteland-swamp-top = wasteland swamp top
tiles-wasteland-swamp-right = wasteland swamp right
tiles-wasteland-swamp-left = wasteland swamp left
tiles-wasteland-swamp-top-right = wasteland swamp top right
tiles-wasteland-swamp-top-left = wasteland swamp top left
tiles-wasteland-swamp-top-right-corner = wasteland swamp top right corner
tiles-wasteland-swamp-top-left-corner = wasteland swamp top left corner
tiles-wasteland-swamp-bottom-right = wasteland swamp bottom right
tiles-wasteland-swamp-bottom-left = wasteland swamp bottom left
tiles-wasteland-swamp-bottom-right-corner = wasteland swamp bottom right corner
tiles-wasteland-swamp-bottom-left-corner = wasteland swamp bottom left corner
17 changes: 0 additions & 17 deletions Resources/Locale/en-US/_Nuclear14/guidebooks.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,6 @@ guide-entry-nuclear14 = Nuclear 14
# Factions
guide-entry-factions = Factions & Roles
guide-entry-brotherhoodofsteel = Brotherhood of Steel (BOS)
guide-entry-brotherhoodmidwest = BOS Midwest Chapter
guide-entry-brotherhoodwashington = BOS Washington Chapter
guide-entry-caravancompany = Caravan Company
guide-entry-ncr = NCR
guide-entry-townsfolk = Townsfolk
guide-entry-tribes = Tribes
guide-entry-vaultdwellers = Vault Dwellers
guide-entry-wastelanders = Wastelanders
guide-entry-minorfactions = Minor Factions
guide-entry-childrenofatom = Children of Atom
guide-entry-enclave = Enclave
guide-entry-followersoftheapocalypse = Followers of the Apocalypse
guide-entry-zetan = Zetan
# Weapons and Ammo
guide-entry-weaponsammo = Weapons & Ammo
guide-entry-rangedweapons = Ranged Weapons
1 change: 1 addition & 0 deletions Resources/Locale/en-US/_Nuclear14/headset-component.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ chat-radio-bosmidwest = Brotherhood Midwest
chat-radio-boswashington = Brotherhood Washington
chat-radio-enclave = Enclave
chat-radio-ncr = NCR
chat-radio-pbs = Public Broadcast
Loading

0 comments on commit aab9394

Please sign in to comment.