wintermute-cell / cowboy-gorl

0 stars 0 forks source link

Systems with growing numbers such as the Inventory or the Pop Manager should internally use float32 #8

Open wintermute-cell opened 1 year ago

wintermute-cell commented 1 year ago

Problem Description

Currently, both the Inventory and the PopManager use int32 to save things like the amount of owned Iron Ore. This way, it is not possible to add fractional values (such as 0.01 Iron Ore every frame), which causes problems when implementing collector jobs for example.

Solution

Such systems should internally use float32 to track the current amount, and expose certain getters and setters, that round to the lower integer as required.