diff --git a/.gitignore b/.gitignore
index c9a90200..6d4b9fc1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,15 +5,8 @@ storage.db
*.sublime-project
*.sublime-workspace
src/server/mods/iwd-*
-!helpers/item-tooltip/styles.css
-!helpers/passives/**/*.css
-creds.js
.directory
firebaseConfig.js
-helpers/sqlite-to-rethink/rethinkdb_data
-helpers/sqlite-to-rethink/tmp
-helpers/sqlite-to-rethink/log_file
-helpers/sqlite-to-rethink/rethinkdb.exe
.directory
.idea
.vscode
\ No newline at end of file
diff --git a/helpers/discord-images/logo.png b/helpers/discord-images/logo.png
deleted file mode 100644
index 3c4c3b8f..00000000
Binary files a/helpers/discord-images/logo.png and /dev/null differ
diff --git a/helpers/discord-zone-images/caves.json b/helpers/discord-zone-images/caves.json
deleted file mode 100644
index 04708ee1..00000000
--- a/helpers/discord-zone-images/caves.json
+++ /dev/null
@@ -1,385 +0,0 @@
-{ "backgroundcolor":"#32222e",
- "height":4,
- "layers":[
- {
- "data":[377, 377, 337, 377, 337, 377, 377, 495, 495, 340, 377, 377, 377, 377, 337, 377],
- "height":4,
- "name":"tiles",
- "opacity":0.550000011920929,
- "properties":
- {
- "tileset":"tiles"
- },
- "propertytypes":
- {
- "tileset":"string"
- },
- "type":"tilelayer",
- "visible":true,
- "width":4,
- "x":0,
- "y":0
- },
- {
- "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- "height":4,
- "name":"doodads",
- "opacity":1,
- "type":"tilelayer",
- "visible":true,
- "width":4,
- "x":0,
- "y":0
- },
- {
- "data":[29, 31, 0, 117, 0, 0, 0, 0, 0, 0, 0, 30, 30, 138, 0, 209],
- "height":4,
- "name":"walls",
- "opacity":1,
- "properties":
- {
- "tileset":"walls"
- },
- "propertytypes":
- {
- "tileset":"string"
- },
- "type":"tilelayer",
- "visible":true,
- "width":4,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"mobs",
- "objects":[
- {
- "gid":314,
- "height":8,
- "id":824,
- "name":"",
- "rotation":0,
- "type":"",
- "visible":true,
- "width":8,
- "x":8,
- "y":16
- }],
- "opacity":1,
- "properties":
- {
- "faction":"2",
- "tileset":"mobs"
- },
- "propertytypes":
- {
- "faction":"string",
- "tileset":"string"
- },
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"objects",
- "objects":[],
- "opacity":1,
- "properties":
- {
- "blocking":"1",
- "tileset":"objects"
- },
- "propertytypes":
- {
- "blocking":"string",
- "tileset":"string"
- },
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"clientObjects",
- "objects":[],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"notices",
- "objects":[],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"rooms",
- "objects":[],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- }],
- "nextobjectid":826,
- "orientation":"orthogonal",
- "properties":
- {
- "instanced":"0",
- "name":"Test Zone",
- "spawn":"[{\"maxLevel\":1,\"x\":100,\"y\":186},{\"maxLevel\":999,\"x\":132,\"y\":118}]"
- },
- "propertytypes":
- {
- "instanced":"string",
- "name":"string",
- "spawn":"string"
- },
- "renderorder":"right-down",
- "tileheight":8,
- "tilesets":[
- {
- "columns":8,
- "firstgid":1,
- "image":"..\/..\/src\/client\/images\/walls.png",
- "imageheight":256,
- "imagewidth":64,
- "margin":0,
- "name":"walls",
- "spacing":0,
- "tilecount":256,
- "tileheight":8,
- "tiles":
- {
- "0":
- {
- "probability":0.200000002980232
- },
- "2":
- {
- "probability":0.600000023841858
- },
- "29":
- {
- "probability":0.800000011920929
- },
- "3":
- {
- "probability":0.200000002980232
- },
- "30":
- {
- "probability":0.200000002980232
- },
- "31":
- {
- "probability":0.200000002980232
- },
- "4":
- {
- "probability":0.200000002980232
- },
- "50":
- {
- "probability":0.400000005960464
- },
- "8":
- {
- "probability":0.100000001490116
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":257,
- "image":"..\/..\/src\/client\/images\/mobs.png",
- "imageheight":80,
- "imagewidth":64,
- "margin":0,
- "name":"mobs",
- "spacing":0,
- "tilecount":80,
- "tileheight":8,
- "tileproperties":
- {
- "19":
- {
- "portal":"midgaard-inn-room_2,1"
- }
- },
- "tilepropertytypes":
- {
- "19":
- {
- "portal":"string"
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":337,
- "image":"..\/..\/src\/client\/images\/tiles.png",
- "imageheight":192,
- "imagewidth":64,
- "margin":0,
- "name":"tiles",
- "spacing":0,
- "tilecount":192,
- "tileheight":8,
- "tiles":
- {
- "0":
- {
- "probability":2
- },
- "11":
- {
- "probability":4
- },
- "14":
- {
- "probability":0.5
- },
- "2":
- {
- "probability":4
- },
- "23":
- {
- "probability":0.200000002980232
- },
- "24":
- {
- "probability":0.200000002980232
- },
- "29":
- {
- "probability":0.5
- },
- "3":
- {
- "probability":7
- },
- "30":
- {
- "probability":0.200000002980232
- },
- "31":
- {
- "probability":10
- },
- "38":
- {
- "probability":3
- },
- "39":
- {
- "probability":3
- },
- "40":
- {
- "probability":15
- },
- "41":
- {
- "probability":2
- },
- "42":
- {
- "probability":26
- },
- "47":
- {
- "probability":10
- },
- "5":
- {
- "probability":0.00999999977648258
- },
- "54":
- {
- "probability":0.5
- },
- "6":
- {
- "probability":0.00499999988824129
- },
- "7":
- {
- "probability":0.100000001490116
- },
- "8":
- {
- "probability":0.5
- },
- "9":
- {
- "probability":4
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":529,
- "image":"..\/..\/src\/client\/images\/objects.png",
- "imageheight":176,
- "imagewidth":64,
- "margin":0,
- "name":"objects",
- "spacing":0,
- "tilecount":176,
- "tileheight":8,
- "tiles":
- {
- "42":
- {
- "probability":5
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":705,
- "image":"..\/..\/src\/client\/images\/bigObjects.png",
- "imageheight":240,
- "imagewidth":192,
- "margin":0,
- "name":"bigObjects",
- "spacing":0,
- "tilecount":80,
- "tileheight":24,
- "tilewidth":24
- },
- {
- "columns":8,
- "firstgid":785,
- "image":"..\/..\/src\/client\/images\/bosses.png",
- "imageheight":240,
- "imagewidth":192,
- "margin":0,
- "name":"bosses",
- "spacing":0,
- "tilecount":80,
- "tileheight":24,
- "tilewidth":24
- }],
- "tilewidth":8,
- "type":"map",
- "version":"2017.05.26",
- "width":4
-}
\ No newline at end of file
diff --git a/helpers/discord-zone-images/caves.png b/helpers/discord-zone-images/caves.png
deleted file mode 100644
index 8182efa3..00000000
Binary files a/helpers/discord-zone-images/caves.png and /dev/null differ
diff --git a/helpers/discord-zone-images/estuary.json b/helpers/discord-zone-images/estuary.json
deleted file mode 100644
index f01111e4..00000000
--- a/helpers/discord-zone-images/estuary.json
+++ /dev/null
@@ -1,385 +0,0 @@
-{ "backgroundcolor":"#32222e",
- "height":4,
- "layers":[
- {
- "data":[340, 337, 377, 369, 340, 403, 403, 403, 370, 403, 403, 403, 377, 403, 403, 403],
- "height":4,
- "name":"tiles",
- "opacity":0.550000011920929,
- "properties":
- {
- "tileset":"tiles"
- },
- "propertytypes":
- {
- "tileset":"string"
- },
- "type":"tilelayer",
- "visible":true,
- "width":4,
- "x":0,
- "y":0
- },
- {
- "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- "height":4,
- "name":"doodads",
- "opacity":1,
- "type":"tilelayer",
- "visible":true,
- "width":4,
- "x":0,
- "y":0
- },
- {
- "data":[19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0],
- "height":4,
- "name":"walls",
- "opacity":1,
- "properties":
- {
- "tileset":"walls"
- },
- "propertytypes":
- {
- "tileset":"string"
- },
- "type":"tilelayer",
- "visible":true,
- "width":4,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"mobs",
- "objects":[
- {
- "gid":2147484435,
- "height":24,
- "id":824,
- "name":"",
- "rotation":0,
- "type":"",
- "visible":true,
- "width":24,
- "x":8,
- "y":32
- }],
- "opacity":1,
- "properties":
- {
- "faction":"2",
- "tileset":"mobs"
- },
- "propertytypes":
- {
- "faction":"string",
- "tileset":"string"
- },
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"objects",
- "objects":[],
- "opacity":1,
- "properties":
- {
- "blocking":"1",
- "tileset":"objects"
- },
- "propertytypes":
- {
- "blocking":"string",
- "tileset":"string"
- },
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"clientObjects",
- "objects":[],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"notices",
- "objects":[],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"rooms",
- "objects":[],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- }],
- "nextobjectid":826,
- "orientation":"orthogonal",
- "properties":
- {
- "instanced":"0",
- "name":"Test Zone",
- "spawn":"[{\"maxLevel\":1,\"x\":100,\"y\":186},{\"maxLevel\":999,\"x\":132,\"y\":118}]"
- },
- "propertytypes":
- {
- "instanced":"string",
- "name":"string",
- "spawn":"string"
- },
- "renderorder":"right-down",
- "tileheight":8,
- "tilesets":[
- {
- "columns":8,
- "firstgid":1,
- "image":"..\/..\/src\/client\/images\/walls.png",
- "imageheight":256,
- "imagewidth":64,
- "margin":0,
- "name":"walls",
- "spacing":0,
- "tilecount":256,
- "tileheight":8,
- "tiles":
- {
- "0":
- {
- "probability":0.200000002980232
- },
- "2":
- {
- "probability":0.600000023841858
- },
- "29":
- {
- "probability":0.800000011920929
- },
- "3":
- {
- "probability":0.200000002980232
- },
- "30":
- {
- "probability":0.200000002980232
- },
- "31":
- {
- "probability":0.200000002980232
- },
- "4":
- {
- "probability":0.200000002980232
- },
- "50":
- {
- "probability":0.400000005960464
- },
- "8":
- {
- "probability":0.100000001490116
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":257,
- "image":"..\/..\/src\/client\/images\/mobs.png",
- "imageheight":80,
- "imagewidth":64,
- "margin":0,
- "name":"mobs",
- "spacing":0,
- "tilecount":80,
- "tileheight":8,
- "tileproperties":
- {
- "19":
- {
- "portal":"midgaard-inn-room_2,1"
- }
- },
- "tilepropertytypes":
- {
- "19":
- {
- "portal":"string"
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":337,
- "image":"..\/..\/src\/client\/images\/tiles.png",
- "imageheight":192,
- "imagewidth":64,
- "margin":0,
- "name":"tiles",
- "spacing":0,
- "tilecount":192,
- "tileheight":8,
- "tiles":
- {
- "0":
- {
- "probability":2
- },
- "11":
- {
- "probability":4
- },
- "14":
- {
- "probability":0.5
- },
- "2":
- {
- "probability":4
- },
- "23":
- {
- "probability":0.200000002980232
- },
- "24":
- {
- "probability":0.200000002980232
- },
- "29":
- {
- "probability":0.5
- },
- "3":
- {
- "probability":7
- },
- "30":
- {
- "probability":0.200000002980232
- },
- "31":
- {
- "probability":10
- },
- "38":
- {
- "probability":3
- },
- "39":
- {
- "probability":3
- },
- "40":
- {
- "probability":15
- },
- "41":
- {
- "probability":2
- },
- "42":
- {
- "probability":26
- },
- "47":
- {
- "probability":10
- },
- "5":
- {
- "probability":0.00999999977648258
- },
- "54":
- {
- "probability":0.5
- },
- "6":
- {
- "probability":0.00499999988824129
- },
- "7":
- {
- "probability":0.100000001490116
- },
- "8":
- {
- "probability":0.5
- },
- "9":
- {
- "probability":4
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":529,
- "image":"..\/..\/src\/client\/images\/objects.png",
- "imageheight":176,
- "imagewidth":64,
- "margin":0,
- "name":"objects",
- "spacing":0,
- "tilecount":176,
- "tileheight":8,
- "tiles":
- {
- "42":
- {
- "probability":5
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":705,
- "image":"..\/..\/src\/client\/images\/bigObjects.png",
- "imageheight":240,
- "imagewidth":192,
- "margin":0,
- "name":"bigObjects",
- "spacing":0,
- "tilecount":80,
- "tileheight":24,
- "tilewidth":24
- },
- {
- "columns":8,
- "firstgid":785,
- "image":"..\/..\/src\/client\/images\/bosses.png",
- "imageheight":240,
- "imagewidth":192,
- "margin":0,
- "name":"bosses",
- "spacing":0,
- "tilecount":80,
- "tileheight":24,
- "tilewidth":24
- }],
- "tilewidth":8,
- "type":"map",
- "version":"2017.05.26",
- "width":4
-}
\ No newline at end of file
diff --git a/helpers/discord-zone-images/estuary.png b/helpers/discord-zone-images/estuary.png
deleted file mode 100644
index 18b04c7c..00000000
Binary files a/helpers/discord-zone-images/estuary.png and /dev/null differ
diff --git a/helpers/discord-zone-images/sewer.json b/helpers/discord-zone-images/sewer.json
deleted file mode 100644
index 0b56744c..00000000
--- a/helpers/discord-zone-images/sewer.json
+++ /dev/null
@@ -1,385 +0,0 @@
-{ "backgroundcolor":"#32222e",
- "height":4,
- "layers":[
- {
- "data":[0, 0, 0, 0, 0, 402, 401, 341, 365, 401, 0, 470, 0, 403, 486, 401],
- "height":4,
- "name":"tiles",
- "opacity":0.550000011920929,
- "properties":
- {
- "tileset":"tiles"
- },
- "propertytypes":
- {
- "tileset":"string"
- },
- "type":"tilelayer",
- "visible":true,
- "width":4,
- "x":0,
- "y":0
- },
- {
- "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 684, 0, 0, 683, 0],
- "height":4,
- "name":"doodads",
- "opacity":1,
- "type":"tilelayer",
- "visible":true,
- "width":4,
- "x":0,
- "y":0
- },
- {
- "data":[342, 382, 343, 342, 383, 0, 0, 0, 0, 0, 0, 0, 382, 0, 0, 0],
- "height":4,
- "name":"walls",
- "opacity":1,
- "properties":
- {
- "tileset":"walls"
- },
- "propertytypes":
- {
- "tileset":"string"
- },
- "type":"tilelayer",
- "visible":true,
- "width":4,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"mobs",
- "objects":[
- {
- "gid":2147483930,
- "height":8,
- "id":823,
- "name":"",
- "rotation":0,
- "type":"",
- "visible":true,
- "width":8,
- "x":16,
- "y":24
- }],
- "opacity":1,
- "properties":
- {
- "faction":"2",
- "tileset":"mobs"
- },
- "propertytypes":
- {
- "faction":"string",
- "tileset":"string"
- },
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"objects",
- "objects":[],
- "opacity":1,
- "properties":
- {
- "blocking":"1",
- "tileset":"objects"
- },
- "propertytypes":
- {
- "blocking":"string",
- "tileset":"string"
- },
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"clientObjects",
- "objects":[],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"notices",
- "objects":[],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"rooms",
- "objects":[],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- }],
- "nextobjectid":824,
- "orientation":"orthogonal",
- "properties":
- {
- "instanced":"0",
- "name":"Test Zone",
- "spawn":"[{\"maxLevel\":1,\"x\":100,\"y\":186},{\"maxLevel\":999,\"x\":132,\"y\":118}]"
- },
- "propertytypes":
- {
- "instanced":"string",
- "name":"string",
- "spawn":"string"
- },
- "renderorder":"right-down",
- "tileheight":8,
- "tilesets":[
- {
- "columns":8,
- "firstgid":1,
- "image":"..\/..\/src\/client\/images\/walls.png",
- "imageheight":256,
- "imagewidth":64,
- "margin":0,
- "name":"walls",
- "spacing":0,
- "tilecount":256,
- "tileheight":8,
- "tiles":
- {
- "0":
- {
- "probability":0.200000002980232
- },
- "2":
- {
- "probability":0.600000023841858
- },
- "29":
- {
- "probability":0.800000011920929
- },
- "3":
- {
- "probability":0.200000002980232
- },
- "30":
- {
- "probability":0.200000002980232
- },
- "31":
- {
- "probability":0.200000002980232
- },
- "4":
- {
- "probability":0.200000002980232
- },
- "50":
- {
- "probability":0.400000005960464
- },
- "8":
- {
- "probability":0.100000001490116
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":257,
- "image":"..\/..\/src\/client\/images\/mobs.png",
- "imageheight":80,
- "imagewidth":64,
- "margin":0,
- "name":"mobs",
- "spacing":0,
- "tilecount":80,
- "tileheight":8,
- "tileproperties":
- {
- "19":
- {
- "portal":"midgaard-inn-room_2,1"
- }
- },
- "tilepropertytypes":
- {
- "19":
- {
- "portal":"string"
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":337,
- "image":"..\/..\/src\/client\/images\/tiles.png",
- "imageheight":192,
- "imagewidth":64,
- "margin":0,
- "name":"tiles",
- "spacing":0,
- "tilecount":192,
- "tileheight":8,
- "tiles":
- {
- "0":
- {
- "probability":2
- },
- "11":
- {
- "probability":4
- },
- "14":
- {
- "probability":0.5
- },
- "2":
- {
- "probability":4
- },
- "23":
- {
- "probability":0.200000002980232
- },
- "24":
- {
- "probability":0.200000002980232
- },
- "29":
- {
- "probability":0.5
- },
- "3":
- {
- "probability":7
- },
- "30":
- {
- "probability":0.200000002980232
- },
- "31":
- {
- "probability":10
- },
- "38":
- {
- "probability":3
- },
- "39":
- {
- "probability":3
- },
- "40":
- {
- "probability":15
- },
- "41":
- {
- "probability":2
- },
- "42":
- {
- "probability":26
- },
- "47":
- {
- "probability":10
- },
- "5":
- {
- "probability":0.00999999977648258
- },
- "54":
- {
- "probability":0.5
- },
- "6":
- {
- "probability":0.00499999988824129
- },
- "7":
- {
- "probability":0.100000001490116
- },
- "8":
- {
- "probability":0.5
- },
- "9":
- {
- "probability":4
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":529,
- "image":"..\/..\/src\/client\/images\/objects.png",
- "imageheight":176,
- "imagewidth":64,
- "margin":0,
- "name":"objects",
- "spacing":0,
- "tilecount":176,
- "tileheight":8,
- "tiles":
- {
- "42":
- {
- "probability":5
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":705,
- "image":"..\/..\/src\/client\/images\/bigObjects.png",
- "imageheight":240,
- "imagewidth":192,
- "margin":0,
- "name":"bigObjects",
- "spacing":0,
- "tilecount":80,
- "tileheight":24,
- "tilewidth":24
- },
- {
- "columns":8,
- "firstgid":785,
- "image":"..\/..\/src\/client\/images\/bosses.png",
- "imageheight":240,
- "imagewidth":192,
- "margin":0,
- "name":"bosses",
- "spacing":0,
- "tilecount":80,
- "tileheight":24,
- "tilewidth":24
- }],
- "tilewidth":8,
- "type":"map",
- "version":"2017.05.26",
- "width":4
-}
\ No newline at end of file
diff --git a/helpers/discord-zone-images/sewer.png b/helpers/discord-zone-images/sewer.png
deleted file mode 100644
index fd41b769..00000000
Binary files a/helpers/discord-zone-images/sewer.png and /dev/null differ
diff --git a/helpers/discord-zone-images/tutorial.json b/helpers/discord-zone-images/tutorial.json
deleted file mode 100644
index 8a531551..00000000
--- a/helpers/discord-zone-images/tutorial.json
+++ /dev/null
@@ -1,385 +0,0 @@
-{ "backgroundcolor":"#32222e",
- "height":4,
- "layers":[
- {
- "data":[377, 377, 377, 337, 340, 495, 377, 377, 377, 0, 368, 0, 337, 0, 408, 408],
- "height":4,
- "name":"tiles",
- "opacity":0.550000011920929,
- "properties":
- {
- "tileset":"tiles"
- },
- "propertytypes":
- {
- "tileset":"string"
- },
- "type":"tilelayer",
- "visible":true,
- "width":4,
- "x":0,
- "y":0
- },
- {
- "data":[0, 0, 0, 0, 389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- "height":4,
- "name":"doodads",
- "opacity":1,
- "type":"tilelayer",
- "visible":true,
- "width":4,
- "x":0,
- "y":0
- },
- {
- "data":[0, 52, 0, 0, 0, 0, 0, 52, 52, 45, 0, 51, 0, 51, 0, 0],
- "height":4,
- "name":"walls",
- "opacity":1,
- "properties":
- {
- "tileset":"walls"
- },
- "propertytypes":
- {
- "tileset":"string"
- },
- "type":"tilelayer",
- "visible":true,
- "width":4,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"mobs",
- "objects":[
- {
- "gid":2147483938,
- "height":8,
- "id":824,
- "name":"",
- "rotation":0,
- "type":"",
- "visible":true,
- "width":8,
- "x":24,
- "y":32
- }],
- "opacity":1,
- "properties":
- {
- "faction":"2",
- "tileset":"mobs"
- },
- "propertytypes":
- {
- "faction":"string",
- "tileset":"string"
- },
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"objects",
- "objects":[],
- "opacity":1,
- "properties":
- {
- "blocking":"1",
- "tileset":"objects"
- },
- "propertytypes":
- {
- "blocking":"string",
- "tileset":"string"
- },
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"clientObjects",
- "objects":[],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"notices",
- "objects":[],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "name":"rooms",
- "objects":[],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- }],
- "nextobjectid":825,
- "orientation":"orthogonal",
- "properties":
- {
- "instanced":"0",
- "name":"Test Zone",
- "spawn":"[{\"maxLevel\":1,\"x\":100,\"y\":186},{\"maxLevel\":999,\"x\":132,\"y\":118}]"
- },
- "propertytypes":
- {
- "instanced":"string",
- "name":"string",
- "spawn":"string"
- },
- "renderorder":"right-down",
- "tileheight":8,
- "tilesets":[
- {
- "columns":8,
- "firstgid":1,
- "image":"..\/..\/src\/client\/images\/walls.png",
- "imageheight":256,
- "imagewidth":64,
- "margin":0,
- "name":"walls",
- "spacing":0,
- "tilecount":256,
- "tileheight":8,
- "tiles":
- {
- "0":
- {
- "probability":0.200000002980232
- },
- "2":
- {
- "probability":0.600000023841858
- },
- "29":
- {
- "probability":0.800000011920929
- },
- "3":
- {
- "probability":0.200000002980232
- },
- "30":
- {
- "probability":0.200000002980232
- },
- "31":
- {
- "probability":0.200000002980232
- },
- "4":
- {
- "probability":0.200000002980232
- },
- "50":
- {
- "probability":0.400000005960464
- },
- "8":
- {
- "probability":0.100000001490116
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":257,
- "image":"..\/..\/src\/client\/images\/mobs.png",
- "imageheight":80,
- "imagewidth":64,
- "margin":0,
- "name":"mobs",
- "spacing":0,
- "tilecount":80,
- "tileheight":8,
- "tileproperties":
- {
- "19":
- {
- "portal":"midgaard-inn-room_2,1"
- }
- },
- "tilepropertytypes":
- {
- "19":
- {
- "portal":"string"
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":337,
- "image":"..\/..\/src\/client\/images\/tiles.png",
- "imageheight":192,
- "imagewidth":64,
- "margin":0,
- "name":"tiles",
- "spacing":0,
- "tilecount":192,
- "tileheight":8,
- "tiles":
- {
- "0":
- {
- "probability":2
- },
- "11":
- {
- "probability":4
- },
- "14":
- {
- "probability":0.5
- },
- "2":
- {
- "probability":4
- },
- "23":
- {
- "probability":0.200000002980232
- },
- "24":
- {
- "probability":0.200000002980232
- },
- "29":
- {
- "probability":0.5
- },
- "3":
- {
- "probability":7
- },
- "30":
- {
- "probability":0.200000002980232
- },
- "31":
- {
- "probability":10
- },
- "38":
- {
- "probability":3
- },
- "39":
- {
- "probability":3
- },
- "40":
- {
- "probability":15
- },
- "41":
- {
- "probability":2
- },
- "42":
- {
- "probability":26
- },
- "47":
- {
- "probability":10
- },
- "5":
- {
- "probability":0.00999999977648258
- },
- "54":
- {
- "probability":0.5
- },
- "6":
- {
- "probability":0.00499999988824129
- },
- "7":
- {
- "probability":0.100000001490116
- },
- "8":
- {
- "probability":0.5
- },
- "9":
- {
- "probability":4
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":529,
- "image":"..\/..\/src\/client\/images\/objects.png",
- "imageheight":176,
- "imagewidth":64,
- "margin":0,
- "name":"objects",
- "spacing":0,
- "tilecount":176,
- "tileheight":8,
- "tiles":
- {
- "42":
- {
- "probability":5
- }
- },
- "tilewidth":8
- },
- {
- "columns":8,
- "firstgid":705,
- "image":"..\/..\/src\/client\/images\/bigObjects.png",
- "imageheight":240,
- "imagewidth":192,
- "margin":0,
- "name":"bigObjects",
- "spacing":0,
- "tilecount":80,
- "tileheight":24,
- "tilewidth":24
- },
- {
- "columns":8,
- "firstgid":785,
- "image":"..\/..\/src\/client\/images\/bosses.png",
- "imageheight":240,
- "imagewidth":192,
- "margin":0,
- "name":"bosses",
- "spacing":0,
- "tilecount":80,
- "tileheight":24,
- "tilewidth":24
- }],
- "tilewidth":8,
- "type":"map",
- "version":"2017.05.26",
- "width":4
-}
\ No newline at end of file
diff --git a/helpers/discord-zone-images/tutorial.png b/helpers/discord-zone-images/tutorial.png
deleted file mode 100644
index 56ad1758..00000000
Binary files a/helpers/discord-zone-images/tutorial.png and /dev/null differ
diff --git a/helpers/item-tooltip/builder.js b/helpers/item-tooltip/builder.js
deleted file mode 100644
index 054107e4..00000000
--- a/helpers/item-tooltip/builder.js
+++ /dev/null
@@ -1,81 +0,0 @@
-$(function () {
- var items = [{
- name: `Infernal Bite`,
- type: 'Curved Sword',
- rqr: {
- level: 25,
- dex: 200
- },
- quality: 4,
- stats: {
- Dexterity: '[200 - 300]',
- 'Increased Crit Multiplier': '[40% - 65%]',
- 'Your hits always critically hit': null,
- '50% of your damage is converted to fire damage': null,
- 'You take [2% - 5%] of all damage you deal yourself': null
- },
- spritesheet: '../../src/client/images/items.png',
- sprite: [9, 9]
- }, {
- name: `Cowl of Obscurity`,
- type: 'Silk Cowl',
- rqr: {
- level: 20,
- dex: 150
- },
- quality: 4,
- stats: {
- Vitality: '[20 - 35]',
- Dexterity: '[150 - 220]',
- 'Critical hits heal you for [1% - 3%] of your maximum health': null,
- 'Your hits have a 50% chance to miss': null,
- },
- spritesheet: '../../src/client/images/items.png',
- sprite: [0, 4]
- }];
-
- for (var i = 0; i < items.length - 1; i++) {
- $('.tooltip:first-child').clone().appendTo('body');
- }
-
- items.forEach(function (item, i) {
- var div = $('.tooltip').eq(i);
-
- for (var p in item) {
- var val = item[p];
-
- div.find('.' + p).html(val);
- }
-
- var stats = item.stats;
- if (stats) {
- var val = '';
- for (var s in stats) {
- var v = s;
- if (stats[s])
- v = stats[s] + ' ' + s;
- val += '
' + v + '
';
- }
- div.find('.stats').html(val);
- }
-
- var rqr = item.rqr;
- if (rqr) {
- var val = 'Requires: ';
- for (var s in rqr) {
- val += rqr[s] + ' ' + s;
- if (Object.keys(rqr).indexOf(s) < Object.keys(rqr).length - 1)
- val += ', ';
- }
- div.find('.rqr').html(val);
- }
-
- div.find('.sprite')
- .css({
- background: 'url(' + item.spritesheet + ') ' + (-item.sprite[0] * 64) + 'px ' + (-item.sprite[1] * 64) + 'px'
- })
- .html('');
-
- div.find('.name').addClass('q' + item.quality);
- });
-});
diff --git a/helpers/item-tooltip/index.html b/helpers/item-tooltip/index.html
deleted file mode 100644
index 5ddbabb2..00000000
--- a/helpers/item-tooltip/index.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- builder
-
-
-
-
-
-
-
-
diff --git a/helpers/item-tooltip/styles.css b/helpers/item-tooltip/styles.css
deleted file mode 100644
index ade2280e..00000000
--- a/helpers/item-tooltip/styles.css
+++ /dev/null
@@ -1,76 +0,0 @@
-body {
- background-color: #2d2136;
- padding: 10px;
- margin: 0px;
-}
-
-@font-face
-{
- font-family: bitty;
- src: url('../../src/client/fonts/bitty.ttf');
-}
-
-.tooltip {
- background-color: #3c3f4c;
- text-align: center;
- padding: 10px;
- margin-bottom: 10px;
- font-family: bitty;
- width: 400px;
-}
-
-.sprite-box {
- margin: 0 auto;
- height: 64px;
- width: 64px;
- margin-bottom: 15px;
- background-color: #2d2136;
- padding: 5px;
-}
-
-.sprite {
- height: 64px;
-}
-
-.name.q0 {
- color: #fafcfc;
-}
-
-.name.q1 {
- color: #3fa7dd;
-}
-
-.name.q2 {
- color: #ffeb38;
-}
-
-.name.q3 {
- color: #a24eff;
-}
-
-.name.q4 {
- color: #ff6942;
-}
-
-.type {
- color: #69696e;
- margin-bottom: 15px;
-}
-
-.rqr {
- color: #fafcfc;
- margin-bottom: 15px;
-}
-
-.stats {
- color: #929398;
-}
-
-.stat {
- margin-bottom: 5px;
-}
-
-.stat:before {
- content: '*';
- margin-right: 5px;
-}
diff --git a/helpers/passives/client/css/main.css b/helpers/passives/client/css/main.css
deleted file mode 100644
index 707b2599..00000000
--- a/helpers/passives/client/css/main.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#4ac441}.q2{color:#3fa7dd}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346 !important}.color-redA{color:#ff4252 !important}.color-blueA{color:#48edff !important}.color-blueB{color:#3fa7dd !important}.color-greenB{color:#4ac441 !important}.color-yellowB{color:#faac45 !important}.color-green{color:#80f643 !important}.color-brownC{color:#b15a30 !important}.color-brownD{color:#763b3b !important}.color-grayA{color:#f2f5f5 !important}.color-grayB{color:#c0c3cf !important}.color-grayC{color:#929398 !important}.color-grayD{color:#69696e !important}.color-pinkB{color:#de43ae !important}html,body{width:100vw;height:100vh}body{background-color:#2d2136;padding:0;margin:0;overflow:hidden}.canvas,.ui-container{position:absolute}.ui-container{width:100%;height:100%;pointer-events:none}.ui-container>*{pointer-events:auto}*{box-sizing:border-box;font-family:bitty;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:"courier"}.disabled{opacity:.4 !important;pointer-events:none !important}::-webkit-scrollbar{width:16px}::-webkit-scrollbar-track{background-color:#3c3f4c;-webkit-border-radius:0;border-radius:0}::-webkit-scrollbar-thumb{-webkit-border-radius:10px;border-radius:0;background:#929398}
\ No newline at end of file
diff --git a/helpers/passives/client/css/main.less b/helpers/passives/client/css/main.less
deleted file mode 100644
index bc19f16a..00000000
--- a/helpers/passives/client/css/main.less
+++ /dev/null
@@ -1,59 +0,0 @@
-@import "../../../src/client/css/colors.less";
-
-html, body {
- width: 100vw;
- height: 100vh;
-}
-
-body {
- background-color: @black;
- padding: 0px;
- margin: 0px;
- overflow: hidden;
-}
-
-.canvas, .ui-container {
- position: absolute;
-}
-
-.ui-container {
- width: 100%;
- height: 100%;
- pointer-events: none;
-
- > * {
- pointer-events: auto;
- }
-}
-
-* {
- box-sizing: border-box;
- font-family: bitty;
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- font-family: "courier";
-}
-
-.disabled {
- opacity: 0.4 !important;
- pointer-events: none !important;
-}
-
-::-webkit-scrollbar {
- width: 16px;
-}
-::-webkit-scrollbar-track {
- background-color: @gray;
- -webkit-border-radius: 0px;
- border-radius: 0px;
-}
-::-webkit-scrollbar-thumb {
- -webkit-border-radius: 10px;
- border-radius: 0px;
- background: @lightGray;
-}
-
diff --git a/helpers/passives/client/css/ui.less b/helpers/passives/client/css/ui.less
deleted file mode 100644
index 91cd0c9f..00000000
--- a/helpers/passives/client/css/ui.less
+++ /dev/null
@@ -1 +0,0 @@
-@import "../../../src/client/css/colors.less";
diff --git a/helpers/passives/client/index.html b/helpers/passives/client/index.html
deleted file mode 100644
index 5f956431..00000000
--- a/helpers/passives/client/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- test
-
-
-
-
-
-
-
-
diff --git a/helpers/passives/client/js/app.js b/helpers/passives/client/js/app.js
deleted file mode 100644
index 757cc1aa..00000000
--- a/helpers/passives/client/js/app.js
+++ /dev/null
@@ -1,31 +0,0 @@
-require.config({
- baseUrl: '',
- waitSeconds: 120,
- paths: {
- 'jquery': 'plugins/jquery.min',
- 'text': 'plugins/text',
- 'html': 'plugins/html',
- 'css': 'plugins/css',
- 'socket': 'plugins/socket'
- },
- shim: {
- 'jquery': {
- exports: '$'
- },
- 'socket': {
- exports: 'io'
- }
- }
-});
-
-require([
- 'js/helpers',
- 'jquery',
- 'js/main'
-], function (
- helpers,
- jQuery,
- main
-) {
- main.init();
-});
diff --git a/helpers/passives/client/js/client.js b/helpers/passives/client/js/client.js
deleted file mode 100644
index fa259efc..00000000
--- a/helpers/passives/client/js/client.js
+++ /dev/null
@@ -1,50 +0,0 @@
-define([
- 'socket'
-], function (
- io
-) {
- return {
- socket: null,
-
- init: function (onReady) {
- let tType = 'websocket';
- this.socket = io({
- transports: [tType]
- });
-
- this.socket.on('connect', this.onConnected.bind(this, onReady));
- },
-
- load: function (fileName, callback) {
- this.socket.emit('request', {
- fileName: fileName,
- action: 'load'
- }, callback);
- },
-
- save: function (fileName, data, callback) {
- this.socket.emit('request', {
- fileName: fileName,
- action: 'save',
- data: data
- }, callback);
- },
-
- persist: function (data) {
- this.socket.emit('request', {
- action: 'persist',
- data: data
- });
- },
-
- getFileList: function (callback) {
- this.socket.emit('request', {
- action: 'getFileList'
- }, callback);
- },
-
- onConnected: function (onReady) {
- onReady();
- }
- };
-});
diff --git a/helpers/passives/client/js/constants.js b/helpers/passives/client/js/constants.js
deleted file mode 100644
index a8dd00b5..00000000
--- a/helpers/passives/client/js/constants.js
+++ /dev/null
@@ -1,63 +0,0 @@
-define([
-
-], function (
-
-) {
- return {
- standAlone: false,
-
- lineWidth: 5,
- blockSize: 20,
- defaultDistance: 50,
- defaultDistanceInc: 60,
- defaultAngle: Math.PI / 2,
- defaultAngleInc: Math.PI / 8,
- gridSize: 30,
-
- scrollSpeed: 0.75,
-
- stats: {
- str: 'strength',
- int: 'intellect',
- dex: 'dexterity',
- vit: 'vitality',
- regenHp: 'health regeneration',
- manaMax: 'maximum mana',
- regenMana: 'mana regeneration',
- armor: 'armor',
- attackSpeed: 'attack speed',
- castSpeed: 'cast speed',
- blockAttackChance: 'chance to block attacks',
- blockSpellChance: 'chance to block spells',
- addCritChance: 'increased crit chance',
- addCritMultiplier: 'increased crit multiplier',
- magicFind: 'increased item quality',
- itemQuantity: 'increased item quantity',
- sprintChance: 'sprint chance',
- allAttributes: 'to all attributes',
- xpIncrease: 'additional xp per kill',
- lvlRequire: 'level requirement reduction',
- elementArcanePercent: 'increased arcane damage',
- elementFrostPercent: 'increased frost damage',
- elementFirePercent: 'increased fire damage',
- elementHolyPercent: 'increased holy damage',
- elementPoisonPercent: 'increased poison damage',
- elementAllResist: 'all resistance',
- elementArcaneResist: 'arcane resistance',
- elementFrostResist: 'frost resistance',
- elementFireResist: 'fire resistance',
- elementHolyResist: 'holy resistance',
- elementPoisonResist: 'poison resistance',
- elementAllResist: 'all resistance',
-
- physicalPercent: 'increased physical damage',
- spellPercent: 'increased spell damage',
- elementPercent: 'increased elemental damage',
- addSpellCritChance: 'increased spell crit chance',
- addSpellCritMultiplier: 'increased spell crit multiplier',
- addAttackCritChance: 'increased attack crit chance',
- addAttackCritMultiplier: 'increased attack crit multiplier',
- dodgeAttackChance: 'chance to dodge attacks'
- }
- };
-});
diff --git a/helpers/passives/client/js/events.js b/helpers/passives/client/js/events.js
deleted file mode 100644
index 4a103384..00000000
--- a/helpers/passives/client/js/events.js
+++ /dev/null
@@ -1,47 +0,0 @@
-define([
-
-], function (
-
-) {
- var events = {
- events: {},
-
- on: function (event, callback) {
- var list = this.events[event] || (this.events[event] = []);
- list.push(callback);
-
- return callback;
- },
-
- off: function (event, callback) {
- var list = this.events[event] || [];
- var lLen = list.length;
- for (var i = 0; i < lLen; i++) {
- if (list[i] == callback) {
- list.splice(i, 1);
- i--;
- lLen--;
- }
- }
-
- if (lLen == 0)
- delete this.events[event];
- },
-
- emit: function (event) {
- var args = [].slice.call(arguments, 1);
-
- var list = this.events[event];
- if (!list)
- return;
-
- var len = list.length
- for (var i = 0; i < len; i++) {
- var l = list[i];
- l.apply(null, args);
- }
- }
- };
-
- return events;
-});
diff --git a/helpers/passives/client/js/generator.js b/helpers/passives/client/js/generator.js
deleted file mode 100644
index 2b4c3fa1..00000000
--- a/helpers/passives/client/js/generator.js
+++ /dev/null
@@ -1,303 +0,0 @@
-define([
- 'js/tplNode',
- 'js/events',
- 'js/client',
- 'js/input'
-], function (
- tplNode,
- events,
- client,
- input
-) {
- return {
- links: [],
- nodes: [],
-
- mode: 'none',
-
- init: function () {
- events.on('onAreaSelect', this.events.onAreaSelect.bind(this));
- events.on('onMouseMove', this.events.onMouseMove.bind(this));
- },
-
- findNode: function (x, y) {
- let res = this.nodes.find(n => ((n.pos.x == x) && (n.pos.y == y)));
- if (!res) {
- res = this.nodes.find(function (n) {
- return ((n.size > 0) && (Math.abs(n.pos.x - x) <= 1) && (Math.abs(n.pos.y - y) <= 1));
- });
- }
-
- return res;
- },
-
- callAction: function (action, options = {}) {
- let node = options.node || this.findNode(options.x, options.y);
-
- options.node = node;
- return !this.actions[action].call(this, options);
- },
-
- getSelected: function (single) {
- let selected = this.nodes.filter(n => n.selected);
- if ((single) && (selected.length != 1))
- return null;
-
- if (single)
- return selected[0];
- return selected;
- },
-
- serialize: function () {
- return JSON.stringify({
- nodes: this.nodes,
- links: this.links.map(function (l) {
- return {
- from: {
- id: l.from.id
- },
- to: {
- id: l.to.id
- }
- };
- })
- });
- },
-
- getData: function () {
- return {
- nodes: this.nodes.map(function (n) {
- let res = {
- id: n.id,
- pos: n.pos
- };
-
- ['size', 'color', 'stats', 'spiritStart'].forEach(function (s) {
- if (n[s] !== undefined)
- res[s] = n[s];
- });
-
- return res;
- }),
- links: this.links.map(function (l) {
- return {
- from: l.from.id,
- to: l.to.id
- };
- })
- };
- },
-
- getNextId: function () {
- for (var i = 0; i < this.nodes.length; i++) {
- if (!this.nodes.some(n => (n.id == i)))
- return i;
- }
-
- return this.nodes.length;
- },
-
- setMode: function (mode) {
- this.mode = mode;
- },
-
- actions: {
- reset: function () {
- this.nodes = [];
- this.links = [];
-
- events.emit('onNew');
- },
-
- load: function (data) {
- this.nodes = data.nodes;
- this.nodes.forEach(function (n) {
- if ((n.group) && (!n.group.push))
- n.group = [n.group];
- });
-
- this.links = data.links.map(function (l) {
- l.from = this.nodes.find(n => (n.id == l.from.id));
- l.to = this.nodes.find(n => (n.id == l.to.id));
-
- return l;
- }, this);
-
- events.emit('onTreeLoaded', {
- nodes: this.nodes,
- links: this.links
- });
- },
-
- selectNode: function (options) {
- if (
- (
- (!options.node) ||
- (!this.nodes.some(n => ((n.selected) && (n == options.node))))
- ) &&
- (
- (!input.isKeyDown('shift')) ||
- (options.force)
- )
- )
- this.nodes.forEach(n => (n.selected = false));
-
- if (options.node)
- options.node.selected = true;
- else if (options instanceof Array)
- options.forEach(n => (n.selected = true));
-
- events.emit('onSelectNode', this.nodes.filter(n => n.selected));
-
- if (options.node)
- events.emit('onFocusNode', options.node);
-
- return !options.node;
- },
-
- addNode: function (options) {
- this.nodes.push(tplNode.build({
- id: this.getNextId(),
- x: options.x,
- y: options.y
- }));
-
- this.callAction('selectNode');
- },
-
- connectNode: function (options) {
- let node = options.node;
- if (!node) {
- this.callAction('selectNode');
- return true;
- }
-
- let singleSelected = this.getSelected(true);
-
- if ((singleSelected) && (input.isKeyDown('ctrl'))) {
- if (options.shiftDown) {
- this.links.spliceWhere(l => (
- (
- (l.from == node) ||
- (l.to == node)
- ) &&
- (
- (l.from == singleSelected) ||
- (l.to == singleSelected)
- ) &&
- (node != singleSelected)
- ));
- } else {
- this.links.push({
- from: singleSelected,
- to: node
- });
- }
- this.callAction('selectNode', {
- force: true
- });
-
- this.callAction('selectNode', {
- node: options.node
- });
- } else {
- return this.callAction('selectNode', {
- node: node
- });
- }
- },
-
- moveNode: function (options) {
- let selected = this.getSelected();
- if (!selected.length)
- return true;
-
- if (selected.length == 0)
- return;
-
- selected.sort(function (a, b) {
- let distanceA = Math.abs(a.pos.x - options.x) + Math.abs(a.pos.y - options.y);
- let distanceB = Math.abs(b.pos.x - options.x) + Math.abs(b.pos.y - options.y);
-
- return (distanceA > distanceB) ? 1 : -1;
- });
-
- let deltaX = selected[0].pos.x - options.x;
- let deltaY = selected[0].pos.y - options.y;
-
- selected.forEach(function (s) {
- s.pos.x -= deltaX;
- s.pos.y -= deltaY;
- });
- },
-
- deleteNode: function (options) {
- let selected = this.getSelected();
- selected.forEach(function (s) {
- this.nodes.spliceWhere(n => (n == s));
- this.links.spliceWhere(n => ((n.from == s) || (n.to == s)));
-
- s.selected = false;
-
- events.emit('onDeleteNode', s);
- }, this);
- },
-
- recolorNode: function () {
- let selected = this.getSelected(true);
- if (!selected)
- return true;
-
- selected.color = (selected.color + 1) % 7;
- },
-
- resizeNode: function () {
- let selected = this.getSelected(true);
- if (!selected)
- return true;
-
- selected.size = (selected.size + 1) % 3;
- }
- },
-
- events: {
- onAreaSelect: function (from, to) {
- if (!input.isKeyDown('ctrl'))
- this.nodes.forEach(n => (n.selected = false));
-
- let lowX = Math.min(from.x, to.x);
- let lowY = Math.min(from.y, to.y);
-
- let highX = Math.max(from.x, to.x);
- let highY = Math.max(from.y, to.y);
-
- for (let i = lowX; i <= highX; i++) {
- for (let j = lowY; j <= highY; j++) {
- let node = this.findNode(i, j);
- if (!node)
- continue;
- node.selected = true;
- }
- }
-
- events.emit('onSelectNode', this.nodes.filter(n => n.selected));
- },
-
- onMouseMove: function (e) {
- let hoverNode = this.findNode(e.x, e.y);
- if (hoverNode) {
- let text = '';
- let stats = hoverNode.stats || {};
- for (let s in stats)
- text += s + ': ' + stats[s] + '
';
-
- text = text.substr(0, text.length - 6);
-
- if (text.length > 0)
- events.emit('onShowTooltip', e, text);
- } else
- events.emit('onHideTooltip');
- }
- }
- };
-});
diff --git a/helpers/passives/client/js/helpers.js b/helpers/passives/client/js/helpers.js
deleted file mode 100644
index dbbbb4e7..00000000
--- a/helpers/passives/client/js/helpers.js
+++ /dev/null
@@ -1,113 +0,0 @@
-Array.prototype.firstIndex = function (callback, thisArg) {
- var T = thisArg;
- var O = Object(this);
- var len = O.length >>> 0;
-
- var k = 0;
-
- while (k < len) {
- var kValue;
-
- if (k in O) {
- kValue = O[k];
-
- if (callback.call(T, kValue, k, O))
- return k;
- }
- k++;
- }
-
- return -1;
-};
-
-Array.prototype.spliceWhere = function (callback, thisArg) {
- var T = thisArg;
- var O = Object(this);
- var len = O.length >>> 0;
-
- var k = 0;
-
- while (k < len) {
- var kValue;
-
- if (k in O) {
- kValue = O[k];
-
- if (callback.call(T, kValue, k, O)) {
- O.splice(k, 1);
- k--;
- }
- }
- k++;
- }
-};
-
-Array.prototype.spliceFirstWhere = function (callback, thisArg) {
- var T = thisArg;
- var O = Object(this);
- var len = O.length >>> 0;
-
- var k = 0;
-
- while (k < len) {
- var kValue;
-
- if (k in O) {
- kValue = O[k];
-
- if (callback.call(T, kValue, k, O)) {
- O.splice(k, 1);
- return kValue;
- }
- }
- k++;
- }
-};
-
-window._ = {
- create: function () {
- var result = {};
-
- [].slice.call(arguments).forEach(function (a) {
- $.extend(true, result, a);
- });
-
- return result;
- },
- get2dArray: function (w, h, def) {
- def = def || 0;
-
- var result = [];
- for (var i = 0; i < w; i++) {
- var inner = [];
- for (var j = 0; j < h; j++) {
- if (def == 'array')
- inner.push([]);
- else
- inner.push(def);
- }
-
- result.push(inner);
- }
-
- return result;
- },
- randWeighted: function (weights) {
- var sample = [];
- weights.forEach(function (w, i) {
- for (var j = 0; j < w; j++) {
- sample.push(i);
- }
- });
-
- return sample[~~(Math.random() * sample.length)];
- }
-};
-
-define([
-
-], function (
-
-) {
- return window._;
-});
diff --git a/helpers/passives/client/js/input.js b/helpers/passives/client/js/input.js
deleted file mode 100644
index 33625622..00000000
--- a/helpers/passives/client/js/input.js
+++ /dev/null
@@ -1,163 +0,0 @@
-define([
- 'js/events',
- 'js/renderer',
- 'js/constants'
-], function (
- events,
- renderer,
- constants
-) {
- return {
- mappings: {
- 8: 'backspace',
- 9: 'tab',
- 13: 'enter',
- 16: 'shift',
- 17: 'ctrl',
- 27: 'esc',
- 37: 'left',
- 38: 'up',
- 39: 'right',
- 40: 'down',
- 46: 'del'
- },
-
- mouse: {
- button: null,
- x: 0,
- y: 0,
- raw: null
- },
-
- keys: {},
-
- init: function () {
- $(window).on('keydown', this.events.keyboard.onKeyDown.bind(this));
- $(window).on('keyup', this.events.keyboard.onKeyUp.bind(this));
-
- $('canvas')
- .on('mousedown', this.events.mouse.onMouseDown.bind(this))
- .on('mouseup', this.events.mouse.onMouseUp.bind(this))
- .on('mousemove', this.events.mouse.onMouseMove.bind(this))
- .on('mousewheel', this.events.mouse.onMouseWheel.bind(this));
- },
-
- resetKeys: function () {
- for (let k in this.keys)
- events.emit('onKeyUp', k);
-
- this.keys = {};
- },
-
- getMapping: function (charCode) {
- if (charCode >= 97)
- return (charCode - 96).toString();
-
- return (
- this.mappings[charCode] ||
- String.fromCharCode(charCode).toLowerCase()
- );
- },
-
- isKeyDown: function (key, consume) {
- let down = this.keys[key];
- if (down != null) {
- if (!consume)
- return true;
-
- this.keys[key] = 2;
- return (down == 1);
- } return false;
- },
-
- events: {
- keyboard: {
- onKeyDown: function (e) {
- if (e.target != document.body)
- return true;
- if ((e.keyCode == 9) || (e.keyCode == 8) || (e.keyCode == 122))
- e.preventDefault();
-
- let key = this.getMapping(e.which);
-
- if (this.keys[key] != null)
- this.keys[key] = 2;
- else {
- this.keys[key] = 1;
- events.emit('onKeyDown', key);
- }
-
- if (key == 'backspace')
- return false;
- },
-
- onKeyUp: function (e) {
- if (e.target != document.body)
- return;
-
- let key = this.getMapping(e.which);
-
- delete this.keys[key];
-
- events.emit('onKeyUp', key);
- }
- },
-
- mouse: {
- onMouseDown: function (e) {
- let el = $(e.target);
- if ((!el.hasClass('canvas')) || (el.hasClass('blocking')))
- return;
-
- let button = e.button;
- this.mouse.button = button;
- this.mouse.down = true;
- this.mouse.event = e;
-
- events.emit('onMouseDown', this.mouse);
- },
-
- onMouseUp: function (e) {
- let el = $(e.target);
- if ((!el.hasClass('canvas')) || (el.hasClass('blocking')))
- return;
-
- let button = e.button;
- this.mouse.down = false;
-
- events.emit('onMouseUp', this.mouse);
-
- this.mouse.button = null;
- },
-
- onMouseMove: function (e) {
- if (e)
- this.mouse.raw = e;
- else
- e = this.mouse.raw;
-
- if (!e)
- return;
-
- let el = $(e.target);
- if ((!el.hasClass('canvas')) || (el.hasClass('blocking')))
- return;
-
- let x = ~~((renderer.pos.x + (e.offsetX / renderer.currentZoom)) / constants.gridSize);
- let y = ~~((renderer.pos.y + (e.offsetY / renderer.currentZoom)) / constants.gridSize);
-
- this.mouse.x = x;
- this.mouse.y = y;
-
- events.emit('onMouseMove', this.mouse);
- },
-
- onMouseWheel: function (e) {
- events.emit('onMouseWheel', {
- delta: (e.deltaY > 0) ? 1 : -1
- });
- }
- }
- }
- };
-});
diff --git a/helpers/passives/client/js/main.js b/helpers/passives/client/js/main.js
deleted file mode 100644
index bf6a322f..00000000
--- a/helpers/passives/client/js/main.js
+++ /dev/null
@@ -1,152 +0,0 @@
-define([
- 'js/events',
- 'js/generator',
- 'js/renderer',
- 'js/input',
- 'ui/factory',
- 'js/client',
- 'js/constants'
-], function (
- events,
- generator,
- renderer,
- input,
- uiFactory,
- client,
- constants
-) {
- return {
- init: function () {
- if (constants.standAlone)
- this.events.onConnected.call(this);
- else
- client.init(this.events.onConnected.bind(this));
- },
-
- render: function () {
- if (renderer.dirty)
- renderer.render(generator.nodes, generator.links);
-
- window.requestAnimationFrame(this.render.bind(this));
- },
-
- events: {
- onConnected: function () {
- uiFactory.init();
-
- generator.init();
- renderer.init();
- input.init();
-
- events.on('onMouseDown', this.events.onMouseDown.bind(this, true));
- events.on('onMouseUp', this.events.onMouseDown.bind(this, false));
- events.on('onMouseMove', this.events.onMouseMove.bind(this));
- events.on('onMouseWheel', this.events.onMouseWheel.bind(this));
- events.on('onKeyDown', this.events.onKeyDown.bind(this));
-
- $(window).on('focus', this.events.onFocus.bind(this));
-
- uiFactory.build('mode');
- uiFactory.build('menu');
- uiFactory.build('groups');
- uiFactory.build('nodeInfo');
- uiFactory.build('tooltip');
-
- renderer.center(generator.nodes[0]);
- this.render();
- },
-
- onMouseDown: function (isDown, e) {
- var success = false;
-
- if ((input.isKeyDown('shift')) && (e.button == 2)) {
- success = true;
-
- if (e.down)
- events.emit('onStartAreaSelect', e);
- else
- events.emit('onEndAreaSelect', e);
- } else if (isDown) {
- if (generator.mode != 'none') {
- e.button = ([
- 'place',
- 'link',
- 'select'
- ]).indexOf(generator.mode);
- }
-
- var action = ([
- 'addNode',
- 'connectNode',
- 'selectNode'
- ])[e.button];
-
- success = generator.callAction(action, {
- x: e.x,
- y: e.y,
- shiftDown: input.isKeyDown('shift')
- });
- } else if ((!isDown) && (e.button != 1) && (generator.getSelected().length <= 1))
- generator.callAction('selectNode', {});
-
- if ((!isDown) || (!success))
- renderer.pan(e.raw, isDown ? 'down' : 'up');
-
- renderer.makeDirty();
- },
-
- onMouseMove: function (e) {
- if ((!e.down) || (e.button != 2) || (input.isKeyDown('shift')))
- return;
-
- if (generator.callAction('moveNode', {
- x: e.x,
- y: e.y
- }))
- return;
-
- renderer.pan(e.raw, 'move');
- },
-
- onMouseWheel: function (e) {
- var delta = (e.delta > 0) ? 1 : 0;
-
- var action = ([
- 'resizeNode',
- 'recolorNode'
- ])[delta];
- if (!action)
- return;
-
- if (!generator.callAction(action, {}))
- renderer.zoom(delta);
-
- renderer.makeDirty();
- },
-
- onKeyDown: function (key) {
- if (key == 'z') {
- renderer.zoom(0, 1);
- renderer.makeDirty();
- return;
- }
-
- var action = ({
- d: 'deleteNode',
- c: 'recolorNode',
- r: 'resizeNode'
- })[key];
- if (!action)
- return;
-
- generator.callAction(action, {});
-
- renderer.makeDirty();
- },
-
- onFocus: function () {
- renderer.makeDirty();
- }
- }
- };
-});
diff --git a/helpers/passives/client/js/renderer.js b/helpers/passives/client/js/renderer.js
deleted file mode 100644
index 073283e7..00000000
--- a/helpers/passives/client/js/renderer.js
+++ /dev/null
@@ -1,312 +0,0 @@
-define([
- 'js/constants',
- 'js/events'
-], function (
- constants,
- events
-) {
- return {
- canvas: null,
- ctx: null,
-
- areaSelectOrigin: null,
- panOrigin: null,
-
- currentZoom: 1,
-
- screen: {
- w: 0,
- h: 0
- },
-
- pos: {
- x: 0,
- y: 0
- },
-
- oldPos: null,
-
- mouse: {
- x: 0,
- y: 0
- },
-
- dirty: true,
-
- init: function () {
- this.canvas = $('.canvas')[0];
- this.screen.w = this.canvas.width = $('body').width();
- this.screen.h = this.canvas.height = $('body').height();
- this.ctx = this.canvas.getContext('2d');
-
- this.ctx.lineWidth = constants.lineWidth;
-
- $(this.canvas)
- .on('contextmenu', function () {
- return false;
- });
-
- events.on('onMouseMove', this.events.onMouseMove.bind(this));
- events.on('onStartAreaSelect', this.events.onStartAreaSelect.bind(this));
- events.on('onEndAreaSelect', this.events.onEndAreaSelect.bind(this));
- events.on('onSelectGroup', this.events.onSelectGroup.bind(this));
- },
-
- center: function (node) {
- if (!node)
- return;
-
- this.pos.x = ~~(node.pos.x * constants.gridSize) + (constants.blockSize / 2) - (this.screen.w / 2);
- this.pos.y = ~~(node.pos.y * constants.gridSize) + (constants.blockSize / 2) - (this.screen.h / 2);
-
- this.makeDirty();
- },
-
- pan: function (e, event) {
- var action = ({
- down: 'onPanStart',
- up: 'onPanEnd',
- move: 'onPan'
- })[event];
-
- this.events[action].call(this, e);
- },
-
- makeDirty: function () {
- this.dirty = true;
- },
-
- renderNodes: function (nodes, links) {
- links.forEach(function (l) {
- var linked = (
- nodes.find(n => (n == l.from)).selected &&
- nodes.find(n => (n == l.to)).selected
- );
- this.renderers.line.call(this, l.from, l.to, linked);
- }, this);
-
- nodes.forEach(function (n) {
- this.renderers.node.call(this, n, n.pos.x, n.pos.y);
- }, this);
- },
-
- render: function (nodes, links) {
- this.dirty = false;
-
- this.renderers.clear.call(this);
- this.renderers.grid.call(this);
-
- this.renderNodes(nodes, links);
-
- if (this.areaSelectOrigin)
- this.renderers.selectArea.call(this);
- },
-
- zoom: function (delta, zoom) {
- delta = delta ? -1 : 1;
-
- this.renderers.clear.call(this);
- this.ctx.restore();
-
- var newZoom = zoom || (this.currentZoom + (delta * 0.2));
- this.currentZoom = newZoom;
- if (this.currentZoom < 0.4)
- this.currentZoom = 0.4;
- else if (this.currentZoom > 3)
- this.currentZoom = 3;
-
- this.screen.w = $('body').width() / this.currentZoom;
- this.screen.h = $('body').height() / this.currentZoom;
-
- this.ctx.save();
- this.ctx.scale(this.currentZoom, this.currentZoom);
- },
-
- renderers: {
- clear: function () {
- var pos = this.oldPos || this.pos;
-
- this.ctx.clearRect(0, 0, this.screen.w, this.screen.h);
-
- delete this.oldPos;
- },
-
- selectArea: function () {
- var ctx = this.ctx;
- var area = this.areaSelectOrigin;
- var mouse = this.mouse;
-
- ctx.fillStyle = '#51fc9a';
- ctx.globalAlpha = 0.1;
-
- var lowX = (Math.min(area.x, mouse.x) * constants.gridSize) - this.pos.x;
- var lowY = (Math.min(area.y, mouse.y) * constants.gridSize) - this.pos.y;
-
- var highX = (Math.max(area.x, mouse.x) * constants.gridSize) - this.pos.x;
- var highY = (Math.max(area.y, mouse.y) * constants.gridSize) - this.pos.y;
-
- ctx.fillRect(lowX, lowY, highX - lowX, highY - lowY);
-
- ctx.globalAlpha = 1;
- },
-
- grid: function () {
- var gridSize = constants.gridSize;
- var ctx = this.ctx;
- var mouse = this.mouse;
-
- var gapSize = (constants.blockSize - 4) / 2;
-
- var x = ~~(this.pos.x / gridSize) - (this.pos.x / gridSize);
- var y = ~~(this.pos.y / gridSize) - (this.pos.y / gridSize);
-
- w = ~~(this.screen.w / gridSize);
- h = ~~(this.screen.h / gridSize);
-
- ctx.fillStyle = '#3c3f4c';
- for (var i = x; i < w; i++) {
- for (var j = y; j < h; j++) {
- ctx.fillRect((i * gridSize) + gapSize, (j * gridSize) + gapSize, 4, 4);
- }
- }
-
- ctx.strokeStyle = '#44cb95';
- ctx.strokeRect(
- (this.mouse.x * constants.gridSize) - this.pos.x + (gapSize / 1),
- (this.mouse.y * constants.gridSize) - this.pos.y + (gapSize / 1),
- 8,
- 8
- );
- },
-
- node: function (node) {
- var color = (node.color >= 0) ? (node.color + 1) : -1;
- if ((!node.stats) || (Object.keys(node.stats).length == 0))
- color = 0;
-
- this.ctx.fillStyle = ([
- '#69696e',
- '#c0c3cf',
- '#3fa7dd',
- '#4ac441',
- '#d43346',
- '#a24eff',
- '#faac45',
- '#44cb95'
- ])[color];
- var size = ([
- constants.blockSize,
- constants.blockSize * 2,
- constants.blockSize * 3
- ])[node.size];
- var x = (node.pos.x * constants.gridSize) - ((size - constants.blockSize) / 2) - this.pos.x;
- var y = (node.pos.y * constants.gridSize) - ((size - constants.blockSize) / 2) - this.pos.y;
-
- this.ctx.fillRect(x, y, size, size);
-
- this.ctx.strokeStyle = ([
- '#69696e',
- '#69696e',
- '#42548d',
- '#386646',
- '#763b3b',
- '#533399',
- '#d07840',
- '#3f8d6d'
- ])[color];
- this.ctx.strokeRect(x, y, size, size);
-
- if (node.selected) {
- this.ctx.strokeStyle = '#fafcfc';
- this.ctx.strokeRect(x, y, size, size);
- }
- },
-
- line: function (fromNode, toNode, linked) {
- var ctx = this.ctx;
- var halfSize = constants.blockSize / 2;
-
- var fromX = (fromNode.pos.x * constants.gridSize) + halfSize - this.pos.x;
- var fromY = (fromNode.pos.y * constants.gridSize) + halfSize - this.pos.y;
-
- var toX = (toNode.pos.x * constants.gridSize) + halfSize - this.pos.x;
- var toY = (toNode.pos.y * constants.gridSize) + halfSize - this.pos.y;
-
- ctx.strokeStyle = linked ? '#fafcfc' : '#69696e';
- ctx.beginPath();
- ctx.moveTo(fromX, fromY);
- ctx.lineTo(toX, toY);
- ctx.closePath();
- ctx.stroke();
- }
- },
-
- events: {
- onMouseMove: function (pos) {
- if ((this.mouse.x == pos.x) && (this.mouse.y == pos.y))
- return;
-
- this.mouse = {
- x: pos.x,
- y: pos.y
- };
- this.makeDirty();
- },
-
- onPanStart: function (e) {
- this.panOrigin = {
- x: e.clientX,
- y: e.clientY
- };
- },
-
- onPan: function (e) {
- if (!this.panOrigin)
- return;
-
- if (!this.oldPos) {
- this.oldPos = {
- x: this.pos.x,
- y: this.pos.y
- };
- }
-
- var zoomPanMultiplier = this.currentZoom;
- var scrollSpeed = constants.scrollSpeed / zoomPanMultiplier;
-
- this.pos.x += (this.panOrigin.x - e.clientX) * scrollSpeed;
- this.pos.y += (this.panOrigin.y - e.clientY) * scrollSpeed;
-
- this.panOrigin = {
- x: e.clientX,
- y: e.clientY
- };
-
- this.makeDirty();
- },
-
- onPanEnd: function (e) {
- this.panOrigin = null;
- },
-
- onStartAreaSelect: function (e) {
- this.areaSelectOrigin = {
- x: e.x,
- y: e.y
- };
- },
-
- onEndAreaSelect: function (e) {
- events.emit('onAreaSelect', this.areaSelectOrigin, e);
- this.areaSelectOrigin = null;
- },
-
- onSelectGroup: function (pos) {
- this.pos.x = pos.x;
- this.pos.y = pos.y;
-
- this.makeDirty();
- }
- }
- };
-});
diff --git a/helpers/passives/client/js/tplNode.js b/helpers/passives/client/js/tplNode.js
deleted file mode 100644
index a8208b4a..00000000
--- a/helpers/passives/client/js/tplNode.js
+++ /dev/null
@@ -1,27 +0,0 @@
-define([
-
-], function (
-
-) {
- return {
- color: 0,
- size: 0,
- pos: {
- x: 0,
- y: 0
- },
-
- build: function (options) {
- var res = $.extend(true, {}, this, {
- id: options.id,
- pos: {
- x: options.x,
- y: options.y
- }
- });
- delete res.build;
-
- return res;
- }
- };
-});
diff --git a/helpers/passives/client/plugins/css.js b/helpers/passives/client/plugins/css.js
deleted file mode 100644
index ddd09460..00000000
--- a/helpers/passives/client/plugins/css.js
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Require-CSS RequireJS css! loader plugin
- * 0.1.8
- * Guy Bedford 2014
- * MIT
- */
-
-/*
- *
- * Usage:
- * require(['css!./mycssFile']);
- *
- * Tested and working in (up to latest versions as of March 2013):
- * Android
- * iOS 6
- * IE 6 - 10
- * Chome 3 - 26
- * Firefox 3.5 - 19
- * Opera 10 - 12
- *
- * browserling.com used for virtual testing environment
- *
- * Credit to B Cavalier & J Hann for the IE 6 - 9 method,
- * refined with help from Martin Cermak
- *
- * Sources that helped along the way:
- * - https://developer.mozilla.org/en-US/docs/Browser_detection_using_the_user_agent
- * - http://www.phpied.com/when-is-a-stylesheet-really-loaded/
- * - https://github.com/cujojs/curl/blob/master/src/curl/plugin/css.js
- *
- */
-
-define(function() {
- //>>excludeStart('excludeRequireCss', pragmas.excludeRequireCss)
- if (typeof window == 'undefined')
- return {
- load: function(n, r, load) {
- load()
- }
- };
-
- var head = document.getElementsByTagName('head')[0];
-
- var engine = window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/) || 0;
-
- // use