mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-12-03 05:10:04 +01:00
Load maps from JSON files with seasonal layers
This commit is contained in:
1 parent
e74cc2c3a5
commit
5271f6e541
32 files changed
+7912
-6339
No files matched your search
+1106
-4
File diff suppressed because it is too large.
Load diff
+10
-14
@@ -1,15 +1,11 @@
|
||||
{
|
||||
"width": 32,
|
||||
"height": 32,
|
||||
"tiles": "RAICARwCBQEbAgUBHAIEARECAgMJAgYBDgIFAwkCBAENAgYDDAICAQkCAwEGAwwCBAEFAgUBAQIEAw4CBQECAgMBBQIDAxACBwEaAgYBGgIGARoCCwEEBBICCgEEBBICBwEDAgQEEwIGAQMCBAQOAgcBAgICARICCgEDAgIBDgIDCwMBBQICAQMCBAEMAgQLBgIECgMCAwEEBQgCBAsGAgUKBQIFBQcCBQsFAgUKBAIGBQcCBQsFAgUKBAIFBRICBAoGAgQFxQI=",
|
||||
"defaultTile": 2,
|
||||
"spawnArea": {
|
||||
"x": 16,
|
||||
"y": 16,
|
||||
"w": 0,
|
||||
"h": 0
|
||||
},
|
||||
"spawns": {},
|
||||
"lockedTiles": [],
|
||||
"entities": []
|
||||
}
|
||||
"width": 32,
|
||||
"height": 32,
|
||||
"spawnArea": {"x":16,"y":16,"w":0,"h":0},
|
||||
"spawns": {},
|
||||
"tiles": "RAICARwCBQEbAgUBHAIEARECAgMJAgYBDgIFAwkCBAENAgYDDAICAQkCAwEGAwwCBAEFAgUBAQIEAw4CBQECAgMBBQIDAxACBwEaAgYBGgIGARoCCwEEBBICCgEEBBICBwEDAgQEEwIGAQMCBAQOAgcBAgICARICCgEDAgIBDgIDCwMBBQICAQMCBAEMAgQLBgIECgMCAwEEBQgCBAsGAgUKBQIFBQcCBQsFAgUKBAIGBQcCBQsFAgUKBAIFBRICBAoGAgQFxQI=",
|
||||
"entities": [
|
||||
{"type":"sign","x":16,"y":14,"name":"Go back","interact":{"action":"goToMap","args":{"map":"","spawn":"center"}}},
|
||||
{"type":"barrel","x":5,"y":5}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"width": 16,
|
||||
"height": 16,
|
||||
"spawnArea": {"x":4,"y":14,"w":2,"h":1},
|
||||
"spawns": {},
|
||||
"tiles": "MADEBAIKCgQ=",
|
||||
"walls": "AAAAAAAACEQYiDAQYSDCQIQJABMAJgAMAJgAMAFgAMAEgAAAAAAAAAAAAPj/BwAAAAAAAAAA3+4AAAAAAAAAAOAAAAAAAADP/wA=",
|
||||
"entities": [
|
||||
{"type":"trigger-door","x":5,"y":16,"trigger":{"action":"goToMap","args":{"map":"island","publicMap":"public-island","spawn":"house"}}},
|
||||
{"type":"window-1","x":2,"y":3.1666666666666665,"editable":true},
|
||||
{"type":"window-1","x":5,"y":3.1666666666666665,"editable":true},
|
||||
{"type":"window-1","x":8,"y":3.1666666666666665,"editable":true},
|
||||
{"type":"window-1","x":12,"y":3.1666666666666665,"editable":true},
|
||||
{"type":"window-1","x":14,"y":3.1666666666666665,"editable":true},
|
||||
{"type":"picture-1","x":3.5,"y":3.1666666666666665,"editable":true},
|
||||
{"type":"picture-2","x":10.0625,"y":3.1666666666666665,"editable":true},
|
||||
{"type":"table-1","x":13.5,"y":13.166666666666666,"editable":true},
|
||||
{"type":"table-1","x":2.6875,"y":5.625,"editable":true},
|
||||
{"type":"table-2","x":8.6875,"y":11.583333333333334,"editable":true},
|
||||
{"type":"lantern-on","x":3.5,"y":15.125,"editable":true},
|
||||
{"type":"lantern-on","x":6.53125,"y":15.125,"editable":true},
|
||||
{"type":"lantern-on","x":1.40625,"y":14,"editable":true},
|
||||
{"type":"lantern-on","x":9.96875,"y":6.666666666666667,"editable":true},
|
||||
{"type":"lantern-on","x":13.5,"y":6.5,"editable":true},
|
||||
{"type":"lantern-on","x":10.0625,"y":15.125,"editable":true},
|
||||
{"type":"lantern-on","x":14.0625,"y":15,"editable":true},
|
||||
{"type":"lantern-on","x":9.4375,"y":4.666666666666667,"editable":true},
|
||||
{"type":"lantern-on","x":14.40625,"y":8.5,"editable":true},
|
||||
{"type":"lantern-on-wall","x":8.375,"y":12.666666666666666,"editable":true},
|
||||
{"type":"lantern-on-wall","x":9.0625,"y":12.041666666666666,"editable":true},
|
||||
{"type":"lantern-on-wall","x":13.5,"y":13.291666666666666,"editable":true},
|
||||
{"type":"lantern-on-wall","x":2.6875,"y":5.708333333333333,"editable":true},
|
||||
{"type":"cushion-1","x":3.9375,"y":4.791666666666667,"editable":true},
|
||||
{"type":"cushion-1","x":1.53125,"y":4.625,"editable":true},
|
||||
{"type":"cushion-1","x":6.90625,"y":10.5,"editable":true},
|
||||
{"type":"cushion-1","x":10.375,"y":11.958333333333334,"editable":true},
|
||||
{"type":"cushion-1","x":10.53125,"y":10.5,"editable":true},
|
||||
{"type":"cushion-1","x":6.90625,"y":12.166666666666666,"editable":true},
|
||||
{"type":"cushion-1","x":8.875,"y":13.041666666666666,"editable":true},
|
||||
{"type":"cushion-1","x":8.8125,"y":9.666666666666666,"editable":true},
|
||||
{"type":"cushion-1","x":13.25,"y":4.75,"editable":true},
|
||||
{"type":"cushion-1","x":14.5,"y":3.6666666666666665,"editable":true},
|
||||
{"type":"cushion-1","x":15.375,"y":5,"editable":true},
|
||||
{"type":"cushion-1","x":14.125,"y":6.166666666666667,"editable":true},
|
||||
{"type":"cushion-1","x":14.6875,"y":12.25,"editable":true},
|
||||
{"type":"cushion-1","x":12.28125,"y":12.25,"editable":true},
|
||||
{"type":"cushion-1","x":9.9375,"y":5,"editable":true},
|
||||
{"type":"cushion-1","x":8,"y":5,"editable":true},
|
||||
{"type":"box-lanterns","x":0.71875,"y":15.541666666666666,"editable":true},
|
||||
{"type":"toolbox-full","x":2.125,"y":15.375,"editable":true}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"entities": [
|
||||
{"type":"leafpile-stick-2","x":31,"y":22.75},
|
||||
{"type":"leaves-5","x":18.40625,"y":21.458333333333332},
|
||||
{"type":"leaves-2","x":21.5625,"y":18.166666666666668},
|
||||
{"type":"leaves-2","x":23.53125,"y":18},
|
||||
{"type":"leaves-1","x":22,"y":17.208333333333332},
|
||||
{"type":"leaves-1","x":22.46875,"y":20},
|
||||
{"type":"leaves-2","x":33.6875,"y":25.416666666666668},
|
||||
{"type":"leaves-1","x":33.46875,"y":26.75},
|
||||
{"type":"leaves-1","x":35.65625,"y":27.041666666666668},
|
||||
{"type":"leaves-3","x":30.28125,"y":24},
|
||||
{"type":"leaves-1","x":31.53125,"y":23},
|
||||
{"type":"leaves-1","x":29.46875,"y":23.208333333333332},
|
||||
{"type":"leaves-3","x":8.8125,"y":17},
|
||||
{"type":"leaves-2","x":8.90625,"y":15.25},
|
||||
{"type":"leaves-1","x":10.4375,"y":16.458333333333332}
|
||||
]
|
||||
}
|
||||
+256
-21
@@ -1,22 +1,257 @@
|
||||
{
|
||||
"width": 56,
|
||||
"height": 56,
|
||||
"tiles": "/wP/A/8DGwMBAREDAgEjAwEBAgICAwEBDAMEAQUDAgIcAwUCAQEHAwICBAMCAgEBAgMEAgEBGwMFAgYDBQIDAwoCAQEbAwQCBQMHAgIDCwICAQgHDwMBAQYCBAMHAgEDCAIBAQMCAgEIBw8DBwIEAw8CBwEIBw4DBgIBAQQDBAICAQoCAwEDAgEBCAcOAwQCAgMBAQQDBAICAQkCAgEFAgMDBgcPAwMCAQEGAw8CAgEEAgQDBgcPAwICBwMBAQoCAgEDAgIBBQIFAwMIEQMBAQcDCwICAQICAgEHAh8DAQELAgYBBwIBAR4DCwIFAQkCAQEeAwsCBAEEAgIDBAIfAwEBCwIDAQMCAwMDAiEDDAICAQMCAwMDAiIDDAICAQICBAMDASEDAQELAgIBAwIFAwEBIQMBAQoCAgEIAiIDAQEGAgEBAwIDAQoCAQEfAwYCAQECAwICAgELAiADBwICAwMCAQELAiEDBwICAwICAQEBAgQDBgIhAwcCAQEBAwIBAgIEAwMCAQMBASQDBQICAwMBBgMBASsDAQEDAwEHNwMBBzYDAwj/A/8D9QM=",
|
||||
"defaultTile": 3,
|
||||
"spawnArea": {
|
||||
"x": 43.4,
|
||||
"y": 20,
|
||||
"w": 3.3,
|
||||
"h": 2.5
|
||||
},
|
||||
"spawns": {
|
||||
"house": {
|
||||
"x": 27,
|
||||
"y": 24,
|
||||
"w": 2,
|
||||
"h": 2
|
||||
}
|
||||
},
|
||||
"lockedTiles": [],
|
||||
"entities": []
|
||||
}
|
||||
"width": 56,
|
||||
"height": 56,
|
||||
"spawnArea": {"x":43.4,"y":20,"w":3.3,"h":2.5},
|
||||
"spawns": {"house":{"x":27,"y":24,"w":2,"h":2}},
|
||||
"tiles": "/wP/A/8DGwMBAREDAgEjAwEBAgICAwEBDAMEAQUDAgIcAwUCAQEHAwICBAMCAgEBAgMEAgEBGwMFAgYDBQIDAwoCAQEbAwQCBQMHAgIDCwICAQgHDwMBAQYCBAMHAgEDCAIBAQMCAgEIBw8DBwIEAw8CBwEIBw4DBgIBAQQDBAICAQoCAwEDAgEBCAcOAwQCAgMBAQQDBAICAQkCAgEFAgMDBgcPAwMCAQEGAw8CAgEEAgQDBgcPAwICBwMBAQoCAgEDAgIBBQIFAwMIEQMBAQcDCwICAQICAgEHAh8DAQELAgYBBwIBAR4DCwIFAQkCAQEeAwsCBAEEAgIDBAIfAwEBCwIDAQMCAwMDAiEDDAICAQMCAwMDAiIDDAICAQICBAMDASEDAQELAgIBAwIFAwEBIQMBAQoCAgEIAiIDAQEGAgEBAwIDAQoCAQEfAwYCAQECAwICAgELAiADBwICAwMCAQELAiEDBwICAwICAQEBAgQDBgIhAwcCAQEBAwIBAgIEAwMCAQMBASQDBQICAwMBBgMBASsDAQEDAwEHNwMBBzYDAwj/A/8D9QM=",
|
||||
"entities": [
|
||||
{"type":"house","x":28,"y":23,"interact":{"action":"goToMap","args":{"map":"house","publicMap":"public-house"}}},
|
||||
{"type":"trigger-house-door","x":27.375,"y":22.833333333333332,"trigger":{"action":"goToMap","args":{"map":"house","publicMap":"public-house"}}},
|
||||
{"type":"box-lanterns","x":25.5,"y":25.5,"name":"Box of lanterns","interact":{"action":"give","args":{"item":"lantern-on"}}},
|
||||
{"type":"box-fruits","x":20.71875,"y":20.875,"name":"Box of fruits"},
|
||||
{"type":"giftpile-5-interactive","x":37.65625,"y":18.208333333333332,"name":"Toy stash","interact":{"action":"toyStash"}},
|
||||
{"type":"sign-quest","x":24.40625,"y":25,"name":"Item stash","interact":{"action":"itemStash"}},
|
||||
{"type":"torch","x":25,"y":24,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":39.6875,"y":18.375,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":39.65625,"y":21.666666666666668,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":23.3125,"y":38.458333333333336,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":28.15625,"y":31.75,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":29.125,"y":38.166666666666664,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":30.8125,"y":29.416666666666668,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":29.6875,"y":25,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":20,"y":27.875,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":22.625,"y":30.5,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":19.21875,"y":32.041666666666664,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":25.5,"y":26.75,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":15.9375,"y":26.416666666666668,"boop":{"action":"light"}},
|
||||
{"type":"torch","x":15.875,"y":29.75,"boop":{"action":"light"}},
|
||||
{"type":"boat-bob","x":45.03125,"y":24},
|
||||
{"type":"boat-front-bob","x":45.03125,"y":25.208333333333332},
|
||||
{"type":"boat-sail","x":44.65625,"y":24.666666666666668},
|
||||
{"type":"boat-rope-bob","x":42.1875,"y":24.333333333333332},
|
||||
{"type":"boat-wake","x":45.03125,"y":24.208333333333332},
|
||||
{"type":"pier-leg","x":41.28125,"y":20.5},
|
||||
{"type":"pier-leg","x":43,"y":22.541666666666668},
|
||||
{"type":"pier-leg","x":44.8125,"y":22.541666666666668},
|
||||
{"type":"pier-leg","x":46.625,"y":22.541666666666668},
|
||||
{"type":"barrel","x":46.8125,"y":23.333333333333332},
|
||||
{"type":"lantern-on","x":46.1875,"y":23.375},
|
||||
{"type":"lantern-on","x":42.625,"y":21.416666666666668},
|
||||
{"type":"lantern-on","x":47,"y":18.958333333333332},
|
||||
{"type":"trigger-boat","x":45.5,"y":24.791666666666668,"interact":{"action":"goToMap","args":{"map":"","spawn":"harbor"}}},
|
||||
{"type":"sign","x":43,"y":23.5,"name":"Return to land","interact":{"action":"say","args":{"text":"Hop on the boat to return to the mainland"}}},
|
||||
{"type":"plank-1","x":41.21875,"y":18.625},
|
||||
{"type":"plank-4","x":43.65625,"y":18.625},
|
||||
{"type":"plank-1","x":46.09375,"y":18.625},
|
||||
{"type":"plank-short-2","x":40.53125,"y":19.125},
|
||||
{"type":"plank-2","x":42.40625,"y":19.125},
|
||||
{"type":"plank-1","x":44.84375,"y":19.125},
|
||||
{"type":"plank-short-2","x":46.71875,"y":19.125},
|
||||
{"type":"plank-1","x":41.21875,"y":19.625},
|
||||
{"type":"plank-1","x":43.65625,"y":19.625},
|
||||
{"type":"plank-2","x":46.09375,"y":19.625},
|
||||
{"type":"plank-short-2","x":40.5,"y":20.125},
|
||||
{"type":"plank-1","x":42.375,"y":20.125},
|
||||
{"type":"plank-4","x":44.8125,"y":20.125},
|
||||
{"type":"plank-short-3","x":46.6875,"y":20.125},
|
||||
{"type":"plank-1","x":41.1875,"y":20.625},
|
||||
{"type":"plank-4","x":43.625,"y":20.625},
|
||||
{"type":"plank-4","x":46.0625,"y":20.625},
|
||||
{"type":"plank-short-1","x":42.96875,"y":21.125},
|
||||
{"type":"plank-4","x":44.84375,"y":21.125},
|
||||
{"type":"plank-short-2","x":46.71875,"y":21.125},
|
||||
{"type":"plank-1","x":43.65625,"y":21.625},
|
||||
{"type":"plank-1","x":46.09375,"y":21.625},
|
||||
{"type":"plank-short-3","x":42.9375,"y":22.125},
|
||||
{"type":"plank-3","x":44.8125,"y":22.125},
|
||||
{"type":"plank-short-3","x":46.6875,"y":22.125},
|
||||
{"type":"plank-3","x":43.625,"y":22.625},
|
||||
{"type":"plank-2","x":46.0625,"y":22.625},
|
||||
{"type":"plank-short-3","x":43,"y":23.125},
|
||||
{"type":"plank-3","x":44.875,"y":23.125},
|
||||
{"type":"plank-short-1","x":46.75,"y":23.125},
|
||||
{"type":"plank-shadow","x":41.28125,"y":20.541666666666668},
|
||||
{"type":"plank-shadow-short","x":43,"y":21.041666666666668},
|
||||
{"type":"plank-shadow-short","x":43,"y":22.041666666666668},
|
||||
{"type":"plank-shadow-short","x":46.6875,"y":18.541666666666668},
|
||||
{"type":"plank-shadow-short","x":46.75,"y":19.041666666666668},
|
||||
{"type":"plank-shadow-short","x":46.6875,"y":19.541666666666668},
|
||||
{"type":"plank-shadow-short","x":46.71875,"y":20.041666666666668},
|
||||
{"type":"plank-shadow-short","x":46.65625,"y":20.541666666666668},
|
||||
{"type":"plank-shadow-short","x":46.75,"y":21.041666666666668},
|
||||
{"type":"plank-shadow-short","x":46.6875,"y":21.541666666666668},
|
||||
{"type":"plank-shadow-short","x":46.71875,"y":22.041666666666668},
|
||||
{"type":"plank-shadow-short","x":46.65625,"y":22.541666666666668},
|
||||
{"type":"plank-shadow-short","x":46.78125,"y":23.041666666666668},
|
||||
{"type":"collider-3x1","x":40,"y":18},
|
||||
{"type":"collider-3x1","x":43,"y":18},
|
||||
{"type":"collider-2x1","x":46,"y":18},
|
||||
{"type":"collider-1x3","x":47,"y":19},
|
||||
{"type":"collider-1x3","x":47,"y":22},
|
||||
{"type":"collider-3x1","x":40,"y":21},
|
||||
{"type":"collider-1x3","x":42,"y":22},
|
||||
{"type":"collider-1x1","x":43,"y":24},
|
||||
{"type":"collider-3x1","x":42,"y":25},
|
||||
{"type":"collider-3x1","x":45,"y":25},
|
||||
{"type":"collider-1x3","x":47.59375,"y":23},
|
||||
{"type":"collider-1x3","x":41.5,"y":22},
|
||||
{"type":"boat-bob","x":27.09375,"y":42},
|
||||
{"type":"boat-front-bob","x":27.09375,"y":43.208333333333336},
|
||||
{"type":"boat-wake","x":27.09375,"y":42.208333333333336},
|
||||
{"type":"plank-short-3","x":27.40625,"y":39.666666666666664},
|
||||
{"type":"plank-short-3","x":27.4375,"y":40.208333333333336},
|
||||
{"type":"plank-short-3","x":27.40625,"y":40.75},
|
||||
{"type":"plank-short-3","x":27.4375,"y":41.208333333333336},
|
||||
{"type":"pier-leg","x":27.9375,"y":40.875},
|
||||
{"type":"pier-leg","x":27,"y":40.75},
|
||||
{"type":"plank-shadow-short","x":27.5,"y":39.666666666666664},
|
||||
{"type":"plank-shadow-short","x":27.53125,"y":40.166666666666664},
|
||||
{"type":"plank-shadow-short","x":27.5,"y":40.666666666666664},
|
||||
{"type":"plank-shadow-short","x":27.53125,"y":41.166666666666664},
|
||||
{"type":"lantern-on","x":28.75,"y":42.25},
|
||||
{"type":"collider-3x1","x":24,"y":41},
|
||||
{"type":"collider-2x1","x":24,"y":42},
|
||||
{"type":"collider-1x2","x":26,"y":40},
|
||||
{"type":"collider-1x2","x":28,"y":40},
|
||||
{"type":"collider-2x1","x":28,"y":41},
|
||||
{"type":"collider-3x1","x":24,"y":43},
|
||||
{"type":"collider-3x1","x":27,"y":43},
|
||||
{"type":"collider-1x1","x":29,"y":42},
|
||||
{"type":"collider-1x3","x":29.6875,"y":41},
|
||||
{"type":"collider-1x3","x":23.5,"y":41},
|
||||
{"type":"wooden-fence-pole-5","x":20,"y":20},
|
||||
{"type":"wooden-fence-beam-h-3","x":20.5,"y":20},
|
||||
{"type":"wooden-fence-pole-1","x":21,"y":20},
|
||||
{"type":"wooden-fence-beam-h-2","x":21.5,"y":20},
|
||||
{"type":"wooden-fence-pole-4","x":22,"y":20},
|
||||
{"type":"wooden-fence-beam-h-2","x":22.5,"y":20},
|
||||
{"type":"wooden-fence-pole-4","x":23,"y":20},
|
||||
{"type":"wooden-fence-beam-h-3","x":23.5,"y":20},
|
||||
{"type":"wooden-fence-pole-1","x":24,"y":20},
|
||||
{"type":"wooden-fence-beam-v-1","x":20,"y":20},
|
||||
{"type":"wooden-fence-pole-5","x":20,"y":21},
|
||||
{"type":"wooden-fence-beam-v-1","x":20,"y":21},
|
||||
{"type":"wooden-fence-pole-1","x":20,"y":22},
|
||||
{"type":"wooden-fence-beam-v-3","x":20,"y":22},
|
||||
{"type":"wooden-fence-pole-3","x":20,"y":23},
|
||||
{"type":"wooden-fence-beam-v-2","x":20,"y":23},
|
||||
{"type":"wooden-fence-pole-4","x":20,"y":24},
|
||||
{"type":"wooden-fence-beam-v-2","x":24,"y":20},
|
||||
{"type":"wooden-fence-pole-3","x":24,"y":21},
|
||||
{"type":"wooden-fence-beam-v-1","x":24,"y":21},
|
||||
{"type":"wooden-fence-pole-4","x":24,"y":22},
|
||||
{"type":"wooden-fence-beam-v-3","x":24,"y":22},
|
||||
{"type":"wooden-fence-pole-1","x":24,"y":23},
|
||||
{"type":"wooden-fence-beam-v-1","x":24,"y":23},
|
||||
{"type":"wooden-fence-pole-5","x":24,"y":24},
|
||||
{"type":"wooden-fence-beam-h-1","x":20.5,"y":24},
|
||||
{"type":"wooden-fence-pole-1","x":21,"y":24},
|
||||
{"type":"wooden-fence-pole-3","x":23,"y":24},
|
||||
{"type":"wooden-fence-beam-h-1","x":23.5,"y":24},
|
||||
{"type":"tree-stump-tall-0","x":22.40625,"y":18.208333333333332},
|
||||
{"type":"tree-trunk-0","x":22.40625,"y":18.208333333333332},
|
||||
{"type":"tree-crown-0","x":22.40625,"y":19.458333333333332},
|
||||
{"type":"tree-stump-tall-5","x":30.4375,"y":23.458333333333332},
|
||||
{"type":"tree-trunk-5","x":30.4375,"y":23.458333333333332},
|
||||
{"type":"tree-crown-5","x":30.4375,"y":24.708333333333332},
|
||||
{"type":"tree5-stump-tall-0","x":34.5,"y":27},
|
||||
{"type":"tree5-trunk-0","x":34.5,"y":27},
|
||||
{"type":"tree5-crown-0","x":34.5,"y":28},
|
||||
{"type":"tree5-stump-tall-1","x":19.25,"y":21.75},
|
||||
{"type":"tree5-trunk-1","x":19.25,"y":21.75},
|
||||
{"type":"tree5-crown-1","x":19.25,"y":22.75},
|
||||
{"type":"pumpkin","x":23.21875,"y":20.541666666666668},
|
||||
{"type":"pumpkin","x":20.5,"y":22.25},
|
||||
{"type":"pumpkin","x":20.90625,"y":23.041666666666668},
|
||||
{"type":"large-leafed-bush-2","x":35,"y":26.708333333333332},
|
||||
{"type":"large-leafed-bush-4","x":34.125,"y":27.5},
|
||||
{"type":"large-leafed-bush-2","x":20.3125,"y":24.416666666666668},
|
||||
{"type":"large-leafed-bush-3","x":19.71875,"y":24},
|
||||
{"type":"large-leafed-bush-3","x":23,"y":38.666666666666664},
|
||||
{"type":"large-leafed-bush-4","x":23.71875,"y":38},
|
||||
{"type":"barrel","x":39.5,"y":18.958333333333332},
|
||||
{"type":"barrel","x":38.75,"y":18.375},
|
||||
{"type":"barrel","x":38.46875,"y":19.208333333333332},
|
||||
{"type":"barrel","x":24.625,"y":23.5},
|
||||
{"type":"tree-stump-0","x":20.25,"y":36.458333333333336},
|
||||
{"type":"lantern-on","x":20.75,"y":37},
|
||||
{"type":"lantern-on","x":36.03125,"y":34.25},
|
||||
{"type":"lantern-on","x":37.625,"y":36.791666666666664},
|
||||
{"type":"lantern-on","x":37.8125,"y":26.916666666666668},
|
||||
{"type":"water-rock-1","x":22.625,"y":41.791666666666664},
|
||||
{"type":"water-rock-1","x":28.53125,"y":13.75},
|
||||
{"type":"water-rock-1","x":16.25,"y":20.875},
|
||||
{"type":"water-rock-1","x":40.59375,"y":29.583333333333332},
|
||||
{"type":"water-rock-1","x":40.625,"y":17.958333333333332},
|
||||
{"type":"water-rock-2","x":40.21875,"y":17.5},
|
||||
{"type":"water-rock-2","x":20.3125,"y":15.75},
|
||||
{"type":"water-rock-2","x":15.40625,"y":34.125},
|
||||
{"type":"water-rock-2","x":36.5,"y":40.625},
|
||||
{"type":"water-rock-3","x":36.125,"y":40.958333333333336},
|
||||
{"type":"water-rock-3","x":41.625,"y":34.375},
|
||||
{"type":"water-rock-3","x":15.15625,"y":34.666666666666664},
|
||||
{"type":"water-rock-3","x":20.875,"y":15.5},
|
||||
{"type":"water-rock-4","x":36.53125,"y":41.125},
|
||||
{"type":"water-rock-4","x":40.71875,"y":17.25},
|
||||
{"type":"water-rock-4","x":28.21875,"y":13.25},
|
||||
{"type":"water-rock-5","x":28.65625,"y":13.166666666666666},
|
||||
{"type":"water-rock-5","x":16.8125,"y":20.416666666666668},
|
||||
{"type":"water-rock-5","x":14.4375,"y":30.5},
|
||||
{"type":"water-rock-5","x":23.125,"y":41.875},
|
||||
{"type":"water-rock-5","x":30.4375,"y":39.708333333333336},
|
||||
{"type":"water-rock-5","x":41.8125,"y":34.791666666666664},
|
||||
{"type":"water-rock-5","x":36.625,"y":14.75},
|
||||
{"type":"water-rock-6","x":36.25,"y":14.5},
|
||||
{"type":"water-rock-6","x":14.8125,"y":34.25},
|
||||
{"type":"water-rock-6","x":40.4375,"y":38.708333333333336},
|
||||
{"type":"water-rock-7","x":42.125,"y":34.416666666666664},
|
||||
{"type":"water-rock-7","x":20.3125,"y":15.25},
|
||||
{"type":"water-rock-7","x":28.75,"y":40.75},
|
||||
{"type":"water-rock-7","x":22.65625,"y":42.041666666666664},
|
||||
{"type":"water-rock-8","x":22.25,"y":41.916666666666664},
|
||||
{"type":"water-rock-8","x":14.125,"y":30.75},
|
||||
{"type":"water-rock-8","x":16.25,"y":20.208333333333332},
|
||||
{"type":"water-rock-8","x":42.1875,"y":34.75},
|
||||
{"type":"water-rock-9","x":36.75,"y":14.25},
|
||||
{"type":"water-rock-9","x":13.96875,"y":30.291666666666668},
|
||||
{"type":"water-rock-10","x":14.5,"y":25.791666666666668},
|
||||
{"type":"water-rock-10","x":18.875,"y":40.75},
|
||||
{"type":"water-rock-11","x":25.34375,"y":13.75},
|
||||
{"type":"water-rock-11","x":18.4375,"y":40.541666666666664},
|
||||
{"type":"water-rock-11","x":15.40625,"y":24.291666666666668},
|
||||
{"type":"water-rock-4","x":15.125,"y":23.958333333333332},
|
||||
{"type":"water-rock-11","x":35.375,"y":31.041666666666668},
|
||||
{"type":"water-rock-8","x":35.0625,"y":30.708333333333332},
|
||||
{"type":"water-rock-3","x":34,"y":29.75},
|
||||
{"type":"water-rock-4","x":34.28125,"y":29.666666666666668},
|
||||
{"type":"water-rock-4","x":24.5,"y":35.916666666666664},
|
||||
{"type":"water-rock-3","x":33.4375,"y":38.208333333333336},
|
||||
{"type":"water-rock-4","x":33.15625,"y":37.916666666666664},
|
||||
{"type":"water-rock-1","x":25.5,"y":17.75},
|
||||
{"type":"water-rock-9","x":25.65625,"y":18.125},
|
||||
{"type":"water-rock-4","x":25.96875,"y":17.75},
|
||||
{"type":"flower-3-pickable","x":30.25,"y":24.916666666666668,"interact":{"action":"hold","args":{"item":"flower-pick"}}},
|
||||
{"type":"bench-1","x":37.75,"y":24.958333333333332},
|
||||
{"type":"bench-seat","x":37.75,"y":28.25},
|
||||
{"type":"bench-back","x":37.75,"y":29.166666666666668},
|
||||
{"type":"tree-stump-tall-10","x":9.15625,"y":16.5},
|
||||
{"type":"tree-trunk-10","x":9.15625,"y":16.5},
|
||||
{"type":"tree-crown-10","x":9.15625,"y":17.75},
|
||||
{"type":"water-rock-1","x":5.3125,"y":23.708333333333332},
|
||||
{"type":"water-rock-1","x":13.25,"y":14.291666666666666},
|
||||
{"type":"water-rock-1","x":11.1875,"y":24.791666666666668},
|
||||
{"type":"water-rock-3","x":10.9375,"y":25.208333333333332},
|
||||
{"type":"water-rock-3","x":6.28125,"y":18.916666666666668},
|
||||
{"type":"water-rock-3","x":13.5625,"y":14.708333333333334},
|
||||
{"type":"water-rock-5","x":13.8125,"y":14.166666666666666},
|
||||
{"type":"water-rock-4","x":11.375,"y":25.125},
|
||||
{"type":"water-rock-6","x":6.40625,"y":15.916666666666666},
|
||||
{"type":"water-rock-8","x":5.15625,"y":23.125},
|
||||
{"type":"water-rock-10","x":6.03125,"y":16.291666666666668},
|
||||
{"type":"water-rock-11","x":14.65625,"y":20.75},
|
||||
{"type":"torch","x":9.28125,"y":17.791666666666668},
|
||||
{"type":"torch","x":9.4375,"y":21.666666666666668},
|
||||
{"type":"torch","x":12.75,"y":18.25},
|
||||
{"type":"bunny","x":22.1875,"y":27.25,"update":{"action":"bunny","args":{"waypoints":[[22.19,27.25],[19.75,26.13],[18.44,29.04],[20.41,31.42],[19.94,33.04],[22.88,33.67],[24.91,31.25],[26.09,32.5],[26.34,34.83],[32.5,35.46],[34.03,34.67],[36.06,36.5],[36.47,35.33],[36.22,34.63],[33.63,34.83],[31.88,33.25],[32,28.46],[33.22,25.75],[35.09,24.75],[36.13,25.67],[36.72,27.38],[38.31,27.42],[38.63,26.54],[37.31,26.63],[36.06,26.42],[35.34,24.29],[33.13,25.83],[30.06,25.13],[26.5,26.38],[24.66,28.25],[22.25,28.5],[20.97,27],[19.13,27.13],[20.69,29.25],[22.34,29.42],[21.53,31.46],[23.5,31.54],[23.81,29.71]]}}}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"entities": [
|
||||
{"type":"flowers-1","x":21.15625,"y":26},
|
||||
{"type":"flowers-3","x":35.78125,"y":34.75},
|
||||
{"type":"flowers-3","x":23.0625,"y":32.25},
|
||||
{"type":"flowers-5","x":19.625,"y":33},
|
||||
{"type":"flowers-5","x":37.375,"y":26.416666666666668},
|
||||
{"type":"flowers-5","x":18.75,"y":26.375},
|
||||
{"type":"flowers-5","x":35.375,"y":33.875},
|
||||
{"type":"flowers-6","x":25.75,"y":31},
|
||||
{"type":"flowers-6","x":33,"y":33.75},
|
||||
{"type":"flowers-6","x":38.71875,"y":26},
|
||||
{"type":"flowers-3","x":11.3125,"y":19.291666666666668},
|
||||
{"type":"flowers-6","x":11.0625,"y":17.75},
|
||||
{"type":"flowers-7","x":8.625,"y":21.666666666666668}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"entities": [
|
||||
{"type":"flowers-1","x":21.15625,"y":26},
|
||||
{"type":"flowers-3","x":35.78125,"y":34.75},
|
||||
{"type":"flowers-3","x":23.0625,"y":32.25},
|
||||
{"type":"flowers-5","x":19.625,"y":33},
|
||||
{"type":"flowers-5","x":37.375,"y":26.416666666666668},
|
||||
{"type":"flowers-5","x":18.75,"y":26.375},
|
||||
{"type":"flowers-5","x":35.375,"y":33.875},
|
||||
{"type":"flowers-6","x":25.75,"y":31},
|
||||
{"type":"flowers-6","x":33,"y":33.75},
|
||||
{"type":"flowers-6","x":38.71875,"y":26},
|
||||
{"type":"flowers-3","x":11.3125,"y":19.291666666666668},
|
||||
{"type":"flowers-6","x":11.0625,"y":17.75},
|
||||
{"type":"flowers-7","x":8.625,"y":21.666666666666668}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,391 @@
|
||||
{
|
||||
"entities": [
|
||||
{"type":"spider","x":47,"y":50.291666666666664,"options":{"height":19,"time":11.844934290274978}},
|
||||
{"type":"spider","x":91,"y":85.29166666666667,"options":{"height":27,"time":15.035809273831546}},
|
||||
{"type":"leafpile-stick-2","x":151.1875,"y":98.58333333333333},
|
||||
{"type":"leaves-5","x":150.09375,"y":99.125},
|
||||
{"type":"leaves-5","x":143.65625,"y":105.875},
|
||||
{"type":"leaves-4","x":149.90625,"y":106},
|
||||
{"type":"leaves-2","x":143.125,"y":100.5},
|
||||
{"type":"leaves-1","x":67,"y":48},
|
||||
{"type":"leaves-2","x":68,"y":45},
|
||||
{"type":"leaves-3","x":61.1875,"y":71.5},
|
||||
{"type":"leaves-3","x":46,"y":46},
|
||||
{"type":"leaves-3","x":86,"y":47},
|
||||
{"type":"leaves-4","x":83.5,"y":64},
|
||||
{"type":"leaves-4","x":88.5,"y":58},
|
||||
{"type":"leaves-4","x":71.5,"y":47},
|
||||
{"type":"leaves-4","x":45,"y":76.16666666666667},
|
||||
{"type":"leaves-4","x":84,"y":55.5},
|
||||
{"type":"leaves-5","x":82,"y":54},
|
||||
{"type":"leaves-5","x":69,"y":53},
|
||||
{"type":"leaves-5","x":42.5,"y":48.666666666666664},
|
||||
{"type":"leaves-3","x":70.5,"y":70.5},
|
||||
{"type":"leaves-5","x":53,"y":87},
|
||||
{"type":"leaves-4","x":57,"y":89},
|
||||
{"type":"leaves-4","x":117.25,"y":46},
|
||||
{"type":"leaves-2","x":61,"y":86},
|
||||
{"type":"leaves-3","x":66,"y":87},
|
||||
{"type":"leaves-1","x":69,"y":87.5},
|
||||
{"type":"leaves-2","x":72,"y":85.5},
|
||||
{"type":"leafpile-stick-1","x":71,"y":69.5},
|
||||
{"type":"leafpile-small-0","x":44,"y":45.5},
|
||||
{"type":"leafpile-small-1","x":64,"y":72},
|
||||
{"type":"leafpile-stick-1","x":67.5,"y":47.291666666666664},
|
||||
{"type":"leafpile-stick-0","x":84.5,"y":46.291666666666664},
|
||||
{"type":"leafpile-medium-0","x":47.28125,"y":75.5},
|
||||
{"type":"leafpile-medium-2","x":51,"y":89},
|
||||
{"type":"leafpile-big-0","x":79,"y":54.5},
|
||||
{"type":"leafpile-bigstick-2","x":45,"y":52.166666666666664},
|
||||
{"type":"leafpile-bigstick-2","x":50.5,"y":88},
|
||||
{"type":"leafpile-small-1","x":66.375,"y":58},
|
||||
{"type":"leafpile-bigstick-1","x":66.5,"y":69.79166666666667},
|
||||
{"type":"leafpile-stick-1","x":67.5,"y":71.58333333333333},
|
||||
{"type":"leafpile-small-1","x":67,"y":70.5},
|
||||
{"type":"leafpile-small-0","x":91,"y":95.66666666666667},
|
||||
{"type":"leafpile-big-0","x":84,"y":86.29166666666667},
|
||||
{"type":"leafpile-big-2","x":94,"y":91.375},
|
||||
{"type":"leafpile-big-0","x":76,"y":96},
|
||||
{"type":"leafpile-medium-0","x":77.5,"y":97.5},
|
||||
{"type":"leafpile-bigstick-2","x":85.78125,"y":74},
|
||||
{"type":"leafpile-medium-1","x":87,"y":75.5},
|
||||
{"type":"leafpile-mediumalt-1","x":89,"y":83.5},
|
||||
{"type":"leafpile-medium-2","x":80,"y":92.5},
|
||||
{"type":"leafpile-small-1","x":80,"y":84.79166666666667},
|
||||
{"type":"leaves-1","x":85,"y":90},
|
||||
{"type":"leaves-2","x":89,"y":95},
|
||||
{"type":"leaves-3","x":92,"y":93},
|
||||
{"type":"leaves-4","x":95,"y":88},
|
||||
{"type":"leaves-5","x":90,"y":85},
|
||||
{"type":"leaves-1","x":93,"y":77},
|
||||
{"type":"leaves-2","x":86,"y":83},
|
||||
{"type":"leaves-3","x":77,"y":82},
|
||||
{"type":"leaves-4","x":75,"y":84},
|
||||
{"type":"leaves-5","x":77,"y":91},
|
||||
{"type":"leaves-1","x":84,"y":92},
|
||||
{"type":"leaves-2","x":83,"y":97},
|
||||
{"type":"leaves-3","x":89,"y":95},
|
||||
{"type":"leaves-4","x":95,"y":94},
|
||||
{"type":"leaves-5","x":97,"y":88},
|
||||
{"type":"leaves-1","x":75,"y":81},
|
||||
{"type":"leaves-2","x":79,"y":95},
|
||||
{"type":"leaves-1","x":79,"y":77},
|
||||
{"type":"leaves-2","x":83,"y":73},
|
||||
{"type":"leaves-3","x":87,"y":71},
|
||||
{"type":"leaves-4","x":98,"y":73},
|
||||
{"type":"leafpile-big-0","x":96.25,"y":103.25},
|
||||
{"type":"leafpile-bigstick-0","x":127.6875,"y":95.45833333333333},
|
||||
{"type":"leafpile-big-1","x":118.625,"y":116},
|
||||
{"type":"leafpile-big-0","x":133.5,"y":135.375},
|
||||
{"type":"leafpile-big-2","x":118.03125,"y":136.375},
|
||||
{"type":"leafpile-big-1","x":143.25,"y":84.20833333333333},
|
||||
{"type":"leafpile-bigstick-2","x":89.6875,"y":114.70833333333333},
|
||||
{"type":"leafpile-medium-2","x":83.1875,"y":112.875},
|
||||
{"type":"leafpile-medium-1","x":110.78125,"y":126.125},
|
||||
{"type":"leafpile-medium-0","x":121.78125,"y":137.20833333333334},
|
||||
{"type":"leafpile-medium-2","x":137.5,"y":131.70833333333334},
|
||||
{"type":"leafpile-medium-1","x":123.6875,"y":97.95833333333333},
|
||||
{"type":"leafpile-medium-0","x":109.75,"y":81.25},
|
||||
{"type":"leaves-5","x":101.15625,"y":112.70833333333333},
|
||||
{"type":"leaves-5","x":152.1875,"y":91.20833333333333},
|
||||
{"type":"leaves-5","x":100.03125,"y":83.75},
|
||||
{"type":"leaves-5","x":151.28125,"y":125.45833333333333},
|
||||
{"type":"leaves-5","x":147.1875,"y":116.125},
|
||||
{"type":"leaves-5","x":141.625,"y":135},
|
||||
{"type":"leaves-4","x":115.375,"y":127.25},
|
||||
{"type":"leaves-4","x":143.6875,"y":133.375},
|
||||
{"type":"leaves-4","x":148.53125,"y":118.875},
|
||||
{"type":"leaves-4","x":150.4375,"y":93.875},
|
||||
{"type":"leaves-4","x":107.25,"y":86},
|
||||
{"type":"leaves-4","x":122.875,"y":108.375},
|
||||
{"type":"leaves-3","x":153.25,"y":94.95833333333333},
|
||||
{"type":"leaves-3","x":156.4375,"y":108.95833333333333},
|
||||
{"type":"leaves-3","x":142.625,"y":134.70833333333334},
|
||||
{"type":"leaves-3","x":151.4375,"y":131.45833333333334},
|
||||
{"type":"leaves-3","x":101.5,"y":114.70833333333333},
|
||||
{"type":"leaves-3","x":102.5,"y":111.45833333333333},
|
||||
{"type":"leaves-3","x":116.5,"y":128.75},
|
||||
{"type":"leaves-3","x":107.03125,"y":84.95833333333333},
|
||||
{"type":"leaves-3","x":122.625,"y":110.45833333333333},
|
||||
{"type":"leaves-3","x":132.9375,"y":105.25},
|
||||
{"type":"leaves-2","x":148.875,"y":82.125},
|
||||
{"type":"leaves-2","x":109.375,"y":85},
|
||||
{"type":"leaves-2","x":103.78125,"y":113.25},
|
||||
{"type":"leaves-2","x":130.03125,"y":94.625},
|
||||
{"type":"leaves-2","x":120.53125,"y":106.75},
|
||||
{"type":"leaves-2","x":148.1875,"y":120.5},
|
||||
{"type":"leaves-2","x":142,"y":137.125},
|
||||
{"type":"leaves-2","x":152.78125,"y":132.375},
|
||||
{"type":"leaves-1","x":157.6875,"y":88.70833333333333},
|
||||
{"type":"leaves-1","x":149.6875,"y":80.125},
|
||||
{"type":"leaves-1","x":105.5,"y":84.20833333333333},
|
||||
{"type":"leaves-1","x":108.625,"y":113.375},
|
||||
{"type":"leaves-1","x":116.78125,"y":116.75},
|
||||
{"type":"leaves-1","x":117.5,"y":128.45833333333334},
|
||||
{"type":"leaves-5","x":65.0625,"y":24.916666666666668},
|
||||
{"type":"leaves-5","x":42.53125,"y":22},
|
||||
{"type":"leaves-5","x":45.125,"y":28.958333333333332},
|
||||
{"type":"leaves-5","x":71.125,"y":32.708333333333336},
|
||||
{"type":"leaves-4","x":62.28125,"y":32.5},
|
||||
{"type":"leaves-3","x":41.75,"y":28.5},
|
||||
{"type":"leaves-3","x":63.96875,"y":24.166666666666668},
|
||||
{"type":"leaves-2","x":66.75,"y":29.208333333333332},
|
||||
{"type":"leaves-2","x":68.90625,"y":31.416666666666668},
|
||||
{"type":"leaves-2","x":59.71875,"y":43.708333333333336},
|
||||
{"type":"leaves-1","x":61,"y":42.75},
|
||||
{"type":"leaves-1","x":47.5,"y":28.916666666666668},
|
||||
{"type":"leaves-1","x":41,"y":25},
|
||||
{"type":"leaves-3","x":66.0625,"y":22},
|
||||
{"type":"leaves-3","x":72.25,"y":21},
|
||||
{"type":"leaves-4","x":69.90625,"y":20.5},
|
||||
{"type":"leaves-2","x":46.0625,"y":43.875},
|
||||
{"type":"leafpile-medium-2","x":43.28125,"y":29.25},
|
||||
{"type":"leafpile-stick-0","x":66.625,"y":27.75},
|
||||
{"type":"leafpile-medium-0","x":62.4375,"y":16.5},
|
||||
{"type":"leaves-3","x":56.78125,"y":17.166666666666668},
|
||||
{"type":"leaves-1","x":50.15625,"y":31},
|
||||
{"type":"leafpile-big-0","x":32.6875,"y":69.20833333333333},
|
||||
{"type":"leafpile-mediumalt-0","x":12.28125,"y":63.625},
|
||||
{"type":"leafpile-small-1","x":24.15625,"y":78.66666666666667},
|
||||
{"type":"leafpile-stick-0","x":11.875,"y":64.29166666666667},
|
||||
{"type":"leaves-5","x":30.5625,"y":66.5},
|
||||
{"type":"leaves-5","x":32.40625,"y":54},
|
||||
{"type":"leaves-5","x":12.3125,"y":61.666666666666664},
|
||||
{"type":"leaves-4","x":25.90625,"y":77.16666666666667},
|
||||
{"type":"leaves-4","x":22.78125,"y":66.75},
|
||||
{"type":"leaves-4","x":9.9375,"y":57.75},
|
||||
{"type":"leaves-3","x":29.6875,"y":54.5},
|
||||
{"type":"leaves-3","x":28.96875,"y":64.91666666666667},
|
||||
{"type":"leaves-3","x":24.40625,"y":79.5},
|
||||
{"type":"leaves-3","x":10.96875,"y":61},
|
||||
{"type":"leaves-2","x":24.9375,"y":67.25},
|
||||
{"type":"leaves-2","x":34.78125,"y":68.45833333333333},
|
||||
{"type":"leaves-2","x":32.125,"y":56.041666666666664},
|
||||
{"type":"leaves-2","x":10.96875,"y":63.791666666666664},
|
||||
{"type":"leaves-2","x":29,"y":77.375},
|
||||
{"type":"leaves-2","x":16.0625,"y":48.458333333333336},
|
||||
{"type":"leaves-4","x":10.75,"y":46.75},
|
||||
{"type":"leaves-1","x":8.5,"y":59.75},
|
||||
{"type":"leaves-1","x":28.75,"y":66.66666666666667},
|
||||
{"type":"leaves-1","x":29.96875,"y":51.75},
|
||||
{"type":"leaves-1","x":14.46875,"y":65.54166666666667},
|
||||
{"type":"leaves-1","x":31.375,"y":78.625},
|
||||
{"type":"leafpile-big-1","x":23.4375,"y":36.875},
|
||||
{"type":"leafpile-mediumalt-2","x":13.0625,"y":45.208333333333336},
|
||||
{"type":"leafpile-medium-0","x":31.21875,"y":25.708333333333332},
|
||||
{"type":"leafpile-stick-0","x":26,"y":26.125},
|
||||
{"type":"leafpile-small-1","x":20.75,"y":19.541666666666668},
|
||||
{"type":"leaves-5","x":24,"y":38.375},
|
||||
{"type":"leaves-5","x":29.875,"y":38.875},
|
||||
{"type":"leaves-5","x":28.15625,"y":22.5},
|
||||
{"type":"leaves-5","x":24.9375,"y":16.75},
|
||||
{"type":"leaves-4","x":12.75,"y":42.708333333333336},
|
||||
{"type":"leaves-4","x":26.5,"y":36.625},
|
||||
{"type":"leaves-4","x":21.3125,"y":20.208333333333332},
|
||||
{"type":"leaves-4","x":26.8125,"y":26.791666666666668},
|
||||
{"type":"leaves-3","x":28.1875,"y":43.666666666666664},
|
||||
{"type":"leaves-3","x":28.9375,"y":42},
|
||||
{"type":"leaves-3","x":8.78125,"y":47.416666666666664},
|
||||
{"type":"leaves-3","x":24.5,"y":20},
|
||||
{"type":"leaves-2","x":32.1875,"y":35},
|
||||
{"type":"leaves-2","x":30.78125,"y":23.5},
|
||||
{"type":"leaves-2","x":24.625,"y":20.625},
|
||||
{"type":"leaves-2","x":39.1875,"y":15.416666666666666},
|
||||
{"type":"leaves-2","x":15.46875,"y":46.875},
|
||||
{"type":"leafpile-small-0","x":30.1875,"y":40.875},
|
||||
{"type":"leafpile-big-2","x":11.21875,"y":9.625},
|
||||
{"type":"leafpile-mediumalt-0","x":38.21875,"y":7.708333333333333},
|
||||
{"type":"leafpile-stick-2","x":44.4375,"y":6.25},
|
||||
{"type":"leafpile-small-1","x":25.28125,"y":8.458333333333334},
|
||||
{"type":"leaves-5","x":20.8125,"y":6.166666666666667},
|
||||
{"type":"leaves-5","x":43.75,"y":6},
|
||||
{"type":"leaves-4","x":9.03125,"y":7.875},
|
||||
{"type":"leaves-4","x":38.9375,"y":5.75},
|
||||
{"type":"leaves-4","x":40.3125,"y":13.958333333333334},
|
||||
{"type":"leaves-3","x":42.75,"y":15},
|
||||
{"type":"leaves-3","x":22.78125,"y":8.5},
|
||||
{"type":"leaves-3","x":13.03125,"y":9.708333333333334},
|
||||
{"type":"leaves-2","x":25.25,"y":6.791666666666667},
|
||||
{"type":"leaves-2","x":8.4375,"y":5.5},
|
||||
{"type":"leaves-1","x":9.15625,"y":5.166666666666667},
|
||||
{"type":"leaves-1","x":20.4375,"y":5.208333333333333},
|
||||
{"type":"leaves-1","x":33.75,"y":22.916666666666668},
|
||||
{"type":"leaves-1","x":29.0625,"y":21.208333333333332},
|
||||
{"type":"leaves-1","x":42,"y":5.166666666666667},
|
||||
{"type":"leafpile-mediumalt-1","x":59.40625,"y":5.791666666666667},
|
||||
{"type":"leafpile-mediumalt-0","x":90.5625,"y":3.2916666666666665},
|
||||
{"type":"leafpile-stick-2","x":75.6875,"y":5.666666666666667},
|
||||
{"type":"leafpile-small-1","x":70.5,"y":23},
|
||||
{"type":"leaves-5","x":84.1875,"y":21.666666666666668},
|
||||
{"type":"leaves-5","x":77.75,"y":5.25},
|
||||
{"type":"leaves-4","x":75.15625,"y":3.9166666666666665},
|
||||
{"type":"leaves-4","x":76.28125,"y":15.375},
|
||||
{"type":"leaves-3","x":87,"y":20.75},
|
||||
{"type":"leaves-3","x":76.90625,"y":14.291666666666666},
|
||||
{"type":"leaves-3","x":89.40625,"y":4.625},
|
||||
{"type":"leaves-3","x":71.375,"y":6.041666666666667},
|
||||
{"type":"leaves-2","x":71.5,"y":7.041666666666667},
|
||||
{"type":"leaves-2","x":83.15625,"y":23.708333333333332},
|
||||
{"type":"leaves-2","x":88.8125,"y":2.7083333333333335},
|
||||
{"type":"leaves-1","x":84,"y":23.875},
|
||||
{"type":"leaves-1","x":75,"y":16.541666666666668},
|
||||
{"type":"leaves-1","x":87.78125,"y":4.708333333333333},
|
||||
{"type":"leaves-1","x":91.875,"y":2.25},
|
||||
{"type":"leaves-1","x":73.125,"y":8.041666666666666},
|
||||
{"type":"leaves-1","x":72,"y":23},
|
||||
{"type":"leafpile-stick-2","x":84,"y":36.208333333333336},
|
||||
{"type":"leafpile-small-0","x":82.75,"y":30.208333333333332},
|
||||
{"type":"leaves-5","x":81,"y":32.666666666666664},
|
||||
{"type":"leaves-5","x":87.5,"y":34.875},
|
||||
{"type":"leaves-4","x":87.75,"y":37},
|
||||
{"type":"leaves-4","x":79.46875,"y":35.25},
|
||||
{"type":"leaves-4","x":87.6875,"y":29.791666666666668},
|
||||
{"type":"leaves-3","x":78.3125,"y":36.75},
|
||||
{"type":"leaves-3","x":73.15625,"y":35.208333333333336},
|
||||
{"type":"leaves-3","x":85.65625,"y":33.125},
|
||||
{"type":"leaves-2","x":82.78125,"y":36.125},
|
||||
{"type":"leaves-2","x":83.9375,"y":28.75},
|
||||
{"type":"leaves-2","x":81.9375,"y":29.708333333333332},
|
||||
{"type":"leaves-2","x":87,"y":29.5},
|
||||
{"type":"leaves-1","x":83.78125,"y":30.375},
|
||||
{"type":"leaves-1","x":85.375,"y":37.5},
|
||||
{"type":"leaves-1","x":84.4375,"y":37},
|
||||
{"type":"leaves-1","x":82.3125,"y":20.666666666666668},
|
||||
{"type":"leaves-5","x":62.46875,"y":5.166666666666667},
|
||||
{"type":"leaves-4","x":58.71875,"y":6.75},
|
||||
{"type":"leaves-2","x":61.3125,"y":3.25},
|
||||
{"type":"leaves-1","x":63.25,"y":5.166666666666667},
|
||||
{"type":"leaves-2","x":64,"y":2.75},
|
||||
{"type":"leafpile-medium-0","x":107.53125,"y":35},
|
||||
{"type":"leafpile-stick-0","x":115.25,"y":22.208333333333332},
|
||||
{"type":"leafpile-big-0","x":119.625,"y":6.541666666666667},
|
||||
{"type":"leafpile-small-0","x":105.15625,"y":6.208333333333333},
|
||||
{"type":"leafpile-stick-0","x":118.3125,"y":33.791666666666664},
|
||||
{"type":"leaves-5","x":108.15625,"y":32.166666666666664},
|
||||
{"type":"leaves-5","x":106.625,"y":21.5},
|
||||
{"type":"leaves-5","x":123.5,"y":9.666666666666666},
|
||||
{"type":"leaves-5","x":127.21875,"y":34.791666666666664},
|
||||
{"type":"leaves-4","x":119.25,"y":7.666666666666667},
|
||||
{"type":"leaves-4","x":117.25,"y":8.5},
|
||||
{"type":"leaves-4","x":99.03125,"y":37.75},
|
||||
{"type":"leaves-4","x":103.125,"y":19.5},
|
||||
{"type":"leaves-4","x":102.75,"y":4.25},
|
||||
{"type":"leaves-3","x":109,"y":24.75},
|
||||
{"type":"leaves-3","x":100.375,"y":21},
|
||||
{"type":"leaves-3","x":97.15625,"y":36.75},
|
||||
{"type":"leaves-3","x":107.96875,"y":9.541666666666666},
|
||||
{"type":"leaves-3","x":103.75,"y":7.208333333333333},
|
||||
{"type":"leaves-3","x":125.9375,"y":12.375},
|
||||
{"type":"leaves-3","x":123.0625,"y":12.041666666666666},
|
||||
{"type":"leaves-3","x":117.40625,"y":34.416666666666664},
|
||||
{"type":"leaves-3","x":127.5,"y":38.166666666666664},
|
||||
{"type":"leaves-2","x":115.53125,"y":34.75},
|
||||
{"type":"leaves-2","x":109.875,"y":33.416666666666664},
|
||||
{"type":"leaves-2","x":108.40625,"y":25.5},
|
||||
{"type":"leaves-2","x":113.6875,"y":21.25},
|
||||
{"type":"leaves-2","x":116.3125,"y":7.25},
|
||||
{"type":"leaves-2","x":109.375,"y":7.75},
|
||||
{"type":"leaves-2","x":99.6875,"y":5.666666666666667},
|
||||
{"type":"leaves-2","x":100.875,"y":19.25},
|
||||
{"type":"leaves-2","x":103.625,"y":35.416666666666664},
|
||||
{"type":"leaves-2","x":123.15625,"y":36.708333333333336},
|
||||
{"type":"leaves-1","x":115.15625,"y":20},
|
||||
{"type":"leaves-1","x":114.6875,"y":22.75},
|
||||
{"type":"leaves-1","x":106.6875,"y":24.666666666666668},
|
||||
{"type":"leaves-1","x":107.90625,"y":8.166666666666666},
|
||||
{"type":"leaves-1","x":98.53125,"y":5.666666666666667},
|
||||
{"type":"leaves-1","x":121.90625,"y":6.416666666666667},
|
||||
{"type":"leaves-1","x":121.8125,"y":9},
|
||||
{"type":"leaves-1","x":124.25,"y":13.375},
|
||||
{"type":"leaves-1","x":129.125,"y":37.208333333333336},
|
||||
{"type":"leaves-1","x":100.28125,"y":36.666666666666664},
|
||||
{"type":"leaves-1","x":103.75,"y":23.75},
|
||||
{"type":"leaves-3","x":104.1875,"y":15.666666666666666},
|
||||
{"type":"leaves-2","x":104,"y":17.625},
|
||||
{"type":"leafpile-big-1","x":137,"y":24.25},
|
||||
{"type":"leafpile-mediumalt-0","x":150.90625,"y":9.958333333333334},
|
||||
{"type":"leafpile-stick-0","x":138.78125,"y":9.75},
|
||||
{"type":"leaves-5","x":153.5,"y":23.208333333333332},
|
||||
{"type":"leaves-5","x":151.9375,"y":5.5},
|
||||
{"type":"leaves-5","x":136.25,"y":3.75},
|
||||
{"type":"leaves-4","x":136.75,"y":8.5},
|
||||
{"type":"leaves-4","x":150.3125,"y":12.25},
|
||||
{"type":"leaves-3","x":141.625,"y":8.666666666666666},
|
||||
{"type":"leaves-3","x":139.15625,"y":23.916666666666668},
|
||||
{"type":"leaves-2","x":141,"y":22.708333333333332},
|
||||
{"type":"leaves-2","x":137.40625,"y":25.916666666666668},
|
||||
{"type":"leaves-2","x":155,"y":26.125},
|
||||
{"type":"leaves-2","x":148.28125,"y":11},
|
||||
{"type":"leaves-3","x":139.625,"y":2.5},
|
||||
{"type":"leaves-1","x":137.125,"y":26.916666666666668},
|
||||
{"type":"leaves-1","x":156.40625,"y":26.666666666666668},
|
||||
{"type":"leaves-1","x":148.875,"y":12.291666666666666},
|
||||
{"type":"leaves-1","x":152.65625,"y":7.125},
|
||||
{"type":"leaves-4","x":155.4375,"y":6.25},
|
||||
{"type":"leaves-4","x":138.9375,"y":5},
|
||||
{"type":"leaves-3","x":139.1875,"y":10.5},
|
||||
{"type":"leaves-3","x":141.03125,"y":25.458333333333332},
|
||||
{"type":"leaves-1","x":140.125,"y":27.125},
|
||||
{"type":"leaves-1","x":153.8125,"y":22.625},
|
||||
{"type":"leafpile-stick-2","x":141.96875,"y":24.541666666666668},
|
||||
{"type":"leaves-1","x":115.75,"y":44},
|
||||
{"type":"leaves-2","x":117.46875,"y":43.375},
|
||||
{"type":"leaves-3","x":103.4375,"y":44.875},
|
||||
{"type":"leaves-2","x":102.96875,"y":46.208333333333336},
|
||||
{"type":"leaves-1","x":104,"y":46.5},
|
||||
{"type":"leaves-4","x":97.4375,"y":64},
|
||||
{"type":"leaves-2","x":96.53125,"y":62.666666666666664},
|
||||
{"type":"leaves-3","x":118.53125,"y":69},
|
||||
{"type":"leaves-2","x":116.53125,"y":69.125},
|
||||
{"type":"leaves-1","x":117.5625,"y":68.45833333333333},
|
||||
{"type":"leaves-1","x":119.3125,"y":70.95833333333333},
|
||||
{"type":"leaves-2","x":87.125,"y":44.958333333333336},
|
||||
{"type":"leaves-2","x":83.28125,"y":53},
|
||||
{"type":"leaves-5","x":155.8125,"y":73.5},
|
||||
{"type":"leaves-4","x":156.65625,"y":75.66666666666667},
|
||||
{"type":"leaves-1","x":154.53125,"y":75.875},
|
||||
{"type":"leaves-4","x":148.125,"y":80.625},
|
||||
{"type":"leaves-2","x":147.15625,"y":79.125},
|
||||
{"type":"leaves-2","x":139.78125,"y":83.625},
|
||||
{"type":"leaves-3","x":141.75,"y":85.66666666666667},
|
||||
{"type":"leaves-1","x":141.1875,"y":84.75},
|
||||
{"type":"leaves-1","x":133.75,"y":67.54166666666667},
|
||||
{"type":"leaves-2","x":134.65625,"y":67.66666666666667},
|
||||
{"type":"leaves-3","x":136.21875,"y":66.25},
|
||||
{"type":"leaves-1","x":135.78125,"y":67.79166666666667},
|
||||
{"type":"leaves-1","x":142.65625,"y":86.5},
|
||||
{"type":"leaves-1","x":157.53125,"y":77.25},
|
||||
{"type":"leaves-4","x":151.125,"y":87.5},
|
||||
{"type":"leaves-2","x":150.65625,"y":86.20833333333333},
|
||||
{"type":"leaves-2","x":158,"y":85.5},
|
||||
{"type":"leaves-4","x":144.4375,"y":94.20833333333333},
|
||||
{"type":"leaves-4","x":127.3125,"y":92.5},
|
||||
{"type":"leaves-2","x":126.96875,"y":91.75},
|
||||
{"type":"leaves-2","x":131.21875,"y":95.75},
|
||||
{"type":"leaves-1","x":125.71875,"y":99.45833333333333},
|
||||
{"type":"leaves-1","x":125.125,"y":108},
|
||||
{"type":"leaves-1","x":155.21875,"y":106.41666666666667},
|
||||
{"type":"leaves-2","x":152.71875,"y":99.20833333333333},
|
||||
{"type":"leaves-2","x":147.90625,"y":95.66666666666667},
|
||||
{"type":"leaves-2","x":132.9375,"y":107.5},
|
||||
{"type":"leaves-3","x":131.40625,"y":149.20833333333334},
|
||||
{"type":"leaves-2","x":131.0625,"y":148.125},
|
||||
{"type":"leaves-1","x":131.71875,"y":147.5},
|
||||
{"type":"leaves-4","x":134.90625,"y":148.79166666666666},
|
||||
{"type":"leaves-4","x":137.21875,"y":137.625},
|
||||
{"type":"leaves-4","x":110.40625,"y":130.29166666666666},
|
||||
{"type":"leaves-4","x":118.75,"y":138.5},
|
||||
{"type":"leaves-2","x":116.8125,"y":137.75},
|
||||
{"type":"leaves-2","x":112.125,"y":130.16666666666666},
|
||||
{"type":"leaves-3","x":25.4375,"y":84.75},
|
||||
{"type":"leaves-1","x":26.375,"y":83.75},
|
||||
{"type":"leaves-4","x":86.25,"y":114.54166666666667},
|
||||
{"type":"leaves-5","x":89.625,"y":117.625},
|
||||
{"type":"leaves-2","x":86.25,"y":117},
|
||||
{"type":"leaves-1","x":84.25,"y":117.20833333333333},
|
||||
{"type":"leaves-5","x":41.75,"y":82.54166666666667},
|
||||
{"type":"leaves-2","x":38.90625,"y":80.95833333333333},
|
||||
{"type":"leaves-1","x":40.75,"y":84.25},
|
||||
{"type":"leaves-3","x":40.75,"y":81.375}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
{
|
||||
"entities": [
|
||||
{"type":"holly","x":62.1875,"y":71.04166666666667},
|
||||
{"type":"holly","x":66,"y":71.04166666666667},
|
||||
{"type":"holly","x":61.1875,"y":76.04166666666667},
|
||||
{"type":"holly","x":63,"y":76.04166666666667},
|
||||
{"type":"holly","x":65,"y":76.04166666666667},
|
||||
{"type":"holly","x":66.78125,"y":76.04166666666667},
|
||||
{"type":"holly","x":52.1875,"y":76.54166666666667},
|
||||
{"type":"holly","x":56,"y":76.54166666666667},
|
||||
{"type":"holly","x":57.78125,"y":76.54166666666667},
|
||||
{"type":"giftpile-sign","x":103.84375,"y":86},
|
||||
{"type":"sign","x":103.84375,"y":86.08333333333333,"name":"Toy Stash","interact":{"action":"toyStash"}},
|
||||
{"type":"sign-donate","x":64,"y":79,"name":"Donate gifts","interact":{"action":"donateGift"}},
|
||||
{"type":"box-gifts","x":64.09375,"y":80.16666666666667,"interact":{"action":"donateGift"}},
|
||||
{"type":"pine-stump-tall-1","x":73.25,"y":73.5},
|
||||
{"type":"pine-crown-1","x":73.25,"y":74.20833333333333},
|
||||
{"type":"xmas-lights","x":73.25,"y":73.5},
|
||||
{"type":"xmas-light","x":73.46875,"y":74.375},
|
||||
{"type":"xmas-light","x":73.8125,"y":73.5},
|
||||
{"type":"xmas-light","x":72.5,"y":73.54166666666667},
|
||||
{"type":"xmas-light","x":72.0625,"y":73.91666666666667},
|
||||
{"type":"xmas-light","x":71.21875,"y":73.5},
|
||||
{"type":"xmas-light","x":72.53125,"y":72.125},
|
||||
{"type":"xmas-light","x":71.875,"y":71.25},
|
||||
{"type":"xmas-light","x":73,"y":70.41666666666667},
|
||||
{"type":"xmas-light","x":72.4375,"y":69},
|
||||
{"type":"xmas-light","x":73,"y":67.66666666666667},
|
||||
{"type":"xmas-light","x":73.625,"y":67.91666666666667},
|
||||
{"type":"xmas-light","x":73.625,"y":69.25},
|
||||
{"type":"xmas-light","x":74.1875,"y":69.91666666666667},
|
||||
{"type":"xmas-light","x":73.875,"y":71.79166666666667},
|
||||
{"type":"xmas-light","x":74.25,"y":71.95833333333333},
|
||||
{"type":"xmas-light","x":74.625,"y":71.29166666666667},
|
||||
{"type":"xmas-light","x":75.25,"y":73.125},
|
||||
{"type":"xmas-light","x":74.78125,"y":73.66666666666667},
|
||||
{"type":"giftpile-pine","x":73.25,"y":74},
|
||||
{"type":"giftpile-6","x":71.375,"y":74.625},
|
||||
{"type":"giftpile-1","x":75,"y":75.20833333333333},
|
||||
{"type":"cookie-table","x":72.9375,"y":76.5},
|
||||
{"type":"mistletoe","x":86.375,"y":83},
|
||||
{"type":"mistletoe","x":92,"y":93},
|
||||
{"type":"giftpile-4","x":43.5,"y":53.5},
|
||||
{"type":"giftpile-tree","x":81.09375,"y":92.5},
|
||||
{"type":"giftpile-1","x":76,"y":90},
|
||||
{"type":"giftpile-3","x":79,"y":53},
|
||||
{"type":"giftpile-6","x":85,"y":54.5},
|
||||
{"type":"giftpile-tree","x":97.25,"y":64.375},
|
||||
{"type":"giftpile-pine","x":63,"y":98.375},
|
||||
{"type":"giftpile-5","x":65.25,"y":98.79166666666667},
|
||||
{"type":"giftpile-6","x":61,"y":99.25},
|
||||
{"type":"giftpile-1","x":65.0625,"y":112.95833333333333},
|
||||
{"type":"giftpile-3","x":63.03125,"y":113.66666666666667},
|
||||
{"type":"giftpile-4","x":64.5625,"y":114.70833333333333},
|
||||
{"type":"giftpile-2","x":57.5,"y":146},
|
||||
{"type":"giftpile-6","x":58.25,"y":147.66666666666666},
|
||||
{"type":"giftpile-tree","x":132.375,"y":149.04166666666666},
|
||||
{"type":"giftpile-5","x":134,"y":149.29166666666666},
|
||||
{"type":"giftpile-2","x":147.46875,"y":126.54166666666667},
|
||||
{"type":"giftpile-tree","x":137.8125,"y":115.20833333333333},
|
||||
{"type":"giftpile-5","x":134.03125,"y":121.75},
|
||||
{"type":"giftpile-pine","x":147.5625,"y":101.83333333333333},
|
||||
{"type":"giftpile-1","x":143.15625,"y":98.95833333333333},
|
||||
{"type":"giftpile-4","x":134.40625,"y":67.54166666666667},
|
||||
{"type":"giftpile-pine","x":154.78125,"y":55.625},
|
||||
{"type":"giftpile-1","x":144.125,"y":45.5},
|
||||
{"type":"giftpile-3","x":132.65625,"y":47.25},
|
||||
{"type":"giftpile-tree","x":118.75,"y":48.25},
|
||||
{"type":"giftpile-1","x":51.28125,"y":31.291666666666668},
|
||||
{"type":"giftpile-2","x":58.65625,"y":31.75},
|
||||
{"type":"giftpile-4","x":72.25,"y":37.5},
|
||||
{"type":"giftpile-6","x":91.03125,"y":38.125},
|
||||
{"type":"giftpile-3","x":100,"y":38.166666666666664},
|
||||
{"type":"giftpile-tree","x":143.53125,"y":14.208333333333334},
|
||||
{"type":"giftpile-1","x":126,"y":12.041666666666666},
|
||||
{"type":"giftpile-5-interactive","x":148.90625,"y":34.5},
|
||||
{"type":"giftpile-6","x":96.96875,"y":11.75},
|
||||
{"type":"giftpile-2","x":77.21875,"y":6.458333333333333},
|
||||
{"type":"giftpile-tree","x":62.65625,"y":6.125},
|
||||
{"type":"giftpile-3","x":20.75,"y":6.708333333333333},
|
||||
{"type":"giftpile-1","x":8.40625,"y":15.75},
|
||||
{"type":"giftpile-6","x":15.125,"y":32.041666666666664},
|
||||
{"type":"giftpile-5-interactive","x":14.21875,"y":33},
|
||||
{"type":"giftpile-tree","x":25.65625,"y":59.25},
|
||||
{"type":"giftpile-6","x":16,"y":77.16666666666667},
|
||||
{"type":"giftpile-1","x":22.0625,"y":105.875},
|
||||
{"type":"giftpile-5-interactive","x":9.3125,"y":96.16666666666667},
|
||||
{"type":"giftpile-3","x":24.25,"y":144.25},
|
||||
{"type":"giftpile-6","x":14.875,"y":155.125},
|
||||
{"type":"giftpile-1","x":33.1875,"y":133.125},
|
||||
{"type":"giftpile-6","x":41.53125,"y":122.16666666666667},
|
||||
{"type":"holly","x":121,"y":145.16666666666666},
|
||||
{"type":"holly","x":122,"y":145.16666666666666},
|
||||
{"type":"holly","x":123,"y":145.125},
|
||||
{"type":"holly","x":125,"y":145.125},
|
||||
{"type":"holly","x":118,"y":140.16666666666666},
|
||||
{"type":"holly","x":121,"y":140.125},
|
||||
{"type":"holly","x":119,"y":140.20833333333334},
|
||||
{"type":"holly","x":135,"y":144.16666666666666},
|
||||
{"type":"holly","x":137,"y":144.16666666666666},
|
||||
{"type":"holly","x":138,"y":144.16666666666666},
|
||||
{"type":"holly","x":137,"y":140.125},
|
||||
{"type":"holly","x":139,"y":140.125},
|
||||
{"type":"holly","x":140,"y":140},
|
||||
{"type":"holly","x":142,"y":140.125},
|
||||
{"type":"holly","x":143,"y":144.54166666666666},
|
||||
{"type":"holly","x":144.96875,"y":144.625},
|
||||
{"type":"holly","x":121,"y":100.125},
|
||||
{"type":"holly","x":124,"y":100.125},
|
||||
{"type":"holly","x":119,"y":100.125},
|
||||
{"type":"holly","x":117.96875,"y":100.125},
|
||||
{"type":"holly","x":118,"y":105.20833333333333},
|
||||
{"type":"holly","x":120,"y":105.16666666666667},
|
||||
{"type":"holly","x":79,"y":147.20833333333334},
|
||||
{"type":"holly","x":82,"y":147.16666666666666},
|
||||
{"type":"holly","x":76.96875,"y":147.20833333333334},
|
||||
{"type":"holly","x":84,"y":147.16666666666666},
|
||||
{"type":"holly","x":85,"y":147.16666666666666},
|
||||
{"type":"holly","x":86,"y":147.04166666666666},
|
||||
{"type":"holly","x":77,"y":136.16666666666666},
|
||||
{"type":"holly","x":80,"y":136.125},
|
||||
{"type":"holly","x":81,"y":136.16666666666666},
|
||||
{"type":"holly","x":83,"y":137.16666666666666},
|
||||
{"type":"holly","x":86,"y":137.16666666666666},
|
||||
{"type":"holly","x":87,"y":137.04166666666666},
|
||||
{"type":"holly","x":88,"y":137.16666666666666},
|
||||
{"type":"holly","x":73,"y":100.875},
|
||||
{"type":"holly","x":76.78125,"y":100.875},
|
||||
{"type":"holly","x":81,"y":97},
|
||||
{"type":"holly","x":83.625,"y":100.66666666666667},
|
||||
{"type":"holly","x":87.4375,"y":100.70833333333333},
|
||||
{"type":"holly","x":92.21875,"y":96.04166666666667},
|
||||
{"type":"holly","x":96.71875,"y":100.54166666666667},
|
||||
{"type":"holly","x":45.5,"y":53.125},
|
||||
{"type":"holly","x":49.28125,"y":53.125},
|
||||
{"type":"giftpile-3","x":120.6875,"y":145.45833333333334},
|
||||
{"type":"mistletoe","x":130.78125,"y":149.45833333333334},
|
||||
{"type":"mistletoe","x":125.53125,"y":139.375},
|
||||
{"type":"mistletoe","x":140.0625,"y":131.5},
|
||||
{"type":"mistletoe","x":154.78125,"y":107.875},
|
||||
{"type":"mistletoe","x":132.03125,"y":123.25},
|
||||
{"type":"mistletoe","x":148.15625,"y":114.5},
|
||||
{"type":"giftpile-6","x":137.3125,"y":131.16666666666666},
|
||||
{"type":"giftpile-3","x":47.9375,"y":142.41666666666666},
|
||||
{"type":"giftpile-2","x":76,"y":147.75},
|
||||
{"type":"cookie-table","x":29.40625,"y":70.66666666666667},
|
||||
{"type":"cookie-table","x":104.75,"y":59.416666666666664},
|
||||
{"type":"cookie-table","x":79.28125,"y":7.166666666666667},
|
||||
{"type":"cookie-table","x":110.03125,"y":93.5},
|
||||
{"type":"cookie-table","x":146.46875,"y":145.70833333333334}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"entities": [
|
||||
{"type":"basket-bin","x":73,"y":74,"interact":{"action":"give","args":{"item":"egg-basket-1"}}},
|
||||
{"type":"egg-basket-2","x":73.5,"y":74.875},
|
||||
{"type":"egg-basket-3","x":74.40625,"y":73.91666666666667},
|
||||
{"type":"egg-basket-4","x":74.15625,"y":74.16666666666667},
|
||||
{"type":"sign-quest","x":74,"y":73.79166666666667,"name":"Egg baskets","interact":{"action":"give","args":{"item":"egg-basket-1"}}},
|
||||
{"type":"basket-bin","x":103,"y":87,"interact":{"action":"give","args":{"item":"egg-basket-1"}}},
|
||||
{"type":"egg-basket-2","x":103.5,"y":87.875},
|
||||
{"type":"egg-basket-3","x":104.40625,"y":86.91666666666667},
|
||||
{"type":"egg-basket-4","x":104.15625,"y":87.16666666666667},
|
||||
{"type":"sign-quest","x":104,"y":86.79166666666667,"name":"Egg baskets","interact":{"action":"give","args":{"item":"egg-basket-1"}}},
|
||||
{"type":"sign-donate","x":62,"y":78,"name":"Donate eggs","interact":{"action":"donateEgg"}},
|
||||
{"type":"barrel","x":62.125,"y":78.83333333333333,"interact":{"action":"donateEgg"}}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,325 @@
|
||||
{
|
||||
"entities": [
|
||||
{"type":"spider","x":41,"y":47.291666666666664,"options":{"height":27,"time":10.421148664318025}},
|
||||
{"type":"web","x":85,"y":82},
|
||||
{"type":"web","x":81,"y":92},
|
||||
{"type":"spider","x":80,"y":92.29166666666667,"options":{"height":19,"time":51.47618206683546}},
|
||||
{"type":"web","x":93,"y":92},
|
||||
{"type":"spider","x":96,"y":82.29166666666667,"options":{"height":19,"time":46.211583190597594}},
|
||||
{"type":"web","x":107.25,"y":114},
|
||||
{"type":"web","x":81.78125,"y":112.08333333333333},
|
||||
{"type":"web","x":149.3125,"y":78.29166666666667},
|
||||
{"type":"web","x":152.21875,"y":88.79166666666667},
|
||||
{"type":"spider","x":151.28125,"y":89.125,"options":{"height":19,"time":16.303621558472514}},
|
||||
{"type":"web","x":130.9375,"y":122.125},
|
||||
{"type":"web","x":134.9375,"y":137.25},
|
||||
{"type":"spider","x":133.9375,"y":137.70833333333334,"options":{"height":27,"time":80.92017194721848}},
|
||||
{"type":"web","x":111.9375,"y":126.79166666666667},
|
||||
{"type":"web","x":147.1875,"y":113.375},
|
||||
{"type":"web","x":148.125,"y":125.5},
|
||||
{"type":"spider","x":147.125,"y":125.95833333333333,"options":{"height":27,"time":48.38898289017379}},
|
||||
{"type":"web","x":132.28125,"y":148.75},
|
||||
{"type":"sign-donate","x":64,"y":79,"name":"Donate candies","interact":{"action":"donateCandy"}},
|
||||
{"type":"box","x":64.09375,"y":80.16666666666667,"interact":{"action":"donateCandy"}},
|
||||
{"type":"jacko-on","x":132.6875,"y":108.75},
|
||||
{"type":"jacko-on","x":131.28125,"y":134.75},
|
||||
{"type":"jacko-on","x":134.53125,"y":139.375},
|
||||
{"type":"jacko-on","x":122.9375,"y":105.375},
|
||||
{"type":"jacko-on","x":126.625,"y":107.375},
|
||||
{"type":"jacko-on","x":127.75,"y":110.875},
|
||||
{"type":"jacko-on","x":126.125,"y":124.375},
|
||||
{"type":"jacko-on","x":126.4375,"y":133.70833333333334},
|
||||
{"type":"jacko-on","x":126.875,"y":137.70833333333334},
|
||||
{"type":"jacko-on","x":132.375,"y":136.875},
|
||||
{"type":"tombstone-2","x":149.5,"y":135.54166666666666},
|
||||
{"type":"ghost-2","x":149.53125,"y":135.54166666666666,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-1"}}},
|
||||
{"type":"ghost-hooves-2","x":149.53125,"y":135.54166666666666,"tag":"ghost-hooves-1"},
|
||||
{"type":"tombstone-2","x":144.375,"y":100.20833333333333},
|
||||
{"type":"ghost-2","x":144.40625,"y":100.20833333333333,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-2"}}},
|
||||
{"type":"ghost-hooves-2","x":144.40625,"y":100.20833333333333,"tag":"ghost-hooves-2"},
|
||||
{"type":"tombstone-2","x":149.8125,"y":100.54166666666667},
|
||||
{"type":"ghost-2","x":149.84375,"y":100.54166666666667,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-3"}}},
|
||||
{"type":"ghost-hooves-2","x":149.84375,"y":100.54166666666667,"tag":"ghost-hooves-3"},
|
||||
{"type":"tombstone-2","x":144.53125,"y":105.25},
|
||||
{"type":"tombstone-2","x":146.3125,"y":105.25},
|
||||
{"type":"ghost-2","x":146.34375,"y":105.25,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-4"}}},
|
||||
{"type":"ghost-hooves-2","x":146.34375,"y":105.25,"tag":"ghost-hooves-4"},
|
||||
{"type":"tombstone-1","x":146.25,"y":100.5},
|
||||
{"type":"tombstone-1","x":148.25,"y":100.5},
|
||||
{"type":"ghost-1","x":148.28125,"y":100.5,"update":{"action":"ghost","args":{"anims":[1,3],"hooves":"ghost-hooves-5"}}},
|
||||
{"type":"ghost-hooves-1","x":148.28125,"y":100.5,"tag":"ghost-hooves-5"},
|
||||
{"type":"tombstone-1","x":148.3125,"y":105.375},
|
||||
{"type":"tombstone-1","x":150,"y":105.20833333333333},
|
||||
{"type":"tombstone-2","x":102.25,"y":93.25},
|
||||
{"type":"ghost-2","x":102.28125,"y":93.25,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-6"}}},
|
||||
{"type":"ghost-hooves-2","x":102.28125,"y":93.25,"tag":"ghost-hooves-6"},
|
||||
{"type":"tombstone-2","x":66.5625,"y":57.458333333333336},
|
||||
{"type":"ghost-2","x":66.59375,"y":57.458333333333336,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-7"}}},
|
||||
{"type":"ghost-hooves-2","x":66.59375,"y":57.458333333333336,"tag":"ghost-hooves-7"},
|
||||
{"type":"tombstone-2","x":72.1875,"y":69.20833333333333},
|
||||
{"type":"ghost-2","x":72.21875,"y":69.20833333333333,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-8"}}},
|
||||
{"type":"ghost-hooves-2","x":72.21875,"y":69.20833333333333,"tag":"ghost-hooves-8"},
|
||||
{"type":"eyes","x":155.5,"y":102.70833333333333,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":156.78125,"y":104,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":155.65625,"y":104.70833333333333,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":158.03125,"y":106.625,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":147.25,"y":111.95833333333333,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":146.5625,"y":109.29166666666667,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":148.1875,"y":110.25,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":141.28125,"y":111.5,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":145.21875,"y":115.33333333333333,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":144.15625,"y":114.41666666666667,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":142.375,"y":107.29166666666667,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":141.1875,"y":108.625,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":142.375,"y":111,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":149.5625,"y":113.5,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":150.21875,"y":113.04166666666667,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":140,"y":107.41666666666667,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":142.8125,"y":115.5,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":138.75,"y":111.5,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":137.21875,"y":112.25,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":144.5625,"y":93,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":145.40625,"y":93.91666666666667,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":147.375,"y":91.25,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":146.875,"y":93,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":148.65625,"y":92.33333333333333,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":153.125,"y":94.25,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":154.4375,"y":94.91666666666667,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":152.375,"y":96.04166666666667,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":154.84375,"y":97.16666666666667,"update":{"action":"eyes"}},
|
||||
{"type":"eyes","x":155.5,"y":97.75,"update":{"action":"eyes"}},
|
||||
{"type":"jacko-lantern-on","x":131.96875,"y":149.75},
|
||||
{"type":"jacko-lantern-on","x":132,"y":83.45833333333333},
|
||||
{"type":"jacko-lantern-on","x":131.96875,"y":149.83333333333334},
|
||||
{"type":"jacko-lantern-on","x":106.4375,"y":150.29166666666666},
|
||||
{"type":"jacko-lantern-on","x":107.125,"y":149.75},
|
||||
{"type":"jacko-lantern-on","x":80.3125,"y":93.16666666666667},
|
||||
{"type":"tombstone-1","x":45.3125,"y":152.79166666666666},
|
||||
{"type":"ghost-1","x":45.34375,"y":152.79166666666666,"update":{"action":"ghost","args":{"anims":[1,3],"hooves":"ghost-hooves-9"}}},
|
||||
{"type":"ghost-hooves-1","x":45.34375,"y":152.79166666666666,"tag":"ghost-hooves-9"},
|
||||
{"type":"tombstone-1","x":45.75,"y":106.04166666666667},
|
||||
{"type":"ghost-1","x":45.78125,"y":106.04166666666667,"update":{"action":"ghost","args":{"anims":[1,3],"hooves":"ghost-hooves-10"}}},
|
||||
{"type":"ghost-hooves-1","x":45.78125,"y":106.04166666666667,"tag":"ghost-hooves-10"},
|
||||
{"type":"tombstone-1","x":59.75,"y":96.79166666666667},
|
||||
{"type":"ghost-1","x":59.78125,"y":96.79166666666667,"update":{"action":"ghost","args":{"anims":[1,3],"hooves":"ghost-hooves-11"}}},
|
||||
{"type":"ghost-hooves-1","x":59.78125,"y":96.79166666666667,"tag":"ghost-hooves-11"},
|
||||
{"type":"tombstone-1","x":81,"y":93},
|
||||
{"type":"ghost-1","x":81.03125,"y":93,"update":{"action":"ghost","args":{"anims":[1,3],"hooves":"ghost-hooves-12"}}},
|
||||
{"type":"ghost-hooves-1","x":81.03125,"y":93,"tag":"ghost-hooves-12"},
|
||||
{"type":"tombstone-1","x":83.59375,"y":132.875},
|
||||
{"type":"ghost-1","x":83.625,"y":132.875,"update":{"action":"ghost","args":{"anims":[1,3],"hooves":"ghost-hooves-13"}}},
|
||||
{"type":"ghost-hooves-1","x":83.625,"y":132.875,"tag":"ghost-hooves-13"},
|
||||
{"type":"tombstone-1","x":115.9375,"y":45.75},
|
||||
{"type":"ghost-1","x":115.96875,"y":45.75,"update":{"action":"ghost","args":{"anims":[1,3],"hooves":"ghost-hooves-14"}}},
|
||||
{"type":"ghost-hooves-1","x":115.96875,"y":45.75,"tag":"ghost-hooves-14"},
|
||||
{"type":"tombstone-1","x":149.75,"y":81.54166666666667},
|
||||
{"type":"ghost-1","x":149.78125,"y":81.54166666666667,"update":{"action":"ghost","args":{"anims":[1,3],"hooves":"ghost-hooves-15"}}},
|
||||
{"type":"ghost-hooves-1","x":149.78125,"y":81.54166666666667,"tag":"ghost-hooves-15"},
|
||||
{"type":"tombstone-2","x":52.375,"y":138.66666666666666},
|
||||
{"type":"ghost-2","x":52.40625,"y":138.66666666666666,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-16"}}},
|
||||
{"type":"ghost-hooves-2","x":52.40625,"y":138.66666666666666,"tag":"ghost-hooves-16"},
|
||||
{"type":"tombstone-2","x":52.09375,"y":88.25},
|
||||
{"type":"ghost-2","x":52.125,"y":88.25,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-17"}}},
|
||||
{"type":"ghost-hooves-2","x":52.125,"y":88.25,"tag":"ghost-hooves-17"},
|
||||
{"type":"tombstone-2","x":49.03125,"y":64.79166666666667},
|
||||
{"type":"ghost-2","x":49.0625,"y":64.79166666666667,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-18"}}},
|
||||
{"type":"ghost-hooves-2","x":49.0625,"y":64.79166666666667,"tag":"ghost-hooves-18"},
|
||||
{"type":"tombstone-2","x":48.40625,"y":50.791666666666664},
|
||||
{"type":"ghost-2","x":48.4375,"y":50.791666666666664,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-19"}}},
|
||||
{"type":"ghost-hooves-2","x":48.4375,"y":50.791666666666664,"tag":"ghost-hooves-19"},
|
||||
{"type":"tombstone-2","x":80.71875,"y":115.79166666666667},
|
||||
{"type":"ghost-2","x":80.75,"y":115.79166666666667,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-20"}}},
|
||||
{"type":"ghost-hooves-2","x":80.75,"y":115.79166666666667,"tag":"ghost-hooves-20"},
|
||||
{"type":"tombstone-2","x":86.5,"y":46.791666666666664},
|
||||
{"type":"ghost-2","x":86.53125,"y":46.791666666666664,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-21"}}},
|
||||
{"type":"ghost-hooves-2","x":86.53125,"y":46.791666666666664,"tag":"ghost-hooves-21"},
|
||||
{"type":"tombstone-2","x":113.78125,"y":107.33333333333333},
|
||||
{"type":"ghost-2","x":113.8125,"y":107.33333333333333,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-22"}}},
|
||||
{"type":"ghost-hooves-2","x":113.8125,"y":107.33333333333333,"tag":"ghost-hooves-22"},
|
||||
{"type":"tombstone-2","x":118.03125,"y":125.08333333333333},
|
||||
{"type":"ghost-2","x":118.0625,"y":125.08333333333333,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-23"}}},
|
||||
{"type":"ghost-hooves-2","x":118.0625,"y":125.08333333333333,"tag":"ghost-hooves-23"},
|
||||
{"type":"tombstone-2","x":106.5625,"y":149.79166666666666},
|
||||
{"type":"ghost-2","x":106.59375,"y":149.79166666666666,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-24"}}},
|
||||
{"type":"ghost-hooves-2","x":106.59375,"y":149.79166666666666,"tag":"ghost-hooves-24"},
|
||||
{"type":"tombstone-2","x":132.40625,"y":83.08333333333333},
|
||||
{"type":"ghost-2","x":132.4375,"y":83.08333333333333,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-25"}}},
|
||||
{"type":"ghost-hooves-2","x":132.4375,"y":83.08333333333333,"tag":"ghost-hooves-25"},
|
||||
{"type":"tombstone-2","x":135.4375,"y":67.625},
|
||||
{"type":"ghost-2","x":135.46875,"y":67.625,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-26"}}},
|
||||
{"type":"ghost-hooves-2","x":135.46875,"y":67.625,"tag":"ghost-hooves-26"},
|
||||
{"type":"tombstone-2","x":131.5,"y":149.5},
|
||||
{"type":"ghost-2","x":131.53125,"y":149.5,"update":{"action":"ghost","args":{"anims":[1,2,3],"hooves":"ghost-hooves-27"}}},
|
||||
{"type":"ghost-hooves-2","x":131.53125,"y":149.5,"tag":"ghost-hooves-27"},
|
||||
{"type":"jacko-lantern-on","x":45.8125,"y":153.16666666666666},
|
||||
{"type":"jacko-lantern-on","x":46.125,"y":152.75},
|
||||
{"type":"jacko-lantern-on","x":53,"y":138.66666666666666},
|
||||
{"type":"jacko-lantern-on","x":48.53125,"y":64.54166666666667},
|
||||
{"type":"jacko-lantern-on","x":48.90625,"y":51},
|
||||
{"type":"jacko-lantern-on","x":72.5,"y":69.54166666666667},
|
||||
{"type":"jacko-lantern-on","x":80.28125,"y":116.125},
|
||||
{"type":"jacko-lantern-on","x":83.03125,"y":133.25},
|
||||
{"type":"jacko-lantern-on","x":86.125,"y":47.083333333333336},
|
||||
{"type":"jacko-lantern-on","x":115.5,"y":46.125},
|
||||
{"type":"jacko-lantern-on","x":114.25,"y":107.79166666666667},
|
||||
{"type":"jacko-lantern-on","x":114.5,"y":107.375},
|
||||
{"type":"jacko-lantern-on","x":132,"y":83.375},
|
||||
{"type":"jacko-lantern-on","x":132.90625,"y":83.04166666666667},
|
||||
{"type":"jacko-lantern-on","x":115.5,"y":46.083333333333336},
|
||||
{"type":"jacko-lantern-on","x":149.125,"y":81.33333333333333},
|
||||
{"type":"jacko-lantern-on","x":144.125,"y":105.54166666666667},
|
||||
{"type":"jacko-lantern-on","x":146.75,"y":100.79166666666667},
|
||||
{"type":"jacko-lantern-on","x":150.625,"y":105.54166666666667},
|
||||
{"type":"jacko-lantern-on","x":52.65625,"y":139},
|
||||
{"type":"jacko-lantern-on","x":46.25,"y":106.375},
|
||||
{"type":"jacko-lantern-on","x":52.5,"y":88.58333333333333},
|
||||
{"type":"jacko-lantern-on","x":135.8125,"y":67.875},
|
||||
{"type":"jacko-lantern-off","x":52.59375,"y":88.08333333333333},
|
||||
{"type":"jacko-lantern-off","x":106.0625,"y":150},
|
||||
{"type":"jacko-lantern-off","x":51.90625,"y":138.54166666666666},
|
||||
{"type":"jacko","x":71.875,"y":70,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":90.1875,"y":66.375,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":80,"y":53.791666666666664,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":67.28125,"y":88.58333333333333,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":86.1875,"y":97.29166666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":99.6875,"y":92,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":91,"y":86.08333333333333,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":85.6875,"y":75.08333333333333,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":84.5,"y":91.375,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":99,"y":87,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":91.59375,"y":55.875,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":95.59375,"y":47.5,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":98.375,"y":44.166666666666664,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":100.09375,"y":49,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":87.1875,"y":46.5,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":69.6875,"y":47.166666666666664,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":49.09375,"y":89.5,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":59.09375,"y":97.58333333333333,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":46.6875,"y":98.08333333333333,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":52.1875,"y":77.375,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":62.5,"y":72.16666666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":66.6875,"y":71.375,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":97.5,"y":100.75,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":110.3125,"y":92.75,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":117.3125,"y":99.375,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":108.9375,"y":101.5,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":109.625,"y":102.20833333333333,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":108,"y":85,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":93.5,"y":106.16666666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":113.21875,"y":108.16666666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":117.53125,"y":117.375,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":118.78125,"y":125.29166666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":117.25,"y":127.70833333333333,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":118,"y":129.5,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":93.21875,"y":135.45833333333334,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":78.9375,"y":147.5,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":82,"y":147.66666666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":102.03125,"y":146.79166666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":96.5625,"y":146.54166666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":108.75,"y":141.29166666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":110,"y":146.70833333333334,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":147.875,"y":148,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":145.40625,"y":150.04166666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":147.25,"y":153.66666666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":150.75,"y":153,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":150.75,"y":149.04166666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":152.875,"y":131.375,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":143.25,"y":137.16666666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":141.21875,"y":116.125,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":138.15625,"y":132.45833333333334,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":141.3125,"y":102,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":141.28125,"y":103.875,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":134.53125,"y":86.70833333333333,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":139.3125,"y":85.25,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":148.5,"y":81.70833333333333,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":150.0625,"y":82.5,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":129.75,"y":98.66666666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":136.75,"y":66.375,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":117.625,"y":70.29166666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":131.78125,"y":52.625,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":116.71875,"y":46.208333333333336,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":137.21875,"y":55.25,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":131.90625,"y":49.208333333333336,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":124.625,"y":47.041666666666664,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":122.6875,"y":51.541666666666664,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":125.96875,"y":145.20833333333334,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":115.90625,"y":139.91666666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":119.5625,"y":145.5,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":53.5625,"y":133.54166666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":48.75,"y":136.04166666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":48.21875,"y":142.75,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":55.21875,"y":143.5,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":58.3125,"y":135.20833333333334,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":58.9375,"y":140.625,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":76.625,"y":125,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":76.5625,"y":128.875,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":77.03125,"y":120.875,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":86.90625,"y":121.04166666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":86.8125,"y":129.29166666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":76.90625,"y":134.625,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":86.46875,"y":135.5,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":137.375,"y":97.58333333333333,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":44.5,"y":152.875,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":49.53125,"y":65.125,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":81.5,"y":92.375,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":81.15625,"y":116.25,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":116.6875,"y":46.166666666666664,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":118.78125,"y":125.29166666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":148.5,"y":81.66666666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":150.0625,"y":82.5,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":151.4375,"y":99.04166666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":45.0625,"y":105.75,"boop":{"action":"light"}},
|
||||
{"type":"jacko-lantern-off","x":66.59375,"y":72.08333333333333},
|
||||
{"type":"jacko-lantern-off","x":67.1875,"y":71.875},
|
||||
{"type":"sign-quest","x":101,"y":100,"name":"Jack-o-Lanterns","interact":{"action":"give","args":{"item":"jacko-lantern-on","message":"Now go collect some candies!"}}},
|
||||
{"type":"jacko","x":101.5,"y":99.66666666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":100.6875,"y":100.29166666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko-lantern-off","x":101.1875,"y":99.16666666666667},
|
||||
{"type":"jacko-lantern-off","x":101.6875,"y":99.29166666666667},
|
||||
{"type":"jacko-lantern-off","x":101.28125,"y":100.16666666666667},
|
||||
{"type":"jacko-lantern-off","x":101.6875,"y":100.5},
|
||||
{"type":"jacko-lantern-on","x":101,"y":100.66666666666667},
|
||||
{"type":"jacko-lantern-on","x":101.5,"y":100.875},
|
||||
{"type":"jacko-lantern-on","x":100.09375,"y":100.66666666666667},
|
||||
{"type":"sign-quest","x":147,"y":135,"name":"Jack-o-Lanterns","interact":{"action":"give","args":{"item":"jacko-lantern-on","message":"Now go collect some candies!"}}},
|
||||
{"type":"jacko","x":147.5,"y":134.66666666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":146.6875,"y":135.29166666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko-lantern-off","x":147.1875,"y":134.16666666666666},
|
||||
{"type":"jacko-lantern-off","x":147.6875,"y":134.29166666666666},
|
||||
{"type":"jacko-lantern-off","x":147.28125,"y":135.16666666666666},
|
||||
{"type":"jacko-lantern-off","x":147.6875,"y":135.5},
|
||||
{"type":"jacko-lantern-on","x":147,"y":135.66666666666666},
|
||||
{"type":"jacko-lantern-on","x":147.5,"y":135.875},
|
||||
{"type":"jacko-lantern-on","x":146.09375,"y":135.66666666666666},
|
||||
{"type":"sign-quest","x":190,"y":176,"name":"Jack-o-Lanterns","interact":{"action":"give","args":{"item":"jacko-lantern-on","message":"Now go collect some candies!"}}},
|
||||
{"type":"jacko","x":190.5,"y":175.66666666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":189.6875,"y":176.29166666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko-lantern-off","x":190.1875,"y":175.16666666666666},
|
||||
{"type":"jacko-lantern-off","x":190.6875,"y":175.29166666666666},
|
||||
{"type":"jacko-lantern-off","x":190.28125,"y":176.16666666666666},
|
||||
{"type":"jacko-lantern-off","x":190.6875,"y":176.5},
|
||||
{"type":"jacko-lantern-on","x":190,"y":176.66666666666666},
|
||||
{"type":"jacko-lantern-on","x":190.5,"y":176.875},
|
||||
{"type":"jacko-lantern-on","x":189.09375,"y":176.66666666666666},
|
||||
{"type":"sign-quest","x":107,"y":173,"name":"Jack-o-Lanterns","interact":{"action":"give","args":{"item":"jacko-lantern-on","message":"Now go collect some candies!"}}},
|
||||
{"type":"jacko","x":107.5,"y":172.66666666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":106.6875,"y":173.29166666666666,"boop":{"action":"light"}},
|
||||
{"type":"jacko-lantern-off","x":107.1875,"y":172.16666666666666},
|
||||
{"type":"jacko-lantern-off","x":107.6875,"y":172.29166666666666},
|
||||
{"type":"jacko-lantern-off","x":107.28125,"y":173.16666666666666},
|
||||
{"type":"jacko-lantern-off","x":107.6875,"y":173.5},
|
||||
{"type":"jacko-lantern-on","x":107,"y":173.66666666666666},
|
||||
{"type":"jacko-lantern-on","x":107.5,"y":173.875},
|
||||
{"type":"jacko-lantern-on","x":106.09375,"y":173.66666666666666},
|
||||
{"type":"sign-quest","x":165,"y":95,"name":"Jack-o-Lanterns","interact":{"action":"give","args":{"item":"jacko-lantern-on","message":"Now go collect some candies!"}}},
|
||||
{"type":"jacko","x":165.5,"y":94.66666666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko","x":164.6875,"y":95.29166666666667,"boop":{"action":"light"}},
|
||||
{"type":"jacko-lantern-off","x":165.1875,"y":94.16666666666667},
|
||||
{"type":"jacko-lantern-off","x":165.6875,"y":94.29166666666667},
|
||||
{"type":"jacko-lantern-off","x":165.28125,"y":95.16666666666667},
|
||||
{"type":"jacko-lantern-off","x":165.6875,"y":95.5},
|
||||
{"type":"jacko-lantern-on","x":165,"y":95.66666666666667},
|
||||
{"type":"jacko-lantern-on","x":165.5,"y":95.875},
|
||||
{"type":"jacko-lantern-on","x":164.09375,"y":95.66666666666667}
|
||||
]
|
||||
}
|
||||
+3656
-4
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,194 @@
|
||||
{
|
||||
"entities": [
|
||||
{"type":"spider","x":47,"y":50.291666666666664,"options":{"height":19,"time":11.844934290274978}},
|
||||
{"type":"spider","x":91,"y":85.29166666666667,"options":{"height":27,"time":15.035809273831546}},
|
||||
{"type":"flowers-1","x":70,"y":55},
|
||||
{"type":"flowers-2","x":46.5,"y":78},
|
||||
{"type":"flowers-2","x":80,"y":49.5},
|
||||
{"type":"flowers-2","x":100.59375,"y":75.5},
|
||||
{"type":"flowers-2","x":78,"y":92},
|
||||
{"type":"flowers-3","x":69.5,"y":69},
|
||||
{"type":"flowers-3","x":48.78125,"y":82},
|
||||
{"type":"flowers-3","x":86.5,"y":53.5},
|
||||
{"type":"flowers-4","x":66,"y":61},
|
||||
{"type":"flowers-4","x":87.5,"y":63.5},
|
||||
{"type":"flowers-4","x":56,"y":89.66666666666667},
|
||||
{"type":"flowers-5","x":53.5,"y":68},
|
||||
{"type":"flowers-5","x":77.6875,"y":96},
|
||||
{"type":"flowers-5","x":77,"y":71.29166666666667},
|
||||
{"type":"flowers-5","x":87.5,"y":69},
|
||||
{"type":"flowers-7","x":93.375,"y":65.66666666666667},
|
||||
{"type":"flowers-1","x":112.0625,"y":64.625},
|
||||
{"type":"flowers-2","x":107.6875,"y":53.75},
|
||||
{"type":"flowers-2","x":69.15625,"y":107},
|
||||
{"type":"flowers-3","x":106.71875,"y":94.75},
|
||||
{"type":"flowers-3","x":113.5625,"y":61.958333333333336},
|
||||
{"type":"flowers-3","x":70.5,"y":104.875},
|
||||
{"type":"flowers-4","x":58,"y":112.91666666666667},
|
||||
{"type":"flowers-4","x":53.28125,"y":99.875},
|
||||
{"type":"flowers-6","x":106.71875,"y":93.45833333333333},
|
||||
{"type":"flowers-5","x":116.28125,"y":50.916666666666664},
|
||||
{"type":"flowers-1","x":125.28125,"y":148.25},
|
||||
{"type":"flowers-1","x":153.03125,"y":133.54166666666666},
|
||||
{"type":"flowers-1","x":143.65625,"y":87.16666666666667},
|
||||
{"type":"flowers-1","x":85.25,"y":150.75},
|
||||
{"type":"flowers-1","x":66.6875,"y":139.75},
|
||||
{"type":"flowers-2","x":79.125,"y":148.91666666666666},
|
||||
{"type":"flowers-2","x":65.53125,"y":126.79166666666667},
|
||||
{"type":"flowers-2","x":149.75,"y":147.41666666666666},
|
||||
{"type":"flowers-2","x":131.75,"y":87.08333333333333},
|
||||
{"type":"flowers-3","x":143.125,"y":151.5},
|
||||
{"type":"flowers-3","x":148.1875,"y":131.54166666666666},
|
||||
{"type":"flowers-3","x":152.78125,"y":95.41666666666667},
|
||||
{"type":"flowers-3","x":123.9375,"y":83},
|
||||
{"type":"flowers-3","x":92.375,"y":156.04166666666666},
|
||||
{"type":"flowers-3","x":114.875,"y":134.04166666666666},
|
||||
{"type":"flowers-3","x":119.125,"y":154.66666666666666},
|
||||
{"type":"flowers-3","x":69.40625,"y":133},
|
||||
{"type":"flowers-3","x":75.6875,"y":154.29166666666666},
|
||||
{"type":"flowers-4","x":62.4375,"y":131.25},
|
||||
{"type":"flowers-4","x":86.625,"y":146.54166666666666},
|
||||
{"type":"flowers-4","x":58.6875,"y":150.79166666666666},
|
||||
{"type":"flowers-4","x":123.75,"y":155.04166666666666},
|
||||
{"type":"flowers-4","x":146.71875,"y":153.25},
|
||||
{"type":"flowers-4","x":143.78125,"y":95.75},
|
||||
{"type":"flowers-4","x":126.75,"y":85.91666666666667},
|
||||
{"type":"flowers-5","x":144,"y":148.25},
|
||||
{"type":"flowers-5","x":150.0625,"y":134.04166666666666},
|
||||
{"type":"flowers-5","x":133.25,"y":91.04166666666667},
|
||||
{"type":"flowers-5","x":151.0625,"y":97.79166666666667},
|
||||
{"type":"flowers-5","x":124.46875,"y":85.29166666666667},
|
||||
{"type":"flowers-5","x":85.40625,"y":157.04166666666666},
|
||||
{"type":"flowers-5","x":100.65625,"y":147.75},
|
||||
{"type":"flowers-5","x":114.90625,"y":132.5},
|
||||
{"type":"flowers-5","x":90.46875,"y":132.04166666666666},
|
||||
{"type":"flowers-5","x":84.15625,"y":148.66666666666666},
|
||||
{"type":"flowers-5","x":66.5,"y":133.25},
|
||||
{"type":"flowers-5","x":67.9375,"y":138.66666666666666},
|
||||
{"type":"flowers-5","x":59.4375,"y":153.25},
|
||||
{"type":"flowers-5","x":74.4375,"y":156.29166666666666},
|
||||
{"type":"flowers-2","x":41.25,"y":96.5},
|
||||
{"type":"flowers-3","x":25.1875,"y":88.20833333333333},
|
||||
{"type":"flowers-3","x":21.65625,"y":109.16666666666667},
|
||||
{"type":"flowers-4","x":8.5,"y":102.625},
|
||||
{"type":"flowers-5","x":23.25,"y":112.20833333333333},
|
||||
{"type":"flowers-1","x":36,"y":126.45833333333333},
|
||||
{"type":"flowers-3","x":38.5,"y":123.91666666666667},
|
||||
{"type":"flowers-4","x":31.5,"y":126.54166666666667},
|
||||
{"type":"flowers-4","x":27.78125,"y":122.45833333333333},
|
||||
{"type":"flowers-3","x":14.90625,"y":140.04166666666666},
|
||||
{"type":"flowers-5","x":14.75,"y":137.875},
|
||||
{"type":"flowers-3","x":11.65625,"y":152.75},
|
||||
{"type":"flowers-4","x":9.6875,"y":150.91666666666666},
|
||||
{"type":"flowers-4","x":2.65625,"y":117.95833333333333},
|
||||
{"type":"flowers-2","x":4.4375,"y":113.20833333333333},
|
||||
{"type":"flowers-2","x":37.96875,"y":64.625},
|
||||
{"type":"flowers-4","x":38.9375,"y":62.25},
|
||||
{"type":"flowers-2","x":24.25,"y":61.458333333333336},
|
||||
{"type":"flowers-5","x":24.5,"y":60.416666666666664},
|
||||
{"type":"flowers-6","x":25.8125,"y":66},
|
||||
{"type":"flowers-4","x":26.25,"y":45.5},
|
||||
{"type":"flowers-6","x":26.53125,"y":43.75},
|
||||
{"type":"flowers-2","x":22.625,"y":24.875},
|
||||
{"type":"flowers-4","x":23.46875,"y":21.958333333333332},
|
||||
{"type":"flowers-4","x":30.6875,"y":14.625},
|
||||
{"type":"flowers-3","x":32.78125,"y":16.416666666666668},
|
||||
{"type":"flowers-3","x":46.125,"y":4.75},
|
||||
{"type":"flowers-3","x":98.96875,"y":10.458333333333334},
|
||||
{"type":"flowers-4","x":100.9375,"y":44.958333333333336},
|
||||
{"type":"flowers-4","x":124.3125,"y":43.25},
|
||||
{"type":"flowers-3","x":134.40625,"y":45.875},
|
||||
{"type":"flowers-4","x":135.46875,"y":27.291666666666668},
|
||||
{"type":"flowers-6","x":136.625,"y":29.916666666666668},
|
||||
{"type":"flowers-1","x":131.75,"y":4.5},
|
||||
{"type":"flowers-4","x":127.96875,"y":4.666666666666667},
|
||||
{"type":"flowers-4","x":122.0625,"y":28.416666666666668},
|
||||
{"type":"flowers-6","x":121.5,"y":30.958333333333332},
|
||||
{"type":"flowers-6","x":122.28125,"y":41.625},
|
||||
{"type":"flowers-6","x":101.90625,"y":47.166666666666664},
|
||||
{"type":"flowers-3","x":50.65625,"y":39.416666666666664},
|
||||
{"type":"flowers-4","x":48.46875,"y":38},
|
||||
{"type":"flowers-6","x":48.75,"y":41.458333333333336},
|
||||
{"type":"flowers-6","x":32.625,"y":46.125},
|
||||
{"type":"flowers-6","x":14.9375,"y":55.041666666666664},
|
||||
{"type":"flowers-7","x":14.25,"y":56.75},
|
||||
{"type":"flowers-1","x":81.53125,"y":17.708333333333332},
|
||||
{"type":"flowers-1","x":72.4375,"y":12.458333333333334},
|
||||
{"type":"flowers-2","x":80.375,"y":13.25},
|
||||
{"type":"flowers-3","x":74.0625,"y":21},
|
||||
{"type":"flowers-3","x":75.25,"y":5.791666666666667},
|
||||
{"type":"flowers-3","x":85.28125,"y":10.25},
|
||||
{"type":"flowers-4","x":80.25,"y":4.958333333333333},
|
||||
{"type":"flowers-4","x":77.375,"y":18.166666666666668},
|
||||
{"type":"flowers-4","x":64.21875,"y":5.625},
|
||||
{"type":"flowers-5","x":73.6875,"y":19.25},
|
||||
{"type":"flowers-5","x":90.21875,"y":11.25},
|
||||
{"type":"flowers-5","x":77.3125,"y":3.6666666666666665},
|
||||
{"type":"flowers-5","x":64.875,"y":12.25},
|
||||
{"type":"flowers-6","x":70.3125,"y":12.916666666666666},
|
||||
{"type":"flowers-6","x":85.75,"y":9},
|
||||
{"type":"flowers-6","x":82.90625,"y":3.75},
|
||||
{"type":"flowers-6","x":61.375,"y":5.708333333333333},
|
||||
{"type":"flowers-7","x":73.625,"y":3.9583333333333335},
|
||||
{"type":"flowers-7","x":74.5,"y":18.375},
|
||||
{"type":"flowers-7","x":67.1875,"y":11.166666666666666},
|
||||
{"type":"clovers-4","x":43.9375,"y":116.79166666666667},
|
||||
{"type":"clovers-4","x":51,"y":116.25},
|
||||
{"type":"clovers-4","x":60.46875,"y":117.91666666666667},
|
||||
{"type":"clovers-4","x":58.15625,"y":109},
|
||||
{"type":"clovers-3","x":60.65625,"y":116.16666666666667},
|
||||
{"type":"clovers-3","x":57.125,"y":117.5},
|
||||
{"type":"clovers-3","x":58.03125,"y":110.45833333333333},
|
||||
{"type":"clovers-5","x":48.875,"y":113.54166666666667},
|
||||
{"type":"clovers-5","x":64.375,"y":113.75},
|
||||
{"type":"clovers-5","x":41.96875,"y":105.5},
|
||||
{"type":"clovers-4","x":52.96875,"y":103.70833333333333},
|
||||
{"type":"clovers-3","x":79.1875,"y":115.25},
|
||||
{"type":"clovers-3","x":89.03125,"y":117.04166666666667},
|
||||
{"type":"clovers-4","x":83.25,"y":110.66666666666667},
|
||||
{"type":"clovers-5","x":82.5,"y":113.5},
|
||||
{"type":"clovers-6","x":85.8125,"y":117.91666666666667},
|
||||
{"type":"clovers-3","x":103.375,"y":108.16666666666667},
|
||||
{"type":"clovers-3","x":110.03125,"y":117.375},
|
||||
{"type":"clovers-5","x":113.75,"y":117.91666666666667},
|
||||
{"type":"clovers-5","x":105.90625,"y":107},
|
||||
{"type":"clovers-5","x":104.46875,"y":109.75},
|
||||
{"type":"clovers-4","x":117.46875,"y":97.16666666666667},
|
||||
{"type":"clovers-6","x":89.6875,"y":83.45833333333333},
|
||||
{"type":"clovers-6","x":108.5,"y":73.875},
|
||||
{"type":"clovers-3","x":99,"y":64.79166666666667},
|
||||
{"type":"clovers-5","x":97.75,"y":66.625},
|
||||
{"type":"clovers-5","x":90.375,"y":69.25},
|
||||
{"type":"clovers-6","x":88.78125,"y":65.20833333333333},
|
||||
{"type":"clovers-6","x":80.5625,"y":53.416666666666664},
|
||||
{"type":"clovers-6","x":115,"y":45.541666666666664},
|
||||
{"type":"clovers-7","x":84.65625,"y":55.25},
|
||||
{"type":"clovers-7","x":116.15625,"y":45.75},
|
||||
{"type":"clovers-5","x":81.71875,"y":54.25},
|
||||
{"type":"clovers-5","x":43.5,"y":75.79166666666667},
|
||||
{"type":"clovers-7","x":46.375,"y":76.625},
|
||||
{"type":"clovers-3","x":69.96875,"y":48.541666666666664},
|
||||
{"type":"clovers-3","x":73.09375,"y":43.5},
|
||||
{"type":"clovers-5","x":67.25,"y":48.291666666666664},
|
||||
{"type":"clovers-5","x":74.25,"y":45.166666666666664},
|
||||
{"type":"clovers-6","x":69.9375,"y":47.375},
|
||||
{"type":"clovers-7","x":89.34375,"y":63.625},
|
||||
{"type":"clover-1","x":72,"y":70},
|
||||
{"type":"clovers-4","x":55.375,"y":148.375},
|
||||
{"type":"clovers-4","x":42.90625,"y":141.79166666666666},
|
||||
{"type":"clovers-5","x":64.65625,"y":145.75},
|
||||
{"type":"clovers-5","x":48.75,"y":131},
|
||||
{"type":"clovers-6","x":46.3125,"y":131.95833333333334},
|
||||
{"type":"clovers-6","x":91.15625,"y":146.79166666666666},
|
||||
{"type":"clovers-4","x":103.40625,"y":137.29166666666666},
|
||||
{"type":"clovers-6","x":134.21875,"y":149.04166666666666},
|
||||
{"type":"clovers-6","x":133.75,"y":135.75},
|
||||
{"type":"clovers-3","x":151.75,"y":128.375},
|
||||
{"type":"clovers-4","x":156.8125,"y":109.625},
|
||||
{"type":"clovers-4","x":123.1875,"y":108.5},
|
||||
{"type":"clovers-3","x":152.0625,"y":91.625},
|
||||
{"type":"clovers-3","x":126.9375,"y":97},
|
||||
{"type":"clovers-7","x":149.21875,"y":81.125},
|
||||
{"type":"clovers-6","x":157.3125,"y":74}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
{
|
||||
"entities": [
|
||||
{"type":"spider","x":47,"y":50.291666666666664,"options":{"height":19,"time":11.844934290274978}},
|
||||
{"type":"spider","x":91,"y":85.29166666666667,"options":{"height":27,"time":15.035809273831546}},
|
||||
{"type":"flowers-1","x":70,"y":55},
|
||||
{"type":"flowers-2","x":46.5,"y":78},
|
||||
{"type":"flowers-2","x":80,"y":49.5},
|
||||
{"type":"flowers-2","x":100.59375,"y":75.5},
|
||||
{"type":"flowers-2","x":78,"y":92},
|
||||
{"type":"flowers-3","x":69.5,"y":69},
|
||||
{"type":"flowers-3","x":48.78125,"y":82},
|
||||
{"type":"flowers-3","x":86.5,"y":53.5},
|
||||
{"type":"flowers-4","x":66,"y":61},
|
||||
{"type":"flowers-4","x":87.5,"y":63.5},
|
||||
{"type":"flowers-4","x":56,"y":89.66666666666667},
|
||||
{"type":"flowers-5","x":53.5,"y":68},
|
||||
{"type":"flowers-5","x":77.6875,"y":96},
|
||||
{"type":"flowers-5","x":77,"y":71.29166666666667},
|
||||
{"type":"flowers-5","x":87.5,"y":69},
|
||||
{"type":"flowers-7","x":93.375,"y":65.66666666666667},
|
||||
{"type":"flowers-1","x":112.0625,"y":64.625},
|
||||
{"type":"flowers-2","x":107.6875,"y":53.75},
|
||||
{"type":"flowers-2","x":69.15625,"y":107},
|
||||
{"type":"flowers-3","x":106.71875,"y":94.75},
|
||||
{"type":"flowers-3","x":113.5625,"y":61.958333333333336},
|
||||
{"type":"flowers-3","x":70.5,"y":104.875},
|
||||
{"type":"flowers-4","x":58,"y":112.91666666666667},
|
||||
{"type":"flowers-4","x":53.28125,"y":99.875},
|
||||
{"type":"flowers-6","x":106.71875,"y":93.45833333333333},
|
||||
{"type":"flowers-5","x":116.28125,"y":50.916666666666664},
|
||||
{"type":"flowers-1","x":125.28125,"y":148.25},
|
||||
{"type":"flowers-1","x":153.03125,"y":133.54166666666666},
|
||||
{"type":"flowers-1","x":143.65625,"y":87.16666666666667},
|
||||
{"type":"flowers-1","x":85.25,"y":150.75},
|
||||
{"type":"flowers-1","x":66.6875,"y":139.75},
|
||||
{"type":"flowers-2","x":79.125,"y":148.91666666666666},
|
||||
{"type":"flowers-2","x":65.53125,"y":126.79166666666667},
|
||||
{"type":"flowers-2","x":149.75,"y":147.41666666666666},
|
||||
{"type":"flowers-2","x":131.75,"y":87.08333333333333},
|
||||
{"type":"flowers-3","x":143.125,"y":151.5},
|
||||
{"type":"flowers-3","x":148.1875,"y":131.54166666666666},
|
||||
{"type":"flowers-3","x":152.78125,"y":95.41666666666667},
|
||||
{"type":"flowers-3","x":123.9375,"y":83},
|
||||
{"type":"flowers-3","x":92.375,"y":156.04166666666666},
|
||||
{"type":"flowers-3","x":114.875,"y":134.04166666666666},
|
||||
{"type":"flowers-3","x":119.125,"y":154.66666666666666},
|
||||
{"type":"flowers-3","x":69.40625,"y":133},
|
||||
{"type":"flowers-3","x":75.6875,"y":154.29166666666666},
|
||||
{"type":"flowers-4","x":62.4375,"y":131.25},
|
||||
{"type":"flowers-4","x":86.625,"y":146.54166666666666},
|
||||
{"type":"flowers-4","x":58.6875,"y":150.79166666666666},
|
||||
{"type":"flowers-4","x":123.75,"y":155.04166666666666},
|
||||
{"type":"flowers-4","x":146.71875,"y":153.25},
|
||||
{"type":"flowers-4","x":143.78125,"y":95.75},
|
||||
{"type":"flowers-4","x":126.75,"y":85.91666666666667},
|
||||
{"type":"flowers-5","x":144,"y":148.25},
|
||||
{"type":"flowers-5","x":150.0625,"y":134.04166666666666},
|
||||
{"type":"flowers-5","x":133.25,"y":91.04166666666667},
|
||||
{"type":"flowers-5","x":151.0625,"y":97.79166666666667},
|
||||
{"type":"flowers-5","x":124.46875,"y":85.29166666666667},
|
||||
{"type":"flowers-5","x":85.40625,"y":157.04166666666666},
|
||||
{"type":"flowers-5","x":100.65625,"y":147.75},
|
||||
{"type":"flowers-5","x":114.90625,"y":132.5},
|
||||
{"type":"flowers-5","x":90.46875,"y":132.04166666666666},
|
||||
{"type":"flowers-5","x":84.15625,"y":148.66666666666666},
|
||||
{"type":"flowers-5","x":66.5,"y":133.25},
|
||||
{"type":"flowers-5","x":67.9375,"y":138.66666666666666},
|
||||
{"type":"flowers-5","x":59.4375,"y":153.25},
|
||||
{"type":"flowers-5","x":74.4375,"y":156.29166666666666},
|
||||
{"type":"flowers-2","x":41.25,"y":96.5},
|
||||
{"type":"flowers-3","x":25.1875,"y":88.20833333333333},
|
||||
{"type":"flowers-3","x":21.65625,"y":109.16666666666667},
|
||||
{"type":"flowers-4","x":8.5,"y":102.625},
|
||||
{"type":"flowers-5","x":23.25,"y":112.20833333333333},
|
||||
{"type":"flowers-1","x":36,"y":126.45833333333333},
|
||||
{"type":"flowers-3","x":38.5,"y":123.91666666666667},
|
||||
{"type":"flowers-4","x":31.5,"y":126.54166666666667},
|
||||
{"type":"flowers-4","x":27.78125,"y":122.45833333333333},
|
||||
{"type":"flowers-3","x":14.90625,"y":140.04166666666666},
|
||||
{"type":"flowers-5","x":14.75,"y":137.875},
|
||||
{"type":"flowers-3","x":11.65625,"y":152.75},
|
||||
{"type":"flowers-4","x":9.6875,"y":150.91666666666666},
|
||||
{"type":"flowers-4","x":2.65625,"y":117.95833333333333},
|
||||
{"type":"flowers-2","x":4.4375,"y":113.20833333333333},
|
||||
{"type":"flowers-2","x":37.96875,"y":64.625},
|
||||
{"type":"flowers-4","x":38.9375,"y":62.25},
|
||||
{"type":"flowers-2","x":24.25,"y":61.458333333333336},
|
||||
{"type":"flowers-5","x":24.5,"y":60.416666666666664},
|
||||
{"type":"flowers-6","x":25.8125,"y":66},
|
||||
{"type":"flowers-4","x":26.25,"y":45.5},
|
||||
{"type":"flowers-6","x":26.53125,"y":43.75},
|
||||
{"type":"flowers-2","x":22.625,"y":24.875},
|
||||
{"type":"flowers-4","x":23.46875,"y":21.958333333333332},
|
||||
{"type":"flowers-4","x":30.6875,"y":14.625},
|
||||
{"type":"flowers-3","x":32.78125,"y":16.416666666666668},
|
||||
{"type":"flowers-3","x":46.125,"y":4.75},
|
||||
{"type":"flowers-3","x":98.96875,"y":10.458333333333334},
|
||||
{"type":"flowers-4","x":100.9375,"y":44.958333333333336},
|
||||
{"type":"flowers-4","x":124.3125,"y":43.25},
|
||||
{"type":"flowers-3","x":134.40625,"y":45.875},
|
||||
{"type":"flowers-4","x":135.46875,"y":27.291666666666668},
|
||||
{"type":"flowers-6","x":136.625,"y":29.916666666666668},
|
||||
{"type":"flowers-1","x":131.75,"y":4.5},
|
||||
{"type":"flowers-4","x":127.96875,"y":4.666666666666667},
|
||||
{"type":"flowers-4","x":122.0625,"y":28.416666666666668},
|
||||
{"type":"flowers-6","x":121.5,"y":30.958333333333332},
|
||||
{"type":"flowers-6","x":122.28125,"y":41.625},
|
||||
{"type":"flowers-6","x":101.90625,"y":47.166666666666664},
|
||||
{"type":"flowers-3","x":50.65625,"y":39.416666666666664},
|
||||
{"type":"flowers-4","x":48.46875,"y":38},
|
||||
{"type":"flowers-6","x":48.75,"y":41.458333333333336},
|
||||
{"type":"flowers-6","x":32.625,"y":46.125},
|
||||
{"type":"flowers-6","x":14.9375,"y":55.041666666666664},
|
||||
{"type":"flowers-7","x":14.25,"y":56.75},
|
||||
{"type":"flowers-1","x":81.53125,"y":17.708333333333332},
|
||||
{"type":"flowers-1","x":72.4375,"y":12.458333333333334},
|
||||
{"type":"flowers-2","x":80.375,"y":13.25},
|
||||
{"type":"flowers-3","x":74.0625,"y":21},
|
||||
{"type":"flowers-3","x":75.25,"y":5.791666666666667},
|
||||
{"type":"flowers-3","x":85.28125,"y":10.25},
|
||||
{"type":"flowers-4","x":80.25,"y":4.958333333333333},
|
||||
{"type":"flowers-4","x":77.375,"y":18.166666666666668},
|
||||
{"type":"flowers-4","x":64.21875,"y":5.625},
|
||||
{"type":"flowers-5","x":73.6875,"y":19.25},
|
||||
{"type":"flowers-5","x":90.21875,"y":11.25},
|
||||
{"type":"flowers-5","x":77.3125,"y":3.6666666666666665},
|
||||
{"type":"flowers-5","x":64.875,"y":12.25},
|
||||
{"type":"flowers-6","x":70.3125,"y":12.916666666666666},
|
||||
{"type":"flowers-6","x":85.75,"y":9},
|
||||
{"type":"flowers-6","x":82.90625,"y":3.75},
|
||||
{"type":"flowers-6","x":61.375,"y":5.708333333333333},
|
||||
{"type":"flowers-7","x":73.625,"y":3.9583333333333335},
|
||||
{"type":"flowers-7","x":74.5,"y":18.375},
|
||||
{"type":"flowers-7","x":67.1875,"y":11.166666666666666},
|
||||
{"type":"clovers-4","x":43.9375,"y":116.79166666666667},
|
||||
{"type":"clovers-4","x":51,"y":116.25},
|
||||
{"type":"clovers-4","x":60.46875,"y":117.91666666666667},
|
||||
{"type":"clovers-4","x":58.15625,"y":109},
|
||||
{"type":"clovers-3","x":60.65625,"y":116.16666666666667},
|
||||
{"type":"clovers-3","x":57.125,"y":117.5},
|
||||
{"type":"clovers-3","x":58.03125,"y":110.45833333333333},
|
||||
{"type":"clovers-5","x":48.875,"y":113.54166666666667},
|
||||
{"type":"clovers-5","x":64.375,"y":113.75},
|
||||
{"type":"clovers-5","x":41.96875,"y":105.5},
|
||||
{"type":"clovers-4","x":52.96875,"y":103.70833333333333},
|
||||
{"type":"clovers-3","x":79.1875,"y":115.25},
|
||||
{"type":"clovers-3","x":89.03125,"y":117.04166666666667},
|
||||
{"type":"clovers-4","x":83.25,"y":110.66666666666667},
|
||||
{"type":"clovers-5","x":82.5,"y":113.5},
|
||||
{"type":"clovers-6","x":85.8125,"y":117.91666666666667},
|
||||
{"type":"clovers-3","x":103.375,"y":108.16666666666667},
|
||||
{"type":"clovers-3","x":110.03125,"y":117.375},
|
||||
{"type":"clovers-5","x":113.75,"y":117.91666666666667},
|
||||
{"type":"clovers-5","x":105.90625,"y":107},
|
||||
{"type":"clovers-5","x":104.46875,"y":109.75},
|
||||
{"type":"clovers-4","x":117.46875,"y":97.16666666666667},
|
||||
{"type":"clovers-6","x":89.6875,"y":83.45833333333333},
|
||||
{"type":"clovers-6","x":108.5,"y":73.875},
|
||||
{"type":"clovers-3","x":99,"y":64.79166666666667},
|
||||
{"type":"clovers-5","x":97.75,"y":66.625},
|
||||
{"type":"clovers-5","x":90.375,"y":69.25},
|
||||
{"type":"clovers-6","x":88.78125,"y":65.20833333333333},
|
||||
{"type":"clovers-6","x":80.5625,"y":53.416666666666664},
|
||||
{"type":"clovers-6","x":115,"y":45.541666666666664},
|
||||
{"type":"clovers-7","x":84.65625,"y":55.25},
|
||||
{"type":"clovers-7","x":116.15625,"y":45.75},
|
||||
{"type":"clovers-5","x":81.71875,"y":54.25},
|
||||
{"type":"clovers-5","x":43.5,"y":75.79166666666667},
|
||||
{"type":"clovers-7","x":46.375,"y":76.625},
|
||||
{"type":"clovers-3","x":69.96875,"y":48.541666666666664},
|
||||
{"type":"clovers-3","x":73.09375,"y":43.5},
|
||||
{"type":"clovers-5","x":67.25,"y":48.291666666666664},
|
||||
{"type":"clovers-5","x":74.25,"y":45.166666666666664},
|
||||
{"type":"clovers-6","x":69.9375,"y":47.375},
|
||||
{"type":"clovers-7","x":89.34375,"y":63.625},
|
||||
{"type":"clover-1","x":72,"y":70},
|
||||
{"type":"clovers-4","x":55.375,"y":148.375},
|
||||
{"type":"clovers-4","x":42.90625,"y":141.79166666666666},
|
||||
{"type":"clovers-5","x":64.65625,"y":145.75},
|
||||
{"type":"clovers-5","x":48.75,"y":131},
|
||||
{"type":"clovers-6","x":46.3125,"y":131.95833333333334},
|
||||
{"type":"clovers-6","x":91.15625,"y":146.79166666666666},
|
||||
{"type":"clovers-4","x":103.40625,"y":137.29166666666666},
|
||||
{"type":"clovers-6","x":134.21875,"y":149.04166666666666},
|
||||
{"type":"clovers-6","x":133.75,"y":135.75},
|
||||
{"type":"clovers-3","x":151.75,"y":128.375},
|
||||
{"type":"clovers-4","x":156.8125,"y":109.625},
|
||||
{"type":"clovers-4","x":123.1875,"y":108.5},
|
||||
{"type":"clovers-3","x":152.0625,"y":91.625},
|
||||
{"type":"clovers-3","x":126.9375,"y":97},
|
||||
{"type":"clovers-7","x":149.21875,"y":81.125},
|
||||
{"type":"clovers-6","x":157.3125,"y":74}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
{
|
||||
"entities": [
|
||||
{"type":"snowpony-1","x":44,"y":57.5},
|
||||
{"type":"snowpony-1","x":65,"y":64.5},
|
||||
{"type":"snowpony-2","x":68,"y":65.5},
|
||||
{"type":"snowpony-2","x":84,"y":56.5},
|
||||
{"type":"snowpony-1","x":67,"y":82.5},
|
||||
{"type":"snowpony-2","x":59,"y":87.5},
|
||||
{"type":"snowpony-3","x":85.1875,"y":153.16666666666666},
|
||||
{"type":"snowpony-6","x":86.15625,"y":153.5},
|
||||
{"type":"snowpony-4","x":86.0625,"y":123.29166666666667},
|
||||
{"type":"snowpony-5","x":115.0625,"y":109.625},
|
||||
{"type":"snowpony-3","x":108.28125,"y":128.75},
|
||||
{"type":"snowpony-7","x":88.4375,"y":105.20833333333333},
|
||||
{"type":"snowpony-9","x":106.5,"y":86.625},
|
||||
{"type":"snowpony-8","x":107.28125,"y":87.16666666666667},
|
||||
{"type":"snowpony-5","x":87.875,"y":92.79166666666667},
|
||||
{"type":"snowpony-1","x":107.5,"y":59.291666666666664},
|
||||
{"type":"snowpony-1","x":85.0625,"y":57.416666666666664},
|
||||
{"type":"snowpony-6","x":83.375,"y":57.75},
|
||||
{"type":"snowpony-7","x":66,"y":83.625},
|
||||
{"type":"snowpony-1","x":51.6875,"y":102.875},
|
||||
{"type":"snowpony-1","x":69.40625,"y":113},
|
||||
{"type":"snowpony-4","x":67.8125,"y":111.66666666666667},
|
||||
{"type":"snowpony-9","x":53.6875,"y":133.79166666666666},
|
||||
{"type":"snowpony-6","x":59.75,"y":120.25},
|
||||
{"type":"snowpony-2","x":65,"y":156.95833333333334},
|
||||
{"type":"snowpony-3","x":49.125,"y":148.875},
|
||||
{"type":"snowpony-3","x":119.1875,"y":150.45833333333334},
|
||||
{"type":"snowpony-7","x":136.03125,"y":156.5},
|
||||
{"type":"snowpony-5","x":141.21875,"y":131.41666666666666},
|
||||
{"type":"snowpony-2","x":116.03125,"y":137.04166666666666},
|
||||
{"type":"snowpony-4","x":147.5,"y":101.5},
|
||||
{"type":"snowpony-3","x":138.90625,"y":98.41666666666667},
|
||||
{"type":"snowpony-2","x":125.5,"y":89.25},
|
||||
{"type":"snowpony-7","x":137.125,"y":68},
|
||||
{"type":"snowpony-2","x":115.125,"y":66.375},
|
||||
{"type":"snowpony-2","x":135.5,"y":44.791666666666664},
|
||||
{"type":"snowpony-5","x":153.3125,"y":51.5},
|
||||
{"type":"snowpony-3","x":156.75,"y":60.541666666666664},
|
||||
{"type":"snowpony-8","x":116.875,"y":47.25},
|
||||
{"type":"snowpony-3","x":123.53125,"y":54.166666666666664},
|
||||
{"type":"snowpony-4","x":100.53125,"y":45.25},
|
||||
{"type":"snowpony-3","x":156.28125,"y":125.375},
|
||||
{"type":"snowpony-6","x":149.5,"y":150.5},
|
||||
{"type":"snowpony-8","x":54.40625,"y":133.29166666666666},
|
||||
{"type":"snowpony-1","x":29.6875,"y":68.125},
|
||||
{"type":"snowpony-2","x":26.71875,"y":44.916666666666664},
|
||||
{"type":"snowpony-3","x":23.21875,"y":26.5},
|
||||
{"type":"snowpony-4","x":20.96875,"y":27.708333333333332},
|
||||
{"type":"snowpony-5","x":12.96875,"y":15.208333333333334},
|
||||
{"type":"snowpony-6","x":37.78125,"y":28.708333333333332},
|
||||
{"type":"snowpony-7","x":50.375,"y":4.5},
|
||||
{"type":"snowpony-8","x":81.75,"y":18.5},
|
||||
{"type":"snowpony-1","x":80,"y":20},
|
||||
{"type":"snowpony-2","x":84.25,"y":3.5416666666666665},
|
||||
{"type":"snowpony-3","x":97.1875,"y":21.75},
|
||||
{"type":"snowpony-4","x":86.46875,"y":38.916666666666664},
|
||||
{"type":"snowpony-5","x":122.46875,"y":27.916666666666668},
|
||||
{"type":"snowpony-6","x":133.4375,"y":8},
|
||||
{"type":"snowpony-7","x":130.28125,"y":9.5},
|
||||
{"type":"snowpony-8","x":143.40625,"y":19.916666666666668},
|
||||
{"type":"snowpony-1","x":20.625,"y":78.625},
|
||||
{"type":"snowpony-2","x":25.25,"y":91.125},
|
||||
{"type":"snowpony-3","x":27.53125,"y":102.54166666666667},
|
||||
{"type":"snowpony-4","x":22.1875,"y":110.29166666666667},
|
||||
{"type":"snowpony-5","x":5.71875,"y":113.91666666666667},
|
||||
{"type":"snowpony-6","x":2.1875,"y":117.25},
|
||||
{"type":"snowpony-7","x":13.75,"y":139.20833333333334},
|
||||
{"type":"snowpony-8","x":3.5,"y":151.125},
|
||||
{"type":"snowpony-1","x":35.0625,"y":152.125},
|
||||
{"type":"snowpony-2","x":37.75,"y":124.25},
|
||||
{"type":"snowpile-big","x":67.03125,"y":78.45833333333333},
|
||||
{"type":"snowpile-medium","x":65.25,"y":77.20833333333333},
|
||||
{"type":"snowpile-small","x":61.125,"y":70.04166666666667},
|
||||
{"type":"snowpile-small","x":68.4375,"y":71.25},
|
||||
{"type":"snowpile-big","x":74.8125,"y":94.54166666666667},
|
||||
{"type":"snowpile-small","x":76.53125,"y":95.5},
|
||||
{"type":"snowpile-big","x":52.96875,"y":60},
|
||||
{"type":"snowpile-big","x":80.625,"y":54.25},
|
||||
{"type":"snowpile-small","x":82.9375,"y":65},
|
||||
{"type":"snowpile-big","x":117.1875,"y":80.375},
|
||||
{"type":"snowpile-small","x":122.1875,"y":83.375},
|
||||
{"type":"snowpile-small","x":135.78125,"y":66.54166666666667},
|
||||
{"type":"snowpile-big","x":150.25,"y":99.41666666666667},
|
||||
{"type":"snowpile-medium","x":143.5,"y":106.66666666666667},
|
||||
{"type":"snowpile-small","x":148.25,"y":98.875},
|
||||
{"type":"snowpile-medium","x":115.75,"y":98},
|
||||
{"type":"snowpile-medium","x":139.78125,"y":85.25},
|
||||
{"type":"snowpile-medium","x":137.5,"y":98.75},
|
||||
{"type":"snowpile-medium","x":115.5,"y":45.75},
|
||||
{"type":"snowpile-big","x":151.875,"y":138.75},
|
||||
{"type":"snowpile-small","x":150.0625,"y":138},
|
||||
{"type":"snowpile-small","x":140.25,"y":144.5},
|
||||
{"type":"snowpile-small","x":102.53125,"y":147.125},
|
||||
{"type":"snowpile-big","x":92.75,"y":139.75},
|
||||
{"type":"snowpile-big","x":74.3125,"y":157.375},
|
||||
{"type":"snowpile-small","x":73.1875,"y":155.95833333333334},
|
||||
{"type":"snowpile-small","x":87.0625,"y":147.625},
|
||||
{"type":"snowpile-big","x":69.5625,"y":134.5},
|
||||
{"type":"snowpile-medium","x":84.65625,"y":130.25},
|
||||
{"type":"snowpile-medium","x":77.40625,"y":121.375},
|
||||
{"type":"snowpile-small","x":79.125,"y":120.75},
|
||||
{"type":"snowpile-small","x":77.3125,"y":133.79166666666666},
|
||||
{"type":"snowpile-big","x":72.8125,"y":106.29166666666667},
|
||||
{"type":"snowpile-medium","x":63.40625,"y":121.625},
|
||||
{"type":"snowpile-small","x":64.90625,"y":122.25},
|
||||
{"type":"snowpile-tiny","x":71.03125,"y":70},
|
||||
{"type":"snowpile-tiny","x":64.25,"y":77.875},
|
||||
{"type":"snowpile-tiny","x":44.40625,"y":76.16666666666667},
|
||||
{"type":"snowpile-tiny","x":51.25,"y":69},
|
||||
{"type":"snowpile-tiny","x":74.53125,"y":83.75},
|
||||
{"type":"snowpile-tinier","x":64.71875,"y":78.25},
|
||||
{"type":"snowpile-tinier","x":67.28125,"y":71},
|
||||
{"type":"snowpile-tinier","x":60.53125,"y":69.20833333333333},
|
||||
{"type":"snowpile-tinier","x":51.4375,"y":59.541666666666664},
|
||||
{"type":"snowpile-tinier","x":74.1875,"y":84.25},
|
||||
{"type":"snowpile-tiny","x":49.75,"y":87.5},
|
||||
{"type":"snowpile-tiny","x":77.28125,"y":100.79166666666667},
|
||||
{"type":"snowpile-tiny","x":75.78125,"y":118.25},
|
||||
{"type":"snowpile-tiny","x":74.25,"y":106.79166666666667},
|
||||
{"type":"snowpile-tinier","x":76.21875,"y":118.54166666666667},
|
||||
{"type":"snowpile-tinier","x":73.75,"y":107},
|
||||
{"type":"snowpile-tinier","x":75.625,"y":95.91666666666667},
|
||||
{"type":"snowpile-tiny","x":62.25,"y":121.95833333333333},
|
||||
{"type":"snowpile-tinier","x":62.90625,"y":122.41666666666667},
|
||||
{"type":"snowpile-tinier","x":86.1875,"y":147.25},
|
||||
{"type":"snowpile-tinier","x":78.5,"y":121.5},
|
||||
{"type":"snowpile-tiny","x":85.6875,"y":130.5},
|
||||
{"type":"snowpile-tiny","x":72.4375,"y":156.25},
|
||||
{"type":"snowpile-tiny","x":101.75,"y":146.25},
|
||||
{"type":"snowpile-tiny","x":112.3125,"y":152.41666666666666},
|
||||
{"type":"snowpile-tiny","x":93.25,"y":110.66666666666667},
|
||||
{"type":"snowpile-tiny","x":103.25,"y":122.70833333333333},
|
||||
{"type":"snowpile-tinier","x":103.75,"y":122.95833333333333},
|
||||
{"type":"snowpile-tinier","x":93.71875,"y":111},
|
||||
{"type":"snowpile-tiny","x":116.78125,"y":97.125},
|
||||
{"type":"snowpile-tiny","x":110.25,"y":91.75},
|
||||
{"type":"snowpile-tiny","x":115.75,"y":80.95833333333333},
|
||||
{"type":"snowpile-tinier","x":116.15625,"y":81.29166666666667},
|
||||
{"type":"snowpile-tinier","x":123,"y":83.41666666666667},
|
||||
{"type":"snowpile-tinier","x":116.65625,"y":45.958333333333336},
|
||||
{"type":"snowpile-tinier","x":140.8125,"y":85.29166666666667},
|
||||
{"type":"snowpile-tiny","x":138.75,"y":98.95833333333333},
|
||||
{"type":"snowpile-tinier","x":139.0625,"y":98.75},
|
||||
{"type":"snowpile-tiny","x":148.46875,"y":99.29166666666667},
|
||||
{"type":"snowpile-tinier","x":147.3125,"y":98.54166666666667},
|
||||
{"type":"snowpile-tinier","x":144.65625,"y":106.75},
|
||||
{"type":"snowpile-tiny","x":149.125,"y":138.5},
|
||||
{"type":"snowpile-tiny","x":141.0625,"y":144.625},
|
||||
{"type":"snowpile-tinier","x":149.625,"y":138.875},
|
||||
{"type":"snowpile-tinier","x":140.625,"y":145},
|
||||
{"type":"snowpile-tiny","x":85.875,"y":147.66666666666666},
|
||||
{"type":"snowpile-tiny","x":94.3125,"y":139.95833333333334},
|
||||
{"type":"snowpile-tinier","x":82.875,"y":56.875},
|
||||
{"type":"snowpile-tiny","x":85.8125,"y":56.5},
|
||||
{"type":"snowpile-tinier","x":85.28125,"y":57.125},
|
||||
{"type":"snowpile-tiny","x":66.90625,"y":82.75},
|
||||
{"type":"snowpile-tinier","x":66.46875,"y":83.20833333333333},
|
||||
{"type":"snowpile-tinier","x":65.375,"y":82.91666666666667},
|
||||
{"type":"snowpile-tinier","x":68.75,"y":112.16666666666667},
|
||||
{"type":"snowpile-tinier","x":54.125,"y":133.375},
|
||||
{"type":"snowpile-tinier","x":84.4375,"y":152.41666666666666},
|
||||
{"type":"snowpile-tiny","x":85.40625,"y":152.95833333333334},
|
||||
{"type":"snowpile-tiny","x":86.53125,"y":152},
|
||||
{"type":"snowpile-tinier","x":86.96875,"y":152.375},
|
||||
{"type":"snowpile-tinier","x":105.8125,"y":85.95833333333333},
|
||||
{"type":"snowpile-tiny","x":106.5,"y":86.25},
|
||||
{"type":"snowpile-tinier","x":107.90625,"y":86.41666666666667},
|
||||
{"type":"snowpile-tinier","x":155.65625,"y":61.166666666666664},
|
||||
{"type":"snowpile-tiny","x":157.46875,"y":60.416666666666664},
|
||||
{"type":"snowpile-tinier","x":157.71875,"y":60.208333333333336},
|
||||
{"type":"snowpile-tinier","x":116.21875,"y":46.416666666666664},
|
||||
{"type":"snowpile-big","x":94.25,"y":68.25},
|
||||
{"type":"snowpile-medium","x":73.53125,"y":43.416666666666664},
|
||||
{"type":"snowpile-medium","x":52.75,"y":38.458333333333336},
|
||||
{"type":"snowpile-small","x":52,"y":39.875},
|
||||
{"type":"snowpile-big","x":43.71875,"y":30.125},
|
||||
{"type":"snowpile-small","x":54.21875,"y":17.125},
|
||||
{"type":"snowpile-tiny","x":48.6875,"y":30.375},
|
||||
{"type":"snowpile-tiny","x":53.21875,"y":39.458333333333336},
|
||||
{"type":"snowpile-tiny","x":60.1875,"y":34.75},
|
||||
{"type":"snowpile-small","x":79.25,"y":37.208333333333336},
|
||||
{"type":"snowpile-small","x":84.1875,"y":22.208333333333332},
|
||||
{"type":"snowpile-big","x":99.3125,"y":21.25},
|
||||
{"type":"snowpile-tiny","x":97.875,"y":22.25},
|
||||
{"type":"snowpile-small","x":106.9375,"y":42.125},
|
||||
{"type":"snowpile-medium","x":120.375,"y":26.75},
|
||||
{"type":"snowpile-small","x":121,"y":28},
|
||||
{"type":"snowpile-medium","x":145.53125,"y":20.166666666666668},
|
||||
{"type":"snowpile-big","x":144.40625,"y":21.25},
|
||||
{"type":"snowpile-big","x":134.90625,"y":4.458333333333333},
|
||||
{"type":"snowpile-small","x":120.53125,"y":7.875},
|
||||
{"type":"snowpile-small","x":155.875,"y":55.208333333333336},
|
||||
{"type":"snowpile-small","x":148.25,"y":114.375},
|
||||
{"type":"snowpile-small","x":138.8125,"y":154.5},
|
||||
{"type":"snowpile-medium","x":139.875,"y":153.125},
|
||||
{"type":"snowpile-medium","x":60.375,"y":150.25},
|
||||
{"type":"snowpile-big","x":36.40625,"y":149.29166666666666},
|
||||
{"type":"snowpile-medium","x":37.28125,"y":150.625},
|
||||
{"type":"snowpile-medium","x":16.25,"y":138.875},
|
||||
{"type":"snowpile-small","x":15.28125,"y":139.79166666666666},
|
||||
{"type":"snowpile-small","x":2.625,"y":149.375},
|
||||
{"type":"snowpile-medium","x":4.1875,"y":113.95833333333333},
|
||||
{"type":"snowpile-small","x":4.96875,"y":115.04166666666667},
|
||||
{"type":"snowpile-small","x":29.3125,"y":102.79166666666667},
|
||||
{"type":"snowpile-medium","x":25.65625,"y":89},
|
||||
{"type":"snowpile-small","x":26.90625,"y":89.875},
|
||||
{"type":"snowpile-small","x":32.90625,"y":69.375},
|
||||
{"type":"snowpile-small","x":21.125,"y":76.45833333333333},
|
||||
{"type":"snowpile-medium","x":15.78125,"y":53.458333333333336},
|
||||
{"type":"snowpile-medium","x":25.9375,"y":27.25},
|
||||
{"type":"snowpile-small","x":24.21875,"y":28.5},
|
||||
{"type":"snowpile-big","x":13.5,"y":17.125},
|
||||
{"type":"snowpile-small","x":12.3125,"y":16.375},
|
||||
{"type":"snowpile-small","x":22.5625,"y":5.458333333333333},
|
||||
{"type":"snowpile-medium","x":52.375,"y":3.9583333333333335},
|
||||
{"type":"snowpile-tiny","x":51.125,"y":4.708333333333333},
|
||||
{"type":"snowpile-tinier","x":50.9375,"y":13.291666666666666},
|
||||
{"type":"snowpile-small","x":89.21875,"y":2.7083333333333335}
|
||||
],
|
||||
"lockedTiles": [248,2,371,2,408,2,531,2,563,2,614,2,662,2,689,4,773,3,822,2,933,3,1080,2,1240,2,1412,2,1569,2,2411,3,2571,4,2732,3,2774,1,2892,3,2961,2,3182,2,3185,2,3279,2,3298,2,3343,4,3443,2,3456,5,3502,5,3603,2,3617,4,3663,3,4119,2,4182,2,4185,2,4279,2,4340,2,4343,4,4439,4,4503,4,4517,2,4600,2,4683,2,4842,3,4848,2,5002,3,5499,2,5838,2,5972,2,5998,2,6131,3,6165,2,6291,3,6666,2,6793,2,6826,2,6952,3,7066,2,7113,2,7155,2,7175,2,7300,2,7314,4,7475,2,7636,2,8312,2,8560,2,8655,2,8719,3,8763,2,8795,2,8879,3,8955,2,9042,5,9163,2,9202,4,9490,4,9547,2,9651,3,9756,3,9811,3,9915,2,10304,2,10322,2,10467,2,10482,2,10535,2,10674,2,10695,2,10813,2,10909,2,10912,2,10972,4,11016,2,11072,2,11090,2,11100,2,11133,3,11260,2,11267,2,11270,2,11426,3,12020,2,12180,2,12203,2,12224,2,12383,5,12500,2,12544,5,12706,3,12756,2,12915,4,13075,4,13184,4,13241,2,13345,2,13354,2,13401,3,13513,2,13579,2,13705,2,13738,4,13866,3,13899,2,13969,2,13978,2,14026,2,14105,3,14264,4,14365,2,14425,2,14584,2,14669,2,14807,2,14954,2,15113,5,15273,5,15635,3,15657,2,15667,2,15794,3,15816,4,15826,5,15955,2,15977,2,15987,5,16076,2,16149,3,16188,2,16307,2,16347,3,16371,2,16872,2,16887,2,16943,2,17031,4,17102,4,17191,4,17263,2,17554,2,17621,2,17692,2,17827,2,17853,2,17923,2,17988,2,18083,4,18148,2,18227,2,18243,3,18387,2,18404,2,18721,2,18955,2,19118,2,19259,2,19262,2,19276,4,19421,5,19436,4,19582,4,19596,2,19622,3,19765,2,19877,2,20155,2,20587,2,20724,2,20883,4,21044,2,21100,2,21196,2,21333,2,21349,2,21356,2,21508,3,21668,3,21935,2,22035,2,22069,4,22094,3,22172,2,22228,5,22253,4,22331,4,22390,3,22491,3,23019,2,23179,3,23340,2,23446,2,23461,3,23605,3,23622,2,23682,2,23715,2,23728,2,23842,2,23874,4,23899,2,24035,3,24059,2,24118,2,24149,2,24163,2,24196,2,24219,2,24354,2,24403,5,24431,2,24459,2,24564,3,24618,3,24712,2,24778,3,24872,2,25024,2,25031,4,25095,2,25192,4,25353,3]
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
findEntities, updateMapState, loadMapFromFile, saveMapToFile, saveEntitiesToFile, getSizeOfMap,
|
||||
saveMapToFileBinaryAlt, saveRegionCollider, saveMap, loadMap
|
||||
} from './serverMap';
|
||||
import { saveMapFiles } from './mapFiles';
|
||||
import { PARTY_LIMIT, tileWidth, tileHeight, MAP_LOAD_SAVE_TIMEOUT } from '../common/constants';
|
||||
import { PartyService } from './services/party';
|
||||
import { swapCharacter } from './characterUtils';
|
||||
@@ -467,10 +468,20 @@ export function createCommands(world: World): Command[] {
|
||||
execWithFileName(client, message, fileName =>
|
||||
loadMapFromFile(world, client.map, pathTo('store', `${fileName}.json`), { loadOnlyTiles: true }));
|
||||
}),
|
||||
command(['savemap'], '/savemap <file name> - save map to file', 'superadmin', (_, client, message) => {
|
||||
command(['savemap'], '/savemap <file name> - save map with entities to file', 'superadmin', (_, client, message) => {
|
||||
execWithFileName(client, message, async fileName => {
|
||||
const { saved, warnings } = saveMapFiles(client.map, pathTo('store'), fileName);
|
||||
|
||||
for (const warning of warnings) {
|
||||
logger.warn(warning);
|
||||
}
|
||||
|
||||
return `saved ${saved.join(', ')}${warnings.length ? ` (${warnings.length} warnings, see log)` : ''}`;
|
||||
});
|
||||
}),
|
||||
command(['savetiles'], '/savetiles <file name> - save map tiles to file', 'superadmin', (_, client, message) => {
|
||||
execWithFileName(client, message, async fileName => {
|
||||
await saveMapToFile(client.map, pathTo('store', `${fileName}.json`), { saveTiles: true });
|
||||
// await saveMapToFileBinary(client.map, pathTo('store', `${fileName}.bin`));
|
||||
});
|
||||
}),
|
||||
command(['savemapbin'], '/savemapbin <file name> - save map to file', 'superadmin', (_, client, message) => {
|
||||
|
||||
@@ -1,34 +1,11 @@
|
||||
import { sample } from 'lodash';
|
||||
import { ServerEntity, IClient, ServerMap, Interact } from './serverInterfaces';
|
||||
import { unholdItem, holdItem } from './playerUtils';
|
||||
import { sayTo } from './chat';
|
||||
import { MessageType, CreateEntityMethod, EntityState, setAnimationToEntityState } from '../common/interfaces';
|
||||
import { World } from './world';
|
||||
import { ServerEntity, Interact } from './serverInterfaces';
|
||||
import { give, boopLight, say } from './mapBehaviors';
|
||||
import { EntityState, setAnimationToEntityState } from '../common/interfaces';
|
||||
import * as entities from '../common/entities';
|
||||
import { setEntityName, updateEntityState } from './entityUtils';
|
||||
import { hasFlag, repeat } from '../common/utils';
|
||||
import { hasFlag } from '../common/utils';
|
||||
|
||||
export function give(type: number, message?: string) {
|
||||
return (e: ServerEntity, client: IClient) => {
|
||||
if (client.pony.options && client.pony.options.hold === type) {
|
||||
unholdItem(client.pony);
|
||||
}
|
||||
else {
|
||||
if (message) {
|
||||
sayTo(client, e, message, MessageType.Announcement);
|
||||
}
|
||||
|
||||
holdItem(client.pony, type);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function createBoxOfLanterns(x: number, y: number) {
|
||||
const boxOfLanterns = entities.boxLanterns(x, y) as ServerEntity;
|
||||
boxOfLanterns.interact = give(entities.lanternOn.type);
|
||||
setEntityName(boxOfLanterns, 'Box of lanterns');
|
||||
return boxOfLanterns;
|
||||
}
|
||||
export { give, boopLight };
|
||||
|
||||
export function createSign(x: number, y: number, name: string, interact: Interact, create = entities.sign) {
|
||||
const entity = create(x, y) as ServerEntity;
|
||||
@@ -38,24 +15,7 @@ export function createSign(x: number, y: number, name: string, interact: Interac
|
||||
}
|
||||
|
||||
export function createSignWithText(x: number, y: number, name: string, text: string, create = entities.sign) {
|
||||
return createSign(x, y, name, (entity, client) => sayTo(client, entity, text, MessageType.System), create);
|
||||
}
|
||||
|
||||
export function boopLight(this: ServerEntity) {
|
||||
setTimeout(() => {
|
||||
if (hasFlag(this.state, EntityState.On)) {
|
||||
turnOff(this);
|
||||
this.lightDelay = Date.now() + 3000;
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
export function createAddLight(world: World, map: ServerMap, createEntity: CreateEntityMethod) {
|
||||
return (x: number, y: number) => {
|
||||
const entity = world.addEntity(createEntity(x, y), map);
|
||||
entity.boop = boopLight;
|
||||
return entity;
|
||||
};
|
||||
return createSign(x, y, name, say(text), create);
|
||||
}
|
||||
|
||||
export function turnOff(entity: ServerEntity) {
|
||||
@@ -80,63 +40,3 @@ export function updateLights(entities: ServerEntity[], on: boolean) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function createFenceMaker(
|
||||
world: World, map: ServerMap,
|
||||
size: number, poles: CreateEntityMethod[], beamsH: CreateEntityMethod[], beamsV: CreateEntityMethod[]
|
||||
) {
|
||||
const add = (entity: ServerEntity) => world.addEntity(entity, map);
|
||||
|
||||
return (x: number, y: number, length: number, horizontal = true, skipStart = false, skipEnd = false) => {
|
||||
const dx = horizontal ? size : 0;
|
||||
const dy = horizontal ? 0 : size;
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
if (i || !skipStart) {
|
||||
add(sample(poles)!(x + dx * i, y + dy * i));
|
||||
}
|
||||
|
||||
if (horizontal) {
|
||||
add(sample(beamsH)!(x + dx * i + (size / 2), y));
|
||||
}
|
||||
else {
|
||||
add(sample(beamsV)!(x, y + dy * i));
|
||||
}
|
||||
}
|
||||
|
||||
if (!skipEnd) {
|
||||
add(sample(poles)!(x + dx * length, y + dy * length));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function createWoodenFenceMaker(world: World, map: ServerMap) {
|
||||
return createFenceMaker(world, map, 1, [
|
||||
...repeat(2, entities.woodenFencePole1),
|
||||
...repeat(2, entities.woodenFencePole2),
|
||||
...repeat(2, entities.woodenFencePole3),
|
||||
...repeat(2, entities.woodenFencePole4),
|
||||
entities.woodenFencePole5,
|
||||
], [
|
||||
...repeat(5, entities.woodenFenceBeamH1),
|
||||
...repeat(5, entities.woodenFenceBeamH2),
|
||||
...repeat(5, entities.woodenFenceBeamH3),
|
||||
entities.woodenFenceBeamH4,
|
||||
entities.woodenFenceBeamH5,
|
||||
entities.woodenFenceBeamH6,
|
||||
], [
|
||||
entities.woodenFenceBeamV1,
|
||||
entities.woodenFenceBeamV2,
|
||||
entities.woodenFenceBeamV3,
|
||||
]);
|
||||
}
|
||||
|
||||
export function createStoneWallFenceMaker(world: World, map: ServerMap) {
|
||||
return createFenceMaker(world, map, 2, [
|
||||
entities.stoneWallPole1,
|
||||
], [
|
||||
entities.stoneWallBeamH1,
|
||||
], [
|
||||
entities.stoneWallBeamV1,
|
||||
]);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { tileWidth } from '../../common/constants';
|
||||
import { Entity } from '../../common/interfaces';
|
||||
import { Entity, ServerFlags } from '../../common/interfaces';
|
||||
import { entitiesIntersect } from '../../common/utils';
|
||||
import { cloud } from '../../common/entities';
|
||||
import * as sprites from '../../generated/sprites';
|
||||
@@ -47,6 +47,7 @@ export class CloudController implements Controller {
|
||||
const x = end ? this.map.width + spriteWidth : this.map.width * Math.random();
|
||||
const y = this.map.height * Math.random();
|
||||
const entity = cloud(x, y) as ServerEntity;
|
||||
entity.serverFlags = (entity.serverFlags || 0) | ServerFlags.DoNotSave;
|
||||
|
||||
if (!this.clouds.some(c => entitiesIntersect(c, entity))) {
|
||||
this.clouds.push(this.world.addEntity(entity, this.map));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { remove, sample } from 'lodash';
|
||||
import { Entity, CreateEntityMethod } from '../../common/interfaces';
|
||||
import { Entity, CreateEntityMethod, ServerFlags } from '../../common/interfaces';
|
||||
import { IClient, Controller, ServerEntity, ServerMap } from '../serverInterfaces';
|
||||
import { World } from '../world';
|
||||
import { timingEnd, timingStart } from '../timing';
|
||||
@@ -54,6 +54,7 @@ export class CollectableController implements Controller {
|
||||
x > 0 && y > 0 && x < map.width && y < map.height && canPlaceItem(map, entity) && !canBePickedByPlayer(map, entity)
|
||||
) {
|
||||
entity.interact = this.interact;
|
||||
entity.serverFlags = (entity.serverFlags || 0) | ServerFlags.DoNotSave;
|
||||
this.items.push(world.addEntity(entity, map));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,9 @@ export class FlyingCritterController implements Controller {
|
||||
if (this.spawnOnStart) {
|
||||
for (let i = 0; i < this.limit; i++) {
|
||||
const { x, y } = randomPosition(this.map);
|
||||
this.entities.push(this.world.addEntity(this.critter(x, y), this.map));
|
||||
const entity = this.critter(x, y) as ServerEntity;
|
||||
entity.serverFlags = (entity.serverFlags || 0) | ServerFlags.DoNotSave;
|
||||
this.entities.push(this.world.addEntity(entity, this.map));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,7 +62,8 @@ export function updateTreehidingEntities(
|
||||
const tree = sample(trees);
|
||||
|
||||
if (tree) {
|
||||
const entity = create(tree.x, tree.y + offsetY);
|
||||
const entity = create(tree.x, tree.y + offsetY) as ServerEntity;
|
||||
entity.serverFlags = (entity.serverFlags || 0) | ServerFlags.DoNotSave;
|
||||
entities.push(world.addEntity(entity, map));
|
||||
moveRandomly(map, entity, speed, 1, timestamp);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,471 @@
|
||||
import { random, sample } from 'lodash';
|
||||
import { ServerEntity, ServerMap, IClient, Interact, MapUsage } from './serverInterfaces';
|
||||
import { MessageType, EntityState } from '../common/interfaces';
|
||||
import * as entities from '../common/entities';
|
||||
import { getEntityType, getEntityTypeName, BunnyAnimation, GhostAnimation, CatAnimation } from '../common/entities';
|
||||
import { sayTo, saySystem, sayToAll } from './chat';
|
||||
import { holdItem, unholdItem, isGift, getNextToyOrExtra } from './playerUtils';
|
||||
import { updateEntityOptions, updateEntityVelocity, setEntityAnimation, updateEntityState } from './entityUtils';
|
||||
import { updateAccountState } from './accountUtils';
|
||||
import { toInt, hasFlag } from '../common/utils';
|
||||
import { World, goToMap } from './world';
|
||||
|
||||
export interface BehaviorDef {
|
||||
action: string;
|
||||
args?: any;
|
||||
}
|
||||
|
||||
export type BehaviorKind = 'interact' | 'trigger' | 'boop' | 'update';
|
||||
|
||||
export const behaviorKinds: BehaviorKind[] = ['interact', 'trigger', 'boop', 'update'];
|
||||
|
||||
export interface BehaviorContext {
|
||||
world: World;
|
||||
map: ServerMap;
|
||||
getTagged(tag: string): ServerEntity | undefined;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
type BehaviorCallback = (...args: any[]) => any;
|
||||
type Boop = (this: ServerEntity, client: IClient) => void;
|
||||
type ServerUpdate = (delta: number, now: number) => void;
|
||||
|
||||
type InteractFactory = (args: any, ctx: BehaviorContext, entity: ServerEntity) => Interact;
|
||||
type BoopFactory = (args: any, ctx: BehaviorContext, entity: ServerEntity) => Boop;
|
||||
type UpdateFactory = (args: any, ctx: BehaviorContext, entity: ServerEntity) => ServerUpdate;
|
||||
|
||||
const interactActions = new Map<string, InteractFactory>();
|
||||
const boopActions = new Map<string, BoopFactory>();
|
||||
const updateActions = new Map<string, UpdateFactory>();
|
||||
|
||||
const definitions = new WeakMap<BehaviorCallback, BehaviorDef>();
|
||||
const derived = new WeakSet<BehaviorCallback>();
|
||||
|
||||
function getRegistry(kind: BehaviorKind): Map<string, (args: any, ctx: BehaviorContext, entity: ServerEntity) => BehaviorCallback> {
|
||||
switch (kind) {
|
||||
case 'interact':
|
||||
case 'trigger':
|
||||
return interactActions;
|
||||
case 'boop':
|
||||
return boopActions;
|
||||
case 'update':
|
||||
return updateActions;
|
||||
default:
|
||||
throw new Error(`Invalid behavior kind (${kind})`);
|
||||
}
|
||||
}
|
||||
|
||||
function getProperty(kind: BehaviorKind): 'interact' | 'trigger' | 'boop' | 'serverUpdate' {
|
||||
return kind === 'update' ? 'serverUpdate' : kind;
|
||||
}
|
||||
|
||||
export function registerInteractAction(action: string, factory: InteractFactory) {
|
||||
interactActions.set(action, factory);
|
||||
}
|
||||
|
||||
export function registerBoopAction(action: string, factory: BoopFactory) {
|
||||
boopActions.set(action, factory);
|
||||
}
|
||||
|
||||
export function registerUpdateAction(action: string, factory: UpdateFactory) {
|
||||
updateActions.set(action, factory);
|
||||
}
|
||||
|
||||
export function getBehaviorActions(kind: BehaviorKind) {
|
||||
return Array.from(getRegistry(kind).keys());
|
||||
}
|
||||
|
||||
export function markDerivedBehavior<T extends BehaviorCallback>(callback: T): T {
|
||||
derived.add(callback);
|
||||
return callback;
|
||||
}
|
||||
|
||||
export function isDerivedBehavior(callback: BehaviorCallback) {
|
||||
return derived.has(callback);
|
||||
}
|
||||
|
||||
export function getBehaviorDef(callback: BehaviorCallback | undefined): BehaviorDef | undefined {
|
||||
return callback && definitions.get(callback);
|
||||
}
|
||||
|
||||
export function getEntityBehavior(entity: ServerEntity, kind: BehaviorKind): BehaviorCallback | undefined {
|
||||
return entity[getProperty(kind)] as BehaviorCallback | undefined;
|
||||
}
|
||||
|
||||
export function defineBehavior<T extends BehaviorCallback>(callback: T, def: BehaviorDef): T {
|
||||
definitions.set(callback, def);
|
||||
return callback;
|
||||
}
|
||||
|
||||
function throwNoContext(): never {
|
||||
throw new Error('Behavior requires context');
|
||||
}
|
||||
|
||||
export const noContext: BehaviorContext = {
|
||||
get world(): World {
|
||||
return throwNoContext();
|
||||
},
|
||||
get map(): ServerMap {
|
||||
return throwNoContext();
|
||||
},
|
||||
getTagged: () => undefined,
|
||||
};
|
||||
|
||||
export function createBehavior(kind: BehaviorKind, def: BehaviorDef, ctx: BehaviorContext, entity: ServerEntity): BehaviorCallback {
|
||||
const factory = getRegistry(kind).get(def.action);
|
||||
|
||||
if (!factory) {
|
||||
throw new Error(`Unknown ${kind} behavior action (${def.action})`);
|
||||
}
|
||||
|
||||
const callback = factory(def.args || {}, ctx, entity);
|
||||
definitions.set(callback, def.args === undefined ? { action: def.action } : { action: def.action, args: def.args });
|
||||
return callback;
|
||||
}
|
||||
|
||||
export function interactBehavior(def: BehaviorDef | string, ctx = noContext): Interact {
|
||||
const behavior = typeof def === 'string' ? { action: def } : def;
|
||||
return createBehavior('interact', behavior, ctx, undefined as any) as Interact;
|
||||
}
|
||||
|
||||
export function setBehavior(
|
||||
entity: ServerEntity, kind: BehaviorKind, def: BehaviorDef | string, ctx: BehaviorContext
|
||||
): ServerEntity {
|
||||
const behavior = typeof def === 'string' ? { action: def } : def;
|
||||
(entity as any)[getProperty(kind)] = createBehavior(kind, behavior, ctx, entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
export function setInteract(entity: ServerEntity, def: BehaviorDef | string, ctx: BehaviorContext) {
|
||||
return setBehavior(entity, 'interact', def, ctx);
|
||||
}
|
||||
|
||||
export function setTrigger(entity: ServerEntity, def: BehaviorDef | string, ctx: BehaviorContext) {
|
||||
return setBehavior(entity, 'trigger', def, ctx);
|
||||
}
|
||||
|
||||
export function setBoop(entity: ServerEntity, def: BehaviorDef | string, ctx: BehaviorContext) {
|
||||
return setBehavior(entity, 'boop', def, ctx);
|
||||
}
|
||||
|
||||
export function setUpdate(entity: ServerEntity, def: BehaviorDef | string, ctx: BehaviorContext) {
|
||||
return setBehavior(entity, 'update', def, ctx);
|
||||
}
|
||||
|
||||
export function createBehaviorContext(world: World, map: ServerMap, tagged?: Map<string, ServerEntity>): BehaviorContext {
|
||||
return {
|
||||
world,
|
||||
map,
|
||||
getTagged(tag: string) {
|
||||
if (tagged) {
|
||||
return tagged.get(tag);
|
||||
}
|
||||
|
||||
for (const region of map.regions) {
|
||||
for (const entity of region.entities) {
|
||||
if (entity.tag === tag) {
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function getItemType(name: string | undefined): number {
|
||||
const type = name ? getEntityType(name) : 0;
|
||||
|
||||
if (!type) {
|
||||
throw new Error(`Invalid item type (${name})`);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
export function itemName(type: number) {
|
||||
return getEntityTypeName(type);
|
||||
}
|
||||
|
||||
export interface GoToMapArgs {
|
||||
map: string;
|
||||
spawn?: string;
|
||||
publicMap?: string;
|
||||
}
|
||||
|
||||
registerInteractAction('goToMap', ({ map, spawn, publicMap }: GoToMapArgs, { world, map: current }) => {
|
||||
const target = (publicMap !== undefined && current.usage !== MapUsage.Party) ? publicMap : map;
|
||||
return (_, client) => goToMap(world, client, target || '', spawn);
|
||||
});
|
||||
|
||||
export interface GiveArgs {
|
||||
item: string;
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export function give(type: number, message?: string): Interact {
|
||||
const args: GiveArgs = message ? { item: itemName(type), message } : { item: itemName(type) };
|
||||
|
||||
return defineBehavior<Interact>((e, client) => {
|
||||
if (client.pony.options && client.pony.options.hold === type) {
|
||||
unholdItem(client.pony);
|
||||
}
|
||||
else {
|
||||
if (message) {
|
||||
sayTo(client, e, message, MessageType.Announcement);
|
||||
}
|
||||
|
||||
holdItem(client.pony, type);
|
||||
}
|
||||
}, { action: 'give', args });
|
||||
}
|
||||
|
||||
registerInteractAction('give', ({ item, message }: GiveArgs) => give(getItemType(item), message));
|
||||
|
||||
registerInteractAction('hold', ({ item }: { item: string; }) => {
|
||||
const type = getItemType(item);
|
||||
return (_, client) => holdItem(client.pony, type);
|
||||
});
|
||||
|
||||
registerInteractAction('say', ({ text }: { text: string; }) => {
|
||||
return (entity, client) => sayTo(client, entity, text, MessageType.System);
|
||||
});
|
||||
|
||||
export function say(text: string): Interact {
|
||||
return interactBehavior({ action: 'say', args: { text } });
|
||||
}
|
||||
|
||||
registerInteractAction('toyStash', () => (_, client) => updateEntityOptions(client.pony, getNextToyOrExtra(client)));
|
||||
|
||||
registerInteractAction('itemStash', () => {
|
||||
const types = entities.stashEntities.map(e => e.type);
|
||||
|
||||
return (_, client) => {
|
||||
const index = types.indexOf(client.pony.options!.hold || 0);
|
||||
holdItem(client.pony, types[(index + 1) % types.length]);
|
||||
};
|
||||
});
|
||||
|
||||
registerInteractAction('crystalLantern', () => (_, client) => {
|
||||
if (client.pony.options!.hold === entities.crystalHeld.type) {
|
||||
holdItem(client.pony, entities.crystalLantern.type);
|
||||
}
|
||||
else {
|
||||
holdItem(client.pony, entities.lanternOn.type);
|
||||
}
|
||||
});
|
||||
|
||||
registerInteractAction('donateGift', () => (_, client) => {
|
||||
if (client.account.state && client.account.state.gifts) {
|
||||
let count = 0;
|
||||
updateAccountState(client.account, state => state.gifts = count = Math.max(0, toInt(state.gifts) - 1));
|
||||
saySystem(client, `${count} 🎁`);
|
||||
}
|
||||
|
||||
if (isGift(client.pony.options && client.pony.options.hold)) {
|
||||
unholdItem(client.pony);
|
||||
}
|
||||
});
|
||||
|
||||
registerInteractAction('donateCandy', () => (_, client) => {
|
||||
if (client.account.state && client.account.state.candies) {
|
||||
let count = 0;
|
||||
updateAccountState(client.account, state => state.candies = count = Math.max(0, toInt(state.candies) - 1));
|
||||
saySystem(client, `${count} 🍬`);
|
||||
}
|
||||
});
|
||||
|
||||
registerInteractAction('donateEgg', () => (_, client) => {
|
||||
if (client.account.state && client.account.state.eggs) {
|
||||
let count = 0;
|
||||
updateAccountState(client.account, state => state.eggs = count = Math.max(0, toInt(state.eggs) - 1));
|
||||
saySystem(client, `${count} 🥚`);
|
||||
}
|
||||
});
|
||||
|
||||
export function boopLight(this: ServerEntity) {
|
||||
setTimeout(() => {
|
||||
if (hasFlag(this.state, EntityState.On)) {
|
||||
updateEntityState(this, EntityState.None);
|
||||
this.lightDelay = Date.now() + 3000;
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
defineBehavior(boopLight, { action: 'light' });
|
||||
|
||||
registerBoopAction('light', () => boopLight);
|
||||
|
||||
export interface BunnyArgs {
|
||||
waypoints: [number, number][];
|
||||
}
|
||||
|
||||
registerUpdateAction('bunny', ({ waypoints }: BunnyArgs, _, entity) => {
|
||||
const bunnySpeed = 2;
|
||||
|
||||
let waypoint = 0;
|
||||
let sleepUntil = 0;
|
||||
|
||||
return (_delta, now) => {
|
||||
if (sleepUntil > now) {
|
||||
return;
|
||||
}
|
||||
|
||||
const [x, y] = waypoints[waypoint];
|
||||
const reachedX = Math.abs(entity.x - x) < 0.2;
|
||||
const reachedY = Math.abs(entity.y - y) < 0.2;
|
||||
|
||||
if (reachedX && reachedY) {
|
||||
const rand = Math.random();
|
||||
updateEntityVelocity(entity, 0, 0, now);
|
||||
|
||||
if (rand < 0.1) {
|
||||
setEntityAnimation(entity, BunnyAnimation.Clean);
|
||||
sleepUntil = now + 2;
|
||||
}
|
||||
else if (rand < 0.2) {
|
||||
setEntityAnimation(entity, BunnyAnimation.Look);
|
||||
sleepUntil = now + 2;
|
||||
}
|
||||
else if (rand < 0.3) {
|
||||
setEntityAnimation(entity, BunnyAnimation.Blink);
|
||||
sleepUntil = now + 2;
|
||||
}
|
||||
else if (rand < 0.6) {
|
||||
setEntityAnimation(entity, BunnyAnimation.Sit);
|
||||
sleepUntil = now + 2;
|
||||
}
|
||||
else {
|
||||
waypoint = (waypoint + 1) % waypoints.length;
|
||||
setEntityAnimation(entity, BunnyAnimation.Sit);
|
||||
sleepUntil = now + random(0.2, 2, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const vx = reachedX ? 0 : (x < entity.x ? -bunnySpeed : bunnySpeed);
|
||||
const vy = reachedY ? 0 : (y < entity.y ? -bunnySpeed : bunnySpeed);
|
||||
|
||||
if (entity.vx !== vx || entity.vy !== vy) {
|
||||
updateEntityVelocity(entity, vx, vy, now);
|
||||
setEntityAnimation(entity, BunnyAnimation.Walk, vx === 0 ? undefined : vx > 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
export interface GhostArgs {
|
||||
anims: number[];
|
||||
hooves?: string;
|
||||
}
|
||||
|
||||
registerUpdateAction('ghost', ({ anims, hooves: hoovesTag }: GhostArgs, ctx, ghost) => {
|
||||
const randomDelay = () => random(1 * 60, 5 * 60, true);
|
||||
let delay = randomDelay();
|
||||
let resetDelay = 0;
|
||||
let reset = true;
|
||||
let hooves: ServerEntity | undefined = undefined;
|
||||
let hoovesResolved = false;
|
||||
|
||||
const animate = (anim: number, flip?: boolean) => {
|
||||
if (!hoovesResolved) {
|
||||
hooves = hoovesTag ? ctx.getTagged(hoovesTag) : undefined;
|
||||
hoovesResolved = true;
|
||||
}
|
||||
|
||||
setEntityAnimation(ghost, anim, flip);
|
||||
|
||||
if (hooves) {
|
||||
setEntityAnimation(hooves, anim, flip);
|
||||
}
|
||||
};
|
||||
|
||||
return delta => {
|
||||
delay -= delta;
|
||||
resetDelay -= delta;
|
||||
|
||||
if (delay < 0) {
|
||||
animate(sample(anims)!, Math.random() > 0.5);
|
||||
delay = randomDelay();
|
||||
reset = false;
|
||||
resetDelay = 5;
|
||||
}
|
||||
else if (!reset && resetDelay < 0) {
|
||||
animate(GhostAnimation.None);
|
||||
reset = true;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
registerUpdateAction('eyes', (_, __, entity) => {
|
||||
let delay = 5;
|
||||
let open = true;
|
||||
|
||||
return delta => {
|
||||
delay -= delta;
|
||||
|
||||
if (delay < 0) {
|
||||
if (open) {
|
||||
setEntityAnimation(entity, 1);
|
||||
delay = 0.2;
|
||||
open = false;
|
||||
}
|
||||
else {
|
||||
setEntityAnimation(entity, 0);
|
||||
delay = random(5, 10, true);
|
||||
open = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
registerUpdateAction('cat', (_, __, entity) => {
|
||||
let delay = 5;
|
||||
let boopDelay = 5;
|
||||
let hideDelay = 5;
|
||||
let hidden = false;
|
||||
|
||||
entity.boopY = -0.1;
|
||||
entity.boop = markDerivedBehavior(() => {
|
||||
if (!hidden && boopDelay < 0) {
|
||||
setTimeout(() => sayToAll(entity, '😠', '😠', MessageType.Thinking, {}), 500);
|
||||
boopDelay = random(5, 10, true);
|
||||
}
|
||||
});
|
||||
|
||||
return delta => {
|
||||
delay -= delta;
|
||||
boopDelay -= delta;
|
||||
hideDelay -= delta;
|
||||
|
||||
if (hideDelay < 0 && delay < 0) {
|
||||
if (hidden) {
|
||||
hidden = false;
|
||||
setEntityAnimation(entity, CatAnimation.Enter);
|
||||
hideDelay = random(30, 60, true);
|
||||
delay = random(2, 4, true);
|
||||
}
|
||||
else {
|
||||
hidden = true;
|
||||
setEntityAnimation(entity, CatAnimation.Exit);
|
||||
hideDelay = random(15, 30, true);
|
||||
}
|
||||
}
|
||||
else if (!hidden && delay < 0) {
|
||||
const rand = Math.random();
|
||||
|
||||
if (rand < 0.1) {
|
||||
sayToAll(entity, 'meow', 'meow', MessageType.System, {});
|
||||
delay = random(2, 4, true);
|
||||
}
|
||||
else if (rand < 0.5) {
|
||||
setEntityAnimation(entity, CatAnimation.Wag);
|
||||
delay = random(2, 4, true);
|
||||
}
|
||||
else {
|
||||
setEntityAnimation(entity, CatAnimation.Blink);
|
||||
delay = random(2, 4, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,178 @@
|
||||
import * as fs from 'fs';
|
||||
import { ServerFlags } from '../common/interfaces';
|
||||
import { Holiday, Season } from '../common/commonInterfaces';
|
||||
import { hasFlag } from '../common/utils';
|
||||
import { pathTo } from './paths';
|
||||
import { ServerMap, ServerEntity } from './serverInterfaces';
|
||||
import { World } from './world';
|
||||
import {
|
||||
MapData, MapLayerData, loadMap, loadEntities, decodeLockedTiles, findEntities, saveMap, stringifyMapData,
|
||||
isSaveableEntity, serializeEntities
|
||||
} from './serverMap';
|
||||
|
||||
export interface MapFiles {
|
||||
name: string;
|
||||
base: MapData;
|
||||
layers: Map<string, MapLayerData>;
|
||||
}
|
||||
|
||||
export function getMapsPath(...path: string[]) {
|
||||
return pathTo('src', 'maps', ...path);
|
||||
}
|
||||
|
||||
export function getSeasonLayerName(season: Season): string {
|
||||
switch (season) {
|
||||
case Season.Summer: return 'summer';
|
||||
case Season.Autumn: return 'autumn';
|
||||
case Season.Winter: return 'winter';
|
||||
case Season.Spring: return 'spring';
|
||||
default: throw new Error(`Invalid season (${season})`);
|
||||
}
|
||||
}
|
||||
|
||||
export function getHolidayLayerName(holiday: Holiday): string | undefined {
|
||||
switch (holiday) {
|
||||
case Holiday.None: return undefined;
|
||||
case Holiday.Christmas: return 'christmas';
|
||||
case Holiday.Halloween: return 'halloween';
|
||||
case Holiday.StPatricks: return 'stpatricks';
|
||||
case Holiday.Easter: return 'easter';
|
||||
default: throw new Error(`Invalid holiday (${holiday})`);
|
||||
}
|
||||
}
|
||||
|
||||
export const seasonLayerNames = [Season.Summer, Season.Autumn, Season.Winter, Season.Spring].map(getSeasonLayerName);
|
||||
|
||||
export const holidayLayerNames = [Holiday.Christmas, Holiday.Halloween, Holiday.StPatricks, Holiday.Easter]
|
||||
.map(h => getHolidayLayerName(h)!);
|
||||
|
||||
export function getActiveLayerNames(season: Season, holiday: Holiday): string[] {
|
||||
const holidayLayer = getHolidayLayerName(holiday);
|
||||
return holidayLayer ? [getSeasonLayerName(season), holidayLayer] : [getSeasonLayerName(season)];
|
||||
}
|
||||
|
||||
function readJSON(fileName: string) {
|
||||
return JSON.parse(fs.readFileSync(fileName, 'utf8'));
|
||||
}
|
||||
|
||||
export function readMapFiles(name: string, path = getMapsPath()): MapFiles {
|
||||
const base = readJSON(`${path}/${name}.json`) as MapData;
|
||||
const layers = new Map<string, MapLayerData>();
|
||||
const prefix = `${name}.`;
|
||||
|
||||
for (const file of fs.readdirSync(path)) {
|
||||
if (file.startsWith(prefix) && file.endsWith('.json')) {
|
||||
const layer = file.substring(prefix.length, file.length - '.json'.length);
|
||||
|
||||
if (layer && layer.indexOf('.') === -1) {
|
||||
layers.set(layer, readJSON(`${path}/${file}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { name, base, layers };
|
||||
}
|
||||
|
||||
export interface LoadMapFilesOptions {
|
||||
skipTiles?: boolean;
|
||||
editable?: boolean;
|
||||
}
|
||||
|
||||
const loadedFiles = new WeakMap<ServerMap, MapFiles>();
|
||||
|
||||
export function getMapFiles(map: ServerMap): MapFiles | undefined {
|
||||
return loadedFiles.get(map);
|
||||
}
|
||||
|
||||
export function loadBaseMap(world: World, map: ServerMap, files: MapFiles, options: LoadMapFilesOptions = {}) {
|
||||
loadedFiles.set(map, files);
|
||||
|
||||
const { entities, ...rest } = files.base;
|
||||
const data = options.skipTiles ? { ...rest, tiles: undefined } : rest;
|
||||
loadMap(world, map, data, { loadSpawns: true, loadLockedTiles: true, loadWalls: true });
|
||||
|
||||
if (entities) {
|
||||
loadEntities(world, map, entities, { editable: options.editable });
|
||||
}
|
||||
}
|
||||
|
||||
const loadedLayers = new WeakMap<ServerMap, string[]>();
|
||||
|
||||
export function getLoadedLayers(map: ServerMap): string[] {
|
||||
return loadedLayers.get(map) || [];
|
||||
}
|
||||
|
||||
export function applyMapLayers(world: World, map: ServerMap, files: MapFiles, layerNames: string[]) {
|
||||
loadedLayers.set(map, layerNames.filter(name => files.layers.has(name)));
|
||||
|
||||
for (const entity of findEntities(map, e => hasFlag(e.serverFlags, ServerFlags.Seasonal))) {
|
||||
world.removeEntity(entity, map);
|
||||
}
|
||||
|
||||
map.lockedTiles = decodeLockedTiles(files.base.lockedTiles);
|
||||
|
||||
for (const name of layerNames) {
|
||||
const layer = files.layers.get(name);
|
||||
|
||||
if (layer) {
|
||||
decodeLockedTiles(layer.lockedTiles, map.lockedTiles);
|
||||
|
||||
if (layer.entities) {
|
||||
loadEntities(world, map, layer.entities, { serverFlags: ServerFlags.Seasonal, layer: name });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function applySeasonLayers(world: World, map: ServerMap, files: MapFiles, season: Season, holiday: Holiday) {
|
||||
applyMapLayers(world, map, files, getActiveLayerNames(season, holiday));
|
||||
}
|
||||
|
||||
export function saveMapFiles(map: ServerMap, path: string, name: string) {
|
||||
const warnings: string[] = [];
|
||||
const warn = (message: string) => warnings.push(message);
|
||||
const files = getMapFiles(map);
|
||||
const saved: string[] = [];
|
||||
|
||||
const base = saveMap(map, {
|
||||
saveTiles: true, saveSpawns: true, saveLockedTiles: !files, saveWalls: true, saveEntities: true,
|
||||
filter: e => e.layer === undefined, warn,
|
||||
});
|
||||
|
||||
if (files && files.base.lockedTiles) {
|
||||
base.lockedTiles = files.base.lockedTiles;
|
||||
}
|
||||
|
||||
fs.writeFileSync(`${path}/${name}.json`, stringifyMapData(base), 'utf8');
|
||||
saved.push(`${name}.json`);
|
||||
|
||||
const layerEntities = new Map<string, ServerEntity[]>();
|
||||
|
||||
for (const entity of findEntities(map, e => e.layer !== undefined && isSaveableEntity(e))) {
|
||||
const list = layerEntities.get(entity.layer!) || [];
|
||||
list.push(entity);
|
||||
layerEntities.set(entity.layer!, list);
|
||||
}
|
||||
|
||||
if (files) {
|
||||
for (const layer of getLoadedLayers(map)) {
|
||||
if (!layerEntities.has(layer)) {
|
||||
layerEntities.set(layer, []);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
layerEntities.forEach((entities, layer) => {
|
||||
const data: MapLayerData = { entities: serializeEntities(entities, warn) };
|
||||
const layerData = files && files.layers.get(layer);
|
||||
|
||||
if (layerData && layerData.lockedTiles) {
|
||||
data.lockedTiles = layerData.lockedTiles;
|
||||
}
|
||||
|
||||
fs.writeFileSync(`${path}/${name}.${layer}.json`, stringifyMapData(data), 'utf8');
|
||||
saved.push(`${name}.${layer}.json`);
|
||||
});
|
||||
|
||||
return { saved, warnings };
|
||||
}
|
||||
+3
-135
@@ -1,21 +1,19 @@
|
||||
import { ServerEntity, ServerMap, IClient } from './serverInterfaces';
|
||||
import { World } from './world';
|
||||
import { Rect, SignEntityOptions, MessageType, CreateEntityMethod, PonyOptions, Point } from '../common/interfaces';
|
||||
import { Rect, PonyOptions } from '../common/interfaces';
|
||||
import { roundPosition } from '../common/positionUtils';
|
||||
import { addEntityToRegion, getRegionTiles, removeEntityFromRegion } from './serverRegion';
|
||||
import * as entities from '../common/entities';
|
||||
import { updateTileIndices } from '../common/tileUtils';
|
||||
import { generateRegionCollider, getRegionGlobal } from '../common/region';
|
||||
import { PONY_TYPE, tileWidth, tileHeight } from '../common/constants';
|
||||
import { sayTo, saySystem } from './chat';
|
||||
import { setEntityName, updateEntityVelocity, setEntityAnimation } from './entityUtils';
|
||||
import { saySystem } from './chat';
|
||||
import { updateAccountState } from './accountUtils';
|
||||
import { toInt, includes } from '../common/utils';
|
||||
import { holdItem } from './playerUtils';
|
||||
import { random, sample, clamp } from 'lodash';
|
||||
import { random, sample } from 'lodash';
|
||||
import { findEntities } from './serverMap';
|
||||
import { randomPosition } from './controllers/collectableController';
|
||||
import { BunnyAnimation } from '../common/entities';
|
||||
|
||||
export const worldForTemplates: any = {
|
||||
featureFlags: {},
|
||||
@@ -79,74 +77,6 @@ export function removePonies(entities: ServerEntity[]) {
|
||||
}
|
||||
}
|
||||
|
||||
export interface SignDirection {
|
||||
icon: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface SignConfig {
|
||||
r?: number;
|
||||
w?: (SignDirection | undefined)[];
|
||||
e?: (SignDirection | undefined)[];
|
||||
n?: (SignDirection | undefined)[];
|
||||
s?: (SignDirection | undefined)[];
|
||||
}
|
||||
|
||||
export function createDirectionSign(x: number, y: number, config: SignConfig) {
|
||||
const result: ServerEntity[] = [];
|
||||
const options: SignEntityOptions = { sign: {} };
|
||||
const lines: string[] = [];
|
||||
const { w = [], e = [], s = [], n = [] } = config;
|
||||
const max = clamp(Math.max(w.length, e.length, s.length, n.length), 3, 5);
|
||||
const skip = 5 - max;
|
||||
|
||||
function parse(entries: (SignDirection | undefined)[], arrow: string, plates: CreateEntityMethod[], ox: number) {
|
||||
for (let i = 0; i < entries.length; i++) {
|
||||
const e = entries[i];
|
||||
|
||||
if (e) {
|
||||
lines.push(`${arrow} ${e.name}`);
|
||||
const nameplate = plates[i](x + ox / tileWidth, y);
|
||||
setEntityName(nameplate, e.name);
|
||||
result.push(nameplate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (config.r) {
|
||||
options.sign.r = config.r;
|
||||
}
|
||||
|
||||
const ups = config.r ? entities.directionSignUpsRight : entities.directionSignUpsLeft;
|
||||
const downs = config.r ? entities.directionSignDownsLeft : entities.directionSignDownsRight;
|
||||
|
||||
if (config.n) {
|
||||
options.sign.n = config.n.map(x => x ? x.icon : -1);
|
||||
parse(config.n, '↑', ups.slice(skip), 0);
|
||||
}
|
||||
|
||||
if (config.w) {
|
||||
options.sign.w = config.w.map(x => x ? x.icon : -1);
|
||||
parse(config.w, '←', entities.directionSignLefts.slice(skip), -10);
|
||||
}
|
||||
|
||||
if (config.e) {
|
||||
options.sign.e = config.e.map(x => x ? x.icon : -1);
|
||||
parse(config.e, '→', entities.directionSignRights.slice(skip), 10);
|
||||
}
|
||||
|
||||
if (config.s) {
|
||||
options.sign.s = config.s.map(x => x ? x.icon : -1);
|
||||
parse(config.s, '↓', downs.slice(skip), 0);
|
||||
}
|
||||
|
||||
const text = lines.join('\n');
|
||||
const entity = entities.directionSign(x, y, options) as ServerEntity;
|
||||
entity.interact = (entity, client) => sayTo(client, entity, text, MessageType.System);
|
||||
result.push(entity);
|
||||
return result;
|
||||
}
|
||||
|
||||
const patchTypes = [
|
||||
entities.cloverPatch3, entities.cloverPatch4, entities.cloverPatch5, entities.cloverPatch6, entities.cloverPatch7
|
||||
].map(x => x.type);
|
||||
@@ -237,65 +167,3 @@ export function positionClover(map: ServerMap) {
|
||||
return randomPosition(map);
|
||||
}
|
||||
}
|
||||
|
||||
export function createBunny(waypoints: Point[]) {
|
||||
const { x, y } = waypoints[0];
|
||||
const entity = entities.bunny(x, y) as ServerEntity;
|
||||
const bunnySpeed = 2;
|
||||
|
||||
let waypoint = 0;
|
||||
let sleepUntil = 0;
|
||||
|
||||
entity.serverUpdate = (_delta, now) => {
|
||||
if (sleepUntil > now) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { x, y } = waypoints[waypoint];
|
||||
const reachedX = Math.abs(entity.x - x) < 0.2;
|
||||
const reachedY = Math.abs(entity.y - y) < 0.2;
|
||||
|
||||
if (reachedX && reachedY) {
|
||||
const rand = Math.random();
|
||||
updateEntityVelocity(entity, 0, 0, now);
|
||||
|
||||
if (rand < 0.1) {
|
||||
setEntityAnimation(entity, BunnyAnimation.Clean);
|
||||
sleepUntil = now + 2;
|
||||
}
|
||||
else if (rand < 0.2) {
|
||||
setEntityAnimation(entity, BunnyAnimation.Look);
|
||||
sleepUntil = now + 2;
|
||||
}
|
||||
else if (rand < 0.3) {
|
||||
setEntityAnimation(entity, BunnyAnimation.Blink);
|
||||
sleepUntil = now + 2;
|
||||
}
|
||||
else if (rand < 0.6) {
|
||||
setEntityAnimation(entity, BunnyAnimation.Sit);
|
||||
sleepUntil = now + 2;
|
||||
}
|
||||
else {
|
||||
waypoint = (waypoint + 1) % waypoints.length;
|
||||
setEntityAnimation(entity, BunnyAnimation.Sit);
|
||||
sleepUntil = now + random(0.2, 2, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const vx = reachedX ? 0 : (x < entity.x ? -bunnySpeed : bunnySpeed);
|
||||
const vy = reachedY ? 0 : (y < entity.y ? -bunnySpeed : bunnySpeed);
|
||||
|
||||
if (entity.vx !== vx || entity.vy !== vy) {
|
||||
updateEntityVelocity(entity, vx, vy, now);
|
||||
setEntityAnimation(entity, BunnyAnimation.Walk, vx === 0 ? undefined : vx > 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (DEVELOPMENT && false) {
|
||||
return [entity, ...waypoints.map(({ x, y }) => entities.routePole(x, y))];
|
||||
}
|
||||
else {
|
||||
return [entity];
|
||||
}
|
||||
}
|
||||
@@ -1,895 +1,21 @@
|
||||
import * as fs from 'fs';
|
||||
import { pathTo } from '../paths';
|
||||
import { ServerMap, MapUsage, ServerEntity } from '../serverInterfaces';
|
||||
import { World, goToMap } from '../world';
|
||||
import { ServerMap, MapUsage } from '../serverInterfaces';
|
||||
import { World } from '../world';
|
||||
import { addSpawnPointIndicators } from '../mapUtils';
|
||||
import { createServerMap, deserializeMap } from '../serverMap';
|
||||
import { createServerMap } from '../serverMap';
|
||||
import { TileType } from '../../common/interfaces';
|
||||
import { rect } from '../../common/rect';
|
||||
import { TorchController, FlyingCritterController } from '../controllers';
|
||||
import * as entities from '../../common/entities';
|
||||
import { WallController } from '../controllers/wallController';
|
||||
import { createBoxOfLanterns, give } from '../controllerUtils';
|
||||
import { holdItem } from '../playerUtils';
|
||||
import { MapType } from '../../common/commonInterfaces';
|
||||
import { readMapFiles, loadBaseMap } from '../mapFiles';
|
||||
|
||||
const mapData = JSON.parse(fs.readFileSync(pathTo('src', 'maps', 'cave.json'), 'utf8'));
|
||||
const caveMapFiles = readMapFiles('cave');
|
||||
|
||||
export function createCaveMap(world: World): ServerMap {
|
||||
const map = createServerMap('cave', MapType.Cave, 7, 7, TileType.None, MapUsage.Public);
|
||||
|
||||
map.spawnArea = rect(27, 52, 1, 2);
|
||||
map.tilesLocked = true;
|
||||
|
||||
deserializeMap(map, mapData);
|
||||
|
||||
// for (let y = 0; y < map.height; y++) {
|
||||
// for (let x = 0; x < map.width; x++) {
|
||||
// const tile = getTile(map, x, y);
|
||||
// if (tile === TileType.Dirt) {
|
||||
// setTile(map, x, y, TileType.None);
|
||||
// } else if (tile === TileType.Grass) {
|
||||
// setTile(map, x, y, TileType.Dirt);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
const add = (entity: ServerEntity) => world.addEntity(entity, map);
|
||||
|
||||
const caveDecals = [entities.caveDecal1, entities.caveDecal3, entities.caveDecal2];
|
||||
|
||||
function cracksS(x: number, y: number) {
|
||||
const code = (Math.random() * 1000) % 64;
|
||||
const index1 = code & 0b11;
|
||||
const index2 = (code >> 2) & 0b11;
|
||||
const index3 = (code >> 4) & 0b11;
|
||||
if (index1 && index1 !== 3) {
|
||||
add(caveDecals[index1 - 1](x + 0.5, y - 1));
|
||||
} // no decal 2 here
|
||||
if (index2) {
|
||||
add(caveDecals[index2 - 1](x + 0.5, y));
|
||||
}
|
||||
if (index3) {
|
||||
add(caveDecals[index3 - 1](x + 0.5, y + 1));
|
||||
}
|
||||
}
|
||||
|
||||
function cracksSLeft(x: number, y: number) {
|
||||
const code = (Math.random() * 1000) % 4;
|
||||
if (code & 0b01) {
|
||||
add(entities.caveDecalL(x + 0.5, y - 1));
|
||||
}
|
||||
if (code & 0b10) {
|
||||
add(entities.caveDecalL(x + 0.5, y));
|
||||
}
|
||||
}
|
||||
|
||||
function cracksSRight(x: number, y: number) {
|
||||
const code = (Math.random() * 1000) % 4;
|
||||
if (code & 0b01) {
|
||||
add(entities.caveDecalR(x + 0.5, y - 1));
|
||||
}
|
||||
if (code & 0b10) {
|
||||
add(entities.caveDecalR(x + 0.5, y));
|
||||
}
|
||||
}
|
||||
|
||||
function caveSW(x: number, y: number) {
|
||||
add(entities.caveSW(x + 0.5, y - 2));
|
||||
cracksSLeft(x, y);
|
||||
}
|
||||
|
||||
function caveSE(x: number, y: number) {
|
||||
add(entities.caveSE(x + 0.5, y - 2));
|
||||
cracksSRight(x, y);
|
||||
}
|
||||
|
||||
function caveS(x: number, y: number) {
|
||||
add(entities.caveS2(x + 0.5, y - 1));
|
||||
cracksS(x, y);
|
||||
}
|
||||
|
||||
function caveSStart(x: number, y: number) {
|
||||
add(entities.caveS1(x + 0.5, y - 1));
|
||||
cracksS(x, y);
|
||||
}
|
||||
|
||||
function caveSEnd(x: number, y: number) {
|
||||
add(entities.caveS3(x + 0.5, y - 1));
|
||||
cracksS(x, y);
|
||||
}
|
||||
|
||||
function caveS1(x: number, y: number) {
|
||||
add(entities.caveSb(x + 0.5, y - 1));
|
||||
cracksS(x, y);
|
||||
}
|
||||
|
||||
function caveN(x: number, y: number) {
|
||||
add(entities.caveTopN(x + 0.5, y));
|
||||
}
|
||||
|
||||
function caveNE(x: number, y: number) {
|
||||
add(entities.caveTopNE(x + 0.5, y));
|
||||
}
|
||||
|
||||
function caveNW(x: number, y: number) {
|
||||
add(entities.caveTopNW(x + 0.5, y));
|
||||
}
|
||||
|
||||
function caveRightWithTrimNoEdge(x: number, y: number, h: number) {
|
||||
caveRight(x, y, h);
|
||||
caveTrimRight(x + 1, y, h, false);
|
||||
}
|
||||
|
||||
function caveLeftWithTrimNoEdge(x: number, y: number, h: number) {
|
||||
caveLeft(x, y, h);
|
||||
caveTrimLeft(x, y, h, false);
|
||||
}
|
||||
|
||||
function caveRightWithTrim(x: number, y: number, h: number) {
|
||||
caveRight(x, y - 3, h - 3);
|
||||
caveTrimRight(x + 1, y, h);
|
||||
}
|
||||
|
||||
function caveLeftWithTrim(x: number, y: number, h: number) {
|
||||
caveLeft(x, y - 3, h - 3);
|
||||
caveTrimLeft(x, y, h);
|
||||
}
|
||||
|
||||
function caveLeft(x: number, y: number, h: number) {
|
||||
for (let i = 0; i < h; i++) {
|
||||
add(entities.caveTopW(x + 0.5, y - i));
|
||||
}
|
||||
}
|
||||
|
||||
function caveRight(x: number, y: number, h: number) {
|
||||
for (let i = 0; i < h; i++) {
|
||||
add(entities.caveTopE(x + 0.5, y - i));
|
||||
}
|
||||
}
|
||||
|
||||
function caveTrimLeft(x: number, y: number, h: number, botTrim = true) {
|
||||
if (botTrim) {
|
||||
add(entities.caveBotTrimLeft(x - 0.5, y));
|
||||
}
|
||||
else {
|
||||
add(entities.caveMidTrimLeft(x - 0.5, y));
|
||||
}
|
||||
|
||||
for (let i = 0; i < (h - 2); i++) {
|
||||
add(entities.caveMidTrimLeft(x - 0.5, y - 1 - i));
|
||||
}
|
||||
|
||||
if (h > 1) {
|
||||
add(entities.caveTopTrimLeft(x - 0.5, y - h + 1));
|
||||
}
|
||||
}
|
||||
|
||||
function caveTrimRight(x: number, y: number, h: number, botTrim = true) {
|
||||
if (botTrim) {
|
||||
add(entities.caveBotTrimRight(x + 0.5, y));
|
||||
}
|
||||
else {
|
||||
add(entities.caveMidTrimRight(x + 0.5, y));
|
||||
}
|
||||
|
||||
for (let i = 0; i < (h - 2); i++) {
|
||||
add(entities.caveMidTrimRight(x + 0.5, y - 1 - i));
|
||||
}
|
||||
|
||||
if (h > 1) {
|
||||
add(entities.caveTopTrimRight(x + 0.5, y - h + 1));
|
||||
}
|
||||
}
|
||||
|
||||
function caveSSection(x: number, y: number, w: number) {
|
||||
caveSStart(x, y);
|
||||
|
||||
for (let i = 1; i < (w - 1); i++) {
|
||||
caveS(x + i, y);
|
||||
}
|
||||
|
||||
caveSEnd(x + w - 1, y);
|
||||
}
|
||||
|
||||
function caveSESection(x: number, y: number, w: number) {
|
||||
for (let i = 0; i < w; i++) {
|
||||
caveSE(x + i, y - i);
|
||||
}
|
||||
}
|
||||
|
||||
function caveSWSection(x: number, y: number, w: number) {
|
||||
for (let i = 0; i < w; i++) {
|
||||
caveSW(x + i, y + i);
|
||||
}
|
||||
}
|
||||
|
||||
// large crypt
|
||||
caveS1(6, 1);
|
||||
caveRightWithTrim(5, 3, 4);
|
||||
caveSESection(4, 4, 2);
|
||||
caveRightWithTrimNoEdge(3, 8, 6);
|
||||
caveNE(4, 9);
|
||||
caveNE(5, 10);
|
||||
caveNE(6, 11);
|
||||
caveN(7, 12);
|
||||
caveNE(8, 12);
|
||||
caveNE(9, 13);
|
||||
caveRightWithTrim(9, 19, 6);
|
||||
caveSE(9, 19);
|
||||
caveSSection(7, 19, 2);
|
||||
caveSE(6, 20);
|
||||
caveRightWithTrim(5, 22, 4);
|
||||
caveSESection(4, 23, 2);
|
||||
caveRightWithTrimNoEdge(3, 27, 6);
|
||||
caveNE(4, 28);
|
||||
caveRightWithTrimNoEdge(4, 31, 3);
|
||||
caveNE(5, 32);
|
||||
caveN(6, 33);
|
||||
caveNW(7, 32);
|
||||
caveN(8, 32);
|
||||
caveN(9, 32);
|
||||
caveN(10, 32);
|
||||
caveNW(11, 31);
|
||||
caveNW(12, 30);
|
||||
caveLeftWithTrimNoEdge(13, 29, 2);
|
||||
caveNW(13, 27);
|
||||
caveNW(14, 26);
|
||||
caveLeftWithTrimNoEdge(15, 25, 1);
|
||||
caveNW(15, 24);
|
||||
caveN(16, 24);
|
||||
caveN(17, 24);
|
||||
caveNE(18, 24);
|
||||
caveNE(19, 25);
|
||||
caveN(20, 26);
|
||||
caveNE(21, 26);
|
||||
caveN(22, 27);
|
||||
caveNE(23, 27);
|
||||
caveNE(24, 28);
|
||||
caveNE(25, 29);
|
||||
caveNE(26, 30);
|
||||
caveRightWithTrimNoEdge(26, 31, 1);
|
||||
caveNE(27, 32);
|
||||
caveNE(28, 33);
|
||||
caveRightWithTrim(28, 38, 5);
|
||||
caveSE(28, 38);
|
||||
caveS1(27, 38);
|
||||
caveSW(26, 38);
|
||||
caveLeftWithTrim(26, 38, 4);
|
||||
caveSW(25, 36);
|
||||
caveSSection(23, 35, 2);
|
||||
caveSE(22, 36);
|
||||
caveRightWithTrimNoEdge(21, 37, 3);
|
||||
caveNE(22, 38);
|
||||
caveRightWithTrim(22, 41, 3);
|
||||
caveSE(22, 41);
|
||||
caveSW(21, 41);
|
||||
caveLeftWithTrim(21, 41, 4);
|
||||
caveSWSection(18, 37, 3);
|
||||
caveS1(17, 36);
|
||||
caveSE(16, 37);
|
||||
caveRightWithTrim(15, 39, 4);
|
||||
caveS1(15, 38);
|
||||
caveSWSection(13, 37, 2);
|
||||
caveS1(12, 36);
|
||||
caveSESection(10, 38, 2);
|
||||
caveRightWithTrimNoEdge(9, 39, 3);
|
||||
caveNE(10, 40);
|
||||
caveRightWithTrim(10, 44, 4);
|
||||
caveSE(10, 44);
|
||||
caveSSection(5, 44, 2);
|
||||
caveSE(7, 44);
|
||||
caveSW(8, 44);
|
||||
caveS1(9, 44);
|
||||
caveSE(4, 45);
|
||||
caveRightWithTrimNoEdge(3, 46, 3);
|
||||
caveNE(4, 47);
|
||||
caveN(5, 48);
|
||||
caveN(6, 48);
|
||||
caveN(7, 48);
|
||||
caveN(8, 48);
|
||||
caveN(9, 48);
|
||||
caveN(10, 48);
|
||||
caveNE(11, 48);
|
||||
caveN(12, 49);
|
||||
caveNE(13, 49);
|
||||
caveRightWithTrimNoEdge(13, 50, 1);
|
||||
caveNE(14, 51);
|
||||
caveN(15, 52);
|
||||
caveNW(16, 51);
|
||||
caveN(17, 51);
|
||||
caveNW(18, 50);
|
||||
caveNW(19, 49);
|
||||
caveNW(20, 48);
|
||||
caveLeftWithTrimNoEdge(21, 47, 2);
|
||||
caveNW(21, 45);
|
||||
caveN(22, 45);
|
||||
caveNE(23, 45);
|
||||
caveRightWithTrimNoEdge(23, 47, 2);
|
||||
caveNE(24, 48);
|
||||
caveRightWithTrimNoEdge(24, 49, 1);
|
||||
caveNE(25, 50);
|
||||
caveRightWithTrimNoEdge(25, 55, 5);
|
||||
// entrance to caves
|
||||
caveLeftWithTrimNoEdge(29, 55, 4);
|
||||
caveNW(29, 51);
|
||||
caveNW(30, 50);
|
||||
caveN(31, 50);
|
||||
caveN(32, 50);
|
||||
caveNW(33, 49);
|
||||
caveLeftWithTrimNoEdge(34, 48, 1);
|
||||
caveNW(34, 47);
|
||||
caveLeftWithTrimNoEdge(35, 46, 3);
|
||||
caveNW(35, 43);
|
||||
caveN(36, 43);
|
||||
caveN(37, 43);
|
||||
caveNW(38, 42);
|
||||
caveN(39, 42);
|
||||
caveN(40, 42);
|
||||
caveN(41, 42);
|
||||
caveN(42, 42);
|
||||
caveNE(43, 42);
|
||||
caveN(44, 43);
|
||||
caveNE(45, 43);
|
||||
caveN(46, 44);
|
||||
caveNW(47, 43);
|
||||
caveN(48, 43);
|
||||
caveNW(49, 42);
|
||||
caveN(50, 42);
|
||||
caveNW(51, 41);
|
||||
caveNW(52, 40);
|
||||
caveLeftWithTrimNoEdge(53, 39, 1);
|
||||
caveNW(53, 38);
|
||||
caveLeftWithTrimNoEdge(54, 37, 4);
|
||||
caveSW(53, 35);
|
||||
caveLeftWithTrim(53, 35, 4);
|
||||
caveSW(52, 33);
|
||||
caveLeftWithTrim(52, 33, 5);
|
||||
caveSWSection(50, 29, 2);
|
||||
caveS1(49, 28);
|
||||
caveSW(48, 28);
|
||||
caveS1(47, 27);
|
||||
caveSESection(45, 29, 2);
|
||||
caveS1(44, 29);
|
||||
caveRightWithTrim(43, 31, 4);
|
||||
caveSESection(42, 32, 2);
|
||||
caveRightWithTrim(41, 35, 5);
|
||||
caveSE(41, 35);
|
||||
caveRightWithTrim(40, 37, 4);
|
||||
caveSE(40, 37);
|
||||
caveSSection(37, 37, 3);
|
||||
caveSE(36, 38);
|
||||
caveSSection(33, 38, 3);
|
||||
caveSW(32, 38);
|
||||
caveLeftWithTrim(32, 38, 4);
|
||||
caveNW(32, 34);
|
||||
// small crypt
|
||||
|
||||
// large crypt
|
||||
caveLeftWithTrim(13, 18, 4);
|
||||
caveSW(13, 18);
|
||||
caveLeftWithTrim(14, 20, 4);
|
||||
caveSW(14, 20);
|
||||
caveSESection(15, 20, 2);
|
||||
caveS1(17, 18);
|
||||
caveSW(18, 19);
|
||||
caveS1(19, 19);
|
||||
caveSW(20, 20);
|
||||
caveSSection(21, 20, 2);
|
||||
caveSESection(23, 20, 3);
|
||||
caveRightWithTrim(25, 18, 4);
|
||||
caveSE(26, 16);
|
||||
caveRightWithTrim(26, 16, 4);
|
||||
caveNE(26, 12);
|
||||
caveRightWithTrimNoEdge(25, 11, 2);
|
||||
caveNE(25, 9);
|
||||
caveRightWithTrimNoEdge(24, 8, 4);
|
||||
caveSE(25, 6);
|
||||
caveRightWithTrim(25, 6, 4);
|
||||
caveSESection(26, 4, 2);
|
||||
caveS1(28, 2);
|
||||
caveSE(29, 2);
|
||||
caveSSection(30, 1, 4);
|
||||
caveSW(34, 2);
|
||||
caveS1(35, 2);
|
||||
caveSW(36, 3);
|
||||
caveLeftWithTrim(37, 5, 4);
|
||||
caveSW(37, 5);
|
||||
caveLeftWithTrim(38, 7, 4);
|
||||
caveSWSection(38, 7, 3);
|
||||
caveS1(41, 9);
|
||||
caveSESection(42, 9, 2);
|
||||
caveS1(44, 7);
|
||||
caveSE(45, 7);
|
||||
caveSSection(46, 6, 2);
|
||||
caveSW(48, 7);
|
||||
caveS1(49, 7);
|
||||
caveSW(50, 8);
|
||||
caveS1(51, 8);
|
||||
caveSW(52, 9);
|
||||
caveLeftWithTrim(53, 11, 4);
|
||||
caveSW(53, 11);
|
||||
caveLeftWithTrimNoEdge(54, 15, 6);
|
||||
caveNW(53, 16);
|
||||
caveLeftWithTrimNoEdge(53, 18, 2);
|
||||
caveNW(52, 19);
|
||||
caveNW(51, 20);
|
||||
caveNW(50, 21);
|
||||
caveN(49, 22);
|
||||
caveNW(48, 22);
|
||||
caveN(47, 23);
|
||||
caveNE(46, 22);
|
||||
caveN(45, 22);
|
||||
caveNE(44, 21);
|
||||
caveNE(43, 20);
|
||||
caveRightWithTrimNoEdge(42, 19, 1);
|
||||
caveNE(42, 18);
|
||||
caveN(41, 18);
|
||||
caveN(40, 18);
|
||||
caveNE(39, 17);
|
||||
caveRightWithTrimNoEdge(38, 16, 1);
|
||||
caveNE(38, 15);
|
||||
caveN(37, 15);
|
||||
caveNE(36, 14);
|
||||
caveN(35, 14);
|
||||
caveNW(34, 14);
|
||||
caveNW(33, 15);
|
||||
caveN(32, 16);
|
||||
caveNW(31, 16);
|
||||
caveN(30, 17);
|
||||
caveNW(29, 17);
|
||||
caveLeftWithTrimNoEdge(29, 19, 2);
|
||||
caveNW(28, 20);
|
||||
caveLeftWithTrimNoEdge(28, 21, 1);
|
||||
caveNW(27, 22);
|
||||
caveLeftWithTrim(27, 26, 4);
|
||||
caveSW(27, 26);
|
||||
caveS1(28, 26);
|
||||
caveLeftWithTrim(29, 28, 4);
|
||||
caveSWSection(29, 28, 2);
|
||||
caveSSection(31, 29, 2);
|
||||
// small crypt
|
||||
|
||||
add(entities.caveFill(3, 9));
|
||||
add(entities.caveFill(4, 10));
|
||||
add(entities.caveFill(5, 11));
|
||||
add(entities.caveFill(6, 12));
|
||||
add(entities.caveFill(8, 13));
|
||||
add(entities.caveFill(3, 28));
|
||||
add(entities.caveFill(4, 32));
|
||||
add(entities.caveFill(5, 33));
|
||||
add(entities.caveFill(7, 33));
|
||||
add(entities.caveFill(11, 32));
|
||||
add(entities.caveFill(12, 31));
|
||||
add(entities.caveFill(13, 30));
|
||||
add(entities.caveFill(14, 27));
|
||||
add(entities.caveFill(15, 26));
|
||||
add(entities.caveFill(18, 25));
|
||||
add(entities.caveFill(19, 26));
|
||||
add(entities.caveFill(23, 28));
|
||||
add(entities.caveFill(24, 29));
|
||||
add(entities.caveFill(25, 30));
|
||||
add(entities.caveFill(26, 32));
|
||||
add(entities.caveFill(27, 33));
|
||||
add(entities.caveFill(9, 40));
|
||||
add(entities.caveFill(11, 49));
|
||||
add(entities.caveFill(13, 51));
|
||||
add(entities.caveFill(14, 52));
|
||||
add(entities.caveFill(16, 52));
|
||||
add(entities.caveFill(18, 51));
|
||||
add(entities.caveFill(19, 50));
|
||||
add(entities.caveFill(20, 49));
|
||||
add(entities.caveFill(21, 48));
|
||||
add(entities.caveFill(23, 48));
|
||||
add(entities.caveFill(24, 50));
|
||||
add(entities.caveFill(30, 51));
|
||||
add(entities.caveFill(33, 50));
|
||||
add(entities.caveFill(34, 49));
|
||||
add(entities.caveFill(35, 47));
|
||||
add(entities.caveFill(38, 43));
|
||||
add(entities.caveFill(43, 43));
|
||||
add(entities.caveFill(45, 44));
|
||||
add(entities.caveFill(47, 44));
|
||||
add(entities.caveFill(49, 43));
|
||||
add(entities.caveFill(51, 42));
|
||||
add(entities.caveFill(52, 41));
|
||||
add(entities.caveFill(53, 40));
|
||||
add(entities.caveFill(54, 38));
|
||||
add(entities.caveFill(33, 34));
|
||||
add(entities.caveFill(28, 22));
|
||||
add(entities.caveFill(31, 17));
|
||||
add(entities.caveFill(33, 16));
|
||||
add(entities.caveFill(36, 15));
|
||||
add(entities.caveFill(38, 17));
|
||||
add(entities.caveFill(39, 18));
|
||||
add(entities.caveFill(43, 21));
|
||||
add(entities.caveFill(44, 22));
|
||||
add(entities.caveFill(46, 23));
|
||||
add(entities.caveFill(48, 23));
|
||||
add(entities.caveFill(50, 22));
|
||||
add(entities.caveFill(51, 21));
|
||||
add(entities.caveFill(52, 20));
|
||||
add(entities.caveFill(53, 19));
|
||||
add(entities.caveFill(54, 16));
|
||||
add(entities.caveFill(24, 9));
|
||||
add(entities.caveFill(25, 12));
|
||||
add(entities.caveFill(21, 27));
|
||||
|
||||
add(entities.trigger3x1(27.5, 55)).trigger = (_, client) => goToMap(world, client, '', 'cave');
|
||||
|
||||
add(entities.lanternOn(10.38, 18.38));
|
||||
add(entities.lanternOn(12.66, 18.38));
|
||||
add(entities.lanternOn(18.41, 12.00));
|
||||
add(entities.lanternOn(21.41, 12.13));
|
||||
add(entities.lanternOn(18.47, 14.21));
|
||||
add(entities.lanternOn(21.44, 14.33));
|
||||
add(entities.lanternOn(10.41, 11.54));
|
||||
add(entities.lanternOn(12.66, 11.50));
|
||||
add(entities.lanternOn(13.94, 4.67));
|
||||
add(entities.lanternOn(9.44, 4.67));
|
||||
add(entities.lanternOn(27.44, 31.54));
|
||||
add(entities.lanternOn(21.97, 26.50));
|
||||
add(entities.lanternOn(19.31, 21.79));
|
||||
add(entities.lanternOn(15.53, 24.17));
|
||||
add(entities.lanternOn(9.28, 25.63));
|
||||
add(entities.lanternOn(29.34, 17.29));
|
||||
add(entities.lanternOn(15.81, 40.42));
|
||||
add(entities.lanternOn(11.28, 43.50));
|
||||
add(entities.lanternOn(14.66, 48.75));
|
||||
add(entities.lanternOn(18.44, 48.33));
|
||||
add(entities.lanternOn(16.18, 45.04));
|
||||
add(entities.lanternOn(39.53, 41.91));
|
||||
add(entities.lanternOn(41.37, 37.41));
|
||||
add(entities.lanternOn(45.84, 34.13));
|
||||
add(entities.lanternOn(50.50, 38.17));
|
||||
add(entities.lanternOn(44.78, 41.12));
|
||||
add(entities.lanternOn(37.46, 27.12));
|
||||
add(entities.lanternOn(26.22, 51.79));
|
||||
add(entities.lanternOn(28.75, 51.75));
|
||||
add(entities.lanternOn(23.34, 42.08));
|
||||
add(entities.lanternOn(23.88, 45.33));
|
||||
add(entities.lanternOn(33.66, 40.20));
|
||||
add(entities.lanternOn(34.44, 45.17));
|
||||
add(entities.lanternOn(28.81, 44.25));
|
||||
add(entities.lanternOn(25.31, 20.50));
|
||||
add(entities.lanternOn(28.63, 28.38));
|
||||
add(entities.lanternOn(29.28, 36.92));
|
||||
add(entities.lanternOn(32.38, 31.38));
|
||||
add(entities.lanternOn(33.22, 22.83));
|
||||
add(entities.lanternOn(31.84, 49.83));
|
||||
add(entities.lanternOn(30.28, 48.91));
|
||||
add(entities.lanternOn(14.09, 8.63));
|
||||
add(entities.lanternOn(9.41, 8.54));
|
||||
|
||||
add(entities.waterRock1(8.63, 27.92));
|
||||
add(entities.waterRock3(8.75, 28.08));
|
||||
add(entities.waterRock6(29.59, 8.79));
|
||||
add(entities.waterRock8(29.66, 9.00));
|
||||
add(entities.waterRock5(31.81, 6.83));
|
||||
add(entities.waterRock4(31.41, 6.58));
|
||||
add(entities.waterRock1(32.34, 9.79));
|
||||
add(entities.waterRock1(46.56, 13.50));
|
||||
add(entities.waterRock10(46.25, 13.71));
|
||||
add(entities.waterRock11(49.63, 16.63));
|
||||
add(entities.waterRock9(46.50, 11.46));
|
||||
add(entities.waterRock4(46.38, 11.63));
|
||||
|
||||
add(entities.box(32.03, 49.13));
|
||||
|
||||
add(createBoxOfLanterns(30.97, 49.63)).interact = (_, client) => {
|
||||
if (client.pony.options!.hold === entities.crystalHeld.type) {
|
||||
holdItem(client.pony, entities.crystalLantern.type);
|
||||
}
|
||||
else {
|
||||
holdItem(client.pony, entities.lanternOn.type);
|
||||
}
|
||||
};
|
||||
|
||||
// top rooms
|
||||
add(createBoxOfLanterns(9.34, 11.46));
|
||||
add(entities.crate1A(17.78, 11.21));
|
||||
add(entities.crate1A(18.84, 11.29));
|
||||
add(entities.crate1A(7.69, 4.13));
|
||||
add(entities.crate1A(8.72, 4.13));
|
||||
add(entities.crate1A(10.00, 4.17));
|
||||
add(entities.crate1A(8.06, 5.33));
|
||||
add(entities.crate1BHigh(8.31, 4.17));
|
||||
add(entities.crate1BHigh(18.25, 11.30));
|
||||
add(entities.barrel(15.31, 3.79));
|
||||
add(entities.barrel(14.66, 4.54));
|
||||
add(entities.barrel(15.28, 5.08));
|
||||
add(entities.barrel(14.50, 3.75));
|
||||
add(entities.barrel(15.34, 6.08));
|
||||
add(entities.barrel(19.78, 10.75));
|
||||
add(entities.barrel(20.56, 11.25));
|
||||
|
||||
function railsH(x: number, y: number, length: number) {
|
||||
for (let i = 0; i < length; i++) {
|
||||
add(entities.mineRailsH(x + i + 0.5, y));
|
||||
}
|
||||
}
|
||||
|
||||
function railsV(x: number, y: number, length: number) {
|
||||
for (let i = 0; i < length; i++) {
|
||||
add(entities.mineRailsV(x + 0.5, y - i));
|
||||
}
|
||||
}
|
||||
|
||||
railsV(30, 40, 8);
|
||||
add(entities.mineRailsSE(30.5, 32));
|
||||
railsH(31, 32, 5);
|
||||
add(entities.mineRailsEndRight(36.5, 32.5));
|
||||
|
||||
railsH(5, 46, 13);
|
||||
add(entities.mineRailsNW(18.5, 46));
|
||||
railsV(18, 45, 1);
|
||||
add(entities.mineRailsNSE(18.5, 44));
|
||||
railsH(19, 44, 7);
|
||||
railsV(18, 43, 1);
|
||||
add(entities.mineRailsSW(18.5, 42));
|
||||
|
||||
add(entities.mineCart(49, 40));
|
||||
add(entities.crystalsCartPile(49, 40)).interact = give(entities.crystalHeld.type);
|
||||
|
||||
add(entities.mineCart(31.5, 46));
|
||||
add(entities.crystalsCartPile(31.5, 46)).interact = give(entities.crystalHeld.type);
|
||||
|
||||
add(entities.mineRailsEndRight(50.5, 40.5));
|
||||
railsH(38, 40, 9);
|
||||
add(entities.mineRailsNWE(47.5, 40));
|
||||
railsH(48, 40, 2);
|
||||
add(entities.mineRailsSE(37.5, 40));
|
||||
add(entities.mineRailsNW(37.5, 41));
|
||||
railsH(27, 41, 3);
|
||||
add(entities.mineRailsNWE(30.5, 41));
|
||||
railsH(31, 41, 6);
|
||||
add(entities.mineRailsSE(26.5, 41));
|
||||
railsV(26, 43, 2);
|
||||
add(entities.mineRailsNSW(26.5, 44));
|
||||
railsV(26, 45, 1);
|
||||
add(entities.mineRailsNE(26.5, 46));
|
||||
railsH(28, 46, 5);
|
||||
add(entities.mineRailsEndRight(33.5, 46.5));
|
||||
railsH(14, 42, 4);
|
||||
add(entities.mineRailsEndLeft(13.5, 42.5));
|
||||
|
||||
railsV(47, 39, 8);
|
||||
add(entities.mineRailsEndTop(47.5, 32));
|
||||
|
||||
add(entities.mineRailsSWE(27.5, 46));
|
||||
railsV(27, 55, 9);
|
||||
|
||||
add(entities.wallMap(23.97, 36.96));
|
||||
add(entities.table3(24.00, 37.2916));
|
||||
add(entities.lanternOnTable(24.375, 37.30));
|
||||
add(entities.lanternOn(22.50, 38.33));
|
||||
add(entities.sandPileSmall(25.50, 40.33));
|
||||
add(entities.table3(37.81, 39.41));
|
||||
|
||||
add(entities.sandPileMedium(31.44, 42.67));
|
||||
add(entities.sandPileSmall(32.03, 43.54));
|
||||
add(entities.sandPileTiny(28.75, 45.33));
|
||||
add(entities.sandPileSmall(32.63, 47.50));
|
||||
add(entities.sandPileTiny(33.03, 47.96));
|
||||
add(entities.sandPileSmall(27.94, 45.25));
|
||||
add(entities.sandPileSmall(29.81, 48.00));
|
||||
add(entities.sandPileTiny(29.13, 48.38));
|
||||
add(entities.sandPileSmall(35.72, 42.46));
|
||||
add(entities.sandPileTiny(32.53, 42.42));
|
||||
add(entities.sandPileTinier(36.47, 42.71));
|
||||
add(entities.sandPileBig(50.00, 34.96));
|
||||
add(entities.sandPileMedium(49.16, 36.00));
|
||||
add(entities.sandPileSmall(44.13, 34.42));
|
||||
add(entities.sandPileMedium(17.88, 40.58));
|
||||
add(entities.sandPileSmall(18.69, 41.29));
|
||||
add(entities.sandPileSmall(15.63, 49.88));
|
||||
add(entities.sandPileTiny(16.31, 50.33));
|
||||
add(entities.sandPileTinier(17.63, 41.58));
|
||||
add(entities.sandPileSmall(7.19, 24.29));
|
||||
add(entities.sandPileTiny(6.69, 24.79));
|
||||
|
||||
add(entities.sandPileMedium(6.19, 46.92));
|
||||
add(entities.sandPileTiny(5.03, 47.25));
|
||||
add(entities.rockB(5.13, 46.46));
|
||||
add(entities.rockB(7.31, 47.33));
|
||||
add(entities.rock2B(5.00, 47.13));
|
||||
add(entities.rock3B(5.72, 46.54));
|
||||
add(entities.rock3B(7.91, 47.04));
|
||||
add(entities.rock2B(8.03, 45.75));
|
||||
add(entities.rock2B(6.72, 47.54));
|
||||
add(entities.rock2B(32.03, 49.38));
|
||||
add(entities.rock2B(50.63, 39.71));
|
||||
add(entities.rock3B(41.59, 37.13));
|
||||
add(entities.rock3B(32.13, 31.25));
|
||||
add(entities.rock3B(22.34, 22.08));
|
||||
add(entities.rock2B(22.91, 22.29));
|
||||
add(entities.rock3B(35.63, 4.17));
|
||||
add(entities.rock2B(44.66, 9.29));
|
||||
add(entities.rockB(7.47, 21.33));
|
||||
add(entities.rock2B(7.81, 21.71));
|
||||
|
||||
add(entities.caveCover(13.125, 11.625));
|
||||
add(entities.caveCover(14.125, 11.625));
|
||||
add(entities.caveCover(15.125, 11.625));
|
||||
add(entities.caveCover(13.125, 15.625));
|
||||
add(entities.caveCover(14.125, 15.625));
|
||||
add(entities.caveCover(15.125, 15.625));
|
||||
add(entities.caveCover(15.875, 15.625));
|
||||
add(entities.caveCover(16.875, 16.625));
|
||||
add(entities.caveCover(17.875, 16.625));
|
||||
add(entities.caveCover(18.875, 16.625));
|
||||
add(entities.caveCover(19.875, 16.625));
|
||||
add(entities.caveCover(20.875, 16.625));
|
||||
add(entities.caveCover(21.875, 16.625));
|
||||
add(entities.caveCover(22.875, 16.625));
|
||||
add(entities.caveCover(30.88, 27.625));
|
||||
add(entities.caveCover(31.88, 27.625));
|
||||
add(entities.caveCover(32.88, 27.625));
|
||||
add(entities.caveCover(38.125, 30.625));
|
||||
add(entities.caveCover(33.125, 34.625));
|
||||
add(entities.caveCover(34.03, 34.625));
|
||||
add(entities.caveCover(35.03, 34.625));
|
||||
add(entities.caveCover(36.03, 34.625));
|
||||
add(entities.caveCover(37.03, 34.625));
|
||||
add(entities.caveCover(38.03, 34.625));
|
||||
add(entities.caveCover(32.88, 35.17));
|
||||
|
||||
add(entities.crystals1(48.50, 10.42));
|
||||
add(entities.crystals1(42.59, 17.17));
|
||||
add(entities.crystals2(47.44, 14.42));
|
||||
add(entities.crystals3(52.06, 16.25));
|
||||
add(entities.crystals4(48.69, 18.96));
|
||||
add(entities.crystals5(45.56, 10.21));
|
||||
add(entities.crystals6(51.53, 11.58));
|
||||
add(entities.crystals7(45.53, 16.50));
|
||||
add(entities.crystals9(51.56, 18.71));
|
||||
add(entities.crystals10(45.59, 20.67));
|
||||
add(entities.crystals10(43.59, 13.33));
|
||||
add(entities.crystals3(40.63, 13.46));
|
||||
add(entities.crystals9(38.80, 10.04));
|
||||
add(entities.crystals8(37.34, 13.58));
|
||||
add(entities.crystals8(49.91, 15.21));
|
||||
add(entities.crystals1(33.41, 10.46));
|
||||
add(entities.crystals1(32.66, 4.33));
|
||||
add(entities.crystals2(34.38, 8.71));
|
||||
add(entities.crystals3(33.44, 14.67));
|
||||
add(entities.crystals3(27.47, 6.38));
|
||||
add(entities.crystals4(28.63, 5.79));
|
||||
add(entities.crystals5(28.69, 9.46));
|
||||
add(entities.crystals5(37.38, 9.79));
|
||||
add(entities.crystals6(28.22, 10.96));
|
||||
add(entities.crystals7(31.56, 11.75));
|
||||
add(entities.crystals8(34.81, 6.21));
|
||||
add(entities.crystals9(26.22, 8.04));
|
||||
add(entities.crystals10(36.91, 8.21));
|
||||
add(entities.crystals2(28.68, 14.54));
|
||||
add(entities.crystals8(28.63, 18.79));
|
||||
add(entities.crystals7(26.34, 23.71));
|
||||
add(entities.crystals6(23.22, 23.29));
|
||||
add(entities.crystals5(16.43, 22.29));
|
||||
add(entities.crystals3(8.59, 30.33));
|
||||
add(entities.crystals5(6.59, 27.58));
|
||||
add(entities.crystals2(11.625, 28.42));
|
||||
add(entities.crystals8(7.31, 22.54));
|
||||
add(entities.crystals4(8.44, 23.17));
|
||||
add(entities.crystals6(7.31, 29.83));
|
||||
add(entities.crystals1(5.44, 25.38));
|
||||
add(entities.crystals3(5.31, 6.50));
|
||||
add(entities.crystals7(6.41, 10.42));
|
||||
|
||||
add(entities.crystals5(49.56, 31.46));
|
||||
add(entities.crystals8(50.63, 33.33));
|
||||
add(entities.crystals1(47.19, 30.21));
|
||||
add(entities.crystals9(46.06, 32.21));
|
||||
add(entities.crystals8(17.28, 39.38));
|
||||
add(entities.crystals3(12.41, 39.33));
|
||||
add(entities.crystals6(11.31, 40.75));
|
||||
|
||||
add(entities.waterCrystal1(31.34, 7.13));
|
||||
add(entities.waterCrystal2(31.03, 6.92));
|
||||
add(entities.waterCrysta3(31.00, 7.29));
|
||||
add(entities.waterCrysta3(32.34, 10.00));
|
||||
add(entities.waterCrystal2(46.06, 13.29));
|
||||
add(entities.waterCrysta3(49.44, 16.29));
|
||||
add(entities.waterCrysta3(46.72, 11.67));
|
||||
add(entities.waterCrysta3(41.75, 12.54));
|
||||
add(entities.waterCrystal1(8.47, 27.46));
|
||||
add(entities.waterCrysta3(10.47, 27.54));
|
||||
|
||||
add(entities.stalactite3(17.06, 20.79));
|
||||
add(entities.stalactite3(22.25, 22.83));
|
||||
add(entities.stalactite2(21.81, 22.46));
|
||||
add(entities.stalactite1(17.41, 21.08));
|
||||
add(entities.stalactite1(28.31, 28.25));
|
||||
add(entities.stalactite2(13.69, 20.63));
|
||||
add(entities.stalactite3(6.56, 22.04));
|
||||
add(entities.stalactite3(7.38, 28.46));
|
||||
add(entities.stalactite1(7.66, 28.54));
|
||||
add(entities.stalactite2(6.28, 22.42));
|
||||
add(entities.stalactite2(9.69, 20.79));
|
||||
add(entities.stalactite1(10.06, 20.58));
|
||||
add(entities.stalactite2(12.25, 25.79));
|
||||
add(entities.stalactite1(11.91, 26.08));
|
||||
add(entities.stalactite3(11.88, 25.71));
|
||||
add(entities.stalactite2(31.25, 31.25));
|
||||
add(entities.stalactite3(22.72, 42.88));
|
||||
add(entities.stalactite1(23.06, 42.71));
|
||||
add(entities.stalactite3(10.59, 40.21));
|
||||
add(entities.stalactite2(12.19, 38.42));
|
||||
add(entities.stalactite1(12.63, 38.42));
|
||||
add(entities.stalactite3(47.25, 29.46));
|
||||
add(entities.stalactite2(44.34, 31.33));
|
||||
add(entities.stalactite1(47.69, 29.58));
|
||||
add(entities.stalactite1(51.75, 33.50));
|
||||
add(entities.stalactite2(26.31, 18.21));
|
||||
add(entities.stalactite3(28.22, 4.33));
|
||||
add(entities.stalactite3(37.69, 7.29));
|
||||
add(entities.stalactite2(39.44, 10.00));
|
||||
add(entities.stalactite2(28.75, 4.13));
|
||||
add(entities.stalactite1(27.47, 10.88));
|
||||
add(entities.stalactite1(37.28, 7.04));
|
||||
add(entities.stalactite3(49.88, 9.42));
|
||||
add(entities.stalactite3(50.63, 13.92));
|
||||
add(entities.stalactite3(42.84, 14.63));
|
||||
add(entities.stalactite3(50.78, 20.96));
|
||||
add(entities.stalactite3(44.09, 9.46));
|
||||
add(entities.stalactite2(43.16, 15.04));
|
||||
add(entities.stalactite2(49.44, 9.21));
|
||||
add(entities.stalactite2(46.00, 8.42));
|
||||
add(entities.stalactite2(51.47, 14.17));
|
||||
add(entities.stalactite1(51.06, 14.29));
|
||||
add(entities.stalactite1(42.59, 15.13));
|
||||
add(entities.stalactite1(44.31, 9.67));
|
||||
add(entities.stalactite1(51.78, 10.33));
|
||||
add(entities.stalactite1(50.44, 21.29));
|
||||
add(entities.stalactite1(47.41, 17.71));
|
||||
add(entities.stalactite2(47.06, 17.71));
|
||||
add(entities.stalactite1(28.66, 19.67));
|
||||
add(entities.stalactite3(4.34, 6.33));
|
||||
add(entities.stalactite2(4.56, 7.00));
|
||||
add(entities.stalactite1(5.56, 10.29));
|
||||
add(entities.stalactite3(35.38, 11.83));
|
||||
add(entities.stalactite2(35.28, 12.21));
|
||||
add(entities.stalactite1(34.94, 11.79));
|
||||
add(entities.stalactite3(15.03, 22.29));
|
||||
add(entities.stalactite1(14.63, 22.17));
|
||||
|
||||
// storage room
|
||||
add(entities.table3(37.03, 23.71));
|
||||
add(entities.lanternOnTable(37.25, 23.75));
|
||||
add(entities.barrel(31.69, 24.71));
|
||||
add(entities.barrel(32.03, 25.50));
|
||||
add(entities.barrel(31.63, 26.17));
|
||||
add(entities.barrel(38.34, 25.75));
|
||||
add(entities.barrel(38.41, 27.04));
|
||||
add(entities.barrel(37.78, 26.38));
|
||||
add(entities.barrel(31.94, 26.96));
|
||||
add(entities.toolboxFull(34.28, 22.96)).interact = give(entities.pickaxe.type);
|
||||
add(entities.box(38.22, 29.96));
|
||||
add(entities.ropeRack(34.31, 22.20)).interact = give(entities.rope.type);
|
||||
add(entities.boxLanterns(35.63, 24.04)).interact = give(entities.lanternOn.type);
|
||||
add(entities.crate1A(38.19, 28.79));
|
||||
add(entities.crate1A(34.81, 28.58));
|
||||
add(entities.crate1A(34.72, 29.88));
|
||||
add(entities.crate2A(34.81, 30.67));
|
||||
|
||||
add(entities.ropeRack(34.31, 39.91)).interact = give(entities.rope.type);
|
||||
add(entities.crate1A(34.22, 43.38));
|
||||
add(entities.crate1A(33.91, 44.50));
|
||||
|
||||
function placeMineCart(x: number, y: number) {
|
||||
add(entities.mineCartBack(x + 0.22, y - 0.04));
|
||||
add(entities.mineCartFront(x + 0.22, y + 0.83));
|
||||
}
|
||||
|
||||
placeMineCart(41, 40);
|
||||
placeMineCart(45, 40);
|
||||
placeMineCart(16, 42);
|
||||
placeMineCart(8, 46);
|
||||
placeMineCart(12, 46);
|
||||
placeMineCart(15, 46);
|
||||
placeMineCart(28, 41);
|
||||
|
||||
map.controllers.push(new TorchController(world, map));
|
||||
map.controllers.push(new FlyingCritterController(world, map, entities.bat, 2, 10, () => true, true));
|
||||
|
||||
@@ -912,89 +38,7 @@ export function createCaveMap(world: World): ServerMap {
|
||||
return false;
|
||||
};
|
||||
|
||||
if (wallController.toggleWall) {
|
||||
// large crypt
|
||||
for (let x = 7; x <= 15; x++) {
|
||||
wallController.toggleWall(x, 3, TileType.WallH);
|
||||
}
|
||||
|
||||
for (let y = 3; y <= 10; y++) {
|
||||
wallController.toggleWall(16, y, TileType.WallV);
|
||||
}
|
||||
|
||||
for (let x = 13; x <= 15; x++) {
|
||||
wallController.toggleWall(x, 11, TileType.WallH);
|
||||
}
|
||||
|
||||
wallController.toggleWall(13, 11, TileType.WallV);
|
||||
|
||||
for (let x = 13; x <= 16; x++) {
|
||||
wallController.toggleWall(x, 12, TileType.WallH);
|
||||
}
|
||||
|
||||
wallController.toggleWall(17, 10, TileType.WallV);
|
||||
wallController.toggleWall(17, 11, TileType.WallV);
|
||||
|
||||
for (let x = 17; x <= 22; x++) {
|
||||
wallController.toggleWall(x, 10, TileType.WallH);
|
||||
}
|
||||
|
||||
for (let y = 10; y <= 15; y++) {
|
||||
wallController.toggleWall(23, y, TileType.WallV);
|
||||
}
|
||||
|
||||
for (let x = 17; x <= 22; x++) {
|
||||
wallController.toggleWall(x, 16, TileType.WallH);
|
||||
}
|
||||
|
||||
wallController.toggleWall(17, 15, TileType.WallV);
|
||||
|
||||
for (let x = 13; x <= 16; x++) {
|
||||
wallController.toggleWall(x, 15, TileType.WallH);
|
||||
}
|
||||
|
||||
// small crypt
|
||||
wallController.toggleWall(33, 31, TileType.WallH);
|
||||
wallController.toggleWall(34, 30, TileType.WallV);
|
||||
wallController.toggleWall(34, 29, TileType.WallV);
|
||||
wallController.toggleWall(34, 28, TileType.WallV);
|
||||
wallController.toggleWall(34, 27, TileType.WallV);
|
||||
wallController.toggleWall(33, 27, TileType.WallH);
|
||||
wallController.toggleWall(32, 27, TileType.WallH);
|
||||
wallController.toggleWall(31, 27, TileType.WallH);
|
||||
wallController.toggleWall(31, 26, TileType.WallV);
|
||||
wallController.toggleWall(31, 25, TileType.WallV);
|
||||
wallController.toggleWall(31, 24, TileType.WallV);
|
||||
wallController.toggleWall(31, 24, TileType.WallH);
|
||||
wallController.toggleWall(32, 23, TileType.WallV);
|
||||
wallController.toggleWall(32, 22, TileType.WallV);
|
||||
wallController.toggleWall(32, 22, TileType.WallH);
|
||||
wallController.toggleWall(33, 22, TileType.WallH);
|
||||
wallController.toggleWall(34, 22, TileType.WallH);
|
||||
wallController.toggleWall(35, 22, TileType.WallV);
|
||||
wallController.toggleWall(35, 23, TileType.WallH);
|
||||
wallController.toggleWall(36, 23, TileType.WallH);
|
||||
wallController.toggleWall(37, 23, TileType.WallH);
|
||||
wallController.toggleWall(38, 23, TileType.WallV);
|
||||
wallController.toggleWall(38, 24, TileType.WallV);
|
||||
wallController.toggleWall(38, 25, TileType.WallH);
|
||||
wallController.toggleWall(39, 25, TileType.WallV);
|
||||
wallController.toggleWall(39, 26, TileType.WallV);
|
||||
wallController.toggleWall(39, 27, TileType.WallV);
|
||||
wallController.toggleWall(39, 28, TileType.WallV);
|
||||
wallController.toggleWall(39, 29, TileType.WallV);
|
||||
wallController.toggleWall(38, 30, TileType.WallH);
|
||||
wallController.toggleWall(38, 30, TileType.WallV);
|
||||
wallController.toggleWall(38, 31, TileType.WallV);
|
||||
wallController.toggleWall(38, 32, TileType.WallV);
|
||||
wallController.toggleWall(38, 33, TileType.WallV);
|
||||
wallController.toggleWall(37, 34, TileType.WallH);
|
||||
wallController.toggleWall(36, 34, TileType.WallH);
|
||||
wallController.toggleWall(35, 34, TileType.WallH);
|
||||
wallController.toggleWall(34, 34, TileType.WallH);
|
||||
wallController.toggleWall(33, 34, TileType.WallH);
|
||||
wallController.toggleWall(33, 34, TileType.WallV);
|
||||
}
|
||||
loadBaseMap(world, map, caveMapFiles);
|
||||
|
||||
if (DEVELOPMENT) {
|
||||
addSpawnPointIndicators(world, map);
|
||||
|
||||
@@ -1,43 +1,17 @@
|
||||
import * as fs from 'fs';
|
||||
import * as entities from '../../common/entities';
|
||||
import { rect } from '../../common/rect';
|
||||
import { TileType } from '../../common/interfaces';
|
||||
import { createServerMap, deserializeMap } from '../serverMap';
|
||||
import { World, goToMap } from '../world';
|
||||
import { createSign } from '../controllerUtils';
|
||||
import { ServerEntity } from '../serverInterfaces';
|
||||
import { pathTo } from '../paths';
|
||||
import { createServerMap } from '../serverMap';
|
||||
import { World } from '../world';
|
||||
import { MapType } from '../../common/commonInterfaces';
|
||||
import { readMapFiles, loadBaseMap } from '../mapFiles';
|
||||
|
||||
// load tile data
|
||||
// To customize the map use in-game editor tools to change tiles, then use `/savemap custom` command,
|
||||
// your map will be saved to `/store/custom.json` file, move the file to `/src/maps/custom.json`
|
||||
// and restart the server.
|
||||
const mapData = JSON.parse(fs.readFileSync(pathTo('src', 'maps', 'custom.json'), 'utf8'));
|
||||
const customMapFiles = readMapFiles('custom');
|
||||
|
||||
export function createCustomMap(world: World) {
|
||||
// size: 4 by 4 regions -> 32 by 32 tiles
|
||||
// default tiles: grass
|
||||
const map = createServerMap('custom', MapType.None, 4, 4, TileType.Grass);
|
||||
|
||||
// initialize tiles
|
||||
deserializeMap(map, mapData);
|
||||
|
||||
// place default spawn point at the center of the map
|
||||
map.spawnArea = rect(map.width / 2, map.height / 2, 0, 0);
|
||||
|
||||
// shorthand for adding entities
|
||||
function add(entity: ServerEntity) {
|
||||
world.addEntity(entity, map);
|
||||
}
|
||||
|
||||
// place return sign 2 tiles north of center of the map
|
||||
add(createSign(map.width / 2, map.height / 2 - 2, 'Go back', (_, client) => goToMap(world, client, '', 'center')));
|
||||
|
||||
// place barrel at 5, 5 location
|
||||
add(entities.barrel(5, 5));
|
||||
|
||||
// place more entities here ...
|
||||
loadBaseMap(world, map, customMapFiles);
|
||||
|
||||
return map;
|
||||
}
|
||||
+10
-110
@@ -1,136 +1,34 @@
|
||||
import * as entities from '../../common/entities';
|
||||
import { rect } from '../../common/rect';
|
||||
import { ServerMap, MapUsage, ServerEntity } from '../serverInterfaces';
|
||||
import { World, goToMap } from '../world';
|
||||
import { ServerMap, MapUsage } from '../serverInterfaces';
|
||||
import { World } from '../world';
|
||||
import { addSpawnPointIndicators } from '../mapUtils';
|
||||
import { TileType, EntityState } from '../../common/interfaces';
|
||||
import { createServerMap, setTile, MapData, saveMap } from '../serverMap';
|
||||
import { createServerMap, MapData, saveMap } from '../serverMap';
|
||||
import { WallController } from '../controllers';
|
||||
import { resetRegionUpdates } from '../serverRegion';
|
||||
import { tileHeight, HOUSE_ENTITY_LIMIT } from '../../common/constants';
|
||||
import { getTile } from '../../common/tileUtils';
|
||||
import { MapFlags, MapType } from '../../common/commonInterfaces';
|
||||
import { readMapFiles, loadBaseMap } from '../mapFiles';
|
||||
|
||||
export let defaultHouseSave: MapData | undefined = undefined;
|
||||
|
||||
const toolboxX = 2.125;
|
||||
const toolboxY = 15.41;
|
||||
const houseMapFiles = readMapFiles('house');
|
||||
|
||||
export function createHouseMap(world: World, instanced: boolean, _template = false): ServerMap {
|
||||
const map = createServerMap('house', MapType.House, 2, 2, TileType.Wood, instanced ? MapUsage.Party : MapUsage.Public);
|
||||
|
||||
if (getTile(map, 0, 0) !== TileType.None) {
|
||||
for (let x = 0; x < map.width; x++) {
|
||||
setTile(map, x, 0, TileType.None);
|
||||
setTile(map, x, 1, TileType.None);
|
||||
setTile(map, x, 2, TileType.None);
|
||||
}
|
||||
}
|
||||
|
||||
setTile(map, 4, map.height - 1, TileType.Stone);
|
||||
setTile(map, 5, map.height - 1, TileType.Stone);
|
||||
|
||||
map.usage = instanced ? MapUsage.Party : MapUsage.Public;
|
||||
map.spawnArea = rect(4, 8 + 6, 2, 1);
|
||||
map.defaultTile = TileType.None;
|
||||
map.flags |= MapFlags.EditableWalls | MapFlags.EditableEntities | MapFlags.EditableTiles;
|
||||
map.editableEntityLimit = HOUSE_ENTITY_LIMIT;
|
||||
map.editableArea = rect(0, 76 / tileHeight, map.width, map.height);
|
||||
|
||||
const topWall = 3;
|
||||
const windowY = 76 / tileHeight;
|
||||
|
||||
const add = (entity: ServerEntity) => world.addEntity(entity, map);
|
||||
const addEditable = (entity: ServerEntity) => (entity.state |= EntityState.Editable, add(entity));
|
||||
|
||||
add(entities.triggerDoor(5, map.height))
|
||||
.trigger = (_, client) => goToMap(world, client, instanced ? 'island' : 'public-island', 'house');
|
||||
|
||||
addEditable(entities.window1(2, windowY));
|
||||
addEditable(entities.window1(5, windowY));
|
||||
addEditable(entities.window1(8, windowY));
|
||||
addEditable(entities.window1(12, windowY));
|
||||
addEditable(entities.window1(14, windowY));
|
||||
|
||||
addEditable(entities.picture1(3.53, windowY));
|
||||
addEditable(entities.picture2(10.09, windowY));
|
||||
|
||||
addEditable(entities.table1(13.50, 13.20));
|
||||
addEditable(entities.table1(2.69, 5.63));
|
||||
addEditable(entities.table2(8.69, 11.60));
|
||||
|
||||
addEditable(entities.lanternOn(3.53, 15.13));
|
||||
addEditable(entities.lanternOn(6.56, 15.13));
|
||||
addEditable(entities.lanternOn(1.43, 14.04));
|
||||
addEditable(entities.lanternOn(9.97, 6.67));
|
||||
addEditable(entities.lanternOn(13.50, 6.54));
|
||||
addEditable(entities.lanternOn(10.09, 15.13));
|
||||
addEditable(entities.lanternOn(14.09, 15.04));
|
||||
addEditable(entities.lanternOn(9.44, 4.67));
|
||||
addEditable(entities.lanternOn(14.43, 8.54));
|
||||
|
||||
addEditable(entities.lanternOnWall(8.375, 12.70));
|
||||
addEditable(entities.lanternOnWall(9.09, 12.08));
|
||||
addEditable(entities.lanternOnWall(13.50, 13.33));
|
||||
addEditable(entities.lanternOnWall(2.69, 5.71));
|
||||
|
||||
addEditable(entities.cushion1(3.94, 4.83));
|
||||
addEditable(entities.cushion1(1.56, 4.63));
|
||||
addEditable(entities.cushion1(6.91, 10.54));
|
||||
addEditable(entities.cushion1(10.38, 11.96));
|
||||
addEditable(entities.cushion1(10.56, 10.54));
|
||||
addEditable(entities.cushion1(6.91, 12.17));
|
||||
addEditable(entities.cushion1(8.88, 13.08));
|
||||
addEditable(entities.cushion1(8.84, 9.67));
|
||||
addEditable(entities.cushion1(13.25, 4.75));
|
||||
addEditable(entities.cushion1(14.50, 3.67));
|
||||
addEditable(entities.cushion1(15.38, 5.00));
|
||||
addEditable(entities.cushion1(14.13, 6.17));
|
||||
addEditable(entities.cushion1(14.69, 12.25));
|
||||
addEditable(entities.cushion1(12.31, 12.29));
|
||||
addEditable(entities.cushion1(9.94, 5.00));
|
||||
addEditable(entities.cushion1(8.03, 5.00));
|
||||
|
||||
addEditable(entities.boxLanterns(0.72, 15.58));
|
||||
addEditable(entities.toolboxFull(toolboxX, toolboxY));
|
||||
|
||||
const wallController = new WallController(world, map, entities.woodenWalls);
|
||||
map.controllers.push(wallController);
|
||||
wallController.top = 3;
|
||||
|
||||
if (wallController.toggleWall) {
|
||||
for (let x = 0; x < map.width; x++) {
|
||||
wallController.toggleWall(x, topWall, TileType.WallH);
|
||||
|
||||
if (x !== 4 && x !== 5) {
|
||||
wallController.toggleWall(x, map.height, TileType.WallH);
|
||||
}
|
||||
|
||||
if (x !== 5 && x !== 8 && x !== 12) {
|
||||
wallController.toggleWall(x, 8, TileType.WallH);
|
||||
}
|
||||
}
|
||||
|
||||
for (let x = 0; x < 3; x++) {
|
||||
wallController.toggleWall(x, 13, TileType.WallH);
|
||||
}
|
||||
|
||||
for (let y = topWall; y < 8; y++) {
|
||||
wallController.toggleWall(7, y, TileType.WallV);
|
||||
wallController.toggleWall(11, y, TileType.WallV);
|
||||
}
|
||||
|
||||
for (let y = 8; y < map.height; y++) {
|
||||
if (y !== 11 && y !== 14) {
|
||||
wallController.toggleWall(3, y, TileType.WallV);
|
||||
}
|
||||
}
|
||||
|
||||
for (let y = topWall; y < map.height; y++) {
|
||||
wallController.toggleWall(0, y, TileType.WallV);
|
||||
wallController.toggleWall(map.width, y, TileType.WallV);
|
||||
}
|
||||
}
|
||||
loadBaseMap(world, map, houseMapFiles);
|
||||
|
||||
wallController.lockOuterWalls = true;
|
||||
|
||||
@@ -182,8 +80,10 @@ export function removeToolbox(world: World, map: ServerMap) {
|
||||
export function restoreToolbox(world: World, map: ServerMap) {
|
||||
const toolbox = findEntityByType(map, entities.toolboxFull.type);
|
||||
|
||||
if (!toolbox) {
|
||||
const entity = entities.toolboxFull(toolboxX, toolboxY);
|
||||
const data = houseMapFiles.base.entities!.find(e => e.type === entities.getEntityTypeName(entities.toolboxFull.type));
|
||||
|
||||
if (!toolbox && data) {
|
||||
const entity = entities.toolboxFull(data.x, data.y);
|
||||
entity.state |= EntityState.Editable;
|
||||
world.addEntity(entity, map);
|
||||
}
|
||||
|
||||
+15
-342
@@ -1,25 +1,14 @@
|
||||
import * as fs from 'fs';
|
||||
import { sample } from 'lodash';
|
||||
import * as entities from '../../common/entities';
|
||||
import { pathTo } from '../paths';
|
||||
import { ServerMap, MapUsage, ServerEntity } from '../serverInterfaces';
|
||||
import { World, goToMap } from '../world';
|
||||
import {
|
||||
addSpawnPointIndicators, generateTileIndicesAndColliders, removePonies, worldForTemplates, createBunny
|
||||
} from '../mapUtils';
|
||||
import { serverMapInstanceFromTemplate, createServerMap, copyMapTiles, deserializeMap } from '../serverMap';
|
||||
import { ServerMap, MapUsage } from '../serverInterfaces';
|
||||
import { World } from '../world';
|
||||
import { addSpawnPointIndicators, generateTileIndicesAndColliders, removePonies, worldForTemplates } from '../mapUtils';
|
||||
import { serverMapInstanceFromTemplate, createServerMap, copyMapTiles, loadMap } from '../serverMap';
|
||||
import { TileType } from '../../common/interfaces';
|
||||
import { rect } from '../../common/rect';
|
||||
import { createAddLight, createSignWithText, createWoodenFenceMaker, createBoxOfLanterns } from '../controllerUtils';
|
||||
import { setEntityName, updateEntityOptions } from '../entityUtils';
|
||||
import { getNextToyOrExtra, holdItem } from '../playerUtils';
|
||||
import { tileWidth, tileHeight } from '../../common/constants';
|
||||
import { TorchController, UpdateController } from '../controllers';
|
||||
import { resetRegionUpdates } from '../serverRegion';
|
||||
import { point } from '../../common/utils';
|
||||
import { MapType, Season } from '../../common/commonInterfaces';
|
||||
import { MapType } from '../../common/commonInterfaces';
|
||||
import { readMapFiles, loadBaseMap, applySeasonLayers } from '../mapFiles';
|
||||
|
||||
const islandMapData = JSON.parse(fs.readFileSync(pathTo('src', 'maps', 'island.json'), 'utf8'));
|
||||
const islandMapFiles = readMapFiles('island');
|
||||
|
||||
let islandMapTemplate: ServerMap | undefined;
|
||||
|
||||
@@ -33,335 +22,19 @@ export function createIslandMap(world: World, instanced: boolean, template = fal
|
||||
createServerMap('island', MapType.Island, 7, 7, TileType.Water, instanced ? MapUsage.Party : MapUsage.Public);
|
||||
|
||||
map.usage = instanced ? MapUsage.Party : MapUsage.Public;
|
||||
map.spawnArea = rect(43.4, 20, 3.3, 2.5);
|
||||
map.spawns.set('house', rect(27, 24, 2, 2));
|
||||
|
||||
if (template) {
|
||||
loadMap(world, map, islandMapFiles.base, { loadSpawns: true });
|
||||
generateTileIndicesAndColliders(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
if (islandMapTemplate) {
|
||||
copyMapTiles(map, islandMapTemplate);
|
||||
}
|
||||
else {
|
||||
deserializeMap(map, islandMapData);
|
||||
}
|
||||
|
||||
const goto = instanced ? 'house' : 'public-house';
|
||||
const add = (entity: ServerEntity) => world.addEntity(entity, map);
|
||||
const addEntities = (entities: ServerEntity[]) => entities.map(add);
|
||||
|
||||
add(entities.house(28, 23)).interact = (_, client) => goToMap(world, client, goto);
|
||||
add(entities.triggerHouseDoor(27.40, 22.87)).trigger = (_, client) => goToMap(world, client, goto);
|
||||
|
||||
add(createBoxOfLanterns(25.5, 25.5));
|
||||
|
||||
const boxOfFruits = add(entities.boxFruits(20.72, 20.88));
|
||||
setEntityName(boxOfFruits, 'Box of fruits');
|
||||
|
||||
const giftPile = add(entities.giftPileInteractive(37.66, 18.21));
|
||||
giftPile.interact = (_, client) => updateEntityOptions(client.pony, getNextToyOrExtra(client));
|
||||
setEntityName(giftPile, 'Toy stash');
|
||||
|
||||
const types = entities.stashEntities.map(e => e.type);
|
||||
|
||||
const itemSign = add(entities.signQuest(24.41, 25.00));
|
||||
itemSign.interact = (_, client) => {
|
||||
const index = types.indexOf(client.pony.options!.hold || 0);
|
||||
holdItem(client.pony, types[(index + 1) % types.length]);
|
||||
};
|
||||
setEntityName(itemSign, 'Item stash');
|
||||
|
||||
const addTorch = createAddLight(world, map, entities.torch);
|
||||
|
||||
addTorch(25.00, 24.00);
|
||||
addTorch(39.69, 18.38);
|
||||
addTorch(39.66, 21.67);
|
||||
addTorch(23.34, 38.46);
|
||||
addTorch(28.16, 31.79);
|
||||
addTorch(29.13, 38.17);
|
||||
addTorch(30.84, 29.42);
|
||||
addTorch(29.69, 25.00);
|
||||
addTorch(20.00, 27.88);
|
||||
addTorch(22.63, 30.54);
|
||||
addTorch(19.22, 32.08);
|
||||
addTorch(25.50, 26.79);
|
||||
addTorch(15.94, 26.42);
|
||||
addTorch(15.88, 29.75);
|
||||
|
||||
// pier
|
||||
|
||||
const px = 1 / tileWidth;
|
||||
const plankWidth = 78 / tileWidth;
|
||||
const plankHeight = 12 / tileHeight;
|
||||
const plankOffsets = [0, -1, 0, -2, -1, -1, 0, -2, -1, 0].map(x => x / tileWidth);
|
||||
|
||||
addEntities(entities.fullBoat(45.06, 24));
|
||||
add(entities.pierLeg(41.31, 20.54));
|
||||
add(entities.pierLeg(43.00, 22.58));
|
||||
add(entities.pierLeg(44.84, 22.58));
|
||||
add(entities.pierLeg(46.65, 22.58));
|
||||
add(entities.barrel(46.83, 23.35));
|
||||
add(entities.lanternOn(46.19, 23.38));
|
||||
add(entities.lanternOn(42.63, 21.42));
|
||||
add(entities.lanternOn(47.00, 18.96));
|
||||
add(entities.triggerBoat(45.5, 24.8)).interact = (_, client) => goToMap(world, client, '', 'harbor');
|
||||
add(createSignWithText(43, 23.5, 'Return to land', `Hop on the boat to return to the mainland`));
|
||||
|
||||
for (let y = 0; y < 10; y++) {
|
||||
const minX = y < 5 ? 0 : 1;
|
||||
const maxX = (y % 2) ? 4 : 3;
|
||||
const baseX = 40 + ((y % 2) ? 0 : (plankWidth / 2)) + plankOffsets[y];
|
||||
const baseY = 19 - (9 / tileHeight);
|
||||
|
||||
for (let x = minX; x < maxX; x++) {
|
||||
if ((x === minX && (y % 2)) || (x === (maxX - 1) && (y % 2))) {
|
||||
const ox = x === minX ? (18 / tileWidth) : (-18 / tileWidth);
|
||||
const plank = sample(entities.planksShort)!;
|
||||
add(plank(baseX + ox + x * plankWidth, baseY + y * plankHeight));
|
||||
}
|
||||
else {
|
||||
const plank = sample(entities.planks)!;
|
||||
add(plank(baseX + x * plankWidth, baseY + y * plankHeight));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add(entities.plankShadow(41.31, 20.58));
|
||||
add(entities.plankShadowShort(43.03, 21.08));
|
||||
add(entities.plankShadowShort(43, 21.08 + plankHeight * 2));
|
||||
|
||||
const baseY = 18.58;
|
||||
const baseX = 46.71;
|
||||
add(entities.plankShadowShort(baseX, baseY));
|
||||
add(entities.plankShadowShort(baseX + 2 * px, baseY + plankHeight));
|
||||
add(entities.plankShadowShort(baseX, baseY + plankHeight * 2));
|
||||
add(entities.plankShadowShort(baseX + 1 * px, baseY + plankHeight * 3));
|
||||
add(entities.plankShadowShort(baseX - 1 * px, baseY + plankHeight * 4));
|
||||
add(entities.plankShadowShort(baseX + 2 * px, baseY + plankHeight * 5));
|
||||
add(entities.plankShadowShort(baseX, baseY + plankHeight * 6));
|
||||
add(entities.plankShadowShort(baseX + 1 * px, baseY + plankHeight * 7));
|
||||
add(entities.plankShadowShort(baseX - 1 * px, baseY + plankHeight * 8));
|
||||
add(entities.plankShadowShort(baseX + 3 * px, baseY + plankHeight * 9));
|
||||
|
||||
add(entities.collider3x1(40, 18));
|
||||
add(entities.collider3x1(43, 18));
|
||||
add(entities.collider2x1(46, 18));
|
||||
add(entities.collider1x3(47, 19));
|
||||
add(entities.collider1x3(47, 22));
|
||||
|
||||
add(entities.collider3x1(40, 21));
|
||||
add(entities.collider1x3(42, 22));
|
||||
add(entities.collider1x1(43, 24));
|
||||
add(entities.collider3x1(42, 25));
|
||||
add(entities.collider3x1(45, 25));
|
||||
add(entities.collider1x3(47.6, 23));
|
||||
add(entities.collider1x3(41.5, 22));
|
||||
|
||||
// lone boat
|
||||
|
||||
addEntities(entities.fullBoat(27.12, 42, false));
|
||||
add(entities.plankShort3(27.43, 39.67));
|
||||
add(entities.plankShort3(27.46, 40.21));
|
||||
add(entities.plankShort3(27.43, 40.75));
|
||||
add(entities.plankShort3(27.46, 41.21));
|
||||
add(entities.pierLeg(27.96, 40.88));
|
||||
add(entities.pierLeg(27.02, 40.79));
|
||||
add(entities.plankShadowShort(27.5, 39.67));
|
||||
add(entities.plankShadowShort(27.5 + 1 * px, 39.67 + plankHeight));
|
||||
add(entities.plankShadowShort(27.5, 39.67 + plankHeight * 2));
|
||||
add(entities.plankShadowShort(27.5 + 1 * px, 39.67 + plankHeight * 3));
|
||||
add(entities.lanternOn(28.77, 42.27));
|
||||
|
||||
add(entities.collider3x1(24, 41));
|
||||
add(entities.collider2x1(24, 42));
|
||||
add(entities.collider1x2(26, 40));
|
||||
add(entities.collider1x2(28, 40));
|
||||
add(entities.collider2x1(28, 41));
|
||||
add(entities.collider3x1(24, 43));
|
||||
add(entities.collider3x1(27, 43));
|
||||
add(entities.collider1x1(29, 42));
|
||||
add(entities.collider1x3(29.7, 41));
|
||||
add(entities.collider1x3(23.5, 41));
|
||||
|
||||
const addWoodenFence = createWoodenFenceMaker(world, map);
|
||||
|
||||
addWoodenFence(20, 20, 4);
|
||||
addWoodenFence(20, 20, 4, false, true);
|
||||
addWoodenFence(24, 20, 4, false, true);
|
||||
addWoodenFence(20, 24, 1, true, true);
|
||||
addWoodenFence(23, 24, 1, true, false, true);
|
||||
|
||||
addEntities(entities.tree(22.41, 18.21, 0));
|
||||
addEntities(entities.tree(30.44, 23.46, 1 + 4));
|
||||
addEntities(entities.tree5(34.53, 27.04, 0));
|
||||
addEntities(entities.tree5(19.28, 21.75, 1));
|
||||
add(entities.pumpkin(23.22, 20.58));
|
||||
add(entities.pumpkin(20.53, 22.29));
|
||||
add(entities.pumpkin(20.91, 23.08));
|
||||
add(entities.largeLeafedBush2(35.03, 26.71));
|
||||
add(entities.largeLeafedBush4(34.13, 27.54));
|
||||
add(entities.largeLeafedBush2(20.34, 24.42));
|
||||
add(entities.largeLeafedBush3(19.72, 24.04));
|
||||
add(entities.largeLeafedBush3(23.03, 38.67));
|
||||
add(entities.largeLeafedBush4(23.72, 38.04));
|
||||
add(entities.barrel(39.53, 18.96));
|
||||
add(entities.barrel(38.78, 18.38));
|
||||
add(entities.barrel(38.47, 19.21));
|
||||
add(entities.barrel(24.63, 23.50));
|
||||
add(entities.treeStump1(20.25, 36.46));
|
||||
add(entities.lanternOn(20.75, 37.00));
|
||||
add(entities.lanternOn(36.06, 34.25));
|
||||
add(entities.lanternOn(37.63, 36.83));
|
||||
add(entities.lanternOn(37.84, 26.94));
|
||||
|
||||
add(entities.waterRock1(22.63, 41.83));
|
||||
add(entities.waterRock1(28.56, 13.75));
|
||||
add(entities.waterRock1(16.25, 20.88));
|
||||
add(entities.waterRock1(40.62, 29.62));
|
||||
add(entities.waterRock1(40.63, 17.96));
|
||||
add(entities.waterRock2(40.22, 17.50));
|
||||
add(entities.waterRock2(20.34, 15.75));
|
||||
add(entities.waterRock2(15.41, 34.13));
|
||||
add(entities.waterRock2(36.50, 40.63));
|
||||
add(entities.waterRock3(36.13, 40.96));
|
||||
add(entities.waterRock3(41.63, 34.38));
|
||||
add(entities.waterRock3(15.16, 34.67));
|
||||
add(entities.waterRock3(20.88, 15.50));
|
||||
add(entities.waterRock4(36.56, 41.13));
|
||||
add(entities.waterRock4(40.72, 17.29));
|
||||
add(entities.waterRock4(28.22, 13.25));
|
||||
add(entities.waterRock5(28.66, 13.17));
|
||||
add(entities.waterRock5(16.84, 20.42));
|
||||
add(entities.waterRock5(14.44, 30.50));
|
||||
add(entities.waterRock5(23.13, 41.88));
|
||||
add(entities.waterRock5(30.44, 39.71));
|
||||
add(entities.waterRock5(41.84, 34.83));
|
||||
add(entities.waterRock5(36.63, 14.75));
|
||||
add(entities.waterRock6(36.25, 14.54));
|
||||
add(entities.waterRock6(14.84, 34.29));
|
||||
add(entities.waterRock6(40.44, 38.71));
|
||||
add(entities.waterRock7(42.13, 34.42));
|
||||
add(entities.waterRock7(20.34, 15.25));
|
||||
add(entities.waterRock7(28.78, 40.79));
|
||||
add(entities.waterRock7(22.66, 42.08));
|
||||
add(entities.waterRock8(22.25, 41.92));
|
||||
add(entities.waterRock8(14.13, 30.79));
|
||||
add(entities.waterRock8(16.28, 20.21));
|
||||
add(entities.waterRock8(42.19, 34.79));
|
||||
add(entities.waterRock9(36.78, 14.29));
|
||||
add(entities.waterRock9(13.97, 30.33));
|
||||
add(entities.waterRock10(14.50, 25.83));
|
||||
add(entities.waterRock10(18.88, 40.75));
|
||||
add(entities.waterRock11(25.37, 13.75));
|
||||
add(entities.waterRock11(18.44, 40.58));
|
||||
add(entities.waterRock11(15.41, 24.33));
|
||||
add(entities.waterRock4(15.13, 23.96));
|
||||
add(entities.waterRock11(35.38, 31.08));
|
||||
add(entities.waterRock8(35.09, 30.71));
|
||||
add(entities.waterRock3(34.03, 29.79));
|
||||
add(entities.waterRock4(34.31, 29.67));
|
||||
add(entities.waterRock4(24.50, 35.92));
|
||||
add(entities.waterRock3(33.44, 38.21));
|
||||
add(entities.waterRock4(33.16, 37.92));
|
||||
add(entities.waterRock1(25.50, 17.79));
|
||||
add(entities.waterRock9(25.66, 18.13));
|
||||
add(entities.waterRock4(25.97, 17.79));
|
||||
|
||||
add(entities.flower3Pickable(30.25, 24.92)).interact = (_, { pony }) => holdItem(pony, entities.flowerPick.type);
|
||||
|
||||
add(entities.bench1(37.78, 24.96));
|
||||
add(entities.benchSeat(37.75, 28.29));
|
||||
add(entities.benchBack(37.75, 29.17));
|
||||
|
||||
// small island bit
|
||||
addEntities(entities.tree(9.16, 16.50, 2 + 8));
|
||||
add(entities.waterRock1(5.34, 23.71));
|
||||
add(entities.waterRock1(13.28, 14.33));
|
||||
add(entities.waterRock1(11.19, 24.83));
|
||||
add(entities.waterRock3(10.94, 25.21));
|
||||
add(entities.waterRock3(6.31, 18.92));
|
||||
add(entities.waterRock3(13.59, 14.71));
|
||||
add(entities.waterRock5(13.84, 14.17));
|
||||
add(entities.waterRock4(11.38, 25.13));
|
||||
add(entities.waterRock6(6.41, 15.92));
|
||||
add(entities.waterRock8(5.16, 23.13));
|
||||
add(entities.waterRock10(6.06, 16.33));
|
||||
add(entities.waterRock11(14.66, 20.75));
|
||||
add(entities.torch(9.31, 17.83));
|
||||
add(entities.torch(9.44, 21.67));
|
||||
add(entities.torch(12.75, 18.29));
|
||||
|
||||
if (world.season === Season.Summer || world.season === Season.Spring) {
|
||||
add(entities.flowerPatch1(21.16, 26.04));
|
||||
add(entities.flowerPatch3(35.81, 34.75));
|
||||
add(entities.flowerPatch3(23.09, 32.29));
|
||||
add(entities.flowerPatch5(19.63, 33.04));
|
||||
add(entities.flowerPatch5(37.38, 26.42));
|
||||
add(entities.flowerPatch5(18.75, 26.38));
|
||||
add(entities.flowerPatch5(35.38, 33.88));
|
||||
add(entities.flowerPatch6(25.78, 31.04));
|
||||
add(entities.flowerPatch6(33.00, 33.79));
|
||||
add(entities.flowerPatch6(38.72, 26.00));
|
||||
add(entities.flowerPatch3(11.34, 19.33));
|
||||
add(entities.flowerPatch6(11.09, 17.79));
|
||||
add(entities.flowerPatch7(8.63, 21.67));
|
||||
}
|
||||
|
||||
if (world.season === Season.Autumn) {
|
||||
add(entities.leafpileStickRed(31.00, 22.75));
|
||||
add(entities.leaves5(18.41, 21.46));
|
||||
add(entities.leaves2(21.59, 18.17));
|
||||
add(entities.leaves2(23.56, 18.00));
|
||||
add(entities.leaves1(22.00, 17.21));
|
||||
add(entities.leaves1(22.47, 20.00));
|
||||
add(entities.leaves2(33.69, 25.42));
|
||||
add(entities.leaves1(33.47, 26.75));
|
||||
add(entities.leaves1(35.66, 27.08));
|
||||
add(entities.leaves3(30.31, 24.04));
|
||||
add(entities.leaves1(31.56, 23.00));
|
||||
add(entities.leaves1(29.47, 23.21));
|
||||
add(entities.leaves3(8.84, 17.04));
|
||||
add(entities.leaves2(8.91, 15.25));
|
||||
add(entities.leaves1(10.44, 16.46));
|
||||
}
|
||||
|
||||
addEntities(createBunny([
|
||||
point(22.19, 27.25),
|
||||
point(19.75, 26.13),
|
||||
point(18.44, 29.04),
|
||||
point(20.41, 31.42),
|
||||
point(19.94, 33.04),
|
||||
point(22.88, 33.67),
|
||||
point(24.91, 31.25),
|
||||
point(26.09, 32.50),
|
||||
point(26.34, 34.83),
|
||||
point(32.50, 35.46),
|
||||
point(34.03, 34.67),
|
||||
point(36.06, 36.50),
|
||||
point(36.47, 35.33),
|
||||
point(36.22, 34.63),
|
||||
point(33.63, 34.83),
|
||||
point(31.88, 33.25),
|
||||
point(32.00, 28.46),
|
||||
point(33.22, 25.75),
|
||||
point(35.09, 24.75),
|
||||
point(36.13, 25.67),
|
||||
point(36.72, 27.38),
|
||||
point(38.31, 27.42),
|
||||
point(38.63, 26.54),
|
||||
point(37.31, 26.63),
|
||||
point(36.06, 26.42),
|
||||
point(35.34, 24.29),
|
||||
point(33.13, 25.83),
|
||||
point(30.06, 25.13),
|
||||
point(26.50, 26.38),
|
||||
point(24.66, 28.25),
|
||||
point(22.25, 28.50),
|
||||
point(20.97, 27.00),
|
||||
point(19.13, 27.13),
|
||||
point(20.69, 29.25),
|
||||
point(22.34, 29.42),
|
||||
point(21.53, 31.46),
|
||||
point(23.50, 31.54),
|
||||
point(23.81, 29.71),
|
||||
]));
|
||||
loadBaseMap(world, map, islandMapFiles, { skipTiles: !!islandMapTemplate });
|
||||
applySeasonLayers(world, map, islandMapFiles, world.season, world.holiday);
|
||||
|
||||
map.controllers.push(new TorchController(world, map));
|
||||
map.controllers.push(new UpdateController(map));
|
||||
|
||||
+52
-4561
File diff suppressed because it is too large.
Load diff
@@ -2,12 +2,13 @@ import * as entities from '../../common/entities';
|
||||
import { rect } from '../../common/rect';
|
||||
import { TileType } from '../../common/interfaces';
|
||||
import { createServerMap } from '../serverMap';
|
||||
import { World, goToMap } from '../world';
|
||||
import { World } from '../world';
|
||||
import { allEntities } from '../api/account';
|
||||
import { createSign } from '../controllerUtils';
|
||||
import { ServerEntity } from '../serverInterfaces';
|
||||
import { setEntityName } from '../entityUtils';
|
||||
import { MapType } from '../../common/commonInterfaces';
|
||||
import { interactBehavior, createBehaviorContext } from '../mapBehaviors';
|
||||
|
||||
export function createPaletteMap(world: World) {
|
||||
const map = createServerMap('palette', MapType.None, 10, 10, TileType.Grass);
|
||||
@@ -18,7 +19,8 @@ export function createPaletteMap(world: World) {
|
||||
world.addEntity(entity, map);
|
||||
}
|
||||
|
||||
add(createSign(map.width / 2, map.height / 2, 'Go back', (_, client) => goToMap(world, client, '', 'center')));
|
||||
const goBack = interactBehavior({ action: 'goToMap', args: { map: '', spawn: 'center' } }, createBehaviorContext(world, map));
|
||||
add(createSign(map.width / 2, map.height / 2, 'Go back', goBack));
|
||||
|
||||
const pad = 5;
|
||||
let x = pad;
|
||||
|
||||
@@ -259,6 +259,8 @@ export interface ServerEntity extends Entity {
|
||||
|
||||
// other
|
||||
lightDelay?: number;
|
||||
tag?: string;
|
||||
layer?: string;
|
||||
|
||||
// cached info & name
|
||||
nameBad?: boolean;
|
||||
|
||||
+239
-41
@@ -1,7 +1,7 @@
|
||||
import { writeFileAsync, readFileAsync, writeFileSync } from 'fs';
|
||||
import { fromByteArray } from 'base64-js';
|
||||
import {
|
||||
TileType, MapInfo, MapState, defaultMapState, Rect, ServerFlags, EntityFlags, EntityState
|
||||
TileType, MapInfo, MapState, defaultMapState, Rect, ServerFlags, EntityFlags, EntityState, defaultWorldState
|
||||
} from '../common/interfaces';
|
||||
import { distanceSquaredXY, containsPoint, hasFlag } from '../common/utils';
|
||||
import { POSITION_MAX } from '../common/movementUtils';
|
||||
@@ -12,7 +12,7 @@ import { snapshotRegionTiles, setRegionTile, createServerRegion, getSizeOfRegion
|
||||
import { ServerEntity, ServerRegion, ServerMap, MapUsage } from './serverInterfaces';
|
||||
import { getTileColor } from '../common/colors';
|
||||
import { World } from './world';
|
||||
import { REGION_SIZE, REGION_HEIGHT, REGION_WIDTH, tileWidth, tileHeight } from '../common/constants';
|
||||
import { REGION_SIZE, REGION_HEIGHT, REGION_WIDTH, tileWidth, tileHeight, PONY_TYPE } from '../common/constants';
|
||||
import { pathTo } from './paths';
|
||||
import { createCanvas } from './canvasUtilsNode';
|
||||
import { mockPaletteManager } from '../common/ponyInfo';
|
||||
@@ -21,6 +21,9 @@ import { WallController } from './controllers/wallController';
|
||||
import { getTile } from '../common/tileUtils';
|
||||
import { getRegion, getRegionGlobal } from '../common/region';
|
||||
import { MapFlags, MapType } from '../common/commonInterfaces';
|
||||
import {
|
||||
BehaviorDef, behaviorKinds, getEntityBehavior, getBehaviorDef, isDerivedBehavior, setBehavior, createBehaviorContext
|
||||
} from './mapBehaviors';
|
||||
|
||||
export interface EntityData {
|
||||
type: string;
|
||||
@@ -28,14 +31,26 @@ export interface EntityData {
|
||||
y: number;
|
||||
options?: any;
|
||||
name?: string;
|
||||
tag?: string;
|
||||
editable?: boolean;
|
||||
interact?: BehaviorDef;
|
||||
trigger?: BehaviorDef;
|
||||
boop?: BehaviorDef;
|
||||
update?: BehaviorDef;
|
||||
}
|
||||
|
||||
export interface MapData {
|
||||
export interface MapLayerData {
|
||||
entities?: EntityData[];
|
||||
lockedTiles?: number[];
|
||||
}
|
||||
|
||||
export interface MapData extends MapLayerData {
|
||||
width: number;
|
||||
height: number;
|
||||
tiles?: string;
|
||||
entities?: EntityData[];
|
||||
walls?: string;
|
||||
spawnArea?: Rect;
|
||||
spawns?: { [name: string]: Rect; };
|
||||
}
|
||||
|
||||
export interface MapLoadOptions {
|
||||
@@ -45,6 +60,9 @@ export interface MapLoadOptions {
|
||||
loadEntities?: boolean;
|
||||
loadEntitiesAsEditable?: boolean;
|
||||
loadWalls?: boolean;
|
||||
loadSpawns?: boolean;
|
||||
loadLockedTiles?: boolean;
|
||||
serverFlags?: ServerFlags;
|
||||
}
|
||||
|
||||
export interface MapSaveOptions {
|
||||
@@ -52,6 +70,10 @@ export interface MapSaveOptions {
|
||||
saveEntities?: boolean;
|
||||
saveOnlyEditableEntities?: boolean;
|
||||
saveWalls?: boolean;
|
||||
saveSpawns?: boolean;
|
||||
saveLockedTiles?: boolean;
|
||||
filter?: (entity: ServerEntity) => boolean;
|
||||
warn?: (message: string) => void;
|
||||
}
|
||||
|
||||
export function createServerMap(
|
||||
@@ -204,29 +226,118 @@ export function deserializeMap(map: ServerMap, { tiles, width }: MapData, { offs
|
||||
}
|
||||
}
|
||||
|
||||
export function isSaveableEntity(entity: ServerEntity) {
|
||||
return entity.type !== PONY_TYPE
|
||||
&& entity.client === undefined
|
||||
&& !hasFlag(entity.serverFlags, ServerFlags.DoNotSave)
|
||||
&& !hasFlag(entity.flags, EntityFlags.Debug)
|
||||
&& !(hasFlag(entity.flags, EntityFlags.Critter) && hasFlag(entity.flags, EntityFlags.Movable));
|
||||
}
|
||||
|
||||
function defaultWarn(message: string) {
|
||||
console.warn(message);
|
||||
}
|
||||
|
||||
export function serializeEntity(entity: ServerEntity, warn = defaultWarn): EntityData {
|
||||
const data: EntityData = { type: getEntityTypeName(entity.type), x: entity.x, y: entity.y };
|
||||
|
||||
if (entity.options && Object.keys(entity.options).length > 0) {
|
||||
data.options = entity.options;
|
||||
}
|
||||
|
||||
if (entity.name) {
|
||||
data.name = entity.name;
|
||||
}
|
||||
|
||||
if (entity.tag) {
|
||||
data.tag = entity.tag;
|
||||
}
|
||||
|
||||
if (hasFlag(entity.state, EntityState.Editable)) {
|
||||
data.editable = true;
|
||||
}
|
||||
|
||||
for (const kind of behaviorKinds) {
|
||||
const callback = getEntityBehavior(entity, kind);
|
||||
|
||||
if (callback) {
|
||||
const def = getBehaviorDef(callback);
|
||||
|
||||
if (def) {
|
||||
data[kind] = def;
|
||||
}
|
||||
else if (!isDerivedBehavior(callback)) {
|
||||
warn(`Entity ${data.type} (${entity.x}, ${entity.y}) has ${kind} callback that can't be saved`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
export function serializeEntities(entities: ServerEntity[], warn?: (message: string) => void): EntityData[] {
|
||||
return entities
|
||||
.slice()
|
||||
.sort((a, b) => a.id - b.id)
|
||||
.map(e => serializeEntity(e, warn));
|
||||
}
|
||||
|
||||
export function encodeLockedTiles(tiles: Iterable<number>): number[] {
|
||||
const sorted = Array.from(tiles).sort((a, b) => a - b);
|
||||
const result: number[] = [];
|
||||
|
||||
for (let i = 0; i < sorted.length; i++) {
|
||||
const start = sorted[i];
|
||||
let count = 1;
|
||||
|
||||
while (i + 1 < sorted.length && sorted[i + 1] === start + count) {
|
||||
count++;
|
||||
i++;
|
||||
}
|
||||
|
||||
result.push(start, count);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
export function decodeLockedTiles(ranges: number[] | undefined, target = new Set<number>()) {
|
||||
if (ranges) {
|
||||
for (let i = 0; i + 1 < ranges.length; i += 2) {
|
||||
for (let j = 0; j < ranges[i + 1]; j++) {
|
||||
target.add(ranges[i] + j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
export function saveMap(map: ServerMap, saveOptions: MapSaveOptions): MapData {
|
||||
const data: MapData = { width: map.width, height: map.height };
|
||||
|
||||
if (saveOptions.saveSpawns) {
|
||||
data.spawnArea = { ...map.spawnArea };
|
||||
data.spawns = {};
|
||||
|
||||
map.spawns.forEach((value, key) => data.spawns![key] = { ...value });
|
||||
}
|
||||
|
||||
if (saveOptions.saveTiles) {
|
||||
data.tiles = serializeMap(map).tiles;
|
||||
}
|
||||
|
||||
if (saveOptions.saveLockedTiles) {
|
||||
data.lockedTiles = encodeLockedTiles(map.lockedTiles);
|
||||
}
|
||||
|
||||
if (saveOptions.saveEntities) {
|
||||
data.entities = [];
|
||||
const filter = saveOptions.filter;
|
||||
const entities = findEntities(map, entity => isSaveableEntity(entity)
|
||||
&& (!saveOptions.saveOnlyEditableEntities || hasFlag(entity.state, EntityState.Editable))
|
||||
&& (!filter || filter(entity)));
|
||||
|
||||
for (const region of map.regions) {
|
||||
for (const entity of region.entities) {
|
||||
if (!hasFlag(entity.serverFlags, ServerFlags.DoNotSave) && !hasFlag(entity.flags, EntityFlags.Debug)) {
|
||||
if (saveOptions.saveOnlyEditableEntities && !hasFlag(entity.state, EntityState.Editable)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const options = entity.options && Object.keys(entity.options).length > 0 ? entity.options : undefined;
|
||||
const name = entity.name;
|
||||
data.entities.push({ type: getEntityTypeName(entity.type), x: entity.x, y: entity.y, options, name });
|
||||
}
|
||||
}
|
||||
}
|
||||
data.entities = serializeEntities(entities, saveOptions.warn);
|
||||
}
|
||||
|
||||
if (saveOptions.saveWalls) {
|
||||
@@ -240,10 +351,32 @@ export function saveMap(map: ServerMap, saveOptions: MapSaveOptions): MapData {
|
||||
return data;
|
||||
}
|
||||
|
||||
export function stringifyMapData(data: MapData | MapLayerData): string {
|
||||
const object = data as any;
|
||||
const keys = Object.keys(object).filter(key => object[key] !== undefined);
|
||||
const lines = ['{'];
|
||||
|
||||
keys.forEach((key, i) => {
|
||||
const value = object[key];
|
||||
const comma = i < keys.length - 1 ? ',' : '';
|
||||
|
||||
if (key === 'entities' && Array.isArray(value) && value.length) {
|
||||
lines.push(`\t${JSON.stringify(key)}: [`);
|
||||
value.forEach((entity, j) => lines.push(`\t\t${JSON.stringify(entity)}${j < value.length - 1 ? ',' : ''}`));
|
||||
lines.push(`\t]${comma}`);
|
||||
}
|
||||
else {
|
||||
lines.push(`\t${JSON.stringify(key)}: ${JSON.stringify(value)}${comma}`);
|
||||
}
|
||||
});
|
||||
|
||||
lines.push('}');
|
||||
return lines.join('\n') + '\n';
|
||||
}
|
||||
|
||||
export async function saveMapToFile(map: ServerMap, fileName: string, options: MapSaveOptions) {
|
||||
const data = saveMap(map, options);
|
||||
const json = JSON.stringify(data, null, 2);
|
||||
await writeFileAsync(fileName, json, 'utf8');
|
||||
await writeFileAsync(fileName, stringifyMapData(data), 'utf8');
|
||||
}
|
||||
|
||||
export async function saveMapToFileBinary(map: ServerMap, fileName: string) {
|
||||
@@ -282,6 +415,72 @@ export async function saveEntitiesToFile(map: ServerMap, fileName: string) {
|
||||
await writeFileAsync(fileName, lines.join('\n'), 'utf8');
|
||||
}
|
||||
|
||||
export interface LoadEntitiesOptions {
|
||||
editable?: boolean;
|
||||
serverFlags?: ServerFlags;
|
||||
layer?: string;
|
||||
}
|
||||
|
||||
export function loadEntities(
|
||||
world: World, map: ServerMap, entities: EntityData[], { editable = false, serverFlags = 0, layer }: LoadEntitiesOptions = {}
|
||||
): ServerEntity[] {
|
||||
const tagged = new Map<string, ServerEntity>();
|
||||
const ctx = createBehaviorContext(world, map);
|
||||
const getTagged = ctx.getTagged;
|
||||
ctx.getTagged = tag => tagged.get(tag) || getTagged(tag);
|
||||
|
||||
const worldState = { season: world.season || defaultWorldState.season };
|
||||
|
||||
const created = entities.map(data => {
|
||||
const typeNumber = getEntityType(data.type);
|
||||
|
||||
if (!typeNumber) {
|
||||
throw new Error(`Invalid entity type (${data.type})`);
|
||||
}
|
||||
|
||||
const options = data.options && JSON.parse(JSON.stringify(data.options));
|
||||
const entity = createAnEntity(typeNumber, 0, data.x, data.y, options, mockPaletteManager, worldState) as ServerEntity;
|
||||
|
||||
if (layer) {
|
||||
entity.layer = layer;
|
||||
}
|
||||
|
||||
if (data.name) {
|
||||
setEntityName(entity, data.name);
|
||||
}
|
||||
|
||||
if (data.tag) {
|
||||
entity.tag = data.tag;
|
||||
tagged.set(data.tag, entity);
|
||||
}
|
||||
|
||||
if (editable || data.editable) {
|
||||
entity.state |= EntityState.Editable;
|
||||
}
|
||||
|
||||
if (serverFlags) {
|
||||
entity.serverFlags = (entity.serverFlags || 0) | serverFlags;
|
||||
}
|
||||
|
||||
return entity;
|
||||
});
|
||||
|
||||
for (let i = 0; i < created.length; i++) {
|
||||
const data = entities[i];
|
||||
const entity = created[i];
|
||||
|
||||
for (const kind of behaviorKinds) {
|
||||
const def = data[kind];
|
||||
|
||||
if (def) {
|
||||
setBehavior(entity, kind, def, ctx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return created.map(entity => world.addEntity(entity, map));
|
||||
}
|
||||
|
||||
export function loadMap(world: World, map: ServerMap, data: MapData, loadOptions: MapLoadOptions) {
|
||||
if (data.tiles) {
|
||||
deserializeMap(map, data, loadOptions);
|
||||
@@ -291,16 +490,25 @@ export function loadMap(world: World, map: ServerMap, data: MapData, loadOptions
|
||||
return;
|
||||
}
|
||||
|
||||
if (loadOptions.loadEntitiesAsEditable) {
|
||||
const entitiesToRemove: ServerEntity[] = [];
|
||||
if (loadOptions.loadSpawns) {
|
||||
if (data.spawnArea) {
|
||||
map.spawnArea = rect(data.spawnArea.x, data.spawnArea.y, data.spawnArea.w, data.spawnArea.h);
|
||||
}
|
||||
|
||||
for (const region of map.regions) {
|
||||
for (const entity of region.entities) {
|
||||
if (hasFlag(entity.state, EntityState.Editable)) {
|
||||
entitiesToRemove.push(entity);
|
||||
}
|
||||
if (data.spawns) {
|
||||
for (const key of Object.keys(data.spawns)) {
|
||||
const { x, y, w, h } = data.spawns[key];
|
||||
map.spawns.set(key, rect(x, y, w, h));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (loadOptions.loadLockedTiles) {
|
||||
decodeLockedTiles(data.lockedTiles, map.lockedTiles);
|
||||
}
|
||||
|
||||
if (loadOptions.loadEntitiesAsEditable) {
|
||||
const entitiesToRemove = findEntities(map, entity => hasFlag(entity.state, EntityState.Editable));
|
||||
|
||||
for (const entity of entitiesToRemove) {
|
||||
world.removeEntity(entity, map);
|
||||
@@ -308,20 +516,10 @@ export function loadMap(world: World, map: ServerMap, data: MapData, loadOptions
|
||||
}
|
||||
|
||||
if (loadOptions.loadEntities && data.entities) {
|
||||
for (const { x, y, type, name, options } of data.entities) {
|
||||
const typeNumber = getEntityType(type);
|
||||
const entity = createAnEntity(typeNumber, 0, x, y, options, mockPaletteManager, world);
|
||||
|
||||
if (name) {
|
||||
setEntityName(entity, name);
|
||||
}
|
||||
|
||||
if (loadOptions.loadEntitiesAsEditable) {
|
||||
entity.state |= EntityState.Editable;
|
||||
}
|
||||
|
||||
world.addEntity(entity, map);
|
||||
}
|
||||
loadEntities(world, map, data.entities, {
|
||||
editable: loadOptions.loadEntitiesAsEditable,
|
||||
serverFlags: loadOptions.serverFlags,
|
||||
});
|
||||
}
|
||||
|
||||
if (loadOptions.loadWalls && data.walls) {
|
||||
|
||||
@@ -0,0 +1,271 @@
|
||||
import '../lib';
|
||||
import { expect } from 'chai';
|
||||
import { stub } from 'sinon';
|
||||
import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import * as entities from '../../common/entities';
|
||||
import { EntityState, ServerFlags } from '../../common/interfaces';
|
||||
import { Season, Holiday } from '../../common/commonInterfaces';
|
||||
import {
|
||||
createServerMap, saveMap, loadMap, loadEntities, isSaveableEntity, serializeEntity, encodeLockedTiles,
|
||||
decodeLockedTiles, stringifyMapData, findEntities, MapData
|
||||
} from '../../server/serverMap';
|
||||
import { worldForTemplates } from '../../server/mapUtils';
|
||||
import { setInteract, setUpdate, createBehaviorContext, getBehaviorDef, give } from '../../server/mapBehaviors';
|
||||
import { applyMapLayers, getActiveLayerNames, MapFiles, loadBaseMap, saveMapFiles, readMapFiles } from '../../server/mapFiles';
|
||||
import { ServerEntity, ServerMap } from '../../server/serverInterfaces';
|
||||
import { mockClient } from '../mocks';
|
||||
|
||||
describe('map files', () => {
|
||||
let map: ServerMap;
|
||||
const world: any = worldForTemplates;
|
||||
|
||||
beforeEach(() => {
|
||||
map = createServerMap('test', 0, 2, 2);
|
||||
});
|
||||
|
||||
describe('isSaveableEntity()', () => {
|
||||
it('returns true for regular entity', () => {
|
||||
expect(isSaveableEntity(entities.barrel(1, 1))).equal(true);
|
||||
});
|
||||
|
||||
it('returns false for players', () => {
|
||||
const client = mockClient();
|
||||
expect(isSaveableEntity(client.pony)).equal(false);
|
||||
});
|
||||
|
||||
it('returns false for wandering critters', () => {
|
||||
expect(isSaveableEntity(entities.butterfly(1, 1))).equal(false);
|
||||
expect(isSaveableEntity(entities.bat(1, 1))).equal(false);
|
||||
});
|
||||
|
||||
it('returns true for static critters', () => {
|
||||
expect(isSaveableEntity(entities.spider(1, 1))).equal(true);
|
||||
});
|
||||
|
||||
it('returns false for entities marked as not saveable', () => {
|
||||
const entity = entities.barrel(1, 1);
|
||||
entity.serverFlags = ServerFlags.DoNotSave;
|
||||
expect(isSaveableEntity(entity)).equal(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('serializeEntity()', () => {
|
||||
it('saves type, position, name and options', () => {
|
||||
const entity = entities.barrel(1.5, 2) as ServerEntity;
|
||||
entity.name = 'test';
|
||||
entity.options = { foo: 1 } as any;
|
||||
|
||||
expect(serializeEntity(entity)).eql({ type: 'barrel', x: 1.5, y: 2, name: 'test', options: { foo: 1 } });
|
||||
});
|
||||
|
||||
it('saves behaviors', () => {
|
||||
const ctx = createBehaviorContext(world, map);
|
||||
const entity = setInteract(entities.sign(1, 1), { action: 'goToMap', args: { map: 'cave' } }, ctx);
|
||||
|
||||
expect(serializeEntity(entity)).eql({
|
||||
type: 'sign', x: 1, y: 1, interact: { action: 'goToMap', args: { map: 'cave' } },
|
||||
});
|
||||
});
|
||||
|
||||
it('saves editable flag and tag', () => {
|
||||
const entity = entities.barrel(1, 1) as ServerEntity;
|
||||
entity.state |= EntityState.Editable;
|
||||
entity.tag = 'foo';
|
||||
|
||||
expect(serializeEntity(entity)).eql({ type: 'barrel', x: 1, y: 1, tag: 'foo', editable: true });
|
||||
});
|
||||
|
||||
it('warns about callbacks that cannot be saved', () => {
|
||||
const warn = stub();
|
||||
const entity = entities.barrel(1, 1) as ServerEntity;
|
||||
entity.interact = () => { };
|
||||
|
||||
expect(serializeEntity(entity, warn)).eql({ type: 'barrel', x: 1, y: 1 });
|
||||
expect(warn.calledOnce).equal(true);
|
||||
});
|
||||
|
||||
it('does not warn about callbacks created by other behaviors', () => {
|
||||
const warn = stub();
|
||||
const entity = setUpdate(entities.cat(1, 1), 'cat', createBehaviorContext(world, map));
|
||||
|
||||
expect(serializeEntity(entity, warn)).eql({ type: 'cat', x: 1, y: 1, update: { action: 'cat' } });
|
||||
expect(entity.boop).not.equal(undefined);
|
||||
expect(warn.called).equal(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('give()', () => {
|
||||
it('creates serializable behavior', () => {
|
||||
expect(getBehaviorDef(give(entities.rose.type, 'msg'))).eql({ action: 'give', args: { item: 'rose', message: 'msg' } });
|
||||
});
|
||||
});
|
||||
|
||||
describe('loadEntities()', () => {
|
||||
it('creates entities with behaviors', () => {
|
||||
const [entity] = loadEntities(world, map, [
|
||||
{ type: 'sign', x: 1, y: 2, name: 'foo', interact: { action: 'say', args: { text: 'hi' } } },
|
||||
]);
|
||||
|
||||
expect(entity.type).equal(entities.sign.type);
|
||||
expect(entity.name).equal('foo');
|
||||
expect(entity.interact).not.equal(undefined);
|
||||
expect(serializeEntity(entity)).eql({
|
||||
type: 'sign', x: 1, y: 2, name: 'foo', interact: { action: 'say', args: { text: 'hi' } },
|
||||
});
|
||||
});
|
||||
|
||||
it('resolves tagged entities', () => {
|
||||
const [ghost] = loadEntities(world, map, [
|
||||
{ type: 'ghost-1', x: 1, y: 1, update: { action: 'ghost', args: { anims: [1], hooves: 'h' } } },
|
||||
{ type: 'ghost-hooves-1', x: 1, y: 1, tag: 'h' },
|
||||
]);
|
||||
|
||||
ghost.serverUpdate!(1000, 0);
|
||||
});
|
||||
|
||||
it('does not share options object with map data', () => {
|
||||
const data = [{ type: 'direction-sign', x: 1, y: 1, options: { sign: { r: 1 } } }];
|
||||
const [entity] = loadEntities(world, map, data);
|
||||
|
||||
expect(entity.options).eql({ sign: { r: 1 } });
|
||||
expect(entity.options).not.equal(data[0].options);
|
||||
});
|
||||
|
||||
it('throws on unknown entity type', () => {
|
||||
expect(() => loadEntities(world, map, [{ type: 'not-an-entity', x: 1, y: 1 }])).throw('Invalid entity type');
|
||||
});
|
||||
|
||||
it('throws on unknown behavior', () => {
|
||||
expect(() => loadEntities(world, map, [{ type: 'sign', x: 1, y: 1, interact: { action: 'foo' } }]))
|
||||
.throw('Unknown interact behavior action (foo)');
|
||||
});
|
||||
});
|
||||
|
||||
describe('saveMap() / loadMap()', () => {
|
||||
it('round trips entities, spawns and locked tiles', () => {
|
||||
const data: MapData = {
|
||||
width: map.width, height: map.height,
|
||||
spawnArea: { x: 1, y: 2, w: 3, h: 4 },
|
||||
spawns: { foo: { x: 5, y: 6, w: 1, h: 1 } },
|
||||
lockedTiles: [3, 2, 10, 1],
|
||||
entities: [
|
||||
{ type: 'barrel', x: 1, y: 1 },
|
||||
{ type: 'sign', x: 2, y: 2, interact: { action: 'goToMap', args: { map: '', spawn: 'center' } } },
|
||||
],
|
||||
};
|
||||
|
||||
loadMap(world, map, data, { loadEntities: true, loadSpawns: true, loadLockedTiles: true });
|
||||
|
||||
expect(saveMap(map, { saveEntities: true, saveSpawns: true, saveLockedTiles: true })).eql(data);
|
||||
});
|
||||
|
||||
it('does not save players and entities marked as not saveable', () => {
|
||||
world.addEntity(entities.barrel(1, 1), map);
|
||||
const carrot = entities.carrot1(2, 2) as ServerEntity;
|
||||
carrot.serverFlags = ServerFlags.DoNotSave;
|
||||
world.addEntity(carrot, map);
|
||||
world.addEntity(mockClient().pony, map);
|
||||
|
||||
expect(saveMap(map, { saveEntities: true }).entities).eql([{ type: 'barrel', x: 1, y: 1 }]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('encodeLockedTiles() / decodeLockedTiles()', () => {
|
||||
it('encodes tiles as ranges', () => {
|
||||
expect(encodeLockedTiles([5, 1, 2, 3, 7, 8])).eql([1, 3, 5, 1, 7, 2]);
|
||||
});
|
||||
|
||||
it('round trips', () => {
|
||||
const tiles = [0, 1, 2, 10, 11, 100];
|
||||
expect(Array.from(decodeLockedTiles(encodeLockedTiles(tiles)))).eql(tiles);
|
||||
});
|
||||
});
|
||||
|
||||
describe('stringifyMapData()', () => {
|
||||
it('outputs valid JSON with one entity per line', () => {
|
||||
const data: MapData = { width: 1, height: 2, entities: [{ type: 'a', x: 1, y: 2 }, { type: 'b', x: 3, y: 4 }] };
|
||||
const json = stringifyMapData(data);
|
||||
|
||||
expect(JSON.parse(json)).eql(data);
|
||||
expect(json).contain('\t\t{"type":"a","x":1,"y":2},\n\t\t{"type":"b","x":3,"y":4}\n');
|
||||
});
|
||||
});
|
||||
|
||||
describe('applyMapLayers()', () => {
|
||||
const files: MapFiles = {
|
||||
name: 'test',
|
||||
base: { width: 16, height: 16, lockedTiles: [1, 1] },
|
||||
layers: new Map([
|
||||
['winter', { entities: [{ type: 'snowpile-big', x: 1, y: 1 }], lockedTiles: [5, 2] }],
|
||||
['summer', { entities: [{ type: 'flowers-1', x: 2, y: 2 }] }],
|
||||
]),
|
||||
};
|
||||
|
||||
it('loads layer entities and locked tiles', () => {
|
||||
applyMapLayers(world, map, files, ['winter']);
|
||||
|
||||
expect(findEntities(map, () => true).map(e => entities.getEntityTypeName(e.type))).eql(['snowpile-big']);
|
||||
expect(Array.from(map.lockedTiles)).eql([1, 5, 6]);
|
||||
});
|
||||
|
||||
it('replaces previous layers', () => {
|
||||
applyMapLayers(world, map, files, ['winter']);
|
||||
applyMapLayers(world, map, files, ['summer']);
|
||||
|
||||
const loaded = findEntities(map, () => true);
|
||||
expect(loaded.map(e => entities.getEntityTypeName(e.type))).eql(['flowers-1']);
|
||||
expect(loaded[0].serverFlags! & ServerFlags.Seasonal).not.equal(0);
|
||||
expect(Array.from(map.lockedTiles)).eql([1]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('saveMapFiles()', () => {
|
||||
let dir: string;
|
||||
|
||||
beforeEach(() => {
|
||||
dir = fs.mkdtempSync(path.join(os.tmpdir(), 'map-files-'));
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
fs.rmSync(dir, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
it('saves base map and loaded layers to separate files', () => {
|
||||
const files: MapFiles = {
|
||||
name: 'test',
|
||||
base: { width: map.width, height: map.height, lockedTiles: [1, 1], entities: [{ type: 'barrel', x: 1, y: 1 }] },
|
||||
layers: new Map([
|
||||
['winter', { entities: [{ type: 'snowpile-big', x: 1, y: 1 }], lockedTiles: [5, 2] }],
|
||||
['christmas', { entities: [{ type: 'holly', x: 2, y: 2 }] }],
|
||||
]),
|
||||
};
|
||||
|
||||
loadBaseMap(world, map, files);
|
||||
applyMapLayers(world, map, files, ['winter', 'christmas']);
|
||||
world.addEntity(entities.box(3, 3), map);
|
||||
world.addEntity(mockClient().pony, map);
|
||||
|
||||
const { saved, warnings } = saveMapFiles(map, dir, 'saved');
|
||||
const result = readMapFiles('saved', dir);
|
||||
|
||||
expect(saved).members(['saved.json', 'saved.winter.json', 'saved.christmas.json']);
|
||||
expect(warnings).eql([]);
|
||||
expect(result.base.entities).eql([{ type: 'barrel', x: 1, y: 1 }, { type: 'box', x: 3, y: 3 }]);
|
||||
expect(result.base.lockedTiles).eql([1, 1]);
|
||||
expect(result.layers.get('winter')).eql(files.layers.get('winter'));
|
||||
expect(result.layers.get('christmas')).eql(files.layers.get('christmas'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('getActiveLayerNames()', () => {
|
||||
it('returns season layer', () => {
|
||||
expect(getActiveLayerNames(Season.Winter, Holiday.None)).eql(['winter']);
|
||||
});
|
||||
|
||||
it('returns season and holiday layers', () => {
|
||||
expect(getActiveLayerNames(Season.Autumn, Holiday.Halloween)).eql(['autumn', 'halloween']);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user