generated from tipragot/rust
Adding a map creation plugin #57
|
@ -65,7 +65,7 @@ fn generate_map(
|
||||||
// If the map is generated, we send [EndMapGeneration] and set the local
|
// If the map is generated, we send [EndMapGeneration] and set the local
|
||||||
CoCo_Sol marked this conversation as resolved
Outdated
CoCo_Sol marked this conversation as resolved
tipragot
commented
This should be in the get_type function and the value shouldn't be hard coded This should be in the get_type function and the value shouldn't be hard coded
|
|||||||
// variables to None.
|
// variables to None.
|
||||||
if let Some(position) = spiral.next() {
|
if let Some(position) = spiral.next() {
|
||||||
commands.spawn((get_type_tile(position, noise), position as TilePosition));
|
commands.spawn((get_tile_type(position, noise), position as TilePosition));
|
||||||
} else {
|
} else {
|
||||||
end_generation_writer.send(EndMapGeneration);
|
end_generation_writer.send(EndMapGeneration);
|
||||||
*local_noise = None;
|
*local_noise = None;
|
||||||
|
|
Loading…
Reference in a new issue
Why don't you use HexPosition here?
because is not a hex position in a hex grid but a position in orthogonal grid
You need to change the name of the function or take an HexPosition and convert it in the function, because it can be confusing that you use "tile" to describe the orthogonal position of an HexPosition
you are right