amethyst / amethyst/rustrogueliketutorial

Chapter 69 - Crash due to missing proc_target when using "weapon trait" items

未關閉
#208 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Rust
星號
970
分支
166
PR 合併指標
30 天內沒有已合併 PR

描述

This line seems to crash the game if the player uses "weapon trait" generated weapons:
https://github.com/amethyst/rustrogueliketutorial/blob/33872fe582f226178436847e1f74eafcbf9c0d1a/chapter-69-mushrooms2/src/melee_combat_system.rs#L128

There doesn't seem to be anywhere that sets the correct `proc_target` in the generation code:
https://github.com/amethyst/rustrogueliketutorial/blob/33872fe582f226178436847e1f74eafcbf9c0d1a/chapter-69-mushrooms2/src/raws/rawmaster.rs#L160-L186

My guess is this gets fixed in a later chapter, but it would be nice if that was mentioned here. If this wasn't intentional, I think either adding something like `weapon.proc_target = Some("Target".to_string());` to rawmaster.rs or changing the line in melee_combat_system.rs to use `unwrap_or_default()` would fix this.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。