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

Downstream Port #1509

Merged
merged 15 commits into from
Jan 17, 2025
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
16 changes: 8 additions & 8 deletions Content.Client/Chemistry/UI/ChemMasterWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
MinSize="620 670"
MinSize="620 770"
Title="{Loc 'chem-master-bound-user-interface-title'}">
<TabContainer Name="Tabs" Margin="5 5 7 5">
<BoxContainer Orientation="Vertical" HorizontalExpand="True" Margin="5" SeparationOverride="10">
Expand All @@ -13,12 +13,12 @@
<Button MinSize="80 0" Name="InputEjectButton" Access="Public" Text="{Loc 'chem-master-window-eject-button'}" />
</BoxContainer>

<PanelContainer VerticalExpand="True" MinSize="0 200">
<PanelContainer VerticalExpand="True" MinSize="0 300">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
</PanelContainer.PanelOverride>

<ScrollContainer HorizontalExpand="True" MinSize="0 200">
<ScrollContainer HorizontalExpand="True" MinSize="0 300">
<!-- Initially empty, when server sends state data this will have container contents and fill volume.-->
<BoxContainer Name="InputContainerInfo" Orientation="Vertical" Margin="4" HorizontalExpand="True">
<Label Text="{Loc 'chem-master-window-no-container-loaded-text'}" />
Expand All @@ -38,12 +38,12 @@
</BoxContainer>

<!-- Buffer info -->
<PanelContainer VerticalExpand="True" MinSize="0 200">
<PanelContainer VerticalExpand="True" MinSize="0 300">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
</PanelContainer.PanelOverride>

<ScrollContainer HorizontalExpand="True" MinSize="0 200">
<ScrollContainer HorizontalExpand="True" MinSize="0 300">
<!-- Buffer reagent list -->
<BoxContainer Name="BufferInfo" Orientation="Vertical" Margin="4" HorizontalExpand="True">
<Label Text="{Loc 'chem-master-window-buffer-empty-text'}" />
Expand All @@ -60,12 +60,12 @@
<Button MinSize="80 0" Name="OutputEjectButton" Access="Public" Text="{Loc 'chem-master-window-eject-button'}" />
</BoxContainer>

<PanelContainer VerticalExpand="True" MinSize="0 200">
<PanelContainer VerticalExpand="True" MinSize="0 300">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
</PanelContainer.PanelOverride>

<ScrollContainer HorizontalExpand="True" MinSize="0 200">
<ScrollContainer HorizontalExpand="True" MinSize="0 300">
<!-- Initially empty, when server sends state data this will have container contents and fill volume.-->
<BoxContainer Name="OutputContainerInfo" Orientation="Vertical" Margin="4" HorizontalExpand="True">
<Label Text="{Loc 'chem-master-window-no-container-loaded-text'}" />
Expand Down Expand Up @@ -129,4 +129,4 @@
</PanelContainer>
</BoxContainer>
</TabContainer>
</controls:FancyWindow>
</controls:FancyWindow>
5 changes: 3 additions & 2 deletions Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,16 @@ private ReagentButton MakeReagentButton(string text, ChemMasterReagentAmount amo
private List<ReagentButton> CreateReagentTransferButtons(ReagentId reagent, bool isBuffer, bool addReagentButtons)
{
if (!addReagentButtons)
return new List<ReagentButton>(); // Return an empty list if reagentTransferButton creation is disabled.
return new(); // Return an empty list if reagentTransferButton creation is disabled.

var buttons = new List<ReagentButton>();
var names = Enum.GetNames<ChemMasterReagentAmount>();
var values = Enum.GetValues<ChemMasterReagentAmount>();

for (int i = 0; i < names.Length; i++)
{
var name = names[i];
var isNumber = int.TryParse(names[i].Substring(1), out int number);
var name = isNumber ? number.ToString() : names[i];
var reagentAmount = values[i];

var reagentTransferButton = MakeReagentButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,18 @@ private void Spawn(EntityUid uid, ConditionalSpawnerComponent component)
return;
}

if (!Deleted(uid))
EntityManager.SpawnEntity(_robustRandom.Pick(component.Prototypes), Transform(uid).Coordinates);
if (Deleted(uid))
return;

var picked = _robustRandom.Pick(component.Prototypes);
try
{
EntityManager.SpawnEntity(picked, Transform(uid).Coordinates);
}
catch (EntityCreationException e)
{
Log.Warning($"Caught an exception while trying to process a conditional spawner {ToPrettyString(uid)} of type {picked}: {e}");
}
}

private void Spawn(EntityUid uid, RandomSpawnerComponent component)
Expand Down
11 changes: 7 additions & 4 deletions Content.Server/Traits/Assorted/HeirloomSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public sealed class HeirloomSystem : EntitySystem
{
[Dependency] private readonly IGameTiming _gameTiming = default!;

private const long HeirloomRepeatDuration = 60;
private TimeSpan _nextUpdate;


Expand All @@ -31,15 +32,17 @@ public override void Update(float frameTime)
while (query.MoveNext(out var uid, out var comp))
{
var children = RecursiveGetAllChildren(uid);
if (!children.Any(c => c == comp.Heirloom))
var moodlet = comp.Moodlet;

if (children.Any(c => c != comp.Heirloom))
continue;
var ev = new MoodEffectEvent(comp.Moodlet);

var ev = new MoodEffectEvent(moodlet);
RaiseLocalEvent(uid, ev);
}

query.Dispose();

_nextUpdate = _gameTiming.CurTime + TimeSpan.FromSeconds(10);
_nextUpdate = _gameTiming.CurTime + TimeSpan.FromSeconds(HeirloomRepeatDuration);
}

private IEnumerable<EntityUid> RecursiveGetAllChildren(EntityUid uid)
Expand Down
3 changes: 3 additions & 0 deletions Content.Shared/Chemistry/SharedChemMaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,13 @@ public enum ChemMasterReagentAmount
U5 = 5,
U10 = 10,
U15 = 15,
U20 = 20,
U25 = 25,
U30 = 30,
U45 = 45,
U50 = 50,
U75 = 75,
U90 = 90,
U100 = 100,
All,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
ClothingHeadHatPumpkin: 2
ClothingHeadHatShrineMaidenWig: 2
ClothingOuterSuitShrineMaiden: 2
ClothingHeadHatWitch1: 2
sleepyyapril marked this conversation as resolved.
Show resolved Hide resolved
ClothingHeadHatWitch: 2
ClothingOuterSuitWitchRobes: 2
Gohei: 2
ClothingHeadHatRedRacoon: 2
ClothingOuterRedRacoon: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
id: LoadoutServiceBartenderShotgunDoubleBarreledRubber
- type: loadout
id: LoadoutServiceBartenderMosinRubber
- type: loadout
id: LoadoutServiceBartenderArgentiNonlethal
- type: loadout
id: LoadoutServiceBartenderRepeaterNonlethal

#- type: characterItemGroup
# id: LoadoutBartenderEyes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@
coefficients:
Blunt: 0.50
Slash: 0.50
Piercing: 0.50
Piercing: 0.40
Radiation: 0.70
Caustic: 0.70
Heat: 0.70
Heat: 0.40
- type: ClothingSpeedModifier
walkModifier: 0.65
sprintModifier: 0.65
walkModifier: 0.60
sprintModifier: 0.60
- type: ToggleableClothing
clothingPrototype: ClothingHeadHelmetHardsuitCombatRiot

Expand Down
17 changes: 17 additions & 0 deletions Resources/Prototypes/Entities/Clothing/Head/hoods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -518,3 +518,20 @@
sprite: Clothing/Head/Hoods/Coat/hoodweb.rsi
- type: Clothing
sprite: Clothing/Head/Hoods/Coat/hoodweb.rsi

- type: entity
parent: ClothingHeadBase
id: ClothingHeadHatHoodRedHood
name: Red Hood
description: A hood of a red cloak, made to keep the harsh light out of a traveler's eyes. Sometimes it sparkles in the light of the sun.
components:
- type: Sprite
sprite: Clothing/Head/Hoods/redhood.rsi
- type: Clothing
sprite: Clothing/Head/Hoods/redhood.rsi
- type: Tag
tags:
- WhitelistChameleon
- type: HideLayerClothing
slots:
- Hair
16 changes: 16 additions & 0 deletions Resources/Prototypes/Entities/Clothing/Neck/cloaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,19 @@
- type: Sprite
sprite: Clothing/Neck/Cloaks/pan.rsi

- type: entity
parent: ClothingNeckBase
id: ClothingNeckCloakRedHood
name: Red Cloak
description: A cloak made for travel and comfort. Slightly smells of cherry pie?
components:
- type: Sprite
sprite: Clothing/Neck/Cloaks/redhood.rsi
- type: ToggleableClothing
clothingPrototype: ClothingHeadHatHoodRedHood
requiredSlot:
- neck
slot: head
- type: ContainerContainer
containers:
toggleable-clothing: !type:ContainerSlot {}
11 changes: 11 additions & 0 deletions Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,14 @@
coefficient: 0.01
- type: ToggleableClothing
clothingPrototype: ClothingHeadHelmetHardsuitCarp

- type: entity # From Upstream
parent: ClothingOuterBase
id: ClothingOuterSuitWitchRobes
name: witch robes
description: Magic is all about the spell power, ZE!
components:
- type: Sprite
sprite: Clothing/OuterClothing/Suits/witchrobe.rsi
- type: Clothing
sprite: Clothing/OuterClothing/Suits/witchrobe.rsi
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@
requireDetailRange: false
# todo: add itemcomponent with inhandVisuals states using unused texture and animation assets in kinetic_accelerator.rsi
# todo: add clothingcomponent with clothingVisuals states using unused texture and animations assets in kinetic_accelerator.rsi
- type: StaticPrice
price: 270
- type: Construction #Frontier
graph: PKASawn #Frontier
node: start #Frontier
deconstructionTarget: null #Frontier
- type: Wieldable # Frontier
42 changes: 42 additions & 0 deletions Resources/Prototypes/Loadouts/Jobs/Service/bartender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,48 @@
items:
- WeaponSniperMosinRubber

- type: loadout
id: LoadoutServiceBartenderBoxMagnumRubber
category: JobsServiceBartender
cost: 0
exclusive: true
requirements:
- !type:CharacterItemGroupRequirement
group: LoadoutBartenderAmmo
- !type:CharacterJobRequirement
jobs:
- Bartender
items:
- MagazineBoxMagnumRubber

- type: loadout
id: LoadoutServiceBartenderArgentiNonlethal
category: JobsServiceBartender
cost: 0
exclusive: true
requirements:
- !type:CharacterItemGroupRequirement
group: LoadoutBartenderWeapon
- !type:CharacterJobRequirement
jobs:
- Bartender
items:
- WeaponRevolverArgentiNonlethal

- type: loadout
id: LoadoutServiceBartenderRepeaterNonlethal
category: JobsServiceBartender
cost: 0
exclusive: true
requirements:
- !type:CharacterItemGroupRequirement
group: LoadoutBartenderWeapon
- !type:CharacterJobRequirement
jobs:
- Bartender
items:
- WeaponSniperRepeaterNonlethal

# Eyes

# Gloves
Expand Down
5 changes: 5 additions & 0 deletions Resources/Prototypes/Mood/genericNegativeEffects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,8 @@
id: HeirloomLost
moodChange: -15
category: Heirloom

- type: moodEffect
id: HeirloomNeutral
moodChange: -5
category: Heirloom
2 changes: 1 addition & 1 deletion Resources/Prototypes/Mood/genericPositiveEffects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@
category: Heirloom
moodChange: 5
timeout: 60 # A bit of time before they realize it's gone
moodletOnEnd: HeirloomLost
moodletOnEnd: HeirloomNeutral
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
- Flashlight
- ForensicBeltEquip
- HandLabeler
- Sidearm
- Folder

- type: entity
parent: ClothingBeltBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@
equipDelay: 0.5
unequipDelay: 6
- type: HeadCage
- type: Tag
tags:
- ForensicBeltEquip

- type: entity
parent: ClothingHeadTinfoil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
state: icon
- type: Item
sprite: Nyanotrasen/Objects/Weapons/Melee/anti_psychic_knife.rsi
storedSprite:
state: icon
sprite: Nyanotrasen/Objects/Weapons/Melee/anti_psychic_knife.rsi
- type: Tag
tags:
- ForensicBeltEquip
Expand Down
10 changes: 10 additions & 0 deletions Resources/Prototypes/_NF/Entities/Clothing/Neck/cloaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- type: entity
parent: ClothingNeckBase
id: ClothingNeckCloakJanitor
name: janitor's cloak
description: An exquisite cloak fitting for those who save the station from messes and slips. The unsung heroes who work thanklessly while we make a mess over the bar. Pure angels of patience and an iron will! ...It's also waterproof!
components:
- type: Sprite
sprite: _NF/Clothing/Neck/Cloaks/janitor.rsi
- type: Clothing
sprite: _NF/Clothing/Neck/Cloaks/janitor.rsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
- type: entity
id: WeaponProtoKineticAcceleratorSawn
parent: WeaponProtoKineticAcceleratorBase
name: sawn-off proto-kinetic accelerator
description: A PKA rifle that has been crudely cut down and rewired. It's all but impossible to aim effectively, but at least it fits inside a jumpsuit pocket now.
components:
- type: Sprite
sprite: _NF/Objects/Weapons/Guns/Basic/sawn_kinetic_accelerator.rsi
state: icon
- type: Item
sprite: _NF/Objects/Weapons/Guns/Basic/sawn_kinetic_accelerator.rsi
size: Small
shape:
- 0,0,1,0
- type: Gun
fireRate: 8
selectedMode: FullAuto
availableModes:
- FullAuto
minAngle: 41
maxAngle: 55
- type: Clothing
sprite: _NF/Objects/Weapons/Guns/Basic/sawn_kinetic_accelerator.rsi
- type: Construction
graph: PKASawn
node: pkasawn
deconstructionTarget: null
Loading
Loading