From 047ab4df65bb2b82fce0b85fef5481aa437c224d Mon Sep 17 00:00:00 2001 From: satasatalight Date: Mon, 22 Jan 2024 17:55:53 -0500 Subject: [PATCH] fixed building issues --- src/channels/cookie-clicker/components.tsx | 58 +++++++++++----------- src/channels/cookie-clicker/index.tsx | 10 ++-- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/channels/cookie-clicker/components.tsx b/src/channels/cookie-clicker/components.tsx index 4967706..b4b24f4 100644 --- a/src/channels/cookie-clicker/components.tsx +++ b/src/channels/cookie-clicker/components.tsx @@ -171,34 +171,34 @@ export let FormattedText = styled.div` line-height: 1.5; font-size: 45%; } +`; - & > store{ - position: absolute; - top: 9px; - font-size: 95%; - text-align: left; - right: 2.5%; - width: calc(100% - 64px); - } - - & > price{ - position: absolute; - text-shadow: 0px 1px 3px black; - text-align: left; - color: #66ff66; - font-size: 45%; - right: 2.5%; - top:32px; - width: calc(100% - 64px); - } +export let TotalText = styled.div` + position: absolute; + text-align: right; + font-size: 230%; + right: 0; + width: 100%; + color: black; + opacity: 0.4; +` - & > total{ - position: absolute; - text-align: right; - font-size: 230%; - right: 0; - width: 100%; - color: black; - opacity: 0.4; - } -`; \ No newline at end of file +export let Price = styled.div` + position: absolute; + text-shadow: 0px 1px 3px black; + text-align: left; + color: #66ff66; + font-size: 45%; + right: 2.5%; + top:32px; + width: calc(100% - 64px); +` + +export let Store = styled.div` + position: absolute; + top: 9px; + font-size: 95%; + text-align: left; + right: 2.5%; + width: calc(100% - 64px); +` \ No newline at end of file diff --git a/src/channels/cookie-clicker/index.tsx b/src/channels/cookie-clicker/index.tsx index 985be69..0cd213b 100644 --- a/src/channels/cookie-clicker/index.tsx +++ b/src/channels/cookie-clicker/index.tsx @@ -17,7 +17,7 @@ import './main.css'; import {grandma, farm, mine, factory, bank, temple, tower, shipment, lab, portal, timeMachine, antimCondenser, prism} from './buildings'; let buildings = [prism, antimCondenser, timeMachine, portal, lab, shipment, tower, temple, bank, factory, mine, farm, grandma]; import {Container, VerticalSection, HorizontalSection, StoreWindow, StoreIcon, Cookie, CookieGlow, CookieParticle, - FloatText, AnnouncementSection, FormattedText} from './components' + FloatText, AnnouncementSection, FormattedText, TotalText, Price, Store} from './components' registerChannel('Cookie Clicker', 10, cookieClicker, { position: 'bottomLeft', @@ -57,7 +57,7 @@ export function cookieClicker(props: ChannelProps){ setTimeout(() => { let announcementIndex = random(0, flavorText.length - 1); - announcementRef.current.innerHTML = flavorText[announcementIndex] + if(announcementRef.current)announcementRef.current.innerHTML = flavorText[announcementIndex] usedFlavorText.push(flavorText[announcementIndex]); flavorText.splice(announcementIndex, 1); @@ -90,9 +90,9 @@ export function cookieClicker(props: ChannelProps){ - {building.total} - {building.name} - > ${building.price} Donation + {building.total} + {building.name} + > ${building.price} Donation {storeSection}