Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions Content.Client/_ES/Food/ESFoodItemStatusSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ public sealed class ESFoodStatusControl : Control
BackgroundColor = Color.LimeGreen
};

private static readonly StyleBoxFlat StyleBoxUnlit = new()
{
BackgroundColor = Color.Black
};

private static readonly StyleBoxFlat StyleBoxBad = new()
{
BackgroundColor = Color.Red
Expand All @@ -62,8 +57,8 @@ public ESFoodStatusControl(Entity<ESFoodComponent> parent)
for (var i = 0; i < 5; i++)
{
var colorBox = parent.Comp.SatietyMultiplier < 0 ? StyleBoxBad : StyleBoxLit;
var style = i <= ((_oldPortionsLeft ?? parent.Comp.StartingPortions) - 1) ? colorBox : StyleBoxUnlit;
var panel = new PanelContainer { MinSize = new Vector2(16, 16), PanelOverride = style };
var visible = i <= ((_oldPortionsLeft ?? parent.Comp.StartingPortions) - 1);
var panel = new PanelContainer { MinSize = new Vector2(16, 16), PanelOverride = colorBox, Visible = visible};
wrapper.AddChild(panel);
_sections.Add(panel);
}
Expand All @@ -81,9 +76,10 @@ protected override void FrameUpdate(FrameEventArgs args)
for (var i = 0; i < _sections.Count; i++)
{
var colorBox = _parent.Comp.SatietyMultiplier < 0 ? StyleBoxBad : StyleBoxLit;
var style = i <= ((_oldPortionsLeft ?? _parent.Comp.StartingPortions) - 1) ? colorBox : StyleBoxUnlit;
var visible = i <= ((_oldPortionsLeft ?? _parent.Comp.StartingPortions) - 1);
var panel = _sections[i];
panel.PanelOverride = style;
panel.PanelOverride = colorBox;
panel.Visible = visible;
}
}
}
7 changes: 5 additions & 2 deletions Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,13 @@ private bool TrySliceFood(Entity<TransformComponent?, SliceableFoodComponent?, E
EntityUid user,
EntityUid? usedItem)
{
if (!Resolve(entity, ref entity.Comp1, ref entity.Comp2, ref entity.Comp3) || string.IsNullOrEmpty(entity.Comp2.Slice))
if (!Resolve(entity, ref entity.Comp1, ref entity.Comp2) || string.IsNullOrEmpty(entity.Comp2.Slice))
return false;

_solutionContainer.TryGetSolution(entity.Owner, entity.Comp3.Solution, out var soln, out var solution);
// not required for sliceable things to be edible
Resolve(entity, ref entity.Comp3, false);

_solutionContainer.TryGetSolution(entity.Owner, entity.Comp3?.Solution, out var soln, out var solution);

if (!TryComp<UtensilComponent>(usedItem, out var utensil) || (utensil.Types & UtensilType.Knife) == 0)
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ private void OnCausedDamageChanged(Entity<ESParasiteDamageObjectiveComponent> en
if (args.DamageDelta is null || !MindSys.TryGetMind(args.Entity, out _))
return;

// dont accumulate selfdmg
if (args.Entity.Owner == args.Origin)
return;

var damageDealt = DamageSpecifier.GetPositive(args.DamageDelta).GetTotal();
ObjectivesSys.AdjustObjectiveCounter(ent.Owner, damageDealt.Float());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ private void OnKillReported(ref ESPlayerKilledEvent ev)

private void OnObjectiveProgressChanged(ref ESObjectiveProgressChangedEvent ev)
{
if (!_objectives.IsObjectiveInitialized(ev.Objective.Owner))
if (!_objectives.IsObjectiveInitialized(ev.Objective.AsNullable())
|| !_objectives.ShouldAnnounceProgress(ev.Objective.AsNullable()))
return;

LocId? msgId;
Expand Down
1 change: 1 addition & 0 deletions Content.Server/_ES/WarpDrive/ESWarpDriveSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ private void OnActivateWarpDrive(EntityUid uid, ESPortalGeneratorConsoleComponen

warp.FinalPhaseAt = _timing.CurTime;
warp.InFinalPhase = true;
UpdateAppearance(true);

_chat.DispatchGlobalAnnouncement(
Loc.GetString("es-warp-drive-announcement-final-phase-started"),
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Nutrition/Components/HungerComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public sealed partial class HungerComponent : Component
/// The time it takes for the hunger value to decay once
/// </summary>
[DataField, AutoNetworkedField]
public TimeSpan HungerDecayTime = TimeSpan.FromMinutes(8);
public TimeSpan HungerDecayTime = TimeSpan.FromMinutes(14);

/// <summary>
/// The time when the hunger threshold will decay next.
Expand Down
7 changes: 7 additions & 0 deletions Content.Shared/_ES/Food/ESFoodSystem.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
using Content.Shared.Examine;
using Content.Shared.Nutrition;
using Content.Shared.Nutrition.EntitySystems;
using Content.Shared.Popups;

namespace Content.Shared._ES.Food;

/// <see cref="ESFoodComponent"/>
public sealed partial class ESFoodSystem : EntitySystem
{
[Dependency] private HungerSystem _hunger = default!;
[Dependency] private SharedPopupSystem _popup = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -45,6 +47,11 @@ private void OnFoodIngested(Entity<ESFoodComponent> ent, ref IngestedEvent args)
// satiate
_hunger.ModifySatiety(args.User, 1 * ent.Comp.SatietyMultiplier);
Dirty(ent);

if (ent.Comp.SatietyMultiplier < 0)
{
_popup.PopupEntity(Loc.GetString("es-food-popup-bad-food"), args.User, args.User);
}
}

private void OnFoodExamined(Entity<ESFoodComponent> ent, ref ExaminedEvent args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ public sealed partial class ESObjectiveComponent : Component

[DataField, AutoNetworkedField]
public bool ObjectiveInitialized;

/// <summary>
/// If true, this objective changing progress will announce the new progress to stagehands.
/// </summary>
[DataField]
public bool AnnounceProgress = true;
}

/// <summary>
Expand Down
7 changes: 7 additions & 0 deletions Content.Shared/_ES/Objectives/ESSharedObjectiveSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ public bool IsObjectiveInitialized(Entity<ESObjectiveComponent?> ent)
return ent.Comp.ObjectiveInitialized;
}

public bool ShouldAnnounceProgress(Entity<ESObjectiveComponent?> ent)
{
if (!Resolve(ent, ref ent.Comp))
return false;
return ent.Comp.AnnounceProgress;
}

/// <summary>
/// Re-generates the list of objectives an entity should have, adding all new objectives and removing ones that should no longer be there,
/// e.g. as a result of troupe or mask changes.
Expand Down
4 changes: 2 additions & 2 deletions Content.Shared/_ES/Viewcone/ESViewconeAngleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public float GetModifiedViewconeAngle(Entity<ESViewconeComponent?> ent)
var ev = new ESViewconeGetAngleModifierEvent();
RaiseLocalEvent(ent, ref ev, true);

// clamps to 0, 360 since this is additive and could easily go over with stacking equipment items and shit
return Math.Clamp(ent.Comp.BaseConeAngle + ev.GetAngleModifier(), 0f, 360f);
// clamps to 15, 360 since this is additive and could easily go over/too low with stacking equipment items and shit
return Math.Clamp(ent.Comp.BaseConeAngle + ev.GetAngleModifier(), 15f, 360f);
}

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/en-US/_ES/food/popup.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
es-food-popup-bad-food = That tasted awful!
2 changes: 0 additions & 2 deletions Resources/Locale/en-US/_Offbrand/overrides.ftl

This file was deleted.

36 changes: 19 additions & 17 deletions Resources/Maps/_ES/toast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ meta:
engineVersion: 277.0.0
forkId: ""
forkVersion: ""
time: 06/10/2026 10:13:00
time: 06/14/2026 16:50:29
entityCount: 14692
maps:
- 3
Expand Down Expand Up @@ -39946,10 +39946,10 @@ entities:
parent: 2
- proto: ESSpawnerDormsVendor
entities:
- uid: 10480
- uid: 7282
components:
- type: Transform
pos: -49.5,6.5
pos: -3.5,-3.5
parent: 2
- proto: ESSpawnerMarkerDistributedArmory
entities:
Expand Down Expand Up @@ -43849,6 +43849,13 @@ entities:
- type: Transform
pos: -18.5,-28.5
parent: 2
- proto: ESSpawnerRandomVendorSnack
entities:
- uid: 136
components:
- type: Transform
pos: -49.5,6.5
parent: 2
- proto: ESSpawnerRandomWardrobe
entities:
- uid: 1679
Expand Down Expand Up @@ -44178,15 +44185,15 @@ entities:
parent: 2
- proto: ESVendingMachineCigs
entities:
- uid: 136
- uid: 4795
components:
- type: Transform
pos: -3.5,-3.5
pos: -35.5,-1.5
parent: 2
- uid: 4795
- uid: 7402
components:
- type: Transform
pos: -35.5,-1.5
pos: -40.5,-42.5
parent: 2
- uid: 9410
components:
Expand Down Expand Up @@ -66320,6 +66327,11 @@ entities:
- type: Transform
pos: -13.5,6.5
parent: 2
- uid: 7350
components:
- type: Transform
pos: -37.5,-42.5
parent: 2
- uid: 7436
components:
- type: Transform
Expand All @@ -66330,16 +66342,6 @@ entities:
- type: Transform
pos: -40.5,-47.5
parent: 2
- uid: 7514
components:
- type: Transform
pos: -37.5,-42.5
parent: 2
- uid: 7515
components:
- type: Transform
pos: -40.5,-42.5
parent: 2
- uid: 7581
components:
- type: Transform
Expand Down
88 changes: 0 additions & 88 deletions Resources/Prototypes/Entities/Clothing/Eyes/hud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,78 +77,6 @@
tags:
- PetWearable

- type: entity
parent: ClothingEyesBase
id: ClothingEyesHudBeer
name: beer goggles
description: A pair of sunHud outfitted with apparatus to scan reagents, as well as providing an innate understanding of liquid viscosity while in motion.
components:
- type: Sprite
sprite: Clothing/Eyes/Hud/beergoggles.rsi
- type: Clothing
sprite: Clothing/Eyes/Hud/beergoggles.rsi
- type: ShowThirstIcons
- type: SolutionScanner
- type: Tag
tags:
- PetWearable

- type: entity
parent: ClothingEyesBase
id: ClothingEyesHudFriedOnion
name: fried onion goggles
description: Filler
components:
- type: Sprite
sprite: Clothing/Eyes/Hud/friedonion.rsi
- type: Clothing
sprite: Clothing/Eyes/Hud/friedonion.rsi
- type: ShowHungerIcons
- type: Edible
- type: ESFood
- type: FlavorProfile
flavors:
- onion
- greasey

- type: entity
parent: ClothingEyesBase
id: ClothingEyesHudOnionBeer
name: thungerst goggles
description: Filler
components:
- type: Sprite
sprite: Clothing/Eyes/Hud/onionbeer.rsi
- type: Clothing
sprite: Clothing/Eyes/Hud/onionbeer.rsi
- type: ShowHungerIcons
- type: ShowThirstIcons

- type: entity
parent: [ClothingEyesBase, ShowMedicalIcons]
id: ClothingEyesHudMedOnion
name: medonion hud
description: Filler
components:
- type: Sprite
sprite: Clothing/Eyes/Hud/medonion.rsi
- type: Clothing
sprite: Clothing/Eyes/Hud/medonion.rsi
- type: ShowHungerIcons

- type: entity
parent: [ClothingEyesBase, ShowMedicalIcons]
id: ClothingEyesHudMedOnionBeer
name: medthungerst hud
description: Filler
components:
- type: Sprite
sprite: Clothing/Eyes/Hud/medonionbeer.rsi
- type: Clothing
sprite: Clothing/Eyes/Hud/medonionbeer.rsi
- type: ShowHungerIcons
- type: ShowThirstIcons

- type: entity
parent: [ClothingEyesBase, ShowSecurityIcons, ShowMedicalIcons, BaseSecurityCommandContraband]
id: ClothingEyesHudMedSec
Expand Down Expand Up @@ -273,22 +201,6 @@
id: ClothingEyesEyepatchHudSecurityFlipped
name: security hud eyepatch

- type: entity
parent: [ClothingEyesHudBeer, ClothingHeadEyeBaseFlippable]
id: ClothingEyesEyepatchHudBeer
name: beer hud eyepatch
description: A pair of sunHud outfitted with apparatus to scan reagents, as well as providing an innate understanding of liquid viscosity while in motion. For true patriots.
components:
- type: Sprite
sprite: Clothing/Eyes/Hud/beerpatch.rsi
- type: Clothing
sprite: Clothing/Eyes/Hud/beerpatch.rsi

- type: entity
parent: [ClothingEyesEyepatchHudBeer, ClothingHeadEyeBaseFlipped]
id: ClothingEyesEyepatchHudBeerFlipped
name: beer hud eyepatch

- type: entity
parent: [ClothingEyesHudDiagnostic, ClothingHeadEyeBaseFlippable]
id: ClothingEyesEyepatchHudDiag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
heldPrefix: generic-pink

- type: entity
parent: FoodMeatBase
parent: FoodMeatCookedBase
id: FoodMeatCooked
name: steak
description: A cooked slab of meat. Smells primal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,18 +513,3 @@
reagents:
- ReagentId: Saline
Quantity: 200

- type: entity
parent: Jug
suffix: dexalin plus
id: JugDexalinPlus
categories: [ HideSpawnMenu ]
components:
- type: Label
currentLabel: reagent-name-dexalin-plus
- type: SolutionContainerManager
solutions:
drink:
reagents:
- ReagentId: DexalinPlus
Quantity: 200
Loading
Loading