Browse Source

admin #1812: Removed helpers and tests from repo

tags/v0.10.0^2
Shaun 2 years ago
parent
commit
849b714471
100 changed files with 0 additions and 10218 deletions
  1. +0
    -7
      .gitignore
  2. BIN
     
  3. +0
    -385
      helpers/discord-zone-images/caves.json
  4. BIN
     
  5. +0
    -385
      helpers/discord-zone-images/estuary.json
  6. BIN
     
  7. +0
    -385
      helpers/discord-zone-images/sewer.json
  8. BIN
     
  9. +0
    -385
      helpers/discord-zone-images/tutorial.json
  10. BIN
     
  11. +0
    -81
      helpers/item-tooltip/builder.js
  12. +0
    -21
      helpers/item-tooltip/index.html
  13. +0
    -76
      helpers/item-tooltip/styles.css
  14. +0
    -1
      helpers/passives/client/css/main.css
  15. +0
    -59
      helpers/passives/client/css/main.less
  16. +0
    -1
      helpers/passives/client/css/ui.less
  17. +0
    -12
      helpers/passives/client/index.html
  18. +0
    -31
      helpers/passives/client/js/app.js
  19. +0
    -50
      helpers/passives/client/js/client.js
  20. +0
    -63
      helpers/passives/client/js/constants.js
  21. +0
    -47
      helpers/passives/client/js/events.js
  22. +0
    -303
      helpers/passives/client/js/generator.js
  23. +0
    -113
      helpers/passives/client/js/helpers.js
  24. +0
    -163
      helpers/passives/client/js/input.js
  25. +0
    -152
      helpers/passives/client/js/main.js
  26. +0
    -312
      helpers/passives/client/js/renderer.js
  27. +0
    -27
      helpers/passives/client/js/tplNode.js
  28. +0
    -174
      helpers/passives/client/plugins/css.js
  29. +0
    -123
      helpers/passives/client/plugins/html.js
  30. +0
    -4
      helpers/passives/client/plugins/jquery.min.js
  31. +0
    -72
      helpers/passives/client/plugins/json.js
  32. +0
    -2106
      helpers/passives/client/plugins/require.js
  33. +0
    -3
      helpers/passives/client/plugins/socket.js
  34. +0
    -391
      helpers/passives/client/plugins/text.js
  35. +0
    -78
      helpers/passives/client/ui/factory.js
  36. +0
    -20
      helpers/passives/client/ui/templates/export/export.js
  37. +0
    -1
      helpers/passives/client/ui/templates/export/styles.css
  38. +0
    -28
      helpers/passives/client/ui/templates/export/styles.less
  39. +0
    -8
      helpers/passives/client/ui/templates/export/template.html
  40. +0
    -210
      helpers/passives/client/ui/templates/groups/groups.js
  41. +0
    -1
      helpers/passives/client/ui/templates/groups/styles.css
  42. +0
    -62
      helpers/passives/client/ui/templates/groups/styles.less
  43. +0
    -13
      helpers/passives/client/ui/templates/groups/template.html
  44. +0
    -31
      helpers/passives/client/ui/templates/import/import.js
  45. +0
    -1
      helpers/passives/client/ui/templates/import/styles.css
  46. +0
    -45
      helpers/passives/client/ui/templates/import/styles.less
  47. +0
    -9
      helpers/passives/client/ui/templates/import/template.html
  48. +0
    -48
      helpers/passives/client/ui/templates/load/load.js
  49. +0
    -1
      helpers/passives/client/ui/templates/load/styles.css
  50. +0
    -37
      helpers/passives/client/ui/templates/load/styles.less
  51. +0
    -10
      helpers/passives/client/ui/templates/load/template.html
  52. +0
    -63
      helpers/passives/client/ui/templates/menu/menu.js
  53. +0
    -1
      helpers/passives/client/ui/templates/menu/styles.css
  54. +0
    -48
      helpers/passives/client/ui/templates/menu/styles.less
  55. +0
    -13
      helpers/passives/client/ui/templates/menu/template.html
  56. +0
    -30
      helpers/passives/client/ui/templates/mode/mode.js
  57. +0
    -1
      helpers/passives/client/ui/templates/mode/styles.css
  58. +0
    -48
      helpers/passives/client/ui/templates/mode/styles.less
  59. +0
    -11
      helpers/passives/client/ui/templates/mode/template.html
  60. +0
    -177
      helpers/passives/client/ui/templates/nodeInfo/nodeInfo.js
  61. +0
    -1
      helpers/passives/client/ui/templates/nodeInfo/styles.css
  62. +0
    -111
      helpers/passives/client/ui/templates/nodeInfo/styles.less
  63. +0
    -15
      helpers/passives/client/ui/templates/nodeInfo/template.html
  64. +0
    -39
      helpers/passives/client/ui/templates/renameGroup/renameGroup.js
  65. +0
    -1
      helpers/passives/client/ui/templates/renameGroup/styles.css
  66. +0
    -44
      helpers/passives/client/ui/templates/renameGroup/styles.less
  67. +0
    -9
      helpers/passives/client/ui/templates/renameGroup/template.html
  68. +0
    -35
      helpers/passives/client/ui/templates/save/save.js
  69. +0
    -1
      helpers/passives/client/ui/templates/save/styles.css
  70. +0
    -44
      helpers/passives/client/ui/templates/save/styles.less
  71. +0
    -9
      helpers/passives/client/ui/templates/save/template.html
  72. +0
    -1
      helpers/passives/client/ui/templates/tooltip/styles.css
  73. +0
    -10
      helpers/passives/client/ui/templates/tooltip/styles.less
  74. +0
    -1
      helpers/passives/client/ui/templates/tooltip/template.html
  75. +0
    -33
      helpers/passives/client/ui/templates/tooltip/tooltip.js
  76. +0
    -153
      helpers/passives/client/ui/uiBase.js
  77. +0
    -75
      helpers/passives/server/index.js
  78. +0
    -25
      helpers/passives/server/nodemon.json
  79. +0
    -1127
      helpers/passives/server/package-lock.json
  80. +0
    -10
      helpers/passives/server/package.json
  81. +0
    -9
      helpers/passives/server/persist.js
  82. +0
    -1
      helpers/passives/server/saves/flower.json
  83. +0
    -1
      helpers/passives/server/saves/test 1.json
  84. +0
    -1
      helpers/passives/server/saves/tree.json
  85. +0
    -2
      helpers/passives/todo
  86. +0
    -4
      helpers/sims/dpt/index.js
  87. +0
    -23
      helpers/sims/dpt/nodemon.json
  88. +0
    -18
      helpers/sims/dpt/package-lock.json
  89. +0
    -10
      helpers/sims/dpt/package.json
  90. +0
    -181
      helpers/sims/dpt/sim.js
  91. +0
    -147
      helpers/sqlite-to-rethink/cheatsheet.js
  92. +0
    -141
      helpers/sqlite-to-rethink/index.js
  93. +0
    -827
      helpers/sqlite-to-rethink/package-lock.json
  94. +0
    -9
      helpers/sqlite-to-rethink/package.json
  95. +0
    -8
      tests/index.js
  96. +0
    -18
      tests/package-lock.json
  97. +0
    -10
      tests/package.json
  98. +0
    -16
      tests/require.js
  99. +0
    -56
      tests/server/components/dialogue.js
  100. +0
    -65
      tests/server/components/equipment.js

+ 0
- 7
.gitignore View File

@@ -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

BIN
View File


+ 0
- 385
helpers/discord-zone-images/caves.json View File

@@ -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
}

BIN
View File


+ 0
- 385
helpers/discord-zone-images/estuary.json View File

@@ -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
}

BIN
View File


+ 0
- 385
helpers/discord-zone-images/sewer.json View File

@@ -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
}

BIN
View File


+ 0
- 385
helpers/discord-zone-images/tutorial.json View File

@@ -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
}

BIN
View File


+ 0
- 81
helpers/item-tooltip/builder.js View File

@@ -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 += '<div class="stat">' + v + '</div>';
}
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);
});
});

+ 0
- 21
helpers/item-tooltip/index.html View File

@@ -1,21 +0,0 @@
<!doctype html>
<html>
<head>
<title>builder</title>
<link rel="stylesheet" href="styles.css">
<script src="../../src/client/plugins/jquery.min.js"></script>
<script src="builder.js"></script>
</head>
<body>
<div class="tooltip">
<div class="sprite-box">
<div class="sprite"></div>
</div>
<div class="name"></div>
<div class="type"></div>
<div class="rqr"></div>
<div class="stats"></div>
<div class="description"></div>
</div>
</body>
</html>

+ 0
- 76
helpers/item-tooltip/styles.css View File

@@ -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;
}

+ 0
- 1
helpers/passives/client/css/main.css View File

@@ -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}

+ 0
- 59
helpers/passives/client/css/main.less View File

@@ -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;
}


+ 0
- 1
helpers/passives/client/css/ui.less View File

@@ -1 +0,0 @@
@import "../../../src/client/css/colors.less";

+ 0
- 12
helpers/passives/client/index.html View File

@@ -1,12 +0,0 @@
<!doctype html>
<html>
<head>
<title>test</title>
<link rel="stylesheet" href="css/main.css">
<script src="plugins/require.js" data-main="js/app"></script>
</head>
<body>
<canvas class="canvas"></canvas>
<div class="ui-container"></div>
</body>
</html>

+ 0
- 31
helpers/passives/client/js/app.js View File

@@ -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();
});

+ 0
- 50
helpers/passives/client/js/client.js View File

@@ -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();
}
};
});

+ 0
- 63
helpers/passives/client/js/constants.js View File

@@ -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'
}
};
});

+ 0
- 47
helpers/passives/client/js/events.js View File

@@ -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;
});

+ 0
- 303
helpers/passives/client/js/generator.js View File

@@ -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] + '<br />';
text = text.substr(0, text.length - 6);

if (text.length > 0)
events.emit('onShowTooltip', e, text);
} else
events.emit('onHideTooltip');
}
}
};
});

+ 0
- 113
helpers/passives/client/js/helpers.js View File

@@ -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._;
});

+ 0
- 163
helpers/passives/client/js/input.js View File

@@ -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
});
}
}
}
};
});

+ 0
- 152
helpers/passives/client/js/main.js View File

@@ -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();
}
}
};
});

+ 0
- 312
helpers/passives/client/js/renderer.js View File

@@ -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();
}
}
};
});

+ 0
- 27
helpers/passives/client/js/tplNode.js View File

@@ -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;
}
};
});

+ 0
- 174
helpers/passives/client/plugins/css.js View File

@@ -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 <style> @import load method (IE < 9, Firefox < 18)
var useImportLoad = false;

// set to false for explicit <link> load checking when onload doesn't work perfectly (webkit)
var useOnload = true;

// trident / msie
if (engine[1] || engine[7])
useImportLoad = parseInt(engine[1]) < 6 || parseInt(engine[7]) <= 9;
// webkit
else if (engine[2] || engine[8])
useOnload = false;
// gecko
else if (engine[4])
useImportLoad = parseInt(engine[4]) < 18;

//>>excludeEnd('excludeRequireCss')
//main api object
var cssAPI = {};

//>>excludeStart('excludeRequireCss', pragmas.excludeRequireCss)
cssAPI.pluginBuilder = './css-builder';

// <style> @import load method
var curStyle, curSheet;
var createStyle = function() {
curStyle = document.createElement('style');
head.appendChild(curStyle);
curSheet = curStyle.styleSheet || curStyle.sheet;
}
var ieCnt = 0;
var ieLoads = [];
var ieCurCallback;

var createIeLoad = function(url) {
curSheet.addImport(url);
curStyle.onload = function() {
processIeLoad()
};

ieCnt++;
if (ieCnt == 31) {
createStyle();
ieCnt = 0;
}
}
var processIeLoad = function() {
ieCurCallback();

var nextLoad = ieLoads.shift();

if (!nextLoad) {
ieCurCallback = null;
return;
}

ieCurCallback = nextLoad[1];
createIeLoad(nextLoad[0]);
}
var importLoad = function(url, callback) {
if (!curSheet || !curSheet.addImport)
createStyle();

if (curSheet && curSheet.addImport) {
// old IE
if (ieCurCallback) {
ieLoads.push([url, callback]);
} else {
createIeLoad(url);
ieCurCallback = callback;
}
} else {
// old Firefox
curStyle.textContent = '@import "' + url + '";';

var loadInterval = setInterval(function() {
try {
curStyle.sheet.cssRules;
clearInterval(loadInterval);
callback();
} catch (e) {}
}, 10);
}
}

// <link> load method
var linkLoad = function(url, callback) {
var link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
if (useOnload) {
link.onload = function() {
link.onload = function() {};
// for style dimensions queries, a short delay can still be necessary
setTimeout(callback, 7);
}
} else {
var loadInterval = setInterval(function() {
for (var i = 0; i < document.styleSheets.length; i++) {
var sheet = document.styleSheets[i];
if (sheet.href == link.href) {
clearInterval(loadInterval);
return callback();
}
}
}, 10);
}
link.href = url;
head.appendChild(link);
}

//>>excludeEnd('excludeRequireCss')
cssAPI.normalize = function(name, normalize) {
if (name.substr(name.length - 4, 4) == '.css')
name = name.substr(0, name.length - 4);

return normalize(name);
}

//>>excludeStart('excludeRequireCss', pragmas.excludeRequireCss)
cssAPI.load = function(cssId, req, load, config) {

(useImportLoad ? importLoad : linkLoad)(req.toUrl(cssId + '.css'), load);

}

//>>excludeEnd('excludeRequireCss')
return cssAPI;
});

+ 0
- 123
helpers/passives/client/plugins/html.js View File

@@ -1,123 +0,0 @@
define(['text'], function(textPlugin) {

var buildText = {};

return {

load: function(name, req, onLoad, config) {
var self = this,
file = name,
segments = file.split('/');

// If the module name does not have an extension, append the default one
if (segments[segments.length - 1].lastIndexOf('.') == -1) {
file += '.html';
}

textPlugin.get(req.toUrl(file), function(html) {

for (var option in config.config.html) {
if (option in self.transform) {
html = self.transform[option](config.config.html[option], html);
}
}

if (config.isBuild) {
buildText[name] = textPlugin.jsEscape(html);
}

onLoad(html);

}, onLoad.error);
},


write: function(pluginName, moduleName, write) {
if (buildText.hasOwnProperty(moduleName)) {
var name = "'" + pluginName + "!" + moduleName + "'",
text = "function () {return '" + buildText[moduleName] + "';}";

write("define(" + name + ", " + text + ");\n");
}
},


transform: {

comments: function(action, html) {
if (action === 'strip') {
return html.replace(/<!--(.|[\n\r])*?-->/gm, '');
} else {
return html;
}
},


whitespaceBetweenTags: function(action, html) {
var pattern = />[\n\r\s]+</gm;

if (action === 'strip') {
return html.replace(pattern, '><');
} else if (action === 'collapse') {
return html.replace(pattern, '> <');
} else {
return html;
}
},


whitespaceBetweenTagsAndText: function(action, html) {
var afterTagPattern = />[\n\r\s]+/gm,
beforeTagPattern = /[\n\r\s]+</gm;

if (action === 'strip') {
return html.replace(afterTagPattern, '>').replace(beforeTagPattern, '<');
} else if (action === 'collapse') {
return html.replace(afterTagPattern, '> ').replace(beforeTagPattern, ' <');
} else {
return html;
}
},


whitespaceWithinTags: function(action, html) {
if (action === 'collapse') {
var tagPattern = /<([^>"']*?|"[^"]*?"|'[^']*?')+>/g,
attrPattern = /([^\0\n\r\s"'>\/=]+)(?:\s*(=)\s*([^\n\r\s"'=><`]+|"[^"]*"|'[^']*'))?/gi,
lastIndex = 0,
result = '',
match,
tag;

while ((match = tagPattern.exec(html)) !== null) {

// Copy text between the beginning of this match and the end of the last one
result += html.substring(lastIndex, match.index);
tag = match[0];

if (/^<[^\/]/.test(tag)) { // It's a start tag
var attrs = tag.match(attrPattern),
start = attrs.shift(),
end = /\/>$/.test(tag) ? '/>' : '>';

result += start + attrs.map(function(attr) {
return attr.replace(attrPattern, ' $1$2$3');
}).join('') + end;
} else { // It's an end tag
result += tag.replace(/[\n\r\s]+/g, '');
}

lastIndex = tagPattern.lastIndex;
}

return result + html.substring(lastIndex);
} else {
return html;
}
}

}

};

});

+ 0
- 4
helpers/passives/client/plugins/jquery.min.js
File diff suppressed because it is too large
View File


+ 0
- 72
helpers/passives/client/plugins/json.js View File

@@ -1,72 +0,0 @@
/** @license
* RequireJS plugin for loading JSON files
* - depends on Text plugin and it was HEAVILY "inspired" by it as well.
* Author: Miller Medeiros
* Version: 0.4.0 (2014/04/10)
* Released under the MIT license
*/
define(['text'], function(text){

var CACHE_BUST_QUERY_PARAM = 'bust',
CACHE_BUST_FLAG = '!bust',
jsonParse = (typeof JSON !== 'undefined' && typeof JSON.parse === 'function')? JSON.parse : function(val){
return eval('('+ val +')'); //quick and dirty
},
buildMap = {};

function cacheBust(url){
url = url.replace(CACHE_BUST_FLAG, '');
url += (url.indexOf('?') < 0)? '?' : '&';
return url + CACHE_BUST_QUERY_PARAM +'='+ Math.round(2147483647 * Math.random());
}

//API
return {

load : function(name, req, onLoad, config) {
if (( config.isBuild && (config.inlineJSON === false || name.indexOf(CACHE_BUST_QUERY_PARAM +'=') !== -1)) || (req.toUrl(name).indexOf('empty:') === 0)) {
//avoid inlining cache busted JSON or if inlineJSON:false
//and don't inline files marked as empty!
onLoad(null);
} else {
text.get(req.toUrl(name), function(data){
var parsed;
if (config.isBuild) {
buildMap[name] = data;
onLoad(data);
} else {
try {
parsed = jsonParse(data);
} catch (e) {
onLoad.error(e);
}
onLoad(parsed);
}
},
onLoad.error, {
accept: 'application/json'
}
);
}
},

normalize : function (name, normalize) {
// used normalize to avoid caching references to a "cache busted" request
if (name.indexOf(CACHE_BUST_FLAG) !== -1) {
name = cacheBust(name);
}
// resolve any relative paths
return normalize(name);
},

//write method based on RequireJS official text plugin by James Burke
//https://github.com/jrburke/requirejs/blob/master/text.js
write : function(pluginName, moduleName, write){
if(moduleName in buildMap){
var content = buildMap[moduleName];
write('define("'+ pluginName +'!'+ moduleName +'", function(){ return '+ content +';});\n');
}
}

};
});

+ 0
- 2106
helpers/passives/client/plugins/require.js
File diff suppressed because it is too large
View File


+ 0
- 3
helpers/passives/client/plugins/socket.js
File diff suppressed because it is too large
View File


+ 0
- 391
helpers/passives/client/plugins/text.js View File

@@ -1,391 +0,0 @@
/**
* @license RequireJS text 2.0.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/requirejs/text for details
*/
/*jslint regexp: true */
/*global require, XMLHttpRequest, ActiveXObject,
define, window, process, Packages,
java, location, Components, FileUtils */

define(['module'], function (module) {
'use strict';

var text, fs, Cc, Ci, xpcIsWindows,
progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'],
xmlRegExp = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,
bodyRegExp = /<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,
hasLocation = typeof location !== 'undefined' && location.href,
defaultProtocol = hasLocation && location.protocol && location.protocol.replace(/\:/, ''),
defaultHostName = hasLocation && location.hostname,
defaultPort = hasLocation && (location.port || undefined),
buildMap = {},
masterConfig = (module.config && module.config()) || {};

text = {
version: '2.0.14',

strip: function (content) {
//Strips <?xml ...?> declarations so that external SVG and XML
//documents can be added to a document without worry. Also, if the string
//is an HTML document, only the part inside the body tag is returned.
if (content) {
content = content.replace(xmlRegExp, "");
var matches = content.match(bodyRegExp);
if (matches) {
content = matches[1];
}
} else {
content = "";
}
return content;
},

jsEscape: function (content) {
return content.replace(/(['\\])/g, '\\$1')
.replace(/[\f]/g, "\\f")
.replace(/[\b]/g, "\\b")
.replace(/[\n]/g, "\\n")
.replace(/[\t]/g, "\\t")
.replace(/[\r]/g, "\\r")
.replace(/[\u2028]/g, "\\u2028")
.replace(/[\u2029]/g, "\\u2029");
},

createXhr: masterConfig.createXhr || function () {
//Would love to dump the ActiveX crap in here. Need IE 6 to die first.
var xhr, i, progId;
if (typeof XMLHttpRequest !== "undefined") {
return new XMLHttpRequest();
} else if (typeof ActiveXObject !== "undefined") {
for (i = 0; i < 3; i += 1) {
progId = progIds[i];
try {
xhr = new ActiveXObject(progId);
} catch (e) {}

if (xhr) {
progIds = [progId]; // so faster next time
break;
}
}
}

return xhr;
},

/**
* Parses a resource name into its component parts. Resource names
* look like: module/name.ext!strip, where the !strip part is
* optional.
* @param {String} name the resource name
* @returns {Object} with properties "moduleName", "ext" and "strip"
* where strip is a boolean.
*/
parseName: function (name) {
var modName, ext, temp,
strip = false,
index = name.lastIndexOf("."),
isRelative = name.indexOf('./') === 0 ||
name.indexOf('../') === 0;

if (index !== -1 && (!isRelative || index > 1)) {
modName = name.substring(0, index);
ext = name.substring(index + 1);
} else {
modName = name;
}

temp = ext || modName;
index = temp.indexOf("!");
if (index !== -1) {
//Pull off the strip arg.
strip = temp.substring(index + 1) === "strip";
temp = temp.substring(0, index);
if (ext) {
ext = temp;
} else {
modName = temp;
}
}

return {
moduleName: modName,
ext: ext,
strip: strip
};
},

xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,

/**
* Is an URL on another domain. Only works for browser use, returns
* false in non-browser environments. Only used to know if an
* optimized .js version of a text resource should be loaded
* instead.
* @param {String} url
* @returns Boolean
*/
useXhr: function (url, protocol, hostname, port) {
var uProtocol, uHostName, uPort,
match = text.xdRegExp.exec(url);
if (!match) {
return true;
}
uProtocol = match[2];
uHostName = match[3];

uHostName = uHostName.split(':');
uPort = uHostName[1];
uHostName = uHostName[0];

return (!uProtocol || uProtocol === protocol) &&
(!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) &&
((!uPort && !uHostName) || uPort === port);
},

finishLoad: function (name, strip, content, onLoad) {
content = strip ? text.strip(content) : content;
if (masterConfig.isBuild) {
buildMap[name] = content;
}
onLoad(content);
},

load: function (name, req, onLoad, config) {
//Name has format: some.module.filext!strip
//The strip part is optional.
//if strip is present, then that means only get the string contents
//inside a body tag in an HTML string. For XML/SVG content it means
//removing the <?xml ...?> declarations so the content can be inserted
//into the current doc without problems.

// Do not bother with the work if a build and text will
// not be inlined.
if (config && config.isBuild && !config.inlineText) {
onLoad();
return;
}

masterConfig.isBuild = config && config.isBuild;

var parsed = text.parseName(name),
nonStripName = parsed.moduleName +
(parsed.ext ? '.' + parsed.ext : ''),
url = req.toUrl(nonStripName),
useXhr = (masterConfig.useXhr) ||
text.useXhr;

// Do not load if it is an empty: url
if (url.indexOf('empty:') === 0) {
onLoad();
return;
}

//Load the text. Use XHR if possible and in a browser.
if (!hasLocation || useXhr(url, defaultProtocol, defaultHostName, defaultPort)) {
text.get(url, function (content) {
text.finishLoad(name, parsed.strip, content, onLoad);
}, function (err) {
if (onLoad.error) {
onLoad.error(err);
}
});
} else {
//Need to fetch the resource across domains. Assume
//the resource has been optimized into a JS module. Fetch
//by the module name + extension, but do not include the
//!strip part to avoid file system issues.
req([nonStripName], function (content) {
text.finishLoad(parsed.moduleName + '.' + parsed.ext,
parsed.strip, content, onLoad);
});
}
},

write: function (pluginName, moduleName, write, config) {
if (buildMap.hasOwnProperty(moduleName)) {
var content = text.jsEscape(buildMap[moduleName]);
write.asModule(pluginName + "!" + moduleName,
"define(function () { return '" +
content +
"';});\n");
}
},

writeFile: function (pluginName, moduleName, req, write, config) {
var parsed = text.parseName(moduleName),
extPart = parsed.ext ? '.' + parsed.ext : '',
nonStripName = parsed.moduleName + extPart,
//Use a '.js' file name so that it indicates it is a
//script that can be loaded across domains.
fileName = req.toUrl(parsed.moduleName + extPart) + '.js';

//Leverage own load() method to load plugin value, but only
//write out values that do not have the strip argument,
//to avoid any potential issues with ! in file names.
text.load(nonStripName, req, function (value) {
//Use own write() method to construct full module value.
//But need to create shell that translates writeFile's
//write() to the right interface.
var textWrite = function (contents) {
return write(fileName, contents);
};
textWrite.asModule = function (moduleName, contents) {
return write.asModule(moduleName, fileName, contents);
};

text.write(pluginName, nonStripName, textWrite, config);
}, config);
}
};

if (masterConfig.env === 'node' || (!masterConfig.env &&
typeof process !== "undefined" &&
process.versions &&
!!process.versions.node &&
!process.versions['node-webkit'] &&
!process.versions['atom-shell'])) {
//Using special require.nodeRequire, something added by r.js.
fs = require.nodeRequire('fs');

text.get = function (url, callback, errback) {
try {
var file = fs.readFileSync(url, 'utf8');
//Remove BOM (Byte Mark Order) from utf8 files if it is there.
if (file[0] === '\uFEFF') {
file = file.substring(1);
}
callback(file);
} catch (e) {
if (errback) {
errback(e);
}
}
};
} else if (masterConfig.env === 'xhr' || (!masterConfig.env &&
text.createXhr())) {
text.get = function (url, callback, errback, headers) {
var xhr = text.createXhr(), header;
xhr.open('GET', url, true);

//Allow plugins direct access to xhr headers
if (headers) {
for (header in headers) {
if (headers.hasOwnProperty(header)) {
xhr.setRequestHeader(header.toLowerCase(), headers[header]);
}
}
}

//Allow overrides specified in config
if (masterConfig.onXhr) {
masterConfig.onXhr(xhr, url);
}

xhr.onreadystatechange = function (evt) {
var status, err;
//Do not explicitly handle errors, those should be
//visible via console output in the browser.
if (xhr.readyState === 4) {
status = xhr.status || 0;
if (status > 399 && status < 600) {
//An http 4xx or 5xx error. Signal an error.
err = new Error(url + ' HTTP status: ' + status);
err.xhr = xhr;
if (errback) {
errback(err);
}
} else {
callback(xhr.responseText);
}

if (masterConfig.onXhrComplete) {
masterConfig.onXhrComplete(xhr, url);
}
}
};
xhr.send(null);
};
} else if (masterConfig.env === 'rhino' || (!masterConfig.env &&
typeof Packages !== 'undefined' && typeof java !== 'undefined')) {
//Why Java, why is this so awkward?
text.get = function (url, callback) {
var stringBuffer, line,
encoding = "utf-8",
file = new java.io.File(url),
lineSeparator = java.lang.System.getProperty("line.separator"),
input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)),
content = '';
try {
stringBuffer = new java.lang.StringBuffer();
line = input.readLine();

// Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324
// http://www.unicode.org/faq/utf_bom.html

// Note that when we use utf-8, the BOM should appear as "EF BB BF", but it doesn't due to this bug in the JDK:
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
if (line && line.length() && line.charAt(0) === 0xfeff) {
// Eat the BOM, since we've already found the encoding on this file,
// and we plan to concatenating this buffer with others; the BOM should
// only appear at the top of a file.
line = line.substring(1);
}

if (line !== null) {
stringBuffer.append(line);
}

while ((line = input.readLine()) !== null) {
stringBuffer.append(lineSeparator);
stringBuffer.append(line);
}
//Make sure we return a JavaScript string and not a Java string.
content = String(stringBuffer.toString()); //String
} finally {
input.close();
}
callback(content);
};
} else if (masterConfig.env === 'xpconnect' || (!masterConfig.env &&
typeof Components !== 'undefined' && Components.classes &&
Components.interfaces)) {
//Avert your gaze!
Cc = Components.classes;
Ci = Components.interfaces;
Components.utils['import']('resource://gre/modules/FileUtils.jsm');
xpcIsWindows = ('@mozilla.org/windows-registry-key;1' in Cc);

text.get = function (url, callback) {
var inStream, convertStream, fileObj,
readData = {};

if (xpcIsWindows) {
url = url.replace(/\//g, '\\');
}

fileObj = new FileUtils.File(url);

//XPCOM, you so crazy
try {
inStream = Cc['@mozilla.org/network/file-input-stream;1']
.createInstance(Ci.nsIFileInputStream);
inStream.init(fileObj, 1, 0, false);

convertStream = Cc['@mozilla.org/intl/converter-input-stream;1']
.createInstance(Ci.nsIConverterInputStream);
convertStream.init(inStream, "utf-8", inStream.available(),
Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);

convertStream.readString(inStream.available(), readData);
convertStream.close();
inStream.close();
callback(readData.value);
} catch (e) {
throw new Error((fileObj && fileObj.path || '') + ': ' + e);
}
};
}
return text;
});

+ 0
- 78
helpers/passives/client/ui/factory.js View File

@@ -1,78 +0,0 @@
define([
'ui/uiBase',
'js/events'
], function (
uiBase,
events
) {
return {
uis: [],
root: '',

init: function (root) {
if (root)
this.root = root + '/';

events.on('onKeyDown', this.events.onKeyDown.bind(this));
},

build: function (type, options) {
let className = 'ui' + type[0].toUpperCase() + type.substr(1);
let el = $('.' + className);
if (el.length > 0)
return;

this.getTemplate(type, options);
$(window).on('resize', this.onResize.bind(this));
},

getTemplate: function (type, options) {
require([this.root + 'ui/templates/' + type + '/' + type], this.onGetTemplate.bind(this, options));
},

onGetTemplate: function (options, template) {
let ui = $.extend(true, {}, uiBase, template);
ui.setOptions(options);
ui.render();
ui.el.data('ui', ui);

this.uis.push(ui);

if ((options) && (options.onDone))
options.onDone(ui);
},

onResize: function () {
this.uis.forEach(function (ui) {
if (ui.centered)
ui.center();
else if ((ui.centeredX) || (ui.centeredY))
ui.center(ui.centeredX, ui.centeredY);
}, this);
},

update: function () {
let uis = this.uis;
let uLen = uis.length;
for (let i = 0; i < uLen; i++) {
let u = uis[i];
if (u.update)
u.update();
}
},

events: {
onKeyDown: function (key) {
if (key == 'esc') {
this.uis.forEach(function (u) {
if (!u.modal)
return;

u.destroy();
});
$('.uiOverlay').hide();
}
}
}
};
});

+ 0
- 20
helpers/passives/client/ui/templates/export/export.js View File

@@ -1,20 +0,0 @@
define([
'html!./template',
'css!./styles',
'js/generator'
], function (
template,
styles,
generator
) {
return {
tpl: template,
modal: true,
centered: true,

postRender: function () {
var data = generator.serialize();
this.find('textarea').val(data);
}
}
});

+ 0
- 1
helpers/passives/client/ui/templates/export/styles.css View File

@@ -1 +0,0 @@
.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}.uiExport{position:absolute;right:10px;top:10px;padding:10px;width:400px;height:300px;background-color:#373041;text-align:center}.uiExport .heading-text{color:#f2f5f5;margin-bottom:15px}.uiExport textarea{border:none;outline:none;width:100%;display:block;height:245px;padding:5px;display:box;font-size:16px}

+ 0
- 28
helpers/passives/client/ui/templates/export/styles.less View File

@@ -1,28 +0,0 @@
@import "../../../css/colors.less";

.uiExport {
position: absolute;
right: 10px;
top: 10px;
padding: 10px;
width: 400px;
height: 300px;
background-color: #373041;
text-align: center;

.heading-text {
color: @white;
margin-bottom: 15px;
}

textarea {
border: none;
outline: none;
width: 100%;
display: block;
height: 245px;
padding: 5px;
display: box;
font-size: 16px;
}
}

+ 0
- 8
helpers/passives/client/ui/templates/export/template.html View File

@@ -1,8 +0,0 @@
<div class="uiExport">
<div uiLoad="heading">
<div class="heading-text">Export</div>
</div>
<div class="content">
<textarea class="data" />
</div>
</div>

+ 0
- 210
helpers/passives/client/ui/templates/groups/groups.js View File

@@ -1,210 +0,0 @@
define([
'html!./template',
'css!./styles',
'js/generator',
'js/client',
'js/renderer',
'js/input',
'ui/factory',
'js/events'
], function (
template,
styles,
generator,
client,
renderer,
input,
uiFactory,
events
) {
return {
tpl: template,

postRender: function () {
this.onEvent('onTreeLoaded', this.events.onTreeLoaded.bind(this));
this.onEvent('onNew', this.events.onNew.bind(this));
this.onEvent('onDeleteNode', this.events.onDeleteNode.bind(this));
this.onEvent('onSelectNode', this.events.onSelectNode.bind(this));

this.on('.btnAdd', 'click', this.actions.add.bind(this));
this.on('.btnRename', 'click', this.events.onClickRename.bind(this));
this.on('.btnRemove', 'click', this.events.onClickRemove.bind(this));
},

addGroup: function (groupName) {
var el = $('<div class="item">' + groupName + '</div>')
.appendTo(this.find('.list'))
.attr('group', groupName);

el.on('click', this.events.onClickGroup.bind(this));
},

actions: {
add: function () {
var selected = generator.nodes.filter(n => n.selected);
var groupName = 'group-' + this.find('.list .item').length;

selected.forEach(function (s) {
if (!s.group)
s.group = [];

s.group.push(groupName)
});

this.addGroup(groupName);
},

rename: function (newName) {
var el = this.find('.list .active').eq(0);
if (!el)
return;

var oldName = el.attr('group');

el
.html(newName)
.attr('group', newName);

generator.nodes
.filter(n => ((n.group) && (n.group.indexOf(oldName) > -1)))
.forEach(function (n) {
var group = n.group;
group.spliceWhere(g => (g == oldName));
group.push(newName);
});
},

remove: function (group) {
generator.nodes.forEach(function (g) {
if ((g.group) && (g.group.indexOf(group) > -1)) {
g.group.spliceWhere(g => (g == group));
if (g.group.length == 0)
delete g.group;
}
});

this.find('.item[group="' + group + '"]').remove();
}
},

events: {
onNew: function () {
this.find('.list').empty();
},

onDeleteNode: function (node) {
if ((!node.group) || (node.group.length == 0))
return;

node.group.forEach(function (g) {
var hasSiblings = generator.nodes.some(n => ((n.group) && (n.group.indexOf(g) > -1)))
if (!hasSiblings)
this.find('.item[group="' + g + '"]').remove();
}, this);
},

onClickRename: function (e) {
uiFactory.build('renameGroup', {
onDone: this.events.onRenameGroupBuilt.bind(this)
});
},

onRenameGroupBuilt: function () {
var oldName = null;
var el = this.find('.list .active').eq(0);
if (el)
oldName = el.attr('group');

events.emit('onRenameGroup', oldName, this.actions.rename.bind(this));
},

onClickRemove: function (e) {
var el = this.find('.list .active').eq(0);
if (!el)
return;

el.remove();
var groupName = el.attr('group');

generator.nodes
.filter(n => ((n.group) && (n.group.indexOf(groupName) > -1)))
.forEach(function (n) {
n.group.spliceWhere(g => (g == groupName));
});
},

onTreeLoaded: function (tree) {
var container = this.find('.list').empty();
var groups = [];

tree.nodes
.filter(n => !!n.group)
.sort(function (a, b) {
if (a.group < b.group)
return -1;
else if (b.group < a.group)
return 1;
})
.forEach(function (n) {
n.group.forEach(function (g) {
if (groups.indexOf(g) > -1)
return;

this.addGroup(g);
groups.push(g);
}, this);
}, this);
},

onClickGroup: function (e) {
var group = $(e.currentTarget).attr('group');

var pos = {
x: 0,
y: 0
};

var nodes = generator.nodes
.filter(function (n) {
if ((!n.group) || (n.group.indexOf(group) == -1))
return false;

pos.x += n.pos.x;
pos.y += n.pos.y;

return true;
});

pos.x /= nodes.length;
pos.y /= nodes.length;

generator.callAction('selectNode', nodes);

if (input.isKeyDown('shift')) {
renderer.center({
pos: pos
});
}
renderer.makeDirty();
},

onSelectNode: function (nodes) {
this.find('.list .active').removeClass('active');

var selectedGroup = null;

nodes.forEach(function (n) {
(n.group || []).forEach(function (g) {
var list = generator.nodes.filter(a => ((a.group) && (a.group.indexOf(g) > -1)));
var check = nodes.filter(a => ((a.group) && (a.group.indexOf(g) > -1)));
if (list.length == check.length)
selectedGroup = g;
});
});

if (selectedGroup)
this.find('.list .item[group="' + selectedGroup + '"]').addClass('active');
}
}
}
});

+ 0
- 1
helpers/passives/client/ui/templates/groups/styles.css View File

@@ -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}.uiGroups{position:absolute;left:10px;bottom:10px;padding:10px;width:200px;background-color:#373041;text-align:center}.uiGroups .heading-text{color:#f2f5f5;margin-bottom:15px}.uiGroups .list:not(:empty){margin-bottom:15px}.uiGroups .list .item{width:100%;color:#f2f5f5;background-color:#505360;padding:5px 0 5px 0;margin-bottom:5px;cursor:pointer}.uiGroups .list .item:hover{background-color:#929398}.uiGroups .list .item:last-child{margin-bottom:0}.uiGroups .list .item.active{background-color:#929398}.uiGroups .btn{width:calc((100% - 30px) / 3);color:#f2f5f5;background-color:#3fa7dd;padding:5px;box-sizing:border-box;float:left;cursor:pointer}.uiGroups .btn:hover{background-color:#51fc9a;color:#3c3f4c}.uiGroups .btn:not(:last-child){margin-right:15px}

+ 0
- 62
helpers/passives/client/ui/templates/groups/styles.less View File

@@ -1,62 +0,0 @@
@import "../../../css/colors.less";

.uiGroups {
position: absolute;
left: 10px;
bottom: 10px;
padding: 10px;
width: 200px;
background-color: #373041;
text-align: center;

.heading-text {
color: @white;
margin-bottom: 15px;
}

.list {
&:not(:empty) {
margin-bottom: 15px;
}

.item {
width: 100%;
color: @white;
background-color: @blackA;
padding: 5px 0px 5px 0px;
margin-bottom: 5px;
cursor: pointer;

&:hover {
background-color: @grayC;
}

&:last-child {
margin-bottom: 0px;
}

&.active {
background-color: @grayC;
}
}
}

.btn {
width: calc((100% - 30px) / 3);
color: @white;
background-color: @blueB;
padding: 5px;
box-sizing: border-box;
float: left;
cursor: pointer;

&:hover {
background-color: @tealB;
color: @blackB;
}

&:not(:last-child) {
margin-right: 15px;
}
}
}

+ 0
- 13
helpers/passives/client/ui/templates/groups/template.html View File

@@ -1,13 +0,0 @@
<div class="uiGroups">
<div uiLoad="heading">
<div class="heading-text">Groups</div>
</div>
<div class="content">
<div class="list">
</div>
<div class="btn btnAdd">+</div>
<div class="btn btnRename">" "</div>
<div class="btn btnRemove">-</div>
</div>
</div>

+ 0
- 31
helpers/passives/client/ui/templates/import/import.js View File

@@ -1,31 +0,0 @@
define([
'html!./template',
'css!./styles',
'js/generator'
], function (
template,
styles,
generator
) {
return {
tpl: template,
modal: true,
centered: true,

postRender: function () {
this.on('.btnImport', 'click', this.events.onImport.bind(this));
},

events: {
onImport: function () {
var val = this.find('textarea').val();

try {
var data = JSON.parse(val);
generator.callAction('load', data);
this.destroy();
} catch (e) {}
}
}
}
});

+ 0
- 1
helpers/passives/client/ui/templates/import/styles.css View File

@@ -1 +0,0 @@
.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}.uiImport{position:absolute;right:10px;top:10px;padding:10px;width:400px;height:340px;background-color:#373041;text-align:center}.uiImport .heading-text{color:#f2f5f5;margin-bottom:15px}.uiImport textarea{border:none;outline:none;width:100%;display:block;height:245px;padding:5px;display:box;font-size:16px;margin-bottom:15px}.uiImport .btnImport{width:calc((100% - 15px) / 2);color:#f2f5f5;margin-top:15px;background-color:#3fa7dd;padding:5px;box-sizing:border-box;margin:0 auto;cursor:pointer}.uiImport .btnImport:hover{background-color:#51fc9a;color:#3c3f4c}

+ 0
- 45
helpers/passives/client/ui/templates/import/styles.less View File

@@ -1,45 +0,0 @@
@import "../../../css/colors.less";

.uiImport {
position: absolute;
right: 10px;
top: 10px;
padding: 10px;
width: 400px;
height: 340px;
background-color: #373041;
text-align: center;

.heading-text {
color: @white;
margin-bottom: 15px;
}

textarea {
border: none;
outline: none;
width: 100%;
display: block;
height: 245px;
padding: 5px;
display: box;
font-size: 16px;
margin-bottom: 15px;
}

.btnImport {
width: calc((100% - 15px) / 2);
color: @white;
margin-top: 15px;
background-color: @blueB;
padding: 5px;
box-sizing: border-box;
margin: 0 auto;
cursor: pointer;

&:hover {
background-color: @tealB;
color: @blackB;
}
}
}

+ 0
- 9
helpers/passives/client/ui/templates/import/template.html View File

@@ -1,9 +0,0 @@
<div class="uiImport">
<div uiLoad="heading">
<div class="heading-text">Import</div>
</div>
<div class="content">
<textarea class="data" placeholder="Paste data here..."/>
<div class="btn btnImport">Import</div>
</div>
</div>

+ 0
- 48
helpers/passives/client/ui/templates/load/load.js View File

@@ -1,48 +0,0 @@
define([
'html!./template',
'css!./styles',
'js/generator',
'js/client'
], function (
template,
styles,
generator,
client
) {
return {
tpl: template,
modal: true,
centered: true,

postRender: function () {
this.on('.btnLoad', 'click', this.actions.onLoad.bind(this));

client.getFileList(this.events.onGetFileList.bind(this));
},

actions: {
onLoad: function (fileName) {
client.load(fileName, generator.actions.load.bind(generator));
this.destroy();
}
},

events: {
onGetFileList: function (list) {
var el = this.find('.list').empty();

list.forEach(function (l) {
$('<div class="item">' + l + '</div>')
.appendTo(el)
.on('click', this.events.onClickItem.bind(this, l));
}, this);
},

onClickItem: function (item) {
this.actions.onLoad.call(this, item);

$('.uiMenu').data('ui').loaded = item;
}
}
}
});

+ 0
- 1
helpers/passives/client/ui/templates/load/styles.css View File

@@ -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}.uiLoad{position:absolute;right:10px;top:10px;padding:10px;width:200px;background-color:#373041;text-align:center}.uiLoad .heading-text{color:#f2f5f5;margin-bottom:15px}.uiLoad .list .item{width:100%;color:#f2f5f5;background-color:#505360;padding:5px 0 5px 0;margin-bottom:5px;cursor:pointer}.uiLoad .list .item:hover{background-color:#929398}.uiLoad .list .item:last-child{margin-bottom:0}

+ 0
- 37
helpers/passives/client/ui/templates/load/styles.less View File

@@ -1,37 +0,0 @@
@import "../../../css/colors.less";

.uiLoad {
position: absolute;
right: 10px;
top: 10px;
padding: 10px;
width: 200px;
background-color: #373041;
text-align: center;

.heading-text {
color: @white;
margin-bottom: 15px;
}

.list {

.item {
width: 100%;
color: @white;
background-color: @blackA;
padding: 5px 0px 5px 0px;
margin-bottom: 5px;
cursor: pointer;

&:hover {
background-color: @grayC;
}

&:last-child {
margin-bottom: 0px;
}
}
}
}

+ 0
- 10
helpers/passives/client/ui/templates/load/template.html View File

@@ -1,10 +0,0 @@
<div class="uiLoad">
<div uiLoad="heading">
<div class="heading-text">Load Tree</div>
</div>
<div class="content">
<div class="list">
</div>
</div>
</div>

+ 0
- 63
helpers/passives/client/ui/templates/menu/menu.js View File

@@ -1,63 +0,0 @@
define([
'html!./template',
'css!./styles',
'ui/factory',
'js/generator',
'js/renderer',
'js/constants',
'js/client'
], function (
template,
styles,
uiFactory,
generator,
renderer,
constants,
client
) {
return {
tpl: template,

loaded: null,

postRender: function () {
if (constants.standAlone)
this.find('.content > *:not(.btnNew):not(.btnImport):not(.btnExport)').addClass('disabled');

this.on('.btnNew', 'click', this.actions.onNew.bind(this));
this.on('.btnLoad', 'click', this.actions.onLoad.bind(this));
this.on('.btnSave', 'click', this.actions.onSave.bind(this));
this.on('.btnExport', 'click', this.actions.onExport.bind(this));
this.on('.btnImport', 'click', this.actions.onImport.bind(this));
this.on('.btnPersist', 'click', this.actions.onPersist.bind(this));
},

actions: {
onNew: function () {
this.loaded = null;
generator.callAction('reset');
renderer.makeDirty();
},

onLoad: function () {
uiFactory.build('load');
},

onSave: function () {
uiFactory.build('save');
},

onExport: function () {
uiFactory.build('export');
},

onImport: function () {
uiFactory.build('import');
},

onPersist: function () {
client.persist(generator.getData());
}
}
};
});

+ 0
- 1
helpers/passives/client/ui/templates/menu/styles.css View File

@@ -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}.uiMenu{position:absolute;right:10px;bottom:10px;padding:10px;width:120px;background-color:#373041;text-align:center}.uiMenu .heading{color:#f2f5f5;margin-bottom:15px}.uiMenu input{border:none;outline:none;width:calc(100% - 10px);height:20px;padding:5px;display:box}.uiMenu .btn{float:left;width:100%;color:#f2f5f5;background-color:#3fa7dd;padding:5px;box-sizing:border-box;cursor:pointer}.uiMenu .btn:not(:last-child){margin-bottom:15px}.uiMenu .btn:hover{background-color:#51fc9a;color:#3c3f4c}.uiMenu .btn:nth-child(3),.uiMenu .btn:nth-child(5){clear:both}

+ 0
- 48
helpers/passives/client/ui/templates/menu/styles.less View File

@@ -1,48 +0,0 @@
@import "../../../css/colors.less";

.uiMenu {
position: absolute;
right: 10px;
bottom: 10px;
padding: 10px;
width: 120px;
background-color: @blackC;
text-align: center;

.heading {
color: @white;
margin-bottom: 15px;
}

input {
border: none;
outline: none;
width: calc(100% - 10px);
height: 20px;
padding: 5px;
display: box;
}

.btn {
float: left;
width: 100%;
color: @white;
background-color: @blueB;
padding: 5px;
box-sizing: border-box;
cursor: pointer;

&:not(:last-child) {
margin-bottom: 15px;
}

&:hover {
background-color: @tealB;
color: @blackB;
}

&:nth-child(3), &:nth-child(5) {
clear: both;
}
}
}

+ 0
- 13
helpers/passives/client/ui/templates/menu/template.html View File

@@ -1,13 +0,0 @@
<div class="uiMenu">
<div class="heading">
<div class="heading-text">Menu</div>
</div>
<div class="content">
<div class="btn btnLoad">Load</div>
<div class="btn btnSave">Save</div>
<div class="btn btnExport">Export</div>
<div class="btn btnImport">Import</div>
<div class="btn btnPersist">Persist</div>
<div class="btn btnNew">New</div>
</div>
</div>

+ 0
- 30
helpers/passives/client/ui/templates/mode/mode.js View File

@@ -1,30 +0,0 @@
define([
'html!./template',
'css!./styles',
'js/generator'
], function (
template,
styles,
generator
) {
return {
tpl: template,

loaded: null,

postRender: function () {
this.on('.btn', 'click', this.events.onChangeMode.bind(this));
},

events: {
onChangeMode: function (event, e) {
var el = $(e.currentTarget);
this.find('.active').removeClass('active');
el.addClass('active');

var mode = el.attr('mode');
generator.setMode(mode);
}
}
}
});

+ 0
- 1
helpers/passives/client/ui/templates/mode/styles.css View File

@@ -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}.uiMode{position:absolute;left:10px;top:10px;padding:10px;width:120px;background-color:#373041;text-align:center}.uiMode .heading{color:#f2f5f5;margin-bottom:15px}.uiMode input{border:none;outline:none;width:calc(100% - 10px);height:20px;padding:5px;display:box}.uiMode .btn{float:left;width:100%;color:#f2f5f5;background-color:#3fa7dd;padding:5px;box-sizing:border-box;cursor:pointer}.uiMode .btn:not(:last-child){margin-bottom:15px}.uiMode .btn:hover,.uiMode .btn.active{background-color:#51fc9a;color:#3c3f4c}.uiMode .btn:nth-child(3){clear:both}

+ 0
- 48
helpers/passives/client/ui/templates/mode/styles.less View File

@@ -1,48 +0,0 @@
@import "../../../css/colors.less";

.uiMode {
position: absolute;
left: 10px;
top: 10px;
padding: 10px;
width: 120px;
background-color: @blackC;
text-align: center;

.heading {
color: @white;
margin-bottom: 15px;
}

input {
border: none;
outline: none;
width: calc(100% - 10px);
height: 20px;
padding: 5px;
display: box;
}

.btn {
float: left;
width: 100%;
color: @white;
background-color: @blueB;
padding: 5px;
box-sizing: border-box;
cursor: pointer;

&:not(:last-child) {
margin-bottom: 15px;
}

&:hover, &.active {
background-color: @tealB;
color: @blackB;
}

&:nth-child(3) {
clear: both;
}
}
}

+ 0
- 11
helpers/passives/client/ui/templates/mode/template.html View File

@@ -1,11 +0,0 @@
<div class="uiMode">
<div class="heading">
<div class="heading-text">Mode</div>
</div>
<div class="content">
<div class="btn btnNone active" mode="none">None</div>
<div class="btn btnPlace" mode="place">Place</div>
<div class="btn btnSelect" mode="select">Move</div>
<div class="btn btnLink" mode="link">Link</div>
</div>
</div>

+ 0
- 177
helpers/passives/client/ui/templates/nodeInfo/nodeInfo.js View File

@@ -1,177 +0,0 @@
define([
'html!ui/templates/nodeInfo/template',
'css!ui/templates/nodeInfo/styles',
'js/constants',
'js/input'
], function (
template,
styles,
constants,
input
) {
return {
tpl: template,

nodes: null,
statEl: null,

postRender: function () {
this.onEvent('onSelectNode', this.events.onSelectNode.bind(this));
this.onEvent('onFocusNode', this.events.onFocusNode.bind(this));

this.buildLookup();
},

buildLookup: function () {
var container = this.find('.lookup');

for (var p in constants.stats) {
var statName = constants.stats[p];

$('<div class="item">' + statName + '</div>')
.appendTo(container)
.on('click', this.events.onClickStat.bind(this, p));
}
},

updateLabels: function () {
var nodes = this.nodes;
if (nodes.length == 1)
nodes = nodes[0];
var isArray = !!nodes.push;

this.find('.lblId').html(isArray ? '' : nodes.id);

var group = nodes.group;
if (isArray) {
group = nodes[0].group;
if (nodes.some(n => (n.group != group)))
group = '';
}
this.find('.lblGroup').html((group || []).toString());

var size = nodes.size;
if (isArray) {
size = nodes[0].size;
if (nodes.some(n => (n.size != size)))
size = '';
}
size = ([
'Lesser',
'Greater',
'Core'
])[size];
this.find('.lblType').html(size);

var pos = isArray ? '' : nodes.pos.x + ', ' + nodes.pos.y;
this.find('.lblPos').html(pos);
},

setStats: function () {
var node = this.nodes[0];

this.find('.stats').empty();

if (!node.stats)
node.stats = {};

for (var p in node.stats) {
this.buildStatSelector(p, node.stats[p]);
}

this.buildStatSelector();
},

buildStatSelector: function (stat, value) {
var string = stat ? stat + ': ' + value : 'Select a stat...';

$('<div class="item">' + string + '</div>')
.appendTo(this.find('.stats'))
.data('stat', {
stat: stat,
value: value
})
.on('mousewheel', this.events.onScrollStat.bind(this))
.on('click', this.events.onShowLookup.bind(this));
},

updateNode: function () {
var stats = {};
this.find('.stats .item').toArray().forEach(function (s) {
var stat = $(s).data('stat');
if (!stat.stat)
return;

stats[stat.stat] = stat.value;
});

this.nodes[0].stats = stats;
},

actions: {

},

events: {
onFocusNode: function (node) {
this.events.onSelectNode.call(this, [node]);
},

onSelectNode: function (nodes) {
this.nodes = nodes;

if (nodes.length > 0)
this.updateLabels();
else if (nodes.length == 0)
return;

this.find('.nodeCount').html(nodes.length);

this.setStats();
},

onClickStat: function (stat) {
var string = stat + ': 1';
this.statEl
.html(string)
.data('stat', {
stat: stat,
value: 1
});

this.statEl = null;

this.find('.lookup').hide();

this.updateNode();
this.setStats();

this.el.removeClass('picking');
},

onShowLookup: function (e) {
this.statEl = $(e.currentTarget);
this.find('.lookup').show();
this.el.addClass('picking');
},

onScrollStat: function (e) {
var el = $(e.currentTarget);
var stat = el.data('stat');
var delta = (e.originalEvent.deltaY > 0) ? -1 : 1;

if (input.isKeyDown('shift')) {
var nextValue = ~~((stat.value + (delta * 10)) / 10) * 10;
delta = nextValue - stat.value;
}

stat.value += delta;

var string = stat.stat + ': ' + stat.value;
el.html(string);

this.updateNode();
}
}
}
});

+ 0
- 1
helpers/passives/client/ui/templates/nodeInfo/styles.css View File

@@ -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}.uiNodeInfo{position:absolute;right:10px;top:10px;padding:10px;width:250px;background-color:#373041;text-align:center}.uiNodeInfo.picking{height:calc(100% - 15px)}.uiNodeInfo .heading-text{color:#f2f5f5;margin-bottom:15px}.uiNodeInfo .content{height:calc(100% - 15px)}.uiNodeInfo .lbl{color:#f2f5f5}.uiNodeInfo .lbl:not(:empty).lblId:before{content:'Id: '}.uiNodeInfo .lbl:not(:empty).lblGroup:before{content:'Group: '}.uiNodeInfo .lbl:not(:empty).lblType:before{content:'Type: '}.uiNodeInfo .lbl:not(:empty).lblPos:before{content:'Pos: '}.uiNodeInfo .lbl:not(:empty).lblLinks:before{content:'Links: '}.uiNodeInfo .stats:not(:empty){margin-top:15px}.uiNodeInfo .stats .item{width:100%;height:28px;color:#f2f5f5;background-color:#505360;padding:5px 0 5px 0;margin-bottom:5px;cursor:pointer}.uiNodeInfo .stats .item:hover{background-color:#929398}.uiNodeInfo .stats .item:last-child{margin-bottom:0}.uiNodeInfo .nodeCount{color:#f2f5f5;margin-top:10px}.uiNodeInfo .nodeCount:before{content:'Selected: '}.uiNodeInfo .lookup{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#373041;overflow:auto}.uiNodeInfo .lookup .item{width:100%;color:#f2f5f5;background-color:#505360;padding:5px 0 5px 0;margin-bottom:5px;cursor:pointer}.uiNodeInfo .lookup .item:hover{background-color:#929398}.uiNodeInfo .lookup .item:last-child{margin-bottom:0}

+ 0
- 111
helpers/passives/client/ui/templates/nodeInfo/styles.less View File

@@ -1,111 +0,0 @@
@import "../../../css/colors.less";

.uiNodeInfo {
position: absolute;
right: 10px;
top: 10px;
padding: 10px;
width: 250px;
background-color: #373041;
text-align: center;

&.picking {
height: calc(100% - 15px);
}

.heading-text {
color: @white;
margin-bottom: 15px;
}

.content {
height: calc(100% - 15px);
}

.lbl {
color: @white;

&:not(:empty) {
&.lblId:before {
content: 'Id: ';
}

&.lblGroup:before {
content: 'Group: ';
}

&.lblType:before {
content: 'Type: ';
}

&.lblPos:before {
content: 'Pos: ';
}

&.lblLinks:before {
content: 'Links: ';
}
}
}

.stats {
&:not(:empty) {
margin-top: 15px;
}

.item {
width: 100%;
height: 28px;
color: @white;
background-color: @blackA;
padding: 5px 0px 5px 0px;
margin-bottom: 5px;
cursor: pointer;

&:hover {
background-color: @grayC;
}

&:last-child {
margin-bottom: 0px;
}
}
}

.nodeCount {
color: @white;
margin-top: 10px;

&:before {
content: 'Selected: ';
}
}

.lookup {
display: none;
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
background-color: #373041;
overflow: auto;

.item {
width: 100%;
color: @white;
background-color: @blackA;
padding: 5px 0px 5px 0px;
margin-bottom: 5px;
cursor: pointer;

&:hover {
background-color: @grayC;
}

&:last-child {
margin-bottom: 0px;
}
}
}
}

+ 0
- 15
helpers/passives/client/ui/templates/nodeInfo/template.html View File

@@ -1,15 +0,0 @@
<div class="uiNodeInfo">
<div uiLoad="heading">
<div class="heading-text">Node Info</div>
</div>
<div class="content">
<div class="lbl lblId"></div>
<div class="lbl lblGroup"></div>
<div class="lbl lblType"></div>
<div class="lbl lblPos"></div>
<div class="stats"></div>
</div>
<div class="nodeCount"></div>

<div class="lookup"></div>
</div>

+ 0
- 39
helpers/passives/client/ui/templates/renameGroup/renameGroup.js View File

@@ -1,39 +0,0 @@
define([
'html!./template',
'css!./styles',
'js/events'
], function (
template,
styles,
events
) {
return {
tpl: template,
modal: true,
centered: true,

postRender: function () {
this.find('input').focus();

this.onEvent('onRenameGroup', this.events.onRenameGroup.bind(this));
},

actions: {
onOk: function (callback) {
var groupName = this.val('.groupName');
this.destroy();

callback(groupName);
}
},

events: {
onRenameGroup: function (oldName, callback) {
if (oldName)
this.find('input').val(oldName);

this.on('.btnOk', 'click', this.actions.onOk.bind(this, callback));
}
}
}
});

+ 0
- 1
helpers/passives/client/ui/templates/renameGroup/styles.css View File

@@ -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}.uiRenameGroup{position:absolute;right:10px;top:10px;padding:10px;width:200px;background-color:#373041;text-align:center}.uiRenameGroup .heading{color:#f2f5f5;margin-bottom:15px}.uiRenameGroup input{border:none;outline:none;width:100%;display:block;height:28px;padding:5px;display:box;margin-bottom:15px;font-size:16px}.uiRenameGroup .btn{width:calc((100% - 15px) / 2);color:#f2f5f5;margin-top:15px;background-color:#3fa7dd;padding:5px;box-sizing:border-box;margin:0 auto;cursor:pointer}.uiRenameGroup .btn:hover{background-color:#51fc9a;color:#3c3f4c}

+ 0
- 44
helpers/passives/client/ui/templates/renameGroup/styles.less View File

@@ -1,44 +0,0 @@
@import "../../../css/colors.less";

.uiRenameGroup {
position: absolute;
right: 10px;
top: 10px;
padding: 10px;
width: 200px;
background-color: #373041;
text-align: center;

.heading {
color: @white;
margin-bottom: 15px;
}

input {
border: none;
outline: none;
width: 100%;
display: block;
height: 28px;
padding: 5px;
display: box;
margin-bottom: 15px;
font-size: 16px;
}

.btn {
width: calc((100% - 15px) / 2);
color: @white;
margin-top: 15px;
background-color: @blueB;
padding: 5px;
box-sizing: border-box;
margin: 0 auto;
cursor: pointer;

&:hover {
background-color: @tealB;
color: @blackB;
}
}
}

+ 0
- 9
helpers/passives/client/ui/templates/renameGroup/template.html View File

@@ -1,9 +0,0 @@
<div class="uiRenameGroup">
<div class="heading">
<div class="heading-text">Rename Group</div>
</div>
<div class="content">
<input type="text" class="groupName" placeholder="Group Name...">
<div class="btn btnOk">Ok</div>
</div>
</div>

+ 0
- 35
helpers/passives/client/ui/templates/save/save.js View File

@@ -1,35 +0,0 @@
define([
'html!./template',
'css!./styles',
'js/generator',
'js/client'
], function (
template,
styles,
generator,
client
) {
return {
tpl: template,
modal: true,
centered: true,

postRender: function () {
this.find('input').focus();
this.on('.btnSave', 'click', this.actions.onSave.bind(this));

var loaded = $('.uiMenu').data('ui').loaded;
if (loaded)
this.find('.fileName').val(loaded);
},

actions: {
onSave: function () {
var fileName = this.val('.fileName');
var data = generator.serialize();
client.save(fileName, data);
this.destroy();
}
}
}
});

+ 0
- 1
helpers/passives/client/ui/templates/save/styles.css View File

@@ -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}.uiSave{position:absolute;right:10px;top:10px;padding:10px;width:200px;background-color:#373041;text-align:center}.uiSave .heading{color:#f2f5f5;margin-bottom:15px}.uiSave input{border:none;outline:none;width:100%;display:block;height:28px;padding:5px;display:box;margin-bottom:15px;font-size:16px}.uiSave .btn{width:calc((100% - 15px) / 2);color:#f2f5f5;margin-top:15px;background-color:#3fa7dd;padding:5px;box-sizing:border-box;margin:0 auto;cursor:pointer}.uiSave .btn:hover{background-color:#51fc9a;color:#3c3f4c}

+ 0
- 44
helpers/passives/client/ui/templates/save/styles.less View File

@@ -1,44 +0,0 @@
@import "../../../css/colors.less";

.uiSave {
position: absolute;
right: 10px;
top: 10px;
padding: 10px;
width: 200px;
background-color: #373041;
text-align: center;

.heading {
color: @white;
margin-bottom: 15px;
}

input {
border: none;
outline: none;
width: 100%;
display: block;
height: 28px;
padding: 5px;
display: box;
margin-bottom: 15px;
font-size: 16px;
}

.btn {
width: calc((100% - 15px) / 2);
color: @white;
margin-top: 15px;
background-color: @blueB;
padding: 5px;
box-sizing: border-box;
margin: 0 auto;
cursor: pointer;

&:hover {
background-color: @tealB;
color: @blackB;
}
}
}

+ 0
- 9
helpers/passives/client/ui/templates/save/template.html View File

@@ -1,9 +0,0 @@
<div class="uiSave">
<div class="heading">
<div class="heading-text">Save Tree</div>
</div>
<div class="content">
<input type="text" class="fileName" placeholder="File Name...">
<div class="btn btnSave">Save</div>
</div>
</div>

+ 0
- 1
helpers/passives/client/ui/templates/tooltip/styles.css View File

@@ -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}.uiTooltip{position:absolute;padding:5px;background-color:rgba(55,48,65,0.9);text-align:center;color:#f2f5f5;display:none}

+ 0
- 10
helpers/passives/client/ui/templates/tooltip/styles.less View File

@@ -1,10 +0,0 @@
@import "../../../css/colors.less";

.uiTooltip {
position: absolute;
padding: 5px;
background-color: fade(@blackC, 90%);
text-align: center;
color: @white;
display: none;
}

+ 0
- 1
helpers/passives/client/ui/templates/tooltip/template.html View File

@@ -1 +0,0 @@
<div class="uiTooltip"></div>

+ 0
- 33
helpers/passives/client/ui/templates/tooltip/tooltip.js View File

@@ -1,33 +0,0 @@
define([
'html!./template',
'css!./styles'
], function (
template,
styles
) {
return {
tpl: template,

postRender: function () {
this.onEvent('onShowTooltip', this.events.onShowTooltip.bind(this));
this.onEvent('onHideTooltip', this.events.onHideTooltip.bind(this));
},

events: {
onShowTooltip: function (mouse, text) {
this.show();

this.el.html(text);

this.el.css({
left: mouse.raw.clientX + 20,
top: mouse.raw.clientY
});
},

onHideTooltip: function () {
this.hide();
}
}
}
});

+ 0
- 153
helpers/passives/client/ui/uiBase.js View File

@@ -1,153 +0,0 @@
define([
'js/events'
], function (
events
) {
return {
centeredX: false,
centeredY: false,

el: null,
options: null,
shown: true,

eventCallbacks: {},

render: function () {
var container = '.ui-container';
if (this.container)
container += ' > ' + this.container;

this.el = $(this.tpl)
.appendTo(container)
.data('ui', this);

this.el.on('mouseenter', this.onMouseEnter.bind(this, true));
this.el.on('mouseleave', this.onMouseEnter.bind(this, false));

if (this.modal)
this.el.addClass('modal');

this.postRender && this.postRender();

if (this.centered) {
this.centeredX = true;
this.centeredY = true;
}

if ((this.centeredX) || (this.centeredY))
this.center(this.centeredX, this.centeredY);

this.shown = this.el.is(':visible');
},

onMouseEnter: function (enter) {
events.emit('onUiHover', enter);
},

setOptions: function (options) {
this.options = options;
},

on: function (el, event, callback) {
if (typeof (el) == 'string')
el = this.find(el);
else
el = $(el);

el.on(event, function (e) {
var args = [].slice.call(arguments, 1);
args.splice(0, 0, event);

callback.apply(null, [...args, e]);
});
},

find: function (selector) {
return this.el.find(selector);
},

center: function (x, y) {
if (x == null)
x = true;
if (y == null)
y = true;

this.centeredX = x;
this.centeredY = y;

var el = this.el;
var pat = el.parent();

var posX = ~~((pat.width() / 2) - (el.width() / 2)) - 10;
var posY = ~~((pat.height() / 2) - (el.height() / 2)) - 10;

el.css('position', 'absolute');
if (x)
el.css('left', posX);
if (y)
el.css('top', posY);
},

show: function () {
if (this.modal)
$('.modal').hide();

this.shown = true;
this.el.show();
},

hide: function () {
if (this.beforeHide)
this.beforeHide();

this.shown = false;
this.el.hide();
},

destroy: function () {
this.offEvents();

if (this.beforeDestroy)
this.beforeDestroy();

this.el.remove();
},

val: function (selector) {
return this.find(selector).val();
},

setDisabled: function (isDisabled) {
this.el.removeClass('disabled')

if (isDisabled)
this.el.addClass('disabled');
},

onEvent: function (event, callback) {
var list = this.eventCallbacks[event] || (this.eventCallbacks[event] = []);
var eventCallback = events.on(event, callback);
list.push(eventCallback);

return eventCallback;
},

offEvent: function (eventCallback) {
for (var e in this.eventCallbacks) {
this.eventCallbacks[e].forEach(function (c) {
if (c == eventCallback)
events.off(e, c);
}, this);
}
},

offEvents: function () {
for (var e in this.eventCallbacks) {
this.eventCallbacks[e].forEach(function (c) {
events.off(e, c);
}, this);
}
}
};
});

+ 0
- 75
helpers/passives/server/index.js View File

@@ -1,75 +0,0 @@
let fs = require('fs');

let mod = {
init: function (callback) {
let app = require('express')();
let server = require('http').createServer(app);
let io = require('socket.io')(server);

app.use(function (req, res, next) {
if (req.url.indexOf('/server') != 0)
req.url = '/client/' + req.url;

next();
});

let lessMiddleware = require('less-middleware');
app.use(lessMiddleware('../', {
force: true,
render: {
strictMath: true
}
}));

app.get('/', this.requests.root.bind(this));
app.get(/^(.*)$/, this.requests.default.bind(this));

io.on('connection', this.listeners.onConnection.bind(this));

let port = process.env.PORT || 5000;
server.listen(port, function () {
let message = 'Server: Ready';
console.log(message);
});
},

listeners: {
onConnection: function (socket) {
socket.on('request', this.listeners.onRequest.bind(this, socket));
},

onRequest: function (socket, msg, callback) {
if (msg.action == 'load') {
let res = JSON.parse(fs.readFileSync('saves/' + msg.fileName + '.json'));
callback(res);
} else if (msg.action == 'save')
fs.writeFileSync('saves/' + msg.fileName + '.json', msg.data);
else if (msg.action == 'getFileList') {
callback(fs.readdirSync('saves/').map(l => (l.split('.')[0])));
return;
} else if (msg.action == 'persist')
require('./persist')(msg.data);

if (callback)
callback();
}
},
requests: {
root: function (req, res) {
res.sendFile('index.html');
},

default: function (req, res, next) {
let root = req.url.split('/')[1];
let file = req.params[0];

file = file.replace('/' + root + '/', '');

res.sendFile(file, {
root: '../' + root
});
}
}
};

mod.init();

+ 0
- 25
helpers/passives/server/nodemon.json View File

@@ -1,25 +0,0 @@
{
"restartable": "rs",
"ignore": [
".git",
"node_modules/**/node_modules",
"**/*.json"
],
"verbose": true,
"execMap": {
"js": "node --harmony"
},
"events": {

},
"watch": [
"*.*"
],
"ignore": [
"client"
],
"env": {
"NODE_ENV": "development"
},
"ext": "js json"
}

+ 0
- 1127
helpers/passives/server/package-lock.json
File diff suppressed because it is too large
View File


+ 0
- 10
helpers/passives/server/package.json View File

@@ -1,10 +0,0 @@
{
"name": "",
"version": "0.0.1",
"description": "",
"dependencies": {
"express": "^4.16.2",
"less-middleware": "^2.2.1",
"socket.io": "^2.0.4"
}
}

+ 0
- 9
helpers/passives/server/persist.js View File

@@ -1,9 +0,0 @@
const fs = require('fs');

module.exports = function (data) {
const serverString = `module.exports = ${JSON.stringify(data, null, '\t')};`;
fs.writeFileSync('../../../src/server/config/passiveTree.js', serverString);

const clientString = `define([], function() { return ${JSON.stringify(data)}; });`;
fs.writeFileSync('../../../src/client/ui/templates/passives/temp.js', clientString);
};

+ 0
- 1
helpers/passives/server/saves/flower.json
File diff suppressed because it is too large
View File


+ 0
- 1
helpers/passives/server/saves/test 1.json
File diff suppressed because it is too large
View File


+ 0
- 1
helpers/passives/server/saves/tree.json
File diff suppressed because it is too large
View File


+ 0
- 2
helpers/passives/todo View File

@@ -1,2 +0,0 @@
* Rename Group
* Delete Group

+ 0
- 4
helpers/sims/dpt/index.js View File

@@ -1,4 +0,0 @@
global.extend = require('../../../src/server/misc/clone');

const sim = require('./sim');
sim();

+ 0
- 23
helpers/sims/dpt/nodemon.json View File

@@ -1,23 +0,0 @@
{
"restartable": "rs",
"ignore": [
".git",
"node_modules/**/node_modules"
],
"verbose": true,
"execMap": {
"js": "node --harmony"
},
"events": {

},
"watch": [
"*.*",
"../../src/server/config/spellsConfig.js",
"../../src/server/combat/combat.js"
],
"env": {
"NODE_ENV": "development"
},
"ext": "js json"
}

+ 0
- 18
helpers/sims/dpt/package-lock.json View File

@@ -1,18 +0,0 @@
{
"name": "isleward-tests",
"version": "0.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"extend": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
"integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ="
},
"requirejs": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.5.tgz",
"integrity": "sha512-svnO+aNcR/an9Dpi44C7KSAy5fFGLtmPbaaCeQaklUz8BQhS64tWWIIlvEA5jrWICzlO/X9KSzSeXFnZdBu8nw=="
}
}
}

+ 0
- 10
helpers/sims/dpt/package.json View File

@@ -1,10 +0,0 @@
{
"name": "isleward-tests",
"version": "0.0.1",
"description": "isleward-tests",
"dependencies": {
"extend": "^3.0.0",
"requirejs": "^2.3.5"
},
"devDependencies": {}
}

+ 0
- 181
helpers/sims/dpt/sim.js View File

@@ -1,181 +0,0 @@
const spellsConfig = require('../../../src/server/config/spellsConfig');
const combat = require('../../../src/server/combat/combat');

let spells = spellsConfig.spells;

let max = true;
let maxTarget = false;

spells['harvest life'] = {
statType: ['str', 'int'],
statMult: 1,
cdMax: 10,
castTimeMax: 3,
manaCost: 5,
isAttack: true,
range: 1,
random: {
damage: [4, 14],
healPercent: [10, 30]
}
};

/*let bloodBarrierMult = 1.25;
spells['skeleton melee'] = {
statType: ['str', 'int'],
statMult: 1 * bloodBarrierMult,
auto: true,
cdMax: 5,
manaCost: 0,
range: 1,
random: {
damage: [1, 3.8]
}
};*/

let level = 20;

let hp = [
32.70,
65.40,
98.10,
130.80,
163.50,
196.20,
228.90,
261.60,
294.30,
327.00,
359.70,
392.40,
425.10,
457.80,
490.50,
523.20,
555.90,
588.60,
621.30,
654.00
];

let hpMax = [
160.48,
324.53,
489.90,
660.79,
841.44,
1036.21,
1249.50,
1485.85,
1749.87,
2046.32,
2380.05,
2756.08,
3179.54,
3655.72,
4190.09,
4788.27,
5456.08,
6199.50,
7024.73,
7938.17
];

module.exports = function () {
let res = [];

for (let s in spells) {
let c = spells[s];
c.statType = c.statType || 'int';
let d = c.random.damage || c.random.healing;
if (!d)
continue;

let damage = d[0];
if (max)
damage = d[1];

var config = {
statType: c.statType,
statMult: c.statMult,
element: c.element,
cd: c.cdMax,
damage: damage,
noCrit: true,
noMitigate: true,

source: {
stats: {
values: {
level: level,
elementArcanePercent: 0,
elementFrostPercent: 0,
elementPoisonPercent: 0,
elementHolyPercent: 0,
elementFirePercent: 0
}
}
},
target: {
stats: {
values: {
armor: maxTarget ? (level * 50) : (level * 20),
elementAllResist: maxTarget ? 100 : 0,
elementArcaneResist: 0,
elementFrostResist: 0,
elementPoisonResist: 0,
elementHolyResist: 0,
elementFireResist: 0
}
}
}
};

let stat = c.statType;
if (!stat.push)
stat = [stat];

const minStat = level;
const maxStat = level * 10;

stat.forEach(ss => {
config.source.stats.values[ss] = (max ? maxStat : minStat);
});

let amount = combat.getDamage(config).amount;

let critChance = max ? 0.5 : 0.05;
let critMult = max ? 3 : 1.5;

let castTimeMax = c.castTimeMax;
amount = (((amount / 100) * (100 - critChance)) + (((amount / 100) * critChance) * (critMult / 100)));
let duration = c.random.i_duration;
if (duration)
amount *= max ? duration[1] : duration[0];
const div = (c.cdMax + castTimeMax) || 1;
amount /= div;

res.push({
name: s,
dpt: ~~(~~(amount * 10) / 10),
cd: c.cdMax,
mana: c.manaCost || '',
tpk: ~~((maxTarget ? hpMax : hp)[level - 1] / amount),
amount: amount
});
}

res = res.sort((a, b) => (b.dpt - a.dpt));

console.log();
console.log('ability dpt');
console.log();
res.forEach(function (r) {
let gap = new Array(20 - r.name.length);
console.log(r.name + ': ' + gap.join(' ') + r.dpt + ' ' + r.tpk + ' ticks ' + (~~((r.tpk / 2.85) * 10) / 10) + ' seconds');
});
console.log();
};

+ 0
- 147
helpers/sqlite-to-rethink/cheatsheet.js View File

@@ -1,147 +0,0 @@
//Hack to force eslint pass
const r = null;

//Count the amount of permadead characters
r.db('live').table('character').filter({
value: {
permadead: true
}
}).count();

//Count the amount of permadead characters per spirit
r.db('live').table('character')
.filter({
value: {
permadead: true
}
})
.group(row => {
return row('value')('class');
})
.count();

//All players that are level 20
r.db('live').table('character')
.filter(row => {
return row('value')('components').contains(cpn => {
return cpn('type').eq('stats').and(cpn('values')('level').ge(20));
});
});

//Group by mod action source, aggregate and order by count
r.db('live').table('modLog')
.group(f => f('value')('source')).count().ungroup().orderBy('reduction');

//List Items with dex > 30
r.db('live').table('character')
.concatMap(row => {
return row('value')('components')
.filter(cpn => {
return cpn('type').eq('inventory');
})
.concatMap(c => {
return [{
name: row('value')('name'),
cpn: c('items').filter(item => {
return item('stats')('dex').ge(30);
})
}];
})
.filter(c => {
return c('cpn').count().ge(1);
});
});

r.db('live').table('character')
.concatMap(row => {
return row('value')('components')
.filter(cpn => {
return cpn('type').eq('inventory');
})
.concatMap(c => {
return [{
name: row('value')('name'),
account: row('value')('account'),
cpn: c('items').filter(item => {
return item('quantity').ge(30000);
})
}];
})
.filter(c => {
return c('cpn').count().ge(1);
});
});

//Play time per account from low to high
r.db('live').table('character')
.concatMap(row => {
return row('value')('components')
.filter(cpn => {
return cpn('type').eq('stats');
})
.concatMap(c => {
return [{
account: row('value')('account'),
name: row('value')('name'),
played: c('stats')('played')
}];
});
})
.group('account')
.sum('played')
.ungroup()
.orderBy('reduction');

//Amount of characters per level
r.db('live').table('character')
.concatMap(row => {
return row('value')('components')
.filter(cpn => {
return cpn('type').eq('stats');
})
.concatMap(c => {
return [{
level: c('values')('level')
}];
});
})
.group('level')
.count();

r.db('live').table('character')
.concatMap(row => {
return row('value')('components')
.filter(cpn => {
return cpn('type').eq('stats');
})
.concatMap(c => {
return [{
level: c('values')('level'),
xp: c('values')('xpTotal')
}];
});
})
.filter(c => {
return c('level').eq(2);
})
.group('xp')
.count();

r.db('live').table('character')
.concatMap(row => {
return row('value')('components')
.filter(cpn => {
return cpn('type').eq('stats');
})
.concatMap(c => {
return [{
level: c('values')('level'),
xp: c('values')('xpTotal'),
streaks: c('stats')('mobKillStreaks')
}];
});
})
.filter(c => {
return c('level').eq(2).and(c('xp').eq(10));
});

+ 0
- 141
helpers/sqlite-to-rethink/index.js View File

@@ -1,141 +0,0 @@
let sqlite = require('sqlite3').verbose();
let r = require('rethinkdb');
let util = require('util');

const config = {
file: './storage.db',

dbName: 'live',

dropTables: true,

maxBusy: 100,

tables: [
'characterList',
'stash',
'skins',
'login',
'leaderboard',
'customMap',
'mail',
'customChannels',
'error',
'modLog',
'accountInfo',
'character'
]
};

let converter = {
dbS: null,
dbR: null,

connection: null,
res: null,

busy: 0,
records: [],
currentTable: null,

init: async function () {
this.dbS = new sqlite.Database(config.file, this.onDbCreated.bind(this));
},

onDbCreated: async function () {
this.connection = await r.connect({
host: 'localhost',
port: 28015
});

await this.setupRethink();

await this.convertTables();
},

setupRethink: async function () {
try {
await r.dbCreate(config.dbName).run(this.connection);
} catch (e) {}

await this.connection.use(config.dbName);

for (const table of config.tables) {
try {
if (config.dropTables) {
try {
await r.tableDrop(table).run(this.connection);
} catch (e) {}
}
await r.tableCreate(table).run(this.connection);
} catch (e) {
if (!e.msg.includes('already exists'))
console.log(e);
}
}
},

convertTables: async function () {
for (let table of config.tables) {
this.currentTable = table;

this.records = await util.promisify(this.dbS.all.bind(this.dbS))(`SELECT * FROM ${table}`);
console.log(`${table}: ${this.records.length} records`);
await this.startConvert();
console.log('done');
}
},

startConvert: async function () {
return new Promise(res => {
this.res = res;

this.work();
});
},

work: function () {
if (!this.records.length) {
this.res();
return;
}

if (this.busy === config.maxBusy)
return;

let record = this.records.pop();
if (record) {
this.processRecord(record);
this.work();
}
},

processRecord: async function (record) {
this.busy++;
let id = record.key;
let value = record.value
.split('`')
.join('\'');

let obj = value;
if (!['login'].includes(this.currentTable)) {
if (this.currentTable === 'mail' && value === '')
value = '{}';
obj = JSON.parse(value);
}

await r.table(this.currentTable)
.insert({
id,
value: obj
})
.run(this.connection);

this.busy--;

this.work();
}
};

converter.init();

+ 0
- 827
helpers/sqlite-to-rethink/package-lock.json View File

@@ -1,827 +0,0 @@
{
"version": "0.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"ajv": {
"version": "6.9.1",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz",
"integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==",
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"aproba": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
},
"are-we-there-yet": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
"requires": {
"delegates": "^1.0.0",
"readable-stream": "^2.0.6"
}
},
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
"requires": {
"safer-buffer": "~2.1.0"
}
},
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
},
"aws4": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"requires": {
"tweetnacl": "^0.14.3"
}
},
"bluebird": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz",
"integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"chownr": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
"integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g=="
},
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
"combined-stream": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz",
"integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"console-control-strings": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"deep-extend": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
},
"detect-libc": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
},
"ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
"requires": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
}
},
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
},
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
},
"fast-deep-equal": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
},
"fast-json-stable-stringify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
},
"form-data": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"mime-types": "^2.1.12"
}
},
"fs-minipass": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
"integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
"requires": {
"minipass": "^2.2.1"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"gauge": {
"version": "2.7.4",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
"requires": {
"aproba": "^1.0.3",
"console-control-strings": "^1.0.0",
"has-unicode": "^2.0.0",
"object-assign": "^4.1.0",
"signal-exit": "^3.0.0",
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1",
"wide-align": "^1.1.0"
}
},
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
},
"har-validator": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
"integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
"requires": {
"ajv": "^6.5.5",
"har-schema": "^2.0.0"
}
},
"has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
},
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"requires": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
"sshpk": "^1.7.0"
}
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"ignore-walk": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz",
"integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==",
"requires": {
"minimatch": "^3.0.4"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"ini": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"requires": {
"number-is-nan": "^1.0.0"
}
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
},
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"jsprim": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.2.3",
"verror": "1.10.0"
}
},
"mime-db": {
"version": "1.38.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
"integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg=="
},
"mime-types": {
"version": "2.1.22",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
"integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
"requires": {
"mime-db": "~1.38.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
},
"minipass": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
"integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
}
},
"minizlib": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz",
"integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==",
"requires": {
"minipass": "^2.2.1"
}
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": {
"minimist": "0.0.8"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"nan": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
"integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA=="
},
"needle": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/needle/-/needle-2.2.4.tgz",
"integrity": "sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA==",
"requires": {
"debug": "^2.1.2",
"iconv-lite": "^0.4.4",
"sax": "^1.2.4"
}
},
"node-pre-gyp": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz",
"integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==",
"requires": {
"detect-libc": "^1.0.2",
"mkdirp": "^0.5.1",
"needle": "^2.2.1",
"nopt": "^4.0.1",
"npm-packlist": "^1.1.6",
"npmlog": "^4.0.2",
"rc": "^1.2.7",
"rimraf": "^2.6.1",
"semver": "^5.3.0",
"tar": "^4"
}
},
"nopt": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
"requires": {
"abbrev": "1",
"osenv": "^0.1.4"
}
},
"npm-bundled": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz",
"integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g=="
},
"npm-packlist": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.3.0.tgz",
"integrity": "sha512-qPBc6CnxEzpOcc4bjoIBJbYdy0D/LFFPUdxvfwor4/w3vxeE0h6TiOVurCEPpQ6trjN77u/ShyfeJGsbAfB3dA==",
"requires": {
"ignore-walk": "^3.0.1",
"npm-bundled": "^1.0.1"
}
},
"npmlog": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
"requires": {
"are-we-there-yet": "~1.1.2",
"console-control-strings": "~1.1.0",
"gauge": "~2.7.3",
"set-blocking": "~2.0.0"
}
},
"number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
},
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
"osenv": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
"requires": {
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"process-nextick-args": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
},
"psl": {
"version": "1.1.31",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz",
"integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw=="
},
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
"rc": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
"requires": {
"deep-extend": "^0.6.0",
"ini": "~1.3.0",
"minimist": "^1.2.0",
"strip-json-comments": "~2.0.1"
},
"dependencies": {
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
}
}
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"request": {
"version": "2.88.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
"integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.2",
"har-validator": "~5.1.0",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.19",
"oauth-sign": "~0.9.0",
"performance-now": "^2.1.0",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.4.3",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
}
},
"rethinkdb": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/rethinkdb/-/rethinkdb-2.3.3.tgz",
"integrity": "sha1-PcZYbiL6HavuDSVOZL0ON5+tL3I=",
"requires": {
"bluebird": ">= 2.3.2 < 3"
}
},
"rimraf": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
"integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
"requires": {
"glob": "^7.1.3"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
},
"semver": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
},
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
},
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
},
"sqlite3": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.0.6.tgz",
"integrity": "sha512-EqBXxHdKiwvNMRCgml86VTL5TK1i0IKiumnfxykX0gh6H6jaKijAXvE9O1N7+omfNSawR2fOmIyJZcfe8HYWpw==",
"requires": {
"nan": "~2.10.0",
"node-pre-gyp": "^0.11.0",
"request": "^2.87.0"
}
},
"sshpk": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
"integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"bcrypt-pbkdf": "^1.0.0",
"dashdash": "^1.12.0",
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
}
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
}
},
"strip-json-comments": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
},
"tar": {
"version": "4.4.8",
"resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz",
"integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==",
"requires": {
"chownr": "^1.1.1",
"fs-minipass": "^1.2.5",
"minipass": "^2.3.4",
"minizlib": "^1.1.1",
"mkdirp": "^0.5.0",
"safe-buffer": "^5.1.2",
"yallist": "^3.0.2"
}
},
"tough-cookie": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
"integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
"requires": {
"psl": "^1.1.24",
"punycode": "^1.4.1"
},
"dependencies": {
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
}
}
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"requires": {
"safe-buffer": "^5.0.1"
}
},
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
},
"uri-js": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
"integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
"requires": {
"punycode": "^2.1.0"
}
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"uuid": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
},
"wide-align": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
"requires": {
"string-width": "^1.0.2 || 2"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"yallist": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
"integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A=="
}
}
}

+ 0
- 9
helpers/sqlite-to-rethink/package.json View File

@@ -1,9 +0,0 @@
{
"name": "",
"version": "0.0.1",
"description": "",
"dependencies": {
"rethinkdb": "^2.3.3",
"sqlite3": "^4.0.6"
}
}

+ 0
- 8
tests/index.js View File

@@ -1,8 +0,0 @@
var requirejs = require('requirejs');
var extend = require('extend');

global.extend = extend;

requirejs(['./tests', '../src/server/misc/helpers'], function(tests) {
tests.init();
});

+ 0
- 18
tests/package-lock.json View File

@@ -1,18 +0,0 @@
{
"name": "isleward-tests",
"version": "0.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"extend": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
"integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ="
},
"requirejs": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.5.tgz",
"integrity": "sha512-svnO+aNcR/an9Dpi44C7KSAy5fFGLtmPbaaCeQaklUz8BQhS64tWWIIlvEA5jrWICzlO/X9KSzSeXFnZdBu8nw=="
}
}
}

+ 0
- 10
tests/package.json View File

@@ -1,10 +0,0 @@
{
"name": "isleward-tests",
"version": "0.0.1",
"description": "isleward-tests",
"dependencies": {
"extend": "^3.0.0",
"requirejs": "^2.3.3"
},
"devDependencies": {}
}

+ 0
- 16
tests/require.js View File

@@ -1,16 +0,0 @@
var module = require('module');
var originalRequire = module.prototype.require;

module.prototype.require = function (name) {
var res = null;
try {
res = originalRequire.call(this, name);
} catch (e) {
try {
res = originalRequire.call(this, __dirname + '/' + name);
} catch (err) { }

}

return res;
}

+ 0
- 56
tests/server/components/dialogue.js View File

@@ -1,56 +0,0 @@
define([
'server/mocks/generator'
], function(
mocks
) {
return {
//Do you get the correct reputation when talking to a faction vendor for the first time
startTalk_DiscoverFaction: function() {
var factionBase = require('../src/server/config/factionBase');
var anglers = require('../src/server/config/factions/anglers');
var factionBlueprint = extend(true, {}, factionBase, anglers);

var player = mocks.player({
dialogue: {

},
reputation: {
getBlueprint: function() {
return factionBlueprint;
}
}
});

var resultMsg = null;
player.instance.syncer.queue = function(event, msg) {
resultMsg = msg.messages[0].message;
};

var target = mocks.player({
dialogue: {

},
trade: {
faction: {
id: 'anglers'
}
}
});

player.dialogue.talk({
target: target
});

var rep = player.reputation.list[0];
if (rep.rep != factionBlueprint.initialRep)
return true;
else if (resultMsg.indexOf(' friendly ') == -1)
return true;
else {
var tierName = factionBlueprint.tiers.find(t => (t.rep == rep.rep)).name.toLowerCase();
if (resultMsg.indexOf(` ${tierName} `) == -1)
return true;
}
}
};
});

+ 0
- 65
tests/server/components/equipment.js View File

@@ -1,65 +0,0 @@
*/
Ways in which stats can be modified:
* EQ or unEQ item
-* Passives
* Spells
* Casting a Spell
* Activating an Aura
-* Gaining a level
* Downscaling
* Backscaling
* Effects like HP Regen Aura being activated and deactivated
-* Titangrip events
*/

*/
Ok, here goes.

So, the server has to keep track of your stats for multiple reasons. For example, when dealing damage you might want to query the character's strength. Or, when trying to equip an item, we have to check the character's level. The former has to check the downscaled value and the latter, the unscaled. It's important to note that character's aren't always scaled.

There are tons of ways that a character's stats can be modified, for example: EQ an item, applying a passive tree node, casting a spell, activating an aura, gaining a level, etc...

My question is. How do I bet manage this? Do i recalculate scaled stats every time your stats chang
*/

*/
* On enter zone:
* Hook prophecy events
* Set level based stats
* Apply Passives
* EQ All Gear (Make sure to ignore stat issues until after all EQd then check all)
* Downscale stats and store in scaledStats
* On EQ, unEQ, spellcast, aura activation, aura deactivation, aura effect application, aura effect removal, damage taken, death and respawn
* Modify both stats and scaledStats
*/

define([
'server/mocks/generator'
], function(
mocks
) {
return {
//Do we have the item equipped after equipping it
equipItem_Stats: function() {
var player = mocks.player({
inventory: {
items: [{
id: 0,
slot: 'head',
stats: {
int: 10
}
}]
},
equipment: {},
stats: {},
spellbook: {}
});

player.equipment.equip(0);
if (player.stats.values.int != 10)
return true;
}
};
});

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save