add a new dev options to set all research and production costs to 0 #202
Loading…
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?
Implemented in commit
571f01donmain.The toggle
A fourth sandbox tool in the dev menu, FREE COSTS ON/OFF, beside unlimited resources. Kept as its own switch rather than folded into that one: unlimited resources tests whether a price can be PAID, and this tests what happens when there is no price at all. Like the others it is refused outside a dev game, is cleared when dev mode ends, and does not survive
reset_new_game().What it zeroes
GameState.costs_are_free()is consulted by the price accessors themselves -skill_costs,skill_research_point_cost,research_costs,research_point_cost,upgrade_cost,building_costs,product_costs- which is what every purchase, every lab queue, and every price label in the UI already reads. So skill-tree unlocks, vessel unlocks, ship-lab upgrades, research points, building placement and vessel production all read zero at once, and the menus show zero rather than showing a price that is not charged.One site was reading a research price straight off its definition file instead of through the accessor (
unlock_vessel); it would have kept charging full price alone, and now goes throughresearch_point_cost()like everything else.Layout
Both sandbox rows were widened to four columns with a matching pitch, so each label now sits under the button it names - the three-column layout was about 48px out.
Verification
test_dev_menu.gdnow counts every price in the game (skills, buildings, vessel production, unlocks, upgrades) rather than sampling a few, asserts the total drops to zero with the toggle on and returns exactly when it goes off, and that a fleet with an emptied bank and hold can afford every building. Leak-into-a-normal-game check extended to the new flag.No web deployment was performed.