Skip to content

Commit

Permalink
fixed building issues
Browse files Browse the repository at this point in the history
  • Loading branch information
satasatalight committed Jan 22, 2024
1 parent 4185e0f commit 047ab4d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
58 changes: 29 additions & 29 deletions src/channels/cookie-clicker/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
`;
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);
`
10 changes: 5 additions & 5 deletions src/channels/cookie-clicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -90,9 +90,9 @@ export function cookieClicker(props: ChannelProps){
<StoreWindow ref={building.storeRef} id={`${building.id}`}>
<StoreIcon id={`${building.id}`}/>
<FormattedText>
<total>{building.total}</total>
<store>{building.name}</store>
<price>&gt; ${building.price} Donation</price>
<TotalText>{building.total}</TotalText>
<Store>{building.name}</Store>
<Price>&gt; ${building.price} Donation</Price>
</FormattedText>
</StoreWindow>
{storeSection}
Expand Down

0 comments on commit 047ab4d

Please sign in to comment.