Skip to content

Commit

Permalink
upstream 20.12.2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh1ntra committed Dec 20, 2024
2 parents a41c138 + 6b30b06 commit f3a1757
Show file tree
Hide file tree
Showing 34 changed files with 703 additions and 497 deletions.
2 changes: 1 addition & 1 deletion Content.Server/Body/Systems/MetabolizerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public override void Initialize()

private void OnMapInit(Entity<MetabolizerComponent> ent, ref MapInitEvent args)
{
ent.Comp.NextUpdate = _gameTiming.CurTime + ent.Comp.UpdateInterval;
ent.Comp.NextUpdate = _gameTiming.CurTime + ent.Comp.UpdateInterval * (1+_random.NextFloat());
}

private void OnUnpaused(Entity<MetabolizerComponent> ent, ref EntityUnpausedEvent args)
Expand Down
4 changes: 3 additions & 1 deletion Content.Server/Body/Systems/StomachSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
using Content.Shared.Chemistry.Components.SolutionManager;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using Robust.Shared.Random;

namespace Content.Server.Body.Systems
{
public sealed class StomachSystem : EntitySystem
{
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
[Dependency] private readonly IRobustRandom _random = default!;

public const string DefaultSolutionName = "stomach";

Expand All @@ -24,7 +26,7 @@ public override void Initialize()

private void OnMapInit(Entity<StomachComponent> ent, ref MapInitEvent args)
{
ent.Comp.NextUpdate = _gameTiming.CurTime + ent.Comp.UpdateInterval;
ent.Comp.NextUpdate = _gameTiming.CurTime + ent.Comp.UpdateInterval * (1+_random.NextFloat());
}

private void OnUnpaused(Entity<StomachComponent> ent, ref EntityUnpausedEvent args)
Expand Down
26 changes: 15 additions & 11 deletions Content.Server/Fluids/EntitySystems/DrainSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,20 @@ 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();
SubscribeLocalEvent<DrainComponent, GetVerbsEvent<Verb>>(AddEmptyVerb);
SubscribeLocalEvent<DrainComponent, ExaminedEvent>(OnExamined);
SubscribeLocalEvent<DrainComponent, AfterInteractUsingEvent>(OnInteract);
SubscribeLocalEvent<DrainComponent, DrainDoAfterEvent>(OnDoAfter);
SubscribeLocalEvent<DrainComponent, ComponentInit>(OnComponentInit);
}

private void OnComponentInit(EntityUid uid, DrainComponent component, ComponentInit args)
{
// Randomize accumulator on init to try to spread out all drain updates as much as possible.
component.Accumulator = _random.NextFloat() * component.DrainFrequency;
}

private void AddEmptyVerb(Entity<DrainComponent> entity, ref GetVerbsEvent<Verb> args)
Expand Down Expand Up @@ -111,14 +115,7 @@ private void Empty(EntityUid container, SpillableComponent spillable, EntityUid

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

base.Update(DrainRunPeriod);
base.Update(frameTime);
var managerQuery = GetEntityQuery<SolutionContainerManagerComponent>();
var xformQuery = GetEntityQuery<TransformComponent>();
var puddleQuery = GetEntityQuery<PuddleComponent>();
Expand All @@ -127,6 +124,13 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
special-appearance-component-examine-charisma-very-low = { CAPITALIZE(SUBJECT($user)) } seems repulsive.
special-appearance-component-examine-charisma-low = { CAPITALIZE(SUBJECT($user)) } seems awkward.
special-appearance-component-examine-charisma-medium = { CAPITALIZE(SUBJECT($user)) } seems normal.
special-appearance-component-examine-charisma-high = { CAPITALIZE(SUBJECT($user)) } seem approachable.
special-appearance-component-examine-charisma-high = { CAPITALIZE(SUBJECT($user)) } seems approachable.
special-appearance-component-examine-charisma-very-high = { CAPITALIZE(SUBJECT($user)) } seems suave.
# Examine all special modifiers
Expand Down
24 changes: 12 additions & 12 deletions Resources/Locale/en-US/_Nuclear14/job-names.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ job-description-caravan-leader = Coordinate the caravan company in the area and
job-name-caravan-trader = Caravan Trader
job-description-caravan-trader = Conduct trade missions and travel caravan routes to generate profit for the company.
job-name-caravan-guard = Caravan Guard
job-description-caravan-guard = Protect the caravan company traders, their livestock and their inventory.
job-description-caravan-guard = Protect the caravan company traders, their livestock, and their inventory.
# NCR
job-name-ncr-cadet = NCR Cadet
job-description-ncr-cadet = Show your officers that youre ready to become a private of the NCR army.
job-description-ncr-cadet = Prove to the officers that you're ready to become a soldier of the NCR army.
job-name-ncr-medic = NCR Medic
job-description-ncr-medic = Treat the troopers and offer services to the wasteland people.
job-description-ncr-medic = Treat the troops and offer services to the wasteland people.
job-name-ncr-sgt = NCR Sergeant
job-description-ncr-sgt = A non-commissioned officer in the NCR military. Lead a squad to protect the NCRs interests in the region.
job-description-ncr-sgt = A non-commissioned officer in the NCR military. Lead a squad to protect the NCR interests in the region.
job-name-ncr-lt = NCR Lieutenant
job-description-ncr-lt = The local leader of the NCR military. Fulfil your missions by coordinating your military forces in the area. Organise your Sergeants.
job-description-ncr-lt = The local leader of the NCR military. Fulfill your mission by coordinating your military forces in the area. Organise your Sergeants.
job-name-ncr-soldier = NCR Soldier
job-description-ncr-soldier = The backbone of any military. Soldiers get stuff done and follow a Sergeant on missions.
job-name-ncr-engineer = NCR Engineer
Expand Down Expand Up @@ -72,13 +72,13 @@ job-description-tribal-healer = Produce medicines and compounds for the tribe, a
# Vault
job-name-overseer = Vault Overseer
job-description-overseer = Follow Vault Tec's objectives in managing your Vault and ensure everything goes to plan...
job-description-overseer = Follow Vault-Tec's objectives in managing your Vault and ensure everything goes to plan...
job-name-vault-doctor = Vault Doctor
job-description-vault-doctor = Maintain the health and well-being of your fellow Vault Dwellers. Conduct research where necessary.
job-name-vault-dweller = Vault Dweller
job-description-vault-dweller = The general populous of the Vault. Live a comfortable life and pull your own weight where necessary.
job-description-vault-dweller = The general populace of the Vault. Live a comfortable life and pull your own weight where necessary.
job-name-vault-engineer = Vault Engineer
job-description-vault-engineer = Maintain the Vault and all it's vital systems to ensure a comfortable and safe life.
job-description-vault-engineer = Maintain the Vault and all its vital systems to ensure a comfortable and safe life.
job-name-vault-security = Vault Security
job-description-vault-security = Keep order within the Vault and report to the Overseer. For the good of the Vault!
Expand All @@ -94,23 +94,23 @@ job-description-wastelander = Survive in the wasteland and carve out your own pa
# Town
job-name-townsperson = Townsperson
job-description-townsperson = A member of the new world society. Follow the town rules or try run for Mayor to change them.
job-description-townsperson = A member of the post-war society. Follow the town rules or try run for Mayor to change them.
job-name-towndoctor = Town Doctor
job-description-towndoctor = Sell your medical knowledge as a service. Treat the injured for money and manage a doctors practice in town.
job-name-townmechanic = Town Mechanic
job-description-townmechanic = Maintain the towns services and infrastructure and do what you can on the side for others for money.
job-name-townshopkeeper = Town Shopkeeper
job-description-townshopkeeper = Setup shop in town, organise trade partnerships and sell your wares to the wanderes of the wastes. Beware the tax man.
job-description-townshopkeeper = Setup shop in town, organise trade partnerships, and sell your wares to the wanderers of the wastes. Beware the tax man.
job-name-towndeputy = Town Deputy
job-description-towndeputy = Deputy peacekeeper for the town. Keep the peace and provide backup to your Sheriff.
job-name-townsheriff = Town Sheriff
job-description-townsheriff = Maintain law and order within the town and support the Mayor in their rule.
job-name-townmayor = Town Mayor
job-description-townmayor = Maintain civilisation in the town. Set taxes and laws and try not to be thrown out or taken over.
job-name-townreporter = Town Reporter
job-description-townreporter = Interview people and spread the news across the region, or just have a talk show!
job-description-townreporter = Interview people, spread the news across the region, or just have a talk show!
job-name-townbartender = Town Innkeeper
job-description-townbartender = Manage the local bar, kitchen and rooms that are there for renting. Run a business in town!
job-description-townbartender = Manage the local bar, kitchen, and rooms that are there for renting. Run a business in town!
# Followers
job-name-followers = Followers of the Apocalypse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
sprite: _Nuclear14/Objects/Consumable/Food/pre-war.rsi
state: porknbeans
product: N14CrateBreakPlainFilledEmergencyRations
cost: 60
cost: 150
category: Consumables
group: market

Expand Down Expand Up @@ -36,4 +36,4 @@
product: N14CrateBreakPlainFilledNukaCola
cost: 80
category: Consumables
group: market
group: market
2 changes: 1 addition & 1 deletion Resources/Prototypes/_Nuclear14/Catalog/Fills/crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
- type: entity
parent: N14CrateBreakPlain
id: N14CrateBreakPlainFilledEmergencyRations
name: Emergency rations crate
name: Premium rations crate
description: Crate containing 2 Pork n' Beans, 2 BlamCo Mac & Cheese, 2 Salisbury Steak and 2 Dandy Boy Apples.
components:
- type: StorageFill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@
- type: Armor
modifiers:
coefficients:
Blunt: 0.75
Slash: 0.75
Piercing: 0.75
Heat: 0.75
Blunt: 0.8
Slash: 0.8
Piercing: 0.85
Heat: 0.85
- type: ExplosionResistance
damageCoefficient: 0.85
damageCoefficient: 0.9

# Brotherhood of Steel
- type: entity
Expand Down
Loading

0 comments on commit f3a1757

Please sign in to comment.