-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
RoomSpawner mask #33110
Merged
TheShuEd
merged 16 commits into
space-wizards:master
from
TheShuEd:ed-01-11-2024-roomfill-update
Feb 12, 2025
Merged
RoomSpawner mask #33110
TheShuEd
merged 16 commits into
space-wizards:master
from
TheShuEd:ed-01-11-2024-roomfill-update
Feb 12, 2025
Conversation
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
Game changer |
2 tasks
metalgearsloth
requested changes
Feb 10, 2025
metalgearsloth
approved these changes
Feb 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A: Core Tech
Area: Underlying core tech for the game and the Github repository.
A: Mapping
Area: Maps, or tools used for mapping
Changes: Map
Changes: Might require knowledge of mapping.
D2: Medium
Difficulty: A good amount of codebase knowledge required.
P1: High
Priority: Higher priority than other items, but isn't an emergency.
S: Approved
Status: Reviewed and approved by at least one maintainer; a PR may require another approval.
size/L
Denotes a PR that changes 1000-4999 lines.
T: New Feature
Type: New feature or content, or extending existing content
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.
About the PR
Add tilemask for room spawning.
In the room prototype, you can specify a tile that will be ignored when transferred to the actual game. This is EXTREMELY useful for procedural generation:
right now, in the game all rooms have clear square dimensions, and are copied in their entirety. If we want to have irregularly shaped rooms, we have to do a terrible thing: stitch environment elements into the room itself. As it is done now on VGroid:
this has the disadvantage that these rooms cannot be reused, for example in generation with a different kind of stone and floor.
What I did: I added the ability to specify a tile mask that will be ignored
and now these rooms fit perfectly into any biome or asteroid:
I also removed the restriction that room spawners can only spawn rooms of 1 size. Now they can spawn rooms of any size, although the restriction can be rewritten through prototypes.
Breaking changes
RoomFillComponent ClearExisting field now
true
by default. This means that all rooms from RoomFillComponent now by default erase all entities underneath them.DungeonSystem.Rooms.cs
GetRoomPrototype
function changed frompublic DungeonRoomPrototype? GetRoomPrototype(Vector2i size, Random random, EntityWhitelist? whitelist = null)
to
public DungeonRoomPrototype? GetRoomPrototype(Random random, EntityWhitelist? whitelist = null, Vector2i? size = null)
this function now does not limit the rooms it spawns to a certain default size.
Requirements