mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 13:55:04 +02:00
Archive Update 53.1 (#62)
* Normalize BOM and line endings * Archive update 0.53.1
This commit is contained in:
committed by
Eliot Partridge
parent
3599e91bc0
commit
782f8c731c
+10
-1
@@ -1,3 +1,12 @@
|
||||
#### v0.53.1
|
||||
- Switched to autumn season
|
||||
- Updated custom servers (about page)
|
||||
- Added option to import and export settings and actions on action bar
|
||||
- Added different colors of cushions for house customization
|
||||
- Fixed scroll wheel not working on Firefox
|
||||
- Fixed not being able to place items behind interactive items like boxes or barrels
|
||||
- Fixed issue with crystal light
|
||||
|
||||
#### v0.53.0
|
||||
- Added custom servers (about page)
|
||||
- Added export option for ponies (character page)
|
||||
@@ -12,7 +21,7 @@
|
||||
- Unlocked walls in front of windows from being placed
|
||||
- Increased house object limit
|
||||
- Fixed issues with house map saving using <code>/savehouse</code> command
|
||||
- Fixed being able to plain object in house behind wall
|
||||
- Fixed being able to place objects in the house behind wall
|
||||
|
||||
#### v0.52.0
|
||||
- Added cave/mines map
|
||||
|
||||
@@ -5,7 +5,7 @@ A game of ponies building a town
|
||||
## Prerequisites
|
||||
|
||||
* [Node.js](https://nodejs.org/download/release/v9.11.2/) (version 9)
|
||||
* [gulp](http://gulpjs.com/) `npm install -g gulp`
|
||||
* gulp `npm install -g gulp`
|
||||
* MongoDB: [download link](https://www.mongodb.com/download-center/community) and [installation instructions](https://docs.mongodb.com/manual/administration/install-community/)
|
||||
* [ImageMagick](https://imagemagick.org/script/download.php#windows) (optional, required for generating preview gifs in animation tool)
|
||||
* [Git LFS](https://git-lfs.github.com/)
|
||||
@@ -143,7 +143,10 @@ Add `config.json` file in root directory with following content. You can use `co
|
||||
"twitterLink": "https://twitter.com/<twitter_name>", // optional
|
||||
"contactEmail": "<your_contact_email>",
|
||||
"port": 8090,
|
||||
"adminPort": 8091,
|
||||
"host": "http://localhost:8090/",
|
||||
"local": "localhost:8090",
|
||||
"adminLocal": "localhost:8091",
|
||||
"secret": "<some_random_string_here>",
|
||||
"token": "<some_random_string_here>",
|
||||
"db": "mongodb://<username>:<password>@localhost:27017/<database_name>", // use values you used when setting up database
|
||||
@@ -170,7 +173,7 @@ Add `config.json` file in root directory with following content. You can use `co
|
||||
"flag": "test", // optional flag ("test", "star" or space separated list of country flags)
|
||||
"flags": { // optional feature flags
|
||||
"test": true, // test server
|
||||
"objects": true, // in-game editor
|
||||
"editor": true, // in-game editor
|
||||
},
|
||||
"alert": "18+", // optional 18+ alert (also blocks underage players)
|
||||
},
|
||||
|
||||
Binary file not shown.
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pony-town",
|
||||
"version": "0.53.0-alpha",
|
||||
"version": "0.53.1-alpha",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
+16
-11
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pony-town",
|
||||
"version": "0.53.0-alpha",
|
||||
"version": "0.53.1-alpha",
|
||||
"description": "A game of ponies building a town",
|
||||
"main": "pony-town.js",
|
||||
"scripts": {
|
||||
@@ -37,23 +37,28 @@
|
||||
"test-ts": "node --max-old-space-size=8192 ./node_modules/mocha/bin/mocha \"src/ts/tests/**/*.spec.ts\" -r ts-node/register -R progress --exit",
|
||||
"test-ts-watch": "npm run test -- --watch --watch-extensions ts",
|
||||
"test-inspect": "mocha \"src/scripts/tests/**/*.spec.js\" -R progress --inspect --exit --watch",
|
||||
"check-filters": "node src/scripts/experiments/checkFilters.js",
|
||||
"check-names": "node src/scripts/experiments/checkNames.js",
|
||||
"check-links": "node src/scripts/experiments/checkLinks.js",
|
||||
"check-messages": "node src/scripts/experiments/checkValidMessages.js",
|
||||
"check-cms": "node src/scripts/experiments/checkCms.js",
|
||||
"update-angular": "npm update @angular/common @angular/compiler @angular/core @angular/forms @angular/platform-browser @angular/platform-browser-dynamic @angular/router @angular/animations @angular/compiler-cli @angular/platform-server @angular/cdk --save",
|
||||
"latest-angular": "npm i @angular/common@latest @angular/compiler@latest @angular/core@latest @angular/forms@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/router@latest @angular/animations@latest @angular/compiler-cli@latest @angular/platform-server@latest @angular/cdk@latest --save",
|
||||
"update-fontawesome": "npm update @fortawesome/fontawesome-svg-core @fortawesome/free-brands-svg-icons @fortawesome/free-solid-svg-icons @fortawesome/angular-fontawesome --save"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^8.2.3",
|
||||
"@angular/animations": "^8.2.4",
|
||||
"@angular/cdk": "^8.1.4",
|
||||
"@angular/common": "^8.2.3",
|
||||
"@angular/compiler": "^8.2.3",
|
||||
"@angular/compiler-cli": "^8.2.3",
|
||||
"@angular/core": "^8.2.3",
|
||||
"@angular/forms": "^8.2.3",
|
||||
"@angular/platform-browser": "^8.2.3",
|
||||
"@angular/platform-browser-dynamic": "^8.2.3",
|
||||
"@angular/platform-server": "^8.2.3",
|
||||
"@angular/router": "^8.2.3",
|
||||
"@angular/common": "^8.2.4",
|
||||
"@angular/compiler": "^8.2.4",
|
||||
"@angular/compiler-cli": "^8.2.4",
|
||||
"@angular/core": "^8.2.4",
|
||||
"@angular/forms": "^8.2.4",
|
||||
"@angular/platform-browser": "^8.2.4",
|
||||
"@angular/platform-browser-dynamic": "^8.2.4",
|
||||
"@angular/platform-server": "^8.2.4",
|
||||
"@angular/router": "^8.2.4",
|
||||
"@clusterws/cws": "^0.15.0",
|
||||
"@fortawesome/angular-fontawesome": "^0.5.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.22",
|
||||
|
||||
@@ -924,8 +924,8 @@ export class PonyTownGame implements Game {
|
||||
const hover = screenToWorld(camera, point(input.pointerX / scale, input.pointerY / scale));
|
||||
|
||||
if (input.usingTouch && !input.wasPressed(Key.TOUCH_CLICK) && !input.isPressed(Key.TOUCH)) {
|
||||
hover.x = 0;
|
||||
hover.y = 0;
|
||||
hover.x = -1;
|
||||
hover.y = -1;
|
||||
}
|
||||
|
||||
this.hover = hover;
|
||||
@@ -957,11 +957,13 @@ export class PonyTownGame implements Game {
|
||||
const pickedEntities = pickEntities(this.map, hover, shift, this.mod);
|
||||
const pickedEntity = pickedEntities[(pickedEntities.indexOf(this.selected!) + 1) % pickedEntities.length];
|
||||
const holdingRemoveTool = player.hold === removeEntitiesTool.type;
|
||||
const holdingPlaceTool = player.hold === placeEntitiesTool.type;
|
||||
const editableMap = hasFlag(this.map.flags, MapFlags.EditableEntities);
|
||||
const holdingTool = holdingRemoveTool || holdingPlaceTool;
|
||||
|
||||
if (BETA && this.editor.selectingEntities) {
|
||||
editorSelectEntities(this, hover, shift);
|
||||
} else if (pickedEntity && (!holdingRemoveTool || !editableMap || hasFlag(pickedEntity.flags, EntityFlags.IgnoreTool))) {
|
||||
} else if (pickedEntity && (!holdingTool || !editableMap || hasFlag(pickedEntity.flags, EntityFlags.IgnoreTool))) {
|
||||
if (pickedEntity.type === PONY_TYPE) {
|
||||
this.select(pickedEntity as Pony);
|
||||
} else if (entityInRange(pickedEntity, player)) {
|
||||
@@ -987,7 +989,7 @@ export class PonyTownGame implements Game {
|
||||
} else if (holdingRemoveTool && this.highlightEntity && editableMap) {
|
||||
const id = this.highlightEntity.id;
|
||||
this.send(server => server.actionParam(Action.RemoveEntity, id));
|
||||
} else if (player.hold === placeEntitiesTool.type && this.highlightEntity && editableMap) {
|
||||
} else if (holdingPlaceTool && this.highlightEntity && editableMap) {
|
||||
const { x, y, type } = this.highlightEntity;
|
||||
this.send(server => server.actionParam(Action.PlaceEntity, { x, y, type }));
|
||||
} else if (this.selected) {
|
||||
|
||||
@@ -27,6 +27,9 @@ export {
|
||||
faTrash,
|
||||
faLock,
|
||||
faApple,
|
||||
faFolderOpen,
|
||||
faDownload,
|
||||
faUpload,
|
||||
faEdit,
|
||||
faImage,
|
||||
faLaughBeam,
|
||||
|
||||
@@ -17,6 +17,7 @@ export class MouseController implements InputController {
|
||||
element.addEventListener('mousedown', this.mousedown);
|
||||
element.addEventListener('mouseup', this.mouseup);
|
||||
element.addEventListener('mousewheel', this.mousewheel);
|
||||
element.addEventListener('wheel', this.mousewheel);
|
||||
element.addEventListener('contextmenu', this.contextmenu);
|
||||
element.addEventListener('click', this.click);
|
||||
window.addEventListener('blur', this.blur);
|
||||
@@ -30,6 +31,7 @@ export class MouseController implements InputController {
|
||||
this.element.removeEventListener('mousedown', this.mousedown);
|
||||
this.element.removeEventListener('mouseup', this.mouseup);
|
||||
this.element.removeEventListener('mousewheel', this.mousewheel);
|
||||
this.element.removeEventListener('wheel', this.mousewheel);
|
||||
this.element.removeEventListener('contextmenu', this.contextmenu);
|
||||
this.element.removeEventListener('click', this.click);
|
||||
this.element = undefined;
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
} from '../client/ponyUtils';
|
||||
import { CM_SIZE } from './constants';
|
||||
|
||||
export const VERSION = 3;
|
||||
export const VERSION = 4;
|
||||
|
||||
interface FieldDefinition<T> {
|
||||
name: keyof PonyInfo;
|
||||
@@ -186,7 +186,7 @@ const COLORS_LENGTH_BITS = 10; // max 1024
|
||||
const BOOLEAN_FIELDS_LENGTH_BITS = 4; // max 15
|
||||
const NUMBER_FIELDS_LENGTH_BITS = 4; // max 15
|
||||
const COLOR_FIELDS_LENGTH_BITS = 4; // max 15
|
||||
const SET_FIELDS_LENGTH_BITS = 5; // max 31
|
||||
const SET_FIELDS_LENGTH_BITS = 6; // max 63
|
||||
const CM_LENGTH_BITS = 5; // max 31
|
||||
const NUMBERS_BITS = 6; // max 63
|
||||
|
||||
@@ -552,6 +552,11 @@ const readNumber = readBits(NUMBERS_BITS);
|
||||
|
||||
export function readPony(read: ReadBits): Precompressed {
|
||||
const version = read(VERSION_BITS);
|
||||
|
||||
if (version > VERSION) {
|
||||
throw new Error('Invalid version');
|
||||
}
|
||||
|
||||
const colors = readFields(read, COLORS_LENGTH_BITS, readColorValue);
|
||||
const colorBits = Math.max(numberToBitCount(colors.length), 1);
|
||||
const readColor = readBits(colorBits);
|
||||
@@ -559,7 +564,7 @@ export function readPony(read: ReadBits): Precompressed {
|
||||
const customOutlines = !!booleanFields[0];
|
||||
const numberFields = readFields(read, NUMBER_FIELDS_LENGTH_BITS, readNumber);
|
||||
const colorFields = readFields(read, COLOR_FIELDS_LENGTH_BITS, readColor);
|
||||
const setFields = readFields(read, SET_FIELDS_LENGTH_BITS, read => readSet(read, colorBits, customOutlines));
|
||||
const setFields = readFields(read, version < 4 ? 5 : SET_FIELDS_LENGTH_BITS, read => readSet(read, colorBits, customOutlines));
|
||||
const cm = readFields(read, CM_LENGTH_BITS, readColor);
|
||||
return { version, colors, booleanFields, numberFields, colorFields, setFields, cm };
|
||||
}
|
||||
|
||||
@@ -2327,7 +2327,9 @@ export const stashEntities = [
|
||||
];
|
||||
|
||||
export const placeableEntities: { type: number; name: string; }[] = [
|
||||
{ type: cushion1.type, name: 'Cushion' },
|
||||
{ type: cushion1.type, name: 'Cushion (red)' },
|
||||
{ type: cushion2.type, name: 'Cushion (blue)' },
|
||||
{ type: cushion3.type, name: 'Cushion (green)' },
|
||||
{ type: barrel.type, name: 'Barrel' },
|
||||
{ type: box.type, name: 'Box' },
|
||||
{ type: boxLanterns.type, name: 'Box of lanterns' },
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
import { fromPairs } from 'lodash';
|
||||
import { matchRomaji, replaceRomaji } from '../client/clientUtils';
|
||||
import { flatten } from './utils';
|
||||
|
||||
const MAX_REPEATS = 16; // needs to be even for emoji
|
||||
|
||||
export const ipRegexText = '(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})';
|
||||
export const ipExceptionRegex = /\d\.\d\.\d\.\d/ui;
|
||||
export const urlExceptionRegex = /^(battle|paint|f(im|an)fiction)\.net$/ui;
|
||||
export const ipExceptionRegex = /\d\.\d\.\d\.\d/i;
|
||||
export const urlExceptionRegex = /^(battle|paint|f(im|an)fiction)\.net$/i;
|
||||
export const urlRegexTexts = [
|
||||
'https?:?//\\S+',
|
||||
'\\bwww\\.[^. ]\\S+',
|
||||
@@ -22,143 +18,3 @@ export function trimRepeatedLetters(test: string): string {
|
||||
return test;
|
||||
}
|
||||
}
|
||||
|
||||
function createCharacterMap(data: string[][]): { [key: string]: string; } {
|
||||
const mappings = data.map(([to, from]) => from.split(/ /g).map(x => [x, to]));
|
||||
return fromPairs(flatten(mappings));
|
||||
}
|
||||
|
||||
const characters = createCharacterMap([
|
||||
[`'`, 'Ъ ъ Ь ь'],
|
||||
['a', 'á ă ắ ặ ằ ẳ ẵ ǎ â ấ ậ ầ ẩ ẫ ä ǟ ȧ ǡ ạ ȁ à ả ȃ ā ą ᶏ ẚ å ǻ ḁ ⱥ ã ɐ ₐ А а @ α'],
|
||||
['A', 'Á Ă Ắ Ặ Ằ Ẳ Ẵ Ǎ Â Ấ Ậ Ầ Ẩ Ẫ Ä Ǟ Ȧ Ǡ Ạ Ȁ À Ả Ȃ Ā Ą Å Ǻ Ḁ Ⱥ Ã Ɐ ᴀ'],
|
||||
['aa', 'ꜳ'],
|
||||
['AA', 'Ꜳ'],
|
||||
['ae', 'æ ǽ ǣ ᴂ'],
|
||||
['AE', 'Æ Ǽ Ǣ ᴁ'],
|
||||
['ao', 'ꜵ'],
|
||||
['AO', 'Ꜵ'],
|
||||
['au', 'ꜷ'],
|
||||
['AU', 'Ꜷ'],
|
||||
['av', 'ꜹ ꜻ'],
|
||||
['AV', 'Ꜹ Ꜻ'],
|
||||
['ay', 'ꜽ'],
|
||||
['AY', 'Ꜽ'],
|
||||
['b', 'ḃ ḅ ɓ ḇ ᵬ ᶀ ƀ ƃ б'],
|
||||
['B', 'Ḃ Ḅ Ɓ Ḇ Ƀ Ƃ ʙ ᴃ Б'],
|
||||
['c', 'ć č ç ḉ ĉ ɕ ċ ƈ ȼ ↄ ꜿ'],
|
||||
['C', 'Ć Č Ç Ḉ Ĉ Ċ Ƈ Ȼ Ꜿ ᴄ'],
|
||||
['ch', 'ч'],
|
||||
['CH', 'Ч'],
|
||||
['d', 'ď ḑ ḓ ȡ ḋ ḍ ɗ ᶑ ḏ ᵭ ᶁ đ ɖ ƌ ꝺ д'],
|
||||
['D', 'Ď Ḑ Ḓ Ḋ Ḍ Ɗ Ḏ Dz Dž Đ Ƌ Ꝺ ᴅ Д'],
|
||||
['dz', 'dz dž'],
|
||||
['DZ', 'DZ DŽ'],
|
||||
['e', 'é ĕ ě ȩ ḝ ê ế ệ ề ể ễ ḙ ë ė ẹ ȅ è ẻ ȇ ē ḗ ḕ ⱸ ę ᶒ ɇ ẽ ḛ ɛ ᶓ ɘ ǝ ₑ е э ε'],
|
||||
['E', 'É Ĕ Ě Ȩ Ḝ Ê Ế Ệ Ề Ể Ễ Ḙ Ë Ė Ẹ Ȅ È Ẻ Ȇ Ē Ḗ Ḕ Ę Ɇ Ẽ Ḛ Ɛ Ǝ ᴇ ⱻ Е Э'],
|
||||
['et', 'ꝫ'],
|
||||
['ET', 'Ꝫ'],
|
||||
['f', 'ḟ ƒ ᵮ ᶂ ꝼ ф'],
|
||||
['F', 'Ḟ Ƒ Ꝼ ꜰ Ф'],
|
||||
['ff', 'ff'],
|
||||
['ffi', 'ffi'],
|
||||
['ffl', 'ffl'],
|
||||
['fi', 'fi'],
|
||||
['fl', 'fl'],
|
||||
['g', 'ǵ ğ ǧ ģ ĝ ġ ɠ ḡ ᶃ ǥ ᵹ ɡ ᵷ г'],
|
||||
['G', 'Ǵ Ğ Ǧ Ģ Ĝ Ġ Ɠ Ḡ Ǥ Ᵹ ɢ ʛ Г'],
|
||||
['h', 'ḫ ȟ ḩ ĥ ⱨ ḧ ḣ ḥ ɦ ẖ ħ ɥ ʮ ʯ х'],
|
||||
['H', 'Ḫ Ȟ Ḩ Ĥ Ⱨ Ḧ Ḣ Ḥ Ħ ʜ Х'],
|
||||
['hv', 'ƕ'],
|
||||
['i', 'ı í ĭ ǐ î ï ḯ ị ȉ ì ỉ ȋ ī į ᶖ ɨ ĩ ḭ ᴉ ᵢ й ы и ι'],
|
||||
['I', 'Í Ĭ Ǐ Î Ï Ḯ İ Ị Ȉ Ì Ỉ Ȋ Ī Į Ɨ Ĩ Ḭ ɪ Й Ы И'],
|
||||
['ij', 'ij'],
|
||||
['IJ', 'IJ'],
|
||||
['is', 'ꝭ'],
|
||||
['IS', 'Ꝭ'],
|
||||
['j', 'ȷ ɟ ʄ ǰ ĵ ʝ ɉ ⱼ'],
|
||||
['J', 'Ĵ Ɉ ᴊ'],
|
||||
['k', 'ḱ ǩ ķ ⱪ ꝃ ḳ ƙ ḵ ᶄ ꝁ ꝅ ʞ к'],
|
||||
['K', 'Ḱ Ǩ Ķ Ⱪ Ꝃ Ḳ Ƙ Ḵ Ꝁ Ꝅ ᴋ К'],
|
||||
['l', 'ĺ ƚ ɬ ľ ļ ḽ ȴ ḷ ḹ ⱡ ꝉ ḻ ŀ ɫ ᶅ ɭ ł ꞁ л'],
|
||||
['L', 'Ĺ Ƚ Ľ Ļ Ḽ Ḷ Ḹ Ⱡ Ꝉ Ḻ Ŀ Ɫ Lj Ł Ꞁ ʟ ᴌ Л'],
|
||||
['lj', 'lj'],
|
||||
['LJ', 'LJ'],
|
||||
['m', 'ḿ ṁ ṃ ɱ ᵯ ᶆ ɯ ɰ м'],
|
||||
['M', 'Ḿ Ṁ Ṃ Ɱ Ɯ ᴍ М'],
|
||||
['n', 'ń ň ņ ṋ ȵ ṅ ṇ ǹ ɲ ṉ ƞ ᵰ ᶇ ɳ ñ н η'],
|
||||
['N', 'Ń Ň Ņ Ṋ Ṅ Ṇ Ǹ Ɲ Ṉ Ƞ Nj Ñ ɴ ᴎ Н'],
|
||||
['nj', 'nj'],
|
||||
['NJ', 'NJ'],
|
||||
['o', 'ɵ ó ŏ ǒ ô ố ộ ồ ổ ỗ ö ȫ ȯ ȱ ọ ő ȍ ò ỏ ơ ớ ợ ờ ở ỡ ȏ ꝋ ꝍ ⱺ ō ṓ ṑ ǫ ǭ ø ǿ õ ṍ ṏ ȭ ɔ ᶗ ᴑ ᴓ ₒ о'],
|
||||
['O', 'Ó Ŏ Ǒ Ô Ố Ộ Ồ Ổ Ỗ Ö Ȫ Ȯ Ȱ Ọ Ő Ȍ Ò Ỏ Ơ Ớ Ợ Ờ Ở Ỡ Ȏ Ꝋ Ꝍ Ō Ṓ Ṑ Ɵ Ǫ Ǭ Ø Ǿ Õ Ṍ Ṏ Ȭ Ɔ ᴏ ᴐ О'],
|
||||
['oe', 'ᴔ œ'],
|
||||
['OE', 'Œ ɶ'],
|
||||
['oi', 'ƣ'],
|
||||
['OI', 'Ƣ'],
|
||||
['oo', 'ꝏ'],
|
||||
['OO', 'Ꝏ'],
|
||||
['ou', 'ȣ'],
|
||||
['OU', 'Ȣ ᴕ'],
|
||||
['p', 'ṕ ṗ ꝓ ƥ ᵱ ᶈ ꝕ ᵽ ꝑ п'],
|
||||
['P', 'Ṕ Ṗ Ꝓ Ƥ Ꝕ Ᵽ Ꝑ ᴘ П'],
|
||||
['q', 'ꝙ ʠ ɋ ꝗ'],
|
||||
['Q', 'Ꝙ Ꝗ'],
|
||||
['r', 'ꞃ ŕ ř ŗ ṙ ṛ ṝ ȑ ɾ ᵳ ȓ ṟ ɼ ᵲ ᶉ ɍ ɽ ɿ ɹ ɻ ɺ ⱹ ᵣ р'],
|
||||
['R', 'Ꞃ Ŕ Ř Ŗ Ṙ Ṛ Ṝ Ȑ Ȓ Ṟ Ɍ Ɽ ʁ ʀ ᴙ ᴚ Р ®'],
|
||||
['s', 'ꞅ ſ ẜ ẛ ẝ ś ṥ š ṧ ş ŝ ș ṡ ṣ ṩ ʂ ᵴ ᶊ ȿ с'],
|
||||
['S', 'Ꞅ Ś Ṥ Š Ṧ Ş Ŝ Ș Ṡ Ṣ Ṩ ꜱ С $'],
|
||||
['sch', 'щ'],
|
||||
['SCH', 'Щ'],
|
||||
['sh', 'ш'],
|
||||
['SH', 'Ш'],
|
||||
['ss', 'ß'],
|
||||
['st', 'st'],
|
||||
['t', 'ꞇ ť ţ ṱ ț ȶ ẗ ⱦ ṫ ṭ ƭ ṯ ᵵ ƫ ʈ ŧ ʇ т'],
|
||||
['T', 'Ꞇ Ť Ţ Ṱ Ț Ⱦ Ṫ Ṭ Ƭ Ṯ Ʈ Ŧ ᴛ Т'],
|
||||
['th', 'ᵺ'],
|
||||
['ts', 'ц'],
|
||||
['TS', 'Ц'],
|
||||
['tz', 'ꜩ'],
|
||||
['TZ', 'Ꜩ'],
|
||||
['u', 'ᴝ ú ŭ ǔ û ṷ ü ǘ ǚ ǜ ǖ ṳ ụ ű ȕ ù ủ ư ứ ự ừ ử ữ ȗ ū ṻ ų ᶙ ů ũ ṹ ṵ ᵤ у'],
|
||||
['U', 'Ú Ŭ Ǔ Û Ṷ Ü Ǘ Ǚ Ǜ Ǖ Ṳ Ụ Ű Ȕ Ù Ủ Ư Ứ Ự Ừ Ử Ữ Ȗ Ū Ṻ Ų Ů Ũ Ṹ Ṵ ᴜ У'],
|
||||
['ue', 'ᵫ'],
|
||||
['um', 'ꝸ'],
|
||||
['v', 'ʌ ⱴ ꝟ ṿ ʋ ᶌ ⱱ ṽ ᵥ в'],
|
||||
['V', 'Ʌ Ꝟ Ṿ Ʋ Ṽ ᴠ В'],
|
||||
['vy', 'ꝡ'],
|
||||
['VY', 'Ꝡ'],
|
||||
['w', 'ʍ ẃ ŵ ẅ ẇ ẉ ẁ ⱳ ẘ'],
|
||||
['W', 'Ẃ Ŵ Ẅ Ẇ Ẉ Ẁ Ⱳ ᴡ'],
|
||||
['x', 'ẍ ẋ ᶍ ₓ'],
|
||||
['X', 'Ẍ Ẋ'],
|
||||
['y', 'ʎ ý ŷ ÿ ẏ ỵ ỳ ƴ ỷ ỿ ȳ ẙ ɏ ỹ'],
|
||||
['Y', 'Ý Ŷ Ÿ Ẏ Ỵ Ỳ Ƴ Ỷ Ỿ Ȳ Ɏ Ỹ ʏ'],
|
||||
['ya', 'я'],
|
||||
['Ya', 'Я'],
|
||||
['yo', 'ё'],
|
||||
['YO', 'Ё'],
|
||||
['yu', 'ю'],
|
||||
['YU', 'Ю'],
|
||||
['z', 'ź ž ẑ ʑ ⱬ ż ẓ ȥ ẕ ᵶ ᶎ ʐ ƶ ɀ з'],
|
||||
['Z', 'Ź Ž Ẑ Ⱬ Ż Ẓ Ȥ Ẕ Ƶ ᴢ З'],
|
||||
['zh', 'ж'],
|
||||
['ZH', 'Ж'],
|
||||
]);
|
||||
|
||||
const nonAscii = /[^A-Za-z0-9]/g;
|
||||
|
||||
export function latinize(text: string): string {
|
||||
return text
|
||||
.replace(matchRomaji, replaceRomaji)
|
||||
.replace(nonAscii, x => characters[x] || x);
|
||||
}
|
||||
|
||||
export function latinize2(name: string): string {
|
||||
return latinize(name
|
||||
.replace(/[ǫ]/ui, 'q')
|
||||
.replace(/[с]/ui, 'c')
|
||||
.replace(/[н]|\|-\|/ui, 'h')
|
||||
.replace(/[лпий]/ui, 'n'));
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ export function isPaletteSpriteBatch(batch: SpriteBatch | PaletteSpriteBatch): b
|
||||
|
||||
export interface ServerFeatureFlags {
|
||||
test?: boolean; // test server
|
||||
objects?: boolean; // editor
|
||||
editor?: boolean; // editor
|
||||
// more flags here ...
|
||||
}
|
||||
|
||||
|
||||
+27
-18
@@ -1475,15 +1475,24 @@ export function isAscii(text: string) {
|
||||
const unicode = createBadWords(false);
|
||||
const ascii = createBadWords(true);
|
||||
|
||||
const replaceRegex = (values: string[]) => new RegExp(`\\b(?:${values.join('|')})\\b`, 'ugi');
|
||||
const replaceRegexRU = (values: string[]) => new RegExp(`${wordStartRU}(?:${values.join('|')})${wordEndRU}`, 'ugi');
|
||||
const replaceRegexOther = (values: string[]) => new RegExp(`(?:${values.join('|')})`, 'ugi');
|
||||
const replaceRegexSpecific = (values: string[]) => new RegExp(`(?:${values.join('|')})`, 'ug');
|
||||
function tryRegex(value: string, flags: string) {
|
||||
try {
|
||||
return new RegExp(value, flags);
|
||||
} catch (e) {
|
||||
console.error(e.message);
|
||||
return new RegExp(/(?!.*)/);
|
||||
}
|
||||
}
|
||||
|
||||
const testRegex = (values: string[]) => new RegExp(`\\b(?:${values.join('|')})\\b`, 'ui');
|
||||
const testRegexRU = (values: string[]) => new RegExp(`${wordStartRU}(?:${values.join('|')})${wordEndRU}`, 'ui');
|
||||
const testRegexOther = (values: string[]) => new RegExp(`(?:${values.join('|')})`, 'ui');
|
||||
const testRegexSpecific = (values: string[]) => new RegExp(`(?:${values.join('|')})`, 'u');
|
||||
const replaceRegex = (values: string[]) => tryRegex(`\\b(?:${values.join('|')})\\b`, 'ugi');
|
||||
const replaceRegexRU = (values: string[]) => tryRegex(`${wordStartRU}(?:${values.join('|')})${wordEndRU}`, 'ugi');
|
||||
const replaceRegexOther = (values: string[]) => tryRegex(`(?:${values.join('|')})`, 'ugi');
|
||||
const replaceRegexSpecific = (values: string[]) => tryRegex(`(?:${values.join('|')})`, 'ug');
|
||||
|
||||
const testRegex = (values: string[]) => tryRegex(`\\b(?:${values.join('|')})\\b`, 'ui');
|
||||
const testRegexRU = (values: string[]) => tryRegex(`${wordStartRU}(?:${values.join('|')})${wordEndRU}`, 'ui');
|
||||
const testRegexOther = (values: string[]) => tryRegex(`(?:${values.join('|')})`, 'ui');
|
||||
const testRegexSpecific = (values: string[]) => tryRegex(`(?:${values.join('|')})`, 'u');
|
||||
|
||||
const regexReplace = replaceRegex(unicode.all);
|
||||
const regexReplaceRU = replaceRegexRU(unicode.foreign);
|
||||
@@ -1507,8 +1516,8 @@ const regexTestSpecificFast = testRegexSpecific(ascii.specific);
|
||||
|
||||
const regexTestFuck = testRegex(unicode.fuck);
|
||||
|
||||
const regexReplaceRUSingle = new RegExp(`${unicode.foreign.join('|')}`, 'ugi');
|
||||
const regexReplacePartial = new RegExp(`${[
|
||||
const regexReplaceRUSingle = tryRegex(`${unicode.foreign.join('|')}`, 'ugi');
|
||||
const regexReplacePartial = tryRegex(`${[
|
||||
...unicode.all, ...unicode.foreign, ...unicode.other, ...unicode.specific
|
||||
].join('|')}`, 'ugi');
|
||||
|
||||
@@ -1579,17 +1588,17 @@ export function filterBadWordsPartial(text: string, replacer = defaultReplacer):
|
||||
}
|
||||
|
||||
export function findMatch(text: string): string | undefined {
|
||||
return unicode.all.find(x => (new RegExp(`\\b(?:${x})\\b`, 'ui')).test(text))
|
||||
|| unicode.foreign.find(x => (new RegExp(`${wordStartRU}(?:${x})${wordEndRU}`, 'ui')).test(text))
|
||||
|| unicode.other.find(x => (new RegExp(`${x}`, 'u')).test(text))
|
||||
|| unicode.specific.find(x => (new RegExp(`${x}`, 'u')).test(text));
|
||||
return unicode.all.find(x => (tryRegex(`\\b(?:${x})\\b`, 'ui')).test(text))
|
||||
|| unicode.foreign.find(x => (tryRegex(`${wordStartRU}(?:${x})${wordEndRU}`, 'ui')).test(text))
|
||||
|| unicode.other.find(x => (tryRegex(`${x}`, 'u')).test(text))
|
||||
|| unicode.specific.find(x => (tryRegex(`${x}`, 'u')).test(text));
|
||||
}
|
||||
|
||||
export function createMatchEntries() {
|
||||
return [
|
||||
...unicode.all.map(line => ({ line, regex: new RegExp(`\\b(?:${line})\\b`, 'ui') })),
|
||||
...unicode.foreign.map(line => ({ line, regex: new RegExp(`${wordStartRU}(?:${line})${wordEndRU}`, 'ui') })),
|
||||
...unicode.other.map(line => ({ line, regex: new RegExp(line, 'ui') })),
|
||||
...unicode.specific.map(line => ({ line, regex: new RegExp(line, 'u') })),
|
||||
...unicode.all.map(line => ({ line, regex: tryRegex(`\\b(?:${line})\\b`, 'ui') })),
|
||||
...unicode.foreign.map(line => ({ line, regex: tryRegex(`${wordStartRU}(?:${line})${wordEndRU}`, 'ui') })),
|
||||
...unicode.other.map(line => ({ line, regex: tryRegex(line, 'ui') })),
|
||||
...unicode.specific.map(line => ({ line, regex: tryRegex(line, 'u') })),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
div(*ngIf="account")
|
||||
div(*ngIf="account")
|
||||
.row
|
||||
.col-md-12
|
||||
h2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ng-template(#searchTooltip)
|
||||
ng-template(#searchTooltip)
|
||||
.text-left.help-tooltip
|
||||
div: em search by:
|
||||
div name:<account_name> #[em - account name]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ng-template(#duplicatesPopover)
|
||||
ng-template(#duplicatesPopover)
|
||||
div(*ngFor="let e of duplicateEntries")
|
||||
| {{e}}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.row(style="margin-top: 100px;")
|
||||
.row(style="margin-top: 100px;")
|
||||
.col-md-6
|
||||
h2 {{ip}} [{{info.origin?.country}}]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.text-center.pt-5(*ngIf="!stats")
|
||||
.text-center.pt-5(*ngIf="!stats")
|
||||
fa-icon.text-muted([icon]="spinnerIcon" [fixedWidth]="true" [spin]="true" size="3x")
|
||||
|
||||
.row(*ngIf="stats")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ng-template(#searchTooltip)
|
||||
ng-template(#searchTooltip)
|
||||
.text-left.help-tooltip
|
||||
div: em search by:
|
||||
div exact:<name> #[em - exact pony name]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
div(*ngIf="isSuperadmin")
|
||||
div(*ngIf="isSuperadmin")
|
||||
button.btn.btn-sm.btn-default((click)="notifyOfUpdate()")
|
||||
| Notify of update
|
||||
button.btn.btn-sm.btn-default.ml-1((click)="shutdownServers()")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.container-fluid
|
||||
.container-fluid
|
||||
|
||||
.d-flex.justify-content-between
|
||||
.admin-initializing
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ng-template(#notePopover)
|
||||
ng-template(#notePopover)
|
||||
textarea.form-control.note-editor(
|
||||
cols="20" rows="15" agAutoFocus [(ngModel)]="note" (keydown.escape)="blur()" (blur)="blur()")
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
div(*ngIf="open || !canClose")
|
||||
div(*ngIf="open || !canClose")
|
||||
.d-flex.justify-content-between.align-items-center
|
||||
h3
|
||||
| {{title}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
a(*ngIf="auth?.url" [href]="auth?.url" target="_blank" rel="noopener noreferrer" [title]="name")
|
||||
a(*ngIf="auth?.url" [href]="auth?.url" target="_blank" rel="noopener noreferrer" [title]="name")
|
||||
fa-icon([icon]="icon" [fixedWidth]="true")
|
||||
span(*ngIf="!auth?.url" [title]="name")
|
||||
fa-icon([icon]="icon" [fixedWidth]="true")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
table.table.table-fixed.table-striped.table-hover.table-sm.table-ellipsis
|
||||
table.table.table-fixed.table-striped.table-hover.table-sm.table-ellipsis
|
||||
thead
|
||||
tr
|
||||
th.col-time created
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.btn-group.mb-1
|
||||
.btn-group.mb-1
|
||||
button.btn.btn-xs([ngClass]="on ? 'btn-default' : 'btn-danger active'" (click)="onToggle(false)" [disabled]="disabled")
|
||||
b {{offText}}
|
||||
button.btn.btn-xs([ngClass]="on ? 'btn-success active' : 'btn-default'" (click)="onToggle(true)" [disabled]="disabled")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.d-flex.align-items-center(*ngIf="origin")
|
||||
.d-flex.align-items-center(*ngIf="origin")
|
||||
a.origin-info-ip.mr-1([routerLink]="['/origins', origin.ip, origin.country]" [title]="origin.ip")
|
||||
| {{origin.ip}}
|
||||
span([title]="countryName") [{{origin.country}}]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ng-template(#tooltip)
|
||||
ng-template(#tooltip)
|
||||
.character-tooltip(style="position: relative")
|
||||
character-preview([pony]="pony?.ponyInfo" [passive]="true")
|
||||
.character-tooltip-indicator(*ngIf="isBadCM") •
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ng-template(#tooltip)
|
||||
ng-template(#tooltip)
|
||||
div {{time | date:'mediumDate'}}
|
||||
.text-muted {{time | date:'mediumTime'}}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.action-bar(
|
||||
[class.has-scroller]="hasScroller" [class.is-mobile]="mobile" [class.is-blurred]="blurred"
|
||||
#scroller (mousewheel)="scroll($event)" (scroll)="true")
|
||||
#scroller (mousewheel)="scroll($event)" (wheel)="scroll($event)" (scroll)="true")
|
||||
action-button(
|
||||
*ngFor="let a of actions; let i = index"
|
||||
[class.blur-me]="i < blurCount"
|
||||
|
||||
@@ -79,6 +79,11 @@
|
||||
| Clear action bar
|
||||
button.btn.btn-outline-secondary.mr-2.mb-2((click)="undo()")
|
||||
| Undo
|
||||
button.btn.btn-outline-secondary.mr-2.mb-2((click)="export()")
|
||||
| Export actions
|
||||
button.btn.btn-outline-secondary.mr-2.mb-2((click)="importFile.click()")
|
||||
| Import actions
|
||||
input.d-none(#importFile type="file" (change)="import(importFile.files[0])")
|
||||
|
||||
tab(*ngIf="dev" title="Dev" [icon]="devIcon")
|
||||
div(*tabContent)
|
||||
|
||||
@@ -2,14 +2,14 @@ import { Component, Output, EventEmitter, OnInit, OnDestroy } from '@angular/cor
|
||||
import { Subscription } from 'rxjs';
|
||||
import {
|
||||
createButtionActionActions, expressionButtonAction, createButtonCommandActions,
|
||||
createDefaultButtonActions, actionExpressionDefaultPalette, entityButtonAction
|
||||
createDefaultButtonActions, actionExpressionDefaultPalette, entityButtonAction, serializeActions, deserializeActions
|
||||
} from '../../../client/buttonActions';
|
||||
import * as sprites from '../../../generated/sprites';
|
||||
import {
|
||||
Eye, Muzzle, ColorExtraSet, ColorExtra, Iris, ExpressionExtra, PonyEye, ButtonAction, Action,
|
||||
ButtonActionSlot, EntityButtonAction
|
||||
} from '../../../common/interfaces';
|
||||
import { createExpression } from '../../../client/clientUtils';
|
||||
import { createExpression, readFileAsText } from '../../../client/clientUtils';
|
||||
import { ACTION_EXPRESSION_BG, ACTION_EXPRESSION_EYE_COLOR, fillToOutline } from '../../../common/colors';
|
||||
import { faLock, faApple, faLaughBeam, faComment, faCog, faCogs } from '../../../client/icons';
|
||||
import { createEyeSprite } from '../../../client/spriteUtils';
|
||||
@@ -151,4 +151,16 @@ export class ActionsModal implements OnInit, OnDestroy {
|
||||
this.entityAction = entityButtonAction(this.entityName);
|
||||
}
|
||||
}
|
||||
export() {
|
||||
const data = serializeActions(this.game.actions);
|
||||
saveAs(new Blob([data], { type: 'text/plain;charset=utf-8' }), `pony-town-actions.json`);
|
||||
}
|
||||
async import(file: File | undefined) {
|
||||
if (file) {
|
||||
const text = await readFileAsText(file);
|
||||
this.game.actions = deserializeActions(text);
|
||||
this.game.editingActions = false;
|
||||
setTimeout(() => this.game.editingActions = true, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.color-picker.dropdown(
|
||||
.color-picker.dropdown(
|
||||
[class.disabled]="isDisabled" [class.open]="isOpen" [class.show]="isOpen")
|
||||
//-[class.indicator]="indicatorColor"
|
||||
.color-picker-box([style.background-color]="bg")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
nav.navbar.navbar-expand.justify-content-end(role="navigation")
|
||||
nav.navbar.navbar-expand.justify-content-end(role="navigation")
|
||||
.d-none.d-md-block
|
||||
a.pixelart.logo(*ngIf="logo" routerLink="/" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }")
|
||||
img.pixelart.logo-large(revSrc="images/logo-large.png" alt="Pony Town")
|
||||
img.pixelart.logo-small(revSrc="images/logo-small.png" alt="Pony Town")
|
||||
img.pixelart.logo-large(revSrc="images/logo-large.png" alt="Pony Town" width="287" height="65")
|
||||
img.pixelart.logo-small(revSrc="images/logo-small.png" alt="Pony Town" width="37" height="43")
|
||||
|
||||
.navbar-collapse.text-right
|
||||
.navbar-nav.ml-auto
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
}
|
||||
|
||||
.logo-large {
|
||||
width: 287px;
|
||||
display: none;
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
@@ -32,7 +31,6 @@
|
||||
}
|
||||
|
||||
.logo-small {
|
||||
width: 37px;
|
||||
display: block;
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
|
||||
@@ -13,7 +13,10 @@ ng-template(#tooltip)
|
||||
span.ml-1 {{counters?.timeouts || 0}}
|
||||
div {{note}}
|
||||
|
||||
.btn-group.btn-group-xs.btn-group-shadow(*ngIf="check?.xcz?.vdw?.qwe?.mnb")
|
||||
.btn-group.btn-group-xs.btn-group-shadow(*ngIf="check?.hgf?.bvc?.wer?.ngf")
|
||||
//- button.btn.btn-xs.btn-default((click)="report()" tooltip="Report")
|
||||
fa-icon([icon]="flagIcon")
|
||||
|
||||
.btn-group.dropdown(dropdown)
|
||||
button.btn.btn-xs.btn-default(dropdownToggle)
|
||||
fa-icon([icon]="moreIcon")
|
||||
|
||||
@@ -2,3 +2,9 @@
|
||||
h5 General rules
|
||||
ul.text-muted.list-rules
|
||||
li(*ngFor="let r of rules") {{r}}
|
||||
|
||||
h5 Notice
|
||||
p.text-muted
|
||||
| This game is very #[strong early in development]. There might be bugs and occasional downtimes.
|
||||
p.text-muted
|
||||
| Please do not redistribute any of the game files or code.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
.portrait-box([ngClass]="size")
|
||||
.portrait-box([ngClass]="size")
|
||||
canvas(#canvas)
|
||||
.portrait-box-cover(*ngIf="!noBorder")
|
||||
|
||||
@@ -123,10 +123,15 @@
|
||||
| Disable function keys (F1-F12)
|
||||
|
||||
.modal-footer.d-flex
|
||||
button.btn.btn-outline-secondary.d-none.d-sm-block((click)="reset()")
|
||||
button.btn.btn-wide.btn-outline-secondary.d-none.d-sm-block((click)="reset()")
|
||||
| Reset
|
||||
button.btn.btn-outline-secondary.d-none.d-sm-block((click)="export()" title="Export settings")
|
||||
fa-icon([icon]="exportIcon" [fixedWidth]="true")
|
||||
button.btn.btn-outline-secondary.d-none.d-sm-block((click)="importFile.click()" title="Import settings")
|
||||
fa-icon([icon]="importIcon" [fixedWidth]="true")
|
||||
input.d-none(#importFile type="file" (change)="import(importFile.files[0])")
|
||||
.flex-grow-1
|
||||
button.btn.btn-outline-secondary((click)="cancel()")
|
||||
button.btn.btn-wide.btn-outline-secondary((click)="cancel()")
|
||||
| Cancel
|
||||
button.btn.btn-outline-secondary.ml-2((click)="ok()")
|
||||
button.btn.btn-wide.btn-outline-secondary.ml-2((click)="ok()")
|
||||
| OK
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
.btn {
|
||||
.btn-wide {
|
||||
min-width: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
import { StorageService } from '../../services/storageService';
|
||||
import { cloneDeep } from '../../../common/utils';
|
||||
import { PonyTownGame } from '../../../client/game';
|
||||
import { updateRangeIndicator } from '../../../client/clientUtils';
|
||||
import { faSlidersH, faCommentSlash, faGamepad, faImage } from '../../../client/icons';
|
||||
import { updateRangeIndicator, readFileAsText } from '../../../client/clientUtils';
|
||||
import { faSlidersH, faCommentSlash, faGamepad, faImage, faDownload, faUpload } from '../../../client/icons';
|
||||
|
||||
@Component({
|
||||
selector: 'settings-modal',
|
||||
@@ -24,6 +24,8 @@ export class SettingsModal implements OnInit, OnDestroy {
|
||||
readonly filtersIcon = faCommentSlash;
|
||||
readonly controlsIcon = faGamepad;
|
||||
readonly graphicsIcon = faImage;
|
||||
readonly exportIcon = faDownload;
|
||||
readonly importIcon = faUpload;
|
||||
@Output() close = new EventEmitter();
|
||||
account: AccountSettings = {};
|
||||
browser: BrowserSettings = {};
|
||||
@@ -119,4 +121,19 @@ export class SettingsModal implements OnInit, OnDestroy {
|
||||
this.account.filterWords = '';
|
||||
}
|
||||
}
|
||||
export() {
|
||||
const account = { ...this.account, actions: undefined };
|
||||
const browser = this.browser;
|
||||
const data = JSON.stringify({ account, browser });
|
||||
saveAs(new Blob([data], { type: 'text/plain;charset=utf-8' }), `pony-town-settings.json`);
|
||||
}
|
||||
async import(file: File | undefined) {
|
||||
if (file) {
|
||||
const text = await readFileAsText(file);
|
||||
const { account, browser } = JSON.parse(text);
|
||||
const actions = this.account.actions;
|
||||
Object.assign(this.account, { ...account, actions });
|
||||
Object.assign(this.browser, browser);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.slider-bar(#bar [class.disabled]="disabled" (agDrag)="drag($event)" agDragRelative="self")
|
||||
.slider-bar(#bar [class.disabled]="disabled" (agDrag)="drag($event)" agDragRelative="self")
|
||||
.slider-bar-fill([style.width.%]="width")
|
||||
.slider-bar-line
|
||||
.slider-bar-base([style.left.%]="width")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ng-template(#selectFrame)
|
||||
ng-template(#selectFrame)
|
||||
.frame-select-container
|
||||
a.frame-select(*ngFor="let s of sprites; index as i" [class.active]="frame === i"
|
||||
(mousedown)="select(i)" (mouseenter)="enter(i)" (mouseleave)="leave()")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.tools-range.input-group([class.input-group-sm]="small")
|
||||
.tools-range.input-group([class.input-group-sm]="small")
|
||||
.input-group-prepend
|
||||
button.btn.btn-default((click)="decrement()")
|
||||
fa-icon([icon]="vertical ? upIcon : leftIcon" [fixedWidth]="true")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ng-template(#shareLinkPopover)
|
||||
ng-template(#shareLinkPopover)
|
||||
div
|
||||
span.close.ml-2((click)="shareLinkOpen = false") ×
|
||||
| {{shareLink}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.m-4
|
||||
.m-4
|
||||
ul.nav.nav-pills
|
||||
a.nav-link(routerLink="/variants") Variant explorer
|
||||
a.nav-link(routerLink="/animation") Animator
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.form-inline
|
||||
.form-inline
|
||||
.form-group
|
||||
a.btn.btn-default(routerLink="/")
|
||||
fa-icon([icon]="homeIcon")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ng-template(#modal)
|
||||
ng-template(#modal)
|
||||
settings-modal((close)="modalRef.hide()")
|
||||
|
||||
.container-fluid.mt-3(*ngIf="initialized")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.form-inline.p-1
|
||||
.form-inline.p-1
|
||||
.form-group
|
||||
a.btn.btn-default(routerLink="/")
|
||||
fa-icon([icon]="homeIcon")
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
router-outlet
|
||||
router-outlet
|
||||
draggable-outlet
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
/* tslint:disable */
|
||||
|
||||
export const CHANGELOG: { version: string; changes: string[]; }[] = [
|
||||
{
|
||||
"version": "v0.53.1",
|
||||
"changes": [
|
||||
"Switched to autumn season",
|
||||
"Updated custom servers (about page)",
|
||||
"Added option to import and export settings and actions on action bar",
|
||||
"Added different colors of cushions for house customization",
|
||||
"Fixed scroll wheel not working on Firefox",
|
||||
"Fixed not being able to place items behind interactive items like boxes or barrels",
|
||||
"Fixed issue with crystal light"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "v0.53.0",
|
||||
"changes": [
|
||||
@@ -17,7 +29,7 @@ export const CHANGELOG: { version: string; changes: string[]; }[] = [
|
||||
"Unlocked walls in front of windows from being placed",
|
||||
"Increased house object limit",
|
||||
"Fixed issues with house map saving using <code>/savehouse</code> command",
|
||||
"Fixed being able to plain object in house behind wall"
|
||||
"Fixed being able to place objects in the house behind wall"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -44,6 +44,7 @@ export const faDatabase = {'prefix':'fas','iconName':'database','icon':[448,512,
|
||||
export const faDesktop = {'prefix':'fas','iconName':'desktop','icon':[576,512,[],'f108','M528 0H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h192l-16 48h-72c-13.3 0-24 10.7-24 24s10.7 24 24 24h272c13.3 0 24-10.7 24-24s-10.7-24-24-24h-72l-16-48h192c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-16 352H64V64h448v288z']};
|
||||
export const faDeviantart = {'prefix':'fab','iconName':'deviantart','icon':[320,512,[],'f1bd','M320 93.2l-98.2 179.1 7.4 9.5H320v127.7H159.1l-13.5 9.2-43.7 84c-.3 0-8.6 8.6-9.2 9.2H0v-93.2l93.2-179.4-7.4-9.2H0V102.5h156l13.5-9.2 43.7-84c.3 0 8.6-8.6 9.2-9.2H320v93.1z']};
|
||||
export const faDiscord = {'prefix':'fab','iconName':'discord','icon':[448,512,[],'f392','M297.216 243.2c0 15.616-11.52 28.416-26.112 28.416-14.336 0-26.112-12.8-26.112-28.416s11.52-28.416 26.112-28.416c14.592 0 26.112 12.8 26.112 28.416zm-119.552-28.416c-14.592 0-26.112 12.8-26.112 28.416s11.776 28.416 26.112 28.416c14.592 0 26.112-12.8 26.112-28.416.256-15.616-11.52-28.416-26.112-28.416zM448 52.736V512c-64.494-56.994-43.868-38.128-118.784-107.776l13.568 47.36H52.48C23.552 451.584 0 428.032 0 398.848V52.736C0 23.552 23.552 0 52.48 0h343.04C424.448 0 448 23.552 448 52.736zm-72.96 242.688c0-82.432-36.864-149.248-36.864-149.248-36.864-27.648-71.936-26.88-71.936-26.88l-3.584 4.096c43.52 13.312 63.744 32.512 63.744 32.512-60.811-33.329-132.244-33.335-191.232-7.424-9.472 4.352-15.104 7.424-15.104 7.424s21.248-20.224 67.328-33.536l-2.56-3.072s-35.072-.768-71.936 26.88c0 0-36.864 66.816-36.864 149.248 0 0 21.504 37.12 78.08 38.912 0 0 9.472-11.52 17.152-21.248-32.512-9.728-44.8-30.208-44.8-30.208 3.766 2.636 9.976 6.053 10.496 6.4 43.21 24.198 104.588 32.126 159.744 8.96 8.96-3.328 18.944-8.192 29.44-15.104 0 0-12.8 20.992-46.336 30.464 7.68 9.728 16.896 20.736 16.896 20.736 56.576-1.792 78.336-38.912 78.336-38.912z']};
|
||||
export const faDownload = {'prefix':'fas','iconName':'download','icon':[512,512,[],'f019','M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z']};
|
||||
export const faDrawPolygon = {'prefix':'fas','iconName':'draw-polygon','icon':[448,512,[],'f5ee','M384 352c-.35 0-.67.1-1.02.1l-39.2-65.32c5.07-9.17 8.22-19.56 8.22-30.78s-3.14-21.61-8.22-30.78l39.2-65.32c.35.01.67.1 1.02.1 35.35 0 64-28.65 64-64s-28.65-64-64-64c-23.63 0-44.04 12.95-55.12 32H119.12C108.04 44.95 87.63 32 64 32 28.65 32 0 60.65 0 96c0 23.63 12.95 44.04 32 55.12v209.75C12.95 371.96 0 392.37 0 416c0 35.35 28.65 64 64 64 23.63 0 44.04-12.95 55.12-32h209.75c11.09 19.05 31.49 32 55.12 32 35.35 0 64-28.65 64-64 .01-35.35-28.64-64-63.99-64zm-288 8.88V151.12A63.825 63.825 0 0 0 119.12 128h208.36l-38.46 64.1c-.35-.01-.67-.1-1.02-.1-35.35 0-64 28.65-64 64s28.65 64 64 64c.35 0 .67-.1 1.02-.1l38.46 64.1H119.12A63.748 63.748 0 0 0 96 360.88zM272 256c0-8.82 7.18-16 16-16s16 7.18 16 16-7.18 16-16 16-16-7.18-16-16zM400 96c0 8.82-7.18 16-16 16s-16-7.18-16-16 7.18-16 16-16 16 7.18 16 16zM64 80c8.82 0 16 7.18 16 16s-7.18 16-16 16-16-7.18-16-16 7.18-16 16-16zM48 416c0-8.82 7.18-16 16-16s16 7.18 16 16-7.18 16-16 16-16-7.18-16-16zm336 16c-8.82 0-16-7.18-16-16s7.18-16 16-16 16 7.18 16 16-7.18 16-16 16z']};
|
||||
export const faEdge = {'prefix':'fab','iconName':'edge','icon':[512,512,[],'f282','M25.714 228.163c.111-.162.23-.323.342-.485-.021.162-.045.323-.065.485h-.277zm460.572 15.508c0-44.032-7.754-84.465-28.801-122.405C416.498 47.879 343.912 8.001 258.893 8.001 118.962 7.724 40.617 113.214 26.056 227.679c42.429-61.312 117.073-121.376 220.375-124.966 0 0 109.666 0 99.419 104.957H169.997c6.369-37.386 18.554-58.986 34.339-78.926-75.048 34.893-121.85 96.096-120.742 188.315.83 71.448 50.124 144.836 120.743 171.976 83.357 31.847 192.776 7.2 240.132-21.324V363.307c-80.864 56.494-270.871 60.925-272.255-67.572h314.073v-52.064z']};
|
||||
export const faEdit = {'prefix':'fas','iconName':'edit','icon':[576,512,[],'f044','M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z']};
|
||||
@@ -61,6 +62,7 @@ export const faFileImage = {'prefix':'fas','iconName':'file-image','icon':[384,5
|
||||
export const faFilter = {'prefix':'fas','iconName':'filter','icon':[512,512,[],'f0b0','M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z']};
|
||||
export const faFirefox = {'prefix':'fab','iconName':'firefox','icon':[480,512,[],'f269','M478.1 235.3c-.7-4.5-1.4-7.1-1.4-7.1s-1.8 2-4.7 5.9c-.9-10.7-2.8-21.2-5.8-31.6-3.7-12.9-8.5-25.4-14.5-37.4-3.8-8-8.2-15.6-13.3-22.8-1.8-2.7-3.7-5.4-5.6-7.9-8.8-14.4-19-23.3-30.7-40-7.6-12.8-12.9-26.9-15.4-41.6-3.2 8.9-5.7 18-7.4 27.3-12.1-12.2-22.5-20.8-28.9-26.7C319.4 24.2 323 9.1 323 9.1S264.7 74.2 289.9 142c8.7 23 23.8 43.1 43.4 57.9 24.4 20.2 50.8 36 64.7 76.6-11.2-21.3-28.1-39.2-48.8-51.5 6.2 14.7 9.4 30.6 9.3 46.5 0 61-49.6 110.5-110.6 110.4-8.3 0-16.5-.9-24.5-2.8-9.5-1.8-18.7-4.9-27.4-9.3-12.9-7.8-24-18.1-32.8-30.3l-.2-.3 2 .7c4.6 1.6 9.2 2.8 14 3.7 18.7 4 38.3 1.7 55.6-6.6 17.5-9.7 28-16.9 36.6-14h.2c8.4 2.7 15-5.5 9-14-10.4-13.4-27.4-20-44.2-17-17.5 2.5-33.5 15-56.4 2.9-1.5-.8-2.9-1.6-4.3-2.5-1.6-.9 4.9 1.3 3.4.3-5-2.5-9.8-5.4-14.4-8.6-.3-.3 3.5 1.1 3.1.8-5.9-4-11-9.2-15-15.2-4.1-7.4-4.5-16.4-1-24.1 2.1-3.8 5.4-6.9 9.3-8.7 3 1.5 4.8 2.6 4.8 2.6s-1.3-2.5-2.1-3.8c.3-.1.5 0 .8-.2 2.6 1.1 8.3 4 11.4 5.8 2.1 1.1 3.8 2.7 5.2 4.7 0 0 1-.5.3-2.7-1.1-2.7-2.9-5-5.4-6.6h.2c2.3 1.2 4.5 2.6 6.6 4.1 1.9-4.4 2.8-9.2 2.6-14 .2-2.6-.2-5.3-1.1-7.8-.8-1.6.5-2.2 1.9-.5-.2-1.3-.7-2.5-1.2-3.7v-.1s.8-1.1 1.2-1.5c1-1 2.1-1.9 3.4-2.7 7.2-4.5 14.8-8.4 22.7-11.6 6.4-2.8 11.7-4.9 12.8-5.6 1.6-1 3.1-2.2 4.5-3.5 5.3-4.5 9-10.8 10.2-17.7.1-.9.2-1.8.3-2.8v-1.5c-.9-3.5-6.9-6.1-38.4-9.1-11.1-1.8-20-10.1-22.5-21.1v-.1c6-15.7 16.8-29.1 30.8-38.3.8-.7-3.2.2-2.4-.5 2.7-1.3 5.4-2.5 8.2-3.5 1.4-.6-6-3.4-12.6-2.7-4 .2-8 1.2-11.7 2.8 1.6-1.3 6.2-3.1 5.1-3.1-8.4 1.6-16.5 4.7-23.9 9 0-.8.1-1.5.5-2.2-5.9 2.5-11 6.5-15 11.5.1-.9.2-1.8.2-2.7-2.7 2-5.2 4.3-7.3 6.9l-.1.1c-17.4-6.7-36.3-8.3-54.6-4.7l-.2-.1h.2c-3.8-3.1-7.1-6.7-9.7-10.9l-.2.1-.4-.2c-1.2-1.8-2.4-3.8-3.7-6-.9-1.6-1.8-3.4-2.7-5.2 0-.1-.1-.2-.2-.2-.4 0-.6 1.7-.9 1.3v-.1c-3.2-8.3-4.7-17.2-4.4-26.2l-.2.1c-5.1 3.5-9 8.6-11.1 14.5-.9 2.1-1.6 3.3-2.2 4.5v-.5c.1-1.1.6-3.3.5-3.1s-.2.3-.3.4c-1.5 1.7-2.9 3.7-3.9 5.8-.9 1.9-1.7 3.9-2.3 5.9-.1.3 0-.3 0-1s.1-2 0-1.7l-.3.7c-6.7 14.9-10.9 30.8-12.4 47.1-.4 2.8-.6 5.6-.5 8.3v.2c-4.8 5.2-9 11-12.7 17.1-12.1 20.4-21.1 42.5-26.8 65.6 4-8.8 8.8-17.2 14.3-25.1C5.5 228.5 0 257.4 0 286.6c1.8-8.6 4.2-17 7-25.3-1.7 34.5 4.9 68.9 19.4 100.3 19.4 43.5 51.6 80 92.3 104.7 16.6 11.2 34.7 19.9 53.8 25.8 2.5.9 5.1 1.8 7.7 2.7-.8-.3-1.6-.7-2.4-1 22.6 6.8 46.2 10.3 69.8 10.3 83.7 0 111.3-31.9 113.8-35 4.1-3.7 7.5-8.2 9.9-13.3 1.6-.7 3.2-1.4 4.9-2.1l1-.5 1.9-.9c12.6-5.9 24.5-13.4 35.3-22.1 16.3-11.7 27.9-28.7 32.9-48.1 3-7.1 3.1-15 .4-22.2.9-1.4 1.7-2.8 2.7-4.3 18-28.9 28.2-61.9 29.6-95.9v-2.8c0-7.3-.6-14.5-1.9-21.6zm-299-97.6c-.4 1.1-.9 2.3-1.3 3.5.4-1.2.8-2.3 1.3-3.5z']};
|
||||
export const faFlag = {'prefix':'fas','iconName':'flag','icon':[512,512,[],'f024','M349.565 98.783C295.978 98.783 251.721 64 184.348 64c-24.955 0-47.309 4.384-68.045 12.013a55.947 55.947 0 0 0 3.586-23.562C118.117 24.015 94.806 1.206 66.338.048 34.345-1.254 8 24.296 8 56c0 19.026 9.497 35.825 24 45.945V488c0 13.255 10.745 24 24 24h16c13.255 0 24-10.745 24-24v-94.4c28.311-12.064 63.582-22.122 114.435-22.122 53.588 0 97.844 34.783 165.217 34.783 48.169 0 86.667-16.294 122.505-40.858C506.84 359.452 512 349.571 512 339.045v-243.1c0-23.393-24.269-38.87-45.485-29.016-34.338 15.948-76.454 31.854-116.95 31.854z']};
|
||||
export const faFolderOpen = {'prefix':'fas','iconName':'folder-open','icon':[576,512,[],'f07c','M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z']};
|
||||
export const faFont = {'prefix':'fas','iconName':'font','icon':[448,512,[],'f031','M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z']};
|
||||
export const faGamepad = {'prefix':'fas','iconName':'gamepad','icon':[640,512,[],'f11b','M480 96H160C71.6 96 0 167.6 0 256s71.6 160 160 160c44.8 0 85.2-18.4 114.2-48h91.5c29 29.6 69.5 48 114.2 48 88.4 0 160-71.6 160-160S568.4 96 480 96zM256 276c0 6.6-5.4 12-12 12h-52v52c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-52H76c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h52v-52c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h52c6.6 0 12 5.4 12 12v40zm184 68c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm80-80c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z']};
|
||||
export const faGithub = {'prefix':'fab','iconName':'github','icon':[496,512,[],'f09b','M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z']};
|
||||
@@ -116,6 +118,7 @@ export const faTrash = {'prefix':'fas','iconName':'trash','icon':[448,512,[],'f1
|
||||
export const faTumblr = {'prefix':'fab','iconName':'tumblr','icon':[320,512,[],'f173','M309.8 480.3c-13.6 14.5-50 31.7-97.4 31.7-120.8 0-147-88.8-147-140.6v-144H17.9c-5.5 0-10-4.5-10-10v-68c0-7.2 4.5-13.6 11.3-16 62-21.8 81.5-76 84.3-117.1.8-11 6.5-16.3 16.1-16.3h70.9c5.5 0 10 4.5 10 10v115.2h83c5.5 0 10 4.4 10 9.9v81.7c0 5.5-4.5 10-10 10h-83.4V360c0 34.2 23.7 53.6 68 35.8 4.8-1.9 9-3.2 12.7-2.2 3.5.9 5.8 3.4 7.4 7.9l22 64.3c1.8 5 3.3 10.6-.4 14.5z']};
|
||||
export const faTv = {'prefix':'fas','iconName':'tv','icon':[640,512,[],'f26c','M592 0H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h245.1v32h-160c-17.7 0-32 14.3-32 32s14.3 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-160v-32H592c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-16 352H64V64h512v288z']};
|
||||
export const faTwitter = {'prefix':'fab','iconName':'twitter','icon':[512,512,[],'f099','M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z']};
|
||||
export const faUpload = {'prefix':'fas','iconName':'upload','icon':[512,512,[],'f093','M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z']};
|
||||
export const faUser = {'prefix':'fas','iconName':'user','icon':[448,512,[],'f007','M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z']};
|
||||
export const faUserCog = {'prefix':'fas','iconName':'user-cog','icon':[640,512,[],'f4fe','M610.5 373.3c2.6-14.1 2.6-28.5 0-42.6l25.8-14.9c3-1.7 4.3-5.2 3.3-8.5-6.7-21.6-18.2-41.2-33.2-57.4-2.3-2.5-6-3.1-9-1.4l-25.8 14.9c-10.9-9.3-23.4-16.5-36.9-21.3v-29.8c0-3.4-2.4-6.4-5.7-7.1-22.3-5-45-4.8-66.2 0-3.3.7-5.7 3.7-5.7 7.1v29.8c-13.5 4.8-26 12-36.9 21.3l-25.8-14.9c-2.9-1.7-6.7-1.1-9 1.4-15 16.2-26.5 35.8-33.2 57.4-1 3.3.4 6.8 3.3 8.5l25.8 14.9c-2.6 14.1-2.6 28.5 0 42.6l-25.8 14.9c-3 1.7-4.3 5.2-3.3 8.5 6.7 21.6 18.2 41.1 33.2 57.4 2.3 2.5 6 3.1 9 1.4l25.8-14.9c10.9 9.3 23.4 16.5 36.9 21.3v29.8c0 3.4 2.4 6.4 5.7 7.1 22.3 5 45 4.8 66.2 0 3.3-.7 5.7-3.7 5.7-7.1v-29.8c13.5-4.8 26-12 36.9-21.3l25.8 14.9c2.9 1.7 6.7 1.1 9-1.4 15-16.2 26.5-35.8 33.2-57.4 1-3.3-.4-6.8-3.3-8.5l-25.8-14.9zM496 400.5c-26.8 0-48.5-21.8-48.5-48.5s21.8-48.5 48.5-48.5 48.5 21.8 48.5 48.5-21.7 48.5-48.5 48.5zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm201.2 226.5c-2.3-1.2-4.6-2.6-6.8-3.9l-7.9 4.6c-6 3.4-12.8 5.3-19.6 5.3-10.9 0-21.4-4.6-28.9-12.6-18.3-19.8-32.3-43.9-40.2-69.6-5.5-17.7 1.9-36.4 17.9-45.7l7.9-4.6c-.1-2.6-.1-5.2 0-7.8l-7.9-4.6c-16-9.2-23.4-28-17.9-45.7.9-2.9 2.2-5.8 3.2-8.7-3.8-.3-7.5-1.2-11.4-1.2h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c10.1 0 19.5-3.2 27.2-8.5-1.2-3.8-2-7.7-2-11.8v-9.2z']};
|
||||
export const faUserFriends = {'prefix':'fas','iconName':'user-friends','icon':[640,512,[],'f500','M192 256c61.9 0 112-50.1 112-112S253.9 32 192 32 80 82.1 80 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C51.6 288 0 339.6 0 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zM480 256c53 0 96-43 96-96s-43-96-96-96-96 43-96 96 43 96 96 96zm48 32h-3.8c-13.9 4.8-28.6 8-44.2 8s-30.3-3.2-44.2-8H432c-20.4 0-39.2 5.9-55.7 15.4 24.4 26.3 39.7 61.2 39.7 99.8v38.4c0 2.2-.5 4.3-.6 6.4H592c26.5 0 48-21.5 48-48 0-61.9-50.1-112-112-112z']};
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"hash":"lMWcnf9yNB","stamp":2143289268}
|
||||
{"hash":"Ry9ADLb3uy","stamp":164133449}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const HASH = 'lMWcnf9yNB';
|
||||
export const STAMP = 2143289268;
|
||||
export const HASH = 'Ry9ADLb3uy';
|
||||
export const STAMP = 164133449;
|
||||
|
||||
@@ -631,7 +631,7 @@ export class ServerActions implements IServerActions, SocketServer {
|
||||
}
|
||||
@Method({ binary: [Bin.Obj] })
|
||||
editorAction(action: EditorAction) {
|
||||
if (this.server.flags.objects && this.client.isMod) {
|
||||
if (this.server.flags.editor && this.client.isMod) {
|
||||
const added = editorAdded.get(this.client.accountId) || [];
|
||||
editorAdded.set(this.client.accountId, added);
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ interface ReservedID {
|
||||
time: number;
|
||||
}
|
||||
|
||||
const MAP_SOFT_LIMIT = 10000;
|
||||
|
||||
export class World {
|
||||
season = Season.Summer;
|
||||
holiday = Holiday.None;
|
||||
@@ -488,7 +490,8 @@ export class World {
|
||||
timingEnd();
|
||||
|
||||
timingStart('cleanup unused maps');
|
||||
const mapDiscardThreshold = now - MAP_DISCARD_TIMEOUT;
|
||||
const discardTimeout = this.maps.length > MAP_SOFT_LIMIT ? 5 * MINUTE : MAP_DISCARD_TIMEOUT;
|
||||
const mapDiscardThreshold = now - discardTimeout;
|
||||
|
||||
for (const map of this.maps) {
|
||||
if (map.instance && (hasAnyClients(map) || this.mapSwitchQueue.some(q => q.map === map))) {
|
||||
|
||||
@@ -1012,28 +1012,28 @@ describe('ServerActions', () => {
|
||||
describe('editorAction()', () => {
|
||||
it('places', () => {
|
||||
client.isMod = true;
|
||||
server.flags.objects = true;
|
||||
server.flags.editor = true;
|
||||
|
||||
serverActions.editorAction({ type: 'place', x: 0, y: 0, entity: 'foo' });
|
||||
});
|
||||
|
||||
it('undos', () => {
|
||||
client.isMod = true;
|
||||
server.flags.objects = true;
|
||||
server.flags.editor = true;
|
||||
|
||||
serverActions.editorAction({ type: 'undo' });
|
||||
});
|
||||
|
||||
it('clears', () => {
|
||||
client.isMod = true;
|
||||
server.flags.objects = true;
|
||||
server.flags.editor = true;
|
||||
|
||||
serverActions.editorAction({ type: 'clear' });
|
||||
});
|
||||
|
||||
it('does nothing for non-mod client', () => {
|
||||
client.isMod = false;
|
||||
server.flags.objects = true;
|
||||
server.flags.editor = true;
|
||||
|
||||
serverActions.editorAction({ type: 'undo' });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user