Merge pull request #658 from Tipx-L/PR-Branch

The Multiplayer Update: Part 2.
This commit is contained in:
Spmario233 2023-11-19 23:33:02 +08:00 committed by GitHub
commit 647e6b289b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 180 additions and 293 deletions

View File

@ -1,20 +1,31 @@
{ {
"extends": "eslint:recommended", "extends": "eslint:recommended",
"env": { "env": {
"browser": true, "browser": true,
"node": true, "node": true,
"es6": true, "es6": true,
"worker": true "worker": true
}, },
"rules": { "rules": {
"no-console": 0, "no-console": 0,
"no-unused-vars": 0, "no-unused-vars": 0,
"no-undef": 0, "no-undef": 0,
"no-redeclare": 0, "no-redeclare": 0,
"require-yield": 0, "require-yield": 0,
"no-irregular-whitespace": ["error", { "skipStrings": true, "skipTemplates": true }], "no-irregular-whitespace": [
"no-constant-condition": ["error", { "checkLoops": false }]/* , "error",
"comma-dangle": ["error", "only-multiline"], {
"complexity": ["error",100] */ "skipStrings": true,
} "skipTemplates": true
}
],
"no-constant-condition": [
"error",
{
"checkLoops": false
}
] /* ,
"comma-dangle": ["error", "only-multiline"],
"complexity": ["error",100] */
}
} }

View File

@ -1,7 +1,7 @@
/** /**
* core-js 3.33.0 * core-js 3.33.2
* © 2014-2023 Denis Pushkarev (zloirock.ru) * © 2014-2023 Denis Pushkarev (zloirock.ru)
* license: https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE * license: https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE
* source: https://github.com/zloirock/core-js * source: https://github.com/zloirock/core-js
*/ */
!function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap !function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
@ -721,14 +721,15 @@ if (!NATIVE_SYMBOL) {
var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]); var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);
var tag = uid(description); var tag = uid(description);
var setter = function (value) { var setter = function (value) {
if (this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value); var $this = this === undefined ? global : this;
if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false; if ($this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);
if (hasOwn($this, HIDDEN) && hasOwn($this[HIDDEN], tag)) $this[HIDDEN][tag] = false;
var descriptor = createPropertyDescriptor(1, value); var descriptor = createPropertyDescriptor(1, value);
try { try {
setSymbolDescriptor(this, tag, descriptor); setSymbolDescriptor($this, tag, descriptor);
} catch (error) { } catch (error) {
if (!(error instanceof RangeError)) throw error; if (!(error instanceof RangeError)) throw error;
fallbackDefineProperty(this, tag, descriptor); fallbackDefineProperty($this, tag, descriptor);
} }
}; };
if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter }); if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
@ -1483,10 +1484,10 @@ var store = __webpack_require__(37);
(module.exports = function (key, value) { (module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {}); return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({ })('versions', []).push({
version: '3.33.0', version: '3.33.2',
mode: IS_PURE ? 'pure' : 'global', mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)', copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
license: 'https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE', license: 'https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE',
source: 'https://github.com/zloirock/core-js' source: 'https://github.com/zloirock/core-js'
}); });
@ -3758,7 +3759,6 @@ if (ErrorPrototype.toString !== errorToString) {
var DESCRIPTORS = __webpack_require__(6); var DESCRIPTORS = __webpack_require__(6);
var fails = __webpack_require__(7); var fails = __webpack_require__(7);
var anObject = __webpack_require__(47); var anObject = __webpack_require__(47);
var create = __webpack_require__(72);
var normalizeStringArgument = __webpack_require__(121); var normalizeStringArgument = __webpack_require__(121);
var nativeErrorToString = Error.prototype.toString; var nativeErrorToString = Error.prototype.toString;
@ -3766,8 +3766,8 @@ var nativeErrorToString = Error.prototype.toString;
var INCORRECT_TO_STRING = fails(function () { var INCORRECT_TO_STRING = fails(function () {
if (DESCRIPTORS) { if (DESCRIPTORS) {
// Chrome 32- incorrectly call accessor // Chrome 32- incorrectly call accessor
// eslint-disable-next-line es/no-object-defineproperty -- safe // eslint-disable-next-line es/no-object-create, es/no-object-defineproperty -- safe
var object = create(Object.defineProperty({}, 'name', { get: function () { var object = Object.create(Object.defineProperty({}, 'name', { get: function () {
return this === object; return this === object;
} })); } }));
if (nativeErrorToString.call(object) !== 'true') return true; if (nativeErrorToString.call(object) !== 'true') return true;
@ -4977,13 +4977,12 @@ module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
}, function () { }, function () {
var state = getInternalState(this); var state = getInternalState(this);
var target = state.target; var target = state.target;
var kind = state.kind;
var index = state.index++; var index = state.index++;
if (!target || index >= target.length) { if (!target || index >= target.length) {
state.target = undefined; state.target = undefined;
return createIterResultObject(undefined, true); return createIterResultObject(undefined, true);
} }
switch (kind) { switch (state.kind) {
case 'keys': return createIterResultObject(index, false); case 'keys': return createIterResultObject(index, false);
case 'values': return createIterResultObject(target[index], false); case 'values': return createIterResultObject(target[index], false);
} return createIterResultObject([index, target[index]], false); } return createIterResultObject([index, target[index]], false);
@ -6008,11 +6007,11 @@ var uncurryThis = __webpack_require__(14);
var aCallable = __webpack_require__(31); var aCallable = __webpack_require__(31);
var toIndexedObject = __webpack_require__(12); var toIndexedObject = __webpack_require__(12);
var arrayFromConstructorAndList = __webpack_require__(199); var arrayFromConstructorAndList = __webpack_require__(199);
var getVirtual = __webpack_require__(200); var getBuiltInPrototypeMethod = __webpack_require__(200);
var addToUnscopables = __webpack_require__(140); var addToUnscopables = __webpack_require__(140);
var $Array = Array; var $Array = Array;
var sort = uncurryThis(getVirtual('Array').sort); var sort = uncurryThis(getBuiltInPrototypeMethod('Array', 'sort'));
// `Array.prototype.toSorted` method // `Array.prototype.toSorted` method
// https://tc39.es/ecma262/#sec-array.prototype.tosorted // https://tc39.es/ecma262/#sec-array.prototype.tosorted
@ -6053,8 +6052,10 @@ module.exports = function (Constructor, list) {
var global = __webpack_require__(4); var global = __webpack_require__(4);
module.exports = function (CONSTRUCTOR) { module.exports = function (CONSTRUCTOR, METHOD) {
return global[CONSTRUCTOR].prototype; var Constructor = global[CONSTRUCTOR];
var Prototype = Constructor && Constructor.prototype;
return Prototype && Prototype[METHOD];
}; };
@ -15957,14 +15958,14 @@ var getIterator = __webpack_require__(135);
var getIteratorDirect = __webpack_require__(496); var getIteratorDirect = __webpack_require__(496);
var getIteratorMethod = __webpack_require__(136); var getIteratorMethod = __webpack_require__(136);
var getMethod = __webpack_require__(30); var getMethod = __webpack_require__(30);
var getVirtual = __webpack_require__(200);
var getBuiltIn = __webpack_require__(24); var getBuiltIn = __webpack_require__(24);
var getBuiltInPrototypeMethod = __webpack_require__(200);
var wellKnownSymbol = __webpack_require__(34); var wellKnownSymbol = __webpack_require__(34);
var AsyncFromSyncIterator = __webpack_require__(494); var AsyncFromSyncIterator = __webpack_require__(494);
var toArray = __webpack_require__(497).toArray; var toArray = __webpack_require__(497).toArray;
var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator'); var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
var arrayIterator = uncurryThis(getVirtual('Array').values); var arrayIterator = uncurryThis(getBuiltInPrototypeMethod('Array', 'values'));
var arrayIteratorNext = uncurryThis(arrayIterator([]).next); var arrayIteratorNext = uncurryThis(arrayIterator([]).next);
var safeArrayIterator = function () { var safeArrayIterator = function () {
@ -17721,7 +17722,7 @@ var AsyncFromSyncIterator = __webpack_require__(494);
var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator'); var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
module.exports = function from(obj) { module.exports = function (obj) {
var object = anObject(obj); var object = anObject(obj);
var alreadyAsync = true; var alreadyAsync = true;
var method = getMethod(object, ASYNC_ITERATOR); var method = getMethod(object, ASYNC_ITERATOR);
@ -18272,7 +18273,7 @@ var uncurryThis = __webpack_require__(14);
var getUint8 = uncurryThis(DataView.prototype.getUint8); var getUint8 = uncurryThis(DataView.prototype.getUint8);
// `DataView.prototype.getUint8Clamped` method // `DataView.prototype.getUint8Clamped` method
// https://github.com/tc39/proposal-dataview-get-set-uint8c // https://github.com/tc39/proposal-dataview-get-set-uint8clamped
$({ target: 'DataView', proto: true, forced: true }, { $({ target: 'DataView', proto: true, forced: true }, {
getUint8Clamped: function getUint8Clamped(byteOffset) { getUint8Clamped: function getUint8Clamped(byteOffset) {
return getUint8(this, byteOffset); return getUint8(this, byteOffset);
@ -18345,7 +18346,7 @@ var $TypeError = TypeError;
var setUint8 = uncurryThis(DataView.prototype.setUint8); var setUint8 = uncurryThis(DataView.prototype.setUint8);
// `DataView.prototype.setUint8Clamped` method // `DataView.prototype.setUint8Clamped` method
// https://github.com/tc39/proposal-dataview-get-set-uint8c // https://github.com/tc39/proposal-dataview-get-set-uint8clamped
$({ target: 'DataView', proto: true, forced: true }, { $({ target: 'DataView', proto: true, forced: true }, {
setUint8Clamped: function setUint8Clamped(byteOffset, value) { setUint8Clamped: function setUint8Clamped(byteOffset, value) {
if (classof(this) !== 'DataView') throw new $TypeError('Incorrect receiver'); if (classof(this) !== 'DataView') throw new $TypeError('Incorrect receiver');
@ -20734,18 +20735,19 @@ var INVALID_RADIX = 'Invalid radix';
var $RangeError = RangeError; var $RangeError = RangeError;
var $SyntaxError = SyntaxError; var $SyntaxError = SyntaxError;
var $TypeError = TypeError; var $TypeError = TypeError;
var valid = /^[\da-z]+$/; var pow = Math.pow;
var valid = /^[\d.a-z]+$/;
var charAt = uncurryThis(''.charAt); var charAt = uncurryThis(''.charAt);
var exec = uncurryThis(valid.exec); var exec = uncurryThis(valid.exec);
var numberToString = uncurryThis(1.0.toString); var numberToString = uncurryThis(1.0.toString);
var stringSlice = uncurryThis(''.slice); var stringSlice = uncurryThis(''.slice);
var split = uncurryThis(''.split);
// `Number.fromString` method // `Number.fromString` method
// https://github.com/tc39/proposal-number-fromstring // https://github.com/tc39/proposal-number-fromstring
$({ target: 'Number', stat: true, forced: true }, { $({ target: 'Number', stat: true, forced: true }, {
fromString: function fromString(string, radix) { fromString: function fromString(string, radix) {
var sign = 1; var sign = 1;
var R, mathNum;
if (typeof string != 'string') throw new $TypeError(INVALID_NUMBER_REPRESENTATION); if (typeof string != 'string') throw new $TypeError(INVALID_NUMBER_REPRESENTATION);
if (!string.length) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION); if (!string.length) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
if (charAt(string, 0) === '-') { if (charAt(string, 0) === '-') {
@ -20753,11 +20755,13 @@ $({ target: 'Number', stat: true, forced: true }, {
string = stringSlice(string, 1); string = stringSlice(string, 1);
if (!string.length) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION); if (!string.length) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
} }
R = radix === undefined ? 10 : toIntegerOrInfinity(radix); var R = radix === undefined ? 10 : toIntegerOrInfinity(radix);
if (R < 2 || R > 36) throw new $RangeError(INVALID_RADIX); if (R < 2 || R > 36) throw new $RangeError(INVALID_RADIX);
if (!exec(valid, string) || numberToString(mathNum = parseInt(string, R), R) !== string) { if (!exec(valid, string)) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION); var parts = split(string, '.');
} var mathNum = parseInt(parts[0], R);
if (parts.length > 1) mathNum += parseInt(parts[1], R) / pow(R, parts[1].length);
if (numberToString(mathNum, R) !== string) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
return sign * mathNum; return sign * mathNum;
} }
}); });
@ -23203,7 +23207,6 @@ defineWellKnownSymbol('matcher');
"use strict"; "use strict";
// TODO: Remove from `core-js@4`
var defineWellKnownSymbol = __webpack_require__(81); var defineWellKnownSymbol = __webpack_require__(81);
// `Symbol.metadata` well-known symbol // `Symbol.metadata` well-known symbol
@ -23217,6 +23220,7 @@ defineWellKnownSymbol('metadata');
"use strict"; "use strict";
// TODO: Remove from `core-js@4`
var defineWellKnownSymbol = __webpack_require__(81); var defineWellKnownSymbol = __webpack_require__(81);
// `Symbol.metadataKey` well-known symbol // `Symbol.metadataKey` well-known symbol
@ -24449,7 +24453,7 @@ try {
var IS_PURE = __webpack_require__(36); var IS_PURE = __webpack_require__(36);
var $ = __webpack_require__(3); var $ = __webpack_require__(3);
var global = __webpack_require__(4); var global = __webpack_require__(4);
var getBuiltin = __webpack_require__(24); var getBuiltIn = __webpack_require__(24);
var uncurryThis = __webpack_require__(14); var uncurryThis = __webpack_require__(14);
var fails = __webpack_require__(7); var fails = __webpack_require__(7);
var uid = __webpack_require__(41); var uid = __webpack_require__(41);
@ -24469,7 +24473,8 @@ var validateArgumentsLength = __webpack_require__(329);
var getRegExpFlags = __webpack_require__(369); var getRegExpFlags = __webpack_require__(369);
var MapHelpers = __webpack_require__(506); var MapHelpers = __webpack_require__(506);
var SetHelpers = __webpack_require__(659); var SetHelpers = __webpack_require__(659);
var arrayBufferTransfer = __webpack_require__(519); var setIterate = __webpack_require__(664);
var detachTransferable = __webpack_require__(520);
var ERROR_STACK_INSTALLABLE = __webpack_require__(125); var ERROR_STACK_INSTALLABLE = __webpack_require__(125);
var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(522); var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(522);
@ -24477,25 +24482,17 @@ var Object = global.Object;
var Array = global.Array; var Array = global.Array;
var Date = global.Date; var Date = global.Date;
var Error = global.Error; var Error = global.Error;
var EvalError = global.EvalError;
var RangeError = global.RangeError;
var ReferenceError = global.ReferenceError;
var SyntaxError = global.SyntaxError;
var TypeError = global.TypeError; var TypeError = global.TypeError;
var URIError = global.URIError;
var PerformanceMark = global.PerformanceMark; var PerformanceMark = global.PerformanceMark;
var WebAssembly = global.WebAssembly; var DOMException = getBuiltIn('DOMException');
var CompileError = WebAssembly && WebAssembly.CompileError || Error;
var LinkError = WebAssembly && WebAssembly.LinkError || Error;
var RuntimeError = WebAssembly && WebAssembly.RuntimeError || Error;
var DOMException = getBuiltin('DOMException');
var Map = MapHelpers.Map; var Map = MapHelpers.Map;
var mapHas = MapHelpers.has; var mapHas = MapHelpers.has;
var mapGet = MapHelpers.get; var mapGet = MapHelpers.get;
var mapSet = MapHelpers.set; var mapSet = MapHelpers.set;
var Set = SetHelpers.Set; var Set = SetHelpers.Set;
var setAdd = SetHelpers.add; var setAdd = SetHelpers.add;
var objectKeys = getBuiltin('Object', 'keys'); var setHas = SetHelpers.has;
var objectKeys = getBuiltIn('Object', 'keys');
var push = uncurryThis([].push); var push = uncurryThis([].push);
var thisBooleanValue = uncurryThis(true.valueOf); var thisBooleanValue = uncurryThis(true.valueOf);
var thisNumberValue = uncurryThis(1.0.valueOf); var thisNumberValue = uncurryThis(1.0.valueOf);
@ -24510,7 +24507,7 @@ var checkBasicSemantic = function (structuredCloneImplementation) {
var set1 = new global.Set([7]); var set1 = new global.Set([7]);
var set2 = structuredCloneImplementation(set1); var set2 = structuredCloneImplementation(set1);
var number = structuredCloneImplementation(Object(7)); var number = structuredCloneImplementation(Object(7));
return set2 === set1 || !set2.has(7) || typeof number != 'object' || +number !== 7; return set2 === set1 || !set2.has(7) || !isObject(number) || +number !== 7;
}) && structuredCloneImplementation; }) && structuredCloneImplementation;
}; };
@ -24606,10 +24603,10 @@ var cloneBuffer = function (value, map, $type) {
// `ArrayBuffer#slice` is not available in IE10 // `ArrayBuffer#slice` is not available in IE10
// `ArrayBuffer#slice` and `DataView` are not available in old FF // `ArrayBuffer#slice` and `DataView` are not available in old FF
if (!DataView && typeof value.slice != 'function') throwUnpolyfillable('ArrayBuffer'); if (!DataView && !isCallable(value.slice)) throwUnpolyfillable('ArrayBuffer');
// detached buffers throws in `DataView` and `.slice` // detached buffers throws in `DataView` and `.slice`
try { try {
if (typeof value.slice == 'function' && !value.resizable) { if (isCallable(value.slice) && !value.resizable) {
clone = value.slice(0); clone = value.slice(0);
} else { } else {
length = value.byteLength; length = value.byteLength;
@ -24639,13 +24636,7 @@ var cloneView = function (value, type, offset, length, map) {
return new C(cloneBuffer(value.buffer, map), offset, length); return new C(cloneBuffer(value.buffer, map), offset, length);
}; };
var Placeholder = function (object, type, metadata) { var structuredCloneInternal = function (value, map) {
this.object = object;
this.type = type;
this.metadata = metadata;
};
var structuredCloneInternal = function (value, map, transferredBuffers) {
if (isSymbol(value)) throwUncloneable('Symbol'); if (isSymbol(value)) throwUncloneable('Symbol');
if (!isObject(value)) return value; if (!isObject(value)) return value;
// effectively preserves circular references // effectively preserves circular references
@ -24678,34 +24669,21 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
name = value.name; name = value.name;
switch (name) { switch (name) {
case 'AggregateError': case 'AggregateError':
cloned = new (getBuiltin('AggregateError'))([]); cloned = new (getBuiltIn(name))([]);
break; break;
case 'EvalError': case 'EvalError':
cloned = new EvalError();
break;
case 'RangeError': case 'RangeError':
cloned = new RangeError();
break;
case 'ReferenceError': case 'ReferenceError':
cloned = new ReferenceError(); case 'SuppressedError':
break;
case 'SyntaxError': case 'SyntaxError':
cloned = new SyntaxError();
break;
case 'TypeError': case 'TypeError':
cloned = new TypeError();
break;
case 'URIError': case 'URIError':
cloned = new URIError(); cloned = new (getBuiltIn(name))();
break; break;
case 'CompileError': case 'CompileError':
cloned = new CompileError();
break;
case 'LinkError': case 'LinkError':
cloned = new LinkError();
break;
case 'RuntimeError': case 'RuntimeError':
cloned = new RuntimeError(); cloned = new (getBuiltIn('WebAssembly', name))();
break; break;
default: default:
cloned = new Error(); cloned = new Error();
@ -24716,9 +24694,7 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
break; break;
case 'ArrayBuffer': case 'ArrayBuffer':
case 'SharedArrayBuffer': case 'SharedArrayBuffer':
cloned = transferredBuffers cloned = cloneBuffer(value, map, type);
? new Placeholder(value, type)
: cloneBuffer(value, map, type);
break; break;
case 'DataView': case 'DataView':
case 'Int8Array': case 'Int8Array':
@ -24734,17 +24710,15 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
case 'BigInt64Array': case 'BigInt64Array':
case 'BigUint64Array': case 'BigUint64Array':
length = type === 'DataView' ? value.byteLength : value.length; length = type === 'DataView' ? value.byteLength : value.length;
cloned = transferredBuffers cloned = cloneView(value, type, value.byteOffset, length, map);
? new Placeholder(value, type, { offset: value.byteOffset, length: length })
: cloneView(value, type, value.byteOffset, length, map);
break; break;
case 'DOMQuad': case 'DOMQuad':
try { try {
cloned = new DOMQuad( cloned = new DOMQuad(
structuredCloneInternal(value.p1, map, transferredBuffers), structuredCloneInternal(value.p1, map),
structuredCloneInternal(value.p2, map, transferredBuffers), structuredCloneInternal(value.p2, map),
structuredCloneInternal(value.p3, map, transferredBuffers), structuredCloneInternal(value.p3, map),
structuredCloneInternal(value.p4, map, transferredBuffers) structuredCloneInternal(value.p4, map)
); );
} catch (error) { } catch (error) {
cloned = tryNativeRestrictedStructuredClone(value, type); cloned = tryNativeRestrictedStructuredClone(value, type);
@ -24765,7 +24739,7 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
dataTransfer = createDataTransfer(); dataTransfer = createDataTransfer();
if (dataTransfer) { if (dataTransfer) {
for (i = 0, length = lengthOfArrayLike(value); i < length; i++) { for (i = 0, length = lengthOfArrayLike(value); i < length; i++) {
dataTransfer.items.add(structuredCloneInternal(value[i], map, transferredBuffers)); dataTransfer.items.add(structuredCloneInternal(value[i], map));
} }
cloned = dataTransfer.files; cloned = dataTransfer.files;
} else cloned = tryNativeRestrictedStructuredClone(value, type); } else cloned = tryNativeRestrictedStructuredClone(value, type);
@ -24774,7 +24748,7 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
// Safari 9 ImageData is a constructor, but typeof ImageData is 'object' // Safari 9 ImageData is a constructor, but typeof ImageData is 'object'
try { try {
cloned = new ImageData( cloned = new ImageData(
structuredCloneInternal(value.data, map, transferredBuffers), structuredCloneInternal(value.data, map),
value.width, value.width,
value.height, value.height,
{ colorSpace: value.colorSpace } { colorSpace: value.colorSpace }
@ -24871,105 +24845,38 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
keys = objectKeys(value); keys = objectKeys(value);
for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) { for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
key = keys[i]; key = keys[i];
createProperty(cloned, key, structuredCloneInternal(value[key], map, transferredBuffers)); createProperty(cloned, key, structuredCloneInternal(value[key], map));
} break; } break;
case 'Map': case 'Map':
value.forEach(function (v, k) { value.forEach(function (v, k) {
mapSet(cloned, structuredCloneInternal(k, map, transferredBuffers), structuredCloneInternal(v, map, transferredBuffers)); mapSet(cloned, structuredCloneInternal(k, map), structuredCloneInternal(v, map));
}); });
break; break;
case 'Set': case 'Set':
value.forEach(function (v) { value.forEach(function (v) {
setAdd(cloned, structuredCloneInternal(v, map, transferredBuffers)); setAdd(cloned, structuredCloneInternal(v, map));
}); });
break; break;
case 'Error': case 'Error':
createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map, transferredBuffers)); createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map));
if (hasOwn(value, 'cause')) { if (hasOwn(value, 'cause')) {
createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map, transferredBuffers)); createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map));
} }
if (name === 'AggregateError') { if (name === 'AggregateError') {
cloned.errors = structuredCloneInternal(value.errors, map, transferredBuffers); cloned.errors = structuredCloneInternal(value.errors, map);
} else if (name === 'SuppressedError') {
cloned.error = structuredCloneInternal(value.error, map);
cloned.suppressed = structuredCloneInternal(value.suppressed, map);
} // break omitted } // break omitted
case 'DOMException': case 'DOMException':
if (ERROR_STACK_INSTALLABLE) { if (ERROR_STACK_INSTALLABLE) {
createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map, transferredBuffers)); createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map));
} }
} }
return cloned; return cloned;
}; };
var replacePlaceholders = function (value, map) {
if (!isObject(value)) return value;
if (mapHas(map, value)) return mapGet(map, value);
var type, object, metadata, i, length, keys, key, replacement;
if (value instanceof Placeholder) {
type = value.type;
object = value.object;
switch (type) {
case 'ArrayBuffer':
case 'SharedArrayBuffer':
replacement = cloneBuffer(object, map, type);
break;
case 'DataView':
case 'Int8Array':
case 'Uint8Array':
case 'Uint8ClampedArray':
case 'Int16Array':
case 'Uint16Array':
case 'Int32Array':
case 'Uint32Array':
case 'Float16Array':
case 'Float32Array':
case 'Float64Array':
case 'BigInt64Array':
case 'BigUint64Array':
metadata = value.metadata;
replacement = cloneView(object, type, metadata.offset, metadata.length, map);
}
} else switch (classof(value)) {
case 'Array':
case 'Object':
keys = objectKeys(value);
for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
key = keys[i];
value[key] = replacePlaceholders(value[key], map);
} break;
case 'Map':
replacement = new Map();
value.forEach(function (v, k) {
mapSet(replacement, replacePlaceholders(k, map), replacePlaceholders(v, map));
});
break;
case 'Set':
replacement = new Set();
value.forEach(function (v) {
setAdd(replacement, replacePlaceholders(v, map));
});
break;
case 'Error':
value.message = replacePlaceholders(value.message, map);
if (hasOwn(value, 'cause')) {
value.cause = replacePlaceholders(value.cause, map);
}
if (value.name === 'AggregateError') {
value.errors = replacePlaceholders(value.errors, map);
} // break omitted
case 'DOMException':
if (ERROR_STACK_INSTALLABLE) {
value.stack = replacePlaceholders(value.stack, map);
}
}
mapSet(map, value, replacement || value);
return replacement || value;
};
var tryToTransfer = function (rawTransfer, map) { var tryToTransfer = function (rawTransfer, map) {
if (!isObject(rawTransfer)) throw new TypeError('Transfer option cannot be converted to a sequence'); if (!isObject(rawTransfer)) throw new TypeError('Transfer option cannot be converted to a sequence');
@ -24981,7 +24888,7 @@ var tryToTransfer = function (rawTransfer, map) {
var i = 0; var i = 0;
var length = lengthOfArrayLike(transfer); var length = lengthOfArrayLike(transfer);
var buffers = []; var buffers = new Set();
var value, type, C, transferred, canvas, context; var value, type, C, transferred, canvas, context;
while (i < length) { while (i < length) {
@ -24989,12 +24896,14 @@ var tryToTransfer = function (rawTransfer, map) {
type = classof(value); type = classof(value);
if (type === 'ArrayBuffer') { if (type === 'ArrayBuffer' ? setHas(buffers, value) : mapHas(map, value)) {
push(buffers, value); throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
continue;
} }
if (mapHas(map, value)) throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR); if (type === 'ArrayBuffer') {
setAdd(buffers, value);
continue;
}
if (PROPER_STRUCTURED_CLONE_TRANSFER) { if (PROPER_STRUCTURED_CLONE_TRANSFER) {
transferred = nativeStructuredClone(value, { transfer: [value] }); transferred = nativeStructuredClone(value, { transfer: [value] });
@ -25034,25 +24943,18 @@ var tryToTransfer = function (rawTransfer, map) {
return buffers; return buffers;
}; };
var tryToTransferBuffers = function (transfer, map) { var detachBuffers = function (buffers) {
var i = 0; setIterate(buffers, function (buffer) {
var length = lengthOfArrayLike(transfer); if (PROPER_STRUCTURED_CLONE_TRANSFER) {
var value, transferred; nativeRestrictedStructuredClone(buffer, { transfer: [buffer] });
} else if (isCallable(buffer.transfer)) {
while (i < length) { buffer.transfer();
value = transfer[i++]; } else if (detachTransferable) {
detachTransferable(buffer);
if (mapHas(map, value)) throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
if (arrayBufferTransfer) {
transferred = arrayBufferTransfer(value, undefined, true);
} else { } else {
if (!isCallable(value.transfer)) throwUnpolyfillable('ArrayBuffer', TRANSFERRING); throwUnpolyfillable('ArrayBuffer', TRANSFERRING);
transferred = value.transfer();
} }
});
mapSet(map, value, transferred);
}
}; };
// `structuredClone` method // `structuredClone` method
@ -25061,24 +24963,18 @@ $({ global: true, enumerable: true, sham: !PROPER_STRUCTURED_CLONE_TRANSFER, for
structuredClone: function structuredClone(value /* , { transfer } */) { structuredClone: function structuredClone(value /* , { transfer } */) {
var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined; var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined;
var transfer = options ? options.transfer : undefined; var transfer = options ? options.transfer : undefined;
var transferredBuffers = false;
var map, buffers; var map, buffers;
if (transfer !== undefined) { if (transfer !== undefined) {
map = new Map(); map = new Map();
buffers = tryToTransfer(transfer, map); buffers = tryToTransfer(transfer, map);
transferredBuffers = !!lengthOfArrayLike(buffers);
} }
var clone = structuredCloneInternal(value, map, transferredBuffers); var clone = structuredCloneInternal(value, map);
// since of an issue with cloning views of transferred buffers, we a forced to transfer / clone them in 2 steps // since of an issue with cloning views of transferred buffers, we a forced to detach them later
// https://github.com/zloirock/core-js/issues/1265 // https://github.com/zloirock/core-js/issues/1265
if (transferredBuffers) { if (buffers) detachBuffers(buffers);
map = new Map();
tryToTransferBuffers(transfer, map);
clone = replacePlaceholders(clone, map);
}
return clone; return clone;
} }
@ -26468,6 +26364,7 @@ var create = __webpack_require__(72);
var createPropertyDescriptor = __webpack_require__(11); var createPropertyDescriptor = __webpack_require__(11);
var getIterator = __webpack_require__(135); var getIterator = __webpack_require__(135);
var getIteratorMethod = __webpack_require__(136); var getIteratorMethod = __webpack_require__(136);
var createIterResultObject = __webpack_require__(173);
var validateArgumentsLength = __webpack_require__(329); var validateArgumentsLength = __webpack_require__(329);
var wellKnownSymbol = __webpack_require__(34); var wellKnownSymbol = __webpack_require__(34);
var arraySort = __webpack_require__(189); var arraySort = __webpack_require__(189);
@ -26556,17 +26453,23 @@ var serialize = function (it) {
var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) { var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
setInternalState(this, { setInternalState(this, {
type: URL_SEARCH_PARAMS_ITERATOR, type: URL_SEARCH_PARAMS_ITERATOR,
iterator: getIterator(getInternalParamsState(params).entries), target: getInternalParamsState(params).entries,
index: 0,
kind: kind kind: kind
}); });
}, 'Iterator', function next() { }, URL_SEARCH_PARAMS, function next() {
var state = getInternalIteratorState(this); var state = getInternalIteratorState(this);
var kind = state.kind; var target = state.target;
var step = state.iterator.next(); var index = state.index++;
var entry = step.value; if (!target || index >= target.length) {
if (!step.done) { state.target = undefined;
step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value]; return createIterResultObject(undefined, true);
} return step; }
var entry = target[index];
switch (state.kind) {
case 'keys': return createIterResultObject(entry.key, false);
case 'values': return createIterResultObject(entry.value, false);
} return createIterResultObject([entry.key, entry.value], false);
}, true); }, true);
var URLSearchParamsState = function (init) { var URLSearchParamsState = function (init) {
@ -26586,6 +26489,7 @@ URLSearchParamsState.prototype = {
this.update(); this.update();
}, },
parseObject: function (object) { parseObject: function (object) {
var entries = this.entries;
var iteratorMethod = getIteratorMethod(object); var iteratorMethod = getIteratorMethod(object);
var iterator, next, step, entryIterator, entryNext, first, second; var iterator, next, step, entryIterator, entryNext, first, second;
@ -26600,14 +26504,15 @@ URLSearchParamsState.prototype = {
(second = call(entryNext, entryIterator)).done || (second = call(entryNext, entryIterator)).done ||
!call(entryNext, entryIterator).done !call(entryNext, entryIterator).done
) throw new TypeError('Expected sequence with length 2'); ) throw new TypeError('Expected sequence with length 2');
push(this.entries, { key: $toString(first.value), value: $toString(second.value) }); push(entries, { key: $toString(first.value), value: $toString(second.value) });
} }
} else for (var key in object) if (hasOwn(object, key)) { } else for (var key in object) if (hasOwn(object, key)) {
push(this.entries, { key: key, value: $toString(object[key]) }); push(entries, { key: key, value: $toString(object[key]) });
} }
}, },
parseQuery: function (query) { parseQuery: function (query) {
if (query) { if (query) {
var entries = this.entries;
var attributes = split(query, '&'); var attributes = split(query, '&');
var index = 0; var index = 0;
var attribute, entry; var attribute, entry;
@ -26615,7 +26520,7 @@ URLSearchParamsState.prototype = {
attribute = attributes[index++]; attribute = attributes[index++];
if (attribute.length) { if (attribute.length) {
entry = split(attribute, '='); entry = split(attribute, '=');
push(this.entries, { push(entries, {
key: deserialize(shift(entry)), key: deserialize(shift(entry)),
value: deserialize(join(entry, '=')) value: deserialize(join(entry, '='))
}); });

View File

@ -1,5 +1,15 @@
"use strict"; "use strict";
{ const nonameInitialized=localStorage.getItem('noname_inited');
const assetURL=typeof nonameInitialized!='string'||nonameInitialized=='nodejs'?'':nonameInitialized;
new Promise(resolve=>{
if('__core-js_shared__' in window) resolve();
else{
const coreJSBundle=document.createElement('script');
coreJSBundle.onerror=coreJSBundle.onload=resolve;
coreJSBundle.src=`${assetURL}game/core-js-bundle.js`;
document.head.appendChild(coreJSBundle);
}
}).then(()=>{
/** /**
* @typedef {InstanceType<typeof lib.element.Player>} Player * @typedef {InstanceType<typeof lib.element.Player>} Player
* @typedef {InstanceType<typeof lib.element.Card>} Card * @typedef {InstanceType<typeof lib.element.Card>} Card
@ -36,7 +46,6 @@
} }
} }
} }
const nonameInitialized=localStorage.getItem('noname_inited');
const GeneratorFunction=(function*(){}).constructor; const GeneratorFunction=(function*(){}).constructor;
// gnc: GeNCoroutine // gnc: GeNCoroutine
const gnc={ const gnc={
@ -122,7 +131,7 @@
updateURL:'https://raw.githubusercontent.com/libccy/noname', updateURL:'https://raw.githubusercontent.com/libccy/noname',
mirrorURL:'https://raw.fgit.cf/libccy/noname', mirrorURL:'https://raw.fgit.cf/libccy/noname',
hallURL:'47.99.105.222', hallURL:'47.99.105.222',
assetURL:typeof nonameInitialized!='string'||nonameInitialized=='nodejs'?'':nonameInitialized, assetURL:assetURL,
userAgent:userAgent, userAgent:userAgent,
compatibleEdition:Boolean(typeof nonameInitialized=='string'&&nonameInitialized.match(/\/(?:com\.widget|yuri\.nakamura)\.noname\//)), compatibleEdition:Boolean(typeof nonameInitialized=='string'&&nonameInitialized.match(/\/(?:com\.widget|yuri\.nakamura)\.noname\//)),
changeLog:[], changeLog:[],
@ -32541,7 +32550,7 @@
} }
if(game.online||game.onlineroom){ if(game.online||game.onlineroom){
if((game.servermode||game.onlinehall)&&_status.over){ if((game.servermode||game.onlinehall)&&_status.over){
void 0;
} }
else{ else{
localStorage.setItem(lib.configprefix+'directstart',true); localStorage.setItem(lib.configprefix+'directstart',true);
@ -35155,9 +35164,7 @@
} }
} }
if(!_status.requestReadClipboard&&get.config('read_clipboard','connect')){ if(!_status.requestReadClipboard&&get.config('read_clipboard','connect')){
//每次启动只请求一次 const read=text=>{
_status.requestReadClipboard=true;
function read(text){
try{ try{
var roomId=text.split('\n')[1].match(/\d+/); var roomId=text.split('\n')[1].match(/\d+/);
var caption=ui.rooms.find(caption=>caption.key==roomId); var caption=ui.rooms.find(caption=>caption.key==roomId);
@ -35167,6 +35174,8 @@
} }
}catch(e){console.log(e)} }catch(e){console.log(e)}
} }
//每次启动只请求一次
_status.requestReadClipboard=true;
if(_status.read_clipboard_text){ if(_status.read_clipboard_text){
read(_status.read_clipboard_text); read(_status.read_clipboard_text);
}else{ }else{
@ -37431,7 +37440,7 @@
ui.create.chat(); ui.create.chat();
if(game.onlineroom){ if(game.onlineroom){
void 0;
} }
else{ else{
var WebSocketServer=require('ws').Server; var WebSocketServer=require('ws').Server;
@ -44912,7 +44921,7 @@
config.item=config.item(); config.item=config.item();
} }
if(Array.isArray(config.init)){ if(Array.isArray(config.init)){
void 0;
} }
else{ else{
node.classList.add('switcher'); node.classList.add('switcher');
@ -44990,7 +44999,7 @@
} }
} }
else if(config.range){ else if(config.range){
void 0;
} }
else if(config.clear){ else if(config.clear){
if(node.innerHTML.length>=15) node.style.height='auto'; if(node.innerHTML.length>=15) node.style.height='auto';
@ -53757,19 +53766,15 @@
}, },
player:(position,noclick)=>new lib.element.Player(position,noclick), player:(position,noclick)=>new lib.element.Player(position,noclick),
connectPlayers:ip=>{ connectPlayers:ip=>{
ui.updateConnectPlayerPositions();
game.connectPlayers=[]; game.connectPlayers=[];
let numberOfPlayers=lib.configOL.number; const configOL=lib.configOL;
const gameMode=lib.configOL.mode; const numberOfPlayers=parseInt(configOL.player_number)||configOL.number;
if(gameMode=='guozhan'||(gameMode=='identity'&&(lib.configOL.identity_mode!='zhong'&&lib.configOL.identity_mode!='purple'))){
numberOfPlayers=10;
}
ui.updateConnectPlayerPositions(numberOfPlayers);
for(let position=0;position<numberOfPlayers;position++){ for(let position=0;position<numberOfPlayers;position++){
const player=ui.create.player(ui.window); const player=ui.create.player(ui.window);
player.dataset.position=position; player.dataset.position=position;
player.classList.add('connect'); player.classList.add('connect');
game.connectPlayers.push(player); game.connectPlayers.push(player);
if(position>=lib.configOL.number) player.classList.add('unselectable2');
} }
var bar=ui.create.div(ui.window); var bar=ui.create.div(ui.window);
@ -53801,7 +53806,7 @@
for(var i of game.connectPlayers){ for(var i of game.connectPlayers){
if(!i.nickname&&!i.classList.contains('unselectable2')) num++; if(!i.nickname&&!i.classList.contains('unselectable2')) num++;
} }
if(num>=numberOfPlayers-1){ if(num>=lib.configOL.number-1){
alert('至少要有两名玩家才能开始游戏!'); alert('至少要有两名玩家才能开始游戏!');
return; return;
} }
@ -58542,7 +58547,10 @@
* @param {number} [numberOfPlayers] * @param {number} [numberOfPlayers]
*/ */
updateConnectPlayerPositions:numberOfPlayers=>{ updateConnectPlayerPositions:numberOfPlayers=>{
if(typeof numberOfPlayers!='number') numberOfPlayers=lib.configOL.number; if(typeof numberOfPlayers!='number'){
const configOL=lib.configOL;
numberOfPlayers=parseInt(configOL.player_number)||configOL.number;
}
if(!numberOfPlayers) return; if(!numberOfPlayers) return;
const playerPositions=ui.playerPositions; const playerPositions=ui.playerPositions;
playerPositions.forEach((position) => { playerPositions.forEach((position) => {
@ -59778,14 +59786,14 @@
case 'guandu':return '官渡之战'; case 'guandu':return '官渡之战';
} }
} }
else if(config.mode=='single'){ if(config.mode=='single'){
switch(config.single_mode){ switch(config.single_mode){
case 'normal':return '新1v1'; case 'normal':return '新1v1';
case 'changban':return '血战长坂坡'; case 'changban':return '血战长坂坡';
case 'dianjiang':return '点将单挑'; case 'dianjiang':return '点将单挑';
} }
} }
else if(config.mode=='identity'){ if(config.mode=='identity'){
switch(config.identity_mode){ switch(config.identity_mode){
case 'purple':return '三对三对二'; case 'purple':return '三对三对二';
case 'zhong':return (config.double_character?'双将':'')+'忠胆英杰'; case 'zhong':return (config.double_character?'双将':'')+'忠胆英杰';
@ -59793,20 +59801,18 @@
default:return `${get.cnNumber(parseInt(config.number))}${config.double_nei?'双内':''}${config.enable_commoner?'带民':''}${config.double_character?'双将':''}身份`; default:return `${get.cnNumber(parseInt(config.number))}${config.double_nei?'双内':''}${config.enable_commoner?'带民':''}${config.double_character?'双将':''}身份`;
} }
} }
else if(config.mode=='guozhan'){ if(config.mode=='guozhan'){
if(config.separatism) return '群雄割据'; if(config.separatism) return '群雄割据';
if(config.guozhan_mode!='normal') switch(config.guozhan_mode){ if(config.guozhan_mode!='normal') switch(config.guozhan_mode){
case 'yingbian':return '应变国战'; case 'yingbian':return '应变国战';
case 'old':return '怀旧国战'; case 'old':return '怀旧国战';
} }
} }
if(server){
return get.translation(config.mode)+'模式';
}
else{ else{
if(server){ return get.cnNumber(parseInt(config.number))+'人'+get.translation(config.mode);
return get.translation(config.mode)+'模式';
}
else{
return get.cnNumber(parseInt(config.number))+'人'+get.translation(config.mode);
}
} }
}, },
charactersOL:func=>{ charactersOL:func=>{
@ -63452,11 +63458,5 @@
setAllPropertiesEnumerable(lib.element.Control.prototype); setAllPropertiesEnumerable(lib.element.Control.prototype);
setAllPropertiesEnumerable(lib.element.Client.prototype); setAllPropertiesEnumerable(lib.element.Client.prototype);
setAllPropertiesEnumerable(lib.element.NodeWS.prototype); setAllPropertiesEnumerable(lib.element.NodeWS.prototype);
if('__core-js_shared__' in window) lib.init.init(); lib.init.init();
else{ });
const coreJSBundle=document.createElement('script');
coreJSBundle.onerror=coreJSBundle.onload=lib.init.init;
coreJSBundle.src=`${lib.assetURL}game/core-js-bundle.js`;
document.head.appendChild(coreJSBundle);
}
}

View File

@ -3256,38 +3256,6 @@ div:not(.handcards)>.card>.info>span,
left: calc(50% - 106px); left: calc(50% - 106px);
} }
#window>.player.connect[data-position='0'] {
left: calc(25% - 120px);
top: calc(300% / 7 - 155px);
}
#window>.player.connect[data-position='1'] {
left: calc(50% - 60px);
top: calc(300% / 7 - 155px);
}
#window>.player.connect[data-position='2'] {
left: calc(75% - 0px);
top: calc(300% / 7 - 155px);
}
#window>.player.connect[data-position='3'] {
left: calc(25% - 120px);
top: calc(400% / 7 - 75px);
}
#window>.player.connect[data-position='4'] {
left: calc(75% - 0px);
top: calc(400% / 7 - 75px);
}
#window>.player.connect[data-position='5'] {
left: calc(25% - 120px);
top: calc(500% / 7 + 5px);
}
#window>.player.connect[data-position='6'] {
left: calc(50% - 60px);
top: calc(500% / 7 + 5px);
}
#window>.player.connect[data-position='7'] {
left: calc(75% - 0px);
top: calc(500% / 7 + 5px);
}
#window>.player.connect[data-position='c0'] { #window>.player.connect[data-position='c0'] {
left: calc(50% - 120px); left: calc(50% - 120px);
top: calc(50% - 200px) top: calc(50% - 200px)

View File

@ -42,17 +42,20 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
node.style.overflow='hidden'; node.style.overflow='hidden';
var connect=function(e){ var connect=function(e){
const info=lib.config.reconnect_info;
if(info&&info[0]==node.textContent){
game.onlineID=info[1];
if(typeof (game.roomId=info[2])=='string') game.roomIdServer=true;
}
event.textnode.textContent='正在连接...'; event.textnode.textContent='正在连接...';
clearTimeout(event.timeout); clearTimeout(event.timeout);
if(e) e.preventDefault(); if(e) e.preventDefault();
game.saveConfig('last_ip',node.textContent); game.saveConfig('last_ip',node.textContent);
game.connect(node.textContent,function(success){ game.connect(node.textContent,function(success){
if(!success&&event.textnode){ if(success){
var info=lib.config.reconnect_info;
if(info&&info[0]==_status.ip){
game.onlineID=info[1];
if(typeof (game.roomId=info[2])=='string') game.roomIdServer=true;
}
return;
}
if(event.textnode){
alert('连接失败'); alert('连接失败');
event.textnode.textContent='输入联机地址'; event.textnode.textContent='输入联机地址';
} }
@ -121,7 +124,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},220); },220);
if (get.config('read_clipboard','connect')){ if (get.config('read_clipboard','connect')){
var ced=false; var ced=false;
function read(text){ var read=text=>{
try{ try{
var text2=text.split('\n')[2]; var text2=text.split('\n')[2];
var ip=text2.slice(5); var ip=text2.slice(5);