| Conditions | 7 |
| Paths | 9 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | /** |
||
| 31 | function isSynthesisVisible(key, currentElement) { |
||
| 32 | let entry = data.reactions[key]; |
||
| 33 | for (let reactant in entry.reactant) { |
||
| 34 | if (!state.player.resources[reactant].unlocked) { |
||
| 35 | return false; |
||
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | // for misc reactions |
||
| 40 | if(entry.elements.length === 0 && |
||
| 41 | currentElement === ''){ |
||
| 42 | return true; |
||
| 43 | } |
||
| 44 | |||
| 45 | for (let element in entry.elements) { |
||
| 46 | if (currentElement === entry.elements[element]) { |
||
| 47 | return true; |
||
| 48 | } |
||
| 49 | } |
||
| 50 | |||
| 51 | return false; |
||
| 52 | } |
||
| 53 | } |
||
| 54 |