Add offset property to extra slots
This commit is contained in:
parent
c809d4ebdc
commit
db834aa04a
4 changed files with 9 additions and 5 deletions
|
|
@ -16,6 +16,7 @@ interface Props {
|
|||
editable: boolean
|
||||
exists: boolean
|
||||
found?: boolean
|
||||
offset: number
|
||||
onSelect: (type: GridType, summon: Summon, position: number) => void
|
||||
}
|
||||
|
||||
|
|
@ -37,9 +38,9 @@ const ExtraSummons = (props: Props) => {
|
|||
<SummonUnit
|
||||
editable={props.editable}
|
||||
onReceiveData={receiveWeapon}
|
||||
position={i}
|
||||
position={props.offset + i}
|
||||
unitType={1}
|
||||
summon={props.grid[i]}
|
||||
summon={props.grid[props.offset + i]}
|
||||
/>
|
||||
</li>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ interface Props {
|
|||
editable: boolean
|
||||
exists: boolean
|
||||
found?: boolean
|
||||
offset: number
|
||||
onSelect: (type: GridType, weapon: Weapon, position: number) => void
|
||||
}
|
||||
|
||||
|
|
@ -38,9 +39,9 @@ const ExtraWeapons = (props: Props) => {
|
|||
<WeaponUnit
|
||||
editable={props.editable}
|
||||
onReceiveData={receiveWeapon}
|
||||
position={i}
|
||||
position={props.offset + i}
|
||||
unitType={1}
|
||||
weapon={props.grid[i]}
|
||||
weapon={props.grid[props.offset + i]}
|
||||
/>
|
||||
</li>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ const SummonGrid = (props: Props) => {
|
|||
grid={props.grid}
|
||||
editable={false}
|
||||
exists={false}
|
||||
offset={numSummons}
|
||||
onSelect={
|
||||
function (type: GridType, summon: Summon, position: number): void {
|
||||
throw new Error('Function not implemented.')
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ const WeaponGrid = (props: Props) => {
|
|||
<ExtraWeapons
|
||||
grid={props.grid}
|
||||
editable={props.editable}
|
||||
exists={false}
|
||||
exists={false}
|
||||
offset={numWeapons}
|
||||
onSelect={
|
||||
function (type: GridType, weapon: Weapon, position: number): void {
|
||||
throw new Error('Function not implemented.')
|
||||
|
|
|
|||
Loading…
Reference in a new issue