Repository navigation
feat(fp): phone Build app that builds for the mayor who owns the land - #11
Merged
Merged
Conversation
B opens a phone with a Build app on foot: road, homes, shops, industry, a building from the service list, and bulldoze, aimed at the tile ahead (the camera's pitch sets the distance, 0.6 to 6 tiles). Each order goes through CitySim.apply_action for the mayor who owns that tile, so it is paid from that district's treasury and starts the same construction sites as the mayors' own orders. Unclaimed land, roads into another district and districts too deep in debt are refused with a toast. build_rules.gd mirrors the sim's checks for the preview: a cyan or amber ghost over the tiles, the owner, the price and why not. The phone goes away while driving or under a menu. Behind the "phone" flag, with fp_phone_test. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Automated reviewNo new findings on the 20 changed files (gdlint, complexity, TODO policy, dead code). Run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A GTA-style phone with a Build app. Press B on foot and order city work on the tile ahead of you. The order is placed for the mayor who owns that land and paid from that district's treasury.
CitySim.apply_action(owner, action). It follows the mayors' rules (it counts in theiractions_ok) and starts the same staged construction sites.build_rules.gd): read-only copies of_act_road,_act_zone,_act_build(including the nearby-lot search) and_act_bulldoze. The ghost covers the right tiles in cyan when the order can be placed and amber when not, and the phone shows the price; the sim still checks again when the order is placed. The test checks that every quote matches what the owner actually paid.drive_changed) or under any menu. It does not open in the city overview, so B still steps through sites there.phoneinscripts/fp/phone/, behind thephoneflag. The folder is not namedbuild/because the root.gitignoreignores that name.phone_toggle(B); only the[input]section ofproject.godotchanged.No gamepad binding yet: every pad button is already used on foot, so the phone is keyboard and mouse only for now.
Area
Testing
tools/gate.sh quickpassestools/gate.sh fullpasses (gameplay or rendering changes)pre-commit run --all-filespasses (on the changed files)tools/tests/New
fp_phone_test(45 checks):fp_core_testnow counts 12 features.I checked it in windowed captures at 1280x720 (third person):
The first captures caught two problems, both fixed here: a 30 cm ghost slab was almost invisible from 50 m, so it is now a slab plus a faint column, and the toast was cut off.
Checklist
feat(fp): ...,fix(sim): ...)data/feature_flags.json, or not needed (phone)