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

feat(grid): Check AllowedGroundTypes when placing items #15

Merged
merged 2 commits into from
Jan 25, 2025

Conversation

finger563
Copy link
Member

Description

  • Update the Grid to implement a new function for checking whether or not the item can be placed in the grid - using the allowed ground types from the ItemData and the grid attributes (or allowing if allowed ground types is empty)
  • Minor cleanup to grid interact function
  • Allow some grid functions to be overridden
  • Update mushroom to not be able to grow on rock
  • Update map to have attributes

Motivation and Context

Closes #13

How has this been tested?

Running in play-in-editor and testing to ensure that mushroom can't be placed on stone and moss / bigmoss can't be placed on grass

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • New Art / Asset
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Art / Asset Update
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* Update the Grid to implement a new function for checking whether or not the item can be placed in the grid - using the allowed ground types from the ItemData and the grid attributes (or allowing if allowed ground types is empty)
* Minor cleanup to grid interact function
* Allow some grid functions to be overridden
* Update map to have attributes
@finger563 finger563 self-assigned this Jan 25, 2025
@finger563 finger563 added enhancement New feature or request grid subsystem labels Jan 25, 2025
@finger563 finger563 merged commit 68524aa into main Jan 25, 2025
@finger563 finger563 deleted the feat/13-check-ground-type branch January 25, 2025 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request grid subsystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update grid to check that the cell ground type(s) match the required ground type from the item data
1 participant