Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WDIP-72: change autumn fall everywhere #162

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions beta-src/src/components/ui/WDPillScroller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { formatPhaseForDisplay } from "../../utils/formatPhaseForDisplay";
import { ReactComponent as ArmyIconPlain } from "../../assets/svg/armyIconPlain.svg";
import { ReactComponent as FleetIconPlain } from "../../assets/svg/fleetIconPlain.svg";
import { getHistoricalPhaseSeasonYear } from "../../utils/state/getPhaseSeasonYear";
import { ReactComponent as AutumnIcon } from "../../assets/svg/phases/autumn.svg";
import { ReactComponent as FallIcon } from "../../assets/svg/phases/fall.svg";
import { ReactComponent as SpringIcon } from "../../assets/svg/phases/spring.svg";
import { ReactComponent as WinterIcon } from "../../assets/svg/phases/winter.svg";

Expand Down Expand Up @@ -56,8 +56,7 @@ const WDPillScroller: React.FC<WDPillScrollerProps> = function ({
// eslint-disable-next-line consistent-return
const getIcon = (season: Season) => {
const iconClassName = "text-white mr-2 h-4";
if (season === Season.AUTUMN)
return <AutumnIcon className={iconClassName} />;
if (season === Season.FALL) return <FallIcon className={iconClassName} />;
if (season === Season.SPRING)
return <SpringIcon className={iconClassName} />;
if (season === Season.WINTER)
Expand Down
2 changes: 1 addition & 1 deletion beta-src/src/components/ui/icons/WDGamePhaseIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const WDGamePhaseIcon: React.FC<GamePhaseIconProps> = function ({
<path d="m28 17-9 8 9 8" stroke="#fff" strokeWidth={3} />
</svg>
)}
{icon === Season.AUTUMN && (
{icon === Season.FALL && (
<svg fill="none" filter={dropShadow} height={31} width={27}>
<path
d="M19.31 21.29c.12-.62 3.78-3.38 6.94-5.83l-1.18-.38a.85.85 0 0 1-.56-1l1.16-4.18-3.18.87a1 1 0 0 1-1.26-.84l-.15-1.27-3.27 3.15a.38.38 0 0 1-.64-.35l1.31-7-1.84 1a.59.59 0 0 1-.81-.25L13.14 0l-2.68 5.21a.6.6 0 0 1-.82.25l-1.84-1 1.31 7a.38.38 0 0 1-.64.35L5.21 8.66 5.06 9.9a1 1 0 0 1-1.27.84L.58 9.87l1.16 4.18a.85.85 0 0 1-.56 1L0 15.43c3.16 2.45 6.82 5.21 6.94 5.83s-1 2.35-1 2.35a38.53 38.53 0 0 1 5.38-1.41c.94 0 1.17.85 1.17 1.7s-.55 6.45-.27 6.65a2.65 2.65 0 0 0 1.78 0c.22-.2-.27-5.8-.27-6.65s.23-1.68 1.17-1.7c1.825.34 3.623.811 5.38 1.41 0 0-1.11-1.59-.97-2.32z"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FunctionComponent, ReactElement } from "react";
import Season from "../../../../enums/Season";
import { formatPhaseForDisplay } from "../../../../utils/formatPhaseForDisplay";
import { ReactComponent as AutumnIcon } from "../../../../assets/svg/phases/autumn.svg";
import { ReactComponent as FallIcon } from "../../../../assets/svg/phases/fall.svg";
import { ReactComponent as SpringIcon } from "../../../../assets/svg/phases/spring.svg";
import { ReactComponent as WinterIcon } from "../../../../assets/svg/phases/winter.svg";

Expand Down Expand Up @@ -31,7 +31,7 @@ const RightButton: FunctionComponent<RightButtonProps> = function ({
type="button"
className="bg-black w-12 h-12 rounded-full mx-auto"
>
{season === Season.AUTUMN && <AutumnIcon className={iconClassName} />}
{season === Season.FALL && <FallIcon className={iconClassName} />}
{season === Season.SPRING && <SpringIcon className={iconClassName} />}
{season === Season.WINTER && <WinterIcon className={iconClassName} />}
</button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from "react";
import Season from "../../../enums/Season";
import { ReactComponent as AutumnIcon } from "../../../assets/svg/phases/autumn.svg";
import { ReactComponent as FallIcon } from "../../../assets/svg/phases/fall.svg";
import { ReactComponent as SpringIcon } from "../../../assets/svg/phases/spring.svg";
import { ReactComponent as WinterIcon } from "../../../assets/svg/phases/winter.svg";

Expand Down Expand Up @@ -55,7 +55,7 @@ const WDPhaseSelectorIcon: React.FC<WDPhaseSelectorIconProps> = function ({
disabled ? "cursor-not-allowed" : "hover:bg-[#3D3D3D]"
}`}
>
{season === Season.AUTUMN && <AutumnIcon className={className} />}
{season === Season.FALL && <FallIcon className={className} />}
{season === Season.SPRING && <SpringIcon className={className} />}
{season === Season.WINTER && <WinterIcon className={className} />}
</button>
Expand Down
2 changes: 1 addition & 1 deletion beta-src/src/enums/Season.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
enum Season {
SPRING = "Spring",
AUTUMN = "Autumn",
FALL = "Fall",
WINTER = "Winter",
}

Expand Down
2 changes: 1 addition & 1 deletion beta-src/src/utils/formatTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function turnAsDate(turn: number, variant: string): string {
switch (variant) {
case "Classic": {
const year = Math.floor(turn / 2) + 1901;
phase = `${turn % 2 ? "Autumn, " : "Spring, "}${year}`;
phase = `${turn % 2 ? "Fall, " : "Spring, "}${year}`;
break;
}
default:
Expand Down
2 changes: 1 addition & 1 deletion beta-src/src/utils/state/getPhaseSeasonYear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function getPhaseSeasonYear(
let season: Season;
if (phase === GamePhaseType.Builds) season = Season.WINTER;
else if (turn % 2 === 0) season = Season.SPRING;
else season = Season.AUTUMN;
else season = Season.FALL;
return { phase, season, year };
}

Expand Down
2 changes: 1 addition & 1 deletion gamemaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,4 +295,4 @@
libHTML::footer();

?>

4 changes: 2 additions & 2 deletions gamemaster/game.php
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ protected function changePhase()
* All but one / All left -> Abandoned (same turn)
* All but one defeated -> Won (same turn)
* Diplomacy and dislodged units -> Retreats (same turn)
* Diplomacy/Retreats and Autumn and Unit/SC imbalance -> Builds (same turn)
* Diplomacy/Retreats and Fall and Unit/SC imbalance -> Builds (same turn)
*
* None of the above -> Diplomacy (next turn)
*/
Expand Down Expand Up @@ -1158,7 +1158,7 @@ protected function changePhase()

case 'Retreats':
/*
* If it's autumn and we just came from Diplomacy or Retreats we may
* If it's fall and we just came from Diplomacy or Retreats we may
* need to make some units.
*/
if( 0 != ($this->turn % 2) and $this->Members->checkForUnitSCDifference() )
Expand Down
Loading