mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
revert changes
This commit is contained in:
1 parent
0bd660f255
commit
7871eae7a3
2 files changed
+4
-39
No files matched your search
@@ -34,14 +34,15 @@ export function GenericTankComponentButton({
|
|||||||
height: 32,
|
height: 32,
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
opacity: props.disabled ? 0.5 : 1,
|
opacity: props.disabled ? 0.5 : 1,
|
||||||
transform: 'translate(-50%, -50%) scale(1)',
|
transform: 'translate(-50%, -50%) scale(0.75)',
|
||||||
top: '50%',
|
top: '50%',
|
||||||
left: '50%',
|
left: '50%',
|
||||||
...iconStyles,
|
...iconStyles,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{children}
|
{children}
|
||||||
</TankComponentButton>
|
</TankComponentButton>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
+1
-37
@@ -182,7 +182,7 @@ export function Modules() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (gunInNewTurret) {
|
if (gunInNewTurret) {
|
||||||
// Gun exists - get it FROM this turret
|
// Gun exists - get it FROM this turret (this fixes the bug!)
|
||||||
draft.protagonist.gun = gunInNewTurret;
|
draft.protagonist.gun = gunInNewTurret;
|
||||||
draft.protagonist.shell = gunInNewTurret.shells[0];
|
draft.protagonist.shell = gunInNewTurret.shells[0];
|
||||||
} else {
|
} else {
|
||||||
@@ -392,42 +392,6 @@ export function Modules() {
|
|||||||
>
|
>
|
||||||
{strings.website.tools.tankopedia.configuration.modules.upgrade}
|
{strings.website.tools.tankopedia.configuration.modules.upgrade}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
color="purple"
|
|
||||||
onClick={() => {
|
|
||||||
Duel.mutate((draft) => {
|
|
||||||
// Random turret
|
|
||||||
const randomTurret =
|
|
||||||
draft.protagonist.tank.turrets[
|
|
||||||
Math.floor(Math.random() * draft.protagonist.tank.turrets.length)
|
|
||||||
];
|
|
||||||
draft.protagonist.turret = randomTurret;
|
|
||||||
|
|
||||||
// Random gun from the selected turret
|
|
||||||
const randomGun =
|
|
||||||
randomTurret.guns[
|
|
||||||
Math.floor(Math.random() * randomTurret.guns.length)
|
|
||||||
];
|
|
||||||
draft.protagonist.gun = randomGun;
|
|
||||||
draft.protagonist.shell = randomGun.shells[0];
|
|
||||||
|
|
||||||
// Random engine
|
|
||||||
draft.protagonist.engine =
|
|
||||||
draft.protagonist.tank.engines[
|
|
||||||
Math.floor(Math.random() * draft.protagonist.tank.engines.length)
|
|
||||||
];
|
|
||||||
|
|
||||||
// Random track
|
|
||||||
draft.protagonist.track =
|
|
||||||
draft.protagonist.tank.tracks[
|
|
||||||
Math.floor(Math.random() * draft.protagonist.tank.tracks.length)
|
|
||||||
];
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Randomize
|
|
||||||
</Button>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|||||||
Reference in new issue
Block a user