amethyst / amethyst/rustrogueliketutorial
Town buildings are populated in wrong order
未關閉
- 主要語言
- Rust
- 星號
- 970
- 分支
- 166
- PR 合併指標
- 30 天內沒有已合併 PR
描述
My Player got spawned in a building so small, that it didn't even fit _Barkeep_, so I started investigating.
Code in _town.rs/building_factory_ is incorrect. It iterates over original `buildings` array, and uses its index to pick `build_type` form `building_index` array, which was sorted and has different indexing:
```rust
for (i, building) in buildings.iter().enumerate() {
let build_type = &building_index[i].2;
match build_type {
```
It should be changed to something like this:
```rust
for (i, _size, build_type) in building_index.iter() {
let building = &buildings[*i];
match build_type {
```
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。