Rename cities -> countries

This commit is contained in:
thepaperpilot 2022-12-23 21:03:11 -06:00
parent 251cf47c6a
commit 2f63c8f7ea

View file

@ -65,7 +65,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const citiesGoal = 10; const citiesGoal = 10;
const citiesCompleted = createResource<DecimalSource>(0, "cities solved"); const citiesCompleted = createResource<DecimalSource>(0, "countries solved");
const currentCity = persistent<number[][]>([]); const currentCity = persistent<number[][]>([]);
const routeIndex = persistent<number>(0); const routeIndex = persistent<number>(0);
const checkRouteProgress = persistent<number>(0); const checkRouteProgress = persistent<number>(0);
@ -182,7 +182,6 @@ const layer = createLayer(id, function (this: BaseLayer) {
while (routeIndex.value <= numRoutes && routesToSkip.value.includes(routeIndex.value)) { while (routeIndex.value <= numRoutes && routesToSkip.value.includes(routeIndex.value)) {
routeIndex.value++; routeIndex.value++;
} }
console.log(numRoutes);
if (routeIndex.value >= numRoutes) { if (routeIndex.value >= numRoutes) {
citiesCompleted.value = Decimal.add(citiesCompleted.value, 1); citiesCompleted.value = Decimal.add(citiesCompleted.value, 1);
generateCity(); generateCity();
@ -209,7 +208,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
display: { display: {
description: jsx(() => ( description: jsx(() => (
<> <>
Generate New City Generate New Country
<br /> <br />
{render(newCityProgressBar)} {render(newCityProgressBar)}
</> </>
@ -463,8 +462,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
const milestone1 = createMilestone(() => ({ const milestone1 = createMilestone(() => ({
display: { display: {
requirement: "1 City Solved", requirement: "1 Country Solved",
effectDisplay: "Each city solved doubles manual and auto processing speed" effectDisplay: "Each country solved doubles manual and auto processing speed"
}, },
shouldEarn() { shouldEarn() {
return Decimal.gte(citiesCompleted.value, 1); return Decimal.gte(citiesCompleted.value, 1);
@ -472,9 +471,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
})); }));
const milestone2 = createMilestone(() => ({ const milestone2 = createMilestone(() => ({
display: { display: {
requirement: "2 Cities Solved", requirement: "2 Countries Solved",
effectDisplay: effectDisplay:
"Manually checking routes does additional work based on number of routes checked in this city" "Manually checking routes does additional work based on number of routes checked in this country"
}, },
shouldEarn() { shouldEarn() {
return Decimal.gte(citiesCompleted.value, 2); return Decimal.gte(citiesCompleted.value, 2);
@ -483,9 +482,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
})); }));
const milestone3 = createMilestone(() => ({ const milestone3 = createMilestone(() => ({
display: { display: {
requirement: "3 Cities Solved", requirement: "3 Countries Solved",
effectDisplay: effectDisplay:
"Each city solved makes the cooldown for removing a redundant route 25% shorter" "Each country solved makes the cooldown for removing a redundant route 25% shorter"
}, },
shouldEarn() { shouldEarn() {
return Decimal.gte(citiesCompleted.value, 3); return Decimal.gte(citiesCompleted.value, 3);
@ -494,9 +493,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
})); }));
const milestone4 = createMilestone(() => ({ const milestone4 = createMilestone(() => ({
display: { display: {
requirement: "4 Cities Solved", requirement: "4 Countries Solved",
effectDisplay: effectDisplay:
"Automatic processing speed is multiplied by the amount of redundant routes removed from this city" "Automatic processing speed is multiplied by the amount of redundant routes removed from this country"
}, },
shouldEarn() { shouldEarn() {
return Decimal.gte(citiesCompleted.value, 4); return Decimal.gte(citiesCompleted.value, 4);
@ -505,8 +504,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
})); }));
const milestone5 = createMilestone(() => ({ const milestone5 = createMilestone(() => ({
display: { display: {
requirement: "5 Cities Solved", requirement: "5 Countries Solved",
effectDisplay: "Remove 1 house" effectDisplay: "Remove 1 city"
}, },
shouldEarn() { shouldEarn() {
return Decimal.gte(citiesCompleted.value, 5); return Decimal.gte(citiesCompleted.value, 5);
@ -518,7 +517,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
})); }));
const milestone6 = createMilestone(() => ({ const milestone6 = createMilestone(() => ({
display: { display: {
requirement: "6 Cities Solved", requirement: "6 Countries Solved",
effectDisplay: effectDisplay:
"Lower max weight to the min weight, and uncap amount of routes that can be checked per tick" "Lower max weight to the min weight, and uncap amount of routes that can be checked per tick"
}, },
@ -529,7 +528,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
})); }));
const milestone7 = createMilestone(() => ({ const milestone7 = createMilestone(() => ({
display: { display: {
requirement: "7 Cities Solved", requirement: "7 Countries Solved",
effectDisplay: "All redundancies are removed" effectDisplay: "All redundancies are removed"
}, },
shouldEarn() { shouldEarn() {
@ -552,11 +551,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
const houses = createSequentialModifier(() => [ const houses = createSequentialModifier(() => [
createAdditiveModifier(() => ({ createAdditiveModifier(() => ({
addend: citiesCompleted, addend: citiesCompleted,
description: "Cities Completed" description: "Countries Completed"
})), })),
createAdditiveModifier(() => ({ createAdditiveModifier(() => ({
addend: 1, addend: 1,
description: "5 Cities Completed", description: "5 Countries Completed",
enabled: milestone5.earned enabled: milestone5.earned
})) }))
]); ]);
@ -564,18 +563,18 @@ const layer = createLayer(id, function (this: BaseLayer) {
const maxWeight = createSequentialModifier(() => [ const maxWeight = createSequentialModifier(() => [
createAdditiveModifier(() => ({ createAdditiveModifier(() => ({
addend: () => Decimal.pow(citiesCompleted.value, 1.1), addend: () => Decimal.pow(citiesCompleted.value, 1.1),
description: "Cities Completed" description: "Countries Completed"
})) }))
]); ]);
const computedMaxWeight = computed(() => maxWeight.apply(10)); const computedMaxWeight = computed(() => maxWeight.apply(10));
const minWeight = createSequentialModifier(() => [ const minWeight = createSequentialModifier(() => [
createAdditiveModifier(() => ({ createAdditiveModifier(() => ({
addend: citiesCompleted, addend: citiesCompleted,
description: "Cities Completed" description: "Countries Completed"
})), })),
createExponentialModifier(() => ({ createExponentialModifier(() => ({
exponent: 3, exponent: 3,
description: "Cities Completed", description: "Countries Completed",
enabled: milestone7.earned enabled: milestone7.earned
})) }))
]); ]);
@ -583,7 +582,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const manualBoost = createSequentialModifier(() => [ const manualBoost = createSequentialModifier(() => [
createAdditiveModifier(() => ({ createAdditiveModifier(() => ({
addend: () => Decimal.add(routeIndex.value, 1).sqrt(), addend: () => Decimal.add(routeIndex.value, 1).sqrt(),
description: "2 Cities Solved", description: "2 Countries Solved",
enabled: milestone2.earned enabled: milestone2.earned
})) }))
]); ]);
@ -591,7 +590,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const manualCooldown = createSequentialModifier(() => [ const manualCooldown = createSequentialModifier(() => [
createMultiplicativeModifier(() => ({ createMultiplicativeModifier(() => ({
multiplier: () => Decimal.pow(0.5, citiesCompleted.value), multiplier: () => Decimal.pow(0.5, citiesCompleted.value),
description: "1 City Solved", description: "1 Country Solved",
enabled: milestone1.earned enabled: milestone1.earned
})) }))
]); ]);
@ -599,7 +598,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const redundantCooldown = createSequentialModifier(() => [ const redundantCooldown = createSequentialModifier(() => [
createMultiplicativeModifier(() => ({ createMultiplicativeModifier(() => ({
multiplier: () => Decimal.pow(0.75, citiesCompleted.value), multiplier: () => Decimal.pow(0.75, citiesCompleted.value),
description: "3 Cities Solved", description: "3 Countries Solved",
enabled: milestone3.earned enabled: milestone3.earned
})) }))
]); ]);
@ -607,12 +606,12 @@ const layer = createLayer(id, function (this: BaseLayer) {
const autoProcessing = createSequentialModifier(() => [ const autoProcessing = createSequentialModifier(() => [
createMultiplicativeModifier(() => ({ createMultiplicativeModifier(() => ({
multiplier: () => Decimal.pow(2, citiesCompleted.value), multiplier: () => Decimal.pow(2, citiesCompleted.value),
description: "1 City Solved", description: "1 Country Solved",
enabled: milestone1.earned enabled: milestone1.earned
})), })),
createMultiplicativeModifier(() => ({ createMultiplicativeModifier(() => ({
multiplier: () => Decimal.add(redundanciesRemoved.value, 1), multiplier: () => Decimal.add(redundanciesRemoved.value, 1),
description: "4 Cities Solved", description: "4 Countries Solved",
enabled: milestone4.earned enabled: milestone4.earned
})) }))
]); ]);
@ -620,7 +619,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [ const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [
{ {
title: "Houses/city", title: "Cities/country",
modifier: houses, modifier: houses,
base: 3 base: 3
}, },
@ -835,7 +834,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
<> <>
<div> <div>
{main.day.value === day {main.day.value === day
? `Solve ${formatWhole(citiesGoal)} cities to complete the day` ? `Solve ${formatWhole(citiesGoal)} countries to complete the day`
: `${name} Complete!`}{" "} : `${name} Complete!`}{" "}
-{" "} -{" "}
<button <button
@ -862,7 +861,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
)), )),
minimizedDisplay: jsx(() => ( minimizedDisplay: jsx(() => (
<div> <div>
{name} <span class="desc">{format(citiesCompleted.value)} cities solved</span> {name} <span class="desc">{format(citiesCompleted.value)} countries solved</span>
</div> </div>
)) ))
}; };