From: Daniel Karbach Date: Fri, 13 May 2022 15:01:08 +0000 (+0200) Subject: add basic map X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=eeb1f84bb45cca6d213c1f06f1a20b62b67d0c77;p=alttp.git add basic map --- diff --git a/resources/js/components/aos-tracker/Arena.js b/resources/js/components/aos-tracker/Arena.js new file mode 100644 index 0000000..8caa81c --- /dev/null +++ b/resources/js/components/aos-tracker/Arena.js @@ -0,0 +1,124 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +import Cell from './Cell'; +import Region from './Region'; +import Room from './Room'; + +const Arena = ({ x, y }) => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + +Arena.propTypes = { + x: PropTypes.number, + y: PropTypes.number, +}; + +export default Arena; diff --git a/resources/js/components/aos-tracker/CastleCorridor.js b/resources/js/components/aos-tracker/CastleCorridor.js new file mode 100644 index 0000000..762225c --- /dev/null +++ b/resources/js/components/aos-tracker/CastleCorridor.js @@ -0,0 +1,232 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +import Cell from './Cell'; +import Region from './Region'; +import Room from './Room'; + +const CastleCorridor = ({ x, y }) => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + +CastleCorridor.propTypes = { + x: PropTypes.number, + y: PropTypes.number, +}; + +export default CastleCorridor; diff --git a/resources/js/components/aos-tracker/Cell.js b/resources/js/components/aos-tracker/Cell.js new file mode 100644 index 0000000..7c151ef --- /dev/null +++ b/resources/js/components/aos-tracker/Cell.js @@ -0,0 +1,49 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +const hasCorner = (a, b) => + (hasWall(a) && hasWall(b)) || a === 'door' || b == 'door'; + +const hasWall = side => side && side !== 'open'; + +const wallType = side => side || 'open'; + +const Cell = ({ bottom, left, right, top, x, y }) => + + + {hasWall(top) ? + + : null} + {hasWall(right) ? + + : null} + {hasWall(bottom) ? + + : null} + {hasWall(left) ? + + : null} + {hasCorner(top, left) ? + + : null} + {hasCorner(top, right) ? + + : null} + {hasCorner(bottom, left) ? + + : null} + {hasCorner(bottom, right) ? + + : null} + ; + +Cell.propTypes = { + bottom: PropTypes.string, + left: PropTypes.string, + right: PropTypes.string, + top: PropTypes.string, + x: PropTypes.number, + y: PropTypes.number, +}; + +export default Cell; diff --git a/resources/js/components/aos-tracker/Chapel.js b/resources/js/components/aos-tracker/Chapel.js new file mode 100644 index 0000000..10a6151 --- /dev/null +++ b/resources/js/components/aos-tracker/Chapel.js @@ -0,0 +1,123 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +import Cell from './Cell'; +import Region from './Region'; +import Room from './Room'; + +const Chapel = ({ x, y }) => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + +Chapel.propTypes = { + x: PropTypes.number, + y: PropTypes.number, +}; + +export default Chapel; diff --git a/resources/js/components/aos-tracker/ClockTower.js b/resources/js/components/aos-tracker/ClockTower.js new file mode 100644 index 0000000..c53cc2a --- /dev/null +++ b/resources/js/components/aos-tracker/ClockTower.js @@ -0,0 +1,150 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +import Cell from './Cell'; +import Region from './Region'; +import Room from './Room'; + +const ClockTower = ({ x, y }) => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + +ClockTower.propTypes = { + x: PropTypes.number, + y: PropTypes.number, +}; + +export default ClockTower; diff --git a/resources/js/components/aos-tracker/DanceHall.js b/resources/js/components/aos-tracker/DanceHall.js new file mode 100644 index 0000000..676473c --- /dev/null +++ b/resources/js/components/aos-tracker/DanceHall.js @@ -0,0 +1,140 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +import Cell from './Cell'; +import Region from './Region'; +import Room from './Room'; + +const DanceHall = ({ x, y }) => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + +DanceHall.propTypes = { + x: PropTypes.number, + y: PropTypes.number, +}; + +export default DanceHall; diff --git a/resources/js/components/aos-tracker/FloatingGarden.js b/resources/js/components/aos-tracker/FloatingGarden.js new file mode 100644 index 0000000..324d6f7 --- /dev/null +++ b/resources/js/components/aos-tracker/FloatingGarden.js @@ -0,0 +1,140 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +import Cell from './Cell'; +import Region from './Region'; +import Room from './Room'; + +const FloatingGarden = ({ x, y }) => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + +FloatingGarden.propTypes = { + x: PropTypes.number, + y: PropTypes.number, +}; + +export default FloatingGarden; diff --git a/resources/js/components/aos-tracker/ForbiddenArea.js b/resources/js/components/aos-tracker/ForbiddenArea.js new file mode 100644 index 0000000..b223b7a --- /dev/null +++ b/resources/js/components/aos-tracker/ForbiddenArea.js @@ -0,0 +1,78 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +import Cell from './Cell'; +import Region from './Region'; +import Room from './Room'; + +const ForbiddenArea = ({ x, y }) => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + +ForbiddenArea.propTypes = { + x: PropTypes.number, + y: PropTypes.number, +}; + +export default ForbiddenArea; diff --git a/resources/js/components/aos-tracker/InnerQuarters.js b/resources/js/components/aos-tracker/InnerQuarters.js new file mode 100644 index 0000000..e460660 --- /dev/null +++ b/resources/js/components/aos-tracker/InnerQuarters.js @@ -0,0 +1,131 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +import Cell from './Cell'; +import Region from './Region'; +import Room from './Room'; + +const InnerQuarters = ({ x, y }) => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + +InnerQuarters.propTypes = { + x: PropTypes.number, + y: PropTypes.number, +}; + +export default InnerQuarters; diff --git a/resources/js/components/aos-tracker/Map.js b/resources/js/components/aos-tracker/Map.js new file mode 100644 index 0000000..488ee34 --- /dev/null +++ b/resources/js/components/aos-tracker/Map.js @@ -0,0 +1,67 @@ +import React from 'react'; + +import Arena from './Arena'; +import CastleCorridor from './CastleCorridor'; +import Chapel from './Chapel'; +import ClockTower from './ClockTower'; +import DanceHall from './DanceHall'; +import FloatingGarden from './FloatingGarden'; +import ForbiddenArea from './ForbiddenArea'; +import InnerQuarters from './InnerQuarters'; +import Study from './Study'; +import TopFloor from './TopFloor'; +import UndergroundCemetery from './UndergroundCemetery'; +import UndergroundReservoir from './UndergroundReservoir'; + +const Map = () => + + + + + + + + + + + + + + + + ; + +export default Map; diff --git a/resources/js/components/aos-tracker/Region.js b/resources/js/components/aos-tracker/Region.js new file mode 100644 index 0000000..b122f17 --- /dev/null +++ b/resources/js/components/aos-tracker/Region.js @@ -0,0 +1,19 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +const Region = ({ children, name, x, y }) => + + {children} + ; + +Region.propTypes = { + children: PropTypes.node, + name: PropTypes.string, + x: PropTypes.number, + y: PropTypes.number, +}; + +export default Region; diff --git a/resources/js/components/aos-tracker/Room.js b/resources/js/components/aos-tracker/Room.js new file mode 100644 index 0000000..4642379 --- /dev/null +++ b/resources/js/components/aos-tracker/Room.js @@ -0,0 +1,19 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +const Room = ({ children, type, x, y }) => + + {children} + ; + +Room.propTypes = { + children: PropTypes.node, + type: PropTypes.string, + x: PropTypes.number, + y: PropTypes.number, +}; + +export default Room; diff --git a/resources/js/components/aos-tracker/Study.js b/resources/js/components/aos-tracker/Study.js new file mode 100644 index 0000000..160602a --- /dev/null +++ b/resources/js/components/aos-tracker/Study.js @@ -0,0 +1,114 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +import Cell from './Cell'; +import Region from './Region'; +import Room from './Room'; + +const Study = ({ x, y }) => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + +Study.propTypes = { + x: PropTypes.number, + y: PropTypes.number, +}; + +export default Study; diff --git a/resources/js/components/aos-tracker/TopFloor.js b/resources/js/components/aos-tracker/TopFloor.js new file mode 100644 index 0000000..402a9f1 --- /dev/null +++ b/resources/js/components/aos-tracker/TopFloor.js @@ -0,0 +1,142 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +import Cell from './Cell'; +import Region from './Region'; +import Room from './Room'; + +const TopFloor = ({ x, y }) => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + +TopFloor.propTypes = { + x: PropTypes.number, + y: PropTypes.number, +}; + +export default TopFloor; diff --git a/resources/js/components/aos-tracker/UndergroundCemetery.js b/resources/js/components/aos-tracker/UndergroundCemetery.js new file mode 100644 index 0000000..d18d3e8 --- /dev/null +++ b/resources/js/components/aos-tracker/UndergroundCemetery.js @@ -0,0 +1,74 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +import Cell from './Cell'; +import Region from './Region'; +import Room from './Room'; + +const UndergroundCemetery = ({ x, y }) => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + +UndergroundCemetery.propTypes = { + x: PropTypes.number, + y: PropTypes.number, +}; + +export default UndergroundCemetery; diff --git a/resources/js/components/aos-tracker/UndergroundReservoir.js b/resources/js/components/aos-tracker/UndergroundReservoir.js new file mode 100644 index 0000000..9e6434a --- /dev/null +++ b/resources/js/components/aos-tracker/UndergroundReservoir.js @@ -0,0 +1,264 @@ +import PropTypes from 'prop-types'; +import React from 'react'; + +import Cell from './Cell'; +import Region from './Region'; +import Room from './Room'; + +const UndergroundReservoir = ({ x, y }) => + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + +UndergroundReservoir.propTypes = { + x: PropTypes.number, + y: PropTypes.number, +}; + +export default UndergroundReservoir; diff --git a/resources/js/components/aos/App.js b/resources/js/components/aos/App.js index 9c57144..0001f01 100644 --- a/resources/js/components/aos/App.js +++ b/resources/js/components/aos/App.js @@ -5,6 +5,7 @@ import { BrowserRouter, Route, Routes } from 'react-router-dom'; import Header from './Header'; import AosFront from '../pages/AosFront'; import AosSeed from '../pages/AosSeed'; +import Tracker from '../pages/AosTracker'; import User from '../pages/User'; import AosBaseRomProvider from '../../helpers/AosBaseRomContext'; import UserContext from '../../helpers/UserContext'; @@ -55,6 +56,7 @@ const App = () => {
} /> + } /> } /> } /> diff --git a/resources/js/components/pages/AosTracker.js b/resources/js/components/pages/AosTracker.js new file mode 100644 index 0000000..8eafd1f --- /dev/null +++ b/resources/js/components/pages/AosTracker.js @@ -0,0 +1,16 @@ +import React from 'react'; +import { Container } from 'react-bootstrap'; + +import Map from '../aos-tracker/Map'; + +const AosTracker = () => { + React.useEffect(() => { + window.document.title = 'Aos Tracker'; + }, []); + + return + + ; +}; + +export default AosTracker;