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

Relocate Tasks for Building & Functions #1310

Merged
merged 5 commits into from
Jun 1, 2024
Merged

Relocate Tasks for Building & Functions #1310

merged 5 commits into from
Jun 1, 2024

Conversation

bevans2000
Copy link
Member

This PR focuses on the Task associated with Buildings. Following the #1285 objectives it does:

  • Relocates Building and Function specific Task to new packages
  • Applies the centralised ExperienceImpact pattern to reduce duplicated code and use tested logic
  • Create UnitTest for any changed Tasks

The scope is the maintain building Tasks and the Tasks associated to the Farming category.

Changes:
- Create subpackage 'task' under building and building/function
- Move appropriate Task & MetaTask to the new packages

Part of #1285
Changes:
- Create 2 new Unit Tests
- Allow MockBuilding to excluded life support
- Simplify buildFunction method in AbstractMarsSimUnitTest; Building id auto generated
- MockBuilding has a maintenance period by default
- MalfunctionManager remove unused methods
- MalfunctionManager exposes the number of completed maintenance

Part of #1285
@bevans2000 bevans2000 added this to the 3.8.0 milestone Jun 1, 2024
Changes:
- Create UnitTest for HouseKeeping class
- HouseKeeping records the cumulative work
- Create new TendHousekeeping Task that perform the inspect & cleaning operations
- TendFishTank, TendAlgaePond & TendGreenhouse arre subclassed from new TendHousekeeping class
	- Remove duplicated base code from subclasses
- Greenhouse, Fishery & AlgaeFarming expose the HouseKeeping attribute but remove the repeated delegated methods
- Update relevant Console conmand
- Farming category tasks use the ExperiemceImpact handles logic

Note this a problem in the Research class and how it handles tissue needing inspection because nothing never gets added
Plus the Crop logic should not be in the generic Research class. See #1312

Part of #1285
@bevans2000 bevans2000 changed the title Building issue1285 Relocate Task for Building & Functions Jun 1, 2024
@bevans2000 bevans2000 changed the title Relocate Task for Building & Functions Relocate Tasks for Building & Functions Jun 1, 2024
@bevans2000 bevans2000 marked this pull request as ready for review June 1, 2024 12:26
@bevans2000 bevans2000 requested a review from mokun June 1, 2024 12:26
@mokun mokun added this pull request to the merge queue Jun 1, 2024
Merged via the queue into master with commit dfaea0e Jun 1, 2024
3 checks passed
@bevans2000 bevans2000 deleted the building_issue1285 branch June 9, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants