ConstructionTask: placing a building enqueues construction #70
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder#70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of milestone #5. Depends on #66 and #67.
The first concrete task type.
Buildings.place()already carries the comment that status will become PLANNED once task management exists.AC:
Buildings.place()creates the building with status PLANNED and enqueues aConstructionTasktargeting the building's entrance cellwork_remainingstarts attype.build_timeticksbuilding_builtor a status-changed signal; decide and note in the PR)Buildingsreceives itsTaskManagerby injection from game.gd, the same way it receivesmap, so the registry still works standalone in testsAC correction, from #88 (PR #107).
This issue's second AC reads:
All three parts of that are now stale:
build_days, notbuild_time.type.build_work_ticks(), which is the single conversion site. Do not callGameCalendar.days_to_ticks()here directly, or the conversion exists twice.work_remainingcounts work actually performed, so walking to the site and hauling do not decrement it.So the line should read:
work_remainingstarts attype.build_work_ticks().One AC was also deferred from #88 to here, because it needs a task type to assert against: a
BuildingTypeauthored at N days yields the matchingwork_remainingon theConstructionTaskit produces. Worth adding to this issue's test list. The deferral is recorded intest/unit/test_building_type.gd's docstring.Note also that
colony_rocket.treshasbuild_days = 0.0deliberately — the Colony Centre lands already built. Whatever creates construction tasks should decide what a zero means: no task at all, or a task that completes on its first work tick.