Closed Bumber64 closed 3 weeks ago
Need to apply this to existing functions (e.g., Units::isUnitInBox
and Units::getUnitsInBox
, as well as plugins that iterate map tiles).
Should a class with only public members more properly be a struct, or is it weirder to have a struct with member functions?
Should a class with only public members more properly be a struct, or is it weirder to have a struct with member functions?
I don't have an opinion one way or the other here. I'd say do whatever feels natural.
Implement an iterator that operates on all
df::coord
s within a cuboid box. Iterates in the direction of x/y/z provided (rather than always min to max.) By default iterates per z-level, but has an option to iterate in the z direction first. Closes #4596Cuboid class for defining a cuboid of tiles. Can test if a coord is inside itself. Can be expanded to contain a given coord. Has a method to call the above iterator using the defined cuboid. Closes #4595
Also update plugins to use
plant_type
enum attrs, since we're removing thecuboid
struct fromplugins/plant.cpp
in this PR anyway.