1 import React from 'react';
3 import ToggleIcon from './ToggleIcon';
4 import { BOTTLE_CONTENTS } from '../../helpers/tracker';
5 import { useTracker } from '../../hooks/tracker';
7 const transform = (x, y, s) => `translate(${x * 0.2} ${y * 0.2}) scale(${(s || 0.85) * 0.2})`;
10 const { state } = useTracker();
14 controller={ToggleIcon.simpleController}
15 icons={['bow', 'silvers']}
17 transform={transform(0.5, 0.5)}
20 controller={ToggleIcon.simpleController}
21 icons={['blue-boomerang']}
23 transform={transform(1.35, 0.5)}
26 controller={ToggleIcon.simpleController}
27 icons={['red-boomerang']}
29 transform={transform(1.85, 0.5)}
32 controller={ToggleIcon.simpleController}
35 transform={transform(2.5, 0.5)}
38 controller={ToggleIcon.simpleController}
41 transform={transform(3.5, 0.5)}
44 controller={ToggleIcon.simpleController}
47 transform={transform(4.5, 0.5)}
50 controller={ToggleIcon.simpleController}
53 transform={transform(0.5, 1.5)}
56 controller={ToggleIcon.simpleController}
59 transform={transform(1.5, 1.5)}
61 <g transform={transform(2.5, 1.5)}>
62 <ToggleIcon controller={ToggleIcon.medallionController} icons={['bombos']} svg />
63 {state['mm-medallion'] === 'bombos' ?
64 <text className="med-display bottom-left">MM</text>
66 {state['tr-medallion'] === 'bombos' ?
67 <text className="med-display bottom-right">TR</text>
70 <g transform={transform(3.5, 1.5)}>
71 <ToggleIcon controller={ToggleIcon.medallionController} icons={['ether']} svg />
72 {state['mm-medallion'] === 'ether' ?
73 <text className="med-display bottom-left">MM</text>
75 {state['tr-medallion'] === 'ether' ?
76 <text className="med-display bottom-right">TR</text>
79 <g transform={transform(4.5, 1.5)}>
80 <ToggleIcon controller={ToggleIcon.medallionController} icons={['quake']} svg />
81 {state['mm-medallion'] === 'quake' ?
82 <text className="med-display bottom-left">MM</text>
84 {state['tr-medallion'] === 'quake' ?
85 <text className="med-display bottom-right">TR</text>
89 controller={ToggleIcon.simpleController}
92 transform={transform(0.5, 2.5)}
95 controller={ToggleIcon.simpleController}
98 transform={transform(1.5, 2.5)}
101 controller={ToggleIcon.simpleController}
104 transform={transform(2.5, 2.5)}
107 controller={ToggleIcon.simpleController}
110 transform={transform(2.75, 2.75, 0.5)}
113 controller={ToggleIcon.simpleController}
116 transform={transform(3.5, 2.5)}
119 controller={ToggleIcon.simpleController}
122 transform={transform(4.5, 2.5)}
125 controller={ToggleIcon.simpleController}
128 transform={transform(0.5, 3.5)}
131 controller={ToggleIcon.simpleController}
134 transform={transform(1.5, 3.5)}
137 controller={ToggleIcon.simpleController}
140 transform={transform(2.5, 3.5)}
143 controller={ToggleIcon.simpleController}
146 transform={transform(3.5, 3.5)}
149 controller={ToggleIcon.simpleController}
152 transform={transform(4.5, 3.5)}
155 controller={ToggleIcon.bottleController('bottle-1')}
156 icons={BOTTLE_CONTENTS}
158 transform={transform(0.5, 5)}
161 controller={ToggleIcon.bottleController('bottle-2')}
162 icons={BOTTLE_CONTENTS}
164 transform={transform(1.5, 5)}
167 controller={ToggleIcon.bottleController('bottle-3')}
168 icons={BOTTLE_CONTENTS}
170 transform={transform(2.5, 5)}
173 controller={ToggleIcon.bottleController('bottle-4')}
174 icons={BOTTLE_CONTENTS}
176 transform={transform(3.5, 5)}
179 controller={ToggleIcon.simpleController}
182 transform={transform(4.5, 5)}
185 controller={ToggleIcon.simpleController}
188 transform={transform(0.5, 6.5)}
191 controller={ToggleIcon.progressiveController('lift', 0, 2)}
192 icons={['glove', 'mitts']}
194 transform={transform(1.5, 6.5)}
197 controller={ToggleIcon.simpleController}
200 transform={transform(2.5, 6.5)}
203 controller={ToggleIcon.simpleController}
204 icons={['moonpearl']}
206 transform={transform(3.5, 6.5)}
209 controller={ToggleIcon.simpleController}
210 icons={['half-magic', 'quarter-magic']}
212 transform={transform(4.5, 6.5)}
215 controller={ToggleIcon.progressiveController('sword', 0, 4)}
216 icons={['sword-1', 'sword-2', 'sword-3', 'sword-4']}
218 transform={transform(0.5, 7.5)}
221 controller={ToggleIcon.progressiveController('shield', 0, 3)}
222 icons={['fighter-shield', 'fire-shield', 'mirror-shield']}
224 transform={transform(1.5, 7.5)}
227 controller={ToggleIcon.progressiveController('mail', 1, 3)}
228 icons={['green-mail', 'blue-mail', 'red-mail']}
230 transform={transform(2.5, 7.5)}
233 controller={ToggleIcon.modulusController('heart-piece')}
234 icons={['heart-0', 'heart-1', 'heart-2', 'heart-3']}
236 transform={transform(3.5, 7.5)}
241 export default Items;