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

Adds the thermo-electric generator #18840

Merged
merged 30 commits into from
Aug 12, 2023
Merged

Conversation

PJB3005
Copy link
Member

@PJB3005 PJB3005 commented Aug 7, 2023

About the PR

Holy fuck it real.

Media

Content.Client_ldp8qd6RlI.mp4
  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog

🆑

  • add: Nanotrasen finally decided to give engineering departments something to do, and has finalized the schematics for the thermo-electric generator (TEG).
  • add: The TEG creates power by exchanging energy between a hot and cold gas on its two sides.
  • tweak: You can turn on gas heaters/freezers with alt-click now.
  • tweak: You can open air alarm and pump menus with activate (E) now.

@github-actions github-actions bot added Changes: Map Changes: Might require knowledge of mapping. Changes: Sprites Changes: Might require knowledge of spriting or visual design. Changes: UI Changes: Might require knowledge of UI design or code. labels Aug 7, 2023
@PJB3005 PJB3005 changed the title Basic TEG start. Adds the thermo-electric generator Aug 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

RSI Diff Bot; head commit 12e5a68 merging into 61bf951
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Markers/teg_arrow.rsi

State Old New Status
arrow Added

Resources/Textures/Structures/Machines/computers.rsi

State Old New Status
sensors Added

Resources/Textures/Structures/Power/Generation/teg.rsi

State Old New Status
circ-0-light Added
circ-0 Added
circ-1-light Added
circ-1 Added
circ-2-light Added
circ-2 Added
teg-oc00 Added
teg-oc01 Added
teg-oc10 Added
teg-oc11 Added
teg-op1 Added
teg-op10 Added
teg-op11 Added
teg-op2 Added
teg-op3 Added
teg-op4 Added
teg-op5 Added
teg-op6 Added
teg-op7 Added
teg-op8 Added
teg-op9 Added
teg Added
teg_mid Added

Edit: diff updated after 12e5a68

@mirrorcult
Copy link
Contributor

for real tegheads only

@mirrorcult
Copy link
Contributor

conflicts slightly with #18831 probably

@Just-a-Unity-Dev Just-a-Unity-Dev mentioned this pull request Aug 7, 2023
5 tasks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to this file looks like it can be merg now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what you mean?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make separate pr for it or something (we need this now!!!!)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went insane while starting my TEG every time on my test map so that's why it's here. Can't be arsed to cherry pick it. In fact, more coming up...

/// Last amount of energy added/removed from the attached pipe network
/// </summary>
[DataField("lastEnergyDelta")]
[ViewVariables(VVAccess.ReadWrite)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be RW? It looks like it should be read-only since it's written to only in the ThermoMachineSystem

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RW should be default for components IMO. Sure it's not useful, but having to pick and choose is meh.

@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@PJB3005 PJB3005 requested a review from Emisse as a code owner August 11, 2023 21:37
@github-actions github-actions bot added S: Needs Review Status: Requires additional reviews before being fully accepted labels Aug 11, 2023
@github-actions github-actions bot removed the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Aug 11, 2023
/// <summary>
/// A value in the range 0-1.
/// </summary>
/* L + */ Ratio,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:trollface:

@deltanedas
Copy link
Contributor

funny crash when deleting/deconstructing things linked to a sensor monitor console
wrap the thing in Exists(uid) first

Unhandled exception. System.Collections.Generic.KeyNotFoundException: Entity 46476 does not have a component of type Content.Server.DeviceNetwork.Components.DeviceNetworkComponent
   at Content.Server.SensorMonitoring.SensorMonitoringConsoleSystem.AtmosUpdate(EntityUid uid, SensorMonitoringConsoleComponent comp, AtmosDeviceUpdateEvent args) in Content.Server/SensorMonitoring/SensorMonitoringConsoleSystem.cs:line 293
   at Robust.Shared.GameObjects.EntityEventBus.<>c__DisplayClass47_0`2.<SubscribeLocalEvent>g__EventHandler|0(EntityUid uid, IComponent comp, TEvent& args) in RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Directed.cs:line 255
   at Robust.Shared.GameObjects.EntityEventBus.<>c__DisplayClass58_0`1.<EntSubscribe>b__0(EntityUid uid, IComponent comp, Unit& ev) in RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Directed.cs:line 393
   at Robust.Shared.GameObjects.EntityEventBus.EntDispatch(EntityUid euid, Type eventType, Unit& args, Boolean dispatchByReference) in RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Directed.cs:line 554
   at Robust.Shared.GameObjects.EntityEventBus.RaiseLocalEventCore(EntityUid uid, Unit& unitRef, Type type, Boolean broadcast, Boolean byRef) in RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Directed.cs:line 222
   at Robust.Shared.GameObjects.EntityEventBus.RaiseLocalEvent[TEvent](EntityUid uid, TEvent args, Boolean broadcast) in RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Directed.cs:line 182
   at Robust.Shared.GameObjects.EntitySystem.RaiseLocalEvent[TEvent](EntityUid uid, TEvent args, Boolean broadcast) in RobustToolbox/Robust.Shared/GameObjects/EntitySystem.cs:line 150
   at Content.Server.Atmos.EntitySystems.AtmosphereSystem.ProcessAtmosDevices(GridAtmosphereComponent atmosphere) in Content.Server/Atmos/EntitySystems/AtmosphereSystem.Processing.cs:line 339
   at Content.Server.Atmos.EntitySystems.AtmosphereSystem.UpdateProcessing(Single frameTime) in Content.Server/Atmos/EntitySystems/AtmosphereSystem.Processing.cs:line 478
   at Content.Server.Atmos.EntitySystems.AtmosphereSystem.Update(Single frameTime) in Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs:line 71
   at Robust.Shared.GameObjects.EntitySystemManager.TickUpdate(Single frameTime, Boolean noPredictions) in RobustToolbox/Robust.Shared/GameObjects/EntitySystemManager.cs:line 303
   at Robust.Shared.GameObjects.EntityManager.TickUpdate(Single frameTime, Boolean noPredictions, Histogram histogram) in RobustToolbox/Robust.Shared/GameObjects/EntityManager.cs:line 272
   at Robust.Server.GameObjects.ServerEntityManager.TickUpdate(Single frameTime, Boolean noPredictions, Histogram histogram) in RobustToolbox/Robust.Server/GameObjects/ServerEntityManager.cs:line 153
   at Robust.Server.BaseServer.Update(FrameEventArgs frameEventArgs) in RobustToolbox/Robust.Server/BaseServer.cs:line 718
   at Robust.Server.BaseServer.<SetupMainLoop>b__66_1(Object sender, FrameEventArgs args) in RobustToolbox/Robust.Server/BaseServer.cs:line 535
   at Robust.Shared.Timing.GameLoop.Run() in RobustToolbox/Robust.Shared/Timing/GameLoop.cs:line 228
   at Robust.Server.BaseServer.MainLoop() in RobustToolbox/Robust.Server/BaseServer.cs:line 562
   at Robust.Server.Program.ParsedMain(CommandLineArgs args, Boolean contentStart, ServerOptions options) in RobustToolbox/Robust.Server/Program.cs:line 78
   at Robust.Server.Program.Start(String[] args, ServerOptions options, Boolean contentStart) in RobustToolbox/Robust.Server/Program.cs:line 46
   at Robust.Server.ContentStart.Start(String[] args) in RobustToolbox/Robust.Server/ContentStart.cs:line 10
   at Content.Server.Program.Main(String[] args) in Content.Server/Program.cs:line 9

@PJB3005
Copy link
Member Author

PJB3005 commented Aug 12, 2023

funny crash when deleting/deconstructing things linked to a sensor monitor console
wrap the thing in Exists(uid) first

That wouldn't be a good fix. Best I can do is a TODO.

That said you reminded me there's similar bugs with the TEG itself. Crap.

@PJB3005
Copy link
Member Author

PJB3005 commented Aug 12, 2023

FYI @deltanedas the sensor monitoring console would still need a ton of work to make it... actually mappable. There's a reason it's so short-sighted, half-assed and filled with TODOs. I'm not intending to finish it in this PR.

@deltanedas
Copy link
Contributor

even if it shouldnt be mapped its possible an admeme might spawn it, letting someone easily crash server is bad

@Emisse
Copy link
Contributor

Emisse commented Aug 12, 2023

if an admin is dumb enough to spawn it we can just yell at them

@PJB3005
Copy link
Member Author

PJB3005 commented Aug 12, 2023

Opening it would shit up the server's network connection in its current state.

@PJB3005
Copy link
Member Author

PJB3005 commented Aug 12, 2023

image
you mean like this?

Use TimedDespawn instead. The "no show in right-click menuu" goes into a new general-purpose component.

Thanks Julian.
@PJB3005 PJB3005 requested a review from ElectroJr as a code owner August 12, 2023 08:40
@PJB3005
Copy link
Member Author

PJB3005 commented Aug 12, 2023

That said you reminded me there's similar bugs with the TEG itself. Crap.

Wait that was also sensor monitoring. My bad.

Fixed rotation on GuideEntityEmbed not working correctly.

Added Margin property to GuideEntityEmbed
So it doesn't appear in the guidebook and spawn menu.
@PJB3005 PJB3005 requested a review from EmoGarbage404 as a code owner August 12, 2023 20:20
@moonheart08 moonheart08 merged commit a242af5 into space-wizards:master Aug 12, 2023
@PJB3005 PJB3005 deleted the 23-07-29-teg branch August 12, 2023 20:43
metalgearsloth added a commit to metalgearsloth/space-station-14 that referenced this pull request Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: Map Changes: Might require knowledge of mapping. Changes: Sprites Changes: Might require knowledge of spriting or visual design. Changes: UI Changes: Might require knowledge of UI design or code. S: Needs Review Status: Requires additional reviews before being fully accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants