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

FTL coordinate disk command for admins: ftldisk #28075

Merged
merged 28 commits into from
Oct 16, 2024

Conversation

IProduceWidgets
Copy link
Contributor

@IProduceWidgets IProduceWidgets commented May 16, 2024

About the PR

Expand NanoTrasen's dominion over all time and space once more.

Why / Balance

Let the admins play with shuttles across multiple maps with less micromanagement.

Technical details

Takes a list of EntIDs, checks if theyre a map, if they aren't, finds the map they are on, then makes sure the map is setup as a destination, and finally spawns a disk setup for the map.

Media

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

Breaking changes

Changelog

:ADMIN:

  • add: new command "ftldisk [EntID]" to make coordinate disks for shuttles to go to other maps.

@IProduceWidgets
Copy link
Contributor Author

Okay i cooked my master branch a bit apparently, but its fiiiiine, it'll squash.

@0x6273
Copy link
Contributor

0x6273 commented May 16, 2024

IConsoleCommand is deprecated. Use toolshed for new commands.

@IProduceWidgets
Copy link
Contributor Author

IConsoleCommand is deprecated. Use toolshed for new commands.

I thought this was backtracked?

@moonheart08
Copy link
Contributor

IConsoleCommand is deprecated. Use toolshed for new commands.

I thought this was backtracked?

Not serverside. Use toolshed for this.

@TheDoctor1977
Copy link

Is this still being worked on?

Copy link
Contributor

@metalgearsloth metalgearsloth left a comment

Choose a reason for hiding this comment

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

  • Needs updating to code standards for commands.
  • Needs a completion helper.

@metalgearsloth metalgearsloth added the S: Awaiting Changes Status: Changes are required before another review can happen label Jun 8, 2024
@IProduceWidgets
Copy link
Contributor Author

IProduceWidgets commented Jun 23, 2024

  • Needs a completion helper.

image

  • Needs updating to code standards for commands.

I've looked at this for a couple weeks, and I have no idea what you mean lmao.

@IProduceWidgets
Copy link
Contributor Author

IProduceWidgets commented Jun 23, 2024

I swapped from "Map Id" -> "Map netId" since we have two schemas

@0x6273
Copy link
Contributor

0x6273 commented Jun 23, 2024

  • Needs updating to code standards for commands.

I've looked at this for a couple weeks, and I have no idea what you mean lmao.

For new commands the standard is to use toolshed, unless there's a specific reason you need to use the old command system.

Do you need any help with porting this to toolshed?

@IProduceWidgets
Copy link
Contributor Author

  • Needs updating to code standards for commands.

I've looked at this for a couple weeks, and I have no idea what you mean lmao.

For new commands the standard is to use toolshed, unless there's a specific reason you need to use the old command system.

Do you need any help with porting this to toolshed?

If you want to be my guest. I looked into it a bit, and it seems it will need engine stuff I do not want to do, and every time I ask about it I get conflicting direction.

@github-actions github-actions bot added S: Needs Review Status: Requires additional reviews before being fully accepted and removed S: Awaiting Changes Status: Changes are required before another review can happen labels Jun 23, 2024
@Chief-Engineer
Copy link
Contributor

To my knowledge, we aren't requiring new commands to be toolshed commands, even if they're entirely serverside

@Chief-Engineer Chief-Engineer added S: Awaiting Changes Status: Changes are required before another review can happen and removed S: Needs Review Status: Requires additional reviews before being fully accepted labels Jul 1, 2024
Copy link
Contributor

@Chief-Engineer Chief-Engineer left a comment

Choose a reason for hiding this comment

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

I jumped between the "since my last review" and "all changes" views and github seemed to not like that, so apologies if anything ended up a bit messy

Content.Server/Shuttles/Commands/FTLDiskBurnerCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskBurnerCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskBurnerCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskBurnerCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskBurnerCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskBurnerCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskBurnerCommand.cs Outdated Show resolved Hide resolved
@Chief-Engineer Chief-Engineer added S: Needs Review Status: Requires additional reviews before being fully accepted and removed S: Awaiting Changes Status: Changes are required before another review can happen labels Jul 1, 2024
@IProduceWidgets
Copy link
Contributor Author

IProduceWidgets commented Jul 1, 2024

There are 3 issues you may encounter with the command, but they aren't issues with the command so much as they are issues with maps which haven't mattered until now.
I'm going to try to fix them in separate PRs, but I'll list them here for reference.

  1. The FTL map can't be FTL'ed to, probably due to the FTL console/system thinking that's a dumb idea (it kinda is, but idk maybe you want to do warp speed pirates or something).
  2. Centcom has the FTLDestinationComponent, but its not setup properly and needs to have the component's Enabled and RequireCoordinatesDisk fields set to true. Its also got a generic "Map Entity" name for the map.
    -> Done at Centcom & FTLDestination cleanup #30226
  3. Gateway Destination maps need to spawn and name an FTL point along with the gateway entity. They're surprisingly hard to get to and require a lot of fiddling with F3 or the lsmap command to tp to them to place it yourself. It does work if you do that though.

But don't worry! This just works tm for new maps you create and initialize or for your admin test area. So you could for example use this to have two stations on different maps and let the players ferry themselves between them via FTL.

@Emisse Emisse dismissed stale reviews from metalgearsloth and Chief-Engineer August 18, 2024 22:53

outdated

Copy link
Member

@SlamBamActionman SlamBamActionman left a comment

Choose a reason for hiding this comment

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

I've looked through this PR now and it seems to work as intended. Sometimes it seems like I need to add FTLdestination component to the target map or make edits to the beacons, but I feel that's something which could end up in some documentation rather than the command itself.

Don't worry about FTLing to the FTL map, as that should probably be off-limits. The parallax scrolling is caused by ships moving through it anyways, so you can't have a constant scroll just by being on the map.

Let me know once you've addressed the requested changes!

Content.Server/Shuttles/Commands/FTLDiskBurnerCommand.cs Outdated Show resolved Hide resolved
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{
if (args.Length >= 1)
return CompletionResult.FromHintOptions(CompletionHelper.MapUids(_entManager), "Map netId");
Copy link
Member

Choose a reason for hiding this comment

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

Double-check that this completion works with the current master; it seemed to me like it stopped working after merging master into my test PR branch.

Copy link
Contributor Author

@IProduceWidgets IProduceWidgets Oct 16, 2024

Choose a reason for hiding this comment

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

The completion works, someone just messed up the helper in engine so it returns null
space-wizards/RobustToolbox@26b0928#diff-fcc1817dc485c3ac2fc001b91638163a3c8e4b37a75ce4a474840e83028ac44eL147

Can't fix it here. Has to be fixed in engine. Doesn't stop the command from working though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made an engine PR to fix it, but I wouldn't hold this up on account of that. Its just a help text.
space-wizards/RobustToolbox#5495

Content.Server/Shuttles/Commands/FTLDiskBurnerCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskBurnerCommand.cs Outdated Show resolved Hide resolved
@SlamBamActionman SlamBamActionman self-assigned this Oct 15, 2024
@IProduceWidgets IProduceWidgets changed the title FTL coordinate disk command for admins: FTLdiskburner FTL coordinate disk command for admins: ftldisk Oct 16, 2024
Copy link
Member

@SlamBamActionman SlamBamActionman left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Member

@SlamBamActionman SlamBamActionman left a comment

Choose a reason for hiding this comment

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

Slart pointed out that the command should have localization to the error messages, so that has to be fixed first. Testing works well though 👍

Resources/Locale/en-US/shuttles/commands.ftl Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskCommand.cs Outdated Show resolved Hide resolved
Content.Server/Shuttles/Commands/FTLDiskCommand.cs Outdated Show resolved Hide resolved
@IProduceWidgets
Copy link
Contributor Author

Localized

@SlamBamActionman SlamBamActionman merged commit 05ac74d into space-wizards:master Oct 16, 2024
11 checks passed
Doctor-Cpu pushed a commit to Doctor-Cpu/space-station-14 that referenced this pull request Jan 24, 2025
* Add robo control comp, also de-reinforce a lot of walls.

* Revert "Add robo control comp, also de-reinforce a lot of walls."

This reverts commit b6be6b6.

* FTLdiskburner command to make FTL disks.

* Elegant failure on mistyped ID.

* even more more eleganter failures.

* foo

* bar

* I have reached completion

* prevent id confusion

* I'm givin' her all she's got captain!

* a bit more hug boxing for safe destinations.

* comments for foo

* extra thoughts.

* cleanup

* continuen't

* Improve feedback strings

* reviewer QOL

* Reviewer QOL 2

* handle easy reviews

* Add comments to clarify reviews

* howdoicode to the rescue.

* ftldisk in hand

* ftl.ftl

* funny disk case

* loc

* unusing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: Needs Review Status: Requires additional reviews before being fully accepted
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants