From 760596dd95690e7f9d7412e44500f1b6682586b1 Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Wed, 8 Jan 2025 03:02:44 +1000 Subject: [PATCH 01/16] Fix Humanoid Color (#1454) # Description Port from [WWDP](https://github.com/WWhiteDreamProject/wwdpublic/pull/212) ---

Media

How it was before: ![image](https://github.com/user-attachments/assets/1a991dcc-a108-4e73-8bbe-8fbbc1a766a6) How is it now: ![image](https://github.com/user-attachments/assets/80aaff73-de50-447a-a442-10a35ddf56be)

--- # Changelog :cl: Spatison - fix: Humanoid color in the spawn panel is now correct. - fix: IPCs can no longer spawn invisible. --- Content.Shared/Humanoid/HumanoidCharacterAppearance.cs | 2 +- Content.Shared/Preferences/HumanoidCharacterProfile.cs | 10 ++++++++++ Resources/Prototypes/DeltaV/Species/lamia.yml | 1 + .../Nyanotrasen/Entities/Mobs/Species/felinid.yml | 1 - Resources/Prototypes/Nyanotrasen/Species/Oni.yml | 1 + Resources/Prototypes/Nyanotrasen/Species/felinid.yml | 1 + Resources/Prototypes/Species/arachne.yml | 1 + Resources/Prototypes/Species/dwarf.yml | 1 + Resources/Prototypes/Species/harpy.yml | 1 + Resources/Prototypes/Species/human.yml | 1 + Resources/Prototypes/Species/ipc.yml | 1 + 11 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Humanoid/HumanoidCharacterAppearance.cs b/Content.Shared/Humanoid/HumanoidCharacterAppearance.cs index fc44ed5e3b9..8c1ecf833cd 100644 --- a/Content.Shared/Humanoid/HumanoidCharacterAppearance.cs +++ b/Content.Shared/Humanoid/HumanoidCharacterAppearance.cs @@ -27,7 +27,7 @@ public sealed partial class HumanoidCharacterAppearance : ICharacterAppearance, public Color EyeColor { get; private set; } [DataField] - public Color SkinColor { get; private set; } + public Color SkinColor { get; set; } [DataField] public List Markings { get; private set; } = new(); diff --git a/Content.Shared/Preferences/HumanoidCharacterProfile.cs b/Content.Shared/Preferences/HumanoidCharacterProfile.cs index 499da11babc..de009eb20cd 100644 --- a/Content.Shared/Preferences/HumanoidCharacterProfile.cs +++ b/Content.Shared/Preferences/HumanoidCharacterProfile.cs @@ -191,9 +191,19 @@ public HumanoidCharacterProfile() /// Humanoid character profile with default settings. public static HumanoidCharacterProfile DefaultWithSpecies(string species = SharedHumanoidAppearanceSystem.DefaultSpecies) { + var prototypeManager = IoCManager.Resolve(); + var skinColor = SkinColor.ValidHumanSkinTone; + + if (prototypeManager.TryIndex(species, out var speciesPrototype)) + skinColor = speciesPrototype.DefaultSkinTone; + return new() { Species = species, + Appearance = new() + { + SkinColor = skinColor, + }, }; } diff --git a/Resources/Prototypes/DeltaV/Species/lamia.yml b/Resources/Prototypes/DeltaV/Species/lamia.yml index 2e58a1681c2..0c2f48666a4 100644 --- a/Resources/Prototypes/DeltaV/Species/lamia.yml +++ b/Resources/Prototypes/DeltaV/Species/lamia.yml @@ -5,6 +5,7 @@ prototype: MobLamia dollPrototype: MobLamiaDummy sprites: MobLamiaSprites + defaultSkinTone: "#c0967f" markingLimits: MobLamiaMarkingLimits skinColoration: HumanToned maleFirstNames: names_cyno_male diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Species/felinid.yml b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Species/felinid.yml index 9cf6cff45e4..5247ed351b6 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Species/felinid.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Species/felinid.yml @@ -9,7 +9,6 @@ scale: 0.8, 0.8 - type: HumanoidAppearance species: Felinid - initial: Felinid - type: Fixtures fixtures: # TODO: This needs a second fixture just for mob collisions. fix1: diff --git a/Resources/Prototypes/Nyanotrasen/Species/Oni.yml b/Resources/Prototypes/Nyanotrasen/Species/Oni.yml index 79d7e2b86f8..f4312009154 100644 --- a/Resources/Prototypes/Nyanotrasen/Species/Oni.yml +++ b/Resources/Prototypes/Nyanotrasen/Species/Oni.yml @@ -6,6 +6,7 @@ dollPrototype: MobOniDummy markingLimits: MobOniMarkingLimits sprites: MobHumanSprites + defaultSkinTone: "#ab5150" skinColoration: Hues maleFirstNames: names_oni_male femaleFirstNames: names_oni_female diff --git a/Resources/Prototypes/Nyanotrasen/Species/felinid.yml b/Resources/Prototypes/Nyanotrasen/Species/felinid.yml index ad92ea8046f..2bb8d02c471 100644 --- a/Resources/Prototypes/Nyanotrasen/Species/felinid.yml +++ b/Resources/Prototypes/Nyanotrasen/Species/felinid.yml @@ -4,6 +4,7 @@ roundStart: true prototype: MobFelinid sprites: MobHumanSprites + defaultSkinTone: "#c0967f" markingLimits: MobFelinidMarkingLimits dollPrototype: MobFelinidDummy skinColoration: HumanToned diff --git a/Resources/Prototypes/Species/arachne.yml b/Resources/Prototypes/Species/arachne.yml index fff75454fcb..1a80cb43590 100644 --- a/Resources/Prototypes/Species/arachne.yml +++ b/Resources/Prototypes/Species/arachne.yml @@ -4,6 +4,7 @@ roundStart: true # I'll kill these issues somehow. prototype: MobArachne sprites: MobArachneSprites + defaultSkinTone: "#c0967f" markingLimits: MobArachneMarkingLimits dollPrototype: MobArachneDummy skinColoration: HumanToned diff --git a/Resources/Prototypes/Species/dwarf.yml b/Resources/Prototypes/Species/dwarf.yml index d32f1e6476a..f501884e99b 100644 --- a/Resources/Prototypes/Species/dwarf.yml +++ b/Resources/Prototypes/Species/dwarf.yml @@ -4,6 +4,7 @@ roundStart: false # DeltaV - Disable dwarf prototype: MobDwarf sprites: MobHumanSprites + defaultSkinTone: "#c0967f" markingLimits: MobHumanMarkingLimits dollPrototype: MobDwarfDummy skinColoration: HumanToned diff --git a/Resources/Prototypes/Species/harpy.yml b/Resources/Prototypes/Species/harpy.yml index 1b61ebdd76f..da23fb2a01d 100644 --- a/Resources/Prototypes/Species/harpy.yml +++ b/Resources/Prototypes/Species/harpy.yml @@ -4,6 +4,7 @@ roundStart: true prototype: MobHarpy sprites: MobHarpySprites + defaultSkinTone: "#c0967f" markingLimits: MobHarpyMarkingLimits dollPrototype: MobHarpyDummy skinColoration: HumanToned diff --git a/Resources/Prototypes/Species/human.yml b/Resources/Prototypes/Species/human.yml index cc304a6eeb1..9c5083de23b 100644 --- a/Resources/Prototypes/Species/human.yml +++ b/Resources/Prototypes/Species/human.yml @@ -4,6 +4,7 @@ roundStart: true prototype: MobHuman sprites: MobHumanSprites + defaultSkinTone: "#c0967f" markingLimits: MobHumanMarkingLimits dollPrototype: MobHumanDummy skinColoration: HumanToned diff --git a/Resources/Prototypes/Species/ipc.yml b/Resources/Prototypes/Species/ipc.yml index 6c3a8266940..c4361d65f36 100644 --- a/Resources/Prototypes/Species/ipc.yml +++ b/Resources/Prototypes/Species/ipc.yml @@ -4,6 +4,7 @@ roundStart: true prototype: MobIPC sprites: MobIPCSprites + defaultSkinTone: "#aaa9ad" markingLimits: MobIPCMarkingLimits dollPrototype: MobIPCDummy skinColoration: Hues From f6dec101f47872557c7b96d9757e2e6b113c602b Mon Sep 17 00:00:00 2001 From: SimpleStation Changelogs Date: Tue, 7 Jan 2025 17:03:11 +0000 Subject: [PATCH 02/16] Automatic Changelog Update (#1454) --- Resources/Changelog/Changelog.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index da6e4e20581..b3b5615535c 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -9367,3 +9367,12 @@ Entries: id: 6644 time: '2025-01-07T04:08:32.0000000+00:00' url: https://github.com/Simple-Station/Einstein-Engines/pull/1446 +- author: Spatison + changes: + - type: Fix + message: Humanoid color in the spawn panel is now correct. + - type: Fix + message: IPCs can no longer spawn invisible. + id: 6645 + time: '2025-01-07T17:02:45.0000000+00:00' + url: https://github.com/Simple-Station/Einstein-Engines/pull/1454 From 990a57cc77fd535f39826b125b59054e75dfcfb9 Mon Sep 17 00:00:00 2001 From: RadsammyT <32146976+RadsammyT@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:15:10 -0500 Subject: [PATCH 03/16] Make Non-Verbal Langs Not Play Speech (#1448) # Description Makes non-verbal languages no longer emit speech sounds. Ported from [Goob-Station-MRP#29](https://github.com/Goob-Station/Goob-Station-MRP/pull/29) at @angelofallars's request. ---

Media

![PR Example](https://github.com/user-attachments/assets/8be6b705-eff7-4e2e-ab53-5648dccfc7eb)

--- # Changelog :cl: - tweak: Languages that don't require speech (I.E. Sign Language) will no longer play speech sounds. --------- Signed-off-by: RadsammyT <32146976+RadsammyT@users.noreply.github.com> Co-authored-by: Skubman Co-authored-by: flyingkarii <123355664+flyingkarii@users.noreply.github.com> Co-authored-by: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com> Co-authored-by: SimpleStation Changelogs --- Content.Server/Speech/SpeechNoiseSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Speech/SpeechNoiseSystem.cs b/Content.Server/Speech/SpeechNoiseSystem.cs index 5530f3fe57a..071b1569071 100644 --- a/Content.Server/Speech/SpeechNoiseSystem.cs +++ b/Content.Server/Speech/SpeechNoiseSystem.cs @@ -60,7 +60,7 @@ public override void Initialize() private void OnEntitySpoke(EntityUid uid, SpeechComponent component, EntitySpokeEvent args) { - if (component.SpeechSounds == null) + if (component.SpeechSounds == null || !args.Language.SpeechOverride.RequireSpeech) return; var currentTime = _gameTiming.CurTime; From 53533639d70e024459b1b477750f17422bf30c07 Mon Sep 17 00:00:00 2001 From: SimpleStation Changelogs Date: Tue, 7 Jan 2025 17:15:37 +0000 Subject: [PATCH 04/16] Automatic Changelog Update (#1448) --- Resources/Changelog/Changelog.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index b3b5615535c..f378be8ab8c 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -9376,3 +9376,12 @@ Entries: id: 6645 time: '2025-01-07T17:02:45.0000000+00:00' url: https://github.com/Simple-Station/Einstein-Engines/pull/1454 +- author: RadsammyT + changes: + - type: Tweak + message: >- + Languages that don't require speech (I.E. Sign Language) will no longer + play speech sounds. + id: 6646 + time: '2025-01-07T17:15:10.0000000+00:00' + url: https://github.com/Simple-Station/Einstein-Engines/pull/1448 From a05bbce7491677a27656fd67ee72fb8dbdb4c53c Mon Sep 17 00:00:00 2001 From: John Willis <143434770+CerberusWolfie@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:23:36 -0500 Subject: [PATCH 05/16] [Port] Add Time Transfer Panel From Goobstation (#1429) # Description This adds the Time Transfer Panel that Goobstation uses. This panel enables Admins to do Time Transfers without commands and makes their lives easier. This immediately has access to all playtime trackers and allows an Admin to Add Time and/or Set Time (overwriting the previous time) for any job role. It also enables extra strings since I ported from Wizden upstream as well, which can be seen in the commit history. A thing of note when testing this and using it in a server: the times **DO NOT UPDATE** for Client until your **RELOG**. This is how it works on Goobstation as well. The time adding process is faster and will be easier tool. This is tied to the AdminFlags.Admin so it can be customized on a per-server basis if a custom flag is added. --- # TODO - [x] Port Upstream Role Define. - [x] Port string extras for playtime commands. - [x] Port Time Transfer Panel - [x] Remove Overall (it just doesn't work on Goob either). ---

Media

![image](https://github.com/user-attachments/assets/e9a50f41-9440-474b-b06f-a4387f12ae0b) ![image](https://github.com/user-attachments/assets/31dc2f1e-f1be-4489-bd6f-9390dfee4e72) ![image](https://github.com/user-attachments/assets/f2507f9a-f4a6-4d64-b554-e648e87ff16f) ![image](https://github.com/user-attachments/assets/724fa5c7-9abf-43e0-9eb0-af4484d00f03) ![image](https://github.com/user-attachments/assets/127e6a39-d0e8-426e-95d7-13f46ca40e17) ![image](https://github.com/user-attachments/assets/3856780a-75ca-4804-8832-1b8eed0be8d2) ![image](https://github.com/user-attachments/assets/eb9b9e88-c6fe-4755-a244-6af5b06acb54) ![image](https://github.com/user-attachments/assets/d0960206-2501-4afa-b030-e00ff0a44c01) ![image](https://github.com/user-attachments/assets/891df87e-d8c4-4c6d-a599-9706d592770e)

--- # Changelog :cl: ADMIN: - add: Add Time Transfer Panel --------- Co-authored-by: BombasterDS <115770678+BombasterDS@users.noreply.github.com> Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Co-authored-by: flyingkarii <123355664+flyingkarii@users.noreply.github.com> --- .../UI/Tabs/AdminTab/AdminTab.xaml | 1 + .../TimeTransferPanel/TimeTransferEntry.xaml | 28 +++ .../TimeTransferEntry.xaml.cs | 46 ++++ .../TimeTransferPanel/TimeTransferPanel.xaml | 44 ++++ .../TimeTransferPanel.xaml.cs | 210 ++++++++++++++++++ .../TimeTransferPanel/TimeTransferPanelEui.cs | 44 ++++ .../Commands/PlayTimeCommands.cs | 103 +++++++-- .../PlayTimeTrackingManager.cs | 13 ++ .../Commands/TimeTransferPanelCommand.cs | 25 +++ .../Administration/TimeTransferPanelEui.cs | 141 ++++++++++++ .../Administration/TimeTransferPanelEui.cs | 61 +++++ .../administration/time_transfer.ftl | 23 ++ 12 files changed, 725 insertions(+), 14 deletions(-) create mode 100644 Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferEntry.xaml create mode 100644 Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferEntry.xaml.cs create mode 100644 Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferPanel.xaml create mode 100644 Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferPanel.xaml.cs create mode 100644 Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferPanelEui.cs create mode 100644 Content.Server/_Goobstation/Administration/Commands/TimeTransferPanelCommand.cs create mode 100644 Content.Server/_Goobstation/Administration/TimeTransferPanelEui.cs create mode 100644 Content.Shared/_Goobstation/Administration/TimeTransferPanelEui.cs create mode 100644 Resources/Locale/en-US/_Goobstation/administration/time_transfer.ftl diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/AdminTab.xaml b/Content.Client/Administration/UI/Tabs/AdminTab/AdminTab.xaml index 8b68487547f..c5452731fc9 100644 --- a/Content.Client/Administration/UI/Tabs/AdminTab/AdminTab.xaml +++ b/Content.Client/Administration/UI/Tabs/AdminTab/AdminTab.xaml @@ -16,6 +16,7 @@ + diff --git a/Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferEntry.xaml b/Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferEntry.xaml new file mode 100644 index 00000000000..d6bbb49c196 --- /dev/null +++ b/Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferEntry.xaml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferEntry.xaml.cs b/Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferEntry.xaml.cs new file mode 100644 index 00000000000..0c3d1da604a --- /dev/null +++ b/Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferEntry.xaml.cs @@ -0,0 +1,46 @@ +using Content.Shared.Roles; +using Content.Shared.StatusIcon; +using Robust.Client.AutoGenerated; +using Robust.Client.GameObjects; +using Robust.Client.UserInterface.Controls; +using Robust.Client.UserInterface.XAML; +using Robust.Shared.Prototypes; + +namespace Content.Client._Goobstation.Administration.UI.TimeTransferPanel; + +[GenerateTypedNameReferences] +public sealed partial class TimeTransferEntry : BoxContainer +{ + public string PlaytimeTracker; + public string JobName; + + public TimeTransferEntry(JobPrototype jobProto, SpriteSystem spriteSystem, IPrototypeManager prototypeManager) + { + RobustXamlLoader.Load(this); + IoCManager.InjectDependencies(this); + + PlaytimeTracker = jobProto.PlayTimeTracker; + JobLabel.Text = jobProto.LocalizedName; + JobName = jobProto.LocalizedName; + + if (prototypeManager.TryIndex(jobProto.Icon, out var jobIcon)) + JobIcon.Texture = spriteSystem.Frame0(jobIcon.Icon); + } + + public void UpdateGroupVisibility(bool inGrouped) + { + TimeLabel.Visible = !inGrouped; + TimeEdit.Visible = !inGrouped; + GroupCheckbox.Visible = inGrouped; + } + + public string GetJobTimeString() + { + return TimeEdit.Text != null ? TimeEdit.Text : ""; + } + + public bool InGroup() + { + return GroupCheckbox.Pressed; + } +} diff --git a/Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferPanel.xaml b/Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferPanel.xaml new file mode 100644 index 00000000000..2c3d99e2f88 --- /dev/null +++ b/Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferPanel.xaml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + +