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

Multi gamemod support #2541

Merged
merged 15 commits into from
Dec 22, 2024
Merged

Conversation

dvir001
Copy link
Contributor

@dvir001 dvir001 commented Dec 10, 2024

About the PR

This PR aim to add the support for Pirate / Adventure / Admin events etc
By splitting the game mod code into few files, and adding support for POI per gamemod.

Why / Balance

Support for admin use for events + forks.

How to test

Open the game to lobby, swap gamemods as you wise.

Media

Requirements

Breaking changes

None, issues fixed

Changelog
Admin change so no note.

@github-actions github-actions bot added the C# label Dec 10, 2024
@github-actions github-actions bot added the YML label Dec 10, 2024
@github-actions github-actions bot added the S: Needs Review This PR is awaiting reviews label Dec 10, 2024
/// Apart from that, each of thesehave corresponding CVARS by default, that set an optional # of this group to spawn.
/// Traditionally, it is 2 cargo depots, 1 trade station, and 8 optional POIs.
/// Dynamically added groups will default to 1 option chosen in that group, using the SpawnChance as a weighted chance
/// for the entire group to spawn on a per-POI basis.
Copy link
Member

Choose a reason for hiding this comment

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

this reformatting here bulldozes IDE presenting meta data, and goes against the conventions throughout the rest of the code base

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Weird this is how its done on some other files, but I think no one fixed it
Ill fix it

Copy link
Member

Choose a reason for hiding this comment

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

yea its following convention because tags in comments like summary get handled by IDEs to create context-sensitive rich UI and generally helps broader maintainability. Most important for public APIs, so you should probably write new ones similar to others you see in the new POI system since you are now intending that system to be publicly accessable/shared

@dvir001
Copy link
Contributor Author

dvir001 commented Dec 10, 2024

Note: Right now this code cannot be used since we have an issue with UI on lobby not updating per POI unless you relog.

Have to fix it before in another PR.

Copy link
Contributor

@GreaseMonk GreaseMonk 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 as far as i can see

@dvir001
Copy link
Contributor Author

dvir001 commented Dec 11, 2024

Looks good as far as i can see

Right now there is still an issue if you do this:

  1. Change game mod from adventure to pirate in lobby, (Or other way aound) start the round.
  2. Try to join any station, cannot click anything
  3. relog, now its working again.

Something with the UI getting fucked and make it impossible to play when the game mod change and you stay in the lobby.

@GreaseMonk
Copy link
Contributor

I am able to join in both gamemodes just fine, i need to know exact console commands to reproduce them

@whatston3
Copy link
Contributor

I am able to join in both gamemodes just fine, i need to know exact console commands to reproduce them

Off the top of my head, the issue's this:

  1. startround
  2. open latejoin UI (might need to close and reopen here vs. opening once, can't recall)
  3. golobby
  4. startround

At this point, even if you close and reopen the UI, you can't join any of the stations - they're all referencing the old station entities.

It's a lifecycle issue in the PickerWindow, the fix should be registering for the LobbyJobsAvailableUpdated event in EnteredTree vs. the constructor:
b03496c#diff-75a9afa24ba0180a6b879bc577923cd247767190b2b4c1213e374fc75c7bc753

Copy link
Contributor

@whatston3 whatston3 left a comment

Choose a reason for hiding this comment

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

Largely seems reasonable, small bug, and might recommend using prototype IDs instead of generic strings.

@github-actions github-actions bot added the FTL label Dec 20, 2024
@whatston3 whatston3 marked this pull request as ready for review December 20, 2024 19:17
@whatston3
Copy link
Contributor

Pushed the POIPrototype into Content.Server (it's ignored on the client as-is), swapped over to use the prototype ID from a generic string, added the cleanup for the station positions.

Looks fine to me.

@whatston3
Copy link
Contributor

Will fix up the linter issues.

For sake of argument, a game preset vote looks like this now - can be something that actually gets used:
image

@GreaseMonk GreaseMonk merged commit 70a205f into new-frontiers-14:master Dec 22, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# FTL S: Needs Review This PR is awaiting reviews YML
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants