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

Refactor WorldMap to support functional sectors #2377

Merged
merged 25 commits into from
Jul 16, 2023

Conversation

Vankata453
Copy link
Member

@Vankata453 Vankata453 commented Jan 12, 2023

Refactored WorldMap class, which supports functional sectors. Teleporting to a different sector in the same worldmap is now possible. This removes the need for using the unintuitive in most cases alternative, which is having multiple worldmaps.

WorldMapSector is the new class which handles sectors in a worldmap. It inherits SectorBase, which is a base for the Sector class that is used in levels, but only with its basic properties and functions included. This allows WorldMapSector to be parsed using WorldMapSectorParser, which inherits SectorParser.

Teleporting from one sector to another is possible both with scripting and using teleporters.

This pull request also features some general organizations/improvements to worldmap-related code:

  • Editor worldmap object classes and main functional worldmap object classes have been merged into one for easier management.
  • A fix for the scripting issue, previously attempted to be fixed in Fix dead scripting objects when testing worldmaps #2375, is incorporated in this PR, where the approach taken is to keep a reference to each GameObject's parent GameObjectManager.

Fixes #1511.

@mrkubax10 mrkubax10 added category:code involves:scripting status:needs-review Work needs to be reviewed by other people type:bugfix Pull Requests that fix bugs. labels Jan 15, 2023
@mrkubax10
Copy link
Member

Could you fix build errors?

@Vankata453 Vankata453 marked this pull request as draft May 13, 2023 13:05
@Vankata453 Vankata453 marked this pull request as ready for review May 19, 2023 15:23
@mrkubax10
Copy link
Member

Could you fix merge conflicts?

@tobbi tobbi self-requested a review July 16, 2023 19:10
@Vankata453 Vankata453 merged commit ec6035d into SuperTux:master Jul 16, 2023
21 of 36 checks passed
@mrkubax10 mrkubax10 removed the status:needs-review Work needs to be reviewed by other people label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing worldmaps with Squirrel features from editor : tilemaps become dead objects
3 participants