Skip to content

Conversation

@theEvilReaper
Copy link
Contributor

This pull request overhauls the current implementation of the area system from the game. The current state lacks maintainability and the encapsulation is very hard. This ends in weird code usage and other things

NOTE: DON'T MERGE THIS YET

@theEvilReaper theEvilReaper added enhancement New feature or request help wanted Extra attention is needed labels Mar 18, 2025
@theEvilReaper theEvilReaper self-assigned this Mar 18, 2025
@theEvilReaper
Copy link
Contributor Author

The current state of the pull request is that the GameArea no longer requires an Instance. We can now create the area before the instance for the game is created. To apply the data to the instance such as blocks. There is now a Placement holder class which handles adding or removing the given data in a world.

# Conflicts:
#	common/src/main/java/net/theevilreaper/tamias/common/map/GameMap.java
#	common/src/main/java/net/theevilreaper/tamias/common/map/MapPool.java
#	common/src/main/java/net/theevilreaper/tamias/common/map/MapProvider.java
#	game/src/main/java/net/theevilreaper/tamias/game/map/GameMapProvider.java
# Conflicts:
#	common/src/main/java/net/theevilreaper/tamias/common/map/GameMap.java
#	common/src/main/java/net/theevilreaper/tamias/common/map/MapPool.java
#	common/src/main/java/net/theevilreaper/tamias/common/map/MapProvider.java
#	game/src/main/java/net/theevilreaper/tamias/game/map/GameMapProvider.java
# Conflicts:
#	setup/src/main/java/net/theevilreaper/tamias/setup/data/GameData.java
#	setup/src/main/java/net/theevilreaper/tamias/setup/map/SetupMapProvider.java
@theEvilReaper theEvilReaper force-pushed the feature/reviseGameArea branch from e6882d0 to 788b17d Compare June 9, 2025 18:36
@theEvilReaper theEvilReaper merged commit c7780f2 into develop Jul 15, 2025
3 of 6 checks passed
@theEvilReaper theEvilReaper deleted the feature/reviseGameArea branch July 15, 2025 10:26
theEvilReaper added a commit that referenced this pull request Jul 15, 2025
* Rework area handling to reduce complexity

* Rework area handling to reduce complexity

* Move GroundData out of the area package

* Improve documentation and maintainability

* Simplify block replace

* Rename FinishBuildEvent to AreaFinishBuildEvent

* Remove duplicated test

* Improve how the game triggers the area placement or cleanup

* Add new area events

* Rename test class

* Improve AreCleanupEvent

* Improve area tests

* Move ground test to own package

* Rename area data class and update usage

* Improve corner block replacement check

* Add option customize the calculation process of some values

* Update tests

* Update calculation trigger

* Update method calls

* Use Collection instead of a Set as return type

* Update positions getter

* Fix block placement

* More improvements to the placement logic

* Improve placement trigger

* Fix some wrong code parts due to the rebase

* Update triggerPlacement call

* Update structure and logic from the GroundPlacement

* Improve TNTPlacement logik and add test case

* Add own class for the BlockAssertions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Feature help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants