Skip to content

Commit 5ea1cf5

Browse files
ARMOKSpre-commit-ci[bot]deltanedas
authored
The Joel update (Trauma-Station#1153)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
1 parent d62c297 commit 5ea1cf5

121 files changed

Lines changed: 1527 additions & 51 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// SPDX-License-Identifier: AGPL-3.0-or-later
2+
3+
using Content.Server.Temperature.Components;
4+
using Content.Shared.Popups;
5+
using Content.Shared.Temperature;
6+
using Content.Trauma.Shared.BurnableFood;
7+
8+
namespace Content.Trauma.Server.BurnableFood;
9+
10+
public sealed partial class BurnableFoodSystem : EntitySystem
11+
{
12+
[Dependency] private readonly MetaDataSystem _meta = default!;
13+
[Dependency] private readonly SharedPopupSystem _popup = default!;
14+
15+
public override void Initialize()
16+
{
17+
base.Initialize();
18+
SubscribeLocalEvent<BurnableFoodComponent, OnTemperatureChangeEvent>(OnTempChange);
19+
}
20+
21+
private void OnTempChange(Entity<BurnableFoodComponent> ent, ref OnTemperatureChangeEvent args)
22+
{
23+
if (TerminatingOrDeleted(ent))
24+
return;
25+
26+
if (!TryComp<InternalTemperatureComponent>(ent, out var internalTemperatureComp)
27+
|| internalTemperatureComp.Temperature < ent.Comp.BurnTemp)
28+
return;
29+
30+
var originalName = Name(ent);
31+
var newEnt = SpawnAtPosition(ent.Comp.BurnedFoodPrototype, Transform(ent.Owner).Coordinates);
32+
33+
_meta.SetEntityName(newEnt, Loc.GetString(ent.Comp.BurnedPrefix, ("name", originalName)));
34+
_popup.PopupEntity(Loc.GetString(ent.Comp.BurnedPopup, ("name", originalName)), newEnt, PopupType.SmallCaution);
35+
36+
QueueDel(ent);
37+
}
38+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// SPDX-License-Identifier: AGPL-3.0-or-later
2+
3+
using Robust.Shared.GameStates;
4+
using Robust.Shared.Prototypes;
5+
6+
namespace Content.Trauma.Shared.BurnableFood;
7+
8+
[RegisterComponent]
9+
public sealed partial class BurnableFoodComponent : Component
10+
{
11+
/// <summary>
12+
/// The tempreture at which the entity will turn into the entity listed <see cref="BurnedFoodPrototype"/>.
13+
/// </summary>
14+
[DataField]
15+
public float BurnTemp = 450f;
16+
17+
/// <summary>
18+
/// The prototype that food burns into.
19+
/// </summary>
20+
[DataField]
21+
public EntProtoId BurnedFoodPrototype = "FoodBurned";
22+
23+
/// <summary>
24+
/// The prefix that will be added to the burned entity name.
25+
/// </summary>
26+
[DataField]
27+
public string BurnedPrefix = "burned-name-text";
28+
29+
/// <summary>
30+
/// The prefix that will be added to the burned entity name.
31+
/// </summary>
32+
[DataField]
33+
public string BurnedPopup = "burned-popup-text";
34+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
burned-name-text = burned {$name}
2+
burned-popup-text = The {$name} burnt to a crisp!
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
flavor-base-deep-fried = deep fried
22
33
flavor-complex-tiredness = like tiredness
4+
5+
flavor-complex-blood = like blood
6+
7+
flavor-complex-apotheosis = like apotheosis

Resources/Locale/en-US/_Trauma/ghost/ghost-role-component.ftl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@ ghost-role-information-DClass-description = The science team wants to use you fo
1919
2020
ghost-role-information-facehugger-name = facehugger
2121
ghost-role-information-facehugger-description = A writhing nightmare. The facehugger clings to its victim's face, forcibly inserting a xenomorph fetus.
22+
23+
ghost-role-ratma-name = Ratma
24+
ghost-role-ratma-desc = Hunt and kill.
25+
26+
ghost-role-information-breadling-namee = Breadling
27+
ghost-role-information-BreadLing-desc = Brought to life by a loving baker, enjoy the fickle time you have remaining. You have no knowledge of your coming death unless told.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
breadling-hurt-by-water-popup = You're becoming soggy!

Resources/Locale/en-US/_Trauma/recipes/tags.ftl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ construction-graph-tag-nail = a nail
2525
construction-graph-tag-butt = a butt
2626
construction-graph-tag-cyber-butt = an ipc groin
2727
construction-graph-tag-egg = any egg
28+
29+
# food
30+
construction-graph-tag-CookedEgg = a cooked egg

Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
id: BookshelfEntityTable
1414
table: !type:AllSelector
1515
children:
16+
# <Trauma>
17+
- !type:NestedSelector
18+
rolls: !type:RangeNumberSelector
19+
range: 0, 1
20+
tableId: RandomEmptyScroll
21+
# </Trauma>
1622
# Randomly generated books
1723
- id: BookRandomStory
1824
amount: !type:RangeNumberSelector

Resources/Prototypes/Catalog/Fills/Lockers/misc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@
341341
# Recursive
342342
- id: ClosetMaintenanceFilledRandom
343343
prob: 0.01
344+
# <Trauma>
345+
- id: EmptyScroll
346+
prob: 0.001
347+
# </Trauma>
344348

345349
- type: entityTable
346350
id: MaintenancePlushies

Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,8 @@
8888
spawned:
8989
- id: DrinkChangelingStingCan
9090
amount: 1
91+
# <Trauma>
92+
- type: HTN
93+
rootTask:
94+
task: SimpleRangedHostileCompound
95+
# </Trauma>

0 commit comments

Comments
 (0)