Skip to content

Commit 122da1a

Browse files
authored
Svalinn Sprite Fix, Ported New Glass Floors, More ChemMaster Buttons, Added Expeditionary Ship Maps (Except Foxhunt) (#211)
<!-- Guidelines: https://docs.spacestation14.io/en/getting-started/pr-guideline --> ## About the PR <!-- What did you change? --> <!-- If this is a code change, summarize at high level how your new code works. This makes it easier to review. --> - Fixed Svalinn Laser Pistol Sprite Boundary Clipping - Added New (`10`,`15`) Reagent Buttons to ChemMaster4000 - Ported New Glass Floor Tiles [Frontier (new-frontiers-14/frontier-station-14/pull/3712)] - Added Ship Maps for `Bossman`, `Clam`, `Crapbucket`, `Littora`, `Torque` *Note: Skipped `Foxhunt` for now, it may be changed soon.* ## Why / Balance <!-- Discuss how this would affect game balance or explain why it was changed. Link any relevant discussions or issues. --> Part of the ever-growing todo list of changes, these are conveniences. Fixes #180 Resolves #180 ## How to Test <!-- Describe the way it can be tested --> ## Media <!-- Attach media if the PR makes ingame changes (clothing, items, features, etc). You may remove this if this PR is only about Small fixes/refactors. Media may be used in SS14 progress reports with credit. --> <img width="128" height="96" alt="clam" src="https://github.com/user-attachments/assets/d530bead-fc0e-41e3-9392-2d10687b2fe1" /> <img width="128" height="96" alt="torque" src="https://github.com/user-attachments/assets/7b9e140a-49d1-46d6-9929-6f0573a5490e" /> <img width="128" height="96" alt="littora" src="https://github.com/user-attachments/assets/8fe5704d-93f2-4678-872c-7ff7104b8f99" /> <img width="128" height="96" alt="crapbucket" src="https://github.com/user-attachments/assets/034bbd55-df15-4563-bc4f-9b1f7d1b8b1a" /> <img width="128" height="96" alt="bossman" src="https://github.com/user-attachments/assets/fd304448-4d78-4292-8cbc-ff65205125bf" /> ## Requirements <!-- Confirm the following by placing an X in the brackets [X]: --> - [X] I have read and am following the [Pull Request and Changelog Guidelines](https://docs.spacestation14.com/en/general-development/codebase-info/pull-request-guidelines.html). - [X] I have added media to this PR or it does not require an ingame showcase. - [X] I have read the [Null Sector Bible](https://docs.google.com/document/d/1KWj932ajnTZ7PjBH1D_U1bcHJWaYCDkXgrn-K7vc7CA/edit?usp=sharing)'s guidelines on making a PR, and do solemnly swear that I am not pushing a broken work that'll brick the repository. <!-- You should understand that not following the above may get your PR closed at maintainer’s discretion --> ## Breaking Changes (For Other Forks) <!-- List any breaking changes that other forks may experience, including namespaces, public class/method/field changes, prototype renames; and provide instructions for fixing them. --> Theres at least one person on Mono who may hate this, and get very angry. I wish them the best of luck on their road to emotional recovery.
1 parent eb8afb4 commit 122da1a

File tree

32 files changed

+311
-45
lines changed

32 files changed

+311
-45
lines changed

Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1+
using System.Linq;
2+
using System.Numerics;
13
using Content.Client.Stylesheets;
24
using Content.Client.UserInterface.Controls;
35
using Content.Shared.Chemistry;
46
using Content.Shared.Chemistry.Reagent;
7+
using Content.Shared.FixedPoint;
58
using Robust.Client.AutoGenerated;
9+
using Robust.Client.Graphics;
610
using Robust.Client.UserInterface;
711
using Robust.Client.UserInterface.Controls;
812
using Robust.Client.UserInterface.XAML;
913
using Robust.Client.Utility;
1014
using Robust.Shared.Prototypes;
1115
using Robust.Shared.Utility;
12-
using System.Linq;
13-
using System.Numerics;
14-
using Content.Shared.FixedPoint;
15-
using Robust.Client.Graphics;
1616
using static Robust.Client.UserInterface.Controls.BoxContainer;
1717

1818
namespace Content.Client.Chemistry.UI
@@ -47,14 +47,15 @@ public ChemMasterWindow()
4747
{
4848
// For every button decide which stylebase to have
4949
// Every row has 10 buttons
50-
String styleBase = StyleBase.ButtonOpenBoth;
51-
uint modulo = i % 10;
52-
if (i > 0 && modulo == 0)
53-
styleBase = StyleBase.ButtonOpenRight;
54-
else if (i > 0 && modulo == 9)
55-
styleBase = StyleBase.ButtonOpenLeft;
56-
else if (i == 0)
57-
styleBase = StyleBase.ButtonOpenRight;
50+
var styleBase = StyleBase.ButtonOpenBoth;
51+
var modulo = i % 10;
52+
styleBase = i switch
53+
{
54+
> 0 when modulo == 0 => StyleBase.ButtonOpenRight,
55+
> 0 when modulo == 9 => StyleBase.ButtonOpenLeft,
56+
0 => StyleBase.ButtonOpenRight,
57+
_ => styleBase,
58+
};
5859

5960
// Generate buttons
6061
PillTypeButtons[i] = new Button
@@ -67,7 +68,7 @@ public ChemMasterWindow()
6768

6869
// Generate buttons textures
6970
var specifier = new SpriteSpecifier.Rsi(resourcePath, "pill" + (i + 1));
70-
TextureRect pillTypeTexture = new TextureRect
71+
var pillTypeTexture = new TextureRect
7172
{
7273
Texture = specifier.Frame0(),
7374
TextureScale = new Vector2(1.75f, 1.75f),
@@ -103,14 +104,16 @@ private ReagentButton MakeReagentButton(string text, ChemMasterReagentAmount amo
103104
private List<ReagentButton> CreateReagentTransferButtons(ReagentId reagent, bool isBuffer, bool addReagentButtons)
104105
{
105106
if (!addReagentButtons)
106-
return new List<ReagentButton>(); // Return an empty list if reagentTransferButton creation is disabled.
107+
return []; // Return an empty list if reagentTransferButton creation is disabled.
107108

108109
var buttonConfigs = new (string text, ChemMasterReagentAmount amount, string styleClass)[]
109110
{
110111
("1", ChemMasterReagentAmount.U1, StyleBase.ButtonOpenBoth),
111112
("5", ChemMasterReagentAmount.U5, StyleBase.ButtonOpenBoth),
112113
("10", ChemMasterReagentAmount.U10, StyleBase.ButtonOpenBoth),
114+
("15", ChemMasterReagentAmount.U15, StyleBase.ButtonOpenBoth),
113115
("25", ChemMasterReagentAmount.U25, StyleBase.ButtonOpenBoth),
116+
("30", ChemMasterReagentAmount.U30, StyleBase.ButtonOpenBoth),
114117
("50", ChemMasterReagentAmount.U50, StyleBase.ButtonOpenBoth),
115118
("100", ChemMasterReagentAmount.U100, StyleBase.ButtonOpenBoth),
116119
(Loc.GetString("chem-master-window-buffer-all-amount"), ChemMasterReagentAmount.All, StyleBase.ButtonOpenLeft),
@@ -392,7 +395,7 @@ private Control BuildReagentRow(Color reagentColor, int rowCount, string name, R
392395
{
393396
rowContainer.AddChild(reagentTransferButton);
394397
}
395-
//Apply panencontainer to allow for striped rows
398+
//Apply PanelContainer to allow for striped rows
396399
return new PanelContainer
397400
{
398401
PanelOverride = new StyleBoxFlat(currentRowColor),

Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public void UpdateReagentsList(List<ReagentInventoryItem> inventory)
4242

4343
ReagentList.Children.Clear();
4444
//Sort inventory by reagentLabel
45-
inventory.Sort((x, y) => x.ReagentLabel.CompareTo(y.ReagentLabel));
45+
inventory.Sort((x, y)
46+
=> string.Compare(x.ReagentLabel, y.ReagentLabel, StringComparison.Ordinal));
4647

4748
foreach (var item in inventory)
4849
{
@@ -59,7 +60,7 @@ public void UpdateReagentsList(List<ReagentInventoryItem> inventory)
5960
/// <param name="state">State data sent by the server.</param>
6061
public void UpdateState(BoundUserInterfaceState state)
6162
{
62-
var castState = (ReagentDispenserBoundUserInterfaceState) state;
63+
var castState = (ReagentDispenserBoundUserInterfaceState)state;
6364
UpdateContainerInfo(castState);
6465
UpdateReagentsList(castState.Inventory);
6566

@@ -77,8 +78,10 @@ public void UpdateState(BoundUserInterfaceState state)
7778
/// Update the fill state and list of reagents held by the current reagent container, if applicable.
7879
/// <para>Also highlights a reagent if it's dispense button is being mouse hovered.</para>
7980
/// </summary>
80-
/// <param name="state">State data for the dispenser.</param>
81-
/// or null if no button is being hovered.</param>
81+
/// <param name="state">
82+
/// State data for the dispenser,
83+
/// or null if no button is being hovered.
84+
/// </param>
8285
public void UpdateContainerInfo(ReagentDispenserBoundUserInterfaceState state)
8386
{
8487
ContainerInfo.Children.Clear();
@@ -87,7 +90,8 @@ public void UpdateContainerInfo(ReagentDispenserBoundUserInterfaceState state)
8790
{
8891
ContainerInfoName.Text = "";
8992
ContainerInfoFill.Text = "";
90-
ContainerInfo.Children.Add(new Label { Text = Loc.GetString("reagent-dispenser-window-no-container-loaded-text") });
93+
ContainerInfo.Children.Add(new Label
94+
{ Text = Loc.GetString("reagent-dispenser-window-no-container-loaded-text") });
9195
return;
9296
}
9397

@@ -116,7 +120,7 @@ public void UpdateContainerInfo(ReagentDispenserBoundUserInterfaceState state)
116120
{
117121
nameLabel,
118122
quantityLabel,
119-
}
123+
},
120124
});
121125
}
122126
}

Content.Shared/Chemistry/SharedChemMaster.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ public enum ChemMasterReagentAmount
112112
U1 = 1,
113113
U5 = 5,
114114
U10 = 10,
115+
U15 = 15,
115116
U25 = 25,
117+
U30 = 30,
116118
U50 = 50,
117119
U100 = 100,
118120
All,

Resources/Locale/en-US/_Null/guidebook/guides_shipyard.ftl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ guide-entry-shipyard-framework = The Humble Framework (Civil/Scrap)
99
1010
# Expedition
1111
guide-entry-shipyard-archon = Archon (Expedition)
12-
guide-entry-shipyard-crapbucket = Crapbucket (Expedition)
12+
guide-entry-shipyard-bossman = Bossman (Expedition)
13+
guide-entry-shipyard-clam = Clam (Piracy)
14+
guide-entry-shipyard-crapbucket = Crapbucket (Piracy)
1315
guide-entry-shipyard-foxhunt = Foxhunt (Expedition)
1416
guide-entry-shipyard-littora = Littora (Expedition)
1517
guide-entry-shipyard-pisces = Pisces (Expedition)
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
tiles-wood-parquet = wood parquet
1+
tiles-wood-parquet = wood parquet
2+
tiles-plasma-glass-floor = plasma glass floor
3+
tiles-reinforced-plasma-glass-floor = reinforced plasma glass floor
4+
tiles-uranium-glass-floor = uranium floor
5+
tiles-reinforced-uranium-glass-floor = reinforced uranium floor

Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@
226226
- type: Construction
227227
graph: Glass
228228
node: SheetPGlass
229+
# Frontier : Placable Plasma glass floor tile
230+
- type: FloorTile
231+
outputs:
232+
- FloorPGlass
233+
# End Frontier
229234
- type: Destructible
230235
thresholds:
231236
- trigger:
@@ -298,6 +303,11 @@
298303
map: ["base"]
299304
- type: Item
300305
heldPrefix: rpglass
306+
# Frontier : Placable reinforced plasma glass floor tile
307+
- type: FloorTile
308+
outputs:
309+
- FloorRPGlass
310+
# End Frontier
301311
- type: Construction
302312
graph: Glass
303313
node: SheetRPGlass
@@ -353,6 +363,11 @@
353363
map: ["base"]
354364
- type: Item
355365
heldPrefix: uglass
366+
# Frontier : Placable Uranium glass
367+
- type: FloorTile
368+
outputs:
369+
- FloorUGlass
370+
# End Frontier
356371
- type: Construction
357372
graph: Glass
358373
node: SheetUGlass
@@ -427,6 +442,11 @@
427442
map: ["base"]
428443
- type: Item
429444
heldPrefix: ruglass
445+
# Frontier : Placable Reinforced Uranium Glass
446+
- type: FloorTile
447+
outputs:
448+
- FloorRUGlass
449+
# End Frontier
430450
- type: Construction
431451
graph: Glass
432452
node: SheetRUGlass

Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@
136136
fireRate: 2.5
137137
- type: Item
138138
sprite: Objects/Weapons/Guns/Battery/svalinn.rsi
139+
size: Small
140+
shape:
141+
- 0,0,1,0
142+
- 0,1,0,1
143+
storedOffset: 0,-8
139144
- type: MagazineVisuals
140145
magState: mag
141146
steps: 5

Resources/Prototypes/_Null/Guidebook/shipyard_entries.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,22 @@
99
- ShipyardArachnid
1010
- ShipyardArchon
1111
- ShipyardBison
12+
- ShipyardBossman
1213
- ShipyardBucket
1314
- ShipyardCamper
15+
- ShipyardClam
16+
- ShipyardCrapbucket
1417
- ShipyardClemency
1518
- ShipyardColdcap
1619
- ShipyardDuran
1720
- ShipyardHelio
1821
- ShipyardIapetus
1922
- ShipyardInsight
2023
- ShipyardJudiciary
24+
- ShipyardLittora
2125
- ShipyardMoonlight
2226
- ShipyardNourishment
2327
- ShipyardNugget
2428
- ShipyardPulse
2529
- ShipyardSabine
30+
- ShipyardTorque

Resources/Prototypes/_Null/Guidebook/shuttle_maps.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@
5656
- type: Sprite
5757
state: bison
5858

59+
- type: entity
60+
parent: ShuttleMapBase
61+
id: ShuttleMapBossman
62+
categories: [ HideSpawnMenu ]
63+
components:
64+
- type: Sprite
65+
state: bossman
66+
5967
- type: entity
6068
parent: ShuttleMapBase
6169
id: ShuttleMapBucket
@@ -72,6 +80,22 @@
7280
- type: Sprite
7381
state: camper
7482

83+
- type: entity
84+
parent: ShuttleMapBase
85+
id: ShuttleMapClam
86+
categories: [ HideSpawnMenu ]
87+
components:
88+
- type: Sprite
89+
state: clam
90+
91+
- type: entity
92+
parent: ShuttleMapBase
93+
id: ShuttleMapCrapbucket
94+
categories: [ HideSpawnMenu ]
95+
components:
96+
- type: Sprite
97+
state: crapbucket
98+
7599
- type: entity
76100
parent: ShuttleMapBase
77101
id: ShuttleMapClemency
@@ -96,6 +120,14 @@
96120
- type: Sprite
97121
state: duran
98122

123+
- type: entity
124+
parent: ShuttleMapBase
125+
id: ShuttleMapLittora
126+
categories: [ HideSpawnMenu ]
127+
components:
128+
- type: Sprite
129+
state: littora
130+
99131
- type: entity
100132
parent: ShuttleMapBase
101133
id: ShuttleMapMoonlight
@@ -118,4 +150,12 @@
118150
categories: [ HideSpawnMenu ]
119151
components:
120152
- type: Sprite
121-
state: nugget
153+
state: nugget
154+
155+
- type: entity
156+
parent: ShuttleMapBase
157+
id: ShuttleMapTorque
158+
categories: [ HideSpawnMenu ]
159+
components:
160+
- type: Sprite
161+
state: torque

Resources/Prototypes/_Null/Shipyard/Expedition/Bossman.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@
1313
category: small
1414
group: Expedition
1515
shuttlePath: /Maps/_Null/Shuttles/Expedition/bossman.yml
16-
guidebookPage: null
16+
guidebookPage: ShipyardBossman
1717
class:
1818
- Expedition
1919
engine:
2020
- Uranium
2121

22+
- type: guideEntry
23+
id: ShipyardBossman
24+
name: guide-entry-shipyard-bossman
25+
text: "/ServerInfo/_Null/Guidebook/Shipyard/Bossman.xml"
26+
2227
- type: gameMap
2328
id: Bossman
2429
mapName: 'Bossman'

0 commit comments

Comments
 (0)