mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-18 16:58:01 +00:00
@@ -1,8 +1,8 @@
|
||||
manifest.json,1693069583936,91ce94afb71f33a477f5d8d48c3f98bd7de422279c74f17b6500eec72003ac1a
|
||||
index.html,1693069584093,6b94bfa279d7639e72ce48d0e997824865ab66e4c519a64ac6906bf32636d200
|
||||
robots.txt,1693069583936,391d14b3c2f8c9143a27a28c7399585142228d4d1bdbe2c87ac946de411fa9a2
|
||||
assets/index-5265c558.css,1693069584093,08c4451946bbdf520fe337edb365417a8bbf91914c018b83866723ef52d57b43
|
||||
logo192.png,1693069583935,4309255bccbdbb341b5ab88708677e3d43b9e171d2666528ff932295a8257e4e
|
||||
favicon.ico,1693069583934,48d8c1b9714dbc9bcb012d9c9f04112d229f20e6c889bda588ac159f973e6a8d
|
||||
logo512.png,1693069583936,92c7c05dc98170596d04f48e5e60eaae9535f409bcaeff129fd98fef8aba9f4e
|
||||
assets/index-3f4fc294.js,1693069584093,ca292dd8ad8ae5540a8aefe69f8042a19e46655862e0ac68b149bb55ce0a9bce
|
||||
robots.txt,1693082171694,391d14b3c2f8c9143a27a28c7399585142228d4d1bdbe2c87ac946de411fa9a2
|
||||
manifest.json,1693082171694,91ce94afb71f33a477f5d8d48c3f98bd7de422279c74f17b6500eec72003ac1a
|
||||
assets/index-5265c558.css,1693082171837,08c4451946bbdf520fe337edb365417a8bbf91914c018b83866723ef52d57b43
|
||||
index.html,1693082171837,09e1919fbaaa3a0bf08f43eb46c29136d62a7747b41f8b5d0f4a7ed23337c344
|
||||
logo192.png,1693082171693,4309255bccbdbb341b5ab88708677e3d43b9e171d2666528ff932295a8257e4e
|
||||
favicon.ico,1693082171692,48d8c1b9714dbc9bcb012d9c9f04112d229f20e6c889bda588ac159f973e6a8d
|
||||
logo512.png,1693082171694,92c7c05dc98170596d04f48e5e60eaae9535f409bcaeff129fd98fef8aba9f4e
|
||||
assets/index-5023e89e.js,1693082171838,8a6177168e95e1ca90e5ad8774252a8a02a9a78765bd329b7deae729c01aedf3
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "life-trinket",
|
||||
"private": true,
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"type": "commonjs",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
26
src/App.tsx
26
src/App.tsx
@@ -62,20 +62,18 @@ const App = () => {
|
||||
|
||||
const resetCurrentGame = () => {
|
||||
// loop over all players and reset them
|
||||
players.forEach((player) => {
|
||||
player.commanderDamage.forEach((commanderDamage) => {
|
||||
commanderDamage.damageTotal = 0;
|
||||
commanderDamage.partnerDamageTotal = 0;
|
||||
});
|
||||
player.lifeTotal = 40;
|
||||
player.extraCounters.forEach((counter) => {
|
||||
counter.value = 0;
|
||||
});
|
||||
|
||||
handlePlayerChange(player);
|
||||
});
|
||||
|
||||
setPlayers([...players]); // ensure to trigger a re-render
|
||||
// players.forEach((player) => {
|
||||
// player.commanderDamage.forEach((commanderDamage) => {
|
||||
// commanderDamage.damageTotal = 0;
|
||||
// commanderDamage.partnerDamageTotal = 0;
|
||||
// });
|
||||
// player.lifeTotal = 40;
|
||||
// player.extraCounters.forEach((counter) => {
|
||||
// counter.value = 0;
|
||||
// });
|
||||
// handlePlayerChange(player);
|
||||
// });
|
||||
// setPlayers([...players]); // ensure to trigger a re-render
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -84,7 +84,7 @@ const ExtraCountersBar = ({
|
||||
{player.settings.useCommanderDamage && (
|
||||
<ExtraCounter
|
||||
rotation={player.settings.rotation}
|
||||
Icon={<CommanderTax size={iconSize} opacity="0.5" />}
|
||||
Icon={<CommanderTax size={iconSize} opacity="0.5" color="black" />}
|
||||
type={CounterType.CommanderTax}
|
||||
counterTotal={
|
||||
player.extraCounters?.find(
|
||||
@@ -99,7 +99,7 @@ const ExtraCountersBar = ({
|
||||
) && (
|
||||
<ExtraCounter
|
||||
rotation={player.settings.rotation}
|
||||
Icon={<PartnerTax size={iconSize} opacity="0.5" />}
|
||||
Icon={<PartnerTax size={iconSize} opacity="0.5" color="black" />}
|
||||
type={CounterType.PartnerTax}
|
||||
counterTotal={
|
||||
player.extraCounters?.find(
|
||||
@@ -112,7 +112,7 @@ const ExtraCountersBar = ({
|
||||
{player.settings.usePoison && (
|
||||
<ExtraCounter
|
||||
rotation={player.settings.rotation}
|
||||
Icon={<Poison size={iconSize} opacity="0.5" />}
|
||||
Icon={<Poison size={iconSize} opacity="0.5" color="black" />}
|
||||
type={CounterType.Poison}
|
||||
counterTotal={
|
||||
player.extraCounters?.find((counter) => counter.type === 'poison')
|
||||
@@ -124,7 +124,7 @@ const ExtraCountersBar = ({
|
||||
{player.settings.useEnergy && (
|
||||
<ExtraCounter
|
||||
rotation={player.settings.rotation}
|
||||
Icon={<Energy size={iconSize} opacity="0.5" />}
|
||||
Icon={<Energy size={iconSize} opacity="0.5" color="black" />}
|
||||
type={CounterType.Energy}
|
||||
counterTotal={
|
||||
player.extraCounters?.find((counter) => counter.type === 'energy')
|
||||
@@ -136,7 +136,7 @@ const ExtraCountersBar = ({
|
||||
{player.settings.useExperience && (
|
||||
<ExtraCounter
|
||||
rotation={player.settings.rotation}
|
||||
Icon={<Experience size={iconSize} opacity="0.5" />}
|
||||
Icon={<Experience size={iconSize} opacity="0.5" color="black" />}
|
||||
type={CounterType.Experience}
|
||||
counterTotal={
|
||||
player.extraCounters?.find(
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
} from '../../../Data/getInitialPlayers';
|
||||
import { Player } from '../../../Types/Player';
|
||||
import { SupportMe } from '../../Misc/SupportMe';
|
||||
import { H2 } from '../../Misc/TextComponents';
|
||||
import { H2, Paragraph } from '../../Misc/TextComponents';
|
||||
import LayoutOptions from './LayoutOptions';
|
||||
import { useAnalytics } from '../../../Data/useAnalytics';
|
||||
|
||||
@@ -108,7 +108,11 @@ const Start = ({
|
||||
|
||||
analytics.trackEvent('game_started', { ...initialGameSettings });
|
||||
|
||||
document.documentElement.requestFullscreen();
|
||||
try {
|
||||
document.documentElement.requestFullscreen();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
setInitialGameSettings(initialGameSettings);
|
||||
setPlayers(createInitialPlayers(initialGameSettings));
|
||||
};
|
||||
@@ -212,6 +216,11 @@ const Start = ({
|
||||
}
|
||||
/>
|
||||
</FormControl>
|
||||
|
||||
<Paragraph style={{ textAlign: 'center', maxWidth: '75%' }}>
|
||||
If you're on iOS, this page works better if you{' '}
|
||||
<strong>hide the toolbar</strong>
|
||||
</Paragraph>
|
||||
<StartButtonFooter>
|
||||
<Button
|
||||
size="large"
|
||||
|
||||
Reference in New Issue
Block a user