-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Substation Maintenance (take 3) #32550
Open
AwareFoxy
wants to merge
29
commits into
space-wizards:master
Choose a base branch
from
AwareFoxy:substation_maintenance
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 22 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
19e9654
substation wear added
joshepvodka 670358d
removed emag
joshepvodka d985825
fixed timer and added VVrw
joshepvodka 89196cf
added component to all substations
joshepvodka ff93fc9
blinking lights and screen change
joshepvodka 65b977d
added substation fuse
joshepvodka b8eaa36
fuse lifetime upgrades
joshepvodka 11d9691
fixed formatting
joshepvodka 2263549
added sprites fixed some code
joshepvodka 6cfde65
Merge branch 'master' into substation
joshepvodka 92b3a57
fixed lights and yml
joshepvodka 739f629
Merge branch 'substation' of https://github.com/joshepvodka/space-sta…
joshepvodka 9d47c0e
changed conduit material composition
joshepvodka b2dc9a6
fix some checks
joshepvodka f193cba
change item name
joshepvodka 543c273
Merge remote-tracking branch 'sub_maint_pr/substation' into substatio…
Peptide90 c2e71c0
changes all naming from conduit to nitrogen booster. Removes machine …
Peptide90 1911b09
remove plasma needs
Peptide90 09e61b4
math changes
Peptide90 dc9886e
Merge remote-tracking branch 'upstream/master' into substation_mainte…
AwareFoxy b3bb50e
Resprite screens to make it more accessible to colorblind
AwareFoxy 063cd1d
some code cleanup + cvars
AwareFoxy d12de7d
gazanalyzer error fix
AwareFoxy 0b04231
weh
AwareFoxy c118947
uh
AwareFoxy 6ff3278
some code cleanup
AwareFoxy 620c79c
goddamn
AwareFoxy c5fe7d4
meow :33
AwareFoxy 18e52e6
Merge branch 'master' into substation_maintenance
AwareFoxy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
Content.Client/Power/Substation/SubstationVisualsComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Content.Shared.Power; | ||
|
||
namespace Content.Client.Power.Substation; | ||
|
||
[RegisterComponent] | ||
public sealed partial class SubstationVisualsComponent : Component | ||
{ | ||
[DataField("screenLayer")] | ||
public string LayerMap { get; private set; } = string.Empty; | ||
|
||
[DataField] | ||
public Dictionary<SubstationIntegrityState, string> IntegrityStates = new(); | ||
} |
22 changes: 22 additions & 0 deletions
22
Content.Client/Power/Substation/SubstationVisualsSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,22 @@ | ||||||||||||||||||
using Robust.Shared.GameObjects; | ||||||||||||||||||
using Robust.Client.GameObjects; | ||||||||||||||||||
using Robust.Client.Graphics; | ||||||||||||||||||
using Content.Shared.Power; | ||||||||||||||||||
|
||||||||||||||||||
namespace Content.Client.Power.Substation; | ||||||||||||||||||
|
||||||||||||||||||
public sealed class SubstationVisualsSystem : VisualizerSystem<SubstationVisualsComponent> | ||||||||||||||||||
{ | ||||||||||||||||||
protected override void OnAppearanceChange(EntityUid uid, SubstationVisualsComponent component, ref AppearanceChangeEvent args) | ||||||||||||||||||
{ | ||||||||||||||||||
if(args.Sprite == null || !args.Sprite.LayerMapTryGet(component.LayerMap, out var layer)) | ||||||||||||||||||
return; | ||||||||||||||||||
|
||||||||||||||||||
if(args.AppearanceData.TryGetValue(SubstationVisuals.Screen, out var stateObject) | ||||||||||||||||||
Comment on lines
+12
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
&& stateObject is SubstationIntegrityState | ||||||||||||||||||
&& component.IntegrityStates.TryGetValue((SubstationIntegrityState)stateObject, out var state)) | ||||||||||||||||||
{ | ||||||||||||||||||
args.Sprite.LayerSetState(layer, new RSI.StateId(state)); | ||||||||||||||||||
} | ||||||||||||||||||
} | ||||||||||||||||||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All system methods that take
EntityUid
and one or more components should be changed to takeEntity<TComp1, TComp2, ..>
instead.