Skip to content

Instantly share code, notes, and snippets.

var handleReceiveConfigVars;
cu.OnInitialized(function () {
cu.GetConfigVars(Options.activeConfigIndex);
cu.Listen('HandleReceiveConfigVars', function(configs) {
if (handleReceiveConfigVars) {
handleReceiveConfigVars(configs);
handleReceiveConfigVars = null;
}
});
});
"imports": {
"resources": [
/* all unitframe related resources from the cu-components module */
{ resource: "cu-components/unitframe/images", dest: "images/unitframe" },
{ resource: "cu-components/unitframe/styles", dest: "styles" },
/* just the portrait resources required */
{ resource: "cu-components/unitframe/portrait/images", dest: "images/unitframe/portrait" }
]
}
function doThings(todo, whenDone, thereWereErrors) {
var tasks = todo.length, errors = 0;
function finish() {
task --;
if (task === 0) {
// everything is done
if (errors) {
// but there were errors
thereWereErrors();
// Module to access Camelot Unchained's REST API
// Originally written by Mehuge (https://www.github.com/Mehuge)
var Promise = require('./basic-promise.js');
var util = require('util');
var request = require('request');
var servers = [];
function restAPI(name) {
<!DOCTYPE html>
<html>
<head>
<script src="http://xhr-progressive-timeouts.googlecode.com/hg/trunk/lib/xhr-pt.js"></script>
<style type="text/css">
#debug .info { color: silver; }
#debug .ok { color: green; }
#debug .error { color: red; }
</style>
</head>