amethyst / amethyst/rustrogueliketutorial

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

Aberta
#208 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Rust
Estrelas
970
Forks
166
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.