mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Merge branch 'main' of https://github.com/Berserker66/MultiWorld-Utilities into triforce_changes
This commit is contained in:
Binary file not shown.
15841
data/web/package-lock.json
generated
15841
data/web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -10,38 +10,39 @@
|
||||
"author": "LegendaryLinux",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.28",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.13.0",
|
||||
"@fortawesome/react-fontawesome": "^0.1.10",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.34",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.2",
|
||||
"@fortawesome/react-fontawesome": "^0.1.14",
|
||||
"crypto-browserify": "^3.12.0",
|
||||
"crypto-js": "^4.0.0",
|
||||
"css-loader": "^3.5.3",
|
||||
"lodash-es": "^4.17.15",
|
||||
"css-loader": "^5.0.1",
|
||||
"lodash-es": "^4.17.20",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"react-redux": "^7.2.1",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-redux": "^7.2.2",
|
||||
"react-router-dom": "^5.2.0",
|
||||
"redux": "^4.0.5",
|
||||
"redux-devtools-extension": "^2.13.8",
|
||||
"sass-loader": "^8.0.2",
|
||||
"style-loader": "^1.2.1",
|
||||
"webpack-cli": "^3.3.11"
|
||||
"sass-loader": "^10.1.1",
|
||||
"style-loader": "^2.0.0",
|
||||
"webpack-cli": "^4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.11.4",
|
||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||
"@babel/preset-env": "^7.11.0",
|
||||
"@babel/preset-react": "^7.10.4",
|
||||
"@babel/core": "^7.12.13",
|
||||
"@babel/plugin-proposal-class-properties": "^7.12.13",
|
||||
"@babel/preset-env": "^7.12.13",
|
||||
"@babel/preset-react": "^7.12.13",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^8.1.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-airbnb": "^18.2.0",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.3.1",
|
||||
"eslint-plugin-react": "^7.20.6",
|
||||
"eslint-plugin-react-hooks": "^2.5.1",
|
||||
"file-loader": "^6.0.0",
|
||||
"node-sass": "^4.14.1",
|
||||
"webpack": "^4.44.1"
|
||||
"babel-loader": "^8.2.2",
|
||||
"eslint": "^7.19.0",
|
||||
"eslint-config-airbnb": "^18.2.1",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||
"eslint-plugin-react": "^7.22.0",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"node-sass": "^5.0.0",
|
||||
"webpack": "^5.20.0"
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@ const finderSpan = (finder, possessive = false, ownItem = false) => (
|
||||
const recipientSpan = (recipient, possessive = false, ownItem = false) => (
|
||||
<span className={ `recipient-span ${ownItem ? 'mine' : null}` }>{recipient}{possessive ? "'s" : null}</span>
|
||||
);
|
||||
const itemSpan = (item) => <span className="item-span">{item}</span>;
|
||||
const itemSpan = (item, unique) => <span className={ `item-span ${unique ? 'unique' : ''}` }>{item}</span>;
|
||||
const locationSpan = (location) => <span className="location-span">{location}</span>;
|
||||
const entranceSpan = (entrance) => <span className="entrance-span">{entrance}</span>;
|
||||
|
||||
@@ -20,34 +20,34 @@ class MonitorTools {
|
||||
);
|
||||
|
||||
/** Sent an item to another player */
|
||||
static sentItem = (finder, recipient, item, location, iAmFinder = false, iAmRecipient = false) => (
|
||||
static sentItem = (finder, recipient, item, location, iAmFinder = false, iAmRecipient = false, unique = false) => (
|
||||
<div
|
||||
key={ `${md5(finder + recipient + item + location)}${Math.floor((Math.random() * 1000000))}` }
|
||||
className={ (iAmFinder || iAmRecipient) ? 'relevant' : null }
|
||||
>
|
||||
{finderSpan(finder, false, iAmFinder)} found {recipientSpan(recipient, true, iAmRecipient)}
|
||||
{itemSpan(item)} at {locationSpan(location)}
|
||||
{itemSpan(item, unique)} at {locationSpan(location)}
|
||||
</div>
|
||||
)
|
||||
|
||||
/** Received item from another player */
|
||||
static receivedItem = (finder, item, location, itemIndex, queueLength) => (
|
||||
static receivedItem = (finder, item, location, itemIndex, queueLength, unique = false) => (
|
||||
<div
|
||||
key={ `${md5(finder + item + location)}${Math.floor((Math.random() * 1000000))}` }
|
||||
className="relevant"
|
||||
>
|
||||
({itemIndex}/{queueLength}) {finderSpan(finder, false)} found your
|
||||
{itemSpan(item)} at {locationSpan(location)}
|
||||
{itemSpan(item, unique)} at {locationSpan(location)}
|
||||
</div>
|
||||
)
|
||||
|
||||
/** Player found their own item (local or remote player) */
|
||||
static foundItem = (finder, item, location, iAmFinder = false) => (
|
||||
static foundItem = (finder, item, location, iAmFinder = false, unique = false) => (
|
||||
<div
|
||||
key={ `${md5(finder + item + location)}${Math.floor((Math.random() * 1000000))}` }
|
||||
className={ iAmFinder ? 'relevant' : null }
|
||||
>
|
||||
{finderSpan(finder, false, iAmFinder)} found their own {itemSpan(item)} at {locationSpan(location)}
|
||||
{finderSpan(finder, false, iAmFinder)} found their own {itemSpan(item, unique)} at {locationSpan(location)}
|
||||
</div>
|
||||
)
|
||||
|
||||
|
@@ -44,15 +44,16 @@ class WebSocketUtils {
|
||||
case 'itemSent':
|
||||
return appendMessage(MonitorTools.sentItem(data.content.finder, data.content.recipient,
|
||||
data.content.item, data.content.location, parseInt(data.content.iAmFinder, 10) === 1,
|
||||
parseInt(data.content.iAmRecipient, 10) === 1));
|
||||
parseInt(data.content.iAmRecipient, 10) === 1, parseInt(data.content.itemIsUnique, 10) === 1));
|
||||
|
||||
case 'itemReceived':
|
||||
return appendMessage(MonitorTools.receivedItem(data.content.finder, data.content.item,
|
||||
data.content.location, data.content.itemIndex, data.content.queueLength));
|
||||
data.content.location, data.content.itemIndex, data.content.queueLength,
|
||||
parseInt(data.content.itemIsUnique, 10) === 1));
|
||||
|
||||
case 'itemFound':
|
||||
return appendMessage(MonitorTools.foundItem(data.content.finder, data.content.item, data.content.location,
|
||||
parseInt(data.content.iAmFinder, 10) === 1));
|
||||
parseInt(data.content.iAmFinder, 10) === 1, parseInt(data.content.itemIsUnique, 10) === 1));
|
||||
|
||||
case 'hint':
|
||||
return appendMessage(MonitorTools.hintMessage(data.content.finder, data.content.recipient,
|
||||
|
@@ -25,9 +25,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.item-span{ color: #67e9ff; }
|
||||
.item-span{
|
||||
color: #67e9ff;
|
||||
|
||||
&.unique{
|
||||
color: #ff884e;
|
||||
text-shadow: #000000 2px 2px;
|
||||
}
|
||||
}
|
||||
.location-span{ color: #f5e63c; }
|
||||
.entrance-span{ color: #73ae38 }
|
||||
.entrance-span{ color: #73ae38; }
|
||||
.finder-span{ color: #f96cb8; }
|
||||
.recipient-span{ color: #9b8aff; }
|
||||
.mine{ color: #ffa500; }
|
||||
|
@@ -9,7 +9,7 @@ module.exports = {
|
||||
{
|
||||
test: /\.(js|jsx|es6)$/,
|
||||
loader: 'babel-loader',
|
||||
query: {
|
||||
options: {
|
||||
compact: true,
|
||||
minified: true,
|
||||
},
|
||||
|
@@ -9,7 +9,7 @@ module.exports = {
|
||||
{
|
||||
test: /\.(js|jsx|es6)$/,
|
||||
loader: 'babel-loader',
|
||||
query: {
|
||||
options: {
|
||||
compact: false,
|
||||
minified: false,
|
||||
},
|
||||
@@ -42,5 +42,4 @@ module.exports = {
|
||||
publicPath: '/',
|
||||
filename: '[name].bundle.js',
|
||||
},
|
||||
devtool: 'source-map',
|
||||
};
|
||||
|
Reference in New Issue
Block a user