Skip to content

Instantly share code, notes, and snippets.

@davidruhmann
Created March 13, 2013 23:53
Show Gist options
  • Save davidruhmann/5157625 to your computer and use it in GitHub Desktop.
Save davidruhmann/5157625 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
'use strict';
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !1;
goog.LOCALE = "en";
goog.provide = function (a) {
if (!COMPILED) {
if (goog.isProvided_(a))
throw Error('Namespace "' + a + '" already declared.');
delete goog.implicitNamespaces_[a];
for (var b = a; (b = b.substring(0, b.lastIndexOf("."))) && !goog.getObjectByName(b); )
goog.implicitNamespaces_[b] = !0
}
goog.exportPath_(a)
};
goog.setTestOnly = function (a) {
if (COMPILED && !goog.DEBUG)
throw a = a || "", Error("Importing test-only code into non-debug environment" + a ? ": " + a : ".");
};
COMPILED || (goog.isProvided_ = function (a) {
return !goog.implicitNamespaces_[a] && !!goog.getObjectByName(a)
}, goog.implicitNamespaces_ = {});
goog.exportPath_ = function (a, b, c) {
a = a.split(".");
c = c || goog.global;
!(a[0]in c) && c.execScript && c.execScript("var " + a[0]);
for (var d; a.length && (d = a.shift()); )
!a.length && goog.isDef(b) ? c[d] = b : c = c[d] ? c[d] : c[d] = {}
};
goog.getObjectByName = function (a, b) {
for (var c = a.split("."), d = b || goog.global, e; e = c.shift(); )
if (goog.isDefAndNotNull(d[e]))
d = d[e];
else
return null;
return d
};
goog.globalize = function (a, b) {
var c = b || goog.global,
d;
for (d in a)
c[d] = a[d]
};
goog.addDependency = function (a, b, c) {
if (!COMPILED) {
for (var d, a = a.replace(/\\/g, "/"), e = goog.dependencies_, f = 0; d = b[f]; f++) {
e.nameToPath[d] = a;
a in e.pathToNames || (e.pathToNames[a] = {});
e.pathToNames[a][d] = true
}
for (d = 0; b = c[d]; d++) {
a in e.requires || (e.requires[a] = {});
e.requires[a][b] = true
}
}
};
goog.ENABLE_DEBUG_LOADER = !0;
goog.require = function (a) {
if (!COMPILED && !goog.isProvided_(a)) {
if (goog.ENABLE_DEBUG_LOADER) {
var b = goog.getPathFromDeps_(a);
if (b) {
goog.included_[b] = true;
goog.writeScripts_();
return
}
}
a = "goog.require could not find: " + a;
goog.global.console && goog.global.console.error(a);
throw Error(a);
}
};
goog.basePath = "";
goog.nullFunction = function () {};
goog.identityFunction = function (a) {
return a
};
goog.abstractMethod = function () {
throw Error("unimplemented abstract method");
};
goog.addSingletonGetter = function (a) {
a.getInstance = function () {
if (a.instance_)
return a.instance_;
goog.DEBUG && (goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = a);
return a.instance_ = new a
}
};
goog.instantiatedSingletons_ = [];
!COMPILED && goog.ENABLE_DEBUG_LOADER && (goog.included_ = {}, goog.dependencies_ = {
pathToNames : {},
nameToPath : {},
requires : {},
visited : {},
written : {}
}, goog.inHtmlDocument_ = function () {
var a = goog.global.document;
return typeof a != "undefined" && "write" in a
}, goog.findBasePath_ = function () {
if (goog.global.CLOSURE_BASE_PATH)
goog.basePath = goog.global.CLOSURE_BASE_PATH;
else if (goog.inHtmlDocument_())
for (var a = goog.global.document.getElementsByTagName("script"), b = a.length - 1; b >= 0; --b) {
var c = a[b].src,
d = c.lastIndexOf("?"),
d = d == -1 ? c.length : d;
if (c.substr(d - 7, 7) == "base.js") {
goog.basePath = c.substr(0, d - 7);
break
}
}
}, goog.importScript_ = function (a) {
var b = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
!goog.dependencies_.written[a] && b(a) && (goog.dependencies_.written[a] = true)
}, goog.writeScriptTag_ = function (a) {
if (goog.inHtmlDocument_()) {
goog.global.document.write('<script type="text/javascript" src="' + a + '"><\/script>');
return true
}
return false
}, goog.writeScripts_ = function () {
function a(e) {
if (!(e in d.written)) {
if (!(e in
d.visited)) {
d.visited[e] = true;
if (e in d.requires)
for (var g in d.requires[e])
if (!goog.isProvided_(g))
if (g in d.nameToPath)
a(d.nameToPath[g]);
else
throw Error("Undefined nameToPath for " + g);
}
if (!(e in c)) {
c[e] = true;
b.push(e)
}
}
}
var b = [],
c = {},
d = goog.dependencies_,
e;
for (e in goog.included_)
d.written[e] || a(e);
for (e = 0; e < b.length; e++)
if (b[e])
goog.importScript_(goog.basePath + b[e]);
else
throw Error("Undefined script input");
}, goog.getPathFromDeps_ = function (a) {
return a in goog.dependencies_.nameToPath ? goog.dependencies_.nameToPath[a] :
null
}, goog.findBasePath_(), goog.global.CLOSURE_NO_DEPS || goog.importScript_(goog.basePath + "deps.js"));
goog.typeOf = function (a) {
var b = typeof a;
if (b == "object")
if (a) {
if (a instanceof Array)
return "array";
if (a instanceof Object)
return b;
var c = Object.prototype.toString.call(a);
if (c == "[object Window]")
return "object";
if (c == "[object Array]" || typeof a.length == "number" && typeof a.splice != "undefined" && typeof a.propertyIsEnumerable != "undefined" && !a.propertyIsEnumerable("splice"))
return "array";
if (c == "[object Function]" || typeof a.call != "undefined" && typeof a.propertyIsEnumerable != "undefined" && !a.propertyIsEnumerable("call"))
return "function"
} else
return "null";
else if (b == "function" && typeof a.call == "undefined")
return "object";
return b
};
goog.isDef = function (a) {
return a !== void 0
};
goog.isNull = function (a) {
return a === null
};
goog.isDefAndNotNull = function (a) {
return a != null
};
goog.isArray = function (a) {
return goog.typeOf(a) == "array"
};
goog.isArrayLike = function (a) {
var b = goog.typeOf(a);
return b == "array" || b == "object" && typeof a.length == "number"
};
goog.isDateLike = function (a) {
return goog.isObject(a) && typeof a.getFullYear == "function"
};
goog.isString = function (a) {
return typeof a == "string"
};
goog.isBoolean = function (a) {
return typeof a == "boolean"
};
goog.isNumber = function (a) {
return typeof a == "number"
};
goog.isFunction = function (a) {
return goog.typeOf(a) == "function"
};
goog.isObject = function (a) {
var b = typeof a;
return b == "object" && a != null || b == "function"
};
goog.getUid = function (a) {
return a[goog.UID_PROPERTY_] || (a[goog.UID_PROPERTY_] = ++goog.uidCounter_)
};
goog.removeUid = function (a) {
"removeAttribute" in a && a.removeAttribute(goog.UID_PROPERTY_);
try {
delete a[goog.UID_PROPERTY_]
} catch (b) {}
};
goog.UID_PROPERTY_ = "closure_uid_" + Math.floor(2147483648 * Math.random()).toString(36);
goog.uidCounter_ = 0;
goog.getHashCode = goog.getUid;
goog.removeHashCode = goog.removeUid;
goog.cloneObject = function (a) {
var b = goog.typeOf(a);
if (b == "object" || b == "array") {
if (a.clone)
return a.clone();
var b = b == "array" ? [] : {},
c;
for (c in a)
b[c] = goog.cloneObject(a[c]);
return b
}
return a
};
goog.bindNative_ = function (a, b, c) {
return a.call.apply(a.bind, arguments)
};
goog.bindJs_ = function (a, b, c) {
if (!a)
throw Error();
if (arguments.length > 2) {
var d = Array.prototype.slice.call(arguments, 2);
return function () {
var c = Array.prototype.slice.call(arguments);
Array.prototype.unshift.apply(c, d);
return a.apply(b, c)
}
}
return function () {
return a.apply(b, arguments)
}
};
goog.bind = function (a, b, c) {
goog.bind = Function.prototype.bind && Function.prototype.bind.toString().indexOf("native code") != -1 ? goog.bindNative_ : goog.bindJs_;
return goog.bind.apply(null, arguments)
};
goog.partial = function (a, b) {
var c = Array.prototype.slice.call(arguments, 1);
return function () {
var b = Array.prototype.slice.call(arguments);
b.unshift.apply(b, c);
return a.apply(this, b)
}
};
goog.mixin = function (a, b) {
for (var c in b)
a[c] = b[c]
};
goog.now = Date.now || function () {
return +new Date
};
goog.globalEval = function (a) {
if (goog.global.execScript)
goog.global.execScript(a, "JavaScript");
else if (goog.global.eval) {
if (goog.evalWorksForGlobals_ == null) {
goog.global.eval("var _et_ = 1;");
if (typeof goog.global._et_ != "undefined") {
delete goog.global._et_;
goog.evalWorksForGlobals_ = true
} else
goog.evalWorksForGlobals_ = false
}
if (goog.evalWorksForGlobals_)
goog.global.eval(a);
else {
var b = goog.global.document,
c = b.createElement("script");
c.type = "text/javascript";
c.defer = false;
c.appendChild(b.createTextNode(a));
b.body.appendChild(c);
b.body.removeChild(c)
}
} else
throw Error("goog.globalEval not available");
};
goog.evalWorksForGlobals_ = null;
goog.getCssName = function (a, b) {
var c = function (a) {
return goog.cssNameMapping_[a] || a
},
d = function (a) {
for (var a = a.split("-"), b = [], d = 0; d < a.length; d++)
b.push(c(a[d]));
return b.join("-")
},
d = goog.cssNameMapping_ ? goog.cssNameMappingStyle_ == "BY_WHOLE" ? c : d : function (a) {
return a
};
return b ? a + "-" + d(b) : d(a)
};
goog.setCssNameMapping = function (a, b) {
goog.cssNameMapping_ = a;
goog.cssNameMappingStyle_ = b
};
!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING && (goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING);
goog.getMsg = function (a, b) {
var c = b || {},
d;
for (d in c)
var e = ("" + c[d]).replace(/\$/g, "$$$$"), a = a.replace(RegExp("\\{\\$" + d + "\\}", "gi"), e);
return a
};
goog.exportSymbol = function (a, b, c) {
goog.exportPath_(a, b, c)
};
goog.exportProperty = function (a, b, c) {
a[b] = c
};
goog.inherits = function (a, b) {
function c() {}
c.prototype = b.prototype;
a.superClass_ = b.prototype;
a.prototype = new c;
a.prototype.constructor = a
};
goog.base = function (a, b, c) {
var d = arguments.callee.caller;
if (d.superClass_)
return d.superClass_.constructor.apply(a, Array.prototype.slice.call(arguments, 1));
for (var e = Array.prototype.slice.call(arguments, 2), f = false, g = a.constructor; g; g = g.superClass_ && g.superClass_.constructor)
if (g.prototype[b] === d)
f = true;
else if (f)
return g.prototype[b].apply(a, e);
if (a[b] === d)
return a.constructor.prototype[b].apply(a, e);
throw Error("goog.base called from a method of one name to a method of a different name");
};
goog.scope = function (a) {
a.call(goog.global)
};
var simcity = {
AgentQueryUI : {},
cAgentQueryUIHandler : function () {
this.UIHandler = scrui.cUIHandler;
this.UIHandler();
this.mAgentQueryUILayout = this.mParentControl = null;
this.mOriginalLayoutWidth = 0;
this.mNameTextControl = null;
this.mDefaultNamePositionLeft = 0;
this.mDataBindings = this.mZoomToSourceButtonControl = this.mFollowButtonControl = this.mResourceBarAmountControl = this.mResourceBarFillControl = this.mResourceBarContainerControl = this.mResourceTextControl = this.mResourceWindowControl = this.mSimStatusIconWindowControl =
this.mSourceTextControl = this.mDestinationTextControl = null;
this.mCurrentSharedBindings = [];
this.mCurrentSharedTimedRefreshBindings = [];
this.mCurrentDataBindings = [];
this.mRefreshTimer = 0;
this.mDefaultDestinationTextColor = this.mDestinationPrependText = this.mDestinationText = "";
this.mAvatarTemplateContainer = null;
this.mAgentGender = 1
}
};
goog.inherits(simcity.cAgentQueryUIHandler, scrui.cUIHandler);
simcity.cAgentQueryUIHandler.kLayoutNameTextID = 164191353;
simcity.cAgentQueryUIHandler.kLayoutIconWindowID = 237484883;
simcity.cAgentQueryUIHandler.kLayoutDestinationTextID = 236702504;
simcity.cAgentQueryUIHandler.kLayoutSourceTextID = 237570896;
simcity.cAgentQueryUIHandler.kLayoutSimStatusIconWindowID = 237916421;
simcity.cAgentQueryUIHandler.kLayoutResourceWindowID = 238178069;
simcity.cAgentQueryUIHandler.kLayoutResourceTextID = 237979994;
simcity.cAgentQueryUIHandler.kLayoutResourceBarContainerID = 238178071;
simcity.cAgentQueryUIHandler.klayoutResourceBarFillID = 238178073;
simcity.cAgentQueryUIHandler.kLayoutResourceBarAmountID = 252673365;
simcity.cAgentQueryUIHandler.kLayoutFollowAgentCamButtonID = 238781781;
simcity.cAgentQueryUIHandler.kLayoutZoomToSourceButtonID = 238783027;
simcity.cAgentQueryUIHandler.kLayoutAvatarTemplateContainer = 253206823;
simcity.cAgentQueryUIHandler.kBindingTypePosition = 238092092;
simcity.cAgentQueryUIHandler.kBindingTypeName = 238084822;
simcity.cAgentQueryUIHandler.kBindingTypeGender = 244221262;
simcity.cAgentQueryUIHandler.kBindingTypeDestination = 238086977;
simcity.cAgentQueryUIHandler.kBindingTypeSource = 238090037;
simcity.cAgentQueryUIHandler.kBindingTypeSimStatus = 238092041;
simcity.cAgentQueryUIHandler.kBindingTypePrependDestination = 238853567;
simcity.cAgentQueryUIHandler.kBindingTypeResourceBin = 238091235;
simcity.cAgentQueryUIHandler.kBindingTypeShowGoToSource = 251821342;
simcity.cAgentQueryUIHandler.kBindingTypeRegionalBoxUID = 253205894;
simcity.cAgentQueryUIHandler.kRefreshTime = 1E3;
simcity.cAgentQueryUIHandler.prototype.Init = function (a) {
scrui.Assert(null !== a);
this.mParentControl = a;
this.mAgentQueryUILayout = gUIManager.LoadLayout("Layouts/AgentQueryLayout.js", this.mParentControl);
this.mOriginalLayoutWidth = this.mAgentQueryUILayout.mWidth;
this.mNameTextControl = this.mAgentQueryUILayout.FindControlByID(simcity.cAgentQueryUIHandler.kLayoutNameTextID);
this.mDefaultNamePositionLeft = this.mNameTextControl.mLeft;
this.mDestinationTextControl = this.mAgentQueryUILayout.FindControlByID(simcity.cAgentQueryUIHandler.kLayoutDestinationTextID);
this.mSourceTextControl = this.mAgentQueryUILayout.FindControlByID(simcity.cAgentQueryUIHandler.kLayoutSourceTextID);
this.mSimStatusIconWindowControl = this.mAgentQueryUILayout.FindControlByID(simcity.cAgentQueryUIHandler.kLayoutSimStatusIconWindowID);
this.mResourceWindowControl = this.mAgentQueryUILayout.FindControlByID(simcity.cAgentQueryUIHandler.kLayoutResourceWindowID);
this.mResourceTextControl = this.mAgentQueryUILayout.FindControlByID(simcity.cAgentQueryUIHandler.kLayoutResourceTextID);
this.mResourceBarContainerControl =
this.mAgentQueryUILayout.FindControlByID(simcity.cAgentQueryUIHandler.kLayoutResourceBarContainerID);
this.mResourceBarFillControl = this.mAgentQueryUILayout.FindControlByID(simcity.cAgentQueryUIHandler.klayoutResourceBarFillID);
this.mResourceBarAmountControl = this.mAgentQueryUILayout.FindControlByID(simcity.cAgentQueryUIHandler.kLayoutResourceBarAmountID);
this.mFollowButtonControl = this.mAgentQueryUILayout.FindControlByID(simcity.cAgentQueryUIHandler.kLayoutFollowAgentCamButtonID);
this.mZoomToSourceButtonControl =
this.mAgentQueryUILayout.FindControlByID(simcity.cAgentQueryUIHandler.kLayoutZoomToSourceButtonID);
this.mDefaultDestinationTextColor = this.mDestinationTextControl.mTextElement.style.color;
this.mAvatarTemplateContainer = this.mAgentQueryUILayout.FindControlByID(simcity.cAgentQueryUIHandler.kLayoutAvatarTemplateContainer);
this.Hide();
this.mDataBindings = simcity.AgentQueryDataBindings
};
simcity.cAgentQueryUIHandler.prototype.AddDataBinding = function (a) {
a && this.mCurrentDataBindings.push(a)
};
simcity.cAgentQueryUIHandler.prototype.AddDataBindings = function (a) {
if (a)
for (var b = a.length, c = 0; c < b; ++c)
this.AddDataBinding(a[c])
};
simcity.cAgentQueryUIHandler.prototype.HandleGameEvent = function (a, b) {
switch (a) {
case simcity.kGameMessageAgentSelected:
this.mRefreshTimer = 0;
this.mCurrentDataBindings = [];
this.Hide();
this.mAgentQueryUILayout.SetWidth(this.mOriginalLayoutWidth);
this.mCurrentSharedBindings = simcity.kSharedAgentQueryDataBindings;
this.mCurrentSharedTimedRefreshBindings = simcity.kSharedAgentQueryTimedRefreshDataBindings;
scrui.Assert(simcity.AgentQueryDataBindings[b.transportType], "Agent has invalid scTransportUIType. Please check the prop file for this agent.");
this.AddDataBindings(simcity.AgentQueryDataBindings[b.transportType]);
this.Show(!0);
this.SendDataBindingRequest(this.mCurrentSharedTimedRefreshBindings, !1);
this.SendDataBindingRequest(this.mCurrentDataBindings, !1);
simcity.gEventManager.TriggerEvent(simcity.gEventTypes.GENERICEVENT, b.transportType, this.mAgentQueryUILayout);
break;
case simcity.kGameMessageActorSelected:
this.mRefreshTimer = 0;
this.Hide();
this.mAgentQueryUILayout.SetWidth(this.mOriginalLayoutWidth);
this.mCurrentSharedBindings = simcity.kSharedActorQueryDataBindings;
this.mCurrentSharedTimedRefreshBindings = simcity.kSharedActorQueryTimedRefreshDataBindings;
this.mCurrentDataBindings = [];
this.Show(!1);
this.SendDataBindingRequest(this.mCurrentSharedTimedRefreshBindings, !1);
this.SendDataBindingRequest(this.mCurrentDataBindings, !1);
break;
case simcity.kGameMessageAgentDeselected:
this.mCurrentSharedBindings = [],
this.mCurrentSharedTimedRefreshBindings = [],
this.mCurrentDataBindings = [],
this.Hide()
}
};
simcity.cAgentQueryUIHandler.prototype.HandleUIMessage = function (a, b) {
switch (a) {
case scrui.kMsgTypeButtonClicked:
switch (b) {
case simcity.cAgentQueryUIHandler.kLayoutFollowAgentCamButtonID:
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandActivateFollowAgentCam]));
break;
case simcity.cAgentQueryUIHandler.kLayoutZoomToSourceButtonID:
simcity.IsTutorialInProgress() || scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandZoomToAgentSource]))
}
}
};
simcity.cAgentQueryUIHandler.prototype.Update = scrui.Client_ProfZone("AgentQueryUIUpdate", function (a) {
this.mAgentQueryUILayout && (this.mAgentQueryUILayout.mIsVisible && this.mCurrentDataBindings) && (this.SendDataBindingRequest(this.mCurrentSharedBindings, !0), this.mRefreshTimer -= a, 0 >= this.mRefreshTimer && (this.mRefreshTimer = simcity.cAgentQueryUIHandler.kRefreshTime, this.mAgentQueryUILayout.SetWidth(this.mOriginalLayoutWidth), this.AutoResizeLayout(this.mNameTextControl), this.SendDataBindingRequest(this.mCurrentSharedTimedRefreshBindings,
!0), this.SendDataBindingRequest(this.mCurrentDataBindings, !0)))
});
simcity.cAgentQueryUIHandler.prototype.SendDataBindingRequest = function (a, b) {
var c = this,
d = a.length,
e = [],
f = [];
simcity.GenerateDataBindingQueries(a, e, {}, f, b);
simcity.RequestDataBindingData(e, a, f, b, function (e) {
for (var f = 0; f < d; ++f) {
var i = a[f];
if (i.dynamic || !1 === b)
switch (i.bindingType) {
case simcity.cAgentQueryUIHandler.kBindingTypePosition:
c.SetPosition(e[f].screenPosition);
break;
case simcity.cAgentQueryUIHandler.kBindingTypeShowGoToSource:
c.SetGoToSourceVisible(i.update(e[f]));
break;
case simcity.cAgentQueryUIHandler.kBindingTypeName:
c.SetName(i.update(e[f]));
break;
case simcity.cAgentQueryUIHandler.kBindingTypeGender:
c.SetGender(i.update(e[f]));
break;
case simcity.cAgentQueryUIHandler.kBindingTypeRegionalBoxUID:
c.SetPlayerDisplay(i.update(e[f]));
break;
case simcity.cAgentQueryUIHandler.kBindingTypeDestination:
c.SetDestination(i.update(e[f]), i.color);
break;
case simcity.cAgentQueryUIHandler.kBindingTypeSource:
c.SetSource(i.update(e[f]));
break;
case simcity.cAgentQueryUIHandler.kBindingTypeSimStatus:
c.SetSimStatus(i.update(e[f]), i.iconPath);
break;
case simcity.cAgentQueryUIHandler.kBindingTypePrependDestination:
c.SetDestinationPrependText(i.update(e[f]),
i.color);
break;
case simcity.cAgentQueryUIHandler.kBindingTypeResourceBin:
c.SetResourceBinInfo(e[f].resource, i.localeString, i.formatType);
break;
default:
i.hasOwnProperty("update") && i.update(e[f])
}
}
})
};
simcity.cAgentQueryUIHandler.prototype.SetPosition = function (a) {
a && this.mAgentQueryUILayout.SetPosition(a[0] - this.mAgentQueryUILayout.mWidth / 2, a[1] - this.mAgentQueryUILayout.mHeight)
};
simcity.cAgentQueryUIHandler.prototype.SetGoToSourceVisible = function (a) {
a ? this.mZoomToSourceButtonControl.SetVisibility(a) : this.mZoomToSourceButtonControl.SetVisibility(!1)
};
simcity.cAgentQueryUIHandler.prototype.SetName = function (a) {
var b = "";
a.vehicleName ? this.mNameTextControl.SetLocaleText(scrui.LocaleStringFromLocaleProperty(a.vehicleName), {
cityName : a.cityName
}) : (a.firstName && (b = scrui.TextFromLocaleProperty(a.firstName)), a.lastName && (b += " " + this.GetGenderedTextFromLocaleString(scrui.LocaleStringFromLocaleProperty(a.lastName), this.mAgentGender)), this.mNameTextControl.SetRawText(b));
this.mDestinationTextControl.SetTextColor(this.mDefaultDestinationTextColor);
this.AutoResizeLayout(this.mNameTextControl)
};
simcity.cAgentQueryUIHandler.prototype.SetGender = function (a) {
this.mAgentGender = a
};
simcity.cAgentQueryUIHandler.prototype.SetPlayerDisplay = function (a) {
0 < a ? (a = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mBoxes[a], simcity.gGlobalUIHandler.mAvatarManagerHandler.AddSubscription({
playerID : a.creatorId,
layoutInfo : this.mAvatarTemplateContainer,
isBoxClaimed : !0,
isMyBox : a.creatorId == simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayingBox.creatorId,
isCurrentBox : !1,
showAlerts : !1,
group : "agentQuery" + a.uid,
boxID : a.uid
}), this.mAvatarTemplateContainer.SetVisibility(!0)) :
this.mAvatarTemplateContainer.SetVisibility(!1)
};
simcity.cAgentQueryUIHandler.prototype.SetDestination = function (a, b) {
a && (this.mDestinationText = this.GetGenderedTextFromLocaleString(scrui.LocaleStringFromLocaleProperty(a), this.mAgentGender), this.UpdateDestination(b))
};
simcity.cAgentQueryUIHandler.prototype.SetSource = function (a) {
a ? (this.mSourceTextControl.SetVisibility(!0), this.mSourceTextControl.UpdateLocaleText({
sourceName : a,
gender : this.mAgentGender
}), this.AutoResizeLayout(this.mSourceTextControl)) : this.mSourceTextControl.SetVisibility(!1)
};
simcity.cAgentQueryUIHandler.prototype.SetSimStatus = function (a, b) {
a && (this.mSimStatusIconWindowControl.SetVisibility(!0), this.mSimStatusIconWindowControl.SetWindowImage(b), this.SetDestinationPrependText(a, null))
};
simcity.cAgentQueryUIHandler.prototype.SetDestinationPrependText = function (a, b) {
a && (this.mDestinationPrependText = this.GetGenderedTextFromLocaleString(a, this.mAgentGender), this.UpdateDestination(b))
};
simcity.cAgentQueryUIHandler.prototype.SetResourceBinInfo = function (a, b, c) {
this.mResourceWindowControl.SetVisibility(!0);
var d;
b.LoadString(function () {
d = b.GetText()
});
this.mResourceTextControl.SetRawText(d);
this.AutoResizeLayout(this.mResourceTextControl);
var e = a.amount / a.capacity;
this.mResourceBarFillControl.SetWidth(e * this.mResourceBarContainerControl.mWidth);
var f = this.GetResourceTextString(c);
if ("undefined" != c && c != simcity.NumberFormat.Standard) {
var g = c ? simcity.FormatLargeNumberByType(a.amount,
c).number : a.amount,
a = c ? simcity.FormatLargeNumberByType(a.capacity, c).number : a.capacity,
h;
f.LoadString(function () {
h = f.GetText()
});
this.mResourceBarAmountControl.SetRawText(g + "/" + a + " " + h);
this.AutoResizeProgressBar(this.mResourceBarAmountControl, e)
} else
this.mResourceBarAmountControl.SetRawText(a.amount + "/" + a.capacity)
};
simcity.cAgentQueryUIHandler.prototype.GetResourceTextString = function (a) {
var b = 0;
switch (a) {
case simcity.NumberFormat.Tons:
b = "0x0e8d4573";
break;
case simcity.NumberFormat.Barrels:
b = "0x0e8d4575";
break;
case simcity.NumberFormat.Crates:
case simcity.NumberFormat.Units:
b = "0x0e8d4574"
}
return new scrui.cLocaleString("BuildingRollover.json", b, "AgentQueryUI")
};
simcity.cAgentQueryUIHandler.prototype.AutoResizeLayout = function (a) {
var b = a.GetTextWidth(),
a = a.mWidth - b;
0 > a && this.mAgentQueryUILayout.SetWidth(this.mAgentQueryUILayout.mWidth - a + 1)
};
simcity.cAgentQueryUIHandler.prototype.AutoResizeProgressBar = function (a) {
var b = a.GetTextWidth(),
c = a.mWidth - b;
0 > c ? (a.SetPosition(a.mLeft + c, a.mTop, b, a.mHeight), this.mAgentQueryUILayout.SetWidth(this.mAgentQueryUILayout.mWidth - a.mLeft + this.mResourceTextControl.mWidth), this.mResourceBarContainerControl.SetPosition(this.mResourceBarContainerControl.mLeft + c, this.mResourceBarContainerControl.mTop, b + 1, this.mResourceBarContainerControl.mHeight)) : this.mAgentQueryUILayout.SetWidth(this.mAgentQueryUILayout.mWidth -
a.mLeft + this.mResourceTextControl.mWidth + 10)
};
simcity.cAgentQueryUIHandler.prototype.GetGenderedTextFromLocaleString = function (a, b) {
var c = "";
a.LoadString(function () {
c = a.GetText({
gender : b
})
});
return c
};
simcity.cAgentQueryUIHandler.prototype.UpdateDestination = function (a) {
a ? this.mDestinationTextControl.SetTextColor(a) : this.mDestinationTextControl.SetTextColor(this.mDefaultDestinationTextColor);
this.mDestinationTextControl.SetRawText(this.mDestinationPrependText + " " + this.mDestinationText);
this.AutoResizeLayout(this.mDestinationTextControl)
};
simcity.cAgentQueryUIHandler.prototype.Show = function (a) {
this.mAgentQueryUILayout.SetVisibility(!0);
this.mFollowButtonControl.SetSelected(!1);
this.mZoomToSourceButtonControl.SetEnabled(a);
this.mZoomToSourceButtonControl.SetVisibility(!1);
this.mAvatarTemplateContainer.SetVisibility(!1);
this.mDestinationTextControl.SetRawText("");
this.mNameTextControl.SetPosition(this.mDefaultNamePositionLeft, this.mNameTextControl.mTop);
a ? this.mFollowButtonControl.SetVisibility(!0) : this.mFollowButtonControl.SetVisibility(!1)
};
simcity.cAgentQueryUIHandler.prototype.Hide = function () {
this.mAgentQueryUILayout.SetVisibility(!1);
this.mSimStatusIconWindowControl.SetVisibility(!1);
this.mResourceWindowControl.SetVisibility(!1);
this.mDestinationPrependText = this.mDestinationText = "";
this.mAgentGender = 1;
this.mDestinationTextControl.SetTextColor(this.mDefaultDestinationTextColor)
};
simcity.RegionTradeUI = {};
simcity.kRegionTradeOutgoingTokenPanelID = 239646136;
simcity.kRegionTradeIncomingTokenPanelID = 239644807;
simcity.kRegionTradeRefreshTime = 1E3;
simcity.kRegionTradeTokenType_Fire = "fire";
simcity.kRegionTradeTokenType_Police = "police";
simcity.kRegionTradeTokenType_Garbage = "garbage";
simcity.kRegionTradeTokenType_Health = "health";
simcity.kRegionTradeTokenTypes = [simcity.kRegionTradeTokenType_Fire, simcity.kRegionTradeTokenType_Police, simcity.kRegionTradeTokenType_Garbage, simcity.kRegionTradeTokenType_Health];
simcity.kRegionTradeResourceGiftAmount = 1E4;
simcity.kRegionTradeResourceGiftMaxAmount = 1E7;
simcity.kUtilityPanelIDs = {
myCity : {
rootPanel : 239654550,
tradePanel : 239644807,
noTradeText : 239811505,
titleText : 239812302
},
item : {
cityOwnerIcon : 240577914,
cityNameText : 242413919,
cityOwnerText : 242413908,
statusText : 242397569,
receivingFromCityText : 253390028,
button : 242397758
}
};
simcity.kTokenPanelIDs = {
outgoing : {
rootPanel : 239654560,
tokensPanel : 239646136,
noTokensText : 239811492,
titleText : 239812235,
removeTokenPanel : 239901846,
removeTokenButton : 239901837,
removeTokenText : 239901832
},
incoming : {
rootPanel : 239654550,
tokensPanel : 239644807,
noTokensText : 239811505,
titleText : 239812302,
shareTokenPanel : 239811577,
shareTokenButton : 239811671,
shareTokenText : 239811734
},
avatar : {
avatarImage : 237907905,
btnAvatar : 242832115,
avatarOnlineHighlight : 239800634,
avatarAlert : 239807635,
textWindow : 242832079,
playerName : 242832082
},
vehicle : {
iconAndButtonWindow : 247687083,
amountText : 244665831,
tooltipText : 239656078,
buttonsWindow : 246016822,
buttonAdd : 246016823,
buttonSubtract : 246016824,
icon : 239656036
}
};
simcity.kGiftingPanelIDs = {
resources : {
startingTabID : 249422240,
lastTabID : 249422250,
titleBarText : 241808376,
selectedCityTitleBarText : 241808377,
playingCity : {
amountText : 249485363,
nameText : 249485369,
truckIcon : 249761536,
railIcon : 249761537,
boatIcon : 249761538
},
viewingCity : {
avatarWindow : 243530044,
amountText : 249485356,
nameText : 249485359,
displayInfoAnimation : 249648679,
truckIcon : 249761539,
railIcon : 249761540,
boatIcon : 249761541
},
unconnectedCity : {
window : 249764729,
nameText : 249918847,
displayInfoAnimation : 249918411
},
sendButton : 236790941,
sendAmountText : 241707655,
incrementButton : 236790942,
decrementButton : 236790943,
maxAmountButton : 249916003,
pendingText : 249574691,
tab : {
button : 249484086,
lightIcon : 249484087,
darkIcon : 249484088,
tooltipResourceText : 249914354,
tooltipAmountText : 249914355
}
}
};
simcity.kGiftingTooltips = {
SendingEnabled : "",
UnclaimedOrUnconnectedCity : new scrui.cLocaleString("Gifting.json", "0x0ee94dee", "City not connected/claimed placeholder"),
GiftInProgress : new scrui.cLocaleString("Gifting.json", "0x0e952dc6", "Gift in progress placeholder"),
EmptyGiftAmount : new scrui.cLocaleString("Gifting.json", "0x0ee94def", "Increase gift amount placeholder")
};
simcity.cRegionTradeUIHandler = function () {
this.UIHandler = scrui.cUIHandler;
this.UIHandler();
this.mRegionViewUI = simcity.gGlobalUIHandler.mRegionViewUIHandler;
this.mStatusIconLayoutPath = "Layouts/Region/TradeTokenStatusIcon.js";
this.mTimeSinceLastUpdate = 0;
this.mResourceGiftingItemControls = [];
this.mResourceGiftingCurrentAmount = this.mResourceGiftingSelectedTab = this.mRefreshTimer = 0;
this.mResourceGiftingMaxAmount = !1;
this.mResourceGiftingCurrentClickAmount = this.mResourceGiftingLastTickPress = this.mResourceGiftingLegendControl =
0
};
goog.inherits(simcity.cRegionTradeUIHandler, scrui.cUIHandler);
simcity.cRegionTradeUIHandler.kVehicleContainers = [249129195, 249129200, 249129202, 249129206, 249129209];
simcity.cRegionTradeUIHandler.kVehicleContainerImage = 248984352;
simcity.cRegionTradeUIHandler.kVehicleContainerTextAmount = 248984355;
simcity.cRegionTradeUIHandler.kNoCitySelectedBanner = 248983030;
simcity.cRegionTradeUIHandler.kGivingToBox = 248983052;
simcity.cRegionTradeUIHandler.kCoveringBox = 248983055;
simcity.cRegionTradeUIHandler.kTxtMyCityName = 248983081;
simcity.cRegionTradeUIHandler.kTxtNeighborCityName = 248983044;
simcity.cRegionTradeUIHandler.kTxtSpinnerValue = 248979371;
simcity.cRegionTradeUIHandler.kTxtServiceHoverName = 250259057;
simcity.cRegionTradeUIHandler.kTxtServiceHoverDescription = 250258365;
simcity.cRegionTradeUIHandler.kTxtServiceHoverImage = 250259876;
simcity.cRegionTradeUIHandler.kBtnIncrementVehicle = 248979367;
simcity.cRegionTradeUIHandler.kBtnDecrementVehicle = 248979369;
simcity.cRegionTradeUIHandler.kTxtSpinnerAmount = 248979371;
simcity.cRegionTradeUIHandler.kYourAvatarContainer = 248983083;
simcity.cRegionTradeUIHandler.kTradePartnerAvatarContainer = 249493477;
simcity.cRegionTradeUIHandler.kTxtServiceTradeTitleNeighbour = 249659712;
simcity.cRegionTradeUIHandler.kTxtServiceTradeTitle = 249659715;
simcity.cRegionTradeUIHandler.kTxtSelectCityText = 248983033;
simcity.cRegionTradeUIHandler.prototype.Init = function () {};
simcity.cRegionTradeUIHandler.prototype.HandleUIMessage = function (a, b, c) {
switch (a) {
case scrui.kMsgTypeButtonClicked:
switch (b) {
case simcity.cRegionTradeUIHandler.kBtnIncrementVehicle:
c.mUserData && this.ServiceVehicleButtonPressed("increment", c.mUserData);
break;
case simcity.cRegionTradeUIHandler.kBtnDecrementVehicle:
c.mUserData && this.ServiceVehicleButtonPressed("decrement", c.mUserData);
break;
case simcity.kUtilityPanelIDs.item.button:
c.mUserData && this.ToggleUtilityTrade(c);
break;
case simcity.kGiftingPanelIDs.resources.tab.button:
0 <=
c.mUserData && this.ShowGiftingTab(c.mUserData);
break;
case simcity.kGiftingPanelIDs.resources.sendButton:
c.mUserData && this.SendResourceGift(c);
break;
case simcity.kGiftingPanelIDs.resources.maxAmountButton:
this.mResourceGiftingMaxAmount = !0;
this.UpdateGiftingTextForSelectedTab();
break;
case simcity.kGiftingPanelIDs.resources.incrementButton:
this.UpdateGiftingClickRun();
this.mResourceGiftingCurrentAmount = 19 <= this.mResourceGiftingCurrentClickAmount && 0 == this.mResourceGiftingCurrentAmount % (50 * simcity.kRegionTradeResourceGiftAmount) ?
this.mResourceGiftingCurrentAmount + 50 * simcity.kRegionTradeResourceGiftAmount : 14 <= this.mResourceGiftingCurrentClickAmount && 0 == this.mResourceGiftingCurrentAmount % (10 * simcity.kRegionTradeResourceGiftAmount) ? this.mResourceGiftingCurrentAmount + 10 * simcity.kRegionTradeResourceGiftAmount : 5 <= this.mResourceGiftingCurrentClickAmount && 0 == this.mResourceGiftingCurrentAmount % (5 * simcity.kRegionTradeResourceGiftAmount) ? this.mResourceGiftingCurrentAmount + 5 * simcity.kRegionTradeResourceGiftAmount : this.mResourceGiftingCurrentAmount +
simcity.kRegionTradeResourceGiftAmount;
this.UpdateGiftingTextForSelectedTab();
break;
case simcity.kGiftingPanelIDs.resources.decrementButton:
this.UpdateGiftingClickRun(),
this.mResourceGiftingCurrentAmount = 19 <= this.mResourceGiftingCurrentClickAmount && 0 == this.mResourceGiftingCurrentAmount % (50 * simcity.kRegionTradeResourceGiftAmount) ? this.mResourceGiftingCurrentAmount - 50 * simcity.kRegionTradeResourceGiftAmount : 14 <= this.mResourceGiftingCurrentClickAmount && 0 == this.mResourceGiftingCurrentAmount % (10 * simcity.kRegionTradeResourceGiftAmount) ?
this.mResourceGiftingCurrentAmount - 10 * simcity.kRegionTradeResourceGiftAmount : 5 <= this.mResourceGiftingCurrentClickAmount && 0 == this.mResourceGiftingCurrentAmount % (5 * simcity.kRegionTradeResourceGiftAmount) ? this.mResourceGiftingCurrentAmount - 5 * simcity.kRegionTradeResourceGiftAmount : this.mResourceGiftingCurrentAmount - simcity.kRegionTradeResourceGiftAmount,
this.UpdateGiftingTextForSelectedTab()
}
}
};
simcity.cRegionTradeUIHandler.prototype.GetViewingCity = function () {
return this.mRegionViewUI.mSelectedRegionViewItem ? this.mRegionViewUI.mSelectedRegionViewItem.mRegionalBoxID : this.mRegionViewUI.mRegionData.mPlayingBox.uid
};
simcity.cRegionTradeUIHandler.prototype.GetServiceVehicleButton = function (a, b) {
var c = simcity.gGlobalUIHandler.mRegionViewUIHandler.mContextPanelObj,
d = this.mRegionViewUI.mContextPanelDataBinding.getServiceVehicles();
if (!c || !d)
return null;
for (d = 0; d < simcity.cRegionTradeUIHandler.kVehicleContainers.length; d++) {
var e = c.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainers[d]);
if (e && (e = e.FindControlByID(a)) && e.mUserData && e.mUserData[0] == b)
return e
}
return null
};
simcity.cRegionTradeUIHandler.prototype.GetResourceButton = function (a) {
for (var b = simcity.kGiftingPanelIDs.resources.startingTabID, c = simcity.gGlobalUIHandler.mRegionViewUIHandler.mContextPanelObj, d = 0, e = simcity.kGiftableResourcesDataBindings.length; d < e; ++d) {
if (simcity.kGiftableResourcesDataBindings[d]) {
var f = c.FindControlByID(b).FindControlByID(simcity.kGiftingPanelIDs.resources.tab.button);
if (f && f.mUserData == a)
return f
}
++b
}
return null
};
simcity.cRegionTradeUIHandler.prototype.ShowTokenUI = function (a) {
for (var b = this.mRegionViewUI.mContextPanelDataBinding, c = b.getServiceVehicles(), d = this.IsViewingOwnBox(), e = this.IsConnectedToPlayingCityViaRoad(this.GetViewingCity()), f = simcity.gGlobalUIHandler.mRegionViewUIHandler, g = f.mRegionData, h = f.mContextPanelObj, i = 0; i < simcity.cRegionTradeUIHandler.kVehicleContainers.length; i++) {
var j = h.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainers[i]);
if (j && (j.SetVisibility(!1), i < c.length && (j.SetVisibility(!0),
d || !e ? (j.FindControlByID(simcity.cRegionTradeUIHandler.kBtnIncrementVehicle).SetVisibility(!1), j.FindControlByID(simcity.cRegionTradeUIHandler.kBtnDecrementVehicle).SetVisibility(!1)) : (j.FindControlByID(simcity.cRegionTradeUIHandler.kBtnIncrementVehicle).SetVisibility(!0), j.FindControlByID(simcity.cRegionTradeUIHandler.kBtnDecrementVehicle).SetVisibility(!0)), j.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainerImage).SetWindowImage(c[i].icon), j.FindControlByID(simcity.cRegionTradeUIHandler.kTxtServiceHoverName).SetLocaleText(c[i].text),
j.FindControlByID(simcity.cRegionTradeUIHandler.kTxtServiceHoverImage).SetWindowImage(c[i].rolloverIcon), j.FindControlByID(simcity.cRegionTradeUIHandler.kTxtServiceHoverDescription).SetLocaleText(c[i].rolloverText), f.mSelectedRegionViewItem))) {
var k = g.mConnectedUnits[f.mSelectedRegionViewItem.mRegionalBoxID];
j.FindControlByID(simcity.cRegionTradeUIHandler.kBtnIncrementVehicle).mUserData = [c[i].index, k];
j.FindControlByID(simcity.cRegionTradeUIHandler.kBtnDecrementVehicle).mUserData = [c[i].index, k]
}
}
simcity.gGlobalUIHandler.mAvatarManagerHandler.ClearSubscriptions("tradeServicesYou");
c = h.FindControlByID(simcity.cRegionTradeUIHandler.kYourAvatarContainer);
c = {
playerID : g.mPlayingBox.creatorId,
layoutInfo : c,
isBoxClaimed : "true",
isMyBox : !0,
isCurrentBox : !1,
showAlerts : !1,
group : "tradeServicesYou",
boxID : g.mPlayingBox.uid
};
simcity.gGlobalUIHandler.mAvatarManagerHandler.AddSubscription(c);
d ? h.FindControlByID(simcity.cRegionTradeUIHandler.kTxtSelectCityText).SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0ed7185a", "Select a city.")) : this.IsConnectedToPlayingCityViaRoad(this.GetViewingCity()) ?
h.FindControlByID(simcity.cRegionTradeUIHandler.kTxtSelectCityText).SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0ef7ea23", "Unclaimed city!")) : h.FindControlByID(simcity.cRegionTradeUIHandler.kTxtSelectCityText).SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0ef7ea24", "Too far away!"));
h.FindControlByID(simcity.cRegionTradeUIHandler.kTxtServiceTradeTitle).SetLocaleText(b.getServiceString());
b = b.getServiceDestinationString();
!d && e && (d = simcity.gGlobalUIHandler.mRegionViewUIHandler.mSelectedRegionViewItem.mRegionalBoxID,
e = "", e = g.mCities[d] ? g.mCities[d].name : scrui.ParseLocaleString(g.mCityDefaultData.cities[d].cityName).LoadAndGetTextSynchronous(), h.FindControlByID(simcity.cRegionTradeUIHandler.kTxtServiceTradeTitleNeighbour).SetLocaleText(b, {
cityname : e
}), simcity.gGlobalUIHandler.mAvatarManagerHandler.ClearSubscriptions("tradeServicesTradePartner"), g.mBoxes[d] && (e = h.FindControlByID(simcity.cRegionTradeUIHandler.kTradePartnerAvatarContainer), c = {
playerID : g.mBoxes[d].creatorId,
layoutInfo : e,
isBoxClaimed : "true",
isMyBox : g.mPlayingBox.creatorId ==
g.mBoxes[d].creatorId,
isCurrentBox : !1,
showAlerts : !1,
group : "tradeServicesTradePartner",
boxID : d
}, simcity.gGlobalUIHandler.mAvatarManagerHandler.AddSubscription(c)));
(g = h.FindControlByID(253646199)) && g.UpdateLocaleText({
amount : this.GetIncomeTotalForTradedService(a)
});
this.SetupResourceTradingBaseUIState(h)
};
simcity.cRegionTradeUIHandler.prototype.GetIncomeTotalForTradedService = function (a) {
for (var b = 0, c = simcity.GetHistoryData(simcity.kTransactionsToTrack, 20), d = 0, e = c.length; d < e; d++) {
var f = c[d].label;
if ("fire" == a && f == simcity.gHistoryData[simcity.kHashServiceIncomeFire].label || "police" == a && f == simcity.gHistoryData[simcity.kHashServiceIncomePolice].label || "garbage" == a && f == simcity.gHistoryData[simcity.kHashServiceIncomeGarbage].label || "garbage" == a && f == simcity.gHistoryData[simcity.kHashServiceIncomeRecycling].label ||
"health" == a && f == simcity.gHistoryData[simcity.kHashServiceIncomeHealth].label)
b += c[d].amount
}
return b
};
simcity.cRegionTradeUIHandler.prototype.UpdateTokenUI = function () {
var a = this.mRegionViewUI.mContextPanelDataBinding,
b = simcity.gGlobalUIHandler.mRegionViewUIHandler,
c = b.mContextPanelObj,
d = a.getCurrentValueQueries();
scrui.RequestGameData(d, function (a) {
var b = c.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainers[0]);
b.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainerImage).SetOpacity(a[0] ? 1 : 0.3);
b.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainerTextAmount).SetRawText(" " +
(a[0] - a[1]) + "/" + a[0]);
b.FindControlByID(simcity.cRegionTradeUIHandler.kTxtSpinnerValue).SetRawText("0");
b.FindControlByID(simcity.cRegionTradeUIHandler.kBtnIncrementVehicle).SetEnabled(0 < a[0] - a[1]);
b = c.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainers[1]);
b.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainerImage).SetOpacity(a[2] ? 1 : 0.3);
b.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainerTextAmount).SetRawText(" " + (a[2] - a[3]) + "/" + a[2]);
b.FindControlByID(simcity.cRegionTradeUIHandler.kTxtSpinnerValue).SetRawText("0");
b.FindControlByID(simcity.cRegionTradeUIHandler.kBtnIncrementVehicle).SetEnabled(0 < a[2] - a[3]);
b = c.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainers[2]);
b.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainerImage).SetOpacity(a[4] ? 1 : 0.3);
b.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainerTextAmount).SetRawText(" " + (a[4] - a[5]) + "/" + a[4]);
b.FindControlByID(simcity.cRegionTradeUIHandler.kTxtSpinnerValue).SetRawText("0");
b.FindControlByID(simcity.cRegionTradeUIHandler.kBtnIncrementVehicle).SetEnabled(0 <
a[4] - a[5]);
b = c.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainers[3]);
b.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainerImage).SetOpacity(a[6] ? 1 : 0.3);
b.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainerTextAmount).SetRawText(" " + (a[6] - a[7]) + "/" + a[6]);
b.FindControlByID(simcity.cRegionTradeUIHandler.kTxtSpinnerValue).SetRawText("0");
b.FindControlByID(simcity.cRegionTradeUIHandler.kBtnIncrementVehicle).SetEnabled(0 < a[6] - a[7]);
b = c.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainers[4]);
b.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainerImage).SetOpacity(a[8] ? 1 : 0.3);
b.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainerTextAmount).SetRawText(" " + (a[8] - a[9]) + "/" + a[8]);
b.FindControlByID(simcity.cRegionTradeUIHandler.kTxtSpinnerValue).SetRawText("0");
b.FindControlByID(simcity.cRegionTradeUIHandler.kBtnIncrementVehicle).SetEnabled(0 < a[8] - a[9])
});
d = b.mSelectedRegionViewItem ? b.mSelectedRegionViewItem.mRegionalBoxID : null;
if (!this.IsViewingOwnBox() && this.IsConnectedToPlayingCityViaRoad(d))
for (var a =
a.getServiceVehicles(), b = b.mRegionData.mConnectedUnits[b.mSelectedRegionViewItem.mRegionalBoxID], e = 0; e < a.length; e++) {
var f = [a[e]],
d = [],
g = [];
simcity.GenerateDataBindingQueries(f, d, {
argumentList : [b]
}, g, !1, "queries");
simcity.RequestDataBindingData(d, f, g, !1, function (a) {
var a = a[0].outgoingVehicle,
b = c.FindControlByID(simcity.cRegionTradeUIHandler.kVehicleContainers[e]);
if (b) {
b.FindControlByID(simcity.cRegionTradeUIHandler.kBtnDecrementVehicle).SetEnabled(a > 0);
(b = b.FindControlByID(simcity.cRegionTradeUIHandler.kTxtSpinnerAmount)) &&
b.SetText(a)
}
})
}
};
simcity.cRegionTradeUIHandler.prototype.SetupResourceTradingBaseUIState = function (a) {
var b = this.IsViewingOwnBox(),
c = this.IsConnectedToPlayingCityViaRoad(this.GetViewingCity()),
d = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData;
a.FindControlByID(simcity.cRegionTradeUIHandler.kNoCitySelectedBanner).SetVisibility(b || !c);
a.FindControlByID(simcity.cRegionTradeUIHandler.kGivingToBox).SetVisibility(!b && c);
a.FindControlByID(simcity.cRegionTradeUIHandler.kCoveringBox).SetVisibility(b || !c);
b ? this.SetupTradingAvatars(a) :
(b = simcity.gGlobalUIHandler.mRegionViewUIHandler.mSelectedRegionViewItem.mRegionalBoxID, c = "", c = d.mCities[b] ? d.mCities[b].name : scrui.ParseLocaleString(d.mCityDefaultData.cities[b].cityName).LoadAndGetTextSynchronous(), a.FindControlByID(simcity.cRegionTradeUIHandler.kTxtNeighborCityName).SetText(c));
a.FindControlByID(simcity.cRegionTradeUIHandler.kTxtMyCityName).SetText(d.mPlayingBox.name);
this.UpdateTokenUI()
};
simcity.cRegionTradeUIHandler.prototype.GetCoveringAndReceivingDetails = function () {
var a = this.mRegionViewUI.mContextPanelDataBinding,
b = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData;
this.mListOfBoxesYouCover = {};
this.mListOfBoxesCoveringYou = {};
for (var c = this, d = Object.keys(b.mCityTradeData[b.mPlayingBox.uid].connections), e = a.getServiceVehicles(), f = 0; f < d.length; f++) {
var g = b.mBoxes[d[f]];
if (g && "true" === g.isClaimed && this.IsConnectedToPlayingCityViaRoad(d[f])) {
var h = parseInt(g.uid),
g = b.mConnectedUnits[h];
c.mListOfBoxesYouCover[h] = [];
c.mListOfBoxesCoveringYou[h] = [];
for (var i = 0; i < e.length; i++) {
var j = [e[i]],
k = [],
l = [];
simcity.GenerateDataBindingQueries(j, k, {
argumentList : [g]
}, l, !1, "queries");
simcity.RequestDataBindingData(k, j, l, !1, function (b) {
b = b[0];
if (b.outgoingVehicle) {
var d = {
category : a.tokenType,
icon : e[i].icon,
count : b.outgoingVehicle
};
c.mListOfBoxesYouCover[h].push(d)
}
if (b.incomingVehicle) {
d = {
category : a.tokenType,
icon : e[i].icon,
count : b.incomingVehicle
};
c.mListOfBoxesCoveringYou[h].push(d)
}
})
}
}
}
};
simcity.cRegionTradeUIHandler.prototype.SetupTradingAvatars = function (a) {
for (var b = [249487666, 249487665, 249487663, 249487661, 249487658], c = [249487650, 249487652, 249487654, 249487655, 249487657], d = 0; d < b.length; d++) {
var e = a.FindControlByID(b[d]);
e.SetVisibility(!1);
e = a.FindControlByID(c[d]);
e.SetVisibility(!1)
}
var f = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData,
g = simcity.cRegionTradeUIHandler.prototype.GetYourBoxID();
this.GetCoveringAndReceivingDetails();
for (var h = Object.keys(this.mListOfBoxesYouCover),
d = 0; d < h.length; d++) {
var i = h[d];
if (this.mListOfBoxesYouCover[i] && this.mListOfBoxesYouCover[i].length) {
var j = b[d],
e = a.FindControlByID(j);
e.SetVisibility(!0);
var j = e.FindControlByID(249494366),
k = i == g;
simcity.gGlobalUIHandler.mAvatarManagerHandler.ClearSubscriptions("servicesCovering" + d);
j = {
playerID : f.mCities[i].creatorId,
layoutInfo : j,
isBoxClaimed : "true",
isMyBox : k,
isCurrentBox : !1,
showAlerts : !1,
group : "servicesCovering" + d,
boxID : i
};
simcity.gGlobalUIHandler.mAvatarManagerHandler.AddSubscription(j);
j = e.FindControlByID(249587886);
this.mHoverWindowDefaultHeight || (this.mHoverWindowDefaultHeight = j.mHeight);
e.FindControlByID(248984626).SetText(f.mCities[i].name);
e = e.FindControlByID(249576388);
this.mVehicleHoverLayouts = [];
for (var k = this.mListOfBoxesYouCover[i].length, l = 0; l < k; l++) {
this.mVehicleHoverLayouts[l] = gUIManager.LoadAndCacheLayout("Layouts/Region/TokenVehicle_AvatarCoverage.js", e);
this.mVehicleHoverLayouts[l].FindControlByID(249576508).SetWindowImage(this.mListOfBoxesYouCover[i][l].icon);
this.mVehicleHoverLayouts[l].FindControlByID(249576511).SetText("" +
this.mListOfBoxesYouCover[i][l].count);
var m = this.mVehicleHoverLayouts[l].mHeight,
n = this.mVehicleHoverLayouts[l].mLeft,
p = this.mVehicleHoverLayouts[l].mTop;
this.mVehicleHoverLayouts[l].SetPosition(n, p + l * m)
}
j.SetHeight(this.mHoverWindowDefaultHeight + e.mHeight * (k - 1) + 10)
}
}
for (d = 0; d < h.length; d++)
if (i = h[d], this.mListOfBoxesCoveringYou[i] && this.mListOfBoxesCoveringYou[i].length) {
j = c[d];
e = a.FindControlByID(j);
e.SetVisibility(!0);
j = e.FindControlByID(249494366);
k = i == g;
simcity.gGlobalUIHandler.mAvatarManagerHandler.ClearSubscriptions("servicesReceiving" +
d);
j = {
playerID : f.mCities[i].creatorId,
layoutInfo : j,
isBoxClaimed : "true",
isMyBox : k,
isCurrentBox : !1,
showAlerts : !1,
group : "servicesReceiving" + d,
boxID : i
};
simcity.gGlobalUIHandler.mAvatarManagerHandler.AddSubscription(j);
j = e.FindControlByID(249587886);
this.mHoverWindowDefaultHeight || (this.mHoverWindowDefaultHeight = j.mHeight);
e.FindControlByID(248984626).SetText(f.mCities[i].name);
e = e.FindControlByID(249576388);
this.mVehicleHoverLayoutsReceive = [];
k = this.mListOfBoxesCoveringYou[i].length;
for (l = 0; l < k; l++)
this.mVehicleHoverLayoutsReceive[l] =
gUIManager.LoadAndCacheLayout("Layouts/Region/TokenVehicle_AvatarCoverage.js", e), this.mVehicleHoverLayoutsReceive[l].FindControlByID(249576508).SetWindowImage(this.mListOfBoxesCoveringYou[i][l].icon), this.mVehicleHoverLayoutsReceive[l].FindControlByID(249576511).SetText("" + this.mListOfBoxesCoveringYou[i][l].count), m = this.mVehicleHoverLayoutsReceive[l].mHeight, n = this.mVehicleHoverLayoutsReceive[l].mLeft, p = this.mVehicleHoverLayoutsReceive[l].mTop, this.mVehicleHoverLayoutsReceive[l].SetPosition(n, p +
l * m);
j.SetHeight(this.mHoverWindowDefaultHeight + e.mHeight * (k - 1) + 10)
}
};
simcity.cRegionTradeUIHandler.prototype.IsViewingClaimedBox = function () {
var a = !1,
b = simcity.gGlobalUIHandler.mRegionViewUIHandler,
c = b.mSelectedRegionViewItem;
c && (b.mRegionData.mBoxes[c.mRegionalBoxID] && "true" == b.mRegionData.mBoxes[c.mRegionalBoxID].isClaimed) && (a = this.IsConnectedToPlayingCityViaRoad(c.mRegionalBoxID));
return a
};
simcity.cRegionTradeUIHandler.prototype.IsConnectedToPlayingCityViaRoad = function (a) {
a = this.mRegionViewUI.GetDirectionalCityTradeData(a, simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayingBox.uid);
return null != a && 0 < a.transport.data.numberRoadConnections
};
simcity.cRegionTradeUIHandler.prototype.GetYourBoxID = function () {
return simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayingBox.uid
};
simcity.cRegionTradeUIHandler.prototype.IsViewingOwnBox = function () {
var a = null,
b = simcity.gGlobalUIHandler.mRegionViewUIHandler,
a = b.mSelectedRegionViewItem ? b.mSelectedRegionViewItem.mRegionalBoxID : b.mRegionData.mPlayingBox.uid;
return b.mRegionData.mPlayingBox.uid == a
};
simcity.cRegionTradeUIHandler.prototype.ServiceVehicleButtonPressed = function (a, b) {
if (b[1]) {
for (var c = 0; c < b[0]; ++c)
scrui.PostGameCommand(scrui.BuildCommand(["runUnitPlayerRule", b[1], simcity.kRuleIDSCPlayerRuleCycleResearch]));
switch (a) {
case "increment":
scrui.PostGameCommand(scrui.BuildCommand(["runUnitPlayerRule", b[1], simcity.kRuleIDSCPlayerRuleStartResearch]));
break;
case "decrement":
scrui.PostGameCommand(scrui.BuildCommand(["runUnitPlayerRule", b[1], simcity.kRuleIDSCPlayerRuleCancelResearch]))
}
}
};
simcity.cRegionTradeUIHandler.prototype.GetCityTokens = function (a, b) {
for (var c = this.mRegionViewUI.GetCityTradeData(a), d = [], e = [], f = 0, g = c.outgoing.length; f < g; f++) {
var h = c.outgoing[f];
-1 != h.tradeData[b + "TokenPending"] ? 1 == h.tradeData[b + "TokenPending"] && d.push(h.cityData) : h.tradeData[b + "Token"] && d.push(h.cityData)
}
f = 0;
for (g = c.incoming.length; f < g; f++)
h = c.incoming[f], -1 != h.tradeData[b + "TokenPending"] ? 1 == h.tradeData[b + "TokenPending"] && e.push(h.cityData) : h.tradeData[b + "Token"] && e.push(h.cityData);
return {
outgoing : d,
incoming : e
}
};
simcity.cRegionTradeUIHandler.prototype.CanShareToken = function (a, b) {
var c = this.mRegionViewUI.mRegionData.mPlayingBox.uid;
if (this.mRegionViewUI.IsConnectedCity(a)) {
var d = this.mRegionViewUI.GetCityTradeData(c) || null,
e = this.mRegionViewUI.GetCityTradeData(a) || null;
if (d && (e && this.IsTokenAvailable(c, a, b)) && !this.IsSharingToken(c, a, b))
return !0
} else if (c == a && (d = this.mRegionViewUI.GetRegionalConnectedCities(c), 0 < d.length && (a = d[0][0].uid, d = this.mRegionViewUI.GetCityTradeData(c) || null, e = this.mRegionViewUI.GetCityTradeData(a) || null,
d && (e && this.IsTokenAvailable(c, a, b)) && !this.IsSharingToken(c, a, b))))
return !0;
return !1
};
simcity.cRegionTradeUIHandler.prototype.IsTokenAvailable = function (a, b, c) {
var d,
e,
f,
g,
h = [scrui.BuildRequestQuery(["bins", simcity.kResourceIDGarbageServiceTokenCounter]), scrui.BuildRequestQuery(["bins", simcity.kResourceIDFireServiceTokenCounter]), scrui.BuildRequestQuery(["bins", simcity.kResourceIDPoliceServiceTokenCounter]), scrui.BuildRequestQuery(["bins", simcity.kResourceIDHealthServiceTokenCounter])];
scrui.RequestGameData(h, function (a) {
d = 0 < a[0].amount;
e = 0 < a[1].amount;
f = 0 < a[2].amount;
g = 0 < a[3].amount
});
h = this.mRegionViewUI.mRegionData.mCityTradeData[b];
b = null;
if (h && (a = h.connections[a]) && a.connectionData && a.connectionData.hasOwnProperty("t2"))
b = a.connectionData.t2.data;
if (b)
switch (c) {
case simcity.kRegionTradeTokenType_Fire:
return 0 < b.fireStations || e;
case simcity.kRegionTradeTokenType_Police:
return 0 < b.policeStations || f;
case simcity.kRegionTradeTokenType_Garbage:
return 0 < b.garbageBases || d;
case simcity.kRegionTradeTokenType_Health:
return 0 < b.hospitals || g
}
return !1
};
simcity.cRegionTradeUIHandler.prototype.IsSharingToken = function (a, b, c) {
if (this.mRegionViewUI.IsConnectedCity(b) && (b = this.mRegionViewUI.GetCityTradeData(b) || null))
for (var d = 0, e = b.incoming.length; d < e; d++)
if (b.incoming[d].cityData.uid == a) {
var f = b.incoming[d].tradeData;
switch (c) {
case simcity.kRegionTradeTokenType_Fire:
return 0 <= f.fireTokenPending ? f.fireTokenPending : f.fireToken;
case simcity.kRegionTradeTokenType_Police:
return 0 <= f.policeTokenPending ? f.policeTokenPending : f.policeToken;
case simcity.kRegionTradeTokenType_Garbage:
return 0 <=
f.garbageTokenPending ? f.garbageTokenPending : f.garbageToken;
case simcity.kRegionTradeTokenType_Health:
return 0 <= f.healthTokenPending ? f.healthTokenPending : f.healthToken
}
}
return !1
};
simcity.cRegionTradeUIHandler.prototype.UpdateUtilityTradePanel = function (a, b, c, d) {
var e = Object.keys(this.mRegionViewUI.mRegionData.mCityTradeData[b].connections),
f = [],
g = [];
switch (a) {
case "Power":
g = ["0x0eb384b5", "0x0eb384b6", "0x0eb384b7", "0x0eb384b8"];
f = ["0x0e731a2a", "0x0e731a2b", "0x0e731a2c"];
break;
case "Water":
g = ["0x0eb384bb", "0x0eb384bc", "0x0eb384bd", "0x0eb384be"];
f = ["0x0e731a3a", "0x0e731a3b", "0x0e731a3c"];
break;
case "Sewage":
g = ["0x0eb384cb", "0x0eb384cc", "0x0eb384cd", "0x0eb384ce"];
f = ["0x0e731a4a",
"0x0e731a4b", "0x0e731a4c"];
break;
default:
scrui.Assert(!1, "ShowTradeUI - Undefined utility type: " + a)
}
var h = 0,
i = 0,
j = 0,
k = [scrui.BuildRequestQuery(["bins", simcity.kResourceIDPowerImportExchangeRate]), scrui.BuildRequestQuery(["bins", simcity.kResourceIDWaterImportExchangeRate]), scrui.BuildRequestQuery(["bins", simcity.kResourceIDSewageTreatmentImportExchangeRate])];
scrui.RequestGameData(k, function (a) {
h = a[0].amount;
i = a[1].amount;
j = a[2].amount
});
c.DestroyChildren();
for (var k = 0, l = [], m = !1, n = this.GetViewingCity(),
p = 0, q = e.length; p < q; ++p) {
var o = e[p];
if (n == this.mRegionViewUI.mRegionData.mPlayingBox.uid || n == o) {
var r = this.mRegionViewUI.mRegionData.mCities[o];
if (r) {
var s = this.mRegionViewUI.GetDirectionalCityTradeData(b, o),
t = this.mRegionViewUI.GetDirectionalCityTradeData(o, b);
if (this.IsConnectedToPlayingCityViaRoad(o)) {
var u = 0,
v = 0,
x = 0,
w = 0,
A = 0,
z = 0,
y = null;
switch (a) {
case "Power":
u = s.power.data.tradePower;
A = this.mRegionViewUI.mRegionData.mPlayingBox.uid != b ? 0 : t.power.data.boughtPowerPerHour;
v = this.mRegionViewUI.mRegionData.mPlayingBox.uid ==
b ? 0 : t.power.data.tradePower;
y = t.power.visualizedTradeData.tradePower;
z = h;
break;
case "Water":
u = s.water.data.tradingWater;
A = this.mRegionViewUI.mRegionData.mPlayingBox.uid != b ? 0 : t.water.data.boughtWaterPerHour;
v = this.mRegionViewUI.mRegionData.mPlayingBox.uid == b ? 0 : t.water.data.tradingWater;
y = t.water.visualizedTradeData.tradeWater;
z = i;
break;
case "Sewage":
u = s.sewage.data.tradeSewage,
A = this.mRegionViewUI.mRegionData.mPlayingBox.uid != b ? 0 : t.sewage.data.boughtTreatmentCapacityPerHour,
v = this.mRegionViewUI.mRegionData.mPlayingBox.uid ==
b ? 0 : t.sewage.data.tradeSewage,
y = t.sewage.visualizedTradeData.tradeSewage,
z = j
}
x = this.mRegionViewUI.DetermineTradeData(u, v);
s = !0;
x && 0 != x.amount ? (0 < x.amount ? (w = 2, x = x.amount) : (m = !0, x = -x.amount), s = "Sewage" == a ? this.mRegionViewUI.DetermineTradeStatus(o, b, !m, y) : this.mRegionViewUI.DetermineTradeStatus(b, o, !m, y)) : x = 0;
if (0 < x && (b == this.mRegionViewUI.mRegionData.mPlayingBox.uid && m || s)) {
y = gUIManager.LoadAndCacheLayout("Layouts/Region/UtilityTradeItem.js", c);
t = y.FindControlByID(simcity.kUtilityPanelIDs.item.button);
if (m && b == this.mRegionViewUI.mRegionData.mPlayingBox.uid) {
if (o = this.mRegionViewUI.mRegionData.mConnectedUnits[o]) {
u = 0;
switch (a) {
case "Power":
u = 13;
break;
case "Water":
u = 14;
break;
case "Sewage":
u = 15
}
t.mUserData = {
"0" : u,
1 : o
};
t.SetVisibility(!0);
t.SetSelected(s);
t.SetEnabled(!0);
s || (w = 1)
}
} else
t.SetVisibility(!1);
l.push({
cityName : r.name,
tradeAmount : x,
tradeAmountUsed : A,
exchangeRate : z,
textIndex : w,
layout : y
});
y.FindControlByID(simcity.kUtilityPanelIDs.item.cityNameText).SetRawText(r.name);
y.FindControlByID(simcity.kUtilityPanelIDs.item.cityOwnerText).SetRawText(r.creator.screenName);
z = y.FindControlByID(simcity.kUtilityPanelIDs.item.cityOwnerIcon);
simcity.gGlobalUIHandler.mAvatarManagerHandler.ClearSubscriptions("tradeServicesHim" + r.creator.id);
simcity.gGlobalUIHandler.mAvatarManagerHandler.AddSubscription({
playerID : r.creator.id,
layoutInfo : z,
isBoxClaimed : "true",
isMyBox : r.creator.id == this.mRegionViewUI.mRegionData.mPlayingBox.creatorId,
isCurrentBox : !1,
showAlerts : !1,
group : "tradeServicesHim" + r.creator.id,
boxID : r.uid
});
y.FindControlByID(simcity.kUtilityPanelIDs.item.statusText).SetLocaleText(new scrui.cLocaleString("RegionView.json",
f[w], "Receiving Utility"));
y.SetPosition(0, y.mHeight * k);
k++
}
}
}
}
}
p = 0;
for (b = l.length; p < b; p++) {
c = l[p];
w = c.textIndex;
z = c.exchangeRate / 1E3;
e = c.tradeAmountUsed;
r = simcity.FormatDecimalPlace(e / (1E3 * z), 0);
f = {
number : c.tradeAmount,
exponent : ""
};
m = {
number : e,
exponent : ""
};
q = z;
switch (a) {
case "Power":
f = simcity.FormatLargeNumberForPower(c.tradeAmount);
m = simcity.FormatLargeNumberForPower(c.tradeAmountUsed);
break;
case "Water":
case "Sewage":
f = simcity.FormatLargeNumberForFluid(c.tradeAmount),
m = simcity.FormatLargeNumberForFluid(c.tradeAmountUsed)
}
1 ==
w ? c.layout.FindControlByID(simcity.kUtilityPanelIDs.item.statusText).UpdateLocaleText({
amount1 : f.number,
exponent1 : f.exponent,
amount2 : q
}) : 1 > e / (1E3 * z) ? c.layout.FindControlByID(simcity.kUtilityPanelIDs.item.statusText).UpdateLocaleText({
amount : m.number,
amount1 : f.number,
amount2 : 0,
exponent : m.exponent,
exponent1 : f.exponent
}) : c.layout.FindControlByID(simcity.kUtilityPanelIDs.item.statusText).UpdateLocaleText({
amount : m.number,
amount1 : f.number,
amount2 : r,
exponent : m.exponent,
exponent1 : f.exponent
});
c.layout.FindControlByID(simcity.kUtilityPanelIDs.item.receivingFromCityText).UpdateLocaleText({
city : c.cityName
})
}
d.SetVisibility(0 ==
k);
0 == k && (n == this.mRegionViewUI.mRegionData.mPlayingBox.uid ? d.SetLocaleText(new scrui.cLocaleString("RegionView.json", g[0], "NO TRADES")) : this.IsConnectedToPlayingCityViaRoad(n) ? this.IsViewingClaimedBox() ? d.SetLocaleText(new scrui.cLocaleString("RegionView.json", g[1], "NO TRADES"), {
city : this.mRegionViewUI.mRegionData.mCities[n].name
}) : d.SetLocaleText(new scrui.cLocaleString("RegionView.json", g[2], "NO TRADES")) : d.SetLocaleText(new scrui.cLocaleString("RegionView.json", g[3], "NO TRADES")))
};
simcity.cRegionTradeUIHandler.prototype.ShowTradeUI = function (a) {
var b = gUIManager.FindControlByID(simcity.kUtilityPanelIDs.myCity.rootPanel),
c = this.mRegionViewUI.mRegionData.mCities[this.mRegionViewUI.mRegionData.mPlayingBox.uid];
b && (b.FindControlByID(simcity.kUtilityPanelIDs.myCity.titleText).SetRawText(c.name), this.UpdateUtilityTradePanel(a, this.mRegionViewUI.mRegionData.mPlayingBox.uid, b.FindControlByID(simcity.kUtilityPanelIDs.myCity.tradePanel), b.FindControlByID(simcity.kUtilityPanelIDs.myCity.noTradeText)))
};
simcity.cRegionTradeUIHandler.prototype.ToggleUtilityTrade = function (a) {
for (var b = 0; b < a.mUserData[0]; ++b)
scrui.PostGameCommand(scrui.BuildCommand(["runUnitPlayerRule", a.mUserData[1], simcity.kRuleIDSCPlayerRuleCycleResearch]));
scrui.PostGameCommand(scrui.BuildCommand(["runUnitPlayerRule", a.mUserData[1], simcity.kRuleIDSCPlayerRuleStartResearch]));
a.SetSelected(!a.mIsSelected);
this.mRegionViewUI.mInitialTradeDataRequestCompleted = !1;
this.mRegionViewUI.mTimeSinceLastDataUpdate = simcity.kRegionViewDataUpdateTimeMS -
1E3;
this.mRegionViewUI.mShouldUpdateDataLayerContextPanel = !0
};
simcity.cRegionTradeUIHandler.prototype.ShowGreatWorksUI = function () {};
simcity.cRegionTradeUIHandler.prototype.ShowGiftingUI = function () {
for (var a = this.mRegionViewUI.mRegionData.mPlayingBox.uid, b = this.GetViewingCity(), c = simcity.kGiftingPanelIDs.resources.startingTabID, d = simcity.gGlobalUIHandler.mRegionViewUIHandler.mContextPanelObj, e = 0, f = simcity.kGiftableResourcesDataBindings.length; e < f; ++e) {
var g = simcity.kGiftableResourcesDataBindings[e];
if (g) {
var h = d.FindControlByID(c);
h && (h.FindControlByID(simcity.kGiftingPanelIDs.resources.tab.button).mUserData = e, h.FindControlByID(simcity.kGiftingPanelIDs.resources.tab.button).SetSelected(this.mResourceGiftingSelectedTab ==
e), h.FindControlByID(simcity.kGiftingPanelIDs.resources.tab.lightIcon).SetWindowImage(g.lightIcon), h.FindControlByID(simcity.kGiftingPanelIDs.resources.tab.darkIcon).SetWindowImage(g.darkIcon), g.text.LoadString(), h.FindControlByID(simcity.kGiftingPanelIDs.resources.tab.tooltipResourceText).SetRawText(g.text.GetText()));
++c
}
}
this.mResourceGiftingLegendControl = 0;
simcity.gGlobalUIHandler.mAvatarManagerHandler.ClearSubscriptions("giftingResourcesPlayingCity");
c = d.FindControlByID(243530043);
c = {
playerID : this.mRegionViewUI.mRegionData.mPlayingBox.creatorId,
layoutInfo : c,
isBoxClaimed : "true",
isMyBox : !0,
isCurrentBox : !1,
showAlerts : !1,
group : "giftingResourcesPlayingCity",
boxID : this.mRegionViewUI.mRegionData.mPlayingBox.uid
};
simcity.gGlobalUIHandler.mAvatarManagerHandler.AddSubscription(c);
d.FindControlByID(simcity.kGiftingPanelIDs.resources.viewingCity.avatarWindow).SetVisibility(a != b);
if (a != b) {
if (d.FindAnimationByID(simcity.kGiftingPanelIDs.resources.viewingCity.displayInfoAnimation).Start(scrui.cAnimation.kPlayForward), simcity.gGlobalUIHandler.mAvatarManagerHandler.ClearSubscriptions("giftingResourcesViewingCity"),
c = d.FindControlByID(243530044), this.mRegionViewUI.mRegionData.mBoxes[b] && (c = {
playerID : this.mRegionViewUI.mRegionData.mBoxes[b].creatorId,
layoutInfo : c,
isBoxClaimed : "true",
isMyBox : !1,
isCurrentBox : !1,
showAlerts : !1,
group : "giftingResourcesViewingCity",
boxID : this.mRegionViewUI.mRegionData.mBoxes[b].uid
}, simcity.gGlobalUIHandler.mAvatarManagerHandler.AddSubscription(c)), a = (a = this.mRegionViewUI.mRegionData.mCityTradeData[a]) && null != a.connections[b], d.FindControlByID(simcity.kGiftingPanelIDs.resources.unconnectedCity.window).SetVisibility(!a),
!a)
a = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData, c = "", c = a.mCities[b] ? a.mCities[b].name : scrui.ParseLocaleString(a.mCityDefaultData.cities[b].cityName).LoadAndGetTextSynchronous(), d.FindControlByID(simcity.kGiftingPanelIDs.resources.unconnectedCity.nameText).UpdateLocaleText({
cityName : c
}), d.FindAnimationByID(simcity.kGiftingPanelIDs.resources.unconnectedCity.displayInfoAnimation).Start(scrui.cAnimation.kPlayForward)
} else
d.FindControlByID(simcity.kGiftingPanelIDs.resources.unconnectedCity.window).SetVisibility(!1);
this.ShowGiftingTab(this.mResourceGiftingSelectedTab)
};
simcity.cRegionTradeUIHandler.prototype.ShowGiftingTab = function (a) {
if (this.mResourceGiftingLegendControl) {
var b = simcity.gGlobalUIHandler.mLayerUIHandler.mLegendLayout;
b && (b.FindControlByID(this.mResourceGiftingLegendControl).SetVisibility(!1), this.mResourceGiftingLegendControl = 0)
}
var c = simcity.gGlobalUIHandler.mRegionViewUIHandler.mContextPanelObj,
d = simcity.kGiftableResourcesDataBindings[a];
if (d) {
simcity.gGlobalUIHandler.mLayerUIHandler.ActivateLayer(d.layerID);
this.mResourceGiftingSelectedTab != a &&
(this.mResourceGiftingCurrentAmount = 0);
if (d.legendID && (b = simcity.gGlobalUIHandler.mLayerUIHandler.mLegendLayout))
this.mResourceGiftingLegendControl = d.legendID, b.FindControlByID(this.mResourceGiftingLegendControl).SetVisibility(!0);
this.mResourceGiftingSelectedTab = a;
a = this.GetViewingCity();
d.text.LoadString();
b = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData;
c.FindControlByID(simcity.kGiftingPanelIDs.resources.titleBarText).UpdateLocaleText({
resource : d.text.GetText()
});
c.FindControlByID(simcity.kGiftingPanelIDs.resources.playingCity.nameText).UpdateLocaleText({
cityName : b.mPlayingBox.name
});
var e = "",
e = b.mCities[a] ? b.mCities[a].name : scrui.ParseLocaleString(b.mCityDefaultData.cities[a].cityName).LoadAndGetTextSynchronous();
c.FindControlByID(simcity.kGiftingPanelIDs.resources.selectedCityTitleBarText).UpdateLocaleText({
resource : d.text.GetText(),
cityName : e
});
c.FindControlByID(simcity.kGiftingPanelIDs.resources.viewingCity.nameText).UpdateLocaleText({
cityName : e
});
c.FindControlByID(simcity.kGiftingPanelIDs.resources.sendButton).mUserData = d.scriptIndex;
this.UpdateGiftingTextForSelectedTab()
}
};
simcity.cRegionTradeUIHandler.prototype.UpdateGiftingTextForSelectedTab = function () {
var a = this.mRegionViewUI.mRegionData.mPlayingBox.uid,
b = this.GetViewingCity(),
c = simcity.gGlobalUIHandler.mRegionViewUIHandler.mContextPanelObj,
d = simcity.kGiftableResourcesDataBindings[this.mResourceGiftingSelectedTab];
if (d) {
var e = 0,
f = 0,
g = this.mRegionViewUI.mRegionData.mConnectedUnits[b];
g && d.enRouteQueries && (d.resourceID == simcity.kResourceIDSimoleons ? scrui.RequestGameData(d.enRouteQueries(g), function (a) {
e = a[0];
f = a[1]
}) :
scrui.RequestGameData(d.enRouteQueries(g), function (a) {
e = Math.max(0, a[0] + a[1]) * simcity.kRegionTradeResourceGiftAmount;
f = Math.max(0, a[2] + a[3]) * simcity.kRegionTradeResourceGiftAmount
}));
d.amountText.LoadString();
g = simcity.FormatLargeNumberByType(e, d.formatType);
g = d.amountText.GetText({
amount : g.number,
exponent : g.exponent
});
c.FindControlByID(simcity.kGiftingPanelIDs.resources.pendingText).UpdateLocaleText({
amount : g
});
if ((g = this.mRegionViewUI.mRegionData.mCityTradeData[a]) && g.giftableResources) {
var h = Math.max(0,
d.calculateTotal(g.giftableResources.data) - f),
i = Math.min(h, simcity.kRegionTradeResourceGiftMaxAmount);
if (this.mResourceGiftingMaxAmount) {
for (; this.mResourceGiftingCurrentAmount + simcity.kRegionTradeResourceGiftAmount <= i; )
this.mResourceGiftingCurrentAmount += simcity.kRegionTradeResourceGiftAmount;
this.mResourceGiftingMaxAmount = !1
} else {
for (; this.mResourceGiftingCurrentAmount > i; )
this.mResourceGiftingCurrentAmount -= simcity.kRegionTradeResourceGiftAmount;
this.mResourceGiftingCurrentAmount = Math.max(0, this.mResourceGiftingCurrentAmount)
}
var j =
simcity.kGiftingTooltips.SendingEnabled;
if (null == g.connections[b])
j = simcity.kGiftingTooltips.UnclaimedOrUnconnectedCity;
else if (0 == this.mResourceGiftingCurrentAmount && (j = simcity.kGiftingTooltips.EmptyGiftAmount), d.resourceID == simcity.kResourceIDSimoleons)
0 < f && (j = simcity.kGiftingTooltips.GiftInProgress), h = Math.max(0, d.calculateTotal(g.giftableResources.data));
c.FindControlByID(simcity.kGiftingPanelIDs.resources.sendButton).SetEnabled(j == simcity.kGiftingTooltips.SendingEnabled);
c.FindControlByID(simcity.kGiftingPanelIDs.resources.sendButton).SetTooltipLocaleText(j);
h = simcity.FormatLargeNumberByType(h, d.formatType);
c.FindControlByID(simcity.kGiftingPanelIDs.resources.playingCity.amountText).SetLocaleText(d.amountText, {
amount : h.number,
exponent : h.exponent
});
c.FindControlByID(simcity.kGiftingPanelIDs.resources.incrementButton).SetEnabled(this.mResourceGiftingCurrentAmount + simcity.kRegionTradeResourceGiftAmount <= i);
c.FindControlByID(simcity.kGiftingPanelIDs.resources.decrementButton).SetEnabled(0 < this.mResourceGiftingCurrentAmount);
h = simcity.FormatLargeNumberByType(this.mResourceGiftingCurrentAmount,
d.formatType);
c.FindControlByID(simcity.kGiftingPanelIDs.resources.sendAmountText).SetLocaleText(d.amountText, {
amount : h.number,
exponent : h.exponent
});
c.FindControlByID(simcity.kGiftingPanelIDs.resources.playingCity.truckIcon).SetVisibility(0 < g.giftableResources.data.numberOfTruckLots);
c.FindControlByID(simcity.kGiftingPanelIDs.resources.playingCity.railIcon).SetVisibility(0 < g.giftableResources.data.numberOfRailLots);
c.FindControlByID(simcity.kGiftingPanelIDs.resources.playingCity.boatIcon).SetVisibility(0 <
g.giftableResources.data.numberOfBoatLots)
}
if ((g = this.mRegionViewUI.mRegionData.mCityTradeData[b]) && g.giftableResources)
h = d.calculateTotal(g.giftableResources.data), h = simcity.FormatLargeNumberByType(h, d.formatType), c.FindControlByID(simcity.kGiftingPanelIDs.resources.viewingCity.amountText).SetLocaleText(d.amountText, {
amount : h.number,
exponent : h.exponent
}), c.FindControlByID(simcity.kGiftingPanelIDs.resources.viewingCity.truckIcon).SetVisibility(0 < g.giftableResources.data.numberOfTruckLots), c.FindControlByID(simcity.kGiftingPanelIDs.resources.viewingCity.railIcon).SetVisibility(0 <
g.giftableResources.data.numberOfRailLots), c.FindControlByID(simcity.kGiftingPanelIDs.resources.viewingCity.boatIcon).SetVisibility(0 < g.giftableResources.data.numberOfBoatLots)
}
b = simcity.kGiftingPanelIDs.resources.startingTabID;
c = simcity.gGlobalUIHandler.mRegionViewUIHandler.mContextPanelObj;
i = 0;
for (j = simcity.kGiftableResourcesDataBindings.length; i < j; ++i)
if (d = simcity.kGiftableResourcesDataBindings[i]) {
var k = c.FindControlByID(b);
if (k && (g = this.mRegionViewUI.mRegionData.mCityTradeData[a]) && g.giftableResources)
h =
Math.max(0, d.calculateTotal(g.giftableResources.data)), h = simcity.FormatLargeNumberByType(h, d.formatType), k.FindControlByID(simcity.kGiftingPanelIDs.resources.tab.tooltipAmountText).SetLocaleText(d.amountText, {
amount : h.number,
exponent : h.exponent
});
++b
}
};
simcity.cRegionTradeUIHandler.prototype.UpdateGiftingClickRun = function () {
this.mResourceGiftingLastTickPress > gUIManager.mTickCount - 8 ? this.mResourceGiftingCurrentClickAmount++ : this.mResourceGiftingCurrentClickAmount = 0;
this.mResourceGiftingLastTickPress = gUIManager.mTickCount
};
simcity.cRegionTradeUIHandler.prototype.SendResourceGift = function (a) {
var b = this.mRegionViewUI.mRegionData.mConnectedUnits[this.GetViewingCity()];
if (b) {
for (; 0 < this.mResourceGiftingCurrentAmount; ) {
for (var c = 0; c < a.mUserData; ++c)
scrui.PostGameCommand(scrui.BuildCommand(["runUnitPlayerRule", b, simcity.kRuleIDSCPlayerRuleCycleResearch]));
scrui.PostGameCommand(scrui.BuildCommand(["runUnitPlayerRule", b, simcity.kRuleIDSCPlayerRuleStartResearch]));
this.mResourceGiftingCurrentAmount -= simcity.kRegionTradeResourceGiftAmount
}
this.mResourceGiftingCurrentAmount =
0;
0 == this.mResourceGiftingSelectedTab && simcity.CreateUnit("Trading_SendSimoleonGift", b);
simcity.ShowTradeCompleteSurvey()
}
};
simcity.cRegionTradeUIHandler.prototype.Update = scrui.Client_ProfZone("RegionTradeUIUpdate", function (a) {
this.mRegionViewUI.mIsContextPanelActive && this.mRegionViewUI.mContextPanelDataBinding && (this.mRefreshTimer -= a, 0 >= this.mRefreshTimer && (this.mRefreshTimer = simcity.kRegionTradeRefreshTime, "gifting" == this.mRegionViewUI.mContextPanelDataBinding.tradeType ? this.UpdateGiftingTextForSelectedTab() : "token" == this.mRegionViewUI.mContextPanelDataBinding.tradeType && this.UpdateTokenUI()))
});
simcity.CategoryQuerying = {};
simcity.gCategoryQueryDataBindings = {};
simcity.gCategoryDLC = {};
simcity.SetAlertLevel = function (a, b) {
var c = simcity.gGlobalUIHandler.mToolPaletteUIHandler,
d = a.hasOwnProperty("parentCategoryID");
if (d) {
var e = simcity.gGlobalUIHandler.mCategoryQueryingHandler;
e.mParentCategoryAlertLevels[a.parentCategoryID] = e.mParentCategoryAlertLevels.hasOwnProperty(a.parentCategoryID) ? Math.max(e.mParentCategoryAlertLevels[a.parentCategoryID], b) : b
}
c.UpdateAlert(a.categoryID, b, d)
};
simcity.UpdateCategoryAlert = function (a, b, c, d) {
var e = simcity.gGlobalUIHandler.mAlertsUIHandler;
void 0 === d && (d = 0);
e.UpdateAlertForCategory(a, b, c, d)
};
simcity.UpdateContextualInfo = function (a, b, c, d, e) {
var f = void 0 !== b,
g = simcity.gGlobalUIHandler.mCategoryQueryingHandler;
a && a.categoryID && (g.mContextualInfo[a.categoryID] = void 0 !== e ? {
showInfo : f,
tableID : b,
headerTextID : c,
bodyTextID : d,
bodyTableID : e
}
: {
showInfo : f,
tableID : b,
headerTextID : c,
bodyTextID : d
})
};
simcity.UpdateGenericContextualInfo = function (a, b) {
simcity.GenericCategory.updateCategoryInfo(a, b)
};
simcity.GetCategoryInfo = function (a, b) {
return simcity.gGlobalUIHandler.mCategoryQueryingHandler.GetDataBinding(a, b)
};
simcity.ForceUpdateCategory = function (a, b) {
var c = simcity.gGlobalUIHandler.mCategoryQueryingHandler,
d = b ? c.GetParentCategoryFromCategory(a) : a;
if (d)
for (var e = Object.keys(c.mDataBindings), f = 0, g = e.length; f < g; ++f)
if (e[f] == d) {
c.mDataBindingIndex = f;
c.mDataBindingForceUpdateIndex = f;
break
}
c.mTimeSinceLastQuery = 1E3;
c.RunQueries()
};
simcity.GetDLCAlert = function (a, b, c, d) {
if (b !== simcity.kAlertLevelCritical && a.hasOwnProperty("DLCAlerts"))
for (var e = 0, f = a.DLCAlerts.length; e < f; ++e) {
var g = (0, a.DLCAlerts[e])(c, d),
b = Math.max(b, g);
if (b === simcity.kAlertLevelCritical)
break
}
return b
};
simcity.UpdateDLCCategoryInfo = function (a, b, c, d) {
if (a.hasOwnProperty("DLCCategoryInfo"))
for (var e = 0, f = a.DLCCategoryInfo.length; e < f; ++e) {
var g = (0, a.DLCCategoryInfo[e])(b, c, d);
if (g)
return simcity.UpdateContextualInfo(a, g[0], g[1], g[2]), !0
}
return !1
};
simcity.GetCategoryInfoLayout = function () {
var a = null,
b = simcity.gGlobalUIHandler.mToolPaletteUIHandler;
b.mDemolishPanelOpen ? a = b.mDemolishInfoContainer : b.mInfoLayout && (a = b.mInfoLayout);
return a
};
simcity.GetCategoryInfoControl = function (a, b) {
var c = null,
d = simcity.GetCategoryInfoLayout(a);
if (d) {
if (d.hasOwnProperty(b))
return d[b];
c = d.FindControlByID(b);
d[b] = c
}
return c
};
simcity.NumberFormat = {};
simcity.NumberFormat.kiloGUID = 2030840470;
simcity.NumberFormat.megaGUID = 2724999403;
simcity.NumberFormat.gigaGUID = 1070310141;
simcity.NumberFormat.teraGUID = 3140225643;
simcity.NumberFormat.Tons = 3209013327;
simcity.NumberFormat.Units = 1821810158;
simcity.NumberFormat.Crates = 1016488917;
simcity.NumberFormat.Fluids = 2997842382;
simcity.NumberFormat.Power = 2391494160;
simcity.NumberFormat.Barrels = 2833605196;
simcity.NumberFormat.Standard = 3025917178;
simcity.FormatLargeNumber = function (a) {
var b = 1;
0 > a && (b = -1);
var c = 0;
1E12 < b * a ? (a /= 1E12, c = simcity.NumberFormat.teraGUID) : 1E9 < b * a ? (a /= 1E9, c = simcity.NumberFormat.gigaGUID) : 1E6 < b * a ? (a /= 1E6, c = simcity.NumberFormat.megaGUID) : 1E3 < b * a && (a /= 1E3, c = simcity.NumberFormat.kiloGUID);
b = "";
0 != c && (b = scrui.TextFromLocaleProperty({
tableID : simcity.StringID.TableGlobalUI,
stringID : c
}));
a = Math.round(100 * a) / 100;
return {
number : a,
exponent : b,
exponentGUID : c
}
};
simcity.FormatDecimalPlace = function (a, b) {
0 <= b && (a = Math.round(a * Math.pow(10, b)) / Math.pow(10, b));
return a
};
simcity.FormatLargeNumberForPower = function (a) {
var b = simcity.NumberFormat.megaGUID,
c = scrui.TextFromLocaleProperty({
tableID : simcity.StringID.TableGlobalUI,
stringID : b
}),
a = simcity.FormatDecimalPlace(a / 1E3, 1);
return {
number : a,
exponent : c,
exponentGUID : b
}
};
simcity.FormatLargeNumberForFluid = function (a) {
var a = a / 1E3,
b = simcity.NumberFormat.kiloGUID,
c = scrui.TextFromLocaleProperty({
tableID : simcity.StringID.TableGlobalUI,
stringID : b
}),
a = simcity.FormatDecimalPlace(a, 1);
return {
number : a,
exponent : c,
exponentGUID : b
}
};
simcity.FormatLargeNumberForBarrels = function (a) {
a = simcity.FormatDecimalPlace(a / 10, 1);
return {
number : a,
exponent : "",
exponentGUID : 0
}
};
simcity.FormatLargeNumberForTons = function (a) {
a = simcity.FormatDecimalPlace(a / 1E3, 1);
return {
number : a,
exponent : "",
exponentGUID : 0
}
};
simcity.FormatLargeNumberForCrates = function (a) {
a = simcity.FormatDecimalPlace(a / 10, 1);
return {
number : a,
exponent : "",
exponentGUID : 0
}
};
simcity.FormatLargeNumberByType = function (a, b) {
switch (b) {
case simcity.NumberFormat.Power:
return simcity.FormatLargeNumberForPower(a);
case simcity.NumberFormat.Fluids:
return simcity.FormatLargeNumberForFluid(a);
case simcity.NumberFormat.Tons:
return simcity.FormatLargeNumberForTons(a);
case simcity.NumberFormat.Crates:
case simcity.NumberFormat.Units:
return simcity.FormatLargeNumberForCrates(a);
case simcity.NumberFormat.Barrels:
return simcity.FormatLargeNumberForBarrels(a);
case simcity.NumberFormat.Standard:
return simcity.FormatLargeNumber(a)
}
return {
number : a,
exponent : "",
exponentGUID : 0
}
};
simcity.IsFormattableType = function (a) {
switch (a) {
case simcity.NumberFormat.Power:
return !0;
case simcity.NumberFormat.Fluids:
return !0;
case simcity.NumberFormat.Tons:
return !0;
case simcity.NumberFormat.Crates:
case simcity.NumberFormat.Units:
return !0;
case simcity.NumberFormat.Barrels:
return !0;
case simcity.NumberFormat.Standard:
return !0
}
return !1
};
simcity.UpdateCategoryInfoMaintenaceCost = function (a, b) {
var c = simcity.GetCategoryInfoControl(a, 196874183);
c && (0 !== b && (b *= -1), c.UpdateLocaleText({
maintenance : b
}))
};
simcity.UpdateCategoryInfoWorkers = function (a, b, c) {
(a = simcity.GetCategoryInfoControl(a, 210950011)) && a.UpdateLocaleText({
amount : b,
capacity : c
})
};
simcity.UpdateCategoryInfoTextControl = function (a, b, c) {
(a = simcity.GetCategoryInfoControl(a, b)) && a.UpdateLocaleText(c)
};
simcity.UpdateCategoryInfoHorizontalSliderControl = function (a, b, c) {
if (a = simcity.GetCategoryInfoControl(a, b))
c = Math.max(0, Math.min(1, c)), a.SetPosition(a.mParentControl.mWidth * c - a.mWidth / 2, a.mTop)
};
simcity.UpdateCategoryInfoGauge = function (a, b, c) {
if (a = simcity.GetCategoryInfoControl(a, b))
c = Math.max(0, Math.min(1, c)), c = scrui.math.GetValueInRange(-90, 90, c), a.SetRotation(c)
};
simcity.UpdateCategoryInfoMeter = function (a, b, c, d) {
1 < c && (c = 1);
a = simcity.GetCategoryInfoControl(a, b);
d ? scrui.SetProgressBarHeight(a, c) : scrui.SetProgressBarWidth(a, c)
};
simcity.UpdateCategoryInfoAnimation = function (a, b, c, d) {
1 < c ? c = 1 : 0 > c && (c = 0);
a = a.FindAnimationByID(b);
b = a.GetDurationMS();
d ? a.PlayToTime(c * b) : a.JumpToTime(c * b)
};
simcity.cCategoryQueryingHandler = function () {
this.UIHandler = scrui.cUIHandler;
this.UIHandler();
this.mTimeSinceLastQuery = 0;
this.mDataBindings = {};
this.mDataBindingIndex = 0;
this.mDataBindingForceUpdateIndex = null;
this.mUpdateOpenCategory = !1;
this.mContextualInfo = {};
this.mParentCategoryAlertLevels = {};
this.mQueryInProgress = this.mShouldDisplayContextualInfo = !1
};
goog.inherits(simcity.cCategoryQueryingHandler, scrui.cUIHandler);
simcity.cCategoryQueryingHandler.prototype.Update = scrui.Client_ProfZone("cCategoryQueryingHandler.Update", function (a) {
this.mTimeSinceLastQuery += a;
this.RunQueries()
});
simcity.cCategoryQueryingHandler.prototype.Init = function () {
for (var a in simcity.gCategoryQueryDataBindings) {
var b = simcity.gCategoryQueryDataBindings[a];
b.hasOwnProperty("parentCategoryID") ? (this.mDataBindings.hasOwnProperty(b.parentCategoryID) || (this.mDataBindings[b.parentCategoryID] = []), this.mDataBindings[b.parentCategoryID].push(b)) : this.mDataBindings[b.categoryID] = [b]
}
for (a in simcity.gCategoryDLC) {
var c = simcity.gCategoryDLC[a],
b = scrui.BuildRequestQuery([simcity.kDataBinAmount, c.unlockBin]);
scrui.RequestGameData([b],
function (a) {
if (a[0]) {
var a = c.category,
b = a.alertQueries,
f;
for (f in c.alertQueries)
b[f] = c.alertQueries[f];
a.DLCAlerts.push(c.getAlerts);
b = a.categoryInfoQueries;
for (f in c.categoryInfoQueries)
b[f] = c.categoryInfoQueries[f];
a.DLCCategoryInfo.push(c.getCategoryInfo)
}
})
}
};
simcity.cCategoryQueryingHandler.prototype.PrintDebugInfo = function () {
simcity.DEBUG && scrui.DebugPrint("cCategoryQueryingHandler gCategoryQueryDataBindings = " + Object.keys(simcity.gCategoryQueryDataBindings).length + ", gCategoryDLC = " + Object.keys(simcity.gCategoryDLC).length + ", mDataBindings = " + Object.keys(this.mDataBindings).length)
};
simcity.cCategoryQueryingHandler.prototype.GetDataBinding = function (a, b) {
if (a) {
if (!b && this.mDataBindings.hasOwnProperty(a))
return this.mDataBindings[a][0];
for (var c in this.mDataBindings)
for (var d = this.mDataBindings[c], e = 0, f = d.length; e < f; ++e) {
var g = d[e];
if (g.categoryID === a || g.categoryID === b)
return g
}
}
return null
};
simcity.cCategoryQueryingHandler.prototype.GetParentCategoryFromCategory = function (a) {
if (a)
for (var b in this.mDataBindings) {
if (b === a)
return b;
for (var c = this.mDataBindings[b], d = 0, e = c.length; d < e; ++d)
if (c[d].categoryID === a)
return b
}
return null
};
simcity.AddCategoryInfoDataBinding = function (a, b, c, d) {
var e = a.categoryInfoQueries;
b.push(e);
simcity.AddSimpleQueries(c, e);
d.push(a)
};
simcity.cCategoryQueryingHandler.prototype.RunQueries = scrui.Client_ProfZone("cCategoryQueryingHandler.RunQueries", function () {
if (!this.mQueryInProgress) {
this.mQueryInProgress = !0;
var a = simcity.gGlobalUIHandler.mToolPaletteUIHandler,
b = a.GetParentAndSubCategoryIDs(),
c = b[0],
d = b[1];
null === c && (this.mDataBindingForceUpdateIndex = null);
b = Object.keys(this.mDataBindings);
if (null == this.mDataBindingForceUpdateIndex && simcity.IsMainTutorialInProgress())
this.mQueryInProgress = !1;
else {
var e = null !== this.mDataBindingForceUpdateIndex &&
(this.mUpdateOpenCategory || simcity.IsMainTutorialInProgress()) ? this.mDataBindingForceUpdateIndex : this.mDataBindingIndex++;
this.mUpdateOpenCategory = !this.mUpdateOpenCategory;
var f = this.mDataBindings[b[e]];
this.mDataBindingIndex === b.length && (this.mDataBindingIndex = 0);
var g = f.length;
this.mParentCategoryAlertLevels = {};
for (var b = [], e = [], h = this, i = !1, j = 0, k = f.length; j < k; ++j) {
var l = f[j];
if (1E3 < this.mTimeSinceLastQuery && (l.categoryID === c || l.categoryID === d))
i = !0;
simcity.AddSimpleQueries(b, l.alertQueries);
e.push(l.alertQueries)
}
i &&
(j = this.GetDataBinding(c, d), simcity.AddCategoryInfoDataBinding(j, e, b, f));
simcity.AddCategoryInfoDataBinding(simcity.GenericCategory, e, b, f);
simcity.RequestDataBindingData(b, f, e, !1, function (b) {
var e = b[b.length - 1];
h.mShouldDisplayContextualInfo = simcity.GenericCategory.shouldDisplayContextualInfo(e);
for (var j = 0; j < g; ++j) {
var l = f[j];
if (l.hasOwnProperty("categoryID")) {
l.updateAlerts(b[j], e);
if (i && (l.categoryID === c || l.categoryID === d)) {
l.updateCategoryInfo(b[j], b[b.length - 2], e);
simcity.IsMainTutorialInProgress() &&
(simcity.gGlobalUIHandler.mTutorialManager.mTutorialData && simcity.gGlobalUIHandler.mTutorialManager.mTutorialData.hasOwnProperty("updateCategoryInfo")) && simcity.gGlobalUIHandler.mTutorialManager.mTutorialData.updateCategoryInfo(l)
}
}
}
f.pop();
i && f.pop();
if (h.mTimeSinceLastQuery > 1E3)
h.mTimeSinceLastQuery = 0;
for (var k in h.mParentCategoryAlertLevels)
a.UpdateAlert(Number(k), h.mParentCategoryAlertLevels[k]);
h.mQueryInProgress = false
})
}
}
});
simcity.PopulateNonTokenAvatars = function (a, b, c, d) {
var e = simcity.GetCategoryInfoControl(a, 243964766),
f = simcity.GetCategoryInfoControl(a, 243964768),
g = "export" === d,
d = f,
h = e;
g && (d = e, h = f);
c && h.DestroyChildren();
for (var e = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData, f = e.mPlayingBox.uid, h = Object.keys(e.mConnectedUnits), c = {}, i = 0; i < h.length; i++) {
var j = e.mCityTradeData[f],
k = h[i];
g && (j = e.mCityTradeData[h[i]], k = f);
if (j && e.mCities[h[i]] && j.connections[k]) {
var j = e.mCities[h[i]],
l = e.mConnectedUnits[h[i]],
m = !1,
k = "0x0ec47f94",
n = {
name : j.creator.screenName
},
p = 40,
q = -43;
switch (b) {
case "power":
var o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeSwitchPower]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDPower])];
g && (o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradePowerUsedProfit])]);
scrui.RequestGameData(o, function (a) {
m = g ? a[0] : a[0] > 0 && a[1] > 0
});
n = {
name : j.creator.screenName
};
break;
case "water":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeSwitchWater]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDWater])];
g && (o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeWaterUsedProfit])]);
scrui.RequestGameData(o, function (a) {
m = g ? a[0] : a[0] > 0 && a[1] > 0
});
n = {
name : j.creator.screenName
};
break;
case "sewage":
o = [scrui.BuildRequestQuery([simcity.kDataUnits,
l, simcity.kDataBinAmount, simcity.kResourceIDTradeSwitchSewage])];
g && (o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeSewageExportAllowedUsedProfit])]);
scrui.RequestGameData(o, function (a) {
m = a[0]
});
n = {
name : j.creator.screenName
};
break;
case "fire":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDFireTruckR1]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDFireTruckR2]), scrui.BuildRequestQuery([simcity.kDataUnits,
l, simcity.kDataBinAmount, simcity.kResourceIDHazMatTruckR2]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDFireInspectorR2]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDFireHelicopterR2])];
g && (o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessFireTruckR1]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessFireTruckR2]),
scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessHazMatTruckR2]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessFireInspectorR2]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessFireHelicopterR2])]);
scrui.RequestGameData(o, function (a) {
m = a[0] + a[1] + a[2] + a[3] + a[4];
n = {
T1 : a[0],
T2 : a[1],
HazMat : a[2],
Inspector : a[3],
Helicopter : a[4]
}
});
k = "0x0e8be34b";
p = 90;
q =
-93;
break;
case "police":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDPoliceCarR1]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDPoliceDetectiveVanR2]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDPoliceOutreachVanR2]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDPoliceHelicopterR2])];
g && (o = [scrui.BuildRequestQuery([simcity.kDataUnits,
l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessPoliceCarR1]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessPoliceDetectiveVanR2]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessPoliceOutreachVanR2]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessPoliceHelicopterR2])]);
scrui.RequestGameData(o, function (a) {
m = a[0] + a[1] + a[2] + a[3];
n = {
PatrolCars : a[0],
Detective : a[1],
Outreach : a[2],
Helicopter : a[3]
}
});
k = "0x0e8bab35";
p = 75;
q = -78;
break;
case "health":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDAmbulanceR1]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDCommunityOutreachVanR2])];
g && (o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessAmbulanceR1]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount,
simcity.kResourceIDTradeExcessCommunityOutreachVanR2])]);
scrui.RequestGameData(o, function (a) {
m = a[0] + a[1];
n = {
Ambulance : a[0],
Outreach : a[1]
}
});
k = "0x0e8be34c";
p = 45;
q = -48;
break;
case "garbage":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDGarbageTruckR1]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDRecyclingTruckR2])];
g && (o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessGarbageTruckR1]),
scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessRecyclingTruckR2])]);
scrui.RequestGameData(o, function (a) {
m = a[0] + a[1];
n = {
GarbageTrucks : a[0],
RecyclingTrucks : a[1]
};
if (simcity.IsMainTutorialInProgress() && !g) {
m = 1;
n = {
GarbageTrucks : 1,
RecyclingTrucks : 0
}
}
});
k = "0x0e8be34d";
p = 45;
q = -48;
break;
case "education":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDStudentE2]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount,
simcity.kResourceIDStudentE3])];
g && (o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessStudentE2]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTradeExcessStudentE3])]);
scrui.RequestGameData(o, function (a) {
m = a[0] + a[1];
n = {
studentsE2 : a[0],
studentsE3 : a[1]
}
});
k = "0x0ee02d54";
p = 45;
q = -48;
break;
case "mining":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDAlloy]), scrui.BuildRequestQuery([simcity.kDataUnits,
l, simcity.kDataBinAmount, simcity.kResourceIDCoal]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDMetal]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDOreRaw])];
g && (o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDAlloyTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDCoalTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits,
l, simcity.kDataBinAmount, simcity.kResourceIDMetalTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDOreRawTransportToSend])]);
scrui.RequestGameData(o, function (a) {
var b = g ? simcity.kRegionTradeResourceGiftAmount : 1;
m = a[0] + a[1] + a[2] + a[3];
n = {
Alloy : simcity.FormatLargeNumberByType(a[0] * b, simcity.NumberFormat.Tons).number,
Coal : simcity.FormatLargeNumberByType(a[1] * b, simcity.NumberFormat.Tons).number,
Metal : simcity.FormatLargeNumberByType(a[2] * b, simcity.NumberFormat.Tons).number,
OreRaw : simcity.FormatLargeNumberByType(a[3] * b, simcity.NumberFormat.Tons).number
}
});
k = "0x0ee58e9f";
p = 90;
q = -93;
break;
case "petroleum":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDFuel]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDOilCrude]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDPlastic])];
g && (o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount,
simcity.kResourceIDFuelTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDOilCrudeTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDPlasticTransportToSend])]);
scrui.RequestGameData(o, function (a) {
var b = g ? simcity.kRegionTradeResourceGiftAmount : 1;
m = a[0] + a[1] + a[2];
n = {
Fuel : simcity.FormatLargeNumberByType(a[0] * b, simcity.NumberFormat.Barrels).number,
OilCrude : simcity.FormatLargeNumberByType(a[1] *
b, simcity.NumberFormat.Barrels).number,
Plastic : simcity.FormatLargeNumberByType(a[2] * b, simcity.NumberFormat.Crates).number
}
});
k = "0x0ee58ea0";
p = 75;
q = -78;
break;
case "electronics":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDAlloy]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDComputer]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDElectronics]), scrui.BuildRequestQuery([simcity.kDataUnits,
l, simcity.kDataBinAmount, simcity.kResourceIDPlastic]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTelevision])];
g && (o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDAlloyTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDComputerTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDElectronicsTransportToSend]),
scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDPlasticTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTelevisionTransportToSend])]);
scrui.RequestGameData(o, function (a) {
var b = g ? simcity.kRegionTradeResourceGiftAmount : 1;
m = a[0] + a[1] + a[2] + a[3] + a[4];
n = {
Alloy : simcity.FormatLargeNumberByType(a[0] * b, simcity.NumberFormat.Tons).number,
Computer : simcity.FormatLargeNumberByType(a[1] * b, simcity.NumberFormat.Crates).number,
Electronics : simcity.FormatLargeNumberByType(a[2] * b, simcity.NumberFormat.Crates).number,
Plastic : simcity.FormatLargeNumberByType(a[3] * b, simcity.NumberFormat.Crates).number,
Television : simcity.FormatLargeNumberByType(a[4] * b, simcity.NumberFormat.Crates).number
}
});
k = "0x0ee58ea1";
p = 105;
q = -108;
break;
case "trade":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDAlloy]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDCoal]), scrui.BuildRequestQuery([simcity.kDataUnits,
l, simcity.kDataBinAmount, simcity.kResourceIDComputer]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDElectronics]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDFuel]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDMetal]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDOilCrude]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount,
simcity.kResourceIDOreRaw]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDPlastic]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTelevision])];
g && (o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDAlloyTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDCoalTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l,
simcity.kDataBinAmount, simcity.kResourceIDComputerTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDElectronicsTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDFuelTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDMetalTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDOilCrudeTransportToSend]),
scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDOreRawTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDPlasticTransportToSend]), scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTelevisionTransportToSend])]);
scrui.RequestGameData(o, function (a) {
var b = g ? simcity.kRegionTradeResourceGiftAmount : 1;
m = a[0] + a[1] + a[2] + a[3] + a[4] + a[5] + a[6] + a[7] + a[8] + a[9];
n = {
Alloy : simcity.FormatLargeNumberByType(a[0] *
b, simcity.NumberFormat.Tons).number,
Coal : simcity.FormatLargeNumberByType(a[1] * b, simcity.NumberFormat.Tons).number,
Computer : simcity.FormatLargeNumberByType(a[2] * b, simcity.NumberFormat.Crates).number,
Electronics : simcity.FormatLargeNumberByType(a[3] * b, simcity.NumberFormat.Crates).number,
Fuel : simcity.FormatLargeNumberByType(a[4] * b, simcity.NumberFormat.Barrels).number,
Metal : simcity.FormatLargeNumberByType(a[5] * b, simcity.NumberFormat.Tons).number,
OilCrude : simcity.FormatLargeNumberByType(a[6] * b, simcity.NumberFormat.Barrels).number,
OreRaw : simcity.FormatLargeNumberByType(a[7] * b, simcity.NumberFormat.Tons).number,
Plastic : simcity.FormatLargeNumberByType(a[8] * b, simcity.NumberFormat.Crates).number,
Television : simcity.FormatLargeNumberByType(a[9] * b, simcity.NumberFormat.Crates).number
}
});
k = "0x0ee58e9e";
p = 180;
q = -183;
break;
case "bus":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDBusR2Stop]), scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDNumberOfBusT2Stops])];
scrui.RequestGameData(o,
function (a) {
m = a[0] > 0 && a[1] > 0
});
break;
case "train":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDTrainT2Stop]), scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDNumberOfTrainT2Stops])];
scrui.RequestGameData(o, function (a) {
m = a[0] > 0 && a[1] > 0
});
break;
case "boat":
o = [scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDFerryT1Stop]), scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDNumberOfFerryT1Stops]),
scrui.BuildRequestQuery([simcity.kDataUnits, l, simcity.kDataBinAmount, simcity.kResourceIDCruiseShipT2Stop]), scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDNumberOfCruiseShipT2Stops])],
scrui.RequestGameData(o, function (a) {
m = a[0] > 0 && a[1] > 0 || a[2] > 0 && a[3] > 0
})
}
0 < m && (l = simcity.gUIToolbox.GetAvatarUrl(j.creator.screenName), c[j.uid] = {
img : l,
token : n,
text : k,
cityName : j.name,
height : p,
top : q
})
}
}
e = [];
e = g || "power" === b || "water" === b || "sewage" === b ? [simcity.GetCategoryInfoControl(a, 251827585), simcity.GetCategoryInfoControl(a,
251827586), simcity.GetCategoryInfoControl(a, 251827587), simcity.GetCategoryInfoControl(a, 251827588), simcity.GetCategoryInfoControl(a, 251827589), simcity.GetCategoryInfoControl(a, 251827590)] : [simcity.GetCategoryInfoControl(a, 251828641), simcity.GetCategoryInfoControl(a, 251828642), simcity.GetCategoryInfoControl(a, 251828643), simcity.GetCategoryInfoControl(a, 251828644), simcity.GetCategoryInfoControl(a, 251828645), simcity.GetCategoryInfoControl(a, 251828646)];
simcity.DrawAvatars(e, d, c, a)
};
simcity.DrawAvatars = function (a, b, c) {
for (var d = 0, e = [], f = 0; f < a.length; f++)
if (a[f]) {
var g = a[f].GetAbsolutePosition(),
h = b.ConvertAbsoluteToLocalSpace(g[0], g[1], h);
e.push([h[0] - a[f].mWidth / 2 - 1, h[1] - a[f].mHeight])
}
if (b.hasOwnProperty("mChildren") && 0 < b.mChildren.length)
for (a = 0; a < b.mChildren.length; )
if (f = b.mChildren[a], c[f.mUserData])
delete c[f.mUserData], e[d] ? f.SetPosition(e[d][0], e[d][1]) : f.SetPosition(d * f.mWidth, f.mTop), d++, a++;
else if (f.DestroyControl(), !b.mChildren)
break;
a = Object.keys(c);
for (f = 0; f < a.length; f++) {
g =
gUIManager.LoadAndCacheLayout("Layouts/Palette/CategoryInfo/CoveredByAvatar.js", b);
e[d] ? g.SetPosition(e[d][0], e[d][1]) : g.SetPosition(d * g.mWidth, 0);
d++;
g.mUserData = a[f];
var h = c[a[f]].img,
i = g.FindControlByID(237907905);
simcity.gUIToolbox.SetAvatarByUrl(i, h);
g.FindControlByID(242832082).SetText(c[a[f]].cityName);
h = g.FindControlByID(244034683);
i = new scrui.cLocaleString("PaletteInfoPanel.json", c[a[f]].text, "Mayor Name");
h.SetLocaleText(i, c[a[f]].token);
g = g.mExposedProperties[0].mControl;
g.SetPosition(g.mLeft,
c[a[f]].top, g.mWidth, h.mTextElement.scrollHeight + 25)
}
};
simcity.databindings = {};
simcity.databindings.DataBindingsAgentQuery = {};
simcity.AgentQueryItems = {};
simcity.AgentQueryItems.kAgentQueryScreenPosition = {
dynamic : !0,
allowNullResults : !0,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypePosition,
queries : function () {
return {
screenPosition : [simcity.kDataAgent, simcity.kDataScreenPosition]
}
}
};
simcity.AgentQueryItems.kAgentQueryShowGoToSource = {
dynamic : !0,
allowNullResults : !0,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeShowGoToSource,
queries : function () {
return {
showGoToSource : [simcity.kDataAgent, simcity.kDataShowGoToSource]
}
},
update : function (a) {
return a.showGoToSource
}
};
simcity.AgentQueryItems.kAgentQueryRegionalBoxUID = {
dynamic : !0,
allowNullResults : !0,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeRegionalBoxUID,
queries : function () {
return {
regionalBoxUID : [simcity.kDataAgent, simcity.kDataBinAmount, simcity.kResourceRegionalBoxUniqueID]
}
},
update : function (a) {
return a.regionalBoxUID
}
};
simcity.AgentQueryItems.kAgentQuerySimName = {
dynamic : !1,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeName,
queries : function () {
return {
simFirstName : [simcity.kDataAgent, simcity.kDataSimFirstName],
simLastName : [simcity.kDataAgent, simcity.kDataSimLastName]
}
},
update : function (a) {
return {
firstName : a.simFirstName,
lastName : a.simLastName
}
}
};
simcity.AgentQueryItems.kAgentQueryTransportName = {
dynamic : !1,
allowNullResults : !0,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeName,
queries : function () {
return {
transportName : [simcity.kDataAgent, simcity.kDataTransportName],
regionalBoxUID : [simcity.kDataAgent, simcity.kDataBinAmount, simcity.kResourceRegionalBoxUniqueID]
}
},
update : function (a) {
if (0 < a.regionalBoxUID) {
var b = scrui.TextFromLocaleProperty({
tableID : "Units.json",
stringID : "0x0e02cac1"
});
simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCities[a.regionalBoxUID] &&
(b = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCities[a.regionalBoxUID].name);
return {
vehicleName : a.transportName,
cityName : b
}
}
return {
vehicleName : a.transportName
}
}
};
simcity.AgentQueryItems.kAgentQueryGender = {
dynamic : !1,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeGender,
queries : function () {
return {
gender : [simcity.kDataAgent, simcity.kDataGender]
}
},
update : function (a) {
return a.gender
}
};
simcity.AgentQueryItems.kAgentQueryDestination = {
dynamic : !0,
allowNullResults : !0,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeDestination,
color : null,
queries : function () {
return {
destination : [simcity.kDataAgent, simcity.kDataDestination]
}
},
update : function (a) {
return a.destination
}
};
simcity.AgentQueryItems.kAgentQuerySourceName = {
dynamic : !0,
allowNullResults : !0,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeSource,
queries : function () {
return {
sourceName : [simcity.kDataAgent, simcity.kDataSourceName],
regionalBoxUID : [simcity.kDataAgent, simcity.kDataSourceUnitRegionalBoxUniqueID]
}
},
update : function (a) {
return 0 < a.regionalBoxUID && simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCities[a.regionalBoxUID] ? simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCities[a.regionalBoxUID].name :
a.sourceName ? scrui.TextFromLocaleProperty(a.sourceName) : ""
}
};
simcity.AgentQueryItems.kAgentQueryHappiness = {
dynamic : !0,
iconPath : "Graphics/Common/Icons/icn_pledge_demo_pro_happiness.png",
localeString : new scrui.cLocaleString("AgentQuery.json", "0x0e3097f4", "Feeling Happy!"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeSimStatus,
queries : function () {
return {
happiness : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDHappinessToken]
}
},
update : function (a) {
return 0 < a.happiness.amount ? this.localeString : null
}
};
simcity.AgentQueryItems.kAgentQueryMoney = {
dynamic : !0,
iconPath : "ico_Alert_Profitability.png",
localeStringHome : new scrui.cLocaleString("AgentQuery.json", "0x0e3097f8", "Have Simoleons."),
localeStringWork : new scrui.cLocaleString("AgentQuery.json", "0x0e40a45d", "Just got paid."),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeSimStatus,
queries : function () {
return {
money : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDMoneyToken],
sourceBuildingType : [simcity.kDataAgent, "sourceBuildingType"]
}
},
update : function (a) {
return 0 <
a.money.amount ? "0x617c1f67" == a.sourceBuildingType || "0x1c8b3668" == a.sourceBuildingType ? this.localeStringWork : this.localeStringHome : null
}
};
simcity.AgentQueryItems.kAgentQueryKnowledgeToken = {
dynamic : !0,
iconPath : "Graphics/Common/Icons/icn_category_education.png",
localeString : new scrui.cLocaleString("AgentQuery.json", "0x0e8e6b2f", "Is smart."),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeSimStatus,
queries : function () {
return {
knowledgeToken : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDKnowledgeToken]
}
},
update : function (a) {
return 0 < a.knowledgeToken.amount ? this.localeString : null
}
};
simcity.AgentQueryItems.kAgentQuerySickness = {
dynamic : !0,
iconPath : "Graphics/Common/Icons/icn_happiness_health_sick.png",
localeString : new scrui.cLocaleString("AgentQuery.json", "0x0e3097fc", "Feeling sick."),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeSimStatus,
queries : function () {
return {
sicknessW1 : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDSickW1],
sicknessW2 : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDSickW2],
sicknessW3 : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDSickW2]
}
},
update : function (a) {
return 0 < a.sicknessW1.amount || 0 < a.sicknessW2.amount || 0 < a.sicknessW3.amount ? this.localeString : null
}
};
simcity.AgentQueryItems.kAgentQueryFailedToFindSink = {
dynamic : !0,
allowNullResults : !0,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeDestination,
color : "red",
queries : function () {
return {
failText : [simcity.kDataAgent, simcity.kDataFailToFindSink]
}
},
update : function (a) {
return a.failText
}
};
simcity.AgentQueryItems.kAgentQueryStuckInTraffic = {
dynamic : !0,
allowNullResults : !0,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeDestination,
localeString : new scrui.cLocaleString("AgentQuery.json", "0x0e41f8d9", "Stuck in traffic"),
color : "red",
queries : function () {
return {
isStuckInTraffic : [simcity.kDataAgent, "stuckInTraffic"]
}
},
update : function (a) {
if (a.isStuckInTraffic) {
var b = this,
c;
b.localeString.LoadString(function () {
c = b.localeString.GetText()
});
return c
}
return ""
}
};
simcity.AgentQueryItems.kAgentQueryCoal = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0xcec5890c", "Coal"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Tons,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDCoal]
}
}
};
simcity.AgentQueryItems.kAgentQueryOreRaw = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x96cf3b07", "Ore"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Tons,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDOreRaw]
}
}
};
simcity.AgentQueryItems.kAgentQueryMetal = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x9375c65e", "Metal"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Tons,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDMetal]
}
}
};
simcity.AgentQueryItems.kAgentQueryAlloy = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x1e16cfe6", "Alloy"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Tons,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDAlloy]
}
}
};
simcity.AgentQueryItems.kAgentQueryFuel = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x9ea37dd1", "Fuel"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Barrels,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDFuel]
}
}
};
simcity.AgentQueryItems.kAgentQueryPlastic = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x27638c5b", "Plastic"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Units,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDPlastic]
}
}
};
simcity.AgentQueryItems.kAgentQueryElectronics = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x0dfc0e9f", "Electronics"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Units,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDElectronics]
}
}
};
simcity.AgentQueryItems.kAgentQueryComputer = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x8da94c6a", "Computer"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Units,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDComputer]
}
}
};
simcity.AgentQueryItems.kAgentQueryTelevision = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0xb8b5dd59", "Television"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Units,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDTelevision]
}
}
};
simcity.AgentQueryItems.kAgentQueryOilCrude = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0xbf75dc04", "Oil"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Barrels,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDOilCrude]
}
}
};
simcity.AgentQueryItems.kAgentQuerySimoleons = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x0ee2d5d8", "Simoleons"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Units,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDSimoleons]
}
}
};
simcity.AgentQueryItems.kAgentQueryGarbage = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x0e30d0a2", "Garbage"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Tons,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDGarbage]
}
}
};
simcity.AgentQueryItems.kAgentQueryRecycling = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x0e388ece", "Recyclables"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Tons,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDRecyclables]
}
}
};
simcity.AgentQueryItems.kAgentQueryBus = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x0e62eb01", "Passengers"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Standard,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDBusPassenger]
}
}
};
simcity.AgentQueryItems.kAgentQuerySchoolBus = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x0e62eb01", "Passengers"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Standard,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDSchoolBusPassenger]
}
}
};
simcity.AgentQueryItems.kAgentQueryCoach = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x0e62eb01", "Passengers"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Standard,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDCoachPassenger]
}
}
};
simcity.AgentQueryItems.kAgentQueryLightTrain = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x0e62eb01", "Passengers"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Standard,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDLightTrainPassenger]
}
}
};
simcity.AgentQueryItems.kAgentQueryTrain = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x0e62eb01", "Passengers"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Standard,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDTrainPassenger]
}
}
};
simcity.AgentQueryItems.kAgentQueryFerry = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x0e62eb01", "Passengers"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Standard,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDFerryPassenger]
}
}
};
simcity.AgentQueryItems.kAgentQueryCruiseShip = {
dynamic : !0,
localeString : new scrui.cLocaleString("Resources.json", "0x0e62eb01", "Passengers"),
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeResourceBin,
formatType : simcity.NumberFormat.Standard,
queries : function () {
return {
resource : [simcity.kDataAgent, simcity.kDataBins, simcity.kResourceIDCruiseShipPassenger]
}
}
};
simcity.kSharedAgentQueryDataBindings = [simcity.AgentQueryItems.kAgentQueryScreenPosition, simcity.AgentQueryItems.kAgentQueryShowGoToSource, simcity.AgentQueryItems.kAgentQueryRegionalBoxUID];
simcity.kSharedAgentQueryTimedRefreshDataBindings = [simcity.AgentQueryItems.kAgentQueryDestination, simcity.AgentQueryItems.kAgentQuerySourceName];
simcity.AgentQueryDataBindings = {};
simcity.AgentQueryDataBindings[scrui.IDFromName("Default")] = [simcity.AgentQueryItems.kAgentQueryTransportName];
simcity.AgentQueryDataBindings[scrui.IDFromName("Sim")] = [simcity.AgentQueryItems.kAgentQueryGender, simcity.AgentQueryItems.kAgentQuerySimName, simcity.AgentQueryItems.kAgentQueryMoney, simcity.AgentQueryItems.kAgentQueryHappiness, simcity.AgentQueryItems.kAgentQuerySickness, simcity.AgentQueryItems.kAgentQueryFailedToFindSink];
simcity.AgentQueryDataBindings[scrui.IDFromName("SimCar")] = [simcity.AgentQueryItems.kAgentQueryGender, simcity.AgentQueryItems.kAgentQuerySimName, simcity.AgentQueryItems.kAgentQueryMoney, simcity.AgentQueryItems.kAgentQueryHappiness, simcity.AgentQueryItems.kAgentQuerySickness, simcity.AgentQueryItems.kAgentQueryFailedToFindSink];
simcity.AgentQueryDataBindings[scrui.IDFromName("SimNoTokens")] = [simcity.AgentQueryItems.kAgentQueryGender, simcity.AgentQueryItems.kAgentQuerySimName];
simcity.AgentQueryDataBindings[scrui.IDFromName("Kid")] = [simcity.AgentQueryItems.kAgentQueryGender, simcity.AgentQueryItems.kAgentQuerySimName, simcity.AgentQueryItems.kAgentQueryKnowledgeToken];
simcity.AgentQueryDataBindings[scrui.IDFromName("SimTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName];
simcity.AgentQueryDataBindings[scrui.IDFromName("LightTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName];
simcity.AgentQueryDataBindings[scrui.IDFromName("HeavyTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName];
simcity.AgentQueryDataBindings[scrui.IDFromName("IndustrialTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName];
simcity.AgentQueryDataBindings[scrui.IDFromName("FreightTrain")] = [simcity.AgentQueryItems.kAgentQueryTransportName];
simcity.AgentQueryDataBindings[scrui.IDFromName("CoalTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryCoal];
simcity.AgentQueryDataBindings[scrui.IDFromName("OreTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryOreRaw];
simcity.AgentQueryDataBindings[scrui.IDFromName("MetalTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryMetal];
simcity.AgentQueryDataBindings[scrui.IDFromName("AlloyTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryAlloy];
simcity.AgentQueryDataBindings[scrui.IDFromName("FuelTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryFuel];
simcity.AgentQueryDataBindings[scrui.IDFromName("PlasticTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryPlastic];
simcity.AgentQueryDataBindings[scrui.IDFromName("ElectronicsTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryElectronics];
simcity.AgentQueryDataBindings[scrui.IDFromName("ComputerTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryComputer];
simcity.AgentQueryDataBindings[scrui.IDFromName("TelevisionTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryTelevision];
simcity.AgentQueryDataBindings[scrui.IDFromName("OilTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryOilCrude];
simcity.AgentQueryDataBindings[scrui.IDFromName("SimoleonsTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQuerySimoleons];
simcity.AgentQueryDataBindings[scrui.IDFromName("GarbageTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryGarbage];
simcity.AgentQueryDataBindings[scrui.IDFromName("RecyclingTruck")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryRecycling];
simcity.AgentQueryDataBindings[scrui.IDFromName("Bus")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryBus];
simcity.AgentQueryDataBindings[scrui.IDFromName("SchoolBus")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQuerySchoolBus];
simcity.AgentQueryDataBindings[scrui.IDFromName("Coach")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryCoach];
simcity.AgentQueryDataBindings[scrui.IDFromName("LightTrain")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryLightTrain];
simcity.AgentQueryDataBindings[scrui.IDFromName("Train")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryTrain];
simcity.AgentQueryDataBindings[scrui.IDFromName("Ferry")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryFerry];
simcity.AgentQueryDataBindings[scrui.IDFromName("CruiseShip")] = [simcity.AgentQueryItems.kAgentQueryTransportName, simcity.AgentQueryItems.kAgentQueryCruiseShip];
simcity.AgentQueryDataBindings[scrui.IDFromName("Boat")] = [simcity.AgentQueryItems.kAgentQueryTransportName];
simcity.ActorQueryItems = {};
simcity.ActorQueryItems.kActorQueryScreenPosition = {
dynamic : !0,
allowNullResults : !0,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypePosition,
queries : function () {
return {
screenPosition : [simcity.kDataActor, simcity.kDataScreenPosition]
}
}
};
simcity.ActorQueryItems.kActorQueryRegionalBoxUID = {
dynamic : !0,
allowNullResults : !0,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeRegionalBoxUID,
queries : function () {
return {
regionalBoxUID : [simcity.kDataAgent, simcity.kDataBinAmount, simcity.kResourceRegionalBoxUniqueID]
}
},
update : function (a) {
return a.regionalBoxUID
}
};
simcity.ActorQueryItems.kActorQueryGender = {
dynamic : !1,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeGender,
queries : function () {
return {
gender : [simcity.kDataActor, simcity.kDataGender]
}
},
update : function (a) {
return a.gender
}
};
simcity.ActorQueryItems.kActorQuerySimName = {
dynamic : !1,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeName,
queries : function () {
return {
simFirstName : [simcity.kDataActor, simcity.kDataSimFirstName],
simLastName : [simcity.kDataActor, simcity.kDataSimLastName]
}
},
update : function (a) {
return {
firstName : a.simFirstName,
lastName : a.simLastName
}
}
};
simcity.ActorQueryItems.kActorQueryDestination = {
dynamic : !0,
allowNullResults : !0,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeDestination,
color : null,
queries : function () {
return {
destination : [simcity.kDataActor, simcity.kDataDestination]
}
},
update : function (a) {
return a.destination
}
};
simcity.ActorQueryItems.kActorQuerySourceName = {
dynamic : !0,
allowNullResults : !0,
bindingType : simcity.cAgentQueryUIHandler.kBindingTypeSource,
queries : function () {
return {
sourceName : [simcity.kDataActor, simcity.kDataSourceName]
}
},
update : function (a) {
return a.sourceName ? scrui.TextFromLocaleProperty(a.sourceName) : ""
}
};
simcity.kSharedActorQueryDataBindings = [simcity.ActorQueryItems.kActorQueryScreenPosition];
simcity.kSharedActorQueryTimedRefreshDataBindings = [simcity.ActorQueryItems.kActorQueryGender, simcity.ActorQueryItems.kActorQuerySimName, simcity.ActorQueryItems.kActorQueryDestination, simcity.ActorQueryItems.kActorQuerySourceName];
simcity.EventTriggering = {};
simcity.kLowSBTestingRate = 3;
simcity.cEventTriggersManager = function () {
this.UIHandler = scrui.cUIHandler;
this.UIHandler();
this.mDataBindings = [];
this.mCategories = [];
this.categoryIndex = 0;
this.mUnlockCategoryMap = {};
this.mUpdateTime = 0;
this.mMaxTriggersToTest = simcity.kLowSBTestingRate;
this.mEnabled = !0
};
goog.inherits(simcity.cEventTriggersManager, scrui.cUIHandler);
simcity.cEventTriggersManager.prototype.Init = function () {
var a = simcity.gGlobalUIHandler.mIsTutorialEnabled;
if (!a) {
delete simcity.SpeechBalloonPolling.Tutorials;
var b = [],
c = [];
this.mMaxTriggersToTest = simcity.kLowSBTestingRate;
for (var d in simcity.SpeechBalloonPolling) {
var e = simcity.SpeechBalloonPolling[d];
e.hasOwnProperty("unlockBin") ? (b.push(scrui.BuildRequestQuery([simcity.kDataBinAmount, e.unlockBin])), c.push(e), e.hasOwnProperty("unlockEvent") && (this.mUnlockCategoryMap[e.unlockEvent] = e)) : a || this.mCategories.push(e);
e = e.DataBindings;
for (d in e) {
var f = e[d];
f.hasOwnProperty("test") && f.test()
}
}
var g = this;
scrui.RequestGameData(b, function (a) {
for (var b = 0, d = a.length; b < d; ++b)
if (0 < a[b]) {
var e = c[b];
g.mCategories.push(e);
e.hasOwnProperty("unlockEvent") && delete g.mUnlockCategoryMap[e.unlockEvent]
}
b = 0;
for (d = g.mCategories.length; b < d; ++b)
e = g.mCategories[b], e.triggerIndex = 0, e.dataBindingKeys = Object.keys(e.DataBindings)
})
}
};
simcity.cEventTriggersManager.prototype.HandleGameEvent = function (a, b) {
switch (a) {
case simcity.kGameMessageUnitRuleUIEvent:
case simcity.kGameMessageGlobalRuleUIEvent:
var c = b.eventID;
this.mUnlockCategoryMap.hasOwnProperty(c) && (c = this.mUnlockCategoryMap[c], c.triggerIndex = 0, c.dataBindingKeys = Object.keys(c.DataBindings), this.mCategories.push(c), delete this.mUnlockCategoryMap[c.unlockEvent])
}
};
simcity.cEventTriggersManager.prototype.RemoveDataBinding = function (a) {
for (var b = 0, c = this.mCategories.length; b < c; ++b) {
var d = this.mCategories[b];
if (d.DataBindings.hasOwnProperty(a.id)) {
delete d.DataBindings[a.id];
d.dataBindingKeys = Object.keys(d.DataBindings);
a = d.dataBindingKeys.length;
0 === a ? (this.mCategories.splice(b, 1), this.categoryIndex === this.mCategories.length && (this.categoryIndex = Math.max(0, this.categoryIndex - 1))) : d.triggerIndex === a && --d.triggerIndex;
return
}
}
scrui.Assert(a.enableInTutorial, "cEventTriggersManager failed to remove databinding " +
a.id)
};
simcity.AddDataBindingIfNeeded = scrui.Client_ProfZone("simcity.AddDataBindingIfNeeded", function (a, b, c, d, e, f) {
if (!a.hasOwnProperty("timeToFire") || f > a.timeToFire)
a.timeToFire = f + Math.random() * (a.triggerTime[1] - a.triggerTime[0]) + a.triggerTime[0], simcity.TestSpeechBalloonTriggerHelper(a) && (simcity.AddSimpleQueries(c, a.queries), d[b] = a.queries, e[b] = a, ++b);
return b
});
simcity.cEventTriggersManager.prototype.Update = scrui.Client_ProfZone("cEventTriggersManager.Update", function () {
if (this.mEnabled) {
var a = simcity.gGlobalUIHandler.mGameTimeManager,
b = a.GetElapsedGameTimeSeconds();
this.mUpdateTime += b;
if (1 < this.mUpdateTime && (scrui.Client_ProfBegin("cEventTriggersManager.Update>settingUp"), this.mUpdateTime = 0, 0 !== this.mCategories.length)) {
a = a.GetTotalElapsedGameTimeSeconds();
b = this.mCategories[this.categoryIndex];
++this.categoryIndex;
this.categoryIndex === this.mCategories.length &&
(this.categoryIndex = 0);
for (var c = Array(this.mMaxTriggersToTest), d = [], e = Array(this.mMaxTriggersToTest), f = b.DataBindings, g = b.dataBindingKeys.length, h = b.triggerIndex, i = g - h, j = 0, k = h + Math.min(i, this.mMaxTriggersToTest), l = h; l < k; ++l) {
var m = b.dataBindingKeys[l],
n = f[m];
n.id = Number(m);
j = simcity.AddDataBindingIfNeeded(n, j, d, e, c, a)
}
if (0 < h && i < this.mMaxTriggersToTest) {
k = this.mMaxTriggersToTest - i;
for (l = 0; l < k; ++l)
m = b.dataBindingKeys[l], n = f[m], n.id = Number(m), j = simcity.AddDataBindingIfNeeded(n, j, d, e, c, a)
}
b.triggerIndex =
k === g ? 0 : k;
scrui.Client_ProfEnd();
0 < j && (c.length = j, e.length = j, simcity.RequestDataBindingData(d, c, e, !1, function (a) {
for (var b = 0, d = c.length; b < d; ++b) {
var e = c[b];
simcity.TestSpeechBalloonTriggerWithGlobalQueries(e, a[b]) && simcity.gGlobalUIHandler.mSpeechBalloonHandler.AddSpeechBalloonWithoutUnit(e)
}
}))
}
}
});
simcity.GameResourceIDs = {};
simcity.kResourceIDResidents = 506990972;
simcity.kResourceIDTotalResidential = 681686445;
simcity.kResourceIDResidentialShopperW1 = 2934929422;
simcity.kResourceIDResidentialShopperW2 = 2934929421;
simcity.kResourceIDResidentialShopperW3 = 2934929420;
simcity.kResourceIDHotItemsW1ProducedYesterday_Day = 3247323853;
simcity.kResourceIDHotItemsW2ProducedYesterday_Day = 4075527244;
simcity.kResourceIDHotItemsW3ProducedYesterday_Day = 3651520519;
simcity.kResourceIDHotItemsW1ProducedYesterday_Night = 392353857;
simcity.kResourceIDHotItemsW2ProducedYesterday_Night = 2856525928;
simcity.kResourceIDHotItemsW3ProducedYesterday_Night = 2758533907;
simcity.kResourceIDHotItemsW1ConsumedYesterday_Day = 595423747;
simcity.kResourceIDHotItemsW2ConsumedYesterday_Day = 618980098;
simcity.kResourceIDHotItemsW3ConsumedYesterday_Day = 1614975025;
simcity.kResourceIDHotItemsW1ConsumedYesterday_Night = 271683775;
simcity.kResourceIDHotItemsW2ConsumedYesterday_Night = 1097350438;
simcity.kResourceIDHotItemsW3ConsumedYesterday_Night = 3635814549;
simcity.kResourceIDShopWaresW1ProducedDaily = 3253410504;
simcity.kResourceIDShopWaresW2ProducedDaily = 1834082533;
simcity.kResourceIDShopWaresW3ProducedDaily = 695262962;
simcity.kResourceIDResidentialWorkerW1 = 3667251247;
simcity.kResourceIDResidentialWorkerW2 = 3667251244;
simcity.kResourceIDResidentialWorkerW3 = 3667251245;
simcity.kResourceIDTotalKids = 3478596890;
simcity.kResourceIDTotalKidsYesterday = 1061281538;
simcity.kResourceIDTotalStudents = 116259821;
simcity.kResourceIDTotalStudentsYesterday = 1453663751;
simcity.kResourceIDResidentialW1 = 3000398761;
simcity.kResourceIDResidentialW2 = 3000398762;
simcity.kResourceIDResidentialW3 = 3000398763;
simcity.kResourceIDCommercialW1 = 3635297831;
simcity.kResourceIDCommercialW2 = 3635297828;
simcity.kResourceIDCommercialW3 = 3635297829;
simcity.kResourceIDIndustrialW1 = 14091500;
simcity.kResourceIDIndustrialW2 = 14091503;
simcity.kResourceIDIndustrialW3 = 14091502;
simcity.kResourceIDLocalStudentsYesterday = 20654726;
simcity.kResourceIDDensity = 1551159691;
simcity.kResourceIDWealth = 22421794;
simcity.kResourceIDUnderConstruction = 3953979238;
simcity.kResourceIDVacant = 4050174720;
simcity.kResourceIDRegionTotalResidential = 233898165;
simcity.kResourceIDCarsOnRoad = 4263936761;
simcity.kResourceIDSimsWalking = 646593386;
simcity.kResourceIDNumberOfResidential = 107377317;
simcity.kResourceIDNumberOfCommercial = 679995175;
simcity.kResourceIDNumberOfIndustrial = 690843176;
simcity.kResourceIDNumberOfToys = 613677770;
simcity.kResourceIDRW1D1 = 422563668;
simcity.kResourceIDRW1D2 = 422563671;
simcity.kResourceIDRW1D3 = 422563670;
simcity.kResourceIDRW2D1 = 926039303;
simcity.kResourceIDRW2D2 = 926039300;
simcity.kResourceIDRW2D3 = 926039301;
simcity.kResourceIDRW3D1 = 624189254;
simcity.kResourceIDRW3D2 = 624189253;
simcity.kResourceIDRW3D3 = 624189252;
simcity.kResourceIDCW1D1 = 2133762117;
simcity.kResourceIDCW1D2 = 2133762118;
simcity.kResourceIDCW1D3 = 2133762119;
simcity.kResourceIDCW2D1 = 1899419934;
simcity.kResourceIDCW2D2 = 1899419933;
simcity.kResourceIDCW2D3 = 1899419932;
simcity.kResourceIDCW3D1 = 2201166815;
simcity.kResourceIDCW3D2 = 2201166812;
simcity.kResourceIDCW3D3 = 2201166813;
simcity.kResourceIDIW1D1 = 1027109387;
simcity.kResourceIDIW1D2 = 1027109384;
simcity.kResourceIDIW1D3 = 1027109385;
simcity.kResourceIDIW2D1 = 255191816;
simcity.kResourceIDIW2D2 = 255191819;
simcity.kResourceIDIW2D3 = 255191818;
simcity.kResourceIDIW3D1 = 691262881;
simcity.kResourceIDIW3D2 = 691262882;
simcity.kResourceIDIW3D3 = 691262883;
simcity.kResourceIDToyW1 = 1702694203;
simcity.kResourceIDToyW2 = 1702694200;
simcity.kResourceIDToyW3 = 1702694201;
simcity.kResourceIDJobs = 3577750133;
simcity.kResourceIDJobsW1 = 3550749881;
simcity.kResourceIDJobsW2 = 3550749882;
simcity.kResourceIDJobsW3 = 3550749883;
simcity.kResourceIDDayJobsW1 = 2625288509;
simcity.kResourceIDDayJobsW2 = 2625288510;
simcity.kResourceIDDayJobsW3 = 2625288511;
simcity.kResourceIDNightJobsW1 = 3574023729;
simcity.kResourceIDNightJobsW2 = 3574023730;
simcity.kResourceIDNightJobsW3 = 3574023731;
simcity.kResourceIDSimW1 = 435507402;
simcity.kResourceIDSimW2 = 435507401;
simcity.kResourceIDSimW3 = 435507400;
simcity.kResourceIDSimWorkerW1 = 3362141940;
simcity.kResourceIDSimWorkerW2 = 3362141943;
simcity.kResourceIDSimWorkerW3 = 3362141942;
simcity.kResourceIDSimShopperW1 = 1682028163;
simcity.kResourceIDSimShopperW2 = 1682028160;
simcity.kResourceIDSimShopperW3 = 1682028161;
simcity.kResourceIDResidentWorkerW1 = 3276597375;
simcity.kResourceIDResidentWorkerW2 = 3276597372;
simcity.kResourceIDResidentWorkerW3 = 3276597373;
simcity.kResourceIDResidentWorkerW1Paused = 1428753089;
simcity.kResourceIDResidentWorkerW2Paused = 3102600538;
simcity.kResourceIDResidentWorkerW3Paused = 4224432595;
simcity.kResourceIDResidentWorkerW1Locked = 1200777321;
simcity.kResourceIDResidentWorkerW2Locked = 1683595710;
simcity.kResourceIDResidentWorkerW3Locked = 4064745803;
simcity.kResourceIDTotalResidents = 70888836;
simcity.kResourceIDTotalResidentWorkersW1 = 3730101870;
simcity.kResourceIDTotalResidentWorkersW2 = 3730101869;
simcity.kResourceIDTotalResidentWorkersW3 = 3730101868;
simcity.kResourceIDResidentShopperW1 = 274066078;
simcity.kResourceIDResidentShopperW2 = 274066077;
simcity.kResourceIDResidentShopperW3 = 274066076;
simcity.kResourceIDShopperRestingW1 = 1279966668;
simcity.kResourceIDShopperRestingW2 = 1279966671;
simcity.kResourceIDShopperRestingW3 = 1279966670;
simcity.kResourceIDResidentShopperW1Paused = 771766984;
simcity.kResourceIDResidentShopperW2Paused = 3950433779;
simcity.kResourceIDResidentShopperW3Paused = 2828601722;
simcity.kResourceIDTotalResidentShoppersW1 = 2855030245;
simcity.kResourceIDTotalResidentShoppersW2 = 2855030246;
simcity.kResourceIDTotalResidentShoppersW3 = 2855030247;
simcity.kResourceIDWorkersExportedW1 = 2153200811;
simcity.kResourceIDWorkersExportedW2 = 2153200808;
simcity.kResourceIDWorkersExportedW3 = 2153200809;
simcity.kResourceIDShoppersExportedW1 = 3487690468;
simcity.kResourceIDShoppersExportedW2 = 3487690471;
simcity.kResourceIDShoppersExportedW3 = 3487690470;
simcity.kResourceIDLostResidentShopperW1 = 2388451008;
simcity.kResourceIDLostResidentShopperW2 = 2388451011;
simcity.kResourceIDLostResidentShopperW3 = 2388451010;
simcity.kResourceIDLostResidentWorkerW1 = 2019189093;
simcity.kResourceIDLostResidentWorkerW2 = 2019189094;
simcity.kResourceIDLostResidentWorkerW3 = 2019189095;
simcity.kResourceIDLostCarW1 = 3026213751;
simcity.kResourceIDLostCarW2 = 3026213748;
simcity.kResourceIDLostCarW3 = 3026213749;
simcity.kResourceIDLostKids = 1549736624;
simcity.kResourceIDTradeLostKids = 3413038648;
simcity.kResourceIDTotalWorkers = 533812918;
simcity.kResourceIDWorkerW1 = 1825323535;
simcity.kResourceIDWorkerW2 = 1825323532;
simcity.kResourceIDWorkerW3 = 1825323533;
simcity.kResourceIDExtraWorkerW1 = 1627828683;
simcity.kResourceIDExtraWorkerW2 = 1627828680;
simcity.kResourceIDExtraWorkerW3 = 1627828681;
simcity.kResourceIDExtraWorkerW1Paused = 3372671557;
simcity.kResourceIDExtraWorkerW2Paused = 2320734974;
simcity.kResourceIDExtraWorkerW3Paused = 897663655;
simcity.kResourceIDTotalJobs = 606764013;
simcity.kResourceIDWorkersNeeded = 1400428281;
simcity.kResourceIDShiftLength = 4227153767;
simcity.kResourceIDNoPrerequisite = 4209529462;
simcity.kResourceIDCanAfford = 815204315;
simcity.kResourceIDShopperW1 = 3940836846;
simcity.kResourceIDShopperW2 = 3940836845;
simcity.kResourceIDShopperW3 = 3940836844;
simcity.kResourceIDShoppersNeededW1 = 2475985746;
simcity.kResourceIDShoppersNeededW2 = 2475985745;
simcity.kResourceIDShoppersNeededW3 = 2475985744;
simcity.kResourceIDTotalShoppers = 3254086073;
simcity.kResourceIDOpenShoppers = 3463331117;
simcity.kResourceIDTouristW1 = 444274501;
simcity.kResourceIDTouristW2 = 444274502;
simcity.kResourceIDTouristW3 = 444274503;
simcity.kResourceIDTouristW1EnteredToday = 1921885289;
simcity.kResourceIDTouristW2EnteredToday = 347227866;
simcity.kResourceIDTouristW3EnteredToday = 2799711511;
simcity.kResourceIDTouristW1EnteredYesterday = 1190645214;
simcity.kResourceIDTouristW2EnteredYesterday = 3573386765;
simcity.kResourceIDTouristW3EnteredYesterday = 964913384;
simcity.kResourceIDTourists_Daily = 4044820634;
simcity.kResourceIDGuestW1 = 415469395;
simcity.kResourceIDGuestW2 = 415469392;
simcity.kResourceIDGuestW3 = 415469393;
simcity.kResourceIDPayout = 1319618451;
simcity.kResourceIDPayout_Prior = 2658851714;
simcity.kResourceIDEventCost = 3521822336;
simcity.kResourceIDOpenGuestsW1 = 1312145318;
simcity.kResourceIDOpenGuestsW2 = 1312145317;
simcity.kResourceIDOpenGuestsW3 = 1312145316;
simcity.kResourceIDTotalGuests = 335331786;
simcity.kResourceIDShoppingToken = 355482452;
simcity.kResourceIDHappinessToken = 3096611079;
simcity.kResourceIDTokensToRemove = 3239829468;
simcity.kResourceIDHappinessTokenLast = 158634211;
simcity.kResourceIDHotItemsW1 = 985114566;
simcity.kResourceIDHotItemsW2 = 985114565;
simcity.kResourceIDHotItemsW3 = 985114564;
simcity.kResourceIDSouvenirsW1 = 1793669541;
simcity.kResourceIDSouvenirsW2 = 1793669542;
simcity.kResourceIDSouvenirsW3 = 1793669543;
simcity.kResourceIDDayShopW1 = 1706472385;
simcity.kResourceIDDayShopW2 = 1706472386;
simcity.kResourceIDDayShopW3 = 1706472387;
simcity.kResourceIDNightShopW1 = 1936110997;
simcity.kResourceIDNightShopW2 = 1936110998;
simcity.kResourceIDNightShopW3 = 1936110999;
simcity.kResourceIDHappinessDisplay = 4197210794;
simcity.kResourceIDHappinessGlobals_MayorRating = 2329165682;
simcity.kResourceIDHappinessTokenW1 = 309736775;
simcity.kResourceIDHappinessTokenW2 = 309736772;
simcity.kResourceIDHappinessTokenW3 = 309736773;
simcity.kResourceIDProfitCTokenW1 = 2074335033;
simcity.kResourceIDProfitCTokenW2 = 2074335034;
simcity.kResourceIDProfitCTokenW3 = 2074335035;
simcity.kResourceIDProfitITokenW1 = 2353346555;
simcity.kResourceIDProfitITokenW2 = 2353346552;
simcity.kResourceIDProfitITokenW3 = 2353346553;
simcity.kResourceIDHappinessTokenW1_Capacity = 1578161702;
simcity.kResourceIDHappinessTokenW2_Capacity = 1897521287;
simcity.kResourceIDHappinessTokenW3_Capacity = 147115436;
simcity.kResourceIDProfitCTokenW1_Capacity = 3159940408;
simcity.kResourceIDProfitCTokenW2_Capacity = 2341862765;
simcity.kResourceIDProfitCTokenW3_Capacity = 3000392978;
simcity.kResourceIDProfitITokenW1_Capacity = 1530020818;
simcity.kResourceIDProfitITokenW2_Capacity = 1068140483;
simcity.kResourceIDProfitITokenW3_Capacity = 1958713080;
simcity.kResourceIDProfitToken = 3478285230;
simcity.kResourceIDProfitTokenLast = 4074177946;
simcity.kResourceIDProfitTokensToRemove = 1392836198;
simcity.kResourceIDFreightCapacityGlobal = 4006316439;
simcity.kResourceIDFreightConsumedToday = 3477098047;
simcity.kResourceIDFreightProducedToday = 2748560409;
simcity.kResourceIDFreightConsumedYesterday = 2922083280;
simcity.kResourceIDFreightProducedYesterday = 3768638830;
simcity.kResourceIDFreightExportedToday = 1899728130;
simcity.kResourceIDFreightExportedYesterday = 1300296021;
simcity.kResourceIDFreightImportedToday = 1252812105;
simcity.kResourceIDFreightImportedYesterday = 3077635774;
simcity.kResourceIDImportedFreightTrucks = 334092794;
simcity.kResourceIDExportedFreightTrucks = 3384332457;
simcity.kResourceIDProtester = 2731587251;
simcity.kResourceIDSadnessFromCrime = 3102995628;
simcity.kResourceIDSadnessFromCrimeAtBuilding = 2676631795;
simcity.kResourceIDSadnessFromDeath = 3014669568;
simcity.kResourceIDSadnessFromGerms = 4098878488;
simcity.kResourceIDSadnessFromInjury = 2711830447;
simcity.kResourceIDSadnessFromNotEnoughSales = 3729974311;
simcity.kResourceIDSadnessFromNoDesirability = 2933493994;
simcity.kResourceIDSadnessFromNoEducation = 265058035;
simcity.kResourceIDSadnessFromNoSkill = 3999968446;
simcity.kResourceIDSadnessFromNoRent = 3794757290;
simcity.kResourceIDSadnessFromGarbage = 1153586619;
simcity.kResourceIDSadnessFromHomelessness = 306806153;
simcity.kResourceIDSadnessFromNoPower = 300030230;
simcity.kResourceIDSadnessFromNotEnoughWorkers = 942604190;
simcity.kResourceIDSadnessFromNotOperational = 332562811;
simcity.kResourceIDSadnessFromNoWater = 2630915076;
simcity.kResourceIDSadnessFromPark = 1043343262;
simcity.kResourceIDSadnessFromPollution = 2342209900;
simcity.kResourceIDSadnessFromSewage = 1456171026;
simcity.kResourceIDSadnessFromSickness = 1012990933;
simcity.kResourceIDSadnessFromTaxes = 3463385665;
simcity.kResourceIDSadnessFromUnemployment = 3085998997;
simcity.kResourceIDHappiness_CanUpgradeTimer_D = 3312452629;
simcity.kResourceIDHappinessFromCrimeSuppression = 788152555;
simcity.kResourceIDHappinessFromCustomers = 2493376395;
simcity.kResourceIDHappinessFromStudentCustomers = 2181284564;
simcity.kResourceIDHappinessFromTouristCustomers = 1941201565;
simcity.kResourceIDHappinessFromFireInspector = 2675856823;
simcity.kResourceIDHappinessFromHealthOutreach = 1327167803;
simcity.kResourceIDHappinessFromPark = 2232061704;
simcity.kResourceIDHappinessFromPoliceOutreach = 3030062443;
simcity.kResourceIDHappinessFromShipments = 125348697;
simcity.kResourceIDHappinessFromShop = 3849002820;
simcity.kResourceIDHappinessFromTaxes = 4134653131;
simcity.kResourceIDPlague = 1131613591;
simcity.kResourceIDZombies = 1721775719;
simcity.kResourceIDNIMBY = 574418664;
simcity.kResourceIDHour = 3584069523;
simcity.kResourceIDYear = 2609628718;
simcity.kResourceIDActiveBuilding = 2048500291;
simcity.kResourceIDActiveCheat = 1415435808;
simcity.kResourceIDOpenForBusiness = 1156960108;
simcity.kResourceIDConnected = 1629494038;
simcity.kResourceIDTriggeredProtestMission = 3217593197;
simcity.kResourceIDConstructionProgress = 1451393771;
simcity.kResourceIDBuildingTaxValue = 2540684511;
simcity.kResourceIDIncome = 276811212;
simcity.kResourceIDIncomeSoFar = 3830709641;
simcity.kResourceIDExpenses = 3986250326;
simcity.kResourceIDSimoleons = 932594546;
simcity.kResourceIDMoneyToken = 1421190854;
simcity.kResourceIDExpensesFromMaintenanceCoal = 2914008682;
simcity.kResourceIDExpensesFromMaintenanceOil = 30287917;
simcity.kResourceIDExpensesFromMaintenanceOre = 3872259493;
simcity.kResourceIDExpensesFromMaintenanceTransport = 665508202;
simcity.kResourceIDExpensesFromMaintenanceAir = 4258438993;
simcity.kResourceIDExpensesFromMaintenanceBoat = 1286812053;
simcity.kResourceIDExpensesFromMaintenanceBus = 3923430943;
simcity.kResourceIDExpensesFromMaintenanceLightRail = 4049820673;
simcity.kResourceIDExpensesFromMaintenanceHeavyRail = 524076852;
simcity.kResourceIDExpensesFromMaintenancePower = 260897934;
simcity.kResourceIDExpensesFromMaintenanceWater = 1626720268;
simcity.kResourceIDExpensesFromMaintenanceSewage = 125463887;
simcity.kResourceIDExpensesFromMaintenancePolice = 857827309;
simcity.kResourceIDExpensesFromMaintenanceOrdinance = 2482326148;
simcity.kResourceIDExpensesFromMaintenanceManufacturing = 2634840555;
simcity.kResourceIDExpensesFromMaintenanceElectronics = 4150433656;
simcity.kResourceIDExpensesFromMaintenanceExtraction = 1304689492;
simcity.kResourceIDExpensesFromMaintenanceImport = 3817061456;
simcity.kResourceIDExpensesFromMaintenanceHealth = 1906560361;
simcity.kResourceIDExpensesFromMaintenanceGarbage = 3854204960;
simcity.kResourceIDExpensesFromMaintenanceFire = 4091161999;
simcity.kResourceIDExpensesFromMaintenanceEducation = 60449099;
simcity.kResourceIDExpensesFromMaintenanceEducationE2 = 1413890478;
simcity.kResourceIDExpensesFromMaintenanceEducationE3 = 1413890479;
simcity.kResourceIDExpensesFromMaintenance = 4227066323;
simcity.kResourceIDExpensesFromTransport = 982827217;
simcity.kResourceIDExpensesFromPower = 2467381325;
simcity.kResourceIDExpensesFromPolice = 1417768676;
simcity.kResourceIDExpensesFromOrdinance = 2079631891;
simcity.kResourceIDExpensesFromManufacturing = 1802501268;
simcity.kResourceIDExpensesFromImport = 2812005065;
simcity.kResourceIDExpensesFromHealth = 767913660;
simcity.kResourceIDExpensesFromGarbage = 2486869479;
simcity.kResourceIDExpensesFromFire = 2209133790;
simcity.kResourceIDExpensesFromEducation = 1143007804;
simcity.kResourceIDExpensesFromWater = 3232477083;
simcity.kResourceIDExpensesFromCultural = 877987596;
simcity.kResourceIDExpensesFromTourism = 1876932877;
simcity.kResourceIDExpensesFromMaintenanceParks = 2873285118;
simcity.kResourceIDExpensesFromMaintenanceGovernment = 3383472214;
simcity.kResourceIDExpensesFromMaintenanceCultural = 4277428933;
simcity.kResourceIDExpensesFromMaintenanceTourism = 2576841198;
simcity.kResourceIDExpensesFromMaintenanceCasinos = 3284417293;
simcity.kResourceIDIncomeFromRW1 = 1546739750;
simcity.kResourceIDIncomeFromRW2 = 1546739749;
simcity.kResourceIDIncomeFromRW3 = 1546739748;
simcity.kResourceIDIncomeFromCW1 = 1544223759;
simcity.kResourceIDIncomeFromCW2 = 1544223756;
simcity.kResourceIDIncomeFromCW3 = 1544223757;
simcity.kResourceIDIncomeFromIW1 = 1542649705;
simcity.kResourceIDIncomeFromIW2 = 1542649706;
simcity.kResourceIDIncomeFromIW3 = 1542649707;
simcity.kResourceIDIncomeFromRW1WithTaxes = 965241869;
simcity.kResourceIDIncomeFromRW2WithTaxes = 1539447596;
simcity.kResourceIDIncomeFromRW3WithTaxes = 1161846911;
simcity.kResourceIDIncomeFromCW1WithTaxes = 4129686426;
simcity.kResourceIDIncomeFromCW2WithTaxes = 621486087;
simcity.kResourceIDIncomeFromCW3WithTaxes = 1937383156;
simcity.kResourceIDIncomeFromIW1WithTaxes = 204820040;
simcity.kResourceIDIncomeFromIW2WithTaxes = 1023666361;
simcity.kResourceIDIncomeFromIW3WithTaxes = 3607063422;
simcity.kResourceIDTaxLevelRW1 = 2546641224;
simcity.kResourceIDTaxLevelRW2 = 2546641227;
simcity.kResourceIDTaxLevelRW3 = 2546641226;
simcity.kResourceIDTaxLevelCW1 = 2544228497;
simcity.kResourceIDTaxLevelCW2 = 2544228498;
simcity.kResourceIDTaxLevelCW3 = 2544228499;
simcity.kResourceIDTaxLevelIW1 = 2543242791;
simcity.kResourceIDTaxLevelIW2 = 2543242788;
simcity.kResourceIDTaxLevelIW3 = 2543242789;
simcity.kResourceIDIncomeFromCasinos = 1309954224;
simcity.kResourceIDIncomeFromCasinosTotal = 2009149070;
simcity.kResourceIDCasinoHQIsPresent = 2884292350;
simcity.kResourceIDCasinoHQUnlocked = 1792557130;
simcity.kResourceIDIncomeFromLandMarks = 1353025343;
simcity.kResourceIDIncomeFromLandMarksTotal = 3661444471;
simcity.kResourceIDAdjustedIncome = 3737293454;
simcity.kResourceIDAdjustedExpenses = 1840332184;
simcity.kResourceIDIncomeFromPower = 3878226289;
simcity.kResourceIDIncomeFromWater = 2691015803;
simcity.kResourceIDIncomeFromSewageTreatment = 1358514474;
simcity.kResourceIDEventPreparation = 3728938950;
simcity.kResourceIDTouristW1SatisfiedToday = 3641764570;
simcity.kResourceIDTouristW2SatisfiedToday = 1236293709;
simcity.kResourceIDTouristW3SatisfiedToday = 676419548;
simcity.kResourceIDTouristW1SatisfiedYesterday = 1503818253;
simcity.kResourceIDTouristW2SatisfiedYesterday = 1924322506;
simcity.kResourceIDTouristW3SatisfiedYesterday = 781280779;
simcity.kResourceIDAttractionLevel = 1425832080;
simcity.kResourceIDTouristsAllowedW1 = 2532529484;
simcity.kResourceIDTouristsAllowedW2 = 2532529487;
simcity.kResourceIDTouristsAllowedW3 = 2532529486;
simcity.kResourceIDTouristW1LeftEarlyYesterday = 3221246613;
simcity.kResourceIDTouristW2LeftEarlyYesterday = 1900087746;
simcity.kResourceIDTouristW3LeftEarlyYesterday = 604786207;
simcity.kResourceIDEventPreparation = 3728938950;
simcity.kResourceIDEventTimer = 194774318;
simcity.kResourceIDPostEventCrowd = 633137976;
simcity.kResourceIDNumberOfT1Stadiums = 732482048;
simcity.kResourceIDNumberOfT2Stadiums = 1570731423;
simcity.kResourceIDNumberOfStadiums = 3639751417;
simcity.kResourceIDCostsFromStadium = 546726786;
simcity.kResourceIDPayoutFromStadiumTotal = 684456002;
simcity.kResourceIDPayoutFromStadiumThisHour = 2225257970;
simcity.kResourceIDPayoutFromStadiumLastHour = 1803061118;
simcity.kResourceIDStadiumID = 273171581;
simcity.kResourceIDActiveEventResearch = 1542617206;
simcity.kResourceIDEventSelection = 497041679;
simcity.kResourceIDFailureDueToToggledOff = 840871793;
simcity.kResourceIDFailureDueToNoWorkers = 2572076332;
simcity.kResourceIDFailureDueToNoPower = 925687770;
simcity.kResourceIDFailureDueToNoWater = 2012641080;
simcity.kResourceIDCasinoSpecialtyIncomeDisplay = 1979876969;
simcity.kResourceIDCasinoTouristW1IncomeDisplay = 1689886443;
simcity.kResourceIDCasinoTouristW2IncomeDisplay = 494332526;
simcity.kResourceIDCasinoTouristW3IncomeDisplay = 2889578413;
simcity.kResourceIDCasinoSpecialtyExpensesDisplay = 1939037327;
simcity.kResourceIDGamblerCapacityW1 = 869266449;
simcity.kResourceIDGamblerCapacityW2 = 869266450;
simcity.kResourceIDGamblerCapacityW3 = 869266451;
simcity.kResourceIDGamblerW1Satisfied = 1316521295;
simcity.kResourceIDGamblerW2Satisfied = 758095178;
simcity.kResourceIDGamblerW3Satisfied = 2539189505;
simcity.kResourceIDGamblersSatisfiedTotal = 3771518506;
simcity.kResourceIDCasinoLodgerW1Satisfied = 203825487;
simcity.kResourceIDCasinoLodgerW2Satisfied = 3940366666;
simcity.kResourceIDCasinoLodgerW3Satisfied = 1426493697;
simcity.kResourceIDCasinoTouristW1Today = 504095377;
simcity.kResourceIDCasinoTouristW2Today = 4070004760;
simcity.kResourceIDCasinoTouristW3Today = 216746127;
simcity.kResourceIDCasinoTouristW1Yesterday = 2795188294;
simcity.kResourceIDCasinoTouristW2Yesterday = 3945522031;
simcity.kResourceIDCasinoTouristW3Yesterday = 2278629440;
simcity.kResourceIDCasinoLodgersSatisfiedTotal = 45623850;
simcity.kResourceIDCasinoLodgingDivUnlock = 2587613669;
simcity.kResourceIDCasinoEntertainmentDivUnlock = 648158039;
simcity.kResourceIDCasinoGameDivUnlock = 1070113771;
simcity.kResourceIDCasinoHQIsPresent = 2884292350;
simcity.kResourceIDCasinoHQUnlocked = 1792557130;
simcity.kResourceIDNumberOfCasinos = 4237041535;
simcity.kResourceIDNumberOfCasinoModules = 1155861783;
simcity.kResourceIDNumberOfCasinoSigns = 3589361662;
simcity.kResourceIDNumberOfCasinoGameModules = 2922732385;
simcity.kResourceIDNumberOfCasinoEntertainmentModules = 1270940893;
simcity.kResourceIDNumberOfCasinoLodgingModules = 1158865535;
simcity.kResourceIDNumberOfSciFiCasinos = 240283289;
simcity.kResourceIDNumberOfStripCasinoAs = 2216626652;
simcity.kResourceIDNumberOfStripCasinoBs = 2233404209;
simcity.kResourceIDNumberOfElegantCasinos = 2194743579;
simcity.kResourceIDNumberOfGamblingDivisions = 3767468092;
simcity.kResourceIDNumberOfEntertainmentDivisions = 2117777875;
simcity.kResourceIDNumberOfLodgingDivisions = 1149236601;
simcity.kResourceIDNumberOfGamblingHouseSigns = 1588378906;
simcity.kResourceIDNumberOfGamblingHouses = 554121707;
simcity.kResourceIDNumberOfNickelSlots = 104662282;
simcity.kResourceIDNumberOfBlackjacks = 4097330622;
simcity.kResourceIDNumberOfCrapsTables = 1279154703;
simcity.kResourceIDNumberOfPokerHouses = 3164228307;
simcity.kResourceIDNumberOfCasinoComedyClubs = 638971984;
simcity.kResourceIDNumberOfCasinoLounges = 2583948285;
simcity.kResourceIDNumberOfCasinoDiscos = 1401826977;
simcity.kResourceIDNumberOfCasinoCelebrityStages = 3890732310;
simcity.kResourceIDNumberOfCasinoRouletteRooms = 3039433788;
simcity.kResourceIDNumberOfCasinoBaccaratRooms = 496141921;
simcity.kResourceIDNumberOfCasinoExclusiveClubs = 3842034955;
simcity.kResourceIDNumberOfCasinoConcertHalls = 346073478;
simcity.kResourceIDNumberOfCasinoRoomsW1 = 1075782960;
simcity.kResourceIDNumberOfCasinoRoomsW2 = 1075782963;
simcity.kResourceIDNumberOfCasinoRoomsW3 = 1075782962;
simcity.kResourceIDUnlockToken = 928475780;
simcity.kResourceIDBuildingLevel = 2673580297;
simcity.kResourceIDLevelUpToGo = 1863618135;
simcity.kResourceIDMayorsMansionUnlocked = 1719295514;
simcity.kResourceIDMayorsHouseSmallUnlocked = 3442351785;
simcity.kResourceIDBusT1StopUnlocked = 2538792199;
simcity.kResourceIDHasBusT1Station = 3814300242;
simcity.kResourceIDUpgradeAvailable = 2714018304;
simcity.kResourceIDCoal = 3469052172;
simcity.kResourceIDMetal = 2473969246;
simcity.kResourceIDAlloy = 504811494;
simcity.kResourceIDOreRaw = 2530163463;
simcity.kResourceIDFuel = 2661514705;
simcity.kResourceIDPlastic = 660835419;
simcity.kResourceIDElectronics = 3202467646;
simcity.kResourceIDComputer = 2376682602;
simcity.kResourceIDTelevision = 3098926425;
simcity.kResourceIDOilCrude = 3212172292;
simcity.kResourceIDCoalDeliveryAllowed = 1819482372;
simcity.kResourceIDMetalDeliveryAllowed = 3189494218;
simcity.kResourceIDAlloyDeliveryAllowed = 361523138;
simcity.kResourceIDOreRawDeliveryAllowed = 4170352897;
simcity.kResourceIDFuelDeliveryAllowed = 3042375407;
simcity.kResourceIDPlasticDeliveryAllowed = 1027770069;
simcity.kResourceIDElectronicsDeliveryAllowed = 287711274;
simcity.kResourceIDComputerDeliveryAllowed = 1606318118;
simcity.kResourceIDTelevisionDeliveryAllowed = 3377021703;
simcity.kResourceIDOilCrudeDeliveryAllowed = 4083535628;
simcity.kResourceIDAlloyProducedThisHour = 3182885740;
simcity.kResourceIDAlloyProducedPerHour = 3305788701;
simcity.kResourceIDMetalProducedThisHour = 145939892;
simcity.kResourceIDMetalProducedPerHour = 3773529877;
simcity.kResourceIDPlasticProducedThisHour = 810606585;
simcity.kResourceIDPlasticProducedPerHour = 1623862798;
simcity.kResourceIDTelevisionProducedThisHour = 106430263;
simcity.kResourceIDTelevisionProducedPerHour = 2802359472;
simcity.kResourceIDElectronicsProducedThisHour = 1788159124;
simcity.kResourceIDElectronicsProducedPerHour = 3734557557;
simcity.kResourceIDComputerProducedThisHour = 3731921376;
simcity.kResourceIDComputerProducedPerHour = 2184097737;
simcity.kResourceIDFuelProducedThisHour = 2880047007;
simcity.kResourceIDFuelProducedPerHour = 3004562504;
simcity.kResourceIDTotalPlasticAssembled = 218637233;
simcity.kResourceIDTotalAlloyAssembled = 1411498114;
simcity.kResourceIDCoalProducedDisplay = 853615038;
simcity.kResourceIDAlloyProducedDisplay = 369761380;
simcity.kResourceIDMetalProducedDisplay = 1307498540;
simcity.kResourceIDOreRawProducedDisplay = 2957549491;
simcity.kResourceIDElectronicsProducedDisplay = 2332537740;
simcity.kResourceIDComputerProducedDisplay = 2410395896;
simcity.kResourceIDTelevisionProducedDisplay = 554846177;
simcity.kResourceIDFuelProducedDisplay = 2663757065;
simcity.kResourceIDOilCrudeProducedDisplay = 734054438;
simcity.kResourceIDPlasticProducedDisplay = 2470116871;
simcity.kResourceIDHeight = 1279776192;
simcity.kResourceIDHeightThreshold = 3026865825;
simcity.kResourceIDExtractorMapLow = 3905066547;
simcity.kResourceIDExtractorMapEmpty = 3800084722;
simcity.kResourceIDStuffMined = 446695464;
simcity.kResourceIDStuffMinedPerDay = 3034801001;
simcity.kResourceIDMiningResourcesSold = 3280663838;
simcity.kResourceIDCoalHarvested = 1322749812;
simcity.kResourceIDCoalHarvested_ThisPeriod = 1300853028;
simcity.kResourceIDCoalHarvested_PerPeriod = 4097110099;
simcity.kResourceIDCoalHarvestedDisplay = 147036502;
simcity.kResourceIDCoalDelivered = 415012756;
simcity.kResourceIDCoalTruckT1 = 3585818960;
simcity.kResourceIDCoalTruckT2 = 3585818963;
simcity.kResourceIDCoalMineUnlocked = 61687530;
simcity.kResourceIDCoalMinesBuilt = 1265620228;
simcity.kResourceIDCoalMinesBuilt_T1 = 3804199702;
simcity.kResourceIDCoalMineT2Unlocked = 1268484616;
simcity.kResourceIDCoalMinesBuilt_T2 = 3804199701;
simcity.kResourceIDCoalShaftsBuilt = 3190577349;
simcity.kResourceIDCoalShaftsBuilt_T1 = 174028141;
simcity.kResourceIDCoalShaftsBuilt_T2 = 174028142;
simcity.kResourceIDCoalGaragesBuilt = 803107994;
simcity.kResourceIDCoalGaragesBuilt_T1 = 3313040836;
simcity.kResourceIDCoalGaragesBuilt_T2 = 3313040839;
simcity.kResourceIDCoalMapEmpty = 1765739621;
simcity.kResourceIDCoalMapLow = 758396592;
simcity.kResourceIDCoalBuyPrice = 2205721339;
simcity.kResourceIDCoalSellPrice = 397488919;
simcity.kResourceIDGlobalMission_MSCoalCoalHQToLevel2 = 56675115;
simcity.kResourceIDGlobalMission_MSCoalCoalHQToLevel3 = 56675114;
simcity.kResourceIDGlobalMission_MSCoalCoalHQToLevel4 = 56675117;
simcity.kResourceIDCoalBurned = 1541996840;
simcity.kResourceIDCoalBurnedThisHour = 2575376022;
simcity.kResourceIDCoalBurnedPerHour = 1907231427;
simcity.kResourceIDHasCoal = 1510379398;
simcity.kResourceIDNoModules = 1359390303;
simcity.kResourceIDHasOre = 1336743113;
simcity.kResourceIDOreMinesBuilt = 1971836291;
simcity.kResourceIDOreMapEmpty = 2154953930;
simcity.kResourceIDOreMapLow = 582561355;
simcity.kResourceIDOreHarvested = 1324776669;
simcity.kResourceIDOreHarvested_ThisPeriod = 360783863;
simcity.kResourceIDOreHarvested_PerPeriod = 1999061562;
simcity.kResourceIDOreHarvestedDisplay = 1929153685;
simcity.kResourceIDHasOil = 1789738817;
simcity.kResourceIDNumberOfOilWells = 3822808170;
simcity.kResourceIDNumberOfOilPumpjacks = 1479411151;
simcity.kResourceIDOilCrudeStorage = 2515576615;
simcity.kResourceIDOilCrudePumped = 115382853;
simcity.kResourceIDOilCrudePumpedPerDay = 2680707156;
simcity.kResourceIDOilCrudePumpedDisplay = 577034589;
simcity.kResourceIDOilCrudeSold = 1495594842;
simcity.kResourceIDOilCrudePumped_ThisPeriod = 2133221439;
simcity.kResourceIDOilCrudePumped_PerPeriod = 690517714;
simcity.kResourceIDOilCrudeBurned = 2688949744;
simcity.kResourceIDOilCrudeBurnedThisHour = 1754683230;
simcity.kResourceIDOilCrudeBurnedPerHour = 3616211099;
simcity.kResourceIDNumberOfMetalManufacturingBases = 1525616142;
simcity.kResourceIDNumberOfOilManufacturingBases = 3316962459;
simcity.kResourceIDNumberOfAlloyAssemblers = 1382660551;
simcity.kResourceIDNumberOfMetalAssemblers = 1997611743;
simcity.kResourceIDNumberOfPlasticAssemblers = 297889326;
simcity.kResourceIDNumberOfFuelAssemblers = 4081186296;
simcity.kResourceIDNumberOfAlloyConsumers = 418497113;
simcity.kResourceIDNumberOfMetalConsumers = 2758454193;
simcity.kResourceIDNumberOfPlasticConsumers = 2372125902;
simcity.kResourceIDNumberOfFuelConsumers = 1822063616;
simcity.kResourceIDNumberOfOreConsumers = 2506735350;
simcity.kResourceIDNumberOfCoalConsumers = 3988714811;
simcity.kResourceIDAlloyDeliveredToday = 1526483933;
simcity.kResourceIDAlloyDeliveredPerDay = 1226479167;
simcity.kResourceIDMetalDeliveredToday = 2430483765;
simcity.kResourceIDMetalDeliveredPerDay = 2878482839;
simcity.kResourceIDPlasticDeliveredToday = 957065676;
simcity.kResourceIDPlasticDeliveredPerDay = 652536936;
simcity.kResourceIDFuelDeliveredToday = 1057307070;
simcity.kResourceIDFuelDeliveredPerDay = 1871327294;
simcity.kResourceIDElectronicsDeliveredToday = 1492395285;
simcity.kResourceIDElectronicsDeliveredPerDay = 1040815095;
simcity.kResourceIDTelevisionDeliveredToday = 76334406;
simcity.kResourceIDTelevisionDeliveredPerDay = 2367596646;
simcity.kResourceIDComputerDeliveredToday = 4152484833;
simcity.kResourceIDComputerDeliveredPerDay = 2428768675;
simcity.kResourceIDCoalDeliveredToday = 1232367775;
simcity.kResourceIDCoalDeliveredPerDay = 1093316741;
simcity.kResourceIDOilCrudeDeliveredToday = 554318647;
simcity.kResourceIDOilCrudeDeliveredPerDay = 2722928253;
simcity.kResourceIDOreRawDeliveredToday = 2722297832;
simcity.kResourceIDOreRawDeliveredPerDay = 3524034500;
simcity.kResourceIDManufacturingTruck = 1350344434;
simcity.kResourceIDHQ_Casino_Built = 3977359027;
simcity.kResourceIDHQ_Casino_IsOn = 3360911126;
simcity.kResourceIDHQ_Casino_Level = 3511379761;
simcity.kResourceIDHQ_Casino_OpenModules = 801657528;
simcity.kResourceIDHQ_Casino_Unlocked = 26304830;
simcity.kResourceIDHQ_Casino_Lodging_Module_Built = 759304535;
simcity.kResourceIDHQ_Casino_Lodging_Module_IsOn = 3281851354;
simcity.kResourceIDHQ_Casino_Entertainment_Module_Built = 2053805237;
simcity.kResourceIDHQ_Casino_Entertainment_Module_IsOn = 1204202580;
simcity.kResourceIDHQ_Casino_Games_Module_Built = 70477528;
simcity.kResourceIDHQ_Casino_Games_Module_IsOn = 1866332371;
simcity.kResourceIDHQ_Electronics_Built = 774789393;
simcity.kResourceIDHQ_Electronics_IsOn = 3482168784;
simcity.kResourceIDHQ_Electronics_Level = 1991765023;
simcity.kResourceIDHQ_Electronics_Unlocked = 1778306596;
simcity.kResourceIDHQ_Electronics_Commerce_Module_IsOn = 2888719063;
simcity.kResourceIDHQ_Electronics_Commerce_Module_Research = 1181200179;
simcity.kResourceIDHQ_Mining_Built = 807978098;
simcity.kResourceIDHQ_Mining_Engineering_Module_Built = 807139023;
simcity.kResourceIDHQ_Mining_Engineering_Module_IsOn = 1864210834;
simcity.kResourceIDHQ_Mining_IsOn = 2404523369;
simcity.kResourceIDHQ_Mining_Level = 1241938196;
simcity.kResourceIDHQ_Mining_OpenModules = 1481364521;
simcity.kResourceIDHQ_Mining_Unlocked = 2834921353;
simcity.kResourceIDHQ_Mining_RnD_Module_Built = 1769969216;
simcity.kResourceIDHQ_Mining_RnD_Module_IsOn = 270866715;
simcity.kResourceIDHQ_Mining_Commerce_Module_IsOn = 65493878;
simcity.kResourceIDHQ_Mining_Commerce_Module_Research = 2201476014;
simcity.kResourceIDHQ_Oil_Built = 1520361480;
simcity.kResourceIDHQ_Oil_IsOn = 3689231555;
simcity.kResourceIDHQ_Oil_Level = 758417306;
simcity.kResourceIDHQ_Oil_Commerce_Module_Unlocked = 1358679104;
simcity.kResourceIDHQ_Oil_Commerce_Module_Built = 48883837;
simcity.kResourceIDHQ_Oil_Commerce_Module_IsOn = 2036406780;
simcity.kResourceIDHQ_Oil_RnD_Module_Unlocked = 3166522173;
simcity.kResourceIDHQ_Oil_RnD_Module_Built = 3481692070;
simcity.kResourceIDHQ_Oil_RnD_Module_IsOn = 4080881245;
simcity.kResourceIDHQ_Oil_Unlocked = 2163490343;
simcity.kResourceIDHQ_Oil_OpenModules = 705374171;
simcity.kResourceIDHQ_ToNextLevel = 2469558203;
simcity.kResourceIDHQ_Trade_Built = 1286867258;
simcity.kResourceIDHQ_Trade_IsOn = 2741599409;
simcity.kResourceIDHQ_Trade_Level = 628386428;
simcity.kResourceIDHQ_Trade_Unlocked = 4100184705;
simcity.kResourceIDHQ_Trade_Metals_Module_Built = 117239308;
simcity.kResourceIDHQ_Trade_Electronics_Module_Built = 3463127895;
simcity.kResourceIDHQ_Trade_Petroleum_Module_Built = 3016663867;
simcity.kResourceIDHQ_University_Level = 883876420;
simcity.kResourceIDHQProgress = 3872971773;
simcity.kResourceIDNumberOfCasinoHQs = 607521748;
simcity.kResourceIDNumberOfCoalHQs = 4228689212;
simcity.kResourceIDNumberOfElectronicHQs = 2711220345;
simcity.kResourceIDNumberOfOilHQs = 1740971601;
simcity.kResourceIDNumberOfTradeHQs = 895967779;
simcity.kResourceIDTradeProfit = 213949715;
simcity.kResourceIDPetroleumSpecialtyLastMonthExpenses = 3316849439;
simcity.kResourceIDPetroleumSpecialtyLastMonthIncome = 2347321209;
simcity.kResourceIDMetalSpecialtyLastMonthExpenses = 80837591;
simcity.kResourceIDMetalSpecialtyLastMonthIncome = 356722737;
simcity.kResourceIDCasinoSpecialtyLastMonthExpenses = 2430600245;
simcity.kResourceIDCasinoSpecialtyLastMonthIncome = 3459385487;
simcity.kResourceIDTradeSpecialtyLastMonthExpenses = 1243707180;
simcity.kResourceIDTradeSpecialtyLastMonthIncome = 3013519842;
simcity.kResourceIDElectronicsSpecialtyLastMonthExpenses = 3907693495;
simcity.kResourceIDElectronicsSpecialtyLastMonthIncome = 28682513;
simcity.kResourceIDCoalCurrentMonthExpenses = 2921692E3;
simcity.kResourceIDCoalCurrentMonthIncome = 1452627382;
simcity.kResourceIDCoalLastMonthExpenses = 1681626433;
simcity.kResourceIDCoalLastMonthIncome = 4192487899;
simcity.kResourceIDAlloyCurrentMonthExpenses = 2399186110;
simcity.kResourceIDAlloyCurrentMonthIncome = 842523988;
simcity.kResourceIDAlloyLastMonthExpenses = 3638289559;
simcity.kResourceIDAlloyLastMonthIncome = 1712427249;
simcity.kResourceIDMetalCurrentMonthExpenses = 3218139750;
simcity.kResourceIDMetalCurrentMonthIncome = 454232732;
simcity.kResourceIDMetalLastMonthExpenses = 3203427855;
simcity.kResourceIDMetalLastMonthIncome = 963041001;
simcity.kResourceIDOreRawCurrentMonthExpenses = 3812552491;
simcity.kResourceIDOreRawCurrentMonthIncome = 3041755525;
simcity.kResourceIDOreRawLastMonthExpenses = 2880748248;
simcity.kResourceIDOreRawLastMonthIncome = 2182177486;
simcity.kResourceIDElectronicsCurrentMonthExpenses = 2366096966;
simcity.kResourceIDElectronicsCurrentMonthIncome = 1731900540;
simcity.kResourceIDElectronicsLastMonthExpenses = 457310063;
simcity.kResourceIDElectronicsLastMonthIncome = 4163058761;
simcity.kResourceIDComputerCurrentMonthExpenses = 582100306;
simcity.kResourceIDComputerCurrentMonthIncome = 3585213976;
simcity.kResourceIDComputerLastMonthExpenses = 3472923235;
simcity.kResourceIDComputerLastMonthIncome = 1157810269;
simcity.kResourceIDTelevisionCurrentMonthExpenses = 3506944737;
simcity.kResourceIDTelevisionCurrentMonthIncome = 2323742331;
simcity.kResourceIDTelevisionLastMonthExpenses = 948712822;
simcity.kResourceIDTelevisionLastMonthIncome = 1397635820;
simcity.kResourceIDFuelCurrentMonthExpenses = 1826395497;
simcity.kResourceIDFuelCurrentMonthIncome = 160139075;
simcity.kResourceIDFuelLastMonthExpenses = 4143470734;
simcity.kResourceIDFuelLastMonthIncome = 1634528164;
simcity.kResourceIDOilCrudeCurrentMonthExpenses = 1036181E3;
simcity.kResourceIDOilCrudeCurrentMonthIncome = 3138058174;
simcity.kResourceIDOilCrudeLastMonthExpenses = 1552819769;
simcity.kResourceIDOilCrudeLastMonthIncome = 3556726419;
simcity.kResourceIDPlasticCurrentMonthExpenses = 1009064015;
simcity.kResourceIDPlasticCurrentMonthIncome = 3015200553;
simcity.kResourceIDPlasticLastMonthExpenses = 2854376420;
simcity.kResourceIDPlasticLastMonthIncome = 906443514;
simcity.kResourceIDTotalIncomeFromTradingGlobalMarketOilCrude = 2346200051;
simcity.kResourceIDTotalIncomeFromTradingGlobalMarketFuel = 3703390122;
simcity.kResourceIDTotalIncomeFromTradingGlobalMarketPlastic = 3620347846;
simcity.kResourceIDCasinoSpecialtyCurrentMonthExpenses = 1038792412;
simcity.kResourceIDCasinoSpecialtyCurrentMonthIncome = 2780020242;
simcity.kResourceIDPetroleumSpecialtyCurrentMonthExpenses = 2744613334;
simcity.kResourceIDPetroleumSpecialtyCurrentMonthIncome = 2620260684;
simcity.kResourceIDMetalSpecialtyCurrentMonthProfit = 3689720695;
simcity.kResourceIDPetroleumSpecialtyCurrentMonthProfit = 3070779183;
simcity.kResourceIDTradeSpecialtyCurrentMonthProfit = 88035854;
simcity.kResourceIDCasinoSpecialtyCurrentMonthProfit = 3736548709;
simcity.kResourceIDElectronicsSpecialtyCurrentMonthProfit = 93660119;
simcity.kResourceIDTotalElectronicsAssembled = 754698314;
simcity.kResourceIDTotalElectronicsAssembledPerDay = 4074522583;
simcity.kResourceIDTotalComputerAssembled = 1607469238;
simcity.kResourceIDNumT1ElectronicsBase = 317920080;
simcity.kResourceIDNumT2ElectronicsBase = 3776200817;
simcity.kResourceIDGlobalMission_MSManufacturingElectronicsHQToLevel2 = 688534268;
simcity.kResourceIDGlobalMission_MSManufacturingElectronicsHQToLevel3 = 688534269;
simcity.kResourceIDNumberOfElectronicHQsConsumerElectronicsWings = 3365789182;
simcity.kResourceIDTotalIncomeFromAllElectronics = 2179650798;
simcity.kResourceIDComputerResearched = 2286945710;
simcity.kResourceIDIncomeFromGlobalMarketExport = 4021347991;
simcity.kResourceIDExpensesFromGlobalMarketImport = 1064686572;
simcity.kResourceIDIncomeHour1 = 744339083;
simcity.kResourceIDIncomeHour2 = 744339080;
simcity.kResourceIDIncomeHour3 = 744339081;
simcity.kResourceIDIncomeHour4 = 744339086;
simcity.kResourceIDIncomeHourTotal = 3714334268;
simcity.kResourceIDExpenseHour1 = 2189616222;
simcity.kResourceIDExpenseHour2 = 2189616221;
simcity.kResourceIDExpenseHour3 = 2189616220;
simcity.kResourceIDExpenseHour4 = 2189616219;
simcity.kResourceIDExpenseHourTotal = 2805098989;
simcity.kResourceIDTotalGlobalMarketExports = 729977193;
simcity.kResourceIDTotalGlobalMarketImports = 1384651186;
simcity.kResourceIDGlobalMarketImportSwitchAlloy = 4224828296;
simcity.kResourceIDGlobalMarketImportSwitchElectronics = 3434348548;
simcity.kResourceIDGlobalMarketImportSwitchComputer = 3727230280;
simcity.kResourceIDGlobalMarketImportSwitchTelevision = 1056961867;
simcity.kResourceIDGlobalMarketImportSwitchFuel = 144585119;
simcity.kResourceIDGlobalMarketImportSwitchMetal = 2471576692;
simcity.kResourceIDGlobalMarketImportSwitchPlastic = 4260496497;
simcity.kResourceIDGlobalMarketImportSwitchOilCrude = 20346938;
simcity.kResourceIDGlobalMarketImportSwitchOreRaw = 842143745;
simcity.kResourceIDGlobalMarketImportSwitchCoal = 1489698110;
simcity.kResourceIDGlobalMarketStorageSwitchAlloy = 3365791684;
simcity.kResourceIDGlobalMarketStorageSwitchElectronics = 1236727784;
simcity.kResourceIDGlobalMarketStorageSwitchComputer = 3053139836;
simcity.kResourceIDGlobalMarketStorageSwitchTelevision = 1279020655;
simcity.kResourceIDGlobalMarketStorageSwitchFuel = 3301552283;
simcity.kResourceIDGlobalMarketStorageSwitchMetal = 1057103032;
simcity.kResourceIDGlobalMarketStorageSwitchPlastic = 547860597;
simcity.kResourceIDGlobalMarketStorageSwitchOilCrude = 3332397918;
simcity.kResourceIDGlobalMarketStorageSwitchOreRaw = 1520358885;
simcity.kResourceIDGlobalMarketStorageSwitchCoal = 3010361306;
simcity.kResourceIDIncomeFromTradingGlobalMarketAlloy = 3296841271;
simcity.kResourceIDIncomeFromTradingGlobalMarketElectronics = 2815455543;
simcity.kResourceIDIncomeFromTradingGlobalMarketComputer = 4050197593;
simcity.kResourceIDIncomeFromTradingGlobalMarketTelevision = 3133188882;
simcity.kResourceIDIncomeFromTradingGlobalMarketFuel = 1601735906;
simcity.kResourceIDIncomeFromTradingGlobalMarketMetal = 1514453991;
simcity.kResourceIDIncomeFromTradingGlobalMarketPlastic = 2949038590;
simcity.kResourceIDIncomeFromTradingGlobalMarketOilCrude = 988882987;
simcity.kResourceIDIncomeFromTradingGlobalMarketOreRaw = 885886012;
simcity.kResourceIDIncomeFromTradingGlobalMarketCoal = 1217290815;
simcity.kResourceIDTotalMoneyExchangedFromTradingGlobalMarket = 1873396370;
simcity.kResourceIDCoalSold = 1289744514;
simcity.kResourceIDCoalSoldPerPeriod = 322831452;
simcity.kResourceIDCoalBought = 836545701;
simcity.kResourceIDCoalBoughtPerPeriod = 1210340541;
simcity.kResourceIDAlloySold = 2613848908;
simcity.kResourceIDAlloySoldPerPeriod = 3883725686;
simcity.kResourceIDAlloyBought = 1214303675;
simcity.kResourceIDAlloyBoughtPerPeriod = 1556699003;
simcity.kResourceIDMetalSold = 2234819268;
simcity.kResourceIDMetalSoldPerPeriod = 1344373566;
simcity.kResourceIDMetalBought = 2737937747;
simcity.kResourceIDMetalBoughtPerPeriod = 3874560195;
simcity.kResourceIDOreRawSold = 3793654149;
simcity.kResourceIDOreRawSoldPerPeriod = 3141343773;
simcity.kResourceIDOreRawBought = 3848335530;
simcity.kResourceIDOreRawBoughtPerPeriod = 2754655540;
simcity.kResourceIDElectronicsSold = 2390706852;
simcity.kResourceIDElectronicsSoldPerPeriod = 1053192094;
simcity.kResourceIDElectronicsBought = 1027977523;
simcity.kResourceIDElectronicsBoughtPerPeriod = 2773559587;
simcity.kResourceIDComputerSold = 3419353448;
simcity.kResourceIDComputerSoldPerPeriod = 3947957066;
simcity.kResourceIDComputerBought = 478960287;
simcity.kResourceIDComputerBoughtPerPeriod = 3304704087;
simcity.kResourceIDTelevisionSold = 176736575;
simcity.kResourceIDTelevisionSoldPerPeriod = 370171767;
simcity.kResourceIDTelevisionBought = 3092291664;
simcity.kResourceIDTelevisionBoughtPerPeriod = 1269655234;
simcity.kResourceIDFuelSold = 181280567;
simcity.kResourceIDFuelSoldPerPeriod = 1530185407;
simcity.kResourceIDFuelBought = 1265611144;
simcity.kResourceIDFuelBoughtPerPeriod = 3387304938;
simcity.kResourceIDOilCrudeSold = 1495594842;
simcity.kResourceIDOilCrudeSoldPerPeriod = 280688644;
simcity.kResourceIDOilCrudeBought = 441274909;
simcity.kResourceIDOilCrudeBoughtPerPeriod = 3896682533;
simcity.kResourceIDPlasticSold = 2342355633;
simcity.kResourceIDPlasticSoldPerPeriod = 3678074289;
simcity.kResourceIDPlasticBought = 636160846;
simcity.kResourceIDPlasticBoughtPerPeriod = 2192732304;
simcity.kResourceIDNumberOfGlobalMarketTruckTripsToday = 1963788054;
simcity.kResourceIDNumberOfGlobalMarketTruckTripsYesterday = 3595790465;
simcity.kResourceIDNumberOfGlobalMarketRailTripsToday = 2234775599;
simcity.kResourceIDNumberOfGlobalMarketRailTripsYesterday = 928297696;
simcity.kResourceIDNumberOfGlobalMarketBoatTripsToday = 3814481661;
simcity.kResourceIDNumberOfGlobalMarketBoatTripsYesterday = 4020012186;
simcity.kResourceIDNumImEx = 2664258250;
simcity.kResourceIDNumImExT2 = 1024576012;
simcity.kResourceIDNumImExT2Rail = 1006493788;
simcity.kResourceIDNumImExT2Boat = 1349457222;
simcity.kResourceIDNumImExElectronicsLots = 1045200723;
simcity.kResourceIDNumImExTelevisionLots = 761894654;
simcity.kResourceIDNumImExComputerLots = 1336216629;
simcity.kResourceIDNumImExCoalLots = 3317445643;
simcity.kResourceIDNumImExMetalLots = 1479508515;
simcity.kResourceIDNumImExPlasticLots = 2577842514;
simcity.kResourceIDNumImExOreRawLots = 293196472;
simcity.kResourceIDNumImExAlloyLots = 38956339;
simcity.kResourceIDNumImExFuelLots = 3312101774;
simcity.kResourceIDNumImExOilCrudeLots = 3837091327;
simcity.kResourceIDNumberOfImExModulesRail = 3281121023;
simcity.kResourceIDNumberOfImExModulesBoat = 2897963837;
simcity.kResourceIDNumberOfImExModulesGarage = 2468342864;
simcity.kResourceIDNumImExUniqueLots = 1278363743;
simcity.kResourceIDPower = 2391494160;
simcity.kResourceIDPowerToTransmit = 1970301135;
simcity.kResourceIDPowerToTransmit_Last = 3380970990;
simcity.kResourceIDPowerToSend = 3989257529;
simcity.kResourceIDPowerGlobals_NumberOfPowerPlants = 2606261736;
simcity.kResourceIDActivePowerModules = 2173889837;
simcity.kResourceIDPowerGlobals_UnpoweredBuildings = 3073328857;
simcity.kResourceIDPowerGlobals_NumberOfPowerConsumers = 2364168533;
simcity.kResourceIDPowerGlobals_TotalPowerTransmitted = 1378387405;
simcity.kResourceIDPowerGlobals_TotalPowerWasted = 1879271684;
simcity.kResourceIDPowerGlobals_TotalPowerTransmittedPerHour = 416922972;
simcity.kResourceIDPowerGlobals_TotalPowerWastedPerHour = 3629553167;
simcity.kResourceIDPowerGlobals_TotalPowerConsumedPerHour = 522916859;
simcity.kResourceIDPowerNeeded = 2285470215;
simcity.kResourceIDPowerSaved = 2314828681;
simcity.kResourcePowerProduction = 1052088121;
simcity.kResourceIDTradeImportedPowerCounter = 3167536464;
simcity.kResourceIDTradeExcessPower = 1849174591;
simcity.kResourceIDTradePowerUsedProfit = 1886172729;
simcity.kResourceIDTradePowerAvailableFromConnection = 1615260137;
simcity.kResourceIDWindSpeed = 1726592700;
simcity.kResourceIDWindDirection = 825623898;
simcity.kResourceIDEnvTemperature = 899752953;
simcity.kResourceIDEnvNumActiveRainStorm = 6230968;
simcity.kResourceIDEnvNumClouds = 3464232719;
simcity.kResourceIDEnvAirPollutionPerHour = 295846734;
simcity.kResourceIDPower_NumberOfWindFarms = 2986464513;
simcity.kResourceIDPower_NumberOfWindTurbines = 2986464513;
simcity.kResourceIDPower_NumberOfWindBatteries = 1593228548;
simcity.kResourceIDPower_NumberOfT1CoalPowerPlants = 158526204;
simcity.kResourceIDPower_NumberOfT2CoalPowerPlants = 2579340361;
simcity.kResourceIDPower_NumberOfT1OilPowerPlants = 2661237096;
simcity.kResourceIDPower_NumberOfSolarUnits = 4071541271;
simcity.kResourceIDPower_NumberOfSolarPlants = 3877125076;
simcity.kResourceIDPower_NumberOfNuclearPowerPlants = 733601808;
simcity.kResourceIDPower_SolarBatteryUnlocked = 341175594;
simcity.kResourceIDPower_NumberOfSolarBatteries = 3667278425;
simcity.kResourceIDSolarAnimBin = 3898125546;
simcity.kResourceIDPower_Nuclear_Unlocked = 3268602197;
simcity.kResourceIDPower_Nuclear_Level2_Unlocked = 3856162070;
simcity.kResourceIDPower_Nuclear_Level3_Unlocked = 3499159141;
simcity.kResourceIDGlobal_TotalCoalBurned = 4249582378;
simcity.kResourceIDGlobal_TotalCoalRemainingAtPowerStations = 717843307;
simcity.kResourceIDLowCoalLevel = 30052478;
simcity.kResourceIDOutOfCoal = 3556542897;
simcity.kResourceIDStoredPower = 390684623;
simcity.kResourceIDPowerGlobals_TotalSolarPowerPerHour = 3227733056;
simcity.kResourceIDPowerGlobals_TotalCoalPowerPerHour = 1467018548;
simcity.kResourceIDPowerGlobals_TotalOilCrudePowerPerHour = 79984296;
simcity.kResourceIDPowerGlobals_TotalWindPowerPerHour = 3668962503;
simcity.kResourceIDPowerGlobals_TotalNuclearPowerPerHour = 3403938237;
simcity.kResourceIDPeakPower = 1164171395;
simcity.kResourceIDWater_Unlocked = 977057198;
simcity.kResourceIDGerms = 2069247941;
simcity.kResourceIDGermsInPump = 2419540322;
simcity.kResourceIDGermsInPumpPossible = 2743111863;
simcity.kResourceIDHabitableBuilding = 3439906669;
simcity.kResourceIDWater = 2654748154;
simcity.kResourceIDWaterToTransmit = 2079986297;
simcity.kResourceIDWaterInMap = 1087599423;
simcity.kResourceIDTradeImportedWaterCounter = 242951582;
simcity.kResourceIDTradeWaterAvailableFromConnection = 1141470647;
simcity.kResourceIDWaterConsumer_Category = 201972339;
simcity.kResourceIDWaterGlobals_TotalWaterReverted = 2428674279;
simcity.kResourceIDWaterGlobals_TotalWaterRevertedPerHour = 746424382;
simcity.kResourceIDWaterGlobals_TotalFilteredWaterReverted = 415590524;
simcity.kResourceIDWaterGlobals_TotalFilteredWaterRevertedPerHour = 842461623;
simcity.kResourceIDWaterGlobals_TotalWaterTransmitted = 1662655973;
simcity.kResourceIDWaterGlobals_TotalWaterTransmittedPerHour = 1194734180;
simcity.kResourceIDWaterGlobals_TotalFilteredWaterTransmitted = 1920891692;
simcity.kResourceIDWaterGlobals_TotalFilteredWaterTransmittedPerHour = 4120791367;
simcity.kResourceIDWaterGlobals_TotalPollutionTransmitted = 3148278792;
simcity.kResourceIDWaterGlobals_UnwateredBuildings = 4014979477;
simcity.kResourceIDWaterGlobals_NumberOfWaterConsumers = 760220921;
simcity.kResourceIDWaterGlobals_MostGermsInOnePump = 2124847579;
simcity.kResourceIDWaterNeeded = 3460700677;
simcity.kResourceIDWaterSaved = 4146722191;
simcity.kResourceIDTradeExcessWater = 3864099713;
simcity.kResourceIDTradeWaterUsedProfit = 3174198451;
simcity.kResourceIDWaterGlobals_TotalWaterConsumed = 2761144568;
simcity.kResourceIDWaterProduction = 2869873311;
simcity.kResourceIDWaterGlobals_TotalWaterConsumedPerHour = 1447027699;
simcity.kResourceIDWaterGlobals_NumberOfWaterPlants = 2577063972;
simcity.kResourceIDWaterGlobals_NumberOfT1WaterPlants = 2696220259;
simcity.kResourceIDWaterGlobals_NumberOfT2WaterPlants = 2148514006;
simcity.kResourceIDWaterTableLow = 3951760264;
simcity.kResourceIDWaterTableDry = 4000710265;
simcity.kResourceIDWaterPolluted = 764394837;
simcity.kResourceIDWaterMin = 728390398;
simcity.kResourceIDWaterGlobals_TotalGermsTransmitted = 662584172;
simcity.kResourceIDWaterGlobals_TotalGermsTransmittedPerHour = 2236897159;
simcity.kResourceIDWaterGlobals_TotalGermsPossiblePerHour = 4031991483;
simcity.kResourceIDPumpingFromRiver = 1824026097;
simcity.kResourceIDSewage = 3441286197;
simcity.kResourceIDSewagePlants = 2844137639;
simcity.kResourceIDSewagePlants_T1 = 2401586943;
simcity.kResourceIDSewagePlants_T2 = 2401586940;
simcity.kResourceIDSewageDumped_PerHour = 3275514806;
simcity.kResourceIDSewageDumped_ThisHour = 83798609;
simcity.kResourceIDSewageProcessedDisplay = 1907491887;
simcity.kResourceIDSewageProcessed_PerHour = 3953690037;
simcity.kResourceIDSewageProcessed_ThisHour = 1636384468;
simcity.kResourceIDSewageTransmitted_PerHour = 4169697046;
simcity.kResourceIDSewageTransmitted_ThisHour = 2212327217;
simcity.kResourceIDSewageTreatedDisplay = 2661322162;
simcity.kResourceIDSewageTreated_PerHour = 3675392238;
simcity.kResourceIDSewageTreated_ThisHour = 451772505;
simcity.kResourceIDSewageMainStorage = 3138363369;
simcity.kResourceIDSewageMainStorage_ThisHour = 1283293498;
simcity.kResourceIDSewageMainStorage_Last = 1773973540;
simcity.kResourceIDSewageMainStorage_Full = 2761963643;
simcity.kResourceIDSewageTreatment_Capacity = 1152457658;
simcity.kResourceIDTradeSewageUsed = 719096374;
simcity.kResourceIDTradeExcessSewageExportAllowed = 3225371826;
simcity.kResourceIDTradeSewageExportAllowedUsed = 1401034738;
simcity.kResourceIDTradeSewageExportAllowedUsedToSendFromBefore = 1735744194;
simcity.kResourceIDSewageTreatmentImportExchangeRate = 3282197541;
simcity.kResourceIDTradeSewageExportAllowedUsedProfit = 4000070540;
simcity.kResourceIDSewageExportAllowed = 1373910137;
simcity.kResourceIDSewageExportAllowedToTransmit = 755822166;
simcity.kResourceIDTradeSewageExportAllowedAvailableFromConnection = 1795085242;
simcity.kResourceIDRoomsOccupied = 3654708327;
simcity.kResourceIDRoomsFree = 2429027557;
simcity.kResourceIDSick = 721332855;
simcity.kResourceIDSickW1 = 3416150199;
simcity.kResourceIDSickW2 = 3416150196;
simcity.kResourceIDSickW3 = 3416150197;
simcity.kResourceIDSickHouses = 2060601528;
simcity.kResourceIDInjury = 100017236;
simcity.kResourceIDInjuryW1 = 2397898272;
simcity.kResourceIDInjuryW2 = 2397898275;
simcity.kResourceIDInjuryW3 = 2397898274;
simcity.kResourceIDDeath = 779278001;
simcity.kResourceIDDeathPerDay = 4130414096;
simcity.kResourceIDDeathFromInjury = 2183338900;
simcity.kResourceIDDeathFromInjuryPerDay = 2201818245;
simcity.kResourceIDAmbulance = 3809484581;
simcity.kResourceIDAmbulanceSuccesses = 2622519670;
simcity.kResourceIDSickHealingW1 = 301986399;
simcity.kResourceIDSickHealingW2 = 301986396;
simcity.kResourceIDSickHealingW3 = 301986397;
simcity.kResourceIDSickWaiting = 3896854408;
simcity.kResourceIDSickWaitingW1 = 1586605964;
simcity.kResourceIDSickWaitingW2 = 1586605967;
simcity.kResourceIDSickWaitingW3 = 1586605966;
simcity.kResourceIDInjuryHealingW1 = 2176436982;
simcity.kResourceIDInjuryHealingW2 = 2176436981;
simcity.kResourceIDInjuryHealingW3 = 2176436980;
simcity.kResourceIDInjuryWaiting = 3825955281;
simcity.kResourceIDInjuryWaitingW1 = 1469184685;
simcity.kResourceIDInjuryWaitingW2 = 1469184686;
simcity.kResourceIDInjuryWaitingW3 = 1469184687;
simcity.kResourceIDWaitingRoom = 688112595;
simcity.kResourceIDHospitalsBuilt = 2514784742;
simcity.kResourceIDT1HospitalsBuilt = 240239751;
simcity.kResourceIDT2HospitalsBuilt = 3484217500;
simcity.kResourceIDHospitalGaragesBuilt = 1141362145;
simcity.kResourceIDWaitingRoomIsFull = 534885744;
simcity.kResourceIDWaitingRoomIsAlmostFull = 2987146474;
simcity.kResourceIDTotalSickTreated = 2194328826;
simcity.kResourceIDTotalInjuryTreated = 2712725895;
simcity.kResourceIDNeighborRoomsOccupied = 4020159333;
simcity.kResourceIDNeighborHospitalRooms = 2551666427;
simcity.kResourceIDHospitalRooms = 255679233;
simcity.kResourceIDSickHealing = 2748482431;
simcity.kResourceIDInjuryHealing = 2788082702;
simcity.kResourceIDSurgeryCenterUnlocked = 2507958630;
simcity.kResourceIDSickGlobal = 2698308234;
simcity.kResourceIDSickGlobal_PerDay = 3336377824;
simcity.kResourceIDInjuryGlobal = 1670060833;
simcity.kResourceIDInjuryGlobal_PerDay = 393869773;
simcity.kResourceIDSickHealed = 31969966;
simcity.kResourceIDSickHealedDisplay = 2487810256;
simcity.kResourceIDSickHealed_PerDay = 3547645092;
simcity.kResourceIDSickToInjured = 571110619;
simcity.kResourceIDSickToInjured_PerDay = 2403448379;
simcity.kResourceIDSickToNormal = 1409835085;
simcity.kResourceIDSickToNormal_PerDay = 3574097577;
simcity.kResourceIDInjuryHealed = 1803074941;
simcity.kResourceIDInjuryHealedDisplay = 1874156469;
simcity.kResourceIDInjuryHealed_PerDay = 581291193;
simcity.kResourceIDMeltdown_TimerImminent = 3573132440;
simcity.kResourceIDDisasterMeltdown_InProgress = 2565106093;
simcity.kResourceIDDisasterMeltdown_HadMeltdown = 1328915890;
simcity.kResourceIDDisasterMeltdown_Recent = 941446812;
simcity.kResourceIDDisasterMeltdown_TimerRecentMeltdown = 2337119395;
simcity.kResourceIDNuclearReactor_LowSkill = 1322853549;
simcity.kResourceIDNuclearReactor_MediumSkill = 1114403040;
simcity.kResourceIDSlacker = 417810726;
simcity.kResourceIDHomeless = 1134006559;
simcity.kResourceIDHomelessForaging = 2828460396;
simcity.kResourceIDHomelessPanhandling = 1884585487;
simcity.kResourceIDHomelessSleeping = 4070836136;
simcity.kResourceIDHomelessPerPeriod = 293503959;
simcity.kResourceIDHomelessThisPeriod = 1285724032;
simcity.kResourceIDHomelessDisplay = 3680114479;
simcity.kResourceIDHomelessDead = 1721735285;
simcity.kResourceIDNumberOfBuildingsBurnedDown = 3599668696;
simcity.kResourceIDNumberOfBuildingsBurnedDownPerDay = 1364884217;
simcity.kResourceIDNumberOfFiresExtinguishedDisplay = 3888681899;
simcity.kResourceIDNumberOfFiresExtinguished = 4249512003;
simcity.kResourceIDNumberOfFiresExtinguishedPerDay = 3560249318;
simcity.kResourceIDIsBurning = 2018489714;
simcity.kResourceIDIsSmoking = 1411913709;
simcity.kResourceIDNumberOfFires = 628314840;
simcity.kResourceIDNumberOfHazMatFires = 2100610503;
simcity.kResourceIDNumberOfGarages = 531821913;
simcity.kResourceIDHazMatFireTrucksAvailable = 251332573;
simcity.kResourceIDNumberOfConnectedFlagPoles = 1526740117;
simcity.kResourceIDNumberOfConnectedSigns = 1608206460;
simcity.kResourceIDNumberOfFireDispatchModules = 2710077002;
simcity.kResourceIDT2FireStationUnlocked = 145258902;
simcity.kResourceIDMissionFireCost = 3313367558;
simcity.kResourceIDFireTradeToken = 3703805660;
simcity.kResourceIDAmountOfRubble = 4182034904;
simcity.kResourceIDAmountOfAbandoned = 2117976370;
simcity.kResourceIDFireRisk = 2645400692;
simcity.kResourceIDFlammableBuilding = 392496542;
simcity.kResourceIDFirefighter = 408865432;
simcity.kResourceIDNumberOfFireStations = 3713431570;
simcity.kResourceIDNumberOfT2FireStations = 1419205672;
simcity.kResourceIDNumberOfT1FireStations = 282350843;
simcity.kResourceIDHazmatGarageUnlocked = 2403112628;
simcity.kResourceIDHeat = 3448274455;
simcity.kResourceIDFireFuel = 1881207573;
simcity.kResourceIDFireLevel = 2458181481;
simcity.kResourceIDNumberOfHazMatFiresStarted = 1311069994;
simcity.kResourceIDNumberOfHazMatFiresStartedPerDay = 3046939575;
simcity.kResourceIDNumberOfHazMatFiresExtinguishedDisplay = 4224550078;
simcity.kResourceIDNumberOfHazMatFiresExtinguished = 3125239420;
simcity.kResourceIDNumberOfHazMatFiresExtinguishedPerDay = 1349067133;
simcity.kResourceIDFireHelicopter = 237357014;
simcity.kResourceIDHazMatTruck = 1664109457;
simcity.kResourceIDKid = 1115957451;
simcity.kResourceIDKidE2 = 440145198;
simcity.kResourceIDKidE3 = 440145199;
simcity.kResourceIDStudent = 740139282;
simcity.kResourceIDEducatedAtModule = 704127089;
simcity.kResourceIDKnowledgeToken = 2286658974;
simcity.kResourceIDStudentTokenE2 = 2520886016;
simcity.kResourceIDStudentTokenE3 = 2520886017;
simcity.kResourceIDSpotsForKids = 98217382;
simcity.kResourceIDSpotsForKidsE2 = 2176723623;
simcity.kResourceIDSpotsForKidsE3 = 2176723622;
simcity.kResourceIDSpotsForKidsE2Yesterday = 3491541885;
simcity.kResourceIDSpotsForKidsE3Yesterday = 49613830;
simcity.kResourceIDOverCrowding = 346657110;
simcity.kResourceIDKnowledgeLevel = 3636108215;
simcity.kResourceIDSkillLevelE2 = 3809638447;
simcity.kResourceIDKnowledgeLevelE2 = 2402132834;
simcity.kResourceIDEducationLevel = 232759661;
simcity.kResourceIDPreviouslyEducated = 3564237080;
simcity.kResourceIDStudentE2 = 34434427;
simcity.kResourceIDTradeExcessStudentE2 = 1893297692;
simcity.kResourceIDStudentStudyingE2 = 3473635378;
simcity.kResourceIDSkillLevel = 1501738158;
simcity.kResourceIDSkillLevelE3 = 3809638446;
simcity.kResourceIDKnowledgeLevelE3 = 2402132835;
simcity.kResourceIDStudentE3 = 34434426;
simcity.kResourceIDTradeExcessStudentE3 = 1893297693;
simcity.kResourceIDStudentStudyingE3 = 3473635379;
simcity.kResourceIDStudentToLeave = 2094443002;
simcity.kResourceIDSkillTokenE2 = 3879054254;
simcity.kResourceIDSkillTokenE3 = 3879054255;
simcity.kResourceIDResearch = 3895945778;
simcity.kResourceIDResearchNeeded = 866952621;
simcity.kResourceIDChoseNotToBeACriminal = 1941242284;
simcity.kResourceIDDidntGetSick = 2902165652;
simcity.kResourceIDStudentsNeeded_00 = 1197110181;
simcity.kResourceIDStudentsNeeded_03 = 1197110182;
simcity.kResourceIDStudentsNeeded_06 = 1197110179;
simcity.kResourceIDStudentsNeeded_09 = 1197110188;
simcity.kResourceIDStudentsNeeded_12 = 1180332592;
simcity.kResourceIDStudentsNeeded_15 = 1180332599;
simcity.kResourceIDStudentsNeeded_18 = 1180332602;
simcity.kResourceIDStudentsNeeded_21 = 1163554910;
simcity.kResourceIDLowSkill = 3015282364;
simcity.kResourceIDPower_SolarAdvanced_Unlocked = 3081991888;
simcity.kResourceIDPowerGlobals_LargeTurbine_Unlocked = 3621586015;
simcity.kResourceIDPower_Coal_Level3_Unlocked = 1492467248;
simcity.kResourceIDPower_OilCrude_Level3_Unlocked = 1957988;
simcity.kResourceIDNumberOfUniversities = 1083498385;
simcity.kResourceIDNumberOfGradeSchoolBases = 3887711568;
simcity.kResourceIDNumberOfGradeSchoolClassrooms = 1268332486;
simcity.kResourceIDNumberOfGradeSchoolLots = 3270524974;
simcity.kResourceIDNumberOfGradeSchoolBusStops = 1006854443;
simcity.kResourceIDNumberOfHighSchoolBases = 917921497;
simcity.kResourceIDNumberOfHighSchoolLots = 95643033;
simcity.kResourceIDNumberOfHighSchoolWings = 3367215595;
simcity.kResourceIDNumberOfHighSchoolGyms = 1605020049;
simcity.kResourceIDNumberOfCollegeBases = 2107386330;
simcity.kResourceIDNumberOfCollegeWings = 4269697596;
simcity.kResourceIDNumberOfAthleticsWings = 3121219368;
simcity.kResourceIDNumberOfBusinessWings = 4097152405;
simcity.kResourceIDNumberOfEducationWings = 2306587915;
simcity.kResourceIDNumberOfEngineeringWings = 1380060006;
simcity.kResourceIDNumberOfLawWings = 806951873;
simcity.kResourceIDNumberOfMedicineWings = 1594127707;
simcity.kResourceIDNumberOfScienceWings = 398637047;
simcity.kResourceIDNumberOfDormWings = 704863715;
simcity.kResourceIDT1GradeSchoolLotUnlocked = 2579792801;
simcity.kResourceIDSchoolBusT1StopUnlocked = 2406422179;
simcity.kResourceIDT1CollegeBaseUnlocked = 2789753771;
simcity.kResourceIDT2HighSchoolBaseUnlocked = 100759655;
simcity.kResourceIDT2UniversityBaseUnlocked = 1375519319;
simcity.kResourceIDExamsPassedE2 = 162463022;
simcity.kResourceIDExamsPassedE3 = 162463023;
simcity.kResourceIDUniversityStudents = 2343050577;
simcity.kResourceIDExamsPassedTodayE2 = 4067506367;
simcity.kResourceIDExamsPassedTodayE3 = 4067506366;
simcity.kResourceIDExamsPassedYesterdayE2 = 699705304;
simcity.kResourceIDExamsPassedYesterdayE3 = 699705305;
simcity.kResourceIDLocalStudentsTodayE2 = 3740669344;
simcity.kResourceIDLocalStudentsTodayE3 = 3740669345;
simcity.kResourceIDLocalStudentsYesterdayE2 = 2442378631;
simcity.kResourceIDLocalStudentsYesterdayE3 = 2442378630;
simcity.kResourceIDTradeStudentW1 = 1010515150;
simcity.kResourceIDTradeStudentW2 = 1010515149;
simcity.kResourceIDTradeStudentW3 = 1010515148;
simcity.kResourceIDFromTradingConnection = 4284702440;
simcity.kResourceIDNumberOfLibraries = 946409126;
simcity.kResourceIDNumberOfParks = 3919575048;
simcity.kResourceIDNumberOfT1Parks = 1105413579;
simcity.kResourceIDNumberOfT2Parks = 3547829422;
simcity.kResourceIDNumberOfT3Parks = 3861897597;
simcity.kResourceIDParkVisitors = 3617895960;
simcity.kResourceIDParkVisitorsW1ThisPeriod = 716048171;
simcity.kResourceIDParkVisitorsW2ThisPeriod = 858020864;
simcity.kResourceIDParkVisitorsW3ThisPeriod = 1175000809;
simcity.kResourceIDParkVisitorsW1PerPeriod = 3525565542;
simcity.kResourceIDParkVisitorsW2PerPeriod = 1480752471;
simcity.kResourceIDParkVisitorsW3PerPeriod = 1520338880;
simcity.kResourceIDCulturalVisitorsW1ThisPeriod = 1011508605;
simcity.kResourceIDCulturalVisitorsW2ThisPeriod = 1102856182;
simcity.kResourceIDCulturalVisitorsW3ThisPeriod = 259679967;
simcity.kResourceIDCulturalVisitorsW1PerPeriod = 1404846524;
simcity.kResourceIDCulturalVisitorsW2PerPeriod = 1653926529;
simcity.kResourceIDCulturalVisitorsW3PerPeriod = 1998420978;
simcity.kResourceIDParkKid = 3926021311;
simcity.kResourceIDParkGlobals_TouristsDisplay = 3694149307;
simcity.kResourceIDParkGlobals_Tourists = 3732098067;
simcity.kResourceIDParkGlobals_TouristsPerDay = 3442763798;
simcity.kResourceIDParkGlobals_KidsDisplay = 2604781581;
simcity.kResourceIDParkGlobals_Kids = 1855609397;
simcity.kResourceIDParkGlobals_KidsPerDay = 943514404;
simcity.kResourceIDParkGlobals_LocalsDisplay = 3218409028;
simcity.kResourceIDParkGlobals_Locals = 2870853610;
simcity.kResourceIDParkGlobals_LocalsPerDay = 585103479;
simcity.kResourceIDParkGlobals_Homeless = 4163994496;
simcity.kResourceIDParkGlobals_HomelessPerDay = 3983377073;
simcity.kResourceIDNumberOfCultural = 2176476263;
simcity.kResourceIDCulturalVisitors = 3089971634;
simcity.kResourceIDGarbage = 2092055118;
simcity.kResourceIDGarbageToBurn = 1116260754;
simcity.kResourceIDGarbageBurnedPerHour = 2083566345;
simcity.kResourceIDGarbageDisplay = 1422559728;
simcity.kResourceIDGarbageInDump = 2001853293;
simcity.kResourceIDGarbageDumpCapacity = 2012180508;
simcity.kResourceIDNeighborGarbageInDump = 3091007075;
simcity.kResourceIDNeighborGarbageDumpCapacity = 1912199982;
simcity.kResourceIDGarbagePickedUpYesterday = 1042773031;
simcity.kResourceIDGarbageProducedYesterday = 1269705882;
simcity.kResourceIDNumberOfDumpDocks = 2474366461;
simcity.kResourceIDGarbagePickedUpToday = 900913296;
simcity.kResourceIDGarbageProducedToday = 2418247421;
simcity.kResourceIDGarbagePollutionToday = 505976303;
simcity.kResourceIDGarbagePollutionYesterday = 317495968;
simcity.kResourceIDNumIncinerators = 1483232536;
simcity.kResourceIDNumberOfGarbageProducers = 2100950799;
simcity.kResourceIDGarbageDisplayCount = 1422559728;
simcity.kResourceIDGarbagePickedUpRecord = 2235301706;
simcity.kResourceIDGarbagePickUpNeeded = 4134097061;
simcity.kResourceIDGarbageInCityPerDay = 767419539;
simcity.kResourceIDRecyclingInCityPerDay = 4139349220;
simcity.kResourceIDGarbageInCityPerDay_Last = 2546219826;
simcity.kResourceIDRecyclingInCityPerDay_Last = 1852581215;
simcity.kResourceIDRecyclablesPickUpNeeded = 3864048725;
simcity.kResourceIDGarbageTruck = 1782312919;
simcity.kResourceIDGarbageLost = 4294081512;
simcity.kResourceIDGarbageLostPerDay = 4037031209;
simcity.kResourceIDRecyclablesLost = 4024725176;
simcity.kResourceIDRecyclablesLostPerDay = 809563353;
simcity.kResourceIDRecyclables = 551108766;
simcity.kResourceIDAvailableRecyclingCenter = 627676295;
simcity.kResourceIDRecyclableDisplay = 1191146176;
simcity.kResourceIDRecyclablesCapacity = 1974714610;
simcity.kResourceIDRecyclablesPickedUpToday = 289279968;
simcity.kResourceIDRecyclablesProducedToday = 2550194061;
simcity.kResourceIDRecyclablesPickedUpYesterday = 3008408535;
simcity.kResourceIDRecyclablesProducedYesterday = 2867503114;
simcity.kResourceIDNumberOfRecyclingCenters = 4025811973;
simcity.kResourceIDNumberOfPlasticRecoverers = 1071221463;
simcity.kResourceIDNumberOfMetalRecoverers = 2280604842;
simcity.kResourceIDNumberOfAlloyRecoverers = 1116983938;
simcity.kResourceIDRecyclingLevel = 3504198833;
simcity.kResourceIDRecyclingTruck = 2161441970;
simcity.kResourceIDLandmarkSpecialtyIncomeDisplay = 436116592;
simcity.kResourceIDLandmarkSpecialtyExpensesDisplay = 787050322;
simcity.kResourceIDHasLandmark = 996218559;
simcity.kResourceIDHasLandmarkBigBen = 2638741178;
simcity.kResourceIDHasLandmarkEiffelTower = 1820676685;
simcity.kResourceIDHasLandmarkTokyoTower = 2771774834;
simcity.kResourceIDHasLandmarkBrandenburggate = 3356701108;
simcity.kResourceIDLandmarksUnlocked = 1262648471;
simcity.kResourceIDPoliceStationsBuilt = 1293645856;
simcity.kResourceIDPoliceStationsT1Built = 3195604778;
simcity.kResourceIDPoliceStationsT2Built = 3195604777;
simcity.kResourceIDNumberOfPoliceCars = 1306127202;
simcity.kResourceIDPolice = 291106007;
simcity.kResourceIDPoliceDetectiveVan = 2017795159;
simcity.kResourceIDPoliceDetectiveVan_Parking = 2772202942;
simcity.kResourceIDPoliceHelicopter = 1792517440;
simcity.kResourceIDCriminalsArrested = 3969035757;
simcity.kResourceIDCriminalsArrestedPerDay = 1304762412;
simcity.kResourceIDCriminalsArrestedDisplay = 2344037413;
simcity.kResourceIDRegionalCrimesCommitted_ThisDay = 260071832;
simcity.kResourceIDRegionalCrimesCommitted_PerDay = 802678475;
simcity.kResourceIDCriminalRobber = 3072965302;
simcity.kResourceIDCriminalMurderer = 4039250154;
simcity.kResourceIDCriminalRobberAvailable = 334606379;
simcity.kResourceIDCriminalMurdererAvailable = 549533239;
simcity.kResourceIDCriminalArsonistAvailable = 2076692708;
simcity.kResourceIDRegionalCriminalRobber_Arrested = 3500530816;
simcity.kResourceIDRegionalCriminalMurderer_Arrested = 1132834384;
simcity.kResourceIDRegionalCriminalArsonist_Arrested = 547650187;
simcity.kResourceIDRegionalCriminalEmbezzler_Arrested = 3488315592;
simcity.kResourceIDRegionalCriminalsIncarcerated = 3319542441;
simcity.kResourceIDCrimeLevel_ThisDay = 2190858014;
simcity.kResourceIDCrimeLevel_PerDay = 1408842461;
simcity.kResourceIDCriminal = 504673986;
simcity.kResourceIDCriminalShoplifter = 210128832;
simcity.kResourceIDCriminalMugger = 831598359;
simcity.kResourceIDCriminalArsonist = 489608795;
simcity.kResourceIDCriminalArsonistLight = 578176265;
simcity.kResourceIDCriminalLevel = 472412220;
simcity.kResourceIDCriminalViolence = 1667152949;
simcity.kResourceIDCriminalVandalism = 70341145;
simcity.kResourceIDCriminalTheft = 1440298021;
simcity.kResourceIDCriminalWhiteCollar = 2252979462;
simcity.kResourceIDCriminalTaxEvader = 878884418;
simcity.kResourceIDCriminalEmbezzler = 3793237216;
simcity.kResourceIDCriminalHome = 2554664627;
simcity.kResourceIDCriminalXP = 656078922;
simcity.kResourceIDArson = 1197405812;
simcity.kResourceIDNearArson = 3648115806;
simcity.kResourceIDShoplifting = 2469405894;
simcity.kResourceIDNearShoplifting = 3678368572;
simcity.kResourceIDRobbery = 3627131386;
simcity.kResourceIDNearRobbery = 3918001720;
simcity.kResourceIDMugging = 3118140107;
simcity.kResourceIDNearMugging = 677187317;
simcity.kResourceIDMurder = 3288599948;
simcity.kResourceIDNearMurder = 2800827634;
simcity.kResourceIDEmbezzling = 3771148900;
simcity.kResourceIDEmbezzlingCost = 3453697323;
simcity.kResourceIDCrimesCommitted = 3969752110;
simcity.kResourceIDCrimesCommitted_PerDay = 798709028;
simcity.kResourceIDCriminalsAtLarge = 323121511;
simcity.kResourceIDCriminalsAtLargePerDay = 2137315242;
simcity.kResourceIDArsonistsAtLarge = 449847969;
simcity.kResourceIDCriminalsIncarcerated = 3192894076;
simcity.kResourceIDCriminalsInJailPerDay = 134950725;
simcity.kResourceIDCriminalsRehabilitated = 2960242855;
simcity.kResourceIDCriminalsRehabilitatedToday = 1663983338;
simcity.kResourceIDCriminalsRehabilitatedPerDay = 1984162026;
simcity.kResourceIDCriminalsReleasedOvercrowding = 122084851;
simcity.kResourceIDCriminalsReleasedOvercrowdingToday = 3695701462;
simcity.kResourceIDCriminalsReleasedOvercrowdingPerDay = 204908534;
simcity.kResourceIDVandalismLevel = 3967031134;
simcity.kResourceIDTotalCells = 3130193432;
simcity.kResourceIDNeighborTotalCells = 2554438882;
simcity.kResourceIDOpenCells = 2801080940;
simcity.kResourceIDDetectiveWingUnlocked = 2969418732;
simcity.kResourceIDDetectiveWingsBuilt = 546841254;
simcity.kResourceIDOutreachWingsBuilt = 1015652820;
simcity.kResourceIDNumberOfConnections = 2420041124;
simcity.kResourceIDNumberOfClaimedConnections = 182553747;
simcity.kResourceIDHasMayorsMansion = 772640335;
simcity.kResourceIDHasMayorsHouseSmall = 3602055689;
simcity.kResourceIDOverDriveTimer = 2440987956;
simcity.kResourceIDOverDriveTimerForMansion = 871363660;
simcity.kResourceIDMansionUpgradeTarget = 3605773391;
simcity.kResourceIDMayorUpgradeAvailable = 273805726;
simcity.kResourceIDRating_LocalForUnlock = 532307531;
simcity.kResourceIDTutorialEnabled = 3085667686;
simcity.kResourceIDRegional_HQ_CityHall_IsOn = 2312380229;
simcity.kResourceIDHQ_CityHall_Built = 1131078174;
simcity.kResourceIDHQ_CityHall_IsOn = 3376403637;
simcity.kResourceIDHQ_CityHall_Level2_IsOn = 2304628942;
simcity.kResourceIDTotalBonds1 = 3750279930;
simcity.kResourceIDTotalBonds2 = 3750279929;
simcity.kResourceIDTotalBonds3 = 3750279928;
simcity.kResourceIDExpensesFromBonds1 = 912516801;
simcity.kResourceIDExpensesFromBonds2 = 912516802;
simcity.kResourceIDExpensesFromBonds3 = 912516803;
simcity.kResourceIDExpensesFromBondsInterest1 = 3229502908;
simcity.kResourceIDExpensesFromBondsInterest2 = 3229502911;
simcity.kResourceIDExpensesFromBondsInterest3 = 3229502910;
simcity.kResourceIDHQ_CityHall_Level = 897245280;
simcity.kResourceIDHQ_CityHall_OpenModules = 2879354421;
simcity.kResourceIDHQ_CityHall_Unlocked = 226625445;
simcity.kResourceIDHQ_CityHall_Education_Module_IsOn = 3923095905;
simcity.kResourceIDHQ_CityHall_Finance_Module_IsOn = 567687869;
simcity.kResourceIDHQ_CityHall_Safety_Module_IsOn = 215766017;
simcity.kResourceIDHQ_CityHall_Tourism_Module_IsOn = 3212839908;
simcity.kResourceIDHQ_CityHall_Transportation_Module_IsOn = 2181372253;
simcity.kResourceIDHQ_CityHall_Utilities_Module_IsOn = 2970167355;
simcity.kResourceIDHQ_CityHall_Transportation_Module_Built = 2483746982;
simcity.kResourceIDHandshakeSent = 610756730;
simcity.kResourceIDHandshakeReceived = 2190472937;
simcity.kResourceIDNorth = 4279573130;
simcity.kResourceIDSouth = 992193856;
simcity.kResourceIDEast = 529018174;
simcity.kResourceIDWest = 1723483016;
simcity.kResourceIDTradeDealMyPowerRequest = 919910727;
simcity.kResourceIDTradeDealMyPowerAgreement = 4282683288;
simcity.kResourceIDTradeDealPowerStatus = 3106217408;
simcity.kResourceIDTradeDealPowerSize = 343268165;
simcity.kResourceIDTradeDealMyWaterRequest = 2867838445;
simcity.kResourceIDTradeDealMyWaterAgreement = 4133997914;
simcity.kResourceIDTradeDealWaterStatus = 228341758;
simcity.kResourceIDTradeDealWaterSize = 2286467667;
simcity.kResourceIDTradeGiftSimoleonsSize = 2361644679;
simcity.kResourceIDNumberOfRegionalWorks = 1760472636;
simcity.kResourceIDConnected = 1629494038;
simcity.kResourceIDWorkerTruck = 1935164160;
simcity.kResourceIDClaimedBox = 3501625368;
simcity.kResourceIDTradeGiftSendingSimoleons = 3982444360;
simcity.kResourceIDTradeGiftSimoleonsSize = 2361644679;
simcity.kResourceIDTradeTrackingTotalPower = 2825663747;
simcity.kResourceIDTradeTrackingExcessPower = 2064475082;
simcity.kResourceIDTradeTrackingDeficitPower = 2070310611;
simcity.kResourceIDTradeTrackingNeededPower = 154028464;
simcity.kResourceIDTradePowerUsedToSend = 513060426;
simcity.kResourceIDTradePowerUsedToSendFromBefore = 2204609991;
simcity.kResourceIDPowerImportExchangeRate = 1899495326;
simcity.kResourceIDTradeTrackingSwitchConnectionPower = 1897010737;
simcity.kResourceIDTradeTrackingTotalWater = 205888501;
simcity.kResourceIDTradeTrackingExcessWater = 3800635496;
simcity.kResourceIDTradeTrackingDeficitWater = 2713311365;
simcity.kResourceIDTradeTrackingNeededWater = 417282202;
simcity.kResourceIDTradeWaterUsedToSend = 1924344012;
simcity.kResourceIDTradeWaterUsedToSendFromBefore = 3824472781;
simcity.kResourceIDWaterImportExchangeRate = 100106280;
simcity.kResourceIDTradeTrackingSwitchConnectionWater = 2775184975;
simcity.kResourceIDTradeTrackingTreatedSewage = 170180669;
simcity.kResourceIDTradeTrackingExcessSewage = 1375844891;
simcity.kResourceIDTradeTrackingTotalSewage = 286011656;
simcity.kResourceIDTradeSewageExportAllowedUsedToSend = 1462675935;
simcity.kResourceIDTradeTrackingSwitchConnectionSewage = 2176822418;
simcity.kResourceIDTradeTrackingTotalGarbage = 1944814113;
simcity.kResourceIDTradeTrackingGarbageDumpCapacity = 2751523129;
simcity.kResourceIDTradeTrackingGarbagePickup = 2149039580;
simcity.kResourceIDTradeTrackingGarbageRewards = 3652000609;
simcity.kResourceIDTradeTrackingGarbageTruckR1 = 1476299975;
simcity.kResourceIDTradeTrackingTotalRecycling = 997405154;
simcity.kResourceIDTradeTrackingRecyclablesCapacity = 915051315;
simcity.kResourceIDTradeTrackingRecyclingPickedUp = 1963508395;
simcity.kResourceIDTradeTrackingRecyclingRewards = 658544808;
simcity.kResourceIDTradeTrackingRecyclingTruckR2 = 497754253;
simcity.kResourceIDTradeTrackingTotalFires = 1576817527;
simcity.kResourceIDTradeTrackingUnattendedFires = 3598643151;
simcity.kResourceIDTradeTrackingFireRewards = 1647276942;
simcity.kResourceIDTradeTrackingFireTruckR1 = 2672516396;
simcity.kResourceIDTradeTrackingFireTruckR2 = 2672516399;
simcity.kResourceIDTradeTrackingHazMatTruckR2 = 1092274640;
simcity.kResourceIDTradeTrackingFireInspectorR2 = 2483763065;
simcity.kResourceIDTradeTrackingFireHelicopterR2 = 3001853005;
simcity.kResourceIDTradeTrackingTotalCrimes = 3348240957;
simcity.kResourceIDTradeTrackingCriminalsCaught = 542997796;
simcity.kResourceIDTradeTrackingTotalCells = 185119231;
simcity.kResourceIDTradeTrackingCriminalsAtLarge = 169350308;
simcity.kResourceIDTradeTrackingPoliceCarR1 = 3835374665;
simcity.kResourceIDTradeTrackingPoliceDetectiveVanR2 = 948934452;
simcity.kResourceIDTradeTrackingPoliceOutreachVanR2 = 3451440152;
simcity.kResourceIDTradeTrackingPoliceHelicopterR2 = 693966119;
simcity.kResourceIDTradeTrackingT2FireStations = 1643611927;
simcity.kResourceIDTradeTrackingT1GarbageBases = 1362349058;
simcity.kResourceIDTradeTrackingT2GarbageBases = 2837792889;
simcity.kResourceIDTradeTrackingT2Hospitals = 738599137;
simcity.kResourceIDTradeTrackingT2PoliceStations = 4236188317;
simcity.kResourceIDTradeTrackingImportedResidentWorkerW1 = 2072485076;
simcity.kResourceIDTradeTrackingImportedResidentWorkerW2 = 2072485079;
simcity.kResourceIDTradeTrackingImportedResidentWorkerW3 = 2072485078;
simcity.kResourceIDTradeTrackingExportedWorkerW1 = 3264242193;
simcity.kResourceIDTradeTrackingExportedWorkerW2 = 3264242194;
simcity.kResourceIDTradeTrackingExportedWorkerW3 = 3264242195;
simcity.kResourceIDTradeTrackingImportedJobsW1 = 334865198;
simcity.kResourceIDTradeTrackingImportedJobsW2 = 334865197;
simcity.kResourceIDTradeTrackingImportedJobsW3 = 334865196;
simcity.kResourceIDTradeTrackingImportedResidentShopperW1 = 96784483;
simcity.kResourceIDTradeTrackingImportedResidentShopperW2 = 96784480;
simcity.kResourceIDTradeTrackingImportedResidentShopperW3 = 96784481;
simcity.kResourceIDTradeTrackingImportedShoppersNeededW1 = 388378261;
simcity.kResourceIDTradeTrackingImportedShoppersNeededW2 = 388378262;
simcity.kResourceIDTradeTrackingImportedShoppersNeededW3 = 388378263;
simcity.kResourceIDTradeTrackingExportedShopperW1 = 1863409004;
simcity.kResourceIDTradeTrackingExportedShopperW2 = 1863409007;
simcity.kResourceIDTradeTrackingExportedShopperW3 = 1863409006;
simcity.kResourceIDTradeTrackingImportedKid = 4278195042;
simcity.kResourceIDTradeTrackingImportedStudentsE2 = 3971993227;
simcity.kResourceIDTradeTrackingImportedStudentsE3 = 3971993226;
simcity.kResourceIDTradeTrackingImportedFreightProducer = 1429838581;
simcity.kResourceIDTradeTrackingImportedFreightConsumerD1 = 3069218622;
simcity.kResourceIDTradeTrackingImportedFreightConsumerD2 = 3069218621;
simcity.kResourceIDTradeTrackingImportedFreightConsumerD3 = 3069218620;
simcity.kResourceIDTradeTrackingResidentialWorkerW1 = 994370214;
simcity.kResourceIDTradeTrackingResidentialWorkerW2 = 994370213;
simcity.kResourceIDTradeTrackingResidentialWorkerW3 = 994370212;
simcity.kResourceIDTradeTrackingDayJobsW1 = 2907248936;
simcity.kResourceIDTradeTrackingDayJobsW2 = 2907248939;
simcity.kResourceIDTradeTrackingDayJobsW3 = 2907248938;
simcity.kResourceIDTradeTrackingNightJobsW1 = 2209438356;
simcity.kResourceIDTradeTrackingNightJobsW2 = 2209438359;
simcity.kResourceIDTradeTrackingNightJobsW3 = 2209438358;
simcity.kResourceIDTradeTrackingResidentialShopperW1 = 2823007977;
simcity.kResourceIDTradeTrackingResidentialShopperW2 = 2823007978;
simcity.kResourceIDTradeTrackingResidentialShopperW3 = 2823007979;
simcity.kResourceIDTradeTrackingHotItemsW1ProducedYesterday_Day = 436044244;
simcity.kResourceIDTradeTrackingHotItemsW2ProducedYesterday_Day = 2567516917;
simcity.kResourceIDTradeTrackingHotItemsW3ProducedYesterday_Day = 2107391642;
simcity.kResourceIDTradeTrackingHotItemsW1ProducedYesterday_Night = 1180475536;
simcity.kResourceIDTradeTrackingHotItemsW2ProducedYesterday_Night = 4288225481;
simcity.kResourceIDTradeTrackingHotItemsW3ProducedYesterday_Night = 1460279358;
simcity.kResourceIDTradeTrackingHotItemsW1ConsumedYesterday_Day = 3301253642;
simcity.kResourceIDTradeTrackingHotItemsW2ConsumedYesterday_Day = 1454982443;
simcity.kResourceIDTradeTrackingHotItemsW3ConsumedYesterday_Day = 43830436;
simcity.kResourceIDTradeTrackingHotItemsW1ConsumedYesterday_Night = 625769006;
simcity.kResourceIDTradeTrackingHotItemsW2ConsumedYesterday_Night = 3672481127;
simcity.kResourceIDTradeTrackingHotItemsW3ConsumedYesterday_Night = 2743040480;
simcity.kResourceIDTradeTrackingFreightCapacityGlobal = 44618754;
simcity.kResourceIDTradeTrackingFreightProducer = 3958037009;
simcity.kResourceIDTradeTrackingFreightConsumedYesterday = 2201488459;
simcity.kResourceIDTradeTrackingFreightProducedYesterday = 3557538141;
simcity.kResourceIDTradeTrackingFreightExportedToday = 2710463005;
simcity.kResourceIDTradeTrackingFreightExportedYesterday = 3070536890;
simcity.kResourceIDTradeTrackingFreightImportedToday = 965101814;
simcity.kResourceIDTradeTrackingFreightImportedYesterday = 2446006113;
simcity.kResourceIDTradeTrackingTotalKids = 2036203095;
simcity.kResourceIDTradeTrackingLocalStudentsYesterday = 197785297;
simcity.kResourceIDTradeTrackingLocalStudentsYesterdayE2 = 1813541280;
simcity.kResourceIDTradeTrackingLocalStudentsYesterdayE3 = 1813541281;
simcity.kResourceIDTradeTrackingSpotsForKids = 4098104485;
simcity.kResourceIDTradeTrackingSpotsForKidsE2 = 2011204636;
simcity.kResourceIDTradeTrackingSpotsForKidsE3 = 2011204637;
simcity.kResourceIDTradeTrackingExamsPassedTodayE2 = 109533772;
simcity.kResourceIDTradeTrackingExamsPassedTodayE3 = 109533773;
simcity.kResourceIDTradeTrackingHospitalRooms = 1371452676;
simcity.kResourceIDTradeTrackingSickHealing = 3951031362;
simcity.kResourceIDTradeTrackingInjuryHealing = 1659303859;
simcity.kResourceIDTradeTrackingTotalSickAndInjured = 990442076;
simcity.kResourceIDTradeTrackingAmbulanceR1 = 339387647;
simcity.kResourceIDTradeTrackingCommunityOutreachVanR2 = 1033645175;
simcity.kResourceIDTradeTrackingBusR2PassengersToday = 455274306;
simcity.kResourceIDTradeTrackingSchoolBusR2PassengersToday = 3631226262;
simcity.kResourceIDTradeTrackingTrainT2PassengersToday = 1388385232;
simcity.kResourceIDTradeTrackingFerryT1PassengersToday = 1837932671;
simcity.kResourceIDTradeTrackingMayorRating = 4197480713;
simcity.kResourceIDTradeTrackingSimoleons = 183911047;
simcity.kResourceIDTradeTrackingTotalResidential = 758431106;
simcity.kResourceIDTradeTrackingNumImEx = 2392059991;
simcity.kResourceIDTradeTrackingNumImExT2 = 1373917985;
simcity.kResourceIDTradeTrackingNumImExT2Rail = 4219056289;
simcity.kResourceIDTradeTrackingNumImExT2Boat = 2629882187;
simcity.kResourceIDTradeTrackingCoalImported = 2272506407;
simcity.kResourceIDTradeTrackingCoalExported = 706091494;
simcity.kResourceIDTradeTrackingCoalHarvested = 3300439569;
simcity.kResourceIDTradeTrackingCoalConsumed = 2085672197;
simcity.kResourceIDTradeTrackingCoalConsumedByProducer = 4287139332;
simcity.kResourceIDTradeTrackingCoalCapacity = 2031454803;
simcity.kResourceIDTradeTrackingCoalStored = 2808200618;
simcity.kResourceIDTradeTrackingOreRawImported = 836581336;
simcity.kResourceIDTradeTrackingOreRawExported = 1484651513;
simcity.kResourceIDTradeTrackingOreRawHarvested = 217778684;
simcity.kResourceIDTradeTrackingOreRawConsumedByProducer = 1317040855;
simcity.kResourceIDTradeTrackingOreRawCapacity = 3074432104;
simcity.kResourceIDTradeTrackingOreRawStored = 603518537;
simcity.kResourceIDTradeTrackingOilCrudeImported = 1681643515;
simcity.kResourceIDTradeTrackingOilCrudeExported = 2471395642;
simcity.kResourceIDTradeTrackingOilCrudeHarvested = 1071359997;
simcity.kResourceIDTradeTrackingOilCrudeConsumed = 1423367025;
simcity.kResourceIDTradeTrackingOilCrudeConsumedByProducer = 2130772096;
simcity.kResourceIDTradeTrackingOilCrudeCapacity = 2012710871;
simcity.kResourceIDTradeTrackingOilCrudeStored = 3434951062;
simcity.kResourceIDTradeTrackingPlasticImported = 3884226602;
simcity.kResourceIDTradeTrackingPlasticExported = 3308497499;
simcity.kResourceIDTradeTrackingPlasticAssembled = 3778649082;
simcity.kResourceIDTradeTrackingPlasticConsumedByProducer = 3885730093;
simcity.kResourceIDTradeTrackingPlasticCapacity = 1016408938;
simcity.kResourceIDTradeTrackingPlasticStored = 555294567;
simcity.kResourceIDTradeTrackingFuelImported = 4173075510;
simcity.kResourceIDTradeTrackingFuelExported = 3690774791;
simcity.kResourceIDTradeTrackingFuelAssembled = 191880670;
simcity.kResourceIDTradeTrackingFuelConsumedByProducer = 4274148897;
simcity.kResourceIDTradeTrackingFuelCapacity = 410643942;
simcity.kResourceIDTradeTrackingFuelStored = 600025499;
simcity.kResourceIDTradeTrackingMetalImported = 1943226479;
simcity.kResourceIDTradeTrackingMetalExported = 3486734846;
simcity.kResourceIDTradeTrackingMetalAssembled = 1368044365;
simcity.kResourceIDTradeTrackingMetalConsumedByProducer = 3290396812;
simcity.kResourceIDTradeTrackingMetalCapacity = 230574379;
simcity.kResourceIDTradeTrackingMetalStored = 2460314418;
simcity.kResourceIDTradeTrackingAlloyImported = 211824479;
simcity.kResourceIDTradeTrackingAlloyExported = 3299664462;
simcity.kResourceIDTradeTrackingAlloyAssembled = 842595325;
simcity.kResourceIDTradeTrackingAlloyConsumedByProducer = 603949948;
simcity.kResourceIDTradeTrackingAlloyCapacity = 1063076059;
simcity.kResourceIDTradeTrackingAlloyStored = 194485282;
simcity.kResourceIDTradeTrackingElectronicsImported = 4198493631;
simcity.kResourceIDTradeTrackingElectronicsExported = 1502897070;
simcity.kResourceIDTradeTrackingElectronicsAssembled = 642627805;
simcity.kResourceIDTradeTrackingElectronicsConsumedByProducer = 1655447260;
simcity.kResourceIDTradeTrackingElectronicsCapacity = 754881083;
simcity.kResourceIDTradeTrackingElectronicsStored = 928483714;
simcity.kResourceIDTradeTrackingTelevisionImported = 3986417094;
simcity.kResourceIDTradeTrackingTelevisionExported = 1960514231;
simcity.kResourceIDTradeTrackingTelevisionAssembled = 2394888302;
simcity.kResourceIDTradeTrackingTelevisionConsumedByProducer = 3635908721;
simcity.kResourceIDTradeTrackingTelevisionCapacity = 185980726;
simcity.kResourceIDTradeTrackingTelevisionStored = 3536891307;
simcity.kResourceIDTradeTrackingComputerImported = 1549863737;
simcity.kResourceIDTradeTrackingComputerExported = 1875289888;
simcity.kResourceIDTradeTrackingComputerAssembled = 4241072751;
simcity.kResourceIDTradeTrackingComputerConsumedByProducer = 2124001594;
simcity.kResourceIDTradeTrackingComputerCapacity = 454820893;
simcity.kResourceIDTradeTrackingComputerStored = 1111156840;
simcity.kResourceIDAlloyTransport = 2094769101;
simcity.kResourceIDAlloyTransportToSend = 2211053392;
simcity.kResourceIDCoalTransport = 129362091;
simcity.kResourceIDCoalTransportToSend = 1168959818;
simcity.kResourceIDComputerTransport = 1426305929;
simcity.kResourceIDComputerTransportToSend = 2578398228;
simcity.kResourceIDElectronicsTransport = 837876277;
simcity.kResourceIDElectronicsTransportToSend = 1638454328;
simcity.kResourceIDFuelTransport = 1465669288;
simcity.kResourceIDFuelTransportToSend = 2831910513;
simcity.kResourceIDMetalTransport = 3586627541;
simcity.kResourceIDMetalTransportToSend = 2786169304;
simcity.kResourceIDOilCrudeTransport = 1939187731;
simcity.kResourceIDOilCrudeTransportToSend = 3923639794;
simcity.kResourceIDOreRawTransport = 3194563238;
simcity.kResourceIDOreRawTransportToSend = 3058520683;
simcity.kResourceIDPlasticTransport = 3157718626;
simcity.kResourceIDPlasticTransportToSend = 3698475599;
simcity.kResourceIDTelevisionTransport = 18550752;
simcity.kResourceIDTelevisionTransportToSend = 1231596297;
simcity.kResourceIDNumberOfGreatWorksAvailable = 3064543031;
simcity.kResourceIDWorkersSent = 3591689416;
simcity.kResourceIDWorkerTruck = 1935164160;
simcity.kResourceIDSimsInjuredInMission = 2069161297;
simcity.kResourceIDMissionCompleted = 1627245352;
simcity.kResourceIDMissionStarted = 419590612;
simcity.kResourceIDIsSelected = 3358518502;
simcity.kResourceIDMissionProgress = 973586624;
simcity.kResourceIDLocalMissionProgress = 4183714305;
simcity.kResourceIDGlobalMissionProgress = 3746722863;
simcity.kResourceIDMissionProgressDisplay = 4154147290;
simcity.kResourceIDPower_RegionalSolarPlant_Unlocked = 2819741462;
simcity.kResourceIDHQ_University_Science_Module_IsOn = 915861573;
simcity.kResourceIDHQ_University_Engineering_Module_IsOn = 946389442;
simcity.kResourceIDRegionSolarPlantUnlocked = 3234225566;
simcity.kResourceIDInternationalAirportUnlocked = 2383687319;
simcity.kResourceIDRegionInternationalAirportUnlocked = 175499503;
simcity.kResourceIDSpaceCenterUnlocked = 3825521097;
simcity.kResourceIDRegionSpaceCenterUnlocked = 4085370929;
simcity.kResourceIDHQ_Electronics_ConsumerElectronics_Module_IsOn = 284482545;
simcity.kResourceIDRegionCoalHQIsPresent = 3251041550;
simcity.kResourceIDArcologyUnlocked = 2057105206;
simcity.kResourceIDRegionArcologyUnlocked = 3567012286;
simcity.kResourceIDGWConstructionStage = 1485155782;
simcity.kResourceIDGWOperationalStage = 4291847016;
simcity.kResourceIDGWRegionalConstructionWorkersTotal = 2435950116;
simcity.kResourceIDGWRegionalConstructionWorkersSent = 1206299136;
simcity.kResourceIDGreatWorksSignedUpCounter = 2541729299;
simcity.kResourceIDGreatWorksOperational = 1315684666;
simcity.kResourceIDGreatWorksResourceDelivered = 3202272862;
simcity.kResourceIDGreatWorksResource1Delivered = 1136547621;
simcity.kResourceIDGreatWorksResource2Delivered = 1595600012;
simcity.kResourceIDGreatWorksResource3Delivered = 3824525519;
simcity.kResourceIDConstructionWorkersStalled = 496418028;
simcity.kResourceIDGreatWorksUnlocked = 1540571913;
simcity.kResourceIDHelicopterUnlock_IsOn = 4149371850;
simcity.kResourceIDRegionalBuildingActive = 3564852728;
simcity.kResourceIDRegionalAttractionLevelTotal = 593596809;
simcity.kResourceIDRegionalPowerOperating = 4061587982;
simcity.kResourceIDRegionalWaterOperating = 1990851096;
simcity.kResourceIDRegionalWorkersTotal = 1994308351;
simcity.kResourceIDCountedPower = 3351100072;
simcity.kResourceIDRegionalPowerTotal = 111888553;
simcity.kResourceIDRegionalWaterTotal = 3561486351;
simcity.kResourceIDTrackingPassengerAirplaneT2 = 2345532582;
simcity.kResourceIDTrackingTouristW2 = 3835689959;
simcity.kResourceIDTrackingTouristW3 = 3835689958;
simcity.kResourceIDTrackingPotentialTouristW2 = 1113374941;
simcity.kResourceIDTrackingPotentialTouristW3 = 1113374940;
simcity.kResourceIDTrackingCargoAirplaneT1 = 3798476589;
simcity.kResourceIDTrackingCargoAirplaneT2 = 3798476590;
simcity.kResourceIDHasSolarFarm = 3145586614;
simcity.kResourceIDHasInternationalAirport = 468510354;
simcity.kResourceIDHasSpaceCenter = 353164660;
simcity.kResourceIDHasArcology = 3011308239;
simcity.kResourceIDBypassOperationalCheck = 2018215597;
simcity.kResourceIDReceivingPowerFromSolarFarm = 1384663895;
simcity.kResourceIDPowerSentFromGreatWorks = 1114786261;
simcity.kResourceIDGreatWorkImportedPowerCounter = 255515766;
simcity.kResourceIDGreatWorksOperatingMissionInProgress = 2102740475;
simcity.kResourceIDActiveSatelliteLaunch = 238264067;
simcity.kResourceIDBuildingSatellite = 963782616;
simcity.kResourceIDArcologyPopulationLevel = 1062896262;
simcity.kResourceIDGreatWorksOperatingMissionInProgress = 2102740475;
simcity.kResourceIDSpaceCenterRocketOnPad = 2431448096;
simcity.kResourceIDSatelliteLaunched = 992762266;
simcity.kResourceIDSpaceCenterSkillBoostCounter = 1940872510;
simcity.kResourceIDSpaceCenterOperatingPhase = 3102749500;
simcity.kResourceIDSpaceCenterLaunchAvailable = 2873912652;
simcity.kResourceIDMissionCountdownClock = 1216012096;
simcity.kResourceIDMissionResource1 = 2630414794;
simcity.kResourceIDMissionResource2 = 2630414793;
simcity.kResourceIDMissionResource3 = 2630414792;
simcity.kResourceIDMissionResource4 = 2630414799;
simcity.kResourceIDMissionResource5 = 2630414798;
simcity.kResourceIDMissionResource6 = 2630414797;
simcity.kResourceIDMissionResource7 = 2630414796;
simcity.kResourceIDMissionResource8 = 2630414787;
simcity.kResourceIDLocalMissionResource1 = 228444021;
simcity.kResourceIDLocalMissionResource2 = 228444022;
simcity.kResourceIDLocalMissionResource3 = 228444023;
simcity.kResourceIDLocalMissionResource4 = 228444016;
simcity.kResourceIDLocalMissionResource5 = 228444017;
simcity.kResourceIDLocalMissionResource6 = 228444018;
simcity.kResourceIDLocalMissionResource7 = 228444019;
simcity.kResourceIDLocalMissionResource8 = 228444028;
simcity.kResourceIDSignedUpForAlloy = 2156529816;
simcity.kResourceIDSignedUpForCoal = 1481550350;
simcity.kResourceIDSignedUpForElectronics = 837943636;
simcity.kResourceIDSignedUpForFuel = 141660303;
simcity.kResourceIDSignedUpForMetal = 3746338052;
simcity.kResourceIDSignedUpForOilCrude = 1784084810;
simcity.kResourceIDSignedUpForOreRaw = 2035346673;
simcity.kResourceIDSignedUpForPlastic = 2801046657;
simcity.kResourceIDSignedUpForComputer = 641178008;
simcity.kResourceIDSignedUpForTelevision = 104428475;
simcity.kResourceIDSignedUpForAlloyStored = 4225686509;
simcity.kResourceIDSignedUpForCoalStored = 2878945903;
simcity.kResourceIDSignedUpForElectronicsStored = 2557484649;
simcity.kResourceIDSignedUpForFuelStored = 2405481186;
simcity.kResourceIDSignedUpForMetalStored = 3769877433;
simcity.kResourceIDSignedUpForOilCrudeStored = 2334454315;
simcity.kResourceIDSignedUpForOreRawStored = 109432152;
simcity.kResourceIDSignedUpForPlasticStored = 696591432;
simcity.kResourceIDSignedUpForComputerStored = 3180848365;
simcity.kResourceIDSignedUpForTelevisionStored = 2970679966;
simcity.kResourceRegionalBoxUniqueID = 700441987;
simcity.kResourceNumberOfBoxes = 2015828812;
simcity.kResourceNumberOfClaimedBoxes = 2137317727;
simcity.kResourceClaimedEnoughBoxesInRegion = 659947770;
simcity.kResourceIDDNorth = 4279573130;
simcity.kResourceIDDWest = 1723483016;
simcity.kResourceIDDEast = 529018174;
simcity.kResourceIDDSouth = 992193856;
simcity.kResourceIDExcessPower = 1849174591;
simcity.kResourceIDExcessWater = 3864099713;
simcity.kResourceIDRoadNearby = 3196262326;
simcity.kResourceIDFireTruckT1 = 2461985119;
simcity.kResourceIDFireTruckT2 = 2461985116;
simcity.kResourceIDFireTruckR1 = 2495540389;
simcity.kResourceIDFireTruckR2 = 2495540390;
simcity.kResourceIDHazMatTruckR2 = 3186883601;
simcity.kResourceIDFireInspector = 3944701420;
simcity.kResourceIDFireInspectorR2 = 2558046576;
simcity.kResourceIDFireHelicopterR2 = 3496374658;
simcity.kResourceIDTradeExcessFireTruckR1 = 96453850;
simcity.kResourceIDTradeExcessFireTruckR2 = 96453849;
simcity.kResourceIDTradeExcessHazMatTruckR2 = 2871591582;
simcity.kResourceIDTradeExcessFireInspectorR2 = 1582936235;
simcity.kResourceIDTradeExcessFireHelicopterR2 = 3998138123;
simcity.kResourceIDFireTruckR1ToSend = 407618920;
simcity.kResourceIDFireTruckR2ToSend = 1474626667;
simcity.kResourceIDExcessFireTruckR1 = 96453850;
simcity.kResourceIDExcessFireTruckR2 = 96453849;
simcity.kResourceIDExcessHazMatTruckR2 = 2871591582;
simcity.kResourceIDFireServiceToken = 2647607289;
simcity.kResourceIDFireServiceTokenCounter = 196028751;
simcity.kResourceIDFireServiceTokenGranted = 341534070;
simcity.kResourceIDPoliceCarR1 = 1253104808;
simcity.kResourceIDTradeExcessPoliceCarR1 = 1875029739;
simcity.kResourceIDPoliceDetectiveVanR2 = 4169623735;
simcity.kResourceIDTradeExcessPoliceDetectiveVanR2 = 2560245302;
simcity.kResourceIDPoliceOutreachVan = 2162739333;
simcity.kResourceIDPoliceOutreachVan_Parking = 280243312;
simcity.kResourceIDPoliceOutreachVanR2 = 3960689125;
simcity.kResourceIDTradeExcessPoliceOutreachVanR2 = 1931225770;
simcity.kResourceIDPoliceHelicopterR2 = 1404252420;
simcity.kResourceIDTradeExcessPoliceHelicopterR2 = 1583167837;
simcity.kResourceIDPoliceServiceToken = 864842123;
simcity.kResourceIDPoliceServiceTokenCounter = 485477509;
simcity.kResourceIDPoliceServiceTokenGranted = 3105023984;
simcity.kResourceIDGarbageTruckR1 = 2123311156;
simcity.kResourceIDTradeExcessGarbageTruckR1 = 3019757953;
simcity.kResourceIDGarbageServiceToken = 2835982466;
simcity.kResourceIDGarbageServiceTokenCounter = 2188438626;
simcity.kResourceIDGarbageServiceTokenGranted = 910807239;
simcity.kResourceIDRecyclingTruckR2 = 3408695102;
simcity.kResourceIDTradeExcessRecyclingTruckR2 = 3427430143;
simcity.kResourceIDRecyclingServiceToken = 3184416497;
simcity.kResourceIDAmbulanceR1 = 2596175366;
simcity.kResourceIDTradeExcessAmbulanceR1 = 3649714245;
simcity.kResourceIDCommunityOutreachVan = 1390367256;
simcity.kResourceIDCommunityOutreachVanR2 = 2431124988;
simcity.kResourceIDTradeExcessCommunityOutreachVanR2 = 1508816545;
simcity.kResourceIDHealthServiceToken = 3307902383;
simcity.kResourceIDHealthServiceTokenCounter = 546429865;
simcity.kResourceIDHealthServiceTokenGranted = 2254544100;
simcity.kResourceIDFireDispatchAccepted = 3987602660;
simcity.kResourceIDTradeExcessFreightProducer = 2948667523;
simcity.kResourceIDFreightProducer = 1386446216;
simcity.kResourceIDFreightConsumerD1 = 2849473655;
simcity.kResourceIDFreightConsumerD2 = 2849473652;
simcity.kResourceIDFreightConsumerD3 = 2849473653;
simcity.kResourceIDFreightToday = 3018095613;
simcity.kResourceIDTradeExcessFreightConsumerD1 = 770566680;
simcity.kResourceIDTradeExcessFreightConsumerD2 = 770566683;
simcity.kResourceIDTradeExcessFreightConsumerD3 = 770566682;
simcity.kResourceIDTradeExcessResidentWorkerW1 = 600654254;
simcity.kResourceIDTradeExcessResidentWorkerW2 = 600654253;
simcity.kResourceIDTradeExcessResidentWorkerW3 = 600654252;
simcity.kResourceIDTradeExcessResidentShopperW1 = 1734645633;
simcity.kResourceIDTradeExcessResidentShopperW2 = 1734645634;
simcity.kResourceIDTradeExcessResidentShopperW3 = 1734645635;
simcity.kResourceIDExcessKids = 3880117816;
simcity.kResourceIDExcessStudentE2 = 1893297692;
simcity.kResourceIDExcessStudentE3 = 1893297693;
simcity.kResourceIDExcessShoppersNeededW1 = 2366253995;
simcity.kResourceIDExcessShoppersNeededW2 = 2366253992;
simcity.kResourceIDExcessShoppersNeededW3 = 2366253993;
simcity.kResourceIDTradeExcessDayJobsW1 = 384855186;
simcity.kResourceIDTradeExcessDayJobsW2 = 384855185;
simcity.kResourceIDTradeExcessDayJobsW3 = 384855184;
simcity.kResourceIDTradeExcessNightJobsW1 = 2578154342;
simcity.kResourceIDTradeExcessNightJobsW2 = 2578154341;
simcity.kResourceIDTradeExcessNightJobsW3 = 2578154340;
simcity.kResourceIDImportedResidents = 4115925573;
simcity.kResourceIDImportedResidentsW1 = 1206356745;
simcity.kResourceIDImportedResidentsW2 = 1206356746;
simcity.kResourceIDImportedResidentsW3 = 1206356747;
simcity.kResourceIDImportedResidentShopperW1 = 3504366446;
simcity.kResourceIDImportedResidentShopperW2 = 3504366445;
simcity.kResourceIDImportedResidentShopperW3 = 3504366444;
simcity.kResourceIDImportedShoppersNeededW1 = 1306257730;
simcity.kResourceIDImportedShoppersNeededW2 = 1306257729;
simcity.kResourceIDImportedShoppersNeededW3 = 1306257728;
simcity.kResourceIDImportedResidentWorkerW1 = 2511648399;
simcity.kResourceIDImportedResidentWorkerW2 = 2511648396;
simcity.kResourceIDImportedResidentWorkerW3 = 2511648397;
simcity.kResourceIDImportedJobsW1 = 237552489;
simcity.kResourceIDImportedJobsW2 = 237552490;
simcity.kResourceIDImportedJobsW3 = 237552491;
simcity.kResourceIDImportedKid = 1119693563;
simcity.kResourceIDIncomingTradeCarTraffic = 3794878840;
simcity.kResourceIDIncomingTouristCarTraffic = 2153055568;
simcity.kResourceIDOutgoingTradeCarTraffic = 2892462054;
simcity.kResourceIDKidToSend = 1128019306;
simcity.kResourceIDTradeSwitchEducation = 3610436769;
simcity.kResourceIDTradeSwitchFire = 2566217525;
simcity.kResourceIDTradeSwitchJobs = 1429448921;
simcity.kResourceIDTradeSwitchKids = 3639239926;
simcity.kResourceIDTradeSwitchPower = 2471292092;
simcity.kResourceIDTradeSwitchResidents = 3610705880;
simcity.kResourceIDTradeSwitchShopping = 3115018657;
simcity.kResourceIDTradeSwitchWater = 3733951318;
simcity.kResourceIDTradeSwitchPreviousWater = 2230743323;
simcity.kResourceIDTradeSwitchSewage = 2597425153;
simcity.kResourceIDTradeSwitchConnectionEducation = 2700336689;
simcity.kResourceIDTradeSwitchConnectionFire = 43618437;
simcity.kResourceIDTradeSwitchConnectionJobs = 3749146665;
simcity.kResourceIDTradeSwitchConnectionKids = 1653627654;
simcity.kResourceIDTradeSwitchConnectionPower = 3998749676;
simcity.kResourceIDTradeSwitchConnectionResidents = 2224992936;
simcity.kResourceIDTradeSwitchConnectionShopping = 2255324145;
simcity.kResourceIDTradeSwitchConnectionWater = 627284102;
simcity.kResourceIDTradeSwitchConnectionSewage = 1045983025;
simcity.kResourceIDDemolishedByDisaster = 3880439877;
simcity.kResourceIDDisasterActive = 475159146;
simcity.kResourceIDDisasterActiveRobot = 3172786374;
simcity.kResourceIDDisasterActiveBigLizard = 2936636340;
simcity.kResourceIDDisasterActiveUFO = 1544975258;
simcity.kResourceIDDisasterActiveZombie = 3819837388;
simcity.kResourceIDDisasterActiveTornado = 4175683069;
simcity.kResourceIDDisasterActiveEarthquake = 3817279809;
simcity.kResourceIDDisasterActivePlague = 1751436168;
simcity.kResourceIDDisasterActiveMeteor = 2439014578;
simcity.kResourceIDDisasterActiveMeltdown = 54522384;
simcity.kResourceIDRadiated = 71000479;
simcity.kResourceIDZombie = 1721775719;
simcity.kResourceIDDestroyedByZombie = 3502347711;
simcity.kResourceIDMeteorShowerStage = 3527801851;
simcity.kResourceIDCarW1 = 179625953;
simcity.kResourceIDCarW2 = 179625954;
simcity.kResourceIDCarW3 = 179625955;
simcity.kResourceIDPickUp = 3978245845;
simcity.kResourceIDPickUpByBus = 1495886308;
simcity.kResourceIDPickUpByCoach = 3783750388;
simcity.kResourceIDCruiseShipPickUp = 2895034266;
simcity.kResourceIDFerryPickUp = 4106525607;
simcity.kResourceIDPickedUp = 3593755026;
simcity.kResourceIDPickedUpByBus = 4274955557;
simcity.kResourceIDPickedUpByCoach = 1982778545;
simcity.kResourceIDPickedUpByCruiseShip = 1833157294;
simcity.kResourceIDPickedUpByFerry = 651958343;
simcity.kResourceIDNotPickedUp = 2076060703;
simcity.kResourceIDNotPickedUpByBus = 1657553854;
simcity.kResourceIDNotPickedUpBySchoolBus = 1441072122;
simcity.kResourceIDNotPickedUpByCoach = 230366378;
simcity.kResourceIDNotPickedUpByLightTrain = 3607259574;
simcity.kResourceIDNotPickedUpByTrain = 1768098354;
simcity.kResourceIDNotPickedUpByFerry = 2028102968;
simcity.kResourceIDConnectedToStation = 462100759;
simcity.kResourceIDAccessToOutside = 4287126537;
simcity.kResourceIDAccessToOutsideCapacity = 3065919109;
simcity.kResourceIDLocalW1PickedUpByBusToday = 198922811;
simcity.kResourceIDLocalW2PickedUpByBusToday = 3092711620;
simcity.kResourceIDLocalW1PickedUpByBusYesterday = 1048533540;
simcity.kResourceIDLocalW2PickedUpByBusYesterday = 134664051;
simcity.kResourceIDTouristW1PickedUpByBusToday = 2863121624;
simcity.kResourceIDTouristW2PickedUpByBusToday = 613911519;
simcity.kResourceIDTouristW1PickedUpByBusYesterday = 4271583023;
simcity.kResourceIDTouristW2PickedUpByBusYesterday = 2318696560;
simcity.kResourceIDLocalW1PickedUpByLightTrainToday = 1998780939;
simcity.kResourceIDLocalW2PickedUpByLightTrainToday = 3949678414;
simcity.kResourceIDLocalW1PickedUpByLightTrainYesterday = 3501678100;
simcity.kResourceIDLocalW2PickedUpByLightTrainYesterday = 1229039673;
simcity.kResourceIDTouristW1PickedUpByLightTrainToday = 778164714;
simcity.kResourceIDTouristW2PickedUpByLightTrainToday = 3944093959;
simcity.kResourceIDTouristW1PickedUpByLightTrainYesterday = 213690493;
simcity.kResourceIDTouristW2PickedUpByLightTrainYesterday = 1485885944;
simcity.kResourceIDLocalW1PickedUpByTrainToday = 3635219655;
simcity.kResourceIDLocalW2PickedUpByTrainToday = 3885380148;
simcity.kResourceIDLocalW1PickedUpByTrainYesterday = 2545495480;
simcity.kResourceIDLocalW2PickedUpByTrainYesterday = 3177674691;
simcity.kResourceIDTouristW1PickedUpByTrainToday = 958783584;
simcity.kResourceIDTouristW2PickedUpByTrainToday = 761895475;
simcity.kResourceIDTouristW1PickedUpByTrainYesterday = 1006961751;
simcity.kResourceIDTouristW2PickedUpByTrainYesterday = 1114423292;
simcity.kResourceIDLocalW1PickedUpByBoatToday = 2147542143;
simcity.kResourceIDLocalW2PickedUpByBoatToday = 1372234094;
simcity.kResourceIDLocalW3PickedUpByBoatToday = 1258583105;
simcity.kResourceIDLocalW1PickedUpByBoatYesterday = 3874856208;
simcity.kResourceIDLocalW2PickedUpByBoatYesterday = 538797401;
simcity.kResourceIDLocalW3PickedUpByBoatYesterday = 1531949142;
simcity.kResourceIDTouristW1PickedUpByBoatToday = 2669259714;
simcity.kResourceIDTouristW2PickedUpByBoatToday = 2226544835;
simcity.kResourceIDTouristW3PickedUpByBoatToday = 2698189464;
simcity.kResourceIDTouristW1PickedUpByBoatYesterday = 3845601557;
simcity.kResourceIDTouristW2PickedUpByBoatYesterday = 158441324;
simcity.kResourceIDTouristW3PickedUpByBoatYesterday = 2684440047;
simcity.kResourceIDBusStationUnlocked = 1267367868;
simcity.kResourceIDBus = 714721605;
simcity.kResourceIDBusT1 = 3750291136;
simcity.kResourceIDBusT2 = 3750291139;
simcity.kResourceIDTransitBusStop = 2211328792;
simcity.kResourceIDBusR2Stop = 3811986621;
simcity.kResourceIDBusPassenger = 4189067127;
simcity.kResourceIDBusTripsToday = 104916694;
simcity.kResourceIDBusTripsYesterday = 2825726017;
simcity.kResourceIDNumberOfBusT1Stops = 2543327979;
simcity.kResourceIDNumberOfBusT2Stops = 101227258;
simcity.kResourceIDNumberOfBusT1Garages = 2547598790;
simcity.kResourceIDNumberOfBusT2Garages = 1495901003;
simcity.kResourceIDBusT2StopUnlocked = 318227296;
simcity.kResourceIDMinutesWaitedForBusToday = 1479788868;
simcity.kResourceIDMinutesWaitedForBusYesterday = 252647411;
simcity.kResourceIDLeftBusStopToday = 2598015915;
simcity.kResourceIDLeftBusStopYesterday = 1082208436;
simcity.kResourceIDNumberOfRoadConnections = 1819330754;
simcity.kResourceIDBusPickUp = 4267116117;
simcity.kResourceIDTradeBusPickUp = 234755401;
simcity.kResourceIDCoach = 2308599143;
simcity.kResourceIDCoachPassenger = 330729179;
simcity.kResourceIDCoachTripsToday = 2981021506;
simcity.kResourceIDCoachTripsYesterday = 2363657365;
simcity.kResourceIDMinutesWaitedForCoachToday = 1384857760;
simcity.kResourceIDMinutesWaitedForCoachYesterday = 3434080407;
simcity.kResourceIDLeftCoachStopToday = 1842660811;
simcity.kResourceIDLeftCoachStopYesterday = 1127755732;
simcity.kResourceIDCoachPickUp = 3200020585;
simcity.kResourceIDTradeCoachPickUp = 3169816669;
simcity.kResourceIDTradeExcessBusR2 = 1045956962;
simcity.kResourceIDTradeExcessBusR2Stop = 3521009370;
simcity.kResourceIDTradeExcessBusR2Station = 3878085646;
simcity.kResourceIDSchoolBus = 3826984073;
simcity.kResourceIDSchoolBusT1 = 1369282620;
simcity.kResourceIDSchoolBusT2 = 1369282623;
simcity.kResourceIDSchoolBusR2 = 1268616873;
simcity.kResourceIDSchoolBusPassenger = 1584058483;
simcity.kResourceIDSchoolBusTripsToday = 2495024458;
simcity.kResourceIDSchoolBusTripsYesterday = 3639481821;
simcity.kResourceIDTradeExcessSchoolBusR2 = 2636466174;
simcity.kResourceIDTradeExcessSchoolBusR2Stop = 533710806;
simcity.kResourceIDTradeExcessSchoolBusR2Station = 453662962;
simcity.kResourceIDLeftSchoolBusStopToday = 3782194799;
simcity.kResourceIDLeftSchoolBusStopYesterday = 564478752;
simcity.kResourceIDFerryT1Stop = 3607048138;
simcity.kResourceIDFerryPassenger = 556969825;
simcity.kResourceIDFerryTripsToday = 1860616748;
simcity.kResourceIDFerryTripsYesterday = 2808285691;
simcity.kResourceIDNumberOfFerryT1Stops = 2422694861;
simcity.kResourceIDNumberOfFerryT1Garages = 504469036;
simcity.kResourceIDNumberOfBoatConnections = 2126456866;
simcity.kResourceIDMinutesWaitedForFerryToday = 32864094;
simcity.kResourceIDMinutesWaitedForFerryYesterday = 3827135785;
simcity.kResourceIDLeftFerryStopToday = 1961108665;
simcity.kResourceIDLeftFerryStopYesterday = 995074318;
simcity.kResourceIDTradeExcessFerryT1Stop = 3103783157;
simcity.kResourceIDCruiseShipT2Stop = 3693542656;
simcity.kResourceIDCruiseShipPassenger = 688848862;
simcity.kResourceIDCruiseShipTripsToday = 4113118981;
simcity.kResourceIDCruiseShipTripsYesterday = 2920531170;
simcity.kResourceIDNumberOfCruiseShipT2Stops = 3552480691;
simcity.kResourceIDMinutesWaitedForCruiseShipToday = 4103995125;
simcity.kResourceIDMinutesWaitedForCruiseShipYesterday = 4103742130;
simcity.kResourceIDLeftCruiseShipStopToday = 3819407512;
simcity.kResourceIDLeftCruiseShipStopYesterday = 1060019183;
simcity.kResourceIDLightTrain = 169392071;
simcity.kResourceIDLightTrainT1 = 3511031570;
simcity.kResourceIDLightTrainPassenger = 2119409729;
simcity.kResourceIDLightTrainTripsToday = 1498184588;
simcity.kResourceIDLightTrainTripsYesterday = 2677794139;
simcity.kResourceIDNumberOfLightTrainT1Stops = 641465773;
simcity.kResourceIDNumberOfLightTrainT1Garages = 816272908;
simcity.kResourceIDFreight = 3183939650;
simcity.kResourceIDMinutesWaitedForLightTrainToday = 3901361358;
simcity.kResourceIDMinutesWaitedForLightTrainYesterday = 988724665;
simcity.kResourceIDLeftLightTrainStopToday = 1902644379;
simcity.kResourceIDLeftLightTrainStopYesterday = 272732548;
simcity.kResourceIDTrainT2StopUnlocked = 3680034280;
simcity.kResourceIDTrainT2 = 1338428763;
simcity.kResourceIDTrainT2Stop = 2952376667;
simcity.kResourceIDTrainPassenger = 2229367087;
simcity.kResourceIDTrainTripsToday = 3765884158;
simcity.kResourceIDTrainTripsYesterday = 735445193;
simcity.kResourceIDNumberOfTrainT2Stops = 3566814322;
simcity.kResourceIDNumberOfRailConnections = 49028268;
simcity.kResourceIDMinutesWaitedForTrainToday = 769533620;
simcity.kResourceIDMinutesWaitedForTrainYesterday = 593114179;
simcity.kResourceIDLeftTrainStopToday = 4115668327;
simcity.kResourceIDLeftTrainStopYesterday = 2675474776;
simcity.kResourceIDTradeExcessTrainT2Stop = 2952296420;
simcity.kResourceIDRunway = 3965271245;
simcity.kResourceIDNumberOfAirTouristsToday = 685919593;
simcity.kResourceIDNumberOfAirTouristsYesterday = 1143867102;
simcity.kResourceIDNumberOfAirTouristsW2ArrivingToday = 1191555184;
simcity.kResourceIDNumberOfAirTouristsW2LeavingToday = 3417631458;
simcity.kResourceIDNumberOfAirTouristsW3ArrivingToday = 4171920487;
simcity.kResourceIDNumberOfAirTouristsW3LeavingToday = 1763210535;
simcity.kResourceIDNumberOfAirTouristsW2ArrivingYesterday = 623941127;
simcity.kResourceIDNumberOfAirTouristsW2LeavingYesterday = 3588127541;
simcity.kResourceIDNumberOfAirTouristsW3ArrivingYesterday = 132204632;
simcity.kResourceIDNumberOfAirTouristsW3LeavingYesterday = 1861324824;
simcity.kResourceIDAirCargoOutToday = 1258298642;
simcity.kResourceIDAirCargoOutYesterday = 3608506245;
simcity.kResourceIDAirportLowAttractionW2 = 2471830392;
simcity.kResourceIDAirportLowAttractionW3 = 2471830393;
simcity.kResourceIDNumberOfAirports = 95801457;
simcity.kResourceIDNumberOfAirportRunways = 1441572457;
simcity.kResourceIDNumberOfAirportCargoTerminals = 2104226977;
simcity.kResourceIDNumberOfAirportPassengerTerminals = 2361483993;
simcity.kResourceIDCargoToken = 1461559886;
simcity.kResourceIDPassengerToken = 2805427830;
simcity.kResourceIDPassengerAirplaneT2 = 2548916995;
simcity.kResourceIDPassengerAirplaneT1W2 = 2928432743;
simcity.kResourceIDPassengerAirplaneT1W3 = 2928432742;
simcity.kResourceIDTourist_Leaving = 209074924;
simcity.kResourceIDMinutesWaitedForPlaneToday = 3176808940;
simcity.kResourceIDMinutesWaitedForPlaneYesterday = 2921274043;
simcity.kResourceIDSpecialization_Education = 3461677465;
simcity.kResourceIDSpecialization_Gambling = 3742950856;
simcity.kResourceIDSpecialization_Metals = 3228802589;
simcity.kResourceIDSpecialization_Petroleum = 2304903770;
simcity.kResourceIDSpecialization_Trade = 1543642725;
simcity.kResourceIDSpecialization_Electronics = 342194522;
simcity.kResourceIDSpecialization_Guided = 2128108757;
simcity.kResourceIDSpecializationNumber = 3834949841;
simcity.kResourceIDTradeTrackingSpecializationNumber = 4149866982;
simcity.kResourceIDParis = 2073910180;
simcity.kResourceIDLondon = 699808721;
simcity.kResourceIDBerlin = 1535794783;
simcity.kResourceIDHeroesAndVillains = 2321936720;
simcity.kResourceIDDLC_RomanCasino = 3372236679;
simcity.kResourceIDCurrentMissions = 4175140589;
simcity.kResourceIDMissionTimer = 1693444796;
simcity.kResourceIDTotalObjectivesComplete = 252940416;
simcity.kResourceIDTotalObjectives = 3499206737;
simcity.kResourceIDLinearObjectives = 2144919862;
simcity.kResourceIDGlobalMission_MSTutorialCreateResidentialPt2 = 3879209279;
simcity.kResourceIDGlobalMission_MSTutorialGovernment = 3701754366;
simcity.kResourceIDGlobalMission_MSTutorialClickGreatWorkSpeechBubble = 586776623;
simcity.kResourceIDGlobalMission_MSTutorialClickSewageSpeechBubble = 3446499045;
simcity.kResourceIDGlobalMission_MSTutorialClickGarbageSpeechBubble = 2434760902;
simcity.kResourceIDGlobalMission_MSCivicClickSpeechBubble = 2213868619;
simcity.kResourceIDGlobalMission_MSCivicCreateResidential = 3352395677;
simcity.kResourceIDGlobalMission_MSCivicClickSpeechBubble2 = 94147107;
simcity.kResourceIDGlobalMission_MSCivicClickSpeechBubble3 = 94147106;
simcity.kResourceIDGlobalMission_MSCivicZoneIndustrial = 3870197806;
simcity.kResourceIDGlobalMission_MSCivicTutorialCreateSchool = 2853402327;
simcity.kResourceIDGlobalMission_MSCivicZoneCommercial = 852667817;
simcity.kResourceIDGlobalMission_MSCivicPowerWantPower = 121174061;
simcity.kResourceIDGlobalMission_MSCivicClickSpeechBubble6 = 94147111;
simcity.kResourceIDGlobalMission_MSCivicTutorialModules = 476261186;
simcity.kResourceIDGlobalMission_MSCivicClickSpeechBubble7 = 94147110;
simcity.kResourceIDGlobalMission_MSCivicBuildRoad = 2507435577;
simcity.kResourceIDGlobalMission_MSCivicClickSpeechBubble5 = 94147108;
simcity.kResourceIDGlobalMission_MSCivicClickSpeechBubble4 = 94147109;
simcity.kResourceIDGlobalMission_MSCivicTutorialCreateFireStation = 1614780409;
simcity.kResourceIDGlobalMission_MSCivicBuildRoadToCityConnection = 576251903;
simcity.kResourceIDGlobalMission_MSCivicTutorialBudget = 1515569036;
simcity.kResourceIDGlobalMission_MSCivicTutorialDeselectDemolishTool = 3786618521;
simcity.kResourceIDGlobalMission_MSCivicTutorialCoalPower = 2693848181;
simcity.kResourceIDGlobalMission_MSCivicTutorialEnd = 1570715066;
simcity.kResourceIDGlobalMission_MSCivicTutorialSpeedControls = 3107480378;
simcity.kResourceIDGlobalMission_MSCrimeExpandPolice = 1079805979;
simcity.kResourceIDGlobalMission_MSCivicBalanceTheBudget = 602089599;
simcity.kResourceIDGlobalMission_MSCivicGettingStarted = 108108054;
simcity.kResourceIDGlobalMission_MSCivicBuildCityHall = 2727311327;
simcity.kResourceIDGlobalMission_MSCivicBuildMayorsHouse = 728854500;
simcity.kResourceIDGlobalMission_MSCoalTutorialStripMine = 1712335721;
simcity.kResourceIDGlobalMission_MSCoalPlaceCoalMine = 3681260405;
simcity.kResourceIDGlobalMission_MSCoalExtendCoalMine = 3321307040;
simcity.kResourceIDGlobalMission_MSCommercialNeedShops = 541297306;
simcity.kResourceIDGlobalMission_MSCrimeNeedPolice = 2801189047;
simcity.kResourceIDGlobalMission_MSFireArsonist = 3975263620;
simcity.kResourceIDGlobalMission_MSFireBuildFireStation = 3743811193;
simcity.kResourceIDGlobalMission_MSFireHeatWave = 2613467968;
simcity.kResourceIDGlobalMission_MSHealthNeedMoreAmbulances = 2720567733;
simcity.kResourceIDGlobalMission_MSJobsNeedJobs = 1634898049;
simcity.kResourceIDGlobalMission_MSPowerNeedPower = 2101463207;
simcity.kResourceIDGlobalMission_TutorialSpeechBubble = 3545973611;
simcity.kResourceIDGlobalMission_MSTutorialReclaimCity = 2755963149;
simcity.kResourceIDGlobalMission_MSTutorialClickRegionSpeechBubble = 1364388285;
simcity.kResourceIDGlobalMission_MSPowerNeedMorePowerForIndustry = 4179444541;
simcity.kResourceIDGlobalMission_MSPowerImportCoal = 2242556846;
simcity.kResourceIDGlobalMission_MSPowerAddCoalTrucks = 3714447040;
simcity.kResourceIDGlobalMission_MSResidentialMoreHouses = 14182385;
simcity.kResourceIDGlobalMission_MSResidentialIncreaseW2Housing = 3705408971;
simcity.kResourceIDGlobalMission_MSTradeConnectToNeighbour = 2653492967;
simcity.kResourceIDGlobalMission_MSTradeBuildBridge = 1281926668;
simcity.kResourceIDGlobalMission_MSWaterNeedWater = 3422757611;
simcity.kResourceIDGlobalMission_MSWaterNeedMoreWaterForIndustry = 1855077613;
simcity.kResourceIDGlobalMission_MSCoalPlaceHQ = 231824156;
simcity.kResourceIDGlobalMission_MSCoalRemoveAllCoal = 715366196;
simcity.kResourceIDGlobalMission_MSCivicProtestAboutSickness = 3355307142;
simcity.kResourceIDGlobalMission_MSCivicProtestAboutTaxes = 1164007788;
simcity.kResourceIDGlobalMission_MSCivicProtestAboutPollution = 3659154265;
simcity.kResourceIDGlobalMission_MSCivicProtestAboutNoWater = 3359132361;
simcity.kResourceIDGlobalMission_MSCivicProtestAboutNoPower = 3181212887;
simcity.kResourceIDGlobalMission_MSCivicProtestAboutGarbage = 2404482678;
simcity.kResourceIDGlobalMission_MSCivicProtestAboutNoRent = 2970058381;
simcity.kResourceIDGlobalMission_MSCivicProtestAboutNoDesirability = 3136214553;
simcity.kResourceIDGlobalMission_MSCivicProtestAboutCrime = 3015720457;
simcity.kResourceIDGlobalMission_MSCivicCreateTownHall = 3702561096;
simcity.kResourceIDGlobalMission_MSGameRockCity1 = 1729074402;
simcity.kResourceIDGlobalMission_MSEducationBackToSchool1 = 3895237884;
simcity.kResourceIDGlobalMission_MSEducationBackToSchool2 = 3895237887;
simcity.kResourceIDGlobalMission_MSEducationBackToSchool3 = 3895237886;
simcity.kResourceIDGlobalMission_MSEducationBackToSchool4 = 3895237881;
simcity.kResourceIDGlobalMission_MSEducationBackToSchool5 = 3895237880;
simcity.kResourceIDGlobalMission_MSEducationBackToSchool6 = 3895237883;
simcity.kResourceIDGlobalMission_MSEducationBackToSchool7 = 3895237882;
simcity.kResourceIDGlobalMission_MSEducationBackToSchool8 = 3895237877;
simcity.kResourceIDGlobalMission_MSEducationBackToSchool9 = 3895237876;
simcity.kResourceIDGlobalMission_MSEducationBackToSchool10 = 2050695300;
simcity.kResourceIDGlobalMission_MSGameMissionChainTest1 = 1178772435;
simcity.kResourceIDGlobalMission_MSGameMissionChainTest2 = 1178772432;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble1 = 1642057161;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble2 = 1642057162;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble3 = 1642057163;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble4 = 1642057164;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble5 = 1642057165;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble5_Event = 3656553728;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble6 = 1642057166;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble7 = 1642057167;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble8 = 1642057152;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble9 = 1642057153;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble10 = 3696292699;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble10_EventStarted = 3514025645;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble11 = 3696292698;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble12 = 3696292697;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble13 = 3696292696;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble14 = 3696292703;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble15 = 3696292702;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble16 = 3696292701;
simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble17 = 3696292700;
simcity.kResourceIDGlobalMission_MSCivicHighwayConnection = 2255928586;
simcity.kResourceIDGlobalMission_MSTutorialClickPoliceSpeechBubble = 3133544067;
simcity.kResourceIDGlobalMission_MSTutorialPoliceStation = 4057625903;
simcity.kResourceIDGlobalMission_MSCivicTutorialCreateSchool = 2853402327;
simcity.kResourceIDGlobalMission_MSTutorialClickSchoolSpeechBubble = 3069258105;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown1 = 995763111;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown2 = 995763108;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown3 = 995763109;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown4 = 995763106;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown5 = 995763107;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown6 = 995763104;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown6_EventStarted = 231060860;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown7 = 995763105;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown8 = 995763118;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown9 = 995763119;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown10 = 367402965;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown11 = 367402964;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown12 = 367402967;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown13 = 367402966;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown14 = 367402961;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown15 = 367402960;
simcity.kResourceIDGlobalMission_MSBusinessMetalsCoalTown16 = 367402963;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields1 = 892324973;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields2 = 892324974;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields3 = 892324975;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields4 = 892324968;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields5 = 892324969;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields6 = 892324970;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields6_EventStarted = 1285698982;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields7 = 892324971;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields8 = 892324964;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields9 = 892324965;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields10 = 658427815;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields11 = 658427814;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields12 = 658427813;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields13 = 658427812;
simcity.kResourceIDGlobalMission_MSBusinessOilOilFields14 = 658427811;
simcity.kResourceIDGlobalMission_MSBusinessElectronicsZTronix2 = 2069738958;
simcity.kResourceIDGlobalMission_MSBusinessElectronicsZTronix4 = 2069738952;
simcity.kResourceIDGlobalMission_MSBusinessElectronicsZTronix6 = 2069738954;
simcity.kResourceIDGlobalMission_MSBusinessElectronicsZTronix7 = 2069738955;
simcity.kResourceIDGlobalMission_MSBusinessElectronicsZTronix13 = 25506180;
simcity.kResourceIDGlobalMission_MSBusinessTradeFreeMarket12 = 1271820632;
simcity.kMapIDPolice = 291106007;
simcity.kMapIDSoil = 687380132;
simcity.kMapIDSoilLayer = 1872718515;
simcity.kMapIDCoalDeposit = 3615082870;
simcity.kMapIDRadiation = 493973294;
simcity.kMapIDOreDeposit = 3612013099;
simcity.kMapIDAirPollution = 1597524951;
simcity.kMapIDGroundPollution = 4137546182;
simcity.kMapIDOilReservoir = 1993412594;
simcity.kMapIDWaterTable = 261282902;
simcity.kMapIDWind = 1537061107;
simcity.kMapIDDesirability_RW2 = 3428137420;
simcity.kMapIDDesirability_RW3 = 3428137421;
simcity.kMapIDDesirability_CW2 = 3430550245;
simcity.kMapIDDesirability_CW3 = 3430550244;
simcity.kToolIDPathSelector = 3342964767;
simcity.kToolIDRoadDraw_Path_Main_MainStreet_N = 1734870231;
simcity.kToolIDRoadDraw_Path_Main_4LaneRoad_N = 1091932133;
simcity.kToolIDRoadDraw_Path_Main_Avenue_N = 751907027;
simcity.kToolIDPlop_T_Transport_Shuttle_T1_Base_Modern_01 = 2046029075;
simcity.kToolIDPlop_T_Transport_Bus_T2_Base_01 = 1437917007;
simcity.kToolIDLotZoneResidential = 3592775070;
simcity.kToolIDLotZoneIndustrial = 3248163797;
simcity.kToolIDLotZoneCommercial = 3536316930;
simcity.kToolIDPlop_T_PowerCoal_T1_Base_01_01_N = 2427954603;
simcity.kToolIDPlop_Coal_ExcavatorGarage_T2 = 1182525564;
simcity.kToolIDPlop_Coal_RetrieverGarage_T2 = 1121316591;
simcity.kToolIDPlop_Coal_TruckGarage_T2 = 3654966590;
simcity.kToolIDPlop_T_PowerWind_PlantBase_01_01_N = 3162783387;
simcity.kToolIDPlopT_Power_CoalT1_Generator_01_01_N = 915293976;
simcity.kToolIDPlop_T_Edu_T1_GradeSchoolBase_01_01_N = 696729506;
simcity.kToolIDPlop_T_Fire_T1_Base = 1828861422;
simcity.kToolIDPlop_T_Garbage_T1_Garage = 2180458371;
simcity.kToolIDPlop_T_Water_T1_WaterTower_01_01_N = 1938059915;
simcity.kToolIDPlop_T_HQ_Casino_Commerce_01 = 3093343809;
simcity.kToolIDPlop_T_Transport_Rail_T2_Base_01 = 3900255577;
simcity.kToolIDRoadDraw_Path_Main_HeavyRail_N = 3673579640;
simcity.kToolIDPlop_T_Air_T1_AirStripBase_01_01_N = 3059032927;
simcity.kToolIDBulldozer = 2536567712;
simcity.kToolIDPlop_T_PowerWind_SmallTurbine_01_01_N = 517089645;
simcity.kToolIDPlop_T_Edu_T1_GradeSchoolClassroom_01_01_N = 2650093832;
simcity.kToolIDPlop_T_Sewage_T1_Base_01_01_N = 3197468449;
simcity.kToolIDPlop_T_ImEx_T1_StorageLot_Coal_01 = 2056252440;
simcity.kToolIDPlop_T_ImEx_T1_StorageLot_Alloy_01 = 2351148906;
simcity.kToolIDPlop_T_ImEx_T1_StorageLot_OreRaw_01 = 3020790721;
simcity.kToolIDPlop_T_ImEx_T1_StorageLot_OilCrude_01 = 4268232492;
simcity.kToolIDPlop_T_ImEx_T2_Garage_01 = 880301932;
simcity.kToolIDPlop_T_ImEx_Crate_T2_Rail_Base_01 = 2453591775;
simcity.kToolIDPlop_T_ImEx_Crate_T2_Boat_Base_01 = 877575481;
simcity.kRuleIDSCPlayerRuleToggleImportExport = 207700323;
simcity.kRuleIDSCPlayerRuleToggleOnOff = 207700320;
simcity.kRuleIDSCPlayerRuleUpgradeBuilding = 236183465;
simcity.kRuleIDSCPlayerRuleCycleDeliveries = 245353295;
simcity.kRuleIDSCPlayerRuleToggleDeliveries = 207700324;
simcity.kRuleIDSCPlayerRuleToggleGlobalTrade = 207700325;
simcity.kRuleIDSCPlayerRuleRunCheats = 218716699;
simcity.kRuleIDSCPlayerRuleCycleResearch = 227885025;
simcity.kRuleIDSCPlayerRuleCancelResearch = 227885026;
simcity.kRuleIDSCPlayerRuleStartResearch = 227885027;
simcity.kRuleIDSCPlayerRuleCheckObjectives = 227885028;
simcity.kRuleIDSCPlayerRuleOnExitBox = 2214556984;
simcity.kUnitFlagUnpowered = 0;
simcity.kUnitFlagUnwatered = 1;
simcity.kUnitFlagChance25Percent = 4;
simcity.kUnitFlagChance50Percent = 5;
simcity.kUnitFlagChance75Percent = 6;
simcity.kUnitFlagIDDeliveriesAllowed = 7;
simcity.kUnitFlagEvacuation = 8;
simcity.kUnitFlagIDImportLot = 9;
simcity.kUnitFlagIDExportLot = 10;
simcity.kUnitFlagOpenForBusiness = 19;
simcity.kUnitFlagOperational = 3;
simcity.kUnitFlagAbandoned = 11;
simcity.kUnitFlagBurning = 12;
simcity.kUnitFlagFoundation = 13;
simcity.kUnitFlagNormal = 14;
simcity.kUnitFlagRubble = 15;
simcity.kUnitFlagUnderConstruction = 16;
simcity.kUnitFlagIsOnFire = 20;
simcity.kUnitFlagVacant = 22;
simcity.kUnitFlagCrimeInProgress = 28;
simcity.kUnitFlagActiveBuilding = 29;
simcity.kUnitFlagProgressAllowed = 32;
simcity.kUnitFlagGreatWorksConstructionSite = 33;
simcity.kUnitFlagDoNotBulldoze = 38;
simcity.kUnitFlagGreatWorksOperational = 39;
simcity.kUnitFlagIDIsToy = 41;
simcity.kUnitFlagIDContinuousWorkplace = 44;
simcity.kUnitFlagIDEventSet = 47;
simcity.kUnitFlagActiveBuildingLock = 55;
simcity.kResourceIDElectronicsBaseUnlocked = 556089978;
simcity.kResourceIDGamblingHallUnlocked = 1279496530;
simcity.kResourceIDOilT1BaseUnlocked = 3752123782;
simcity.kResourceIDOreMineUnlocked = 1001527221;
simcity.kResourceIDTownHallBubbles = 2877554989;
simcity.ToyTaskPanelUI = {};
simcity.cToyTaskPanelUIHandler = function () {
this.UIHandler = scrui.cUIHandler;
this.UIHandler();
this.mParentControl = this.mMouseEaterWindow = null
};
simcity.cToyTaskPanelUIHandler.kBtnClose = 236354934;
simcity.cToyTaskPanelUIHandler.kBtnDismiss = 236354919;
simcity.cToyTaskPanelUIHandler.kBtnAccept = 236354876;
simcity.cToyTaskPanelUIHandler.kBtnClickPanel = 235734144;
simcity.cToyTaskPanelUIHandler.kBtnRight = 235045474;
simcity.cToyTaskPanelUIHandler.kBtnLeft = 235045473;
simcity.cToyTaskPanelUIHandler.kRightImageWindow = 235488781;
simcity.cToyTaskPanelUIHandler.kLeftImageWindow = 235488799;
simcity.cToyTaskPanelUIHandler.kCenterImageWindow = 235488809;
simcity.cToyTaskPanelUIHandler.kPosterGroupWindow = 235043597;
simcity.cToyTaskPanelUIHandler.kDescriptionText = 235053604;
simcity.cToyTaskPanelUIHandler.kHeaderText = 235039745;
simcity.cToyTaskPanelUIHandler.kEventTitleText = 233947634;
simcity.cToyTaskPanelUIHandler.kCostText = 246543986;
simcity.cToyTaskPanelUIHandler.kProfitText = 249659556;
simcity.cToyTaskPanelUIHandler.kTipText = 235054034;
simcity.cToyTaskPanelUIHandler.kMainPosterWindow = 235557468;
simcity.cToyTaskPanelUIHandler.kProgressText = 235053592;
simcity.cToyTaskPanelUIHandler.kAnimLeft = 235045566;
simcity.cToyTaskPanelUIHandler.kAnimRight = 235043381;
simcity.cToyTaskPanelUIHandler.kLockedWindow = 239206332;
simcity.cToyTaskPanelUIHandler.kLockedDescriptionText = 239206402;
goog.inherits(simcity.cToyTaskPanelUIHandler, scrui.cUIHandler);
simcity.cToyTaskPanelUIHandler.prototype.Init = function (a) {
this.mLayout = gUIManager.LoadAndCacheLayout("Layouts/ToyTaskPanel/ToyTaskPanel.js", a);
this.mLayout.SetVisibility(!1);
this.mSelectedOption = 0;
this.mCurrentEventIndex = -1;
this.mLeftWindow = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kLeftImageWindow);
this.mCenterWindow = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kCenterImageWindow);
this.mRightWindow = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kRightImageWindow);
this.mMainPoster = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kMainPosterWindow);
this.mDescriptionText = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kDescriptionText);
this.mPosterGroup = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kPosterGroupWindow);
this.mProgressText = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kProgressText);
this.mHeaderText = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kHeaderText);
this.mTipText = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kTipText);
this.mEventTitleText = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kEventTitleText);
this.mCostText = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kCostText);
this.mProfitText = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kProfitText);
this.mAcceptButton = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kBtnAccept);
this.mRightButton = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kBtnRight);
this.mLeftButton = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kBtnLeft);
this.mLockedWindow = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kLockedWindow);
this.mLockedDescriptionText = this.mLayout.FindControlByID(simcity.cToyTaskPanelUIHandler.kLockedDescriptionText);
this.mToolPickerBindings = {};
this.mUniquePickers = {};
this.mCurrentPicker = void 0;
this.mReasearchCostLocale = new scrui.cLocaleString("ToyTaskPanel.json", "0x0ee1a91b", "Research Cost");
this.mReasearchProfitLocale = new scrui.cLocaleString("ToyTaskPanel.json", "0x0ee1a91c", "Research Profit");
this.mEventCostLocale =
new scrui.cLocaleString("ToyTaskPanel.json", "0x0ee7fcaa", "Event Cost");
this.mEventProfitLocale = new scrui.cLocaleString("ToyTaskPanel.json", "0x0ee7fcab", "Event Profit");
for (a = 0; a < simcity.Pickers.length; a++) {
simcity.Pickers[a].pickerTool && (this.mUniquePickers[simcity.Pickers[a].pickerTool] = {
picker : simcity.Pickers[a]
});
for (var b = 0; b < simcity.Pickers[a].tools.length; b++)
this.mToolPickerBindings[simcity.Pickers[a].tools[b][0]] = {
picker : simcity.Pickers[a],
index : b
}
}
};
simcity.cToyTaskPanelUIHandler.prototype.Start = function (a) {
var b = !1;
this.IsAUniquePicker(a) && (b = !0);
if (!0 === this.ToolHasAPicker(a) || !0 === b) {
for (var c = [], d = this.mCurrentPicker = !0 === b ? this.mUniquePickers[a].picker : this.mToolPickerBindings[a].picker, b = [], e = 0; e < d.tools.length; ++e)
b[e] = scrui.BuildRequestQuery(["tools", d.tools[e][0], "toolPickerInfo"]);
scrui.RequestGameData(b, function (a) {
for (var b = 0; b < a.length; b++) {
var e = a[b];
if (e) {
var i = e.toolName,
j = e.toolDescription,
k = scrui.DecimalToHex(i.stringID),
l =
scrui.DecimalToHex(j.stringID);
c[b] = {
marqueeImage : scrui.PathFromResourceKey(e.marqueeImage),
eventTitleText : new scrui.cLocaleString("Units.json", k, i.placeholder),
textDescription : new scrui.cLocaleString("Tools.json", l, j.placeholder),
textChooseType : d.textChooseType,
textHeader : d.textHeader
}
}
}
});
this.mCurrentDataBindings = c;
this.mTotalOptions = this.mCurrentDataBindings.length;
this.mLayout.SetVisibility(!0);
this.mSelectedOption = this.mToolPickerBindings[a].index
} else
this.mCurrentPicker = void 0, this.mCurrentDataBindings =
a, this.mTotalOptions = this.mCurrentDataBindings.length, this.mLayout.SetVisibility(!0), this.mSelectedOption = 0;
this.RedrawPanels();
this.mRightButton.SetVisibility(1 < this.mTotalOptions);
this.mLeftButton.SetVisibility(1 < this.mTotalOptions)
};
simcity.cToyTaskPanelUIHandler.prototype.ToolHasAPicker = function (a) {
return this.mToolPickerBindings.hasOwnProperty(a)
};
simcity.cToyTaskPanelUIHandler.prototype.IsAUniquePicker = function (a) {
return this.mUniquePickers.hasOwnProperty(a)
};
simcity.cToyTaskPanelUIHandler.prototype.SetUnit = function (a) {
var b = this;
b.mUnitRef = a;
b.mBaseUnitString = scrui.RequestStringFromUnitRef(a);
a = [scrui.BuildRequestQuery(["units", b.mBaseUnitString, "bins", simcity.kResourceIDActiveEventResearch])];
scrui.RequestGameData(a, function (a) {
b.mCurrentEventIndex = a[0].amount
})
};
simcity.cToyTaskPanelUIHandler.prototype.SetVisible = function (a) {
this.mLayout.SetVisibility(a)
};
simcity.cToyTaskPanelUIHandler.prototype.RedrawPanels = function () {
var a = this.mSelectedOption - 1,
b = this.mSelectedOption,
c = this.mSelectedOption + 1;
0 > a && (a = this.mTotalOptions - 1);
c > this.mTotalOptions - 1 && (c = 0);
this.mLeftWindow.SetWindowImage(this.mCurrentDataBindings[a].marqueeImage);
this.mDescriptionText.SetLocaleText(this.mCurrentDataBindings[b].textDescription);
this.mHeaderText.SetLocaleText(this.mCurrentDataBindings[b].textHeader);
this.mTipText.SetLocaleText(this.mCurrentDataBindings[b].textChooseType);
this.mCenterWindow.SetWindowImage(this.mCurrentDataBindings[b].marqueeImage);
this.mRightWindow.SetWindowImage(this.mCurrentDataBindings[c].marqueeImage);
this.mMainPoster.SetWindowImage(this.mCurrentDataBindings[b].marqueeImage);
this.mProgressText.SetRawText(" " + (this.mSelectedOption + 1) + "/" + this.mTotalOptions);
this.mCurrentDataBindings[b].eventTitleText && (this.mEventTitleText.SetVisibility(!0), this.mEventTitleText.SetLocaleText(this.mCurrentDataBindings[b].eventTitleText));
var d = !1,
e = !1;
if (this.mCurrentDataBindings[b].hasOwnProperty("completedGlobalBin")) {
var f =
this;
scrui.RequestGameData([scrui.BuildRequestQuery(["bins", this.mCurrentDataBindings[b].completedGlobalBin])], function (a) {
if (a[0].amount > 0)
d = e = true
})
}
!d && this.mCurrentDataBindings[b].hasOwnProperty("lockedGlobalBin") && (f = this, scrui.RequestGameData([scrui.BuildRequestQuery(["bins", this.mCurrentDataBindings[b].lockedGlobalBin])], function (a) {
a[0].amount == 0 && (d = true)
}));
e ? this.mLockedDescriptionText.SetLocaleText(new scrui.cLocaleString("GlobalUI.json", "0x0f065a6d", "kResearchCompleted")) : d && this.mCurrentDataBindings[b].hasOwnProperty("lockedTextDescription") ?
this.mLockedDescriptionText.SetLocaleText(this.mCurrentDataBindings[b].lockedTextDescription) : this.mLockedDescriptionText.SetRawText("");
this.mLockedWindow.SetOpacity(1);
this.mLockedWindow.SetVisibility(d);
this.mAcceptButton.SetVisibility(!d);
this.mCurrentDataBindings[b].hasOwnProperty("researchCost") ? (f = this, a = [scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDSimoleons]), scrui.BuildRequestQuery([simcity.kDataUnits, f.mBaseUnitString, simcity.kDataProperties, this.mCurrentDataBindings[b].researchCost])],
scrui.RequestGameData(a, function (a) {
f.mCostText.SetVisibility(true);
f.mProfitText.SetVisibility(false);
f.mProfitText.mParentControl.SetVisibility(false);
f.mCostText.SetLocaleText(f.mReasearchCostLocale, {
currency : a[1]
});
if (a[0] < a[1] || a[2]) {
f.mCostText.SetTextColor("red");
f.mAcceptButton.SetEnabled(false)
} else {
f.mCostText.SetTextColor("green");
f.mAcceptButton.SetEnabled(true)
}
})) : this.mCurrentDataBindings[b].hasOwnProperty("eventCost") ? (f = this, a = [scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDSimoleons])],
scrui.RequestGameData(a, function (a) {
f.mCostText.SetVisibility(true);
f.mProfitText.SetVisibility(true);
f.mProfitText.mParentControl.SetVisibility(true);
f.mCostText.SetLocaleText(f.mEventCostLocale, {
currency : f.mCurrentDataBindings[b].eventCost
});
f.mProfitText.SetLocaleText(f.mEventProfitLocale, {
currency : f.mCurrentDataBindings[b].eventProfit
});
if (a[0] < f.mCurrentDataBindings[b].eventCost || a[2]) {
f.mCostText.SetTextColor("red");
f.mAcceptButton.SetEnabled(false)
} else {
f.mCostText.SetTextColor("green");
f.mAcceptButton.SetEnabled(true)
}
})) :
(f = this, a = [scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDSimoleons]), scrui.BuildRequestQuery(["tools", this.mCurrentPicker.tools[this.mSelectedOption], "isLocked"])], scrui.RequestGameData(a, function (a) {
a[1] ? f.mAcceptButton.SetEnabled(false) : f.mAcceptButton.SetEnabled(true)
}), f.mCostText.SetVisibility(!1), f.mCostText.mParentControl.SetVisibility(!1), f.mProfitText.SetVisibility(!1), f.mProfitText.mParentControl.SetVisibility(!1))
};
simcity.cToyTaskPanelUIHandler.prototype.HandleUIMessage = function (a, b, c) {
var d = !1,
e = 0;
scrui.cUIHandler.prototype.HandleUIMessage.call(this, a, b, c);
switch (a) {
case scrui.kMsgTypeButtonClicked:
switch (b) {
case simcity.cToyTaskPanelUIHandler.kBtnClose:
case simcity.cToyTaskPanelUIHandler.kBtnDismiss:
this.SetVisible(!1);
break;
case simcity.cToyTaskPanelUIHandler.kBtnAccept:
a = 0;
0 > this.mCurrentEventIndex ? a = this.mSelectedOption : this.mSelectedOption < this.mCurrentEventIndex ? a = this.mTotalOptions - this.mCurrentEventIndex +
this.mSelectedOption : this.mSelectedOption > this.mCurrentEventIndex && (a = this.mSelectedOption - this.mCurrentEventIndex);
++a;
for (b = 0; b < a; ++b)
scrui.PostGameCommand(scrui.BuildCommand(["runUnitPlayerRule", this.mBaseUnitString, this.mCurrentDataBindings[this.mSelectedOption].playerRule]));
scrui.PostGameCommand(scrui.BuildCommand(["runUnitPlayerRule", this.mBaseUnitString, this.mCurrentDataBindings[this.mSelectedOption].finalizePlayerRule]));
void 0 !== this.mCurrentPicker && scrui.PostGameCommand(scrui.BuildCommand(["selectTool",
this.mCurrentPicker.tools[this.mSelectedOption]]));
this.SetVisible(!1);
break;
case simcity.cToyTaskPanelUIHandler.kBtnRight:
this.mSelectedOption + 1 < this.mTotalOptions ? this.mSelectedOption++ : this.mSelectedOption = 0;
this.mCostText.SetVisibility(!1);
this.mProfitText.SetVisibility(!1);
this.mEventTitleText.SetRawText("");
this.mDescriptionText.SetRawText("");
e = gUIManager.FindAnimationByID(simcity.cToyTaskPanelUIHandler.kAnimRight);
d = !0;
break;
case simcity.cToyTaskPanelUIHandler.kBtnLeft:
0 <= this.mSelectedOption -
1 ? this.mSelectedOption-- : this.mSelectedOption = this.mTotalOptions - 1,
this.mCostText.SetVisibility(!1),
this.mProfitText.SetVisibility(!1),
this.mEventTitleText.SetRawText(""),
this.mDescriptionText.SetRawText(""),
e = gUIManager.FindAnimationByID(simcity.cToyTaskPanelUIHandler.kAnimLeft),
d = !0
}
}
if (d) {
this.mMainPoster.SetWindowImage(this.mCurrentDataBindings[this.mSelectedOption].marqueeImage);
var f = this;
e.RegisterEventCallback(scrui.cAnimation.kEventStopped, function () {
f.RedrawPanels()
})
}
};
simcity.UIToolbox = {};
simcity.gUIToolbox = function (a, b) {
this.mPageIDs = a;
this.mRootLayout = b
};
simcity.gUIToolbox.LocaleString = {
kFutureMinutes : new scrui.cLocaleString("GameEntry.json", "0x0e9d0957", "~minutes:number~ ^choose:~minutes~:minute:minutes^"),
kFutureHours : new scrui.cLocaleString("GameEntry.json", "0x0e9d0958", "~hours:number~ ^choose:~hours~:hour:hours^"),
kFutureDays : new scrui.cLocaleString("GameEntry.json", "0x0e9d094e", "~days:number~ ^choose:~days~:Tomorrow:days^"),
kFutureWeeks : new scrui.cLocaleString("GameEntry.json", "0x0e9d094f", "~weeks:number~ ^choose:~weeks~:week:weeks^"),
kPastMinutes : new scrui.cLocaleString("GameEntry.json",
"0x0e9d0951", "~minutes:number~ ^choose:~minutes~:Just now:minutes^ ago"),
kPastHours : new scrui.cLocaleString("GameEntry.json", "0x0e9d0952", "~hours:number~ ^choose:~hours~:hour:hours^ ago"),
kPastDays : new scrui.cLocaleString("GameEntry.json", "0x0e9d0953", "~days:number~ ^choose:~days~:Yesterday:days^ ago"),
kPastWeeks : new scrui.cLocaleString("GameEntry.json", "0x0e9d0954", "~weeks:number~ ^choose:~weeks~:week:weeks^ ago"),
kTimeShorthandMinutes : new scrui.cLocaleString("GameEntry.json", "0x0f20f6bf"),
kTimeShorthandHours : new scrui.cLocaleString("GameEntry.json",
"0x0f20f6b8"),
kTimeShorthandDays : new scrui.cLocaleString("GameEntry.json", "0x0f20f6b1"),
kTimeShorthandMonths : new scrui.cLocaleString("GameEntry.json", "0x0f337533"),
kDate : new scrui.cLocaleString("GameEntry.json", "0x0e9d0956", "~date:date~"),
kJustNow : new scrui.cLocaleString("GameEntry.json", "0x0e9d0959", "Just now")
};
simcity.gUIToolbox.Patterns = {
kHTMLTag : /<\S[^><]*>/g,
kInvalidCharacters : /[\\"\<\>]/g
};
simcity.gUIToolbox.kMissingAvatar = "Graphics/Common/MissingAvatar.png";
simcity.gUIToolbox.prototype.HideByKeys = function (a) {
if (a && a.length)
for (var b in a)
this.HideByKey(a[b])
};
simcity.gUIToolbox.prototype.HideByKey = function (a) {
var b = this.mRootLayout.FindControlByID(this.mPageIDs[a]);
b ? b.SetVisibility(!1) : this.DebugMsg("Error: Control not found " + a)
};
simcity.gUIToolbox.prototype.ShowByKey = function (a) {
var b = this.mRootLayout.FindControlByID(this.mPageIDs[a]);
b ? b.SetVisibility(!0) : this.DebugMsg("Error: Control not found " + a)
};
simcity.gUIToolbox.prototype.ClearViewByKey = function (a) {
var b = this.mRootLayout.FindControlByID(this.mPageIDs[a]);
b ? this.ClearLayoutByKey(b, a) : this.DebugMsg("container not found")
};
simcity.gUIToolbox.prototype.ClearLayoutByKey = function (a, b) {
var c = a.FindControlByID(this.mPageIDs[b]);
c ? c.DestroyChildren() : this.DebugMsg("ID not found: " + b)
};
simcity.gUIToolbox.prototype.AddEventListeners = function (a, b) {
var c = this.mPageIDs;
if (b && a)
for (var d in b)
c[d] && "function" == typeof b[d] ? simcity.gEventManager.AddEventListener(a, c[d], b[d]) : this.DebugMsg("AddEventListeners: invalid key for " + d)
};
simcity.gUIToolbox.prototype.RemoveEventListeners = function (a, b) {
var c = this.mPageIDs;
if (b && a)
for (var d in b)
c[d] && "function" == typeof b[d] ? simcity.gEventManager.RemoveEventListener(a, c[d], b[d]) : this.DebugMsg("RemoveEventListeners: invalid key for " + d)
};
simcity.gUIToolbox.ResetRawText = function (a, b) {
if (a) {
var c = a.FindControlByID(b);
c && c.SetRawText("")
}
};
simcity.gUIToolbox.ClearControl = function (a) {
a && a.mChildren && a.DestroyChildren()
};
simcity.gUIToolbox.DebugMsg = function (a) {
simcity.cLauncher3D ? simcity.cLauncher3D.DebugMsg(a) : Panel.mStateController && Panel.mStateController.DebugMsg(a)
};
simcity.gUIToolbox.PreloadImage = function (a, b, c, d) {
if (!document.getElementById(a)) {
var e = new Image;
e.setAttribute("id", a);
e.id = a;
e.src = b;
e.width = c;
e.height = d;
e.style.display = "none";
document.body.appendChild(e)
}
};
simcity.gUIToolbox.GetKeys = function (a) {
var b = [],
c;
for (c in a)
b.push(c);
return b
};
simcity.gUIToolbox.FindKeyNoCase = function (a, b) {
for (var c in a)
if (c.trim().toLowerCase() == b.trim().toLowerCase())
return a[c];
return null
};
simcity.gUIToolbox.GetSortedKeysByAttribute = function (a, b) {
var c = {},
d;
for (d in a) {
var e = 0;
a[d][b] && (e = a[d][b]);
c[e] || (c[e] = {}, c[e].data = []);
c[e].data.push(d)
}
d = simcity.gUIToolbox.GetKeys(c).sort();
for (var e = [], f = 0, g = d.length; f < g; f++)
e = e.concat(c[d[f]].data);
return e
};
simcity.gUIToolbox.ParseDate = function (a) {
a = a.match(/(\d+)/g);
return new Date(a[0], a[1] - 1, a[2], a[3], a[4])
};
simcity.gUIToolbox.UtcMsToLocalDate = function (a) {
var b = new Date;
b.setTime(a);
return b
};
simcity.gUIToolbox.PrettyDateUtcMs = function (a) {
a = simcity.gUIToolbox.UtcMsToLocalDate(a);
return simcity.gUIToolbox.PrettyDate(a)
};
simcity.gUIToolbox.PrettyDate = function (a) {
var b = ((new Date).getTime() - a.getTime()) / 6E4;
return 44640 < Math.abs(b) ? simcity.gUIToolbox.LocaleString.kDate.LoadAndGetTextSynchronous({
date : a
}) : 0 > b ? this.GetFutureDateString(b) : this.GetPastDateString(b)
};
simcity.gUIToolbox.GetFutureDateString = function (a) {
var a = Math.floor(Math.abs(a)),
b = Math.floor(a / 60),
c = Math.floor(b / 24),
d = Math.ceil(c / 7);
if (1 > a)
return simcity.gUIToolbox.LocaleString.kJustNow.LoadAndGetTextSynchronous();
if (60 > a)
return simcity.gUIToolbox.LocaleString.kFutureMinutes.LoadAndGetTextSynchronous({
minutes : a
});
if (1440 > a)
return simcity.gUIToolbox.LocaleString.kFutureHours.LoadAndGetTextSynchronous({
hours : b
});
if (10080 > a)
return simcity.gUIToolbox.LocaleString.kFutureDays.LoadAndGetTextSynchronous({
days : c
});
if (44640 > a)
return simcity.gUIToolbox.LocaleString.kFutureWeeks.LoadAndGetTextSynchronous({
weeks : d
})
};
simcity.gUIToolbox.GetPastDateString = function (a) {
var a = Math.floor(Math.abs(a)),
b = Math.floor(a / 60),
c = Math.floor(b / 24),
d = Math.ceil(c / 7);
if (1 > a)
return simcity.gUIToolbox.LocaleString.kJustNow.LoadAndGetTextSynchronous();
if (60 > a)
return simcity.gUIToolbox.LocaleString.kPastMinutes.LoadAndGetTextSynchronous({
minutes : a
});
if (1440 > a)
return simcity.gUIToolbox.LocaleString.kPastHours.LoadAndGetTextSynchronous({
hours : b
});
if (10080 > a)
return simcity.gUIToolbox.LocaleString.kPastDays.LoadAndGetTextSynchronous({
days : c
});
if (44640 > a)
return simcity.gUIToolbox.LocaleString.kPastWeeks.LoadAndGetTextSynchronous({
weeks : d
})
};
simcity.gUIToolbox.PrettyDateFromString = function (a) {
return simcity.gUIToolbox.PrettyDate(simcity.gUIToolbox.ParseDate(a))
};
simcity.gUIToolbox.ElapsedTicks = function (a) {
if (0 > a)
return "";
if (172800 < a) {
var b = Math.floor(a / 172800),
c;
c = Math.floor((a - 172800 * b) / 7200);
return b + "SC days " + c + " hrs"
}
if (7200 < a && 172800 > a)
return c = Math.floor(a / 7200), a = Math.floor((a - 7200 * c) / 120), c = 1 < c ? c + " SC hrs " : c + " SC hr ", 0 < a && (c += a + " mins"), c;
a = Math.floor(a / 120);
return a + " SC mins"
};
simcity.gUIToolbox.MsToTimeString = function (a) {
if (0 >= a)
return "";
var b = Math.floor(a / 864E5),
c = Math.floor(a / 36E5 % 24),
d = Math.floor(a / 6E4 % 60),
a = Math.floor(a / 1E3 % 60),
e = "";
1 < b ? e = b + " Days " : 1 == b && (e = b + " Day ");
return e + (10 > c ? "0" + c : c) + ":" + (10 > d ? "0" + d : d) + ":" + (10 > a ? "0" + a : a) + " Left"
};
simcity.gUIToolbox.Constants = {
kSecondsPerMinute : 60,
kMinutesPerHour : 60,
kHoursPerDay : 24,
kDaysPerMonth : 30,
kSecondsPer : {
SECOND : 1,
MINUTE : 60,
HOUR : 3600,
DAY : 86400,
MONTH : 2592E3
}
};
simcity.gUIToolbox.ConvertMillisToTimeString = function (a, b) {
var c = simcity.gUIToolbox.Constants,
d = function (b) {
switch (b) {
case "M":
return simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a, c.kSecondsPer.MONTH);
case "MM":
return simcity.gUIToolbox.LeftPad(simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a, c.kSecondsPer.MONTH), 0, 2);
case "d":
return simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a, c.kSecondsPer.DAY, c.kDaysPerMonth);
case "dd":
return simcity.gUIToolbox.LeftPad(simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a,
c.kSecondsPer.DAY, c.kDaysPerMonth), 0, 2);
case "h":
return simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a, c.kSecondsPer.HOUR, c.kHoursPerDay);
case "hh":
return simcity.gUIToolbox.LeftPad(simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a, c.kSecondsPer.HOUR, c.kHoursPerDay), 0, 2);
case "m":
return simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a, c.kSecondsPer.MINUTE, c.kMinutesPerHour);
case "mm":
return simcity.gUIToolbox.LeftPad(simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a, c.kSecondsPer.MINUTE,
c.kMinutesPerHour), 0, 2);
case "s":
return simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a, c.kSecondsPer.SECOND, c.kSecondsPerMinute);
case "ss":
return simcity.gUIToolbox.LeftPad(simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a, c.kSecondsPer.SECOND, c.kSecondsPerMinute), 0, 2)
}
};
if (!a || 0 > a)
return "";
if (b)
return b.split(":").map(d).join(":");
var d = this.LeftPad(simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a, c.kSecondsPer.DAY), 0, 2),
e = this.LeftPad(simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a,
c.kSecondsPer.HOUR, c.kHoursPerDay), 0, 2),
f = this.LeftPad(simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a, c.kSecondsPer.MINUTE, c.kMinutesPerHour), 0, 2),
g = this.LeftPad(simcity.gUIToolbox.Private_ConvertMillisToTimeUnit(a, c.kSecondsPer.SECOND, c.kSecondsPerMinute), 0, 2);
return d + ":" + e + ":" + f + ":" + g
};
simcity.gUIToolbox.Private_ConvertMillisToTimeUnit = function (a, b, c) {
return c ? (Math.floor(a / (1E3 * b)) % c).toString() : Math.floor(a / (1E3 * b)).toString()
};
simcity.gUIToolbox.LeftPad = function (a, b, c) {
var d = "";
null != a && void 0 != a && (d = a.toString());
if (!b && !c)
return d;
for (; d.length < c; )
d = b + d;
return d
};
simcity.gUIToolbox.TimeRemaining = function (a) {
if (0 >= a)
return "time's up";
if (6E4 >= a)
return "less than a minute";
if (36E5 >= a)
return Math.floor(a / 6E4) + " minutes";
if (864E5 >= a)
var b = "", c = Math.floor(a / 36E5), a = Math.floor(Math.floor(a - 36E5 * c) / 6E4);
else {
var b = "",
d = Math.floor(a / 864E5),
c = Math.floor((a - 864E5 * d) / 36E5),
a = Math.floor((a - 36E5 * c - 864E5 * d) / 6E4);
1 < d && (b += d + " days ")
}
1 < c && (b += c + " hours ");
1 < a && (b += a + " minutes");
return b
};
simcity.gUIToolbox.ShallowEquals = function (a, b) {
if (a === b)
return !0;
if (!a || !b || Object.keys(a).length !== Object.keys(b).length)
return !1;
for (var c in a)
if (a[c] !== b[c])
return !1;
return !0
};
simcity.gUIToolbox.IsNumber = function (a) {
return !isNaN(parseFloat(a)) && isFinite(a)
};
simcity.gUIToolbox.NumberToString = function (a, b) {
var c = (new String(a)).split(".");
c[0] && (c[0] = scrui.LocalizeNumber(c[0]));
0 == b ? c.length = 1 : c[1] && 0 < b && (c[1] = c[1].substr(0, b));
return c.join(".")
};
simcity.gUIToolbox.ToBoolean = function (a) {
return "string" === typeof a ? "true" === a : "boolean" === typeof a ? a : !1
};
simcity.gUIToolbox.StripHTML = function (a) {
return a.replace(simcity.gUIToolbox.Patterns.kHTMLTag, "")
};
simcity.gUIToolbox.HasHTML = function (a) {
return null != a.match(simcity.gUIToolbox.Patterns.kHTMLTag)
};
simcity.gUIToolbox.StripInvalidChars = function (a) {
return a.replace(simcity.gUIToolbox.Patterns.kInvalidCharacters, " ")
};
simcity.gUIToolbox.HasInvalidChars = function (a) {
return null != a.match(simcity.gUIToolbox.Patterns.kInvalidCharacters)
};
simcity.gUIToolbox.Sanitize = function (a) {
return simcity.gUIToolbox.StripHTML(a.trim()).replace(simcity.gUIToolbox.Patterns.kInvalidCharacters, "")
};
simcity.gUIToolbox.Encode = function (a) {
return a ? encodeURIComponent(a.trim()) : ""
};
simcity.gUIToolbox.SetControlAspectRatio = function (a, b) {
var c = a.mHeight,
d = a.mWidth;
if (d / c >= b) {
var e = b * c;
d > e && a.SetPosition(a.mLeft + (d - e) / 2, 0, e, c)
} else
e = d / b, c > e && a.SetPosition(0, a.mTop + (c - e) / 2, d, e)
};
simcity.gUIToolbox.IsPointWithinControl = function (a, b, c) {
a = a.GetAbsoluteBoundingBox();
return b > a[0] && b < a[2] && c > a[1] && c < a[5]
};
simcity.gUIToolbox.SetAvatar = function (a, b, c, d) {
if (a) {
var e = simcity.gUIToolbox.kMissingAvatar;
b && (e = simcity.gUIToolbox.GetAvatarUrl(b, c, d));
a.SetWindowImage(e);
a.mImageElement && (a.mImageElement.onerror = function () {
a.mImageElement.src = simcity.gUIToolbox.kMissingAvatar
})
}
};
simcity.gUIToolbox.SetAvatarByUrl = function (a, b) {
if (a && (b || (b = simcity.gUIToolbox.kMissingAvatar), a.SetWindowImage(b), a.mImageElement))
a.mImageElement.onerror = function () {
a.mImageElement.src = simcity.gUIToolbox.kMissingAvatar
}
};
simcity.gUIToolbox.GetAvatarUrl = function (a, b, c) {
var b = b ? b : 64,
c = c ? c : 64,
d = simcity.gConfigurationValues.mAvatarUrl;
if (simcity.IsMainTutorialInProgress && simcity.IsMainTutorialInProgress() && a == simcity.TutorialFakeUserData.creator.screenName)
return simcity.TutorialFakeUserData.creator.avatarImage;
if (null == d)
return scrui.GetRestPath() + "user/" + a + "/avatar?w=" + b + "&h=" + c;
var e = Math.max(b, c),
f = "LARGE";
64 >= e ? f = "SMALL" : 128 >= e && (f = "MEDIUM");
d = d.replace(/~screenName~/g, a);
d = d.replace(/~userId~/g, a);
d = d.replace(/~width~/g,
b);
d = d.replace(/~height~/g, c);
return d = d.replace(/~size~/g, f)
};
simcity.gUIToolbox.GetAvatarFrame = function (a, b, c) {
return !a ? simcity.cConstants.kPresenceAvatarFrames.OFFLINE : a.id == simcity.gSessionManager.mUserID ? simcity.gPresenceManager.IsOffline() ? simcity.cConstants.kPresenceAvatarFrames.OFFLINE : simcity.cConstants.kPresenceAvatarFrames.LOGGED_IN_USER : !a.isOnline || "false" == a.isOnline ? simcity.cConstants.kPresenceAvatarFrames.OFFLINE : a.inTutorial || !a.currentPlayingRegionId || a.currentPlayingRegionId != b && (c ? a.currentPlayingBoxId != c : 1) ? simcity.cConstants.kPresenceAvatarFrames.AWAY :
simcity.cConstants.kPresenceAvatarFrames.ONLINE
};
simcity.Tokenizer = function (a, b) {
this.tokens = a;
this.template = b;
this.regex = /{(\d+)}/ig
};
simcity.Tokenizer.prototype.Parse = function () {
for (var a = this.template, b = this.template.match(this.regex), c = 0; c < b.length; c++) {
var d = b[c].match(/\d+/)[0];
this.tokens[d] ? (d = this.LinkWrap(this.tokens[d], "simcity.Route"), a = a.replace(b[c], d)) : a = a.replace(b[c], "#not_found:" + key + "#")
}
return a
};
simcity.Tokenizer.prototype.LinkWrap = function (a, b) {
var c = a.split(/:/g);
return "<a href='javascript:" + b + "('" + c[1] + "');'>" + c[0] + "</a>"
};
simcity.Tokenizer.prototype.Quote = function (a) {
return a.replace(/([.?*+^$[\]\\(){}-])/g, "\\$1")
};
simcity.gUIToolbox.LabeledCheckbox = function (a) {
this.mLayer = a.mLayer;
this.mStateValue = a.mStateValue;
this.mControlKey = a.mControlKey;
this.mStatusTextKey = a.mStatusTextKey;
this.mImageOn = a.mImageOn;
this.mImageOff = a.mImageOff;
this.mLocaleTextOn = a.mLocaleTextOn;
this.mLocaleTextOff = a.mLocaleTextOff
};
simcity.gUIToolbox.LabeledCheckbox.prototype.Toggle = function () {
this.mStateValue = !this.mStateValue;
var a = this.mLayer.FindControlByID(this.mControlKey),
b = this.mLayer.FindControlByID(this.mStatusTextKey);
this.mStateValue ? (a.SetButtonImage(this.mImageOn), b.SetLocaleText(this.mLocaleTextOn)) : (a.SetButtonImage(this.mImageOff), b.SetLocaleText(this.mLocaleTextOff))
};
simcity.gUIToolbox.GetSelectedIdsFromControl = function (a, b, c) {
var a = a.mChildren,
d = [];
if (!a)
return d;
if (a && a.length)
for (var e = 0, f = a.length; e < f; e++) {
var g = a[e].FindControlByID(b);
if (g && g instanceof scrui.cWindow && g.mIsVisible || g instanceof scrui.cButton && g.mIsSelected)
g = g.GetParentLayout()[c], d.push(g)
}
return d
};
simcity.gUIToolbox.ResetSelectedIdsFromScrollWindow = function (a, b, c) {
if ((a = a.FindControlByID(b).mChildren) && a.length)
for (var b = 0, d = a.length; b < d; b++) {
var e = a[b].FindControlByID(c);
e && e.SetSelected(!1)
}
};
simcity.gUIToolbox.TimedCachedObject = function () {
var a = function (a, c) {
a || (a = 10);
this.expireAtTime = new Date;
this.expireAtTime.setMinutes(this.expireAtTime.getMinutes() + a);
this.data = c
};
a.prototype.isExpired = function () {
return (new Date).getTime() >= this.expireAtTime.getTime()
};
a.prototype.getData = function () {
return this.data
};
a.prototype.setData = function (a) {
this.data = a
};
return a
}
();
simcity.gUIToolbox.GetExponentialPopulation = function (a) {
if (500 >= a)
return a;
if (40845 < a)
return Math.floor(8.25 * a);
a = Math.pow(a - 500, 1.2) + 500;
return Math.round(a)
};
simcity.gUIToolbox.OpenSCHelpSiteWithAuth = function (a) {
var b = gUIManager.mLocaleManager.mLocaleCode,
c = simcity.gConfigurationValues.mHelpLinkUrl,
d = /^(https?:\/\/)?help.ea.com/,
b = simcity.gUIToolbox.StringStartsWith(c, d) ? {
locale : b,
returnUrl : c.replace(d, "")
}
: {
communityUrl : c.replace(/#[a-zA-Z0-9]*$/, "")
};
a ? simcity.cOriginUtilities.OpenExternalBrowserWithAuth(simcity.cConstants.kHelpSiteSsoURL, simcity.cConstants.kHelpSiteTokenKey, b) : simcity.cOriginUtilities.OpenBrowserWithAuth(simcity.cConstants.kHelpSiteSsoURL,
simcity.cConstants.kHelpSiteTokenKey, b)
};
simcity.gUIToolbox.OpenSCHelpSite = function (a) {
var b = simcity.gConfigurationValues.mHelpLinkUrl;
a ? scrui.OpenExternalBrowserWithAuth(b) : simcity.cOriginUtilities.OpenBrowserWithAuth(b)
};
simcity.gUIToolbox.OpenHelpArticleSite = function (a) {
var b = simcity.gConfigurationValues.mWWCEArticleURL;
a ? scrui.OpenExternalBrowser(b) : simcity.cOriginUtilities.OpenBrowserWithAuth(b)
};
simcity.gUIToolbox.OpenArticleLink = function (a) {
var b,
c = /^(https?:\/\/)?help.ea.com/,
d = gUIManager.mLocaleManager.mLocaleCode;
simcity.gUIToolbox.StringStartsWith(a, /^(https?:\/\/)?answers.ea.com/) ? b = {
communityUrl : simcity.gUIToolbox.GetURLWithFormattedLocale(a.replace(/#[a-zA-Z0-9]*$/, ""))
}
: simcity.gUIToolbox.StringStartsWith(a, c) && (b = {
locale : d,
returnUrl : simcity.gUIToolbox.GetURLWithFormattedLocale(a.replace(c, ""))
});
b ? simcity.cOriginUtilities.OpenExternalBrowserWithAuth(simcity.cConstants.kHelpSiteSsoURL,
simcity.cConstants.kHelpSiteTokenKey, b) : scrui.OpenExternalBrowser(a)
};
simcity.gUIToolbox.OpenSCGameManual = function () {
scrui.OpenExternalBrowser(simcity.gConfigurationValues.mGameManualUrl)
};
simcity.gUIToolbox.GetURLWithFormattedLocale = function (a) {
if (!a)
return a;
if (a) {
var b = gUIManager.mLocaleManager.mLocaleCode;
b && (b = b.split("-"), b[0] && (b[0] = b[0].toLowerCase()), b[1] && (b[1] = b[1].toUpperCase()), b = b.join("-"));
var c = /~locale~/g,
d = /~-locale~/g,
e = /~lang~/g,
f = /~country~/g;
null !== a.match(c) && (a = a.replace(c, b.replace(/-/g, "_")));
null !== a.match(d) && (a = a.replace(d, b));
null !== a.match(e) && (a = a.replace(e, b.substr(0, 2)));
null !== a.match(f) && (a = a.replace(f, b.substr(3)))
}
return a
};
simcity.gUIToolbox.GetLocale = function () {
var a;
gUIManager.mLocaleManager.mLocaleCode && (a = gUIManager.mLocaleManager.mLocaleCode.replace("-", "_"));
return a ? a : "en_us"
};
simcity.gUIToolbox.GetDurationInShorthandFormat = function (a) {
var a = (0 < a ? simcity.gUIToolbox.ConvertMillisToTimeString(a, "M:d:h:m") : "0:0:0:0").split(":"),
b = "";
"0" !== a[0] && "00" !== a[0] && (b += a[0] + simcity.gUIToolbox.LocaleString.kTimeShorthandMonths.LoadAndGetTextSynchronous(), b += " ");
b += a[1] + simcity.gUIToolbox.LocaleString.kTimeShorthandDays.LoadAndGetTextSynchronous();
b += " " + a[2] + simcity.gUIToolbox.LocaleString.kTimeShorthandHours.LoadAndGetTextSynchronous();
return b += " " + a[3] + simcity.gUIToolbox.LocaleString.kTimeShorthandMinutes.LoadAndGetTextSynchronous()
};
simcity.gUIToolbox.TrimString = function (a) {
return a.replace(/^\s+|\s+$/g, "")
};
simcity.gUIToolbox.StringStartsWith = function (a, b) {
return b instanceof RegExp ? null !== a.match(b) : null !== a.match(RegExp("^" + b))
};
simcity.gUIToolbox.StringEndsWith = function (a, b) {
return b instanceof RegExp ? null !== a.match(b) : null !== a.match(RegExp(b + "$"))
};
simcity.gUIToolbox.UnwrapId = function (a) {
if (!a)
return "";
for (var a = window.atob(a), b = a.length, c = "", d = 0; d < b; ++d)
var e = "20ce46kgg256254708gewr65gdd4gyy"[d % 31].charCodeAt(0), f = a[d].charCodeAt(0), c = c + String.fromCharCode(f^e);
return c
};
simcity.gUIToolbox.kTrackingUri = "user/notifications/";
simcity.gUIToolbox.GetTrackingValue = function (a, b, c) {
a = {
url : scrui.GetRestPath() + simcity.gUIToolbox.kTrackingUri + a + ".json",
onSuccess : function (a) {
a = a.json.date_updated;
"function" == typeof b && b(a)
},
onError : c,
method : "get"
};
scrui.XHR.Request(a)
};
simcity.gUIToolbox.SetTrackingValue = function (a) {
a = {
url : scrui.GetRestPath() + simcity.gUIToolbox.kTrackingUri + a,
method : "post"
};
scrui.XHR.Request(a)
};
simcity.FriendController = {};
simcity.cFriendController = function () {
this.mFriendCache = null;
this.mFriendPresenceSubscriptions = {};
this.mFriendListChangedSubscribed = !1;
this.mIsFirstUpdate = !0;
this.mFriendRequestCache = null;
this.mDoingServerSync = this.mUpdatingFriendRequestCache = !1;
this.mFriendCache = null;
this.mUpdatingFriendCache = !1;
this.mPendingRequestCache = null;
this.mUpdatingPendingRequestCache = !1;
this.mServiceURLs = {
FRIEND_REQUESTS : "user/friendRequests",
PENDING_REQUESTS : "user/friendInvites",
ORIGIN_SYNC : "user/friends/origin"
}
};
simcity.cFriendController.kMaxRequestsToFetch = 100;
simcity.cFriendController.kMaxPendingRequestsToFetch = 100;
simcity.cFriendController.kRequestCacheMin = 2;
simcity.cFriendController.kFriendCacheMin = 2;
simcity.cFriendController.kMsgRequestsChanged = 246549693;
simcity.cFriendController.kMsgFriendsChanged = 247669359;
simcity.cFriendController.kMsgFriendsPresenceChanged = 40901455;
simcity.cFriendController.kUserInfoRestUrl = "user/";
simcity.cFriendController.kFriendsUri = "/friends.json";
simcity.cFriendController.kUnfriendUri = "/friends/";
simcity.cFriendController.kSocketEventGuid = 237906218;
simcity.cFriendController.kSocketPresenceMessageType = 2343608712;
simcity.cFriendController.kSocketPresenceResponseEventId = 3498425072;
simcity.cFriendController.kSocketGameEntryMessageType = 2565274370;
simcity.cFriendController.kSocketListChangedEventId = 311058824;
simcity.cFriendController.kSocketListChangedGuid = 249588249;
simcity.cFriendController.prototype.GetOnlineFriends = function () {
for (var a = this.GetCachedFriends(), b = [], c = 0; a && a.length && c < a.length; c++)
(!0 === a[c].isOnline || "true" === a[c].isOnline) && b.push(a[c]);
return b
};
simcity.cFriendController.prototype.GetOfflineFriends = function () {
for (var a = this.GetCachedFriends(), b = [], c = 0; a && a.length && c < a.length; c++)
(!1 === a[c].isOnline || "false" === a[c].isOnline) && b.push(a[c]);
return b
};
simcity.cFriendController.prototype.GetCachedFriendRequests = function () {
(!this.mFriendRequestCache || this.mFriendRequestCache.isExpired()) && this.UpdateFriendRequestsFromServer();
return this.mFriendRequestCache ? this.mFriendRequestCache.getData() : []
};
simcity.cFriendController.prototype.GetCachedFriends = function () {
(!this.mFriendCache || this.mFriendCache.isExpired()) && this.UpdateFriendsFromServer();
return this.mFriendCache ? this.mFriendCache.getData().friends : []
};
simcity.cFriendController.prototype.IsFriendListFirstUpdate = function () {
return this.mIsFirstUpdate && this.mUpdatingFriendCache
};
simcity.cFriendController.prototype.UpdateFriendRequestsFromServer = function () {
if (!this.mUpdatingFriendRequestCache) {
this.mUpdatingFriendRequestCache = !0;
var a = this,
b = function () {
a.mUpdatingFriendRequestCache = !1;
a.mFriendRequestCache || (a.mFriendRequestCache = new simcity.gUIToolbox.TimedCachedObject(simcity.cFriendController.kRequestCacheMin, []))
},
c = {
url : scrui.GetRestPath() + this.mServiceURLs.FRIEND_REQUESTS + ".json",
params : [["start", 0], ["count", simcity.cFriendController.kMaxRequestsToFetch]],
onSuccess : function (c) {
c.json &&
c.json.error ? b(c) : (a.mUpdatingFriendRequestCache = !1, c = c.json && c.json.users ? c.json.users : [], delete a.mFriendRequestCache, a.mFriendRequestCache = new simcity.gUIToolbox.TimedCachedObject(simcity.cFriendController.kRequestCacheMin, c), gUIManager.SendMessage(simcity.cFriendController.kMsgRequestsChanged))
},
onError : b,
method : "get"
};
scrui.XHR.Request(c)
}
};
simcity.cFriendController.prototype.GetCachedPendingRequests = function () {
(!this.mPendingRequestCache || this.mPendingRequestCache.isExpired()) && this.UpdatePendingRequestsFromServer();
return this.mPendingRequestCache ? this.mPendingRequestCache.getData() : []
};
simcity.cFriendController.prototype.IsRequestPending = function (a) {
var b = this.GetCachedPendingRequests(),
c;
for (c in b) {
var d = b[c];
if (d && d.id == a)
return !0
}
return !1
};
simcity.cFriendController.prototype.UpdatePendingRequestsFromServer = function () {
if (!this.mUpdatingPendingRequestCache) {
this.mUpdatingPendingRequestCache = !0;
var a = this,
b = function () {
a.mUpdatingPendingRequestCache = !1;
a.mPendingRequestCache || (a.mPendingRequestCache = new simcity.gUIToolbox.TimedCachedObject(simcity.cFriendController.kRequestCacheMin, []))
},
c = {
url : scrui.GetRestPath() + this.mServiceURLs.PENDING_REQUESTS + ".json",
params : [["start", 0], ["count", simcity.cFriendController.kMaxPendingRequestsToFetch]],
onSuccess : function (c) {
c.json && c.json.error ? b(c) : (a.mUpdatingPendingRequestCache = !1, c = c.json && c.json.users ? c.json.users : [], delete a.mPendingRequestCache, a.mPendingRequestCache = new simcity.gUIToolbox.TimedCachedObject(simcity.cFriendController.kRequestCacheMin, c), gUIManager.SendMessage(simcity.cFriendController.kMsgRequestsChanged))
},
onError : b,
method : "get"
};
scrui.XHR.Request(c)
}
};
simcity.cFriendController.prototype.AcceptFriendRequest = function (a, b, c) {
var d = this;
this.AddFriend(a, function (c) {
d.Private_RemoveFromRequestCache(a);
d.UpdateFriendsFromServer();
"function" == typeof b && b(c)
}, c)
};
simcity.cFriendController.prototype.IgnoreFriendRequest = function (a, b) {
var c = this,
d = {
url : scrui.GetRestPath() + this.mServiceURLs.FRIEND_REQUESTS + "/" + a + ".json",
onSuccess : function (d) {
c.Private_RemoveFromRequestCache(a);
"function" == typeof b && b(d)
},
method : "delete"
};
scrui.XHR.Request(d)
};
simcity.cFriendController.prototype.Private_RemoveFromRequestCache = function (a) {
var b = this.mFriendRequestCache.getData();
if (b)
for (var c = 0; c < b.length; ++c)
if (b[c].id == a) {
b.splice(c, 1);
break
}
};
simcity.cFriendController.prototype.IsLoggedInUsersFriend = function (a) {
return null != this.FindInFriendCache(a)
};
simcity.cFriendController.prototype.AddFriend = function (a, b, c) {
var d = this,
e = function (a) {
"function" == typeof c && c(a)
},
f = {
url : scrui.GetRestPath() + "user/" + this.Private_GetLoggedInUserId() + "/friends.json",
params : [["friendIds", a]],
onSuccess : function (c) {
c.json && c.json.errorCode ? e(c) : (d.mPendingRequestCache || (d.mPendingRequestCache = new simcity.gUIToolbox.TimedCachedObject(simcity.cFriendController.kRequestCacheMin, [])), d.mPendingRequestCache.getData().push({
id : a
}), gUIManager.SendMessage(simcity.cFriendController.kMsgFriendsChanged),
d.UpdateFriendRequestsFromServer(), d.UpdatePendingRequestsFromServer(), d.RequestPresenceSubscriptionByID(a), "function" == typeof b && b(c.json))
},
onError : e,
method : "post"
};
scrui.XHR.Request(f)
};
simcity.cFriendController.prototype.DeleteFriend = function (a, b, c) {
var d = this,
e = function () {
"function" == typeof c && c()
},
f = {
url : scrui.GetRestPath() + simcity.cFriendController.kUserInfoRestUrl + this.Private_GetLoggedInUserId() + simcity.cFriendController.kUnfriendUri + a,
params : [],
onSuccess : function (c) {
c.json && c.json.errorCode ? e(c) : (d.RemovePresenceSubscriptionByID(a), d.Private_RemoveFriendFromCache(a), d.UpdateFriendRequestsFromServer(), d.UpdatePendingRequestsFromServer(), "function" == typeof b && b(a))
},
onError : e,
method : "delete"
};
scrui.XHR.Request(f)
};
simcity.cFriendController.prototype.UpdateFriendsFromServer = function () {
if (!this.mUpdatingFriendCache) {
this.mUpdatingFriendCache = !0;
var a = this,
b = function () {
a.mUpdatingFriendCache = !1;
a.mIsFirstUpdate && (a.mIsFirstUpdate = !1, gUIManager.SendMessage(simcity.cFriendController.kMsgFriendsChanged))
},
c = this.Private_GetLoggedInUserId(),
c = {
url : scrui.GetRestPath() + simcity.cFriendController.kUserInfoRestUrl + c + simcity.cFriendController.kFriendsUri,
onSuccess : function (c) {
if (c.json.error)
b(c);
else {
a.mUpdatingFriendCache =
!1;
a.mIsFirstUpdate = !1;
for (var e = (c = c.json.users) ? c.length : 0, f = 0; f < e; ++f)
c[f].extraData && (c[f].nucleusId = simcity.gUIToolbox.UnwrapId(c[f].extraData));
a.Private_SetFriendCache(c);
for (var g in c)
a.RequestPresenceSubscriptionByID(c[g].id);
gUIManager.SendMessage(simcity.cFriendController.kMsgFriendsChanged)
}
},
onError : b,
method : "get"
};
scrui.XHR.Request(c)
}
};
simcity.cFriendController.prototype.IsFriendOnline = function (a) {
return (a = this.FindInFriendCache(a)) ? a.isOnline : !1
};
simcity.cFriendController.prototype.FindInFriendCache = function (a) {
if (!this.mFriendCache)
return null;
var b = this.mFriendCache.getData(),
a = b.idMap[a];
return null === typeof a || void 0 === a ? null : b.friends[a]
};
simcity.cFriendController.prototype.UpdateFriendsPresence = function (a) {
var b = this.FindInFriendCache(a.USER_GAME_EVENT);
if (b) {
for (var c in a)
b[c] = a[c];
gUIManager.SendMessage(simcity.cFriendController.kMsgFriendsPresenceChanged, b)
}
};
simcity.cFriendController.FriendsPresenceCallback = function (a) {
simcity.gFriendController.UpdateFriendsPresence(a)
};
simcity.cFriendController.FriendsListChangedCallback = function () {
simcity.gFriendController.UpdateFriendsFromServer();
simcity.gFriendController.UpdateFriendRequestsFromServer();
simcity.gFriendController.UpdatePendingRequestsFromServer()
};
simcity.cFriendController.prototype.RequestPresenceSubscriptionByID = function (a) {
if (!this.mFriendPresenceSubscriptions[a]) {
var b = Number(simcity.cFriendController.kSocketEventGuid) + a;
simcity.gSocketManager.AddSocketRequest("/subscriptions/user/" + a + "/messageType/" + Number(simcity.cFriendController.kSocketPresenceMessageType) + "/eventId/" + Number(simcity.cFriendController.kSocketPresenceResponseEventId), b, simcity.cFriendController.FriendsPresenceCallback, !1);
this.mFriendPresenceSubscriptions[a] = b
}
};
simcity.cFriendController.prototype.RemovePresenceSubscriptionByID = function (a) {
simcity.gSocketManager.RemoveSocketRequest("/subscriptions/user/" + a + "/messageType/" + Number(simcity.cFriendController.kSocketPresenceMessageType) + "/eventId/" + Number(simcity.cFriendController.kSocketPresenceResponseEventId), Number(simcity.cFriendController.kSocketEventGuid) + a, simcity.cFriendController.FriendsPresenceCallback, !1);
delete this.mFriendPresenceSubscriptions[a]
};
simcity.cFriendController.prototype.RequestListChangeSubscription = function () {
if (!this.mFriendListChangedSubscribed) {
var a = "/subscriptions/user/" + this.Private_GetLoggedInUserId() + "/messageType/" + Number(simcity.cFriendController.kSocketGameEntryMessageType) + "/eventId/" + Number(simcity.cFriendController.kSocketListChangedEventId);
simcity.gSocketManager.AddSocketRequest(a, Number(simcity.cFriendController.kSocketListChangedGuid), simcity.cFriendController.FriendsListChangedCallback, !1);
this.mFriendListChangedSubscribed =
!0
}
};
simcity.cFriendController.prototype.RemoveListChangeSubscription = function () {
var a = "/subscriptions/user/" + this.Private_GetLoggedInUserId() + "/messageType/" + Number(simcity.cFriendController.kSocketGameEntryMessageType) + "/eventId/" + Number(simcity.cFriendController.kSocketListChangedEventId);
simcity.gSocketManager.RemoveSocketRequest(a, Number(simcity.cFriendController.kSocketListChangedGuid), simcity.cFriendController.FriendsListChangedCallback, !1);
this.mFriendListChangedSubscribed = !1
};
simcity.cFriendController.prototype.Private_GetLoggedInUserId = function () {
return simcity.gSessionManager.mUserID
};
simcity.cFriendController.prototype.Private_RemoveFriendFromCache = function (a) {
for (var b = this.GetCachedFriends(), c = 0; c < b.length; ++c)
if (b[c].id == a) {
b.splice(c, 1);
this.Private_SetFriendCache(b);
gUIManager.SendMessage(simcity.cFriendController.kMsgFriendsChanged);
break
}
};
simcity.cFriendController.prototype.Private_SetFriendCache = function (a) {
var b = this.Private_BuildFriendIdMap(a);
this.mFriendCache = new simcity.gUIToolbox.TimedCachedObject(simcity.cFriendController.kFriendCacheMin, {
friends : a ? a : [],
idMap : b
})
};
simcity.cFriendController.prototype.Private_BuildFriendIdMap = function (a) {
if (!a)
return {};
for (var b = {}, c = a.length, d = 0; d < c; ++d)
b[a[d].id] = d;
return b
};
simcity.cFriendController.prototype.UserSearch = function (a, b, c) {
if (a && "" != a) {
var d = this,
e = {
url : scrui.GetRestPath() + "users/search/" + a + ".json",
params : [["includeachievements", "true"]],
onSuccess : function (c) {
c = {
searchterm : a,
total_achievements_count : c.json.total_achievements_count,
users : d.FilterSearchResults(c)
};
b && "function" == typeof b && b(c)
},
onError : function (a) {
c && "function" == typeof c && c(a)
},
method : "get"
};
scrui.XHR.Request(e)
}
};
simcity.cFriendController.prototype.FilterSearchResults = function (a) {
var a = a.json.users,
b = {
friends : null,
strangers : null
},
c = this.GetCachedFriends();
if (!c)
return b.strangers = a, b;
for (var d = [], e = 0; e < c.length; ++e)
d.push(c[e].id);
for (var c = [], f = [], e = 0; e < a.length; ++e)
a[e].id != this.Private_GetLoggedInUserId() && (-1 === d.indexOf(a[e].id) ? f.push(a[e]) : c.push(a[e]));
b.friends = c;
b.strangers = f;
return b
};
simcity.cFriendController.prototype.ProcessOriginFriendList = function (a) {
this.Private_NeedServerSync(a) && this.DoServerOriginSync()
};
simcity.cFriendController.prototype.Private_NeedServerSync = function (a) {
if (!this.mFriendCache)
return !0;
for (var a = a.slice(0), b = this.GetCachedFriends(), c = [], d = 0; d < b.length; ++d) {
var e = a.indexOf(b[d].nucleusId);
-1 == e ? c.push(d) : a.splice(e, 1)
}
if (0 < c.length) {
for (d = c.length - 1; 0 <= d; --d)
b.splice(c[d], 1);
this.Private_SetFriendCache(b);
gUIManager.SendMessage(simcity.cFriendController.kMsgFriendsChanged);
return !0
}
return 0 < a.length
};
simcity.cFriendController.prototype.DoServerOriginSync = function () {
if (!this.mDoingServerSync) {
this.mDoingServerSync = !0;
var a = this,
b = {
url : scrui.GetRestPath() + this.mServiceURLs.ORIGIN_SYNC + ".json",
onSuccess : function () {
a.mDoingServerSync = !1
},
onError : function () {
a.mDoingServerSync = !1
},
method : "post"
};
scrui.XHR.Request(b)
}
};
simcity.gFriendController = new simcity.cFriendController;
simcity.GameInvitesController = {};
simcity.cGameInvitesController = function () {
this.mDialogManager = null;
this.mPageIDs = {
AVATAR_NAME : 238866083,
AVATAR_IMAGE : 238864739,
AVATAR_PRESENCE_FRAME : 238864737,
AVATAR_TOGGLE : 238866086,
INVITE_FRIENDS_PANEL : 239986382,
INVITE_ONLINE_HEADER : 239982485,
INVITE_SCROLL_WINDOW : 239982451,
SEND_INVITES_BUTTON : 239982296,
CANCEL_INVITES_BUTTON : 239982327,
INVITE_MESSAGE : 240080460,
INVITE_TITLE : 239982257,
INVITE_OFFLINE_HEADER : 239982487,
REGION_INVITE_BUTTON : 239986074,
INVITE_MSG_ANIMATION : 251994376,
WHITE_TRIANGLE : 254858258,
IN_GAME_CONTAINER : 254857956
}
};
simcity.cGameInvitesController.LocaleString = {
kPleaseSelectFriends : new scrui.cLocaleString("GameEntry.json", "0x0ecf08eb"),
kInviteSuccess : new scrui.cLocaleString("GameEntry.json", "0x7144221c"),
kInviteFailed : new scrui.cLocaleString("GameEntry.json", "0x84e340d5"),
kOops : new scrui.cLocaleString("GameEntry.json", "0x10354d5d"),
kInviteTitle : new scrui.cLocaleString("GameEntry.json", "0xb42d3ccb")
};
simcity.cGameInvitesController.kPageLayout = {
USER_TOGGLE_AVATAR : "Layouts/GameEntry/Play/JoinGame_FilterByFriends_Button.js"
};
simcity.cGameInvitesController.prototype.Initialize = function () {
var a = simcity.gGameInvitesController.mPageIDs;
simcity.gGlobalUIHandler && simcity.gGlobalUIHandler.mDialogManager ? (this.mDialogManager = simcity.gGlobalUIHandler.mDialogManager, gUIManager.FindControlByID(a.REGION_INVITE_BUTTON).SetVisibility(!1)) : this.mDialogManager = simcity.cLauncher3D.mDialogManager;
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, this.mPageIDs.REGION_INVITE_BUTTON, this.ToggleInvitePanel);
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK,
this.mPageIDs.SEND_INVITES_BUTTON, this.InviteUsers);
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, this.mPageIDs.CANCEL_INVITES_BUTTON, this.HideInvitePanel);
this.mOnShowInvitePanel = function () {}
};
simcity.cGameInvitesController.prototype.ShowInvitePanel = function (a) {
var b = simcity.gGameInvitesController.mPageIDs,
c = a.FindControlByID(b.INVITE_FRIENDS_PANEL),
d = c.FindControlByID(b.INVITE_ONLINE_HEADER),
e = c.FindControlByID(b.INVITE_OFFLINE_HEADER),
f = c.FindControlByID(b.INVITE_SCROLL_WINDOW),
g = c.FindControlByID(b.SEND_INVITES_BUTTON),
h = c.FindControlByID(b.CANCEL_INVITES_BUTTON),
i = c.FindControlByID(b.INVITE_TITLE);
simcity.gGlobalUIHandler && (gUIManager.FindControlByID(b.IN_GAME_CONTAINER).SetVisibility(!0),
c.FindControlByID(b.WHITE_TRIANGLE).SetVisibility(!1));
c.SetVisibility(!0);
g.scrollWindow = f;
g.inviteCallback = a.inviteCallback;
h.container = a;
a.regionData ? i.SetLocaleText(simcity.cGameInvitesController.LocaleString.kInviteTitle, {
boxName : a.regionData.name
}) : i.SetRawText("");
a = simcity.gGameInvitesController.mOnShowInvitePanel;
"function" === typeof a && a();
f.DestroyChildren();
this.DrawAllAvatarGrids(f, d, e, 3)
};
simcity.cGameInvitesController.prototype.HideInvitePanel = function (a) {
var b = simcity.gGameInvitesController.mPageIDs,
c = a;
a.container && (c = a.container);
c.FindControlByID(b.INVITE_FRIENDS_PANEL).SetVisibility(!1);
c.FindControlByID(b.REGION_INVITE_BUTTON).SetSelected(!1);
simcity.gGlobalUIHandler && gUIManager.FindControlByID(b.IN_GAME_CONTAINER).SetVisibility(!0)
};
simcity.cGameInvitesController.prototype.ToggleInvitePanel = function (a) {
a = a.mParentControl;
a.FindControlByID(simcity.gGameInvitesController.mPageIDs.INVITE_FRIENDS_PANEL).GetAbsoluteVisibility() ? simcity.gGameInvitesController.HideInvitePanel(a) : simcity.gGameInvitesController.ShowInvitePanel(a)
};
simcity.cGameInvitesController.prototype.InviteUsersToCity = function (a, b, c, d, e) {
b && (a = a + "/" + b);
b = {
url : scrui.GetRestPath() + "/region/" + a + "/invites.json",
params : [["invitees", c]],
onSuccess : function (a) {
a.json.errorCode ? e(c) : "function" === typeof d && d(c)
},
onError : function () {
"function" === typeof e && e(c)
},
method : "post"
};
scrui.XHR.Request(b)
};
simcity.cGameInvitesController.prototype.InviteUsers = function (a) {
var b = simcity.gUIToolbox.GetSelectedIdsFromControl(a.scrollWindow, simcity.gGameInvitesController.mPageIDs.AVATAR_TOGGLE, "userID");
b && b.length && (b = b.join());
!b || b && 0 == b.length ? simcity.gGameInvitesController.mDialogManager.ShowLocalizedModal(simcity.cGameInvitesController.LocaleString.kOops, simcity.cGameInvitesController.LocaleString.kPleaseSelectFriends) : a.inviteCallback(b)
};
simcity.cGameInvitesController.prototype.RunInviteSentAnimation = function (a) {
var b = simcity.gGameInvitesController.mPageIDs;
a && (a = a.FindAnimationByID(b.INVITE_MSG_ANIMATION)) && a.Restart(scrui.cAnimation.kPlayForward)
};
simcity.cGameInvitesController.prototype.DrawAllAvatarGrids = function (a, b, c, d) {
var e = simcity.gFriendController.GetOnlineFriends(),
f = simcity.gFriendController.GetOfflineFriends(),
g = 20;
e.length ? (b.SetPosition(20, g), b.SetVisibility(!0), g = this.DrawAvatarGrid(g + 20, a, e, d)) : b.SetVisibility(!1);
f.length ? (c.SetPosition(20, g), c.SetVisibility(!0), this.DrawAvatarGrid(g + 20, a, f, d)) : c.SetVisibility(!1)
};
simcity.cGameInvitesController.prototype.DrawAvatarGrid = function (a, b, c, d) {
var e = this.mPageIDs,
f = 0;
if (c && c.length) {
for (var g = 0, h = c.length; g < h; g++) {
var i = c[g],
j = gUIManager.LoadLayout(simcity.cGameInvitesController.kPageLayout.USER_TOGGLE_AVATAR, b);
simcity.gUIToolbox.PrettyDateUtcMs(i.lastLogin);
simcity.gUIToolbox.SetAvatar(j.FindControlByID(e.AVATAR_IMAGE), i.screenName);
j.FindControlByID(e.AVATAR_NAME).SetRawText(i.screenName);
j.userID = i.id;
j.SetPosition(f, a);
j.FindControlByID(e.AVATAR_PRESENCE_FRAME).SetWindowImage(simcity.gUIToolbox.GetAvatarFrame(i));
g + 1 >= h || 0 == (g + 1) % d ? (f = 0, a += j.mHeight) : f += j.mWidth
}
a += 40
}
return a
};
simcity.gGameInvitesController = new simcity.cGameInvitesController;
simcity.databindings.RegionalDefaultCityInfo = {};
simcity.kRegionalDefaultCityInfo = {
CapeTrinity : {
Enabled : 1,
regionName : "AutomatedRegionTemplates.json!0x8e4a59b0",
regionDescription : "AutomatedRegionTemplates.json!0xc27f9a62",
regionLoadingImage : "CapeTrinity_LoadingBackDrop.png",
labels : {},
cities : {
1026 : {
cityName : "AutomatedRegionTemplates.json!0x6779b9d2",
cityDescription : "AutomatedRegionTemplates.json!0x2b42d990",
percentageBuildable : "90",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "0",
rawOre : "0",
crudeOil : "0",
tornadoes : "0",
earthquakes : "0",
rail : "true",
shipping : "true",
resources : []
},
1027 : {
cityName : "AutomatedRegionTemplates.json!0xfc0c91cf",
cityDescription : "AutomatedRegionTemplates.json!0x3dc78265",
percentageBuildable : "90",
residentialDesirability : "2",
wind : "1",
water : "2",
coal : "0",
rawOre : "0",
crudeOil : "0",
tornadoes : "0",
earthquakes : "0",
rail : "true",
shipping : "true",
resources : []
},
1028 : {
cityName : "AutomatedRegionTemplates.json!0xcf049f2d",
cityDescription : "AutomatedRegionTemplates.json!0x4a7763ef",
percentageBuildable : "80",
residentialDesirability : "2",
wind : "1",
water : "2",
coal : "2",
rawOre : "2",
crudeOil : "2",
tornadoes : "0",
earthquakes : "0",
rail : "true",
shipping : "false",
resources : []
}
}
},
CliffsideVista : {
Enabled : 1,
regionName : "AutomatedRegionTemplates.json!0x2a6b0baa",
regionDescription : "AutomatedRegionTemplates.json!0xac014408",
regionLoadingImage : "CliffsideVista_LoadingBackDrop.png",
labels : {
RiverLabel : {
xCoord : "100",
yCoord : "100",
labelText : "AutomatedRegionTemplates.json!0xf5b3bd7f",
labelAngle : "1"
}
},
cities : {
1026 : {
cityName : "AutomatedRegionTemplates.json!0x7a74a6c6",
cityDescription : "AutomatedRegionTemplates.json!0xf5d3e34c",
percentageBuildable : "100",
residentialDesirability : "2",
wind : "3",
water : "2",
coal : "2",
rawOre : "2",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "false",
shipping : "false",
resources : ["AutomatedResources.json!0xbf75dc04"]
},
1027 : {
cityName : "AutomatedRegionTemplates.json!0x94966db2",
cityDescription : "AutomatedRegionTemplates.json!0x585f8e70",
percentageBuildable : "70",
residentialDesirability : "3",
wind : "1",
water : "3",
coal : "0",
rawOre : "0",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "false",
shipping : "true",
resources : ["AutomatedResources.json!0xcec5890c"]
}
}
},
Confluence : {
Enabled : 1,
regionName : "AutomatedRegionTemplates.json!0x77cb42ea",
regionDescription : "AutomatedRegionTemplates.json!0xfbdbe448",
regionLoadingImage : "Confluence_LoadingBackDrop.png",
labels : {},
cities : {
1026 : {
cityName : "AutomatedRegionTemplates.json!0xa79638c7",
cityDescription : "AutomatedRegionTemplates.json!0x0b85715d",
percentageBuildable : "95",
residentialDesirability : "1",
wind : "1",
water : "2",
coal : "2",
rawOre : "3",
crudeOil : "1",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1027 : {
cityName : "AutomatedRegionTemplates.json!0xae3b915a",
cityDescription : "AutomatedRegionTemplates.json!0x51ae9418",
percentageBuildable : "90",
residentialDesirability : "1",
wind : "1",
water : "2",
coal : "3",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1028 : {
cityName : "AutomatedRegionTemplates.json!0x42647828",
cityDescription : "AutomatedRegionTemplates.json!0x96f2fb1a",
percentageBuildable : "90",
residentialDesirability : "1",
wind : "0",
water : "3",
coal : "0",
rawOre : "0",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1029 : {
cityName : "AutomatedRegionTemplates.json!0x4d7b89b2",
cityDescription : "AutomatedRegionTemplates.json!0x1144aa70",
percentageBuildable : "95",
residentialDesirability : "1",
wind : "0",
water : "2",
coal : "3",
rawOre : "1",
crudeOil : "3",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1030 : {
cityName : "AutomatedRegionTemplates.json!0xf3c76956",
cityDescription : "AutomatedRegionTemplates.json!0x8fc315bc",
percentageBuildable : "80",
residentialDesirability : "1",
wind : "0",
water : "3",
coal : "2",
rawOre : "3",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
}
}
},
Gallia : {
Enabled : 1,
regionName : "AutomatedRegionTemplates.json!0xfd4011aa",
regionDescription : "AutomatedRegionTemplates.json!0x7ed64a08",
regionLoadingImage : "Gallia_LoadingBackDrop.png",
labels : {},
cities : {
1026 : {
cityName : "AutomatedRegionTemplates.json!0x566cabfe",
cityDescription : "AutomatedRegionTemplates.json!0x122237e4",
percentageBuildable : "80",
residentialDesirability : "2",
wind : "1",
water : "3",
coal : "0",
rawOre : "1",
crudeOil : "3",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1027 : {
cityName : "AutomatedRegionTemplates.json!0xa7789ab4",
cityDescription : "AutomatedRegionTemplates.json!0x0148cbce",
percentageBuildable : "100",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "0",
rawOre : "0",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1028 : {
cityName : "AutomatedRegionTemplates.json!0x01e9fe3f",
cityDescription : "AutomatedRegionTemplates.json!0x26be8975",
percentageBuildable : "100",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "3",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1029 : {
cityName : "AutomatedRegionTemplates.json!0x604fb050",
cityDescription : "AutomatedRegionTemplates.json!0x920c1a02",
percentageBuildable : "90",
residentialDesirability : "2",
wind : "1",
water : "3",
coal : "2",
rawOre : "3",
crudeOil : "1",
tornadoes : "1",
earthquakes : "1",
rail : "false",
shipping : "true",
resources : []
},
1030 : {
cityName : "AutomatedRegionTemplates.json!0xa0f67fb3",
cityDescription : "AutomatedRegionTemplates.json!0xfd989731",
percentageBuildable : "40",
residentialDesirability : "3",
wind : "1",
water : "3",
coal : "3",
rawOre : "1",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1031 : {
cityName : "AutomatedRegionTemplates.json!0xa52c8370",
cityDescription : "AutomatedRegionTemplates.json!0xd6e8ed22",
percentageBuildable : "70",
residentialDesirability : "3",
wind : "1",
water : "2",
coal : "3",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1032 : {
cityName : "AutomatedRegionTemplates.json!0xcba6f916",
cityDescription : "AutomatedRegionTemplates.json!0x67a4397c",
percentageBuildable : "80",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "2",
rawOre : "2",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "false",
shipping : "true",
resources : []
},
1033 : {
cityName : "AutomatedRegionTemplates.json!0xeb7e47b4",
cityDescription : "AutomatedRegionTemplates.json!0x454e78ce",
percentageBuildable : "80",
residentialDesirability : "2",
wind : "1",
water : "3",
coal : "3",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1034 : {
cityName : "AutomatedRegionTemplates.json!0x690f65de",
cityDescription : "AutomatedRegionTemplates.json!0x24c4f1c4",
percentageBuildable : "70",
residentialDesirability : "2",
wind : "1",
water : "3",
coal : "3",
rawOre : "0",
crudeOil : "3",
tornadoes : "1",
earthquakes : "1",
rail : "false",
shipping : "true",
resources : []
},
1035 : {
cityName : "AutomatedRegionTemplates.json!0x65001054",
cityDescription : "AutomatedRegionTemplates.json!0xbed0416e",
percentageBuildable : "60",
residentialDesirability : "2",
wind : "1",
water : "2",
coal : "1",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1036 : {
cityName : "AutomatedRegionTemplates.json!0xf200ca20",
cityDescription : "AutomatedRegionTemplates.json!0x43bbd3b2",
percentageBuildable : "90",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "2",
rawOre : "1",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1037 : {
cityName : "AutomatedRegionTemplates.json!0xc89ba5c2",
cityDescription : "AutomatedRegionTemplates.json!0x6c6626e0",
percentageBuildable : "90",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "0",
rawOre : "0",
crudeOil : "3",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1038 : {
cityName : "AutomatedRegionTemplates.json!0x7a74ab21",
cityDescription : "AutomatedRegionTemplates.json!0x4e2a5c9b",
percentageBuildable : "100",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "2",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "false",
shipping : "true",
resources : []
},
1039 : {
cityName : "AutomatedRegionTemplates.json!0xf518c03b",
cityDescription : "AutomatedRegionTemplates.json!0x5161c759",
percentageBuildable : "100",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "3",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "false",
shipping : "true",
resources : []
},
1040 : {
cityName : "AutomatedRegionTemplates.json!0x0d077dcb",
cityDescription : "AutomatedRegionTemplates.json!0x46d77c49",
percentageBuildable : "85",
residentialDesirability : "2",
wind : "1",
water : "2",
coal : "2",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1041 : {
cityName : "AutomatedRegionTemplates.json!0x8b3ac14e",
cityDescription : "AutomatedRegionTemplates.json!0x696ae814",
percentageBuildable : "80",
residentialDesirability : "2",
wind : "1",
water : "3",
coal : "3",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
}
}
},
Horizon : {
Enabled : 1,
regionName : "AutomatedRegionTemplates.json!0x951c174f",
regionDescription : "AutomatedRegionTemplates.json!0xd6d707e5",
regionLoadingImage : "Horizon_LoadingBackDrop.png",
labels : {},
cities : {
1026 : {
cityName : "AutomatedRegionTemplates.json!0xf3f7420c",
cityDescription : "AutomatedRegionTemplates.json!0x50995986",
percentageBuildable : "100",
residentialDesirability : "2",
wind : "2",
water : "2",
coal : "3",
rawOre : "1",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1027 : {
cityName : "AutomatedRegionTemplates.json!0x2f9dac8a",
cityDescription : "AutomatedRegionTemplates.json!0xb3ae4ee8",
percentageBuildable : "90",
residentialDesirability : "3",
wind : "3",
water : "3",
coal : "2",
rawOre : "2",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1028 : {
cityName : "AutomatedRegionTemplates.json!0xbd72897a",
cityDescription : "AutomatedRegionTemplates.json!0x60e3f938",
percentageBuildable : "70",
residentialDesirability : "1",
wind : "2",
water : "2",
coal : "2",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1029 : {
cityName : "AutomatedRegionTemplates.json!0x53f41f99",
cityDescription : "AutomatedRegionTemplates.json!0xc7f120d3",
percentageBuildable : "80",
residentialDesirability : "1",
wind : "2",
water : "2",
coal : "3",
rawOre : "1",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1030 : {
cityName : "AutomatedRegionTemplates.json!0x8a28cd01",
cityDescription : "AutomatedRegionTemplates.json!0x6058e87b",
percentageBuildable : "95",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "0",
rawOre : "3",
crudeOil : "3",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1031 : {
cityName : "AutomatedRegionTemplates.json!0x2b0c60be",
cityDescription : "AutomatedRegionTemplates.json!0xe93de8a4",
percentageBuildable : "85",
residentialDesirability : "2",
wind : "3",
water : "3",
coal : "1",
rawOre : "2",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1032 : {
cityName : "AutomatedRegionTemplates.json!0xde257d60",
cityDescription : "AutomatedRegionTemplates.json!0x325c82f2",
percentageBuildable : "95",
residentialDesirability : "2",
wind : "2",
water : "2",
coal : "3",
rawOre : "0",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1033 : {
cityName : "AutomatedRegionTemplates.json!0x5ce34ea7",
cityDescription : "AutomatedRegionTemplates.json!0xc0d2873d",
percentageBuildable : "80",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "1",
rawOre : "2",
crudeOil : "1",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1034 : {
cityName : "AutomatedRegionTemplates.json!0x68564e1a",
cityDescription : "AutomatedRegionTemplates.json!0x0bc7bed8",
percentageBuildable : "80",
residentialDesirability : "1",
wind : "1",
water : "2",
coal : "3",
rawOre : "0",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1035 : {
cityName : "AutomatedRegionTemplates.json!0xe962e8b3",
cityDescription : "AutomatedRegionTemplates.json!0x46050031",
percentageBuildable : "75",
residentialDesirability : "3",
wind : "3",
water : "2",
coal : "3",
rawOre : "0",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1036 : {
cityName : "AutomatedRegionTemplates.json!0x936e88de",
cityDescription : "AutomatedRegionTemplates.json!0x4f2414c4",
percentageBuildable : "95",
residentialDesirability : "1",
wind : "2",
water : "3",
coal : "2",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
}
}
},
LittleGorge : {
Enabled : 1,
regionName : "AutomatedRegionTemplates.json!0xd29a65a2",
regionDescription : "AutomatedRegionTemplates.json!0x78ddbcc0",
regionLoadingImage : "LittleGorge_LoadingBackDrop.png",
labels : {},
cities : {
1026 : {
cityName : "AutomatedRegionTemplates.json!0xc92a4a92",
cityDescription : "AutomatedRegionTemplates.json!0x8f6f6750",
percentageBuildable : "80",
residentialDesirability : "2",
wind : "1",
water : "3",
coal : "2",
rawOre : "1",
crudeOil : "1",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1027 : {
cityName : "AutomatedRegionTemplates.json!0x45d04896",
cityDescription : "AutomatedRegionTemplates.json!0xe1cd88fc",
percentageBuildable : "100",
residentialDesirability : "1",
wind : "1",
water : "2",
coal : "1",
rawOre : "0",
crudeOil : "3",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1028 : {
cityName : "AutomatedRegionTemplates.json!0xa82d086f",
cityDescription : "AutomatedRegionTemplates.json!0xe9e98b05",
percentageBuildable : "100",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "0",
rawOre : "0",
crudeOil : "3",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1029 : {
cityName : "AutomatedRegionTemplates.json!0x1df4a59c",
cityDescription : "AutomatedRegionTemplates.json!0x99f78c76",
percentageBuildable : "90",
residentialDesirability : "2",
wind : "1",
water : "3",
coal : "2",
rawOre : "1",
crudeOil : "1",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1030 : {
cityName : "AutomatedRegionTemplates.json!0x5cd9c204",
cityDescription : "AutomatedRegionTemplates.json!0x992429be",
percentageBuildable : "40",
residentialDesirability : "3",
wind : "1",
water : "1",
coal : "3",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "false",
shipping : "false",
resources : []
},
1031 : {
cityName : "AutomatedRegionTemplates.json!0x0961088a",
cityDescription : "AutomatedRegionTemplates.json!0x8d71aae8",
percentageBuildable : "70",
residentialDesirability : "3",
wind : "1",
water : "3",
coal : "2",
rawOre : "0",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "false",
shipping : "true",
resources : []
},
1032 : {
cityName : "AutomatedRegionTemplates.json!0x98d006d4",
cityDescription : "AutomatedRegionTemplates.json!0xf2a037ee",
percentageBuildable : "80",
residentialDesirability : "1",
wind : "2",
water : "3",
coal : "1",
rawOre : "1",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1033 : {
cityName : "AutomatedRegionTemplates.json!0x63629951",
cityDescription : "AutomatedRegionTemplates.json!0x171818eb",
percentageBuildable : "80",
residentialDesirability : "2",
wind : "2",
water : "1",
coal : "1",
rawOre : "3",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1034 : {
cityName : "AutomatedRegionTemplates.json!0x236feb3c",
cityDescription : "AutomatedRegionTemplates.json!0x9f72d116",
percentageBuildable : "70",
residentialDesirability : "2",
wind : "2",
water : "1",
coal : "3",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1035 : {
cityName : "AutomatedRegionTemplates.json!0xbac2a92f",
cityDescription : "AutomatedRegionTemplates.json!0xfef802c5",
percentageBuildable : "60",
residentialDesirability : "2",
wind : "2",
water : "1",
coal : "3",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1036 : {
cityName : "AutomatedRegionTemplates.json!0x06619faf",
cityDescription : "AutomatedRegionTemplates.json!0x4a96f945",
percentageBuildable : "90",
residentialDesirability : "1",
wind : "2",
water : "1",
coal : "3",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1037 : {
cityName : "AutomatedRegionTemplates.json!0xade0848b",
cityDescription : "AutomatedRegionTemplates.json!0xea2aec09",
percentageBuildable : "90",
residentialDesirability : "1",
wind : "2",
water : "1",
coal : "3",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1038 : {
cityName : "AutomatedRegionTemplates.json!0x39b44a32",
cityDescription : "AutomatedRegionTemplates.json!0xfd7d6af0",
percentageBuildable : "100",
residentialDesirability : "1",
wind : "2",
water : "1",
coal : "2",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1039 : {
cityName : "AutomatedRegionTemplates.json!0x5123b7f3",
cityDescription : "AutomatedRegionTemplates.json!0xadc5cf71",
percentageBuildable : "100",
residentialDesirability : "1",
wind : "2",
water : "1",
coal : "3",
rawOre : "0",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1040 : {
cityName : "AutomatedRegionTemplates.json!0xe7bd53be",
cityDescription : "AutomatedRegionTemplates.json!0xa5eedba4",
percentageBuildable : "85",
residentialDesirability : "2",
wind : "2",
water : "1",
coal : "3",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1041 : {
cityName : "AutomatedRegionTemplates.json!0x0010b202",
cityDescription : "AutomatedRegionTemplates.json!0xa6540920",
percentageBuildable : "80",
residentialDesirability : "2",
wind : "2",
water : "1",
coal : "2",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
}
}
},
Reflection : {
Enabled : 1,
regionName : "AutomatedRegionTemplates.json!0xc1822f57",
regionDescription : "AutomatedRegionTemplates.json!0x460f6a8d",
regionLoadingImage : "Reflection_LoadingBackDrop.png",
labels : {},
cities : {
1026 : {
cityName : "AutomatedRegionTemplates.json!0x9bd8d2a1",
cityDescription : "AutomatedRegionTemplates.json!0x6f8e841b",
percentageBuildable : "95",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "1",
rawOre : "1",
crudeOil : "1",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1027 : {
cityName : "AutomatedRegionTemplates.json!0x22f85786",
cityDescription : "AutomatedRegionTemplates.json!0x9e56010c",
percentageBuildable : "90",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "0",
rawOre : "0",
crudeOil : "3",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1028 : {
cityName : "AutomatedRegionTemplates.json!0xf0199aef",
cityDescription : "AutomatedRegionTemplates.json!0x31d61d85",
percentageBuildable : "90",
residentialDesirability : "1",
wind : "1",
water : "2",
coal : "3",
rawOre : "0",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1029 : {
cityName : "AutomatedRegionTemplates.json!0x3a4b861a",
cityDescription : "AutomatedRegionTemplates.json!0xddbcf6d8",
percentageBuildable : "95",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "0",
rawOre : "0",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1030 : {
cityName : "AutomatedRegionTemplates.json!0x4d794628",
cityDescription : "AutomatedRegionTemplates.json!0xa207c91a",
percentageBuildable : "80",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "0",
rawOre : "0",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1031 : {
cityName : "AutomatedRegionTemplates.json!0x62ce40e8",
cityDescription : "AutomatedRegionTemplates.json!0xb75b30da",
percentageBuildable : "80",
residentialDesirability : "1",
wind : "2",
water : "3",
coal : "0",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1032 : {
cityName : "AutomatedRegionTemplates.json!0x2bb5bba8",
cityDescription : "AutomatedRegionTemplates.json!0x80443e9a",
percentageBuildable : "80",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "0",
rawOre : "0",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
}
}
},
Sawyer : {
Enabled : 1,
regionName : "AutomatedRegionTemplates.json!0x6e132f95",
regionDescription : "AutomatedRegionTemplates.json!0x29dc43f7",
regionLoadingImage : "Sawyer_LoadingBackDrop.png",
labels : {},
cities : {
1026 : {
cityName : "AutomatedRegionTemplates.json!0x50446fac",
cityDescription : "AutomatedRegionTemplates.json!0xace68726",
percentageBuildable : "75",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "1",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1027 : {
cityName : "AutomatedRegionTemplates.json!0x12d985f1",
cityDescription : "AutomatedRegionTemplates.json!0xc690978b",
percentageBuildable : "80",
residentialDesirability : "2",
wind : "1",
water : "3",
coal : "3",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1028 : {
cityName : "AutomatedRegionTemplates.json!0x262ca829",
cityDescription : "AutomatedRegionTemplates.json!0xb98c0ac3",
percentageBuildable : "100",
residentialDesirability : "1",
wind : "1",
water : "1",
coal : "3",
rawOre : "0",
crudeOil : "1",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1029 : {
cityName : "AutomatedRegionTemplates.json!0xe0ff08c0",
cityDescription : "AutomatedRegionTemplates.json!0x35347b52",
percentageBuildable : "80",
residentialDesirability : "2",
wind : "1",
water : "3",
coal : "3",
rawOre : "1",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1030 : {
cityName : "AutomatedRegionTemplates.json!0x2309eecd",
cityDescription : "AutomatedRegionTemplates.json!0x9e7cb28f",
percentageBuildable : "90",
residentialDesirability : "2",
wind : "1",
water : "3",
coal : "3",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1031 : {
cityName : "AutomatedRegionTemplates.json!0x9d428e3c",
cityDescription : "AutomatedRegionTemplates.json!0x19457416",
percentageBuildable : "50",
residentialDesirability : "3",
wind : "1",
water : "3",
coal : "0",
rawOre : "0",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1032 : {
cityName : "AutomatedRegionTemplates.json!0xb79ea2d3",
cityDescription : "AutomatedRegionTemplates.json!0x1440ba51",
percentageBuildable : "80",
residentialDesirability : "1",
wind : "2",
water : "3",
coal : "1",
rawOre : "0",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1033 : {
cityName : "AutomatedRegionTemplates.json!0x04223fe4",
cityDescription : "AutomatedRegionTemplates.json!0x3df23d9e",
percentageBuildable : "90",
residentialDesirability : "1",
wind : "2",
water : "3",
coal : "2",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1034 : {
cityName : "AutomatedRegionTemplates.json!0x48503939",
cityDescription : "AutomatedRegionTemplates.json!0xb9d2d173",
percentageBuildable : "90",
residentialDesirability : "1",
wind : "1",
water : "3",
coal : "2",
rawOre : "0",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "false",
resources : []
},
1035 : {
cityName : "AutomatedRegionTemplates.json!0x3c1a15d1",
cityDescription : "AutomatedRegionTemplates.json!0xefcf956b",
percentageBuildable : "85",
residentialDesirability : "1",
wind : "2",
water : "3",
coal : "2",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1036 : {
cityName : "AutomatedRegionTemplates.json!0x53c12390",
cityDescription : "AutomatedRegionTemplates.json!0x87f7f742",
percentageBuildable : "75",
residentialDesirability : "2",
wind : "2",
water : "3",
coal : "3",
rawOre : "0",
crudeOil : "1",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1037 : {
cityName : "AutomatedRegionTemplates.json!0x0ab3ddec",
cityDescription : "AutomatedRegionTemplates.json!0x67546266",
percentageBuildable : "80",
residentialDesirability : "2",
wind : "2",
water : "3",
coal : "2",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1038 : {
cityName : "AutomatedRegionTemplates.json!0x4c116989",
cityDescription : "AutomatedRegionTemplates.json!0xdf6f3923",
percentageBuildable : "90",
residentialDesirability : "2",
wind : "2",
water : "3",
coal : "1",
rawOre : "0",
crudeOil : "3",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1039 : {
cityName : "AutomatedRegionTemplates.json!0x4aff559d",
cityDescription : "AutomatedRegionTemplates.json!0xe7101d3f",
percentageBuildable : "85",
residentialDesirability : "1",
wind : "2",
water : "3",
coal : "1",
rawOre : "0",
crudeOil : "3",
tornadoes : "1",
earthquakes : "1",
rail : "false",
shipping : "true",
resources : []
},
1040 : {
cityName : "AutomatedRegionTemplates.json!0x22d1c569",
cityDescription : "AutomatedRegionTemplates.json!0xb62f9403",
percentageBuildable : "85",
residentialDesirability : "1",
wind : "2",
water : "3",
coal : "2",
rawOre : "2",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
},
1041 : {
cityName : "AutomatedRegionTemplates.json!0xe03a67cb",
cityDescription : "AutomatedRegionTemplates.json!0x1a0a6649",
percentageBuildable : "90",
residentialDesirability : "3",
wind : "2",
water : "3",
coal : "3",
rawOre : "3",
crudeOil : "0",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
}
}
},
Tutorial : {
Enabled : 1,
regionName : "AutomatedRegionTemplates.json!0xbd21955e",
regionDescription : "AutomatedRegionTemplates.json!0x78d72144",
regionLoadingImage : "Tutorial_LoadingBackDrop.png",
labels : {
RiverLabel : {
xCoord : "100",
yCoord : "100",
labelText : "AutomatedRegionTemplates.json!0xf5b3bd7f",
labelAngle : "1"
}
},
cities : {
1026 : {
cityName : "AutomatedRegionTemplates.json!0x3ec84615",
cityDescription : "AutomatedRegionTemplates.json!0xfa915a77",
percentageBuildable : "85",
residentialDesirability : "3",
wind : "3",
water : "3",
coal : "0",
rawOre : "2",
crudeOil : "1",
tornadoes : "1",
earthquakes : "1",
rail : "false",
shipping : "true",
resources : []
},
1027 : {
cityName : "AutomatedRegionTemplates.json!0x144f287b",
cityDescription : "AutomatedRegionTemplates.json!0x6e1f5899",
percentageBuildable : "70",
residentialDesirability : "2",
wind : "2",
water : "2",
coal : "0",
rawOre : "1",
crudeOil : "2",
tornadoes : "1",
earthquakes : "1",
rail : "true",
shipping : "true",
resources : []
}
}
},
TwinCities : {
Enabled : 1,
regionName : "AutomatedRegionTemplates.json!0x617c4d77",
regionDescription : "AutomatedRegionTemplates.json!0xe60988ad",
regionLoadingImage : "TwinCities_LoadingBackDrop.png",
labels : {},
cities : {
1026 : {
cityName : "AutomatedRegionTemplates.json!0xe3503852",
cityDescription : "AutomatedRegionTemplates.json!0xa7195810",
percentageBuildable : "80",
residentialDesirability : "1",
wind : "1",
water : "2",
coal : "1",
rawOre : "2",
crudeOil : "2",
tornadoes : "0",
earthquakes : "0",
rail : "false",
shipping : "true",
resources : []
},
1027 : {
cityName : "AutomatedRegionTemplates.json!0x82e6590f",
cityDescription : "AutomatedRegionTemplates.json!0xc71d45a5",
percentageBuildable : "80",
residentialDesirability : "2",
wind : "1",
water : "2",
coal : "1",
rawOre : "2",
crudeOil : "1",
tornadoes : "0",
earthquakes : "0",
rail : "false",
shipping : "true",
resources : []
}
}
}
};
simcity.GameDataRequestIDs = {};
simcity.kDataBins = "bins";
simcity.kDataBinAmount = "binAmount";
simcity.kDataResourceAmount = "resourceAmount";
simcity.kDataProperties = "properties";
simcity.kDataNonSimProperties = "nonSimProperties";
simcity.kDataSimProperties = "simProperties";
simcity.kDataUnitEntryIDSimProperties = "unitEntryIDSimProperties";
simcity.kDataLayers = "layers";
simcity.kDataMaps = "maps";
simcity.kDataSum = "sum";
simcity.kDataConnectedExtractorSum = "connectedExtractorSum";
simcity.kDataCategoryUnits = "categoryUnits";
simcity.kDataPeriodTimes = "periodTimes";
simcity.kDataSpeechBalloonTarget = "speechBalloonTarget";
simcity.kDataCamera = "camera";
simcity.kDataTools = "tools";
simcity.kDataEditor = "editor";
simcity.kDataURLProperty = "urlProperty";
simcity.kExitSurveyURLProperty = "urlProperty";
simcity.kDataDemo = "demo";
simcity.kDataAppProperties = "appProperties";
simcity.kDataActiveBoxId = "activeBoxId";
simcity.kDataActiveCityUID = "ActiveCityUID";
simcity.kDataRegionID = "RegionID";
simcity.kDataLastActiveCityUID = "LastActiveCityUID";
simcity.kDataCommandLine = "commandLine";
simcity.kDataMissions = "missions";
simcity.kDataUnits = "units";
simcity.kDataRegionUnits = "regionUnits";
simcity.kDataSpectator = "spectator";
simcity.kDataConnectedUnits = "connectedUnits";
simcity.kDataCachedUnits = "cachedUnits";
simcity.kDataAgent = "agent";
simcity.kDataActor = "actor";
simcity.kDataUnitUnderMouse = "unitUnderMouse";
simcity.kDataSelectedUnit = "selectedUnit";
simcity.kDataUIToolCategory = "uiToolCategory";
simcity.kDataSelectedTool = "selectedTool";
simcity.kDataResourceKeys = "resourceKeys";
simcity.kDataDoesUnitExist = "doesUnitExist";
simcity.kDataPathCongestion = "pathCongestion";
simcity.kDataGetToyOfType = "getToyOfType";
simcity.kDataCanEditUnit = "canEditUnit";
simcity.kDataCount = "count";
simcity.kDataLayerLegendKey = "layerLegendKey";
simcity.kDataName = "name";
simcity.kToolPaletteCategory = "toolPaletteCategory";
simcity.kDataToolCountUsed = "toolCountUsed";
simcity.kDataToolInfo = "toolInfo";
simcity.kDataToolID = "toolID";
simcity.kDataCursorKey = "cursorKey";
simcity.kDataToolRolloverAnchor = "toolRolloverAnchor";
simcity.kDataEnabled = "enabled";
simcity.kDataPropKey = "propKey";
simcity.kDataFlags = "flags";
simcity.kDataScreenPositionTop = "screenPositionTop";
simcity.kDataCheckFrustum = "checkFrustum";
simcity.kDataScreenPositionSpeechBalloon = "screenPositionSpeechBalloon";
simcity.kDataUnitName = "unitName";
simcity.kDataAudioID = "audioID";
simcity.kDataNonSimPropID = "nonSimPropID";
simcity.kDataUnitRef = "unitRef";
simcity.kDataRolloverAlertInfo = "rolloverAlertInfo";
simcity.kDataConnectedToHighDensityRoad = "connectedToHighDensityRoad";
simcity.kDataConnectedToMediumDensityRoad = "connectedToMediumDensityRoad";
simcity.kDataRolloverBar = "rolloverBar";
simcity.kDataRolloverArrow = "rolloverArrow";
simcity.kDataUIResourceKey = "uiResourceKey";
simcity.kDataUnitOfMeasure = "unitOfMeasure";
simcity.kDataConversionRate = "conversionRate";
simcity.kDataVisualizedDataRequestedUIKeys = "visualizedDataRequestedUIKeys";
simcity.kDataScreenPosition = "screenPosition";
simcity.kDataSimFirstName = "simFirstName";
simcity.kDataSimLastName = "simLastName";
simcity.kDataTransportName = "transportName";
simcity.kDataGender = "gender";
simcity.kDataDestination = "destination";
simcity.kDataSourceName = "sourceName";
simcity.kDataFailToFindSink = "failedToFindSink";
simcity.kDataSourceUnitRegionalBoxUniqueID = "regionalBoxUniqueID";
simcity.kDataShowGoToSource = "showGoToSource";
simcity.kCommandSetSpeechBalloonTarget = "SetSpeechBalloonTarget";
simcity.kDataDeselectUnit = "deselectUnit";
simcity.kDataSelectTool = "selectTool";
simcity.kDataDeselectTool = "deselecttool";
simcity.kDataQuit = "quit";
simcity.kDataQuitApp = "quitapp";
simcity.kDataRequestQuitApp = "requestquitapp";
simcity.kDataToolMessage = "toolMessage";
simcity.kDataExitBuildingEditor = "exitBuildingEditor";
simcity.kDataRunSelectedPlayerRule = "runSelectedUnitPlayerRule";
simcity.kCommandToggleLayer = "toggleLayer";
simcity.kCommandRoadDrawType = "RoadDrawType";
simcity.kCommandSetAppProperty = "SetAppProperty";
simcity.kCommandExitBuildingEditor = "exitBuildingEditor";
simcity.kCommandActivateVignette = "ActivateVignette";
simcity.kCommandDeactivateVignette = "DeactivateVignette";
simcity.kCommandZoomToSpeechBalloon = "zoomToSpeechBalloon";
simcity.kCommandEditBuilding = "editBuilding";
simcity.kCommandCreateUnit = "createUnit";
simcity.kCommandMoveCameraMinusOrientation = "moveCameraMinusOrientation";
simcity.kCommandActivateFollowAgentCam = "ActivateFollowAgentCam";
simcity.kCommandZoomToAgentSource = "ZoomToAgentSource";
simcity.kCommandMoveCameraNoTransition = "MoveCameraNoTransition";
simcity.kRequestNetworkConnectionState = "requestOnlineState";
simcity.globalui = {};
simcity.kWinRootWindowID = 174136993;
simcity.kWinSharedUIParent = 249564985;
simcity.kWinCityUIParent = 172239098;
simcity.kWinRegionUIParent = 203181610;
simcity.kBtnIDQuit = 158422761;
simcity.kBtnIDQuitApp = 246114684;
simcity.kBtnGameManual = 246379005;
simcity.kBtnHelpCenter = 246384586;
simcity.kBtnExposeDebugUI = 219260675;
simcity.kWinDebugToolCategories = 219237770;
simcity.kTxtFldBoxName = 169563268;
simcity.kBtnIDMaps = 158422738;
simcity.kBtnIDCategoryButton = 161711552;
simcity.kTxtIDMoney = 249592169;
simcity.kTxtIDMoneyDelta = 198586409;
simcity.kAnimIDMoney = 197135168;
simcity.kTxtIDIncome = 159532345;
simcity.kTxtIDPopulation = 158773667;
simcity.kTxtIDPopulationDelta = 198586767;
simcity.kTxtBoxName = 216742461;
simcity.kTxtIDDate = 200163084;
simcity.kTxtIDTime = 162918750;
simcity.kWinIDPaletteRoot = 231519198;
simcity.kWinIDPaletteHolder = 161444528;
simcity.kWinIDPalettePanelHolder = 183824299;
simcity.kWinIDMainMenu = 185362957;
simcity.kBtnIDMainMenuToggle = 185363042;
simcity.kBtnIDMainMenuResume = 225389358;
simcity.kBtnIDOpenSettings = 212665064;
simcity.kBtnIDOpenFeedback = 164452089;
simcity.kBtnIDOpenReportBug = 244638429;
simcity.kWinSurveyContainer = 243007821;
simcity.kWinIDMapsPanel = 158422526;
simcity.kWinPopulationContainer = 183039555;
simcity.kWinPopulationAlert = 240659521;
simcity.kWinPopulationCaution = 240659522;
simcity.kWinBudgetContainer = 183039554;
simcity.kWinBudgetAlert = 240659523;
simcity.kWinBudgetCaution = 240659524;
simcity.kBtnIDBudget = 246360712;
simcity.kBtnIDPopulation = 246360711;
simcity.kWinSpeedContainer = 182358354;
simcity.kWinLayerPaletteContainer = 158422526;
simcity.kWinToolRolloverContainer = 201366720;
simcity.kWinMissionParent = 227093279;
simcity.kWinMissionContainer = 202318592;
simcity.kWinTickerParent = 232746452;
simcity.kWinRegionWallParent = 241958979;
simcity.kWinTimeDisplayParent = 242998440;
simcity.kWinSpeechBallonContainer = 204978684;
simcity.kWinCursorAttachmentContainer = 216135210;
simcity.kWinMouseEaterID = 206646030;
simcity.kWinNewspaperContainer = 229101724;
simcity.kRegionMapContainer = 215777055;
simcity.kWinBuildingRolloverContainer = 232027444;
simcity.kWinBoundaryUIContainer = 239706708;
simcity.kModalDialogLayout = 246637496;
simcity.kErrorModalDialogLayout = 246637511;
simcity.kTextModulesUsed = 241052434;
simcity.kWinModulesFree = 240936656;
simcity.kTextModulesFree = 240936658;
simcity.kWinLetterboxRoot = 232569618;
simcity.kAgentQueryContainer = 236703637;
simcity.kCityNameContainer = 240271318;
simcity.kCityNameButton = 240317911;
simcity.kBtnIDCitySpecialization = 249753437;
simcity.kCitySpecializationContainer = 240490279;
simcity.kCitySpecializationLayout = 240500846;
simcity.kCitySpecializationButton = 240502028;
simcity.kCitySpecializationIconNorm = 240504423;
simcity.kCitySpecializationIconHL = 240504422;
simcity.kBtnIDRotateCCW = 213111754;
simcity.kBtnIDRotateCW = 213111738;
simcity.kBtnIDZoomIn = 245598587;
simcity.kBtnIDZoomOut = 245598584;
simcity.kWinRecordingFrame = 252090864;
simcity.kAnimRecordingFrameIntro = 252697226;
simcity.kAnimRecordingFrameExit = 252697228;
simcity.kFriendListContainer = 247683615;
simcity.kBtnFriendList = 247684111;
simcity.kBtnDemandBars = 252673405;
simcity.kNamingArrow = 244027633;
simcity.kNameMoment = 236779191;
simcity.kBtnNameMomentOkay = 236779190;
simcity.kBTNClosePopulation = 240419370;
simcity.kBTNCloseBudget = 240419368;
simcity.kBTNCloseSpecilization = 249136555;
simcity.kRegionWallButton = 207146365;
simcity.kRegionWallAnimation = 247606289;
simcity.kRegionWallSelector = 247597219;
simcity.kBtnRegionCamera = 218561671;
simcity.kRegionUnlockEffect = 243338962;
simcity.kIcnRegionCamera = 242744961;
simcity.kIcnReturnHome = 242744973;
simcity.kToolRegionView = 3189606171;
simcity.kRegionNameButton = 246035777;
simcity.kChallengePanelBtn = 251978275;
simcity.kAchievementPanelBtn = 251978485;
simcity.mRegionWall = {
root : 207067491,
regionWallLayout : 207067491,
formContainer : 207067335,
messagesContainer : 207067631,
closeWindowButton : 207085666
};
simcity.mRegionWallNotifications = {
root : 238255816,
formContainer : 238259810,
messagesContainer : 238257496,
rollOffDetector : 243964989
};
simcity.kBtnIDBulldoze = 244738929;
simcity.kBtnIDToolConfirmed = 234366442;
simcity.kBtnIDToolDenied = 234366463;
simcity.kTextIDToolRequestBody = 228252804;
simcity.kTextIDToolRequestHeader = 245253398;
simcity.kConfirmationDialogIDBulldoze = 234364140;
simcity.kConfirmationDialogIDCantBulldoze = 234364141;
simcity.kTextIDGarbageDump = 4183402092;
simcity.gHistoryData = {};
simcity.kHashGiftIncome = 3914181182;
simcity.kHashGiftExpense = 2231918585;
simcity.kHashLoanIncome = 745060234;
simcity.kHashLoanExpense = 3160622333;
simcity.kHashServiceIncomeFire = 3019235535;
simcity.kHashServiceExpenseFire = 2041225562;
simcity.kHashServiceIncomePolice = 2239186733;
simcity.kHashServiceExpensePolice = 2141287992;
simcity.kHashServiceIncomeGarbage = 1781577056;
simcity.kHashServiceExpenseGarbage = 2383611955;
simcity.kHashServiceIncomeRecycling = 2641622423;
simcity.kHashServiceExpenseRecycling = 3257305088;
simcity.kHashServiceIncomeHealth = 4030353577;
simcity.kHashServiceExpenseHealth = 661513216;
simcity.kHashMarketIncomeCoal = 3712973973;
simcity.kHashMarketExpenseCoal = 3495565962;
simcity.kHashMarketIncomeOilCrude = 2656391789;
simcity.kHashMarketExpenseOilCrude = 483101070;
simcity.kHashMarketIncomeOreRaw = 1614191498;
simcity.kHashMarketExpenseOreRaw = 2539775925;
simcity.kHashMarketIncomeMetal = 3084046345;
simcity.kHashMarketExpenseMetal = 995732584;
simcity.kHashMarketIncomeAlloy = 551171597;
simcity.kHashMarketExpenseAlloy = 1076705332;
simcity.kHashMarketIncomeFuel = 623675788;
simcity.kHashMarketExpenseFuel = 560334699;
simcity.kHashMarketIncomePlastic = 4272449096;
simcity.kHashMarketExpensePlastic = 3465595429;
simcity.kHashMarketIncomeElectronics = 578111185;
simcity.kHashMarketExpenseElectronics = 3662966552;
simcity.kHashMarketIncomeComputer = 1957168923;
simcity.kHashMarketExpenseComputer = 911915180;
simcity.kHashMarketIncomeTelevision = 3772357704;
simcity.kHashMarketExpenseTelevision = 413189567;
simcity.kHashMissionIncome = 1475482796;
simcity.kHashEventIncome = 3321549554;
simcity.kHashEventExpense = 1063940693;
simcity.kHashGreatWorkIncome = 597896678;
simcity.kHashGreatWorkExpense = 463545073;
simcity.kHashResearchExpense = 4253600434;
simcity.kHashCrimeExpense = 4165801275;
simcity.kHashCheatIncome = 900665919;
simcity.kHashVuIncome = 230616923;
simcity.kHashMaxisManExpense = 1827870685;
simcity.kBudgetTypeIncome = 0;
simcity.kBudgetTypeExpense = 1;
simcity.gHistoryData[simcity.kHashGiftIncome] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ebc9e4d"
};
simcity.gHistoryData[simcity.kHashGiftExpense] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ebc9e4d"
};
simcity.gHistoryData[simcity.kHashLoanIncome] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ebc9e4c"
};
simcity.gHistoryData[simcity.kHashLoanExpense] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ebc9e4c"
};
simcity.gHistoryData[simcity.kHashServiceIncomeFire] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ee966a6"
};
simcity.gHistoryData[simcity.kHashServiceExpenseFire] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ee966a6"
};
simcity.gHistoryData[simcity.kHashServiceIncomePolice] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ee966a7"
};
simcity.gHistoryData[simcity.kHashServiceExpensePolice] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ee966a7"
};
simcity.gHistoryData[simcity.kHashServiceIncomeGarbage] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ee966a8"
};
simcity.gHistoryData[simcity.kHashServiceExpenseGarbage] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ee966a8"
};
simcity.gHistoryData[simcity.kHashServiceIncomeRecycling] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ee966a9"
};
simcity.gHistoryData[simcity.kHashServiceExpenseRecycling] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ee966a9"
};
simcity.gHistoryData[simcity.kHashServiceIncomeHealth] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ee966aa"
};
simcity.gHistoryData[simcity.kHashServiceExpenseHealth] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ee966aa"
};
simcity.gHistoryData[simcity.kHashMarketIncomeCoal] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ed071d6"
};
simcity.gHistoryData[simcity.kHashMarketExpenseCoal] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ed071d6"
};
simcity.gHistoryData[simcity.kHashMarketIncomeOilCrude] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ed071d7"
};
simcity.gHistoryData[simcity.kHashMarketExpenseOilCrude] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ed071d7"
};
simcity.gHistoryData[simcity.kHashMarketIncomeOreRaw] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ed071d8"
};
simcity.gHistoryData[simcity.kHashMarketExpenseOreRaw] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ed071d8"
};
simcity.gHistoryData[simcity.kHashMarketIncomeMetal] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ed071d9"
};
simcity.gHistoryData[simcity.kHashMarketExpenseMetal] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ed071d9"
};
simcity.gHistoryData[simcity.kHashMarketIncomeAlloy] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ed071da"
};
simcity.gHistoryData[simcity.kHashMarketExpenseAlloy] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ed071da"
};
simcity.gHistoryData[simcity.kHashMarketIncomeFuel] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ed071db"
};
simcity.gHistoryData[simcity.kHashMarketExpenseFuel] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ed071db"
};
simcity.gHistoryData[simcity.kHashMarketIncomePlastic] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ed071dc"
};
simcity.gHistoryData[simcity.kHashMarketExpensePlastic] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ed071dc"
};
simcity.gHistoryData[simcity.kHashMarketIncomeElectronics] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ed071dd"
};
simcity.gHistoryData[simcity.kHashMarketExpenseElectronics] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ed071dd"
};
simcity.gHistoryData[simcity.kHashMarketIncomeComputer] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ed071de"
};
simcity.gHistoryData[simcity.kHashMarketExpenseComputer] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ed071de"
};
simcity.gHistoryData[simcity.kHashMarketIncomeTelevision] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ed071df"
};
simcity.gHistoryData[simcity.kHashMarketExpenseTelevision] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ed071df"
};
simcity.gHistoryData[simcity.kHashMissionIncome] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0f308b6d"
};
simcity.gHistoryData[simcity.kHashEventIncome] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ec1a303"
};
simcity.gHistoryData[simcity.kHashEventExpense] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ec1a303"
};
simcity.gHistoryData[simcity.kHashGreatWorkIncome] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ec1a4b7"
};
simcity.gHistoryData[simcity.kHashGreatWorkExpense] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ec1a4b7"
};
simcity.gHistoryData[simcity.kHashResearchExpense] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ebc9e4e"
};
simcity.gHistoryData[simcity.kHashCrimeExpense] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ec1b1fe"
};
simcity.gHistoryData[simcity.kHashMaxisManExpense] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeExpense,
label : "0x0ec1b345"
};
simcity.gHistoryData[simcity.kHashVuIncome] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ec1a252"
};
simcity.gHistoryData[simcity.kHashCheatIncome] = {
limit : 20,
data : [],
type : simcity.kBudgetTypeIncome,
label : "0x0ebdb6f5"
};
simcity.kPeriodDay = 0;
simcity.kPeriodWeek = 1;
simcity.kPeriodYear = 2;
simcity.kColorIncomeRed = "#E90707";
simcity.kColorIncomeGreen = "#4fa047";
simcity.kColorIncomeWhite = "#265e94";
simcity.kColorIncomeYellow = "#cd8b00";
simcity.kLocalePlusMoney = new scrui.cLocaleString("GlobalUI.json", "0x0bd6309a");
simcity.kLocaleMinusMoney = new scrui.cLocaleString("GlobalUI.json", "0x0bd63098");
simcity.kLocalePlusPopulation = new scrui.cLocaleString("GlobalUI.json", "0x0bd63099");
simcity.kLocaleMinusPopulation = new scrui.cLocaleString("GlobalUI.json", "0x0bd63097");
simcity.kLocalePlusBudget = new scrui.cLocaleString("GlobalUI.json", "0x0bd63096");
simcity.kLocaleMinusBudget = new scrui.cLocaleString("GlobalUI.json", "0x0bd6309b");
simcity.kLocaleExitSpectatorMode = new scrui.cLocaleString("GlobalUI.json", "0x0ecca237");
simcity.kDefaultToolID = 782826392;
simcity.kRegionToolID = 3189606171;
simcity.kBulldozerToolID = 2536567712;
simcity.kCheatGreatWorksProgress = 230929509;
simcity.kCheatGreatWorksUnlockAll = 231005222;
simcity.kCheatUnlockArcology = 235560148;
simcity.kCheatToggleGreatWorksOperational = 239901155;
simcity.kKeyTrigger_ToggleRegionWall = 2368844905;
simcity.kKeyTrigger_Help = 250974895;
simcity.kKeyTrigger_PopulationPanel = 251031119;
simcity.kKeyTrigger_BudgetPanel = 251030721;
simcity.kKeyTrigger_MayorPanel = 251030734;
simcity.kKeyTrigger_RegionView = 251304918;
simcity.kKeyTrigger_Achievements = 251310872;
simcity.kKeyTrigger_Leaderboards = 251310860;
simcity.kKeyTrigger_Challenges = 251310844;
simcity.kKeyTrigger_Debug_WireArticlePrevious = 252155634;
simcity.kKeyTrigger_Debug_WireArticleNext = 252155648;
simcity.CheatUnitAbandoned = scrui.IDFromName("T_RCI_ToggleAbandoned");
simcity.CheatUnitAirPollution = scrui.IDFromName("T_RCI_ToggleAirPollution");
simcity.CheatUnitCrime = scrui.IDFromName("T_RCI_ToggleCrime");
simcity.CheatUnitFire = scrui.IDFromName("T_RCI_ToggleFire");
simcity.CheatUnitGarbage = scrui.IDFromName("T_RCI_ToggleGarbage");
simcity.CheatUnitGroundPollution = scrui.IDFromName("T_RCI_ToggleGroundPollution");
simcity.CheatUnitHealth = scrui.IDFromName("T_RCI_ToggleHealth");
simcity.CheatUnitHomeless = scrui.IDFromName("T_RCI_ToggleHomeless");
simcity.CheatUnitSewage = scrui.IDFromName("T_RCI_ToggleSewage");
simcity.CheatUnitSimoleans = scrui.IDFromName("T_RCI_SandboxAddSimoleons");
simcity.AllLayerClose = 252706424;
simcity.kLayerKeyPopulationF5 = 251310899;
simcity.kLayerKeyHappinessF6 = 251310908;
simcity.kLayerKeyDesireF7 = 251310951;
simcity.kLayerKeyImportExprtF8 = 251310959;
simcity.kLayerKeyDensityF9 = 251310971;
simcity.kLayerKeyResidentialF10 = 253720323;
simcity.kLayerKeyCommercialF11 = 253720324;
simcity.kLayerKeyIndustrialF12 = 253720325;
simcity.kLayerKeyWater4 = 253720401;
simcity.kLayerKeyCoal5 = 253720402;
simcity.kLayerKeyOre6 = 253720403;
simcity.kLayerKeyOil7 = 253720404;
simcity.kKeyTabPalettes = 253796517;
simcity.kKeyShiftTabPalettes = 253796518;
simcity.gGlobalUIHandler = null;
simcity.kEventIDTownHallBuilt = 1549837312;
simcity.gTimeInfo = {
month : 0,
hour : -1
};
simcity.IsDisasterInProgress = function () {
return 0 < simcity.gGlobalUIHandler.mDisasterActive
};
simcity.GetFudgedPopulation = function (a) {
a = "undefined" !== typeof a ? a : simcity.gGlobalUIHandler.mLastPopulation;
if (500 >= a)
return a;
if (40845 < a)
return Math.floor(8.25 * a);
a = Math.pow(a - 500, 1.2) + 500;
return Math.floor(a)
};
simcity.GetRoundedFudgedPopulation = function (a) {
a = simcity.GetFudgedPopulation(a);
return a = 25E3 < a ? 10 * Math.round(a / 10) : 5 * Math.round(a / 5)
};
simcity.cGlobalUIHandler = function () {
this.UIHandler = scrui.cUIHandler;
this.UIHandler();
this.mBudgetUIContainer = this.mBoxNameTextControl = this.mLastBudgetDelta = this.mIncomeText = this.mLastPopulation = this.mPopulationDeltaText = this.mBottomToolbarControl = this.mPopulationText = this.mWinTimeDisplay = this.mWinDateDisplay = this.mLastMoney = this.mMoneyAnim = this.mMoneyDeltaText = this.mMoneyText = this.mGlobalUILayout = this.mTicker = this.mRegionUIParent = this.mCityUIParent = null;
this.mDisasterActive = this.mLastNumberOfFires =
0;
this.mIsEditorActive = !1;
this.mBudgetCrisisUI = this.mBudgetPanel = this.mMayorRating = this.mPopulationUI = this.mTutorialCallout = this.mBulldozeButton = this.mCityNameUIHandler = this.mAgentQueryUIHandler = this.mAchievementsUIHandler = this.mAvatarManagerHandler = this.mBoundaryUIHandler = this.mToyTaskPanelUIHandler = this.mNewspaperUIHandler = this.mTaxesBasicUIHandler = this.mAlertsUIHandler = this.mCursorAttachmentHandler = this.mSpeechBalloonHandler = this.mToolPaletteUIHandler = this.mLayerUIHandler = this.mSpeedUIHandler =
this.mEventTriggersManager = this.mGameTimeManager = null;
this.mVisibilityCounter = 1;
this.mScreenName = "";
this.mUserSessionId = this.mUserId = 0;
this.mActiveBoxID = "";
this.mMyBoxDataSet = !1;
this.mRegionUnlockEffect = this.mRegionCameraButton = this.mRegionWallButton = this.mRegionMap = this.mChallengeUIHandler = this.mLeaderboardUIHandler = this.mReportContentUIHandler = this.mRegionWallUI = null;
this.mBorderUnitsList = [];
this.mTimeSinceLastUpdate = simcity.cGlobalUIHandler.kGlobalUpdateTime;
this.mMonthlyUpdate = -1;
this.mBuildingRolloverManager =
null;
this.mDemoWarning = this.mIsTimed = this.mIsDemo = this.mTutorialDemo = !1;
this.mCommandLine = "";
this.mIsMainTutorialEnabled = this.mIsTutorialEnabled = !1;
this.mIsEditorEnabled = !0;
this.mIsNameYourCityActive = !1;
this.mRegionMessageRouter = this.mConfirmationDialog = this.mScreenshotCaptureLayout = this.mLetterboxRoot = this.mErrorLayout = this.mAchievementManager = null;
this.mIsServerSandbox = this.mIsSpectatorMode = !1;
this.mCitySpecializationButton = this.mReturnToCityButton = this.mReturnHomeButtonIcon = this.mRegionViewButtonIcon =
null;
this.mGameLoaded = !1;
this.mDemoTimerEndingDelayTimeMS = 18E3;
this.mDemoTimerSCWireDelayTimeMS = 8E3;
this.mDemoTimer = 0;
this.mDemoTimerEndingDelay = this.mDemoTimerSCWireDelay = !1;
this.mRegionViewCommand = scrui.BuildCommand(["selectTool", simcity.kToolRegionView]);
this.mDialogManager = null;
this.mQuitConfirmationShown = !1;
this.mErrorAlertsUIHandler = this.mErrorDialogManager = null;
this.mLocaleStrings = {
kQuitSimcityText : new scrui.cLocaleString("OptionsMenu.json", "0xf446ea05"),
kQuitSimcityConfirmMsg : new scrui.cLocaleString("GameEntry.json",
"0x9b675f8e"),
kQuitText : new scrui.cLocaleString("GameEntry.json", "0xea4b2998"),
kExitToMenuText : new scrui.cLocaleString("OptionsMenu.json", "0x0ea2130f"),
kExitToMenuConfirmationMsg : new scrui.cLocaleString("OptionsMenu.json", "0xf9903b56"),
kExitText : new scrui.cLocaleString("OptionsMenu.json", "0x0ea2130f"),
kCancelText : new scrui.cLocaleString("GameEntry.json", "0x0e3b8b19")
};
this.mBeatCountUpdates = [];
this.mControlsToDestroy = [];
this.mPopulationUIContainer = null;
this.mPopulationTimelineData = {
population : [],
visitors : []
};
this.mRecentTransactionData = {
amount : [],
type : [],
date : [],
label : []
};
this.mLayerButtons = [];
this.mHeavyLayerList = [];
this.mRotateLeft = this.mRotateRight = !1
};
goog.inherits(simcity.cGlobalUIHandler, scrui.cUIHandler);
simcity.cGlobalUIHandler.kGlobalQueries = [scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDSimoleons]), scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDNumberOfFires]), scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDDisasterActive])];
simcity.cGlobalUIHandler.kGlobalUpdateTime = 1E3;
simcity.cGlobalUIHandler.prototype.Update = scrui.Client_ProfZone("cGlobalUIHandler.Update", function (a) {
this.mTimeSinceLastUpdate += a;
for (var b = 0, c = this.mControlsToDestroy.length; b < c; ++b)
this.mControlsToDestroy[b].DestroyControl();
this.mControlsToDestroy.length = 0;
simcity.IsPlayingBoxBroken() && (scrui.PostGameCommand(scrui.BuildCommand(["setspeed", simcity.kSpeedPaused])), b = simcity.gGlobalUIHandler.mRegionID, c = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayingBox.id, b && c && simcity.gSessionManager.SetBoxTarget(b,
c), this.mErrorDialogManager.ShowErrorModal({
dialogType : scrui.kErrorDialogType_ForceQuitToMenu,
message : new scrui.cLocaleString("ErrorMessages.json", "0x0f0696c4")
}));
if (!this.mBoxNameTextControl.nameSet && (b = this.mAPIServerDataUIHandler.GetBoxByBoxUID(this.mRegionID) || null))
this.mBoxNameTextControl.SetText(b.name), this.mBoxNameTextControl.nameSet = !0;
0 <= this.mDemoTimer && (this.mDemoTimer -= a);
0 > this.mDemoTimer && (this.mDemoTimerSCWireDelay ? (this.mDemoTimerSCWireDelay = !1, this.mDemoTimerEndingDelay = !0, this.mDemoTimer =
this.mDemoTimerEndingDelayTimeMS, simcity.EndDemoSCWireEnd()) : this.mDemoTimerEndingDelay && (this.mDemoTimerEndingDelay = !1, simcity.EndDemoEnd()));
if (this.mTimeSinceLastUpdate > simcity.cGlobalUIHandler.kGlobalUpdateTime) {
this.mTimeSinceLastUpdate = 0;
this.UpdateDataBindings(a);
a = simcity.gTimeInfo.month;
-1 === this.mMonthlyUpdate && -1 !== a && (this.mMonthlyUpdate = a);
-1 !== a && this.mMonthlyUpdate !== a && (this.mMonthlyUpdate = a, simcity.UpdatePopulationTimelineData());
this.mRegionCameraButton && !simcity.IsMainTutorialInProgress() &&
this.mRegionCameraButton.SetVisibility(simcity.gGlobalUIHandler.mRegionViewUIHandler.IsDataLoaded());
var d = this;
scrui.RequestGameData(simcity.cGlobalUIHandler.kGlobalQueries, function (a) {
if (d.mMoneyText !== null) {
var b = a[0];
if (b !== d.mLastMoney) {
d.mMoneyText.UpdateLocaleText({
money : b
});
b >= 1E3 ? d.mMoneyText.SetTextColor(simcity.kColorIncomeWhite) : b < 1E3 && b > 0 ? d.mMoneyText.SetTextColor(simcity.kColorIncomeYellow) : b === 0 && d.mMoneyText.SetTextColor(simcity.kColorIncomeRed)
}
d.mLastMoney = b
}
if (d.mPopulationText !==
null) {
b = simcity.kGlobalUIPopulationInfo.populationData.residential.data.total.value;
if (b !== d.mLastPopulation) {
d.mLastPopulation = b;
d.mPopulationText.UpdateLocaleText({
population : simcity.GetFudgedPopulation()
})
}
}
d.UpdateDisasterMusic(a[1])
})
}
});
simcity.cGlobalUIHandler.prototype.InitDataBindingInfo = function () {
for (var a = 0, b = simcity.kGlobalUIDataBindings.length; a < b; ++a) {
var c = simcity.kGlobalUIDataBindings[a];
c.rootControl = gUIManager.FindControlByID(c.rootControlID);
c.hasOwnProperty("init") && c.init()
}
};
simcity.cGlobalUIHandler.prototype.UpdateDataBindings = scrui.Client_ProfZone("cGlobalUIHandler.UpdateDataBindings", function () {
var a = [],
b = [];
simcity.GenerateDataBindingQueries(simcity.kGlobalUIDataBindings, a, null, b, !1, "queries");
simcity.RequestDataBindingData(a, simcity.kGlobalUIDataBindings, b, !1, function (a) {
for (var b = 0, e = simcity.kGlobalUIDataBindings.length; b < e; ++b)
simcity.kGlobalUIDataBindings[b].action(a[b])
})
});
simcity.SetVisibilityHelper = function (a) {
(a = a.win) && a.SetVisibility(!0)
};
simcity.SetBeatCountVisibility = function (a) {
simcity.gGlobalUIHandler.mBeatCountUpdates.push({
callback : simcity.SetVisibilityHelper,
win : a
})
};
simcity.cGlobalUIHandler.prototype.UpdateOnBeat = function () {
this.UpdateDate();
for (var a = 0, b = this.mBeatCountUpdates.length; a < b; ++a) {
var c = this.mBeatCountUpdates[a];
c.callback(c)
}
this.mBeatCountUpdates = []
};
simcity.cGlobalUIHandler.prototype.RemoveFromBeatUpdate = function (a) {
for (var b = 0; b < this.mBeatCountUpdates.length; )
a.ContainsControl(this.mBeatCountUpdates[b].win) ? this.mBeatCountUpdates.splice(b, 1) : ++b
};
simcity.cGlobalUIHandler.kDateTimeQueries = [scrui.BuildRequestQuery([simcity.kDataPeriodTimes, simcity.kPeriodDay]), scrui.BuildRequestQuery([simcity.kDataPeriodTimes, simcity.kPeriodYear]), scrui.BuildRequestQuery([simcity.kDataResourceAmount, simcity.kResourceIDYear])];
simcity.cGlobalUIHandler.prototype.UpdateDate = function () {
if (null !== this.mWinDateDisplay && null !== this.mWinTimeDisplay) {
var a = this;
scrui.RequestGameData(simcity.cGlobalUIHandler.kDateTimeQueries, function (b) {
var c = b[0],
d = b[2],
b = Math.min(Math.floor(12 * b[1]), 11),
e = Math.min(Math.floor(24 * c), 23),
c = Math.min(60 * (24 * c - e), 59),
f = new Date(d + 2E3, b, 1, e, c, 0, 0);
simcity.gTimeInfo.month = b;
simcity.gTimeInfo.hour = e;
simcity.gTimeInfo.year = d;
simcity.gTimeInfo.minute = c;
d = {
sim_dateTime : f,
year : d + 1
};
a.mWinTimeDisplay.SetVisibility(!0);
a.mWinDateDisplay.UpdateLocaleText(d);
a.mWinTimeDisplay.UpdateLocaleText(d)
})
}
};
simcity.cGlobalUIHandler.prototype.UpdateDisasterMusic = function (a) {
0 == this.mLastNumberOfFires && 0 < a ? simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kInstancePlayDisasterMusic) : 0 < this.mLastNumberOfFires && 0 == a && simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kInstanceStopDisasterMusic);
this.mLastNumberOfFires = a
};
simcity.kToolPaletteCategoryOrder = [2886912260, 831766718, 2391494160, 2654748154, 3441286197, 1732323837, 2092055118, 2678880713, 3677180323, 291106007, 2510935805, 3418519638, 2308696688, 2608627999, 3639785352];
simcity.cGlobalUIHandler.prototype.HandleGameEvent = function (a, b) {
switch (a) {
case simcity.kGameMessageGameLoaded:
this.mGameLoaded = !0;
this.InitErrorManager();
break;
case simcity.kGameMessageDemoTimerEnd:
simcity.EndDemoBegin();
break;
case simcity.kGameMessageDemoTimerWarning:
this.mDemoWarning = !0;
simcity.DemoWarning();
break;
case simcity.kGameMessageBeatCountChanged:
this.UpdateOnBeat();
break;
case simcity.kGameMessageCinematicDisasterStart:
simcity.gGlobalUIHandler.mDisasterActive++;
break;
case simcity.kGameMessageCinematicDisasterEnd:
simcity.gGlobalUIHandler.mDisasterActive--;
break;
case simcity.kGameMessageHistoryUIEvent:
if (simcity.gHistoryData.hasOwnProperty(b.historyIndex)) {
var c = new Date(simcity.gTimeInfo.year + 2E3, simcity.gTimeInfo.month + 1, -1, simcity.gTimeInfo.hour, simcity.gTimeInfo.minute, 0, 0);
simcity.gHistoryData[b.historyIndex].data.length > simcity.gHistoryData[b.historyIndex].limit && simcity.gHistoryData[b.historyIndex].data.pop();
simcity.gHistoryData[b.historyIndex].data.unshift({
amount : b.historyAmount,
date : c
});
simcity.SaveRecentTransactionHistory()
}
break;
case simcity.kGameMessageUnitRuleUIEvent:
switch (b.eventID) {
case simcity.kEventIDWireTradeServiceTokensFireServiceTokenCanGrant:
case simcity.kEventIDWireTradeServiceTokensGarbageServiceTokenCanGrant:
case simcity.kEventIDWireTradeServiceTokensHealthServiceTokenCanGrant:
case simcity.kEventIDWireTradeServiceTokensPoliceServiceTokenCanGrant:
case simcity.kEventIDWireTradeServiceTokensRecyclingServiceTokenCanGrant:
this.mRegionCameraButton.mEnabled &&
!simcity.IsMainTutorialInProgress() && (this.mRegionViewUIHandler.SparklePaletteButton(b.eventID), simcity.SetBeatCountVisibility(this.mRegionUnlockEffect))
}
if (!simcity.IsMainTutorialInProgress() && simcity.kEventIDTownHallBuilt == b.eventID) {
if (c = gUIManager.FindControlByID(simcity.kNameMoment)) {
this.mIsNameYourCityActive = !0;
var d = gUIManager.LoadLayout("Layouts/CityNameMoment.js", c);
d.SetVisibility(!0)
}
break
}
if (!simcity.IsMainTutorialInProgress())
switch (b.eventID) {
case simcity.kEventIDUnlock:
case simcity.kEventIDSilentUnlock:
var e =
b.extraData,
c = scrui.BuildRequestQuery([simcity.kDataTools, e, simcity.kDataName]),
f = scrui.BuildRequestQuery([simcity.kDataTools, e, simcity.kDataProperties, simcity.kPropToolIconKey]),
g = scrui.BuildRequestQuery([simcity.kDataTools, e, simcity.kToolPaletteCategory]);
scrui.RequestGameData([c, f, g], function (a) {
var c = a[0];
scrui.Assert(c, "Tool " + scrui.DecimalToHex(e) + " has no name defined.");
if (c) {
var d = a[2];
simcity.gGlobalUIHandler.mToolPaletteUIHandler.HandleUnlock(e, d.toolPaletteCategories, d.toolPaletteParentCategories);
if (b.eventID === simcity.kEventIDUnlock) {
var f = a[1],
g = scrui.LocaleStringFromLocaleProperty(c);
g.LoadString(function () {
g.popOut = f;
simcity.gGlobalUIHandler.mTicker.HandleUnlock(g)
})
}
}
})
}
break;
case simcity.kMessageEditorActivated:
this.mLayerUIHandler.DeactivateLayer();
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataDeselectUnit]));
this.mToolPaletteUIHandler.OpenEditorPanel(b.categoryID, b.subCategoryID, b.editorCategoryID, b.unitRef);
simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kInstanceUIBuildingEditorActivate);
this.mIsEditorActive = !0;
break;
case simcity.kMessageEditorDeactivated:
null !== this.mToolPaletteUIHandler.mEditedBuildingRef && this.mToolPaletteUIHandler.CloseEditorPanel();
simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kInstanceUIBuildingEditorDeactivate);
this.mIsEditorActive = !1;
break;
case simcity.kGameMessageTickerSettingsChanged:
this.mTicker && (this.mTicker.mSettingsChanged = !0);
break;
case simcity.kGameMessageHideGlobalUI:
this.SetVisibility(!1);
break;
case simcity.kGameMessageShowGlobalUI:
this.SetVisibility(!0);
break;
case simcity.kGameMessageShowLetterbox:
this.mLetterboxRoot.SetVisibility(!0);
break;
case simcity.kGameMessageHideLetterbox:
this.mLetterboxRoot.SetVisibility(!1);
break;
case simcity.kGameMessageToolConfirmation:
this.ShowConfirmationDialog(b);
break;
case simcity.kGameMessageToolConfirmationHide:
this.HideConfirmationDialog();
break;
case simcity.kGameMessageWebSocketReceiveUIEvent:
simcity.gEventManager.TriggerEvent(simcity.gEventTypes.SOCKETEVENT, b.socketMessage.guid || 0, b.socketMessage.data || {});
break;
case simcity.kGameMessageWebSocketConnected:
simcity.gEventManager.TriggerEvent(simcity.gEventTypes.SOCKETCONNECT, null, null);
break;
case simcity.kGameMessageWebSocketDisconnected:
simcity.gEventManager.TriggerEvent(simcity.gEventTypes.SOCKETDISCONNECT, null, null);
break;
case simcity.kMessageKeyTrigger:
c = 0 === this.mActiveBoxID || this.mGameLoaded;
if (simcity.IsTutorialInProgress() || simcity.IsOptionMenuVisible() || simcity.IsMouseEatingWindowVisible() || !c)
break;
if (!1 == this.mRegionCameraButton.mIsSelected)
switch (b.triggerCode) {
case simcity.kLayerKeyPopulationF5:
this.mLayerUIHandler.ToggleLayer(simcity.Government.kHeavyLayerPopulation);
break;
case simcity.kLayerKeyHappinessF6:
this.mLayerUIHandler.ToggleLayer(simcity.Cultural.kHappiness);
break;
case simcity.kLayerKeyDesireF7:
this.mLayerUIHandler.ToggleLayer(simcity.Cultural.kHeavyLayerResidentialDesirability);
break;
case simcity.kLayerKeyImportExprtF8:
this.mLayerUIHandler.ToggleLayer(simcity.ImEx.kHeavyLayerImEx);
break;
case simcity.kLayerKeyDensityF9:
this.mLayerUIHandler.ToggleLayer(simcity.Government.kHeavyLayerDensity);
break;
case simcity.kLayerKeyResidentialF10:
this.mLayerUIHandler.ToggleLayer(simcity.Zones.kHeavyLayerResidentialSystem);
break;
case simcity.kLayerKeyCommercialF11:
this.mLayerUIHandler.ToggleLayer(simcity.Zones.kHeavyLayerCommercialSystem);
break;
case simcity.kLayerKeyIndustrialF12:
this.mLayerUIHandler.ToggleLayer(simcity.Zones.kHeavyLayerIndustrialSystem);
break;
case simcity.kLayerKeyWater4:
this.mLayerUIHandler.ToggleLayer(simcity.Fire.kHeavyLayerWaterTable);
break;
case simcity.kLayerKeyCoal5:
this.mLayerUIHandler.ToggleLayer(simcity.Mining.kHeavyLayerCoal);
break;
case simcity.kLayerKeyOre6:
this.mLayerUIHandler.ToggleLayer(simcity.Mining.kHeavyLayerOre);
break;
case simcity.kLayerKeyOil7:
this.mLayerUIHandler.ToggleLayer(simcity.Oil.kHeavyLayerOil);
break;
case simcity.kKeyTrigger_NextHeavyLayer:
this.mToolPaletteUIHandler.mPanelLayout && this.mToolPaletteUIHandler.mPanelLayout.mIsVisible ? this.mToolPaletteUIHandler.CycleHeavyLayer() : (c = this.mLayerUIHandler.GetCurrentActiveLayer(), null == c ? this.mLayerUIHandler.ActivateLayer(this.mHeavyLayerList[0]) : (c = this.mHeavyLayerList.indexOf(c), -1 == c || c == this.mHeavyLayerList.length - 1 ? this.mLayerUIHandler.ActivateLayer(this.mHeavyLayerList[0]) :
this.mLayerUIHandler.ActivateLayer(this.mHeavyLayerList[c + 1])))
}
switch (b.triggerCode) {
case simcity.kKeyTabPalettes:
if (!this.mIsEditorActive && this.mReturnToCityButton.mIsSelected) {
for (c = 0; c < simcity.kToolPaletteCategoryOrder.length && simcity.kToolPaletteCategoryOrder[c] !== this.mToolPaletteUIHandler.mLastSelectedMainCategoryID; c++);
c >= simcity.kToolPaletteCategoryOrder.length - 1 ? this.mToolPaletteUIHandler.OpenToolPanelFromID(simcity.kToolPaletteCategoryOrder[0]) : this.mToolPaletteUIHandler.OpenToolPanelFromID(simcity.kToolPaletteCategoryOrder[c +
1])
}
break;
case simcity.kKeyShiftTabPalettes:
if (!this.mIsEditorActive && this.mReturnToCityButton.mIsSelected) {
for (c = 0; c < simcity.kToolPaletteCategoryOrder.length && simcity.kToolPaletteCategoryOrder[c] !== this.mToolPaletteUIHandler.mLastSelectedMainCategoryID; c++);
0 === c ? this.mToolPaletteUIHandler.OpenToolPanelFromID(simcity.kToolPaletteCategoryOrder[simcity.kToolPaletteCategoryOrder.length - 1]) : c >= simcity.kToolPaletteCategoryOrder.length - 1 ? this.mToolPaletteUIHandler.OpenToolPanelFromID(simcity.kToolPaletteCategoryOrder[simcity.kToolPaletteCategoryOrder.length -
2]) : this.mToolPaletteUIHandler.OpenToolPanelFromID(simcity.kToolPaletteCategoryOrder[c - 1])
}
break;
case simcity.kCheatGreatWorksProgress:
simcity.DEBUG && simcity.CreateUnit("GreatWorks_CheatConstructionProgress");
break;
case simcity.kCheatGreatWorksUnlockAll:
simcity.DEBUG && simcity.CreateUnit("GreatWorks_CheatUnlockAll");
break;
case simcity.kCheatUnlockArcology:
simcity.DEBUG && simcity.CreateUnit("GreatWorks_CheatUnlockArcology");
break;
case simcity.kCheatToggleGreatWorksOperational:
simcity.DEBUG && simcity.CreateUnit("GreatWorks_CheatToggleGreatWorksOperational");
break;
case simcity.kKeyTrigger_ToggleRegionWall:
simcity.gGlobalUIHandler && (c = simcity.gGlobalUIHandler.mRegionWallUI, c.mRegionWallContainer && (f = c.mRegionWallContainer.FindControlByID(c.kControlIDs.FORM_TEXT_AREA).GetText(), simcity.gGlobalUIHandler.mRegionWallButton.mIsSelected && "" === f ? (c.ShowRegionWall(!1), simcity.gGlobalUIHandler.mRegionWallButton.SetSelected(!1), c.RevealRegionWallTextEntry(!1)) : (c.ShowRegionWall(!0), simcity.gGlobalUIHandler.mRegionWallButton.SetSelected(!0), c.RevealRegionWallTextEntry(!0))));
break;
case simcity.kKeyTrigger_PopulationPanel:
c = gUIManager.FindControlByID(248200384);
c = c.FindControlByID(simcity.kBtnIDPopulation);
c.mIsSelected ? c.SetSelected(!1) : (c.SetSelected(!0), this.OpenPopulationPanel());
break;
case simcity.kKeyTrigger_BudgetPanel:
c = gUIManager.FindControlByID(245433542);
c = c.FindControlByID(simcity.kBtnIDBudget);
c.mIsSelected ? c.SetSelected(!1) : (c.SetSelected(!0), this.OpenBudgetPanel());
break;
case simcity.kKeyTrigger_RegionView:
if (this.mIsEditorActive) {
this.mToolPaletteUIHandler.mWaitingCategory =
this.mToolPaletteUIHandler.mEditorCategory;
this.mToolPaletteUIHandler.mRegionViewCounter = -350;
this.mToolPaletteUIHandler.CloseEditorPanel();
break
}
this.mRegionViewUIHandler.IsVisible() ? (c = this.mReturnToCityButton, c.SetSelected(!0), this.mToolPaletteUIHandler.HandleUIMessage(scrui.kMsgTypeButtonClicked, simcity.kBtnReturnToCity, c)) : (this.mRegionCameraButton.SetSelected(!0), this.HandleUIMessage(scrui.kMsgTypeButtonClicked, simcity.kBtnRegionCamera, this.mRegionCameraButton));
break;
case simcity.kKeyTrigger_Achievements:
this.mAchievementsUIHandler &&
this.mAchievementsUIHandler.IsShowing() ? this.mAchievementsUIHandler.Hide() : this.mAchievementsUIHandler.Show();
break;
case simcity.kKeyTrigger_Leaderboards:
this.mLeaderboardUIHandler && this.mLeaderboardUIHandler.IsShowing() ? this.mLeaderboardUIHandler.Hide() : this.mLeaderboardUIHandler.Show(null, ["LBPopulation"]);
break;
case simcity.kKeyTrigger_Challenges:
this.mChallengeUIHandler && this.mChallengeUIHandler.IsShowing() ? this.mChallengeUIHandler.Hide() : this.mChallengeUIHandler.Show();
break;
case simcity.kKeyTrigger_Debug_WireArticlePrevious:
simcity.gGlobalUIHandler.mTicker.DebugShowWireArticle(0);
break;
case simcity.kKeyTrigger_Debug_WireArticleNext:
simcity.gGlobalUIHandler.mTicker.DebugShowWireArticle(1)
}
break;
case simcity.kMessageVideoCaptureStarted:
c = this.mSharedUIParent.FindControlByID(simcity.kWinRecordingFrame);
f = c.FindAnimationByID(simcity.kAnimRecordingFrameExit);
f.Stop();
f = c.FindAnimationByID(simcity.kAnimRecordingFrameIntro);
f.Restart(scrui.cAnimation.kPlayForward);
break;
case simcity.kMessageVideoCaptureFinished:
c = this.mSharedUIParent.FindControlByID(simcity.kWinRecordingFrame);
f =
c.FindAnimationByID(simcity.kAnimRecordingFrameIntro);
f.Stop();
f = c.FindAnimationByID(simcity.kAnimRecordingFrameExit);
f.Restart(scrui.cAnimation.kPlayForward);
f = c.FindControlByID(252694595);
f.UpdateLocaleText({
Local_Directory : b
});
c = f.GetTextWidth() - f.mWidth;
f = f.mParentControl;
f.SetPosition(f.mLeft - c / 2, f.mTop, f.mWidth + c, f.mHeight);
break;
case simcity.kMessageScreenshotTriggered:
this.mScreenshotCaptureLayout && this.mScreenshotCaptureLayout.SetVisibility(!1);
break;
case simcity.kMessageScreenshotCaptured:
c =
null,
this.mScreenshotCaptureLayout || (d = gUIManager.LoadLayout("Layouts/ImageCaptureFeedback.js", this.mSharedUIParent), d.FindControlByID(252762312).UpdateLocaleText({
Local_Directory : b
}), c = d.FindAnimationByID(252762303), c.RegisterEventCallback(scrui.cAnimation.kEventStopped, function () {
simcity.gGlobalUIHandler.mScreenshotCaptureLayout = null;
simcity.gGlobalUIHandler.mControlsToDestroy.push(d)
}), this.mScreenshotCaptureLayout = d),
c || (c = this.mScreenshotCaptureLayout.FindAnimationByID(252762303)),
this.mScreenshotCaptureLayout.SetVisibility(!0),
c.Restart(scrui.cAnimation.kPlayForward)
}
};
simcity.RotateCamera = function (a) {
scrui.PostGameCommand(scrui.BuildCommand(["rotateCamera", a]))
};
simcity.RotateCameraStop = function (a) {
scrui.PostGameCommand(scrui.BuildCommand(["rotateCameraStop", a]))
};
simcity.ZoomCamera = function (a) {
scrui.PostGameCommand(scrui.BuildCommand(["zoomCamera", a]))
};
simcity.cGlobalUIHandler.prototype.EnableSpectatorMode = function () {
this.mIsSpectatorMode = !0;
this.mTicker.mContainer && this.mTicker.mContainer.SetVisibility(!1);
this.mBoundaryUIHandler.mContainerControl.SetVisibility(!1);
this.mMissionUI.mMissionContainer.SetVisibility(!1);
this.mAchievementManager.mAchievementLayout.SetVisibility(!1);
this.mBulldozeButton.SetVisibility(!1);
this.mRegionViewButtonIcon.SetVisibility(!1);
this.mReturnHomeButtonIcon.SetVisibility(!0);
this.mRegionCameraButton.SetTooltipLocaleText(simcity.kLocaleExitSpectatorMode);
this.mReturnToCityButton.SetTooltipLocaleText();
var a = gUIManager.FindControlByID(simcity.kCityNameButton);
simcity.cTutorialManager.prototype.UpdateButtonVisibilityHelper(a, !1);
this.mSpectatorUIHandler = new simcity.cSpectatorUIHandler;
this.mSpectatorUIHandler.Init(this.mCityUIParent);
gUIManager.RegisterUIHandler(this.mSpectatorUIHandler);
this.mSpectatorUIHandler.Show()
};
simcity.cGlobalUIHandler.prototype.OnGlobalUILoaded = function () {
this.mSharedUIParent = gUIManager.FindControlByID(simcity.kWinSharedUIParent);
this.mCityUIParent = gUIManager.FindControlByID(simcity.kWinCityUIParent);
this.mRegionUIParent = gUIManager.FindControlByID(simcity.kWinRegionUIParent);
this.mAPIServerDataUIHandler = new simcity.cAPIServerDataHandler;
this.mAPIServerDataUIHandler.Init(this.mRegionID);
gUIManager.RegisterUIHandler(this.mAPIServerDataUIHandler);
this.mReturnToCityButton = this.mSharedUIParent.FindControlByID(simcity.kBtnReturnToCity);
simcity.SetupCategoryButton(this.mReturnToCityButton, this.mReturnToCityButton);
this.mCitySpecializationButton = this.mSharedUIParent.FindControlByID(simcity.kBtnIDCitySpecialization);
simcity.SetupCategoryButton(this.mCitySpecializationButton, this.mCitySpecializationButton);
this.mMoneyText = this.mSharedUIParent.FindControlByID(simcity.kTxtIDMoney);
this.mMoneyDeltaText = this.mSharedUIParent.FindControlByID(simcity.kTxtIDMoneyDelta);
this.mMoneyAnim = this.mSharedUIParent.FindAnimationByID(simcity.kAnimIDMoney);
this.mIncomeText = this.mSharedUIParent.FindControlByID(simcity.kTxtIDIncome);
this.mPopulationText = this.mSharedUIParent.FindControlByID(simcity.kTxtIDPopulation);
this.mPopulationDeltaText = this.mSharedUIParent.FindControlByID(simcity.kTxtIDPopulationDelta);
this.mWinDateDisplay = this.mSharedUIParent.FindControlByID(simcity.kTxtIDDate);
this.mWinTimeDisplay = this.mSharedUIParent.FindControlByID(simcity.kTxtIDTime);
this.mBottomToolbarControl = this.mSharedUIParent.FindControlByID(247960249);
this.mBoxNameTextControl =
this.mSharedUIParent.FindControlByID(simcity.kTxtBoxName);
this.mBudgetUIContainer = this.mSharedUIParent.FindControlByID(simcity.kWinBudgetContainer);
this.mPopulationUIContainer = this.mSharedUIParent.FindControlByID(simcity.kWinPopulationContainer);
this.mTaxesBasicUIHandler = new simcity.cTaxesBasicUIHandler;
gUIManager.RegisterUIHandler(this.mTaxesBasicUIHandler);
var a = this;
this.mSharedUIParent.FindAnimationByID(246121576).RegisterEventCallback(scrui.cAnimation.kEventStopped, function () {
if (!a.mBudgetUIContainer.mIsVisible) {
a.mBudgetUIContainer.DestroyLayout =
!0;
for (var b = 0; b < simcity.transactionRows.length; b++)
simcity.transactionRows[b].DestroyChildren();
simcity.transactionRows = []
}
});
this.mSharedUIParent.FindAnimationByID(246319415).RegisterEventCallback(scrui.cAnimation.kEventStopped, function () {
a.mPopulationUIContainer.mIsVisible || (a.mPopulationUIContainer.DestroyLayout = !0)
});
simcity.DEBUG && gUIManager.FindControlByID(simcity.kBtnExposeDebugUI).SetVisibility(!0);
this.mGameTimeManager = new simcity.cGameTimeManager;
gUIManager.RegisterUIHandler(this.mGameTimeManager);
this.mLayerUIHandler = new simcity.cLayerUIHandler;
this.mLayerUIHandler.Init();
gUIManager.RegisterUIHandler(this.mLayerUIHandler);
this.mTicker = new simcity.cTicker;
gUIManager.RegisterUIHandler(this.mTicker);
this.mEventTriggersManager = new simcity.cEventTriggersManager;
this.mEventTriggersManager.Init();
gUIManager.RegisterUIHandler(this.mEventTriggersManager);
this.mSpeechBalloonHandler = new simcity.cSpeechBalloonHandler;
gUIManager.RegisterUIHandler(this.mSpeechBalloonHandler);
this.mSpeechBalloonHandler.Init();
this.mCursorAttachmentHandler = new simcity.cCursorAttachmentHandler;
gUIManager.RegisterUIHandler(this.mCursorAttachmentHandler);
this.mCursorAttachmentHandler.Init(gUIManager.FindControlByID(simcity.kWinCursorAttachmentContainer));
this.mToolPaletteUIHandler = new simcity.cToolPaletteUIHandler;
this.mToolPaletteUIHandler.mLayerUIHandler = this.mLayerUIHandler;
var b = new simcity.cKey;
b.group = 161790466;
b.instance = scrui.IDFromName("Global");
this.mToolPaletteUIHandler.mPaletteKey = b;
gUIManager.RegisterUIHandler(this.mToolPaletteUIHandler);
this.mToolPaletteUIHandler.Init(this.mSharedUIParent.FindControlByID(simcity.kWinIDPaletteRoot));
this.mTutorialCallout = new simcity.cTutorialCalloutManager;
gUIManager.RegisterUIHandler(this.mTutorialCallout);
this.mTutorialCallout.Init();
this.mTutorialManager = new simcity.cTutorialManager;
gUIManager.RegisterUIHandler(this.mTutorialManager);
this.mTutorialManager.Init();
this.mIsTutorialEnabled || simcity.gPresenceManager.RefreshPresenceFromServer(function () {
simcity.cOriginUtilities.SetJoinablePresence(a.mRegionID)
});
this.mSpeedUIHandler = new simcity.cSpeedUIHandler;
this.mSpeedUIHandler.Init(gUIManager.FindControlByID(simcity.kWinSpeedContainer));
gUIManager.RegisterUIHandler(this.mSpeedUIHandler);
this.mAlertsUIHandler = new simcity.cAlertsUI;
this.mAlertsUIHandler.Init();
gUIManager.RegisterUIHandler(this.mAlertsUIHandler);
this.mRoadSelectUIHandler = new simcity.cRoadSelectUIHandler;
this.mRoadSelectUIHandler.Init(this.mCityUIParent.FindControlByID(simcity.kWinBuildingRolloverContainer));
gUIManager.RegisterUIHandler(this.mRoadSelectUIHandler);
this.mAchievementsUIHandler = new simcity.cAchievementsUIHandler;
this.mAchievementsUIHandler.Init(gUIManager.FindControlByID(simcity.kWinRootWindowID));
gUIManager.RegisterUIHandler(this.mAchievementsUIHandler);
simcity.InitializeBuildingRollover(this.mCityUIParent.FindControlByID(simcity.kWinBuildingRolloverContainer));
simcity.gOneShotGameEventListener.Initialize();
this.LoadBorderUnits();
this.mRegionWallUI = new simcity.cRegionWallUI;
gUIManager.RegisterUIHandler(this.mRegionWallUI);
this.mRegionWallButton =
this.mSharedUIParent.FindControlByID(simcity.kRegionWallButton);
this.mRegionWallAnimation = this.mSharedUIParent.FindAnimationByID(simcity.kRegionWallAnimation);
this.mRegionCameraButton = gUIManager.FindControlByID(simcity.kBtnRegionCamera);
0 === this.GetBoxID() && this.mRegionCameraButton.SetEnabled(!1);
this.mRegionUnlockEffect = gUIManager.FindControlByID(simcity.kRegionUnlockEffect);
this.mReportContentUIHandler = new simcity.cReportContentUIHandler;
gUIManager.RegisterUIHandler(this.mReportContentUIHandler);
this.mReportContentUIHandler.Initialize(gUIManager.FindControlByID(245173239));
simcity.gDeepLinkManager.InitDeepLink(simcity.gGameDeepLinkMethodInfo.jsonObj);
this.mLeaderboardUIHandler = new simcity.cLeaderboardPanel;
this.mLeaderboardUIHandler.Initialize();
this.mChallengeUIHandler = new simcity.cChallengePanel;
this.mChallengeUIHandler.Initialize();
this.mNewspaperUIHandler = new simcity.cNewspaperUIHandler;
gUIManager.RegisterUIHandler(this.mNewspaperUIHandler);
this.mNewspaperUIHandler.Init(gUIManager.FindControlByID(simcity.kWinNewspaperContainer));
this.mToyTaskPanelUIHandler = new simcity.cToyTaskPanelUIHandler;
gUIManager.RegisterUIHandler(this.mToyTaskPanelUIHandler);
this.mToyTaskPanelUIHandler.Init(gUIManager.FindControlByID(simcity.kWinRootWindowID));
this.mRegionViewUIHandler = new simcity.cRegionViewUIHandler;
this.mRegionViewUIHandler.Init(this.mRegionUIParent);
gUIManager.RegisterUIHandler(this.mRegionViewUIHandler);
this.mAPIServerDataUIHandler.RefreshRegionAPIData();
this.mRegionViewUIHandler.PreloadData();
this.mBoundaryUIHandler = new simcity.cBoundaryUIHandler;
gUIManager.RegisterUIHandler(this.mBoundaryUIHandler);
this.mBoundaryUIHandler.Init(gUIManager.FindControlByID(simcity.kWinBoundaryUIContainer));
this.mAvatarManagerHandler = new simcity.cAvatarManagerHandler;
gUIManager.RegisterUIHandler(this.mAvatarManagerHandler);
this.mAvatarManagerHandler.Init();
simcity.LoadPopulationHistory(this);
this.mBudgetCrisisUI = new simcity.cBudgetCrisisUI;
this.mBudgetCrisisUI.Init();
gUIManager.RegisterUIHandler(this.mBudgetCrisisUI);
this.mMayorRating = new simcity.cMayorRating;
this.mMayorRating.Init();
gUIManager.RegisterUIHandler(this.mMayorRating);
this.mBudgetPanel = new simcity.cBudgetPanel;
this.mBudgetPanel.Init();
gUIManager.RegisterUIHandler(this.mBudgetPanel);
this.mCategoryQueryingHandler = new simcity.cCategoryQueryingHandler;
this.mCategoryQueryingHandler.Init();
gUIManager.RegisterUIHandler(this.mCategoryQueryingHandler);
this.mAchievementManager = simcity.gAchievementManager;
this.mAchievementManager.Init(this.mSharedUIParent, this.mActiveBoxID);
this.mAgentQueryUIHandler =
new simcity.cAgentQueryUIHandler;
this.mAgentQueryUIHandler.Init(gUIManager.FindControlByID(simcity.kAgentQueryContainer));
this.mAchievementsUIHandler.SetAchievementManager(this.mAchievementManager);
gUIManager.RegisterUIHandler(this.mAgentQueryUIHandler);
this.mMissionUI = new simcity.cMissionUI;
gUIManager.RegisterUIHandler(this.mMissionUI);
this.mBulldozeButton = gUIManager.FindControlByID(simcity.kBtnIDBulldoze);
simcity.cCitySpecializationHandler.Init();
this.mRegionMessageRouter = new simcity.cRegionMessageRouter;
this.mRegionMessageRouter.Init();
gUIManager.RegisterUIHandler(this.mRegionMessageRouter);
simcity.gFriendListUIHandler.Initialize(gUIManager.FindControlByID(simcity.kFriendListContainer));
this.mLetterboxRoot = gUIManager.FindControlByID(simcity.kWinLetterboxRoot);
this.mDialogManager = new simcity.gDialog(gUIManager.FindControlByID(simcity.kModalDialogLayout));
this.mErrorDialogManager = new simcity.gErrorDialog(gUIManager.FindControlByID(simcity.kErrorModalDialogLayout));
this.mErrorAlertsUIHandler = new simcity.cErrorAlertsUIHandler;
simcity.gSystemMessageController.OpenSystemMessageSocket(a.OpenSystemMessageSocketCallback);
a = this;
simcity.gGameInvitesController.Initialize();
simcity.gGameInvitesController.inviteCallback = function (b) {
a.mRegionViewUIHandler.SendInvites(b)
};
this.mRegionViewButtonIcon = gUIManager.FindControlByID(simcity.kIcnRegionCamera);
this.mReturnHomeButtonIcon = gUIManager.FindControlByID(simcity.kIcnReturnHome);
this.mMissionUI.Init(gUIManager.FindControlByID(simcity.kWinMissionContainer));
this.mIsSpectatorMode && this.EnableSpectatorMode();
simcity.RegisterIME()
};
simcity.cGlobalUIHandler.prototype.HandleUIMessage = function (a, b, c) {
switch (a) {
case scrui.kMsgTypeButtonGainFocus:
simcity.gEventManager.TriggerEvent(simcity.gEventTypes.MOUSEOVER, b.controlID, c);
break;
case scrui.kMsgTypeButtonLoseFocus:
simcity.gEventManager.TriggerEvent(simcity.gEventTypes.MOUSEOUT, b.controlID, c);
break;
case scrui.kMsgTypeButtonUp:
simcity.gEventManager.TriggerEvent(simcity.gEventTypes.MOUSEUP, b, c);
break;
case scrui.kMsgTypeButtonDown:
simcity.gEventManager.TriggerEvent(simcity.gEventTypes.MOUSEDOWN, b,
c);
b == simcity.kBtnIDRotateCCW ? (this.mRotateRight = !0, simcity.RotateCamera(!0)) : b == simcity.kBtnIDRotateCW && (this.mRotateLeft = !0, simcity.RotateCamera(!1));
break;
case scrui.kMsgTypeButtonClicked:
simcity.gEventManager.TriggerEvent(simcity.gEventTypes.CLICK, b, c);
switch (b) {
case simcity.AllLayerClose:
(a = gUIManager.FindControlByID(248193223)) && a.SetSelected(!1);
break;
case simcity.kBTNCloseBudget:
a = gUIManager.FindControlByID(245433542);
a = a.FindControlByID(simcity.kBtnIDBudget);
a.SetSelected(!1);
break;
case simcity.kBTNCloseSpecilization:
a =
gUIManager.FindControlByID(240502028);
a.SetSelected(!1);
break;
case simcity.kBTNClosePopulation:
a = gUIManager.FindControlByID(248200384);
a = a.FindControlByID(simcity.kBtnIDPopulation);
a.SetSelected(!1);
break;
case simcity.kRegionNameButton:
this.mLeaderboardUIHandler.Show(null, ["LBPopulation"]);
break;
case simcity.kChallengePanelBtn:
this.mChallengeUIHandler.Show();
break;
case simcity.kBtnNameMomentOkay:
(a = gUIManager.FindControlByID(simcity.kNameMoment)) && a.DestroyControl();
this.mIsNameYourCityActive = !1;
(this.mNamingArrow = gUIManager.FindControlByID(simcity.kNamingArrow)) && this.mNamingArrow.SetVisibility(!0);
break;
case simcity.kBtnIDMaps:
a = gUIManager.FindControlByID(simcity.kWinIDMapsPanel);
a.SetVisibility(!a.mIsVisible);
break;
case simcity.kBtnIDQuit:
var d = this,
a = {
title : this.mLocaleStrings.kExitToMenuText,
titleParams : null,
message : this.mLocaleStrings.kExitToMenuConfirmationMsg,
messageParams : null,
buttons : [{
text : simcity.gDialog.kButtonCancelText,
onClick : function () {
d.OnQuitConfirmationCancel()
}
}, {
text : this.mLocaleStrings.kExitText,
onClick : function () {
d.QuitToMainMenu()
}
}
]
};
this.mQuitConfirmationShown = !0;
this.mDialogManager.ShowPrompt(a);
break;
case simcity.kBtnIDQuitApp:
d = this;
a = {
title : this.mLocaleStrings.kQuitSimcityText,
titleParams : null,
message : this.mLocaleStrings.kQuitSimcityConfirmMsg,
messageParams : null,
buttons : [{
text : simcity.gDialog.kButtonCancelText,
onClick : function () {
d.OnQuitConfirmationCancel()
}
}, {
text : this.mLocaleStrings.kQuitText,
onClick : function () {
d.mQuitConfirmationShown = !1;
d.mNewspaperUIHandler.Shutdown();
d.mTicker.Shutdown();
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataRequestQuitApp]))
}
}
]
};
this.mQuitConfirmationShown = !0;
this.mDialogManager.ShowPrompt(a);
break;
case simcity.kBtnGameManual:
simcity.gUIToolbox.OpenSCGameManual();
break;
case simcity.kBtnHelpCenter:
simcity.gUIToolbox.OpenSCHelpSiteWithAuth();
break;
case simcity.kBtnExposeDebugUI:
simcity.DEBUG && (a = gUIManager.FindControlByID(simcity.kWinDebugToolCategories), a.SetVisibility(!a.mIsVisible));
break;
case simcity.kRegionWallButton:
this.mRegionWallUI.ToggleRegionWall(!0);
this.mRegionWallUI.RevealRegionWallTextEntry(!0);
break;
case simcity.kBtnIDMainMenuResume:
this.mSharedUIParent.FindControlByID(simcity.kBtnIDMainMenuToggle).SetSelected(!1);
break;
case simcity.kAchievementPanelBtn:
this.mAchievementsUIHandler.Show();
break;
case simcity.kBtnIDOpenFeedback:
simcity.cOriginUtilities.ShowFeedback();
break;
case simcity.kBtnIDOpenReportBug:
simcity.cOriginUtilities.ShowBugReport();
break;
case simcity.kBtnIDOpenSettings:
scrui.Assert(!this.mSettingsUIHandler);
this.mSettingsUIHandler =
new simcity.cSettingsUIHandler;
this.mSettingsUIHandler.Init(gUIManager.FindControlByID(simcity.kWinRootWindowID), !0);
gUIManager.RegisterUIHandler(this.mSettingsUIHandler);
this.mSettingsUIHandler.Show();
break;
case simcity.kBtnIDToolConfirmed:
this.mTutorialManager.SetModalWindow(this.mConfirmationDialog, !1);
this.mConfirmationDialog.DestroyControl();
this.mConfirmationDialog = null;
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage, scrui.IDFromName("toolConfirmed")]));
break;
case simcity.kBtnIDToolDenied:
this.mTutorialManager.SetModalWindow(this.mConfirmationDialog,
!1);
this.mConfirmationDialog.DestroyControl();
this.mConfirmationDialog = null;
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage, scrui.IDFromName("toolDenied")]));
break;
case simcity.kBtnIDZoomIn:
simcity.ZoomCamera(!0);
break;
case simcity.kBtnIDZoomOut:
simcity.ZoomCamera(!1);
break;
case simcity.kBtnFriendList:
simcity.gFriendListUIHandler.Toggle();
break;
case simcity.kBtnDemandBars:
!this.mIsEditorActive && (!simcity.IsTutorialInProgress() && !this.mRegionViewUIHandler.IsVisible()) && this.mToolPaletteUIHandler.OpenToolPanelHelper(simcity.kCategoryIDZones)
}
break;
case scrui.kMsgTypeButtonSelected:
switch (b) {
case simcity.kBtnRegionCamera:
this.TransitionToRegion();
break;
case simcity.kCityNameButton:
this.mNamingArrow && (this.mNamingArrow.DestroyControl(), delete this.mNamingArrow);
simcity.CreateNameYourCityDialog();
break;
case simcity.kBtnIDBudget:
this.OpenBudgetPanel();
break;
case simcity.kBtnIDPopulation:
this.OpenPopulationPanel();
break;
case simcity.kBtnIDMainMenuToggle:
if (!simcity.gGlobalUIHandler.mIsTimed || !simcity.gGlobalUIHandler.mTutorialDemo)
simcity.IsTutorialInProgress() ||
(this.mRegionCameraButton.mIsSelected ? this.mRegionViewUIHandler.ClosePalette() : (simcity.gGlobalUIHandler.mToolPaletteUIHandler.mEditorLayout.mIsVisible && this.mToolPaletteUIHandler.CloseEditorPanel(), this.mToolPaletteUIHandler.CloseToolPanel())), a = gUIManager.FindControlByID(simcity.kWinIDMainMenu), scrui.PostGameCommand(scrui.BuildCommand(["optionsMenuActive", "true"])), a.SetVisibility(!0), simcity.gGlobalUIHandler.mSpeedUIHandler.GetGameSpeed() != simcity.kSpeedPaused && (simcity.gGlobalUIHandler.mSpeedUIHandler.sPreviousGameSpeed =
simcity.gGlobalUIHandler.mSpeedUIHandler.GetGameSpeed(), scrui.PostGameCommand(scrui.BuildCommand(["setspeed", simcity.kSpeedPaused]))), simcity.IsTutorialInProgress() && simcity.gGlobalUIHandler.mTutorialCallout.SetupCallout()
}
break;
case scrui.kMsgTypeButtonDeselected:
switch (b) {
case simcity.kBtnIDMainMenuToggle:
a = gUIManager.FindControlByID(simcity.kWinIDMainMenu),
a.SetVisibility(!1),
scrui.PostGameCommand(scrui.BuildCommand(["optionsMenuActive", "false"])),
scrui.PostGameCommand(scrui.BuildCommand(["setspeed",
simcity.gGlobalUIHandler.mSpeedUIHandler.sPreviousGameSpeed])),
simcity.IsTutorialInProgress() && simcity.gGlobalUIHandler.mTutorialCallout.SetupCallout()
}
break;
case simcity.kMsgTypeAPIServerDataUpdated:
this.mMyBoxDataSet || (this.mTicker.Init(), this.LoadUserInfo(), this.mMyBoxDataSet = !0),
this.SetBoxName(b),
"function" == typeof simcity.IsTutorialInProgress && (!simcity.IsMainTutorialInProgress() && !this.mIsSpectatorMode && !simcity.IsSandboxRegion()) && this.mAchievementManager.StartRuleProcessing()
}
};
simcity.cGlobalUIHandler.prototype.IsNameYourCityMomentActive = function () {
return this.mIsNameYourCityActive || this.mNamingArrow && this.mNamingArrow.mIsVisible ? !0 : !1
};
simcity.cGlobalUIHandler.prototype.PrintDebugInfo = function () {
if (simcity.DEBUG) {
scrui.DebugPrint("gGlobalUIHandler");
var a = 0,
b;
for (b in simcity.gHistoryData)
a += simcity.gHistoryData[b].data.length;
scrui.DebugPrint(" gHistoryData categories = " + Object.keys(simcity.gHistoryData).length + ", total history items = " + a);
scrui.DebugPrint(" mPopulationTimelineData population = " + this.mPopulationTimelineData.population.length + ", visitors = " + this.mPopulationTimelineData.visitors.length);
scrui.DebugPrint(" mLayerButtons = " +
this.mLayerButtons.length)
}
};
simcity.cGlobalUIHandler.prototype.OpenPopulationPanel = function () {
this.mPopulationUIContainer.mChildren || (this.mPopulationUI = new simcity.cPopulationUI, this.mPopulationUI.Init(this.mPopulationUIContainer), gUIManager.RegisterUIHandler(this.mPopulationUI));
this.mPopulationUIContainer.DestroyLayout = !1;
gUIManager.FindControlByID(simcity.kBtnIDBudget).SetSelected(!1)
};
simcity.cGlobalUIHandler.prototype.OpenBudgetPanel = function () {
this.mBudgetUIContainer.mChildren || gUIManager.LoadAndCacheLayout("Layouts/BudgetUI2.js", this.mBudgetUIContainer);
this.mBudgetUIContainer.DestroyLayout = !1;
this.mTaxesBasicUIHandler.Init(this.mBudgetUIContainer);
gUIManager.FindControlByID(simcity.kBtnIDPopulation).SetSelected(!1);
this.UpdateDataBindings()
};
simcity.cGlobalUIHandler.prototype.Init = function () {
gUIManager.CacheLayouts("BudgetItemTemplate.js GlobalUI/TaxSpinner.js 0x0b074e5a!0x7f0400ad.0x67771f5c 0x0b074e5a!0x284503fe.0x67771f5c PaletteSubCategoryButton.js PaletteLayerToggle2.js AlertTemplate.js PowerAlert.js AlertTemplateNoCountCircleBar.js FireAlert.js 0x0b074e5a!0x5c51d5be.0x67771f5c 0x0b074e5a!0x6791a44f.0x67771f5c MissionObjective.js 0x0b074e5a!0xb9f25a47.0x67771f5c WaterAlert.js 0x0b074e5a!0xaca003fb.0x67771f5c".split(" "));
var a = [scrui.BuildRequestQuery([simcity.kDataEditor,
simcity.kDataEnabled]), scrui.BuildRequestQuery([simcity.kDataURLProperty, simcity.kPropEcoNetRESTAPI]), scrui.BuildRequestQuery([simcity.kDataDemo]), scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDTutorialEnabled]), scrui.BuildRequestQuery([simcity.kDataActiveBoxId]), scrui.BuildRequestQuery([simcity.kDataCommandLine]), scrui.BuildRequestQuery([simcity.kDataSpectator]), scrui.BuildRequestQuery([simcity.kDataActiveCityUID]), scrui.BuildRequestQuery([simcity.kDataRegionID]), scrui.BuildRequestQuery([simcity.kDataLastActiveCityUID])],
b = this;
scrui.RequestGameData(a, function (a) {
gUIManager.RegisterUIHandler(b);
b.mIsEditorActive = a[0];
a[1] && scrui.SetRestPath(a[1]);
b.mGlobalUILayout = gUIManager.LoadLayout("Layouts/GlobalUI2.js");
b.mGlobalUILayout.FindControlByID(simcity.kWinRootWindowID);
var c = a[2];
b.mIsDemo = c.demo;
b.mIsTimed = c.demoTimed;
b.mIsTutorialEnabled = b.CheckMainTutorialActive();
b.mActiveBoxID = a[4] || 0;
b.mCommandLine = a[5];
b.mIsSpectatorMode = a[6];
b.mActiveBoxUID = a[7] || 0;
b.mRegionID = a[8] || 0;
b.OnGlobalUILoaded();
simcity.gConfigurationValues.RestoreFromLocalStorage();
simcity.gConfigurationValues.InitFromServer()
});
this.InitDataBindingInfo();
for (var c = simcity.kLayerRows.length, d = 0; d < c; d++) {
for (var e = simcity.kLayerRows[d].length, a = Array(e), f = 0, g = e; f < g; ++f) {
var h = 3 * f,
i = scrui.RequestStringFromKey(new simcity.cKey(1088479232, simcity.kLayerRows[d][f], scrui.kResourceTypePropertyList));
a[h] = scrui.BuildRequestQuery([simcity.kDataProperties, i, simcity.kPropertyLayerName]);
a[h + 1] = scrui.BuildRequestQuery([simcity.kDataProperties, i, simcity.kPropertyLayerIconKey]);
a[h + 2] = scrui.BuildRequestQuery([simcity.kDataProperties,
i, simcity.kPropertyLayerDarkIconKey])
}
var j = gUIManager.FindControlByID(248187920 + d);
if (!(null == j || void 0 == j)) {
var k = d,
l = this;
scrui.RequestGameData(a, function (a) {
for (var b = e - 1; 0 <= b; --b) {
var c = 3 * b,
d = gUIManager.LoadAndCacheLayout("Layouts/Palette/PaletteLayerToggle2.js", j);
l.mLayerButtons.push(d);
d.SetPosition(b * d.mWidth, 0);
var f = Number(simcity.kLayerRows[k][b]);
d.mUserData = f;
d.mAllLayersButton = !0;
for (var g = d.FindControlByID(231251442).mExposedProperties, h = 0, i = g.length; h < i; ++h) {
var u = g[h],
v = scrui.cProperties.GetPropertyDataByID(u.mPropertyID);
switch (u.mPropertyLabel) {
case "WhiteIcon":
v.mSet(u.mControl, scrui.PathFromResourceKey(a[c + 1]));
break;
case "DarkIcon":
var x = a[c + 2];
x || (x = a[c + 1]);
v.mSet(u.mControl, scrui.PathFromResourceKey(x));
break;
case "TooltipText":
x = a[c];
x = "/" + scrui.DecimalToHex(x.tableID) + "/" + scrui.DecimalToHex(x.stringID);
v.mSet(u.mControl, x);
break;
case "UserData":
v.mSet(u.mControl, f)
}
}
l.mLayerUIHandler.RegisterLayerButton(d)
}
})
}
}
this.mHeavyLayerList = simcity.kLayerCategory1.concat(simcity.kLayerCategory2, simcity.kLayerCategory3,
simcity.kLayerCategory4, simcity.kLayerCategory5, simcity.kLayerCategory6, simcity.kLayerCategory7);
simcity.LoadRecentTransactionHistory()
};
simcity.IsMainTutorialInProgress = function () {
return simcity.gGlobalUIHandler.mIsMainTutorialEnabled
};
simcity.cGlobalUIHandler.prototype.CheckMainTutorialActive = function () {
var a = [scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDTutorialEnabled])],
b = !1;
scrui.RequestGameData(a, function (a) {
b = 1 == a[0]
});
return simcity.gGlobalUIHandler.mIsMainTutorialEnabled = b
};
simcity.cGlobalUIHandler.prototype.Shutdown = function () {
this.mGlobalUILayout = this.mCityUIParent = null;
gUIManager.UnregisterUIHandler(this.mAvatarManagerHandler);
this.mAvatarManagerHandler.Shutdown();
this.mAvatarManagerHandler = null;
gUIManager.UnregisterUIHandler(this.mBoundaryUIHandler);
this.mBoundaryUIHandler.Shutdown();
this.mBoundaryUIHandler = null;
gUIManager.UnregisterUIHandler(this.mRegionViewUIHandler);
this.mRegionViewUIHandler.Shutdown(this.mRegionUIParent);
this.mRegionViewUIHandler = null;
gUIManager.UnregisterUIHandler(this.mTutorialManager);
this.mTutorialManager.Shutdown();
this.mTutorialManager = null;
gUIManager.UnregisterUIHandler(this.mSpeechBalloonHandler);
this.mSpeechBalloonHandler.Shutdown();
this.mSpeechBalloonHandler = null;
gUIManager.UnregisterUIHandler(this.mCursorAttachmentHandler);
this.mCursorAttachmentHandler.Shutdown();
this.mCursorAttachmentHandler = null;
gUIManager.UnregisterUIHandler(this.mToolPaletteUIHandler);
this.mToolPaletteUIHandler.Shutdown();
this.mToolPaletteUIHandler = null;
gUIManager.UnregisterUIHandler(this.mLayerUIHandler);
this.mLayerUIHandler = null;
gUIManager.UnregisterUIHandler(this.mEventTriggersManager);
this.mEventTriggersManager = null;
gUIManager.UnregisterUIHandler(this.mGameTimeManager);
this.mGameTimeManager = null;
gUIManager.UnregisterUIHandler(handler.mTaxesBasicUIHandler);
this.mTaxesBasicUIHandler = null
};
simcity.cGlobalUIHandler.prototype.TransitionToRegion = function () {
!this.mRegionViewUIHandler.IsVisible() && 0 !== this.GetBoxID() && (this.mLayerUIHandler.DeactivateLayer(), this.mToolPaletteUIHandler.CloseToolPanel(!0), this.mMissionUI.mMissionContainer.SetVisibility(!1), this.mRegionViewUIHandler.EnterRegionView(), this.mIsSpectatorMode && this.mRegionViewUIHandler.ZoomToAndLaunchLastCity(), this.mRegionUnlockEffect.SetVisibility(!1))
};
simcity.cGlobalUIHandler.prototype.OnKeyDown = function (a) {
scrui.cUIHandler.prototype.OnKeyDown.call(this, a)
};
simcity.cGlobalUIHandler.prototype.OnKeyUp = function (a, b, c, d, e) {
scrui.cUIHandler.prototype.OnKeyUp.call(this, a);
e && !c && (a === scrui.kKeyCodeLetterF ? scrui.PostGameCommand(scrui.BuildCommand(["createUnit", simcity.CheatUnitFire])) : a === scrui.kKeyCodeLetterC ? scrui.PostGameCommand(scrui.BuildCommand(["createUnit", simcity.CheatUnitCrime])) : a === scrui.kKeyCodeLetterM ? scrui.PostGameCommand(scrui.BuildCommand(["createUnit", simcity.CheatUnitHealth])) : a === scrui.kKeyCodeLetterA ? scrui.PostGameCommand(scrui.BuildCommand(["createUnit",
simcity.CheatUnitAirPollution])) : a === scrui.kKeyCodeLetterP ? scrui.PostGameCommand(scrui.BuildCommand(["createUnit", simcity.CheatUnitGroundPollution])) : a === scrui.kKeyCodeLetterH ? scrui.PostGameCommand(scrui.BuildCommand(["createUnit", simcity.CheatUnitHomeless])) : a === scrui.kKeyCodeLetterS ? scrui.PostGameCommand(scrui.BuildCommand(["createUnit", simcity.CheatUnitSewage])) : a === scrui.kKeyCodeLetterG ? scrui.PostGameCommand(scrui.BuildCommand(["createUnit", simcity.CheatUnitGarbage])) : a === scrui.kKeyCodeLetterW &&
scrui.PostGameCommand(scrui.BuildCommand(["createUnit", simcity.CheatUnitSimoleans])));
switch (a) {
case scrui.kKeyCodeEscape:
var b = [scrui.BuildRequestQuery(["selectedTool", "toolID"])],
f = this;
scrui.RequestGameData(b, function () {
var a = f.mSharedUIParent.FindControlByID(simcity.kBtnIDMainMenuToggle),
b = gUIManager.FindControlByID(248200384).FindControlByID(simcity.kBtnIDPopulation),
c = gUIManager.FindControlByID(245433542).FindControlByID(simcity.kBtnIDBudget),
d = simcity.gGlobalUIHandler.mSpeechBalloonHandler.GetExpandedSpeechBalloonInfo(),
e = gUIManager.FindControlByID(248193223);
if (!simcity.gGlobalUIHandler.mIsTutorialEnabled)
if (f.mSettingsUIHandler && f.mSettingsUIHandler.InConfirmationSequence())
f.mSettingsUIHandler.AbortConfirmationSequence();
else if (f.mAchievementsUIHandler && f.mAchievementsUIHandler.IsShowing())
f.mAchievementsUIHandler.Hide();
else if (f.mChallengeUIHandler && f.mChallengeUIHandler.IsShowing())
f.mChallengeUIHandler.Hide();
else if (f.mLeaderboardUIHandler && f.mLeaderboardUIHandler.IsShowing())
f.mLeaderboardUIHandler.Hide();
else if (f.mSettingsUIHandler && f.mSettingsUIHandler.IsShowing())
f.mSettingsUIHandler.Hide();
else if (f.mQuitConfirmationShown)
f.mDialogManager.OnEscapePressed();
else if (a && !0 === a.mIsSelected)
a.SetSelected(!1);
else if (f.mImportExportUIHandler)
f.mImportExportUIHandler.Shutdown();
else if (f.mCityNameUIHandler && f.mCityNameUIHandler.IsVisible())
f.mCityNameUIHandler.Hide();
else if (f.mMayorRating.IsVisible())
f.mMayorRating.CloseMayorPanel();
else if (b.mIsSelected)
b.SetSelected(!1);
else if (c.mIsSelected)
c.SetSelected(!1);
else if (d && d.item && !d.item.mIsThoughtBubble)
simcity.gGlobalUIHandler.mSpeechBalloonHandler.OnAskMeLater(d);
else {
var l = !1;
scrui.gUIManager.mRequestManager.PostGameCommand(scrui.BuildCommand(["handleEscapeKey"]), null, function (a) {
l = a
});
l || (null !== f.mLayerUIHandler.mCurrentLayerID ? f.mLayerUIHandler.DeactivateLayer() : e.mIsSelected ? e.SetSelected(!1) : f.mIsEditorActive ? scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataExitBuildingEditor])) : null !== f.mToolPaletteUIHandler && null !== f.mToolPaletteUIHandler.mSelectedCategoryButton ?
f.mToolPaletteUIHandler.CloseToolPanel() : null !== simcity.gGlobalUIHandler.mRegionViewUIHandler && simcity.gGlobalUIHandler.mRegionViewUIHandler.mIsContextPanelActive ? simcity.gGlobalUIHandler.mRegionViewUIHandler.ClosePalette() : f.mRegionWallButton.mIsSelected ? (simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kInstanceUIChatWindowClose), gUIManager.FindControlByID(simcity.gGlobalUIHandler.mRegionWallUI.kControlIDs.WALL_BACKGROUND).SetVisibility(!1), gUIManager.FindControlByID(simcity.gGlobalUIHandler.mRegionWallUI.kControlIDs.INPUT_CONTAINER).SetVisibility(!1),
f.mRegionWallButton.SetSelected(!1)) : a.SetSelected(!a.mIsSelected))
}
})
}
if (simcity.DEBUG)
switch (a) {
case scrui.kKeyCodeDigit1:
c && (e && !d) && scrui.RunCheat("scgameui -unlockalltools");
break;
case scrui.kKeyCodeLetterW:
c && (e && !d) && simcity.CreateUnit("T_RCI_AddHourlyIncomeCheat")
}
};
simcity.cGlobalUIHandler.prototype.OnMouseDown = function () {};
simcity.cGlobalUIHandler.prototype.OnMouseUp = function (a, b, c) {
scrui.cUIHandler.prototype.OnMouseUp.call(this, a, b, c);
!0 === this.mRotateRight ? (this.mRotateRight = !1, simcity.RotateCameraStop(!0)) : !0 === this.mRotateLeft && (this.mRotateLeft = !1, simcity.RotateCameraStop(!1))
};
simcity.cGlobalUIHandler.prototype.SetVisibility = function (a) {
this.mVisibilityCounter += a ? 1 : -1;
null !== this.mCityUIParent && this.mCityUIParent.SetVisibility(0 < this.mVisibilityCounter)
};
simcity.cGlobalUIHandler.prototype.GetVisibility = function () {
return 0 < this.mVisibilityCounter
};
simcity.cGlobalUIHandler.prototype.BuildingRolloverLoaded = function (a) {
this.mBuildingRolloverManager = a;
a.mGlobalUI = this
};
simcity.cGlobalUIHandler.prototype.SetBoxName = function (a) {
var b = this.mGlobalUILayout.FindControlByID(simcity.kTxtBoxName);
(a = a.GetMyClaimedBox()) && b.SetText(a.name, !0)
};
simcity.cGlobalUIHandler.prototype.LoadBorderUnits = function () {
var a = this,
b = scrui.BuildRequestQuery(["borderUnits"]);
scrui.RequestGameData([b], function (b) {
for (var b = b[0], d = 0, e = b.length; d < e; ++d) {
var f = scrui.RequestStringFromUnitRef(b[d]);
a.mBorderUnitsList.push(f)
}
})
};
simcity.cGlobalUIHandler.prototype.LoadUserInfo = function () {
if (simcity.gSessionManager.IsSessionActive())
this.mUserSessionId = simcity.gSessionManager.mUserSessionID, this.mUserId = simcity.gSessionManager.mUserID, this.mScreenName = simcity.gSessionManager.mScreenName, this.LoadRegionWall();
else {
var a = this,
b = scrui.BuildRequestQuery([simcity.kDataAppProperties, simcity.kPropNetUserID]);
scrui.RequestGameData([b], function (b) {
a.mUserId = b[0];
Boolean(a.mUserId) && (b = scrui.BuildRequestQuery(["user", a.mUserId]), scrui.RequestRestData([b],
null, scrui.XHR.requestMethods.GET, function (b) {
b = b.json;
null !== b && (a.mScreenName = b.screenName, a.LoadRegionWall())
}, function (a) {
scrui.DebugPrint("[RPC ERROR]:" + a.message)
}, function () {}))
})
}
};
simcity.cGlobalUIHandler.prototype.LoadRegionWall = function () {
gUIManager.FindControlByID(simcity.mRegionWall.root);
var a = gUIManager.FindControlByID(simcity.mRegionWall.regionWallLayout),
b = gUIManager.FindControlByID(simcity.mRegionWall.formContainer),
c = gUIManager.FindControlByID(simcity.mRegionWall.messagesContainer),
d = gUIManager.FindControlByID(simcity.mRegionWallNotifications.messagesContainer),
e = this.mRegionID;
0 !== e && null !== this.mRegionWallUI && this.mRegionWallUI.Init(this.mUserId, this.mUserSessionId,
this, e, a, b.mParentControl, c.mParentControl, d.mParentControl);
gUIManager.FindControlByID(simcity.mRegionWall.root).SetVisibility(!1)
};
simcity.cGlobalUIHandler.prototype.GetBoxID = function () {
return 0 !== this.mActiveBoxID ? this.mActiveBoxID : this.mActiveBoxUID
};
simcity.cGlobalUIHandler.prototype.GetIsDemo = function () {
return this.mIsDemo
};
simcity.cGlobalUIHandler.prototype.ShowConfirmationDialog = function (a) {
var b = this;
switch (a.dialogID) {
case simcity.kConfirmationDialogIDBulldoze:
case simcity.kConfirmationDialogIDCantBulldoze:
var c = [],
d = null,
e = a.dialogID === simcity.kConfirmationDialogIDBulldoze;
e || (d = (new scrui.cLocaleString("DialogMessages.json", "0x0e9e5737", "")).LoadAndGetTextSynchronous());
for (var f in a.unitRefs) {
var g = scrui.RequestStringFromUnitRef(a.unitRefs[f]);
c.push(scrui.BuildRequestQuery(["units", g, "unitName"]))
}
scrui.RequestGameData(c,
function (a) {
var c = "",
f;
for (f in a) {
var g = scrui.TextFromLocaleProperty(a[f]);
if (a[f].stringID === simcity.kTextIDGarbageDump)
var l = (new scrui.cLocaleString("GlobalUI.json", "0x0e1a16d1", "")).LoadAndGetTextSynchronous(), g = g + l;
l = "";
f != a.length - 1 && (l = ", ");
c += g + l
}
b.LoadAndShowConfirmationDialog("Layouts/DialogBoxes/BulldozeDialog.js", c, d, e)
})
}
};
simcity.cGlobalUIHandler.prototype.HideConfirmationDialog = function () {
this.mConfirmationDialog && (this.mTutorialManager.SetModalWindow(this.mConfirmationDialog, !1), this.mConfirmationDialog.DestroyControl(), this.mConfirmationDialog = null)
};
simcity.cGlobalUIHandler.prototype.LoadAndShowConfirmationDialog = function (a, b, c, d) {
(this.mConfirmationDialog = gUIManager.LoadAndCacheLayout(a, this.mSharedUIParent)) ? (b && this.mConfirmationDialog.FindControlByID(simcity.kTextIDToolRequestBody).SetRawText(b), c && this.mConfirmationDialog.FindControlByID(simcity.kTextIDToolRequestHeader).SetRawText(c), d || this.mConfirmationDialog.FindControlByID(simcity.kBtnIDToolDenied).SetVisibility(!1)) : scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage,
scrui.IDFromName("toolConfirmation"), !0]));
return !1
};
simcity.ShowError = function (a) {
simcity.gGlobalUIHandler.ShowError(a)
};
simcity.ErrorWindowClosed = function () {
var a = simcity.gGlobalUIHandler;
a.mErrorLayout.DestroyControl();
a.mErrorLayout = null;
scrui.OnErrorWindowClosed(scrui.kErrorResponse_Okay)
};
simcity.cGlobalUIHandler.prototype.InitErrorManager = function () {
var a = this;
gErrorManager.Init();
gErrorManager.RegisterModalDisplayListener(function (b) {
a.mErrorDialogManager.ShowErrorModal(b)
});
gErrorManager.RegisterErrorListener(function (a) {
return simcity.gNetworkStateManager.HandleConnectionError(a)
});
gErrorManager.RegisterErrorListener(function (b) {
return a.InGameErrorHandler(b)
});
gErrorManager.CheckForErrors();
setTimeout(function () {
scrui.PostGameCommand(scrui.BuildCommand([simcity.kRequestNetworkConnectionState]))
},
200)
};
simcity.cGlobalUIHandler.prototype.ShowError = function (a) {
this.mErrorLayout = gUIManager.LoadLayout("Layouts/ErrorModal.js", scrui.gUIManager.GetRootWindow());
this.mErrorLayout.FindControlByID(235662304).SetText(a.message);
var b = "",
c;
for (c in a.cause)
b += c + ":" + scrui.SerializeJSON(a.cause[c]) + "<br/>";
this.mErrorLayout.FindControlByID(242481059).SetText(b);
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, 235661847, simcity.ErrorWindowClosed);
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, 235662300,
simcity.ErrorWindowClosed)
};
simcity.cGlobalUIHandler.prototype.QuitToMainMenu = function () {
this.mNewspaperUIHandler.Shutdown();
this.mTicker.Shutdown();
this.mQuitConfirmationShown = !1;
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataQuit]))
};
simcity.cGlobalUIHandler.prototype.InGameErrorHandler = function (a) {
var b = !1;
if (a.messageType === scrui.cErrorManager.kMsgType_ErrorData) {
if (a.dialogType === scrui.kErrorDialogType_Alert && (this.mErrorAlertsUIHandler.ShowAlertFromErrorData(a), b = !0), a.code === scrui.kErrorCode_RegionLoadFailed)
b = !0, simcity.gLoadingScreenUIHandler.Hide(), this.QuitToMainMenu()
} else if (a.messageType === scrui.cErrorManager.kMsgType_UserResponse)
switch (a.errorCode) {
case scrui.kErrorCode_ForceQuitToMainMenu:
a.response === scrui.kErrorResponse_Quit &&
(simcity.gNetworkStateManager.IsConnected() || this.QuitToMainMenu());
break;
case scrui.kErrorCode_DlcMustMigrateGame:
gUIManager.UnregisterAllUIHandlers(),
simcity.gLoadingScreenUIHandler.Initialize(!0),
simcity.gLoadingScreenUIHandler.Show(),
a = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData,
simcity.gLoadingScreenUIHandler.SetRegionByKey(a.mRegionTypeName),
simcity.gLoadingScreenUIHandler.SetCityName(a.mPlayingBox.name)
}
return b
};
simcity.cGlobalUIHandler.prototype.OpenSystemMessageSocketCallback = function (a) {
a && a.message && simcity.gGlobalUIHandler.mErrorAlertsUIHandler.AddAlert(a.message)
};
simcity.cGlobalUIHandler.prototype.OnQuitConfirmationCancel = function () {
this.mQuitConfirmationShown = !1
};
simcity.IsSandboxRegion = function () {
return simcity.gGlobalUIHandler.mIsServerSandbox
};
simcity.IsOptionMenuVisible = function () {
var a = !1,
b = gUIManager.FindControlByID(simcity.kWinIDMainMenu);
b && (a = b.mIsVisible);
return a
};
simcity.BootstrapUIHandler = function () {
this.UIHander = scrui.cUIHandler;
this.UIHander()
};
goog.inherits(simcity.BootstrapUIHandler, scrui.cUIHandler);
simcity.BootstrapUIHandler.prototype.Init = function () {
gUIManager.RegisterUIHandler(this);
var a = this;
scrui.RequestGameData(["isLoadingFinalized"], function (b) {
b[0] && a.InitGlobalUI()
})
};
simcity.BootstrapUIHandler.prototype.HandleGameEvent = function (a) {
switch (a) {
case simcity.kGameMessageGameLoadingFinalized:
this.InitGlobalUI()
}
};
simcity.BootstrapUIHandler.prototype.InitGlobalUI = function () {
simcity.gGlobalUIHandler = new simcity.cGlobalUIHandler;
simcity.gGlobalUIHandler.Init();
gUIManager.UnregisterUIHandler(this)
};
simcity.Initialize = function () {
scrui.Initialize("gameconfig.json");
simcity.InitializeTextUtilities();
simcity.DynamicScriptLoader.LoadAllScripts(function () {
(new simcity.BootstrapUIHandler).Init();
gUIManager.EnableGameEventProcessing()
})
};
simcity.SetBudgetAlertLevel = function (a) {
var b = gUIManager.FindControlByID(simcity.kWinBudgetAlert),
c = gUIManager.FindControlByID(simcity.kWinBudgetCaution);
a === simcity.kAlertLevelCritical ? (b.SetVisibility(!0), c.SetVisibility(!1)) : a === simcity.kAlertLevelCaution || a === simcity.kAlertLevelAlert ? (b.SetVisibility(!1), c.SetVisibility(!0)) : (b.SetVisibility(!1), c.SetVisibility(!1))
};
simcity.SetPopulationAlertLevel = function (a) {
var b = gUIManager.FindControlByID(simcity.kWinPopulationAlert),
c = gUIManager.FindControlByID(simcity.kWinPopulationCaution);
a === simcity.kAlertLevelCritical ? (b.SetVisibility(!0), c.SetVisibility(!1)) : a === simcity.kAlertLevelCaution || a === simcity.kAlertLevelAlert ? (b.SetVisibility(!1), c.SetVisibility(!0)) : (b.SetVisibility(!1), c.SetVisibility(!1))
};
simcity.ForcePuckUIState = function (a) {
var b = gUIManager.FindControlByID(simcity.kBtnRegionCamera),
c = simcity.gGlobalUIHandler.mReturnToCityButton;
b && c && ("region" == a ? (b.SetSelected(!0), c.SetSelected(!1)) : (b.SetSelected(!1), c.SetSelected(!0)))
};
simcity.IsPlayingBoxBroken = function () {
if (simcity.gGlobalUIHandler.mRegionViewUIHandler && simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayingBox.uid) {
var a = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mBoxes[simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayingBox.uid].status;
return "BROKEN" === a || "CHEAT" === a
}
return !1
};
simcity.DebugMarkBoxBroken = function () {
simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mBoxes[simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayingBox.uid].status = "BROKEN"
};
simcity.DebugMarkBoxOffensive = function (a) {
simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mBoxes[a].offensive = "true"
};
simcity.RegionViewItem = {};
simcity.kRegionTradeOutgoingTokenPanelID = 239646136;
simcity.kRegionTradeIncomingTokenPanelID = 239644807;
simcity.kViewItemRefreshTime = 6E3 - 2 * Math.floor(1E3 * Math.random());
simcity.kUnclaimedCityPanelIDs = {
claimCityButton : 235820702,
UNOWNED_CITY_NAME : 227712046,
UNOWNED_CITY_DESCRIPTION : 230311473,
UNOWNED_CITY_POPULATION : 233315180,
UNOWNED_CITY_BACKDROP : 244634643,
CLAIM_CITY_BUTTON : 227712054,
INVITE_FRIENDS_BUTTON : 232122122,
PERCENT_BUILDABLE : 244655554,
RAIL_ICON : 244655183,
SHIP_ICON : 244655178,
RATE_RESIDENTIAL : 244655514,
RATE_WIND : 244655517,
RATE_WATER : 244655521,
RATE_OIL : 244655524,
RATE_ORE : 244655526,
RATE_COAL : 244655530
};
simcity.kViewStates = {
claimedGreatWork : 246399310,
claimedCity : 246399325,
unclaimedGreatWork : 246399319,
unclaimedCity : 246399331
};
simcity.kRegionViewGWStates = {
unselected : 241892870,
permit : 241892867,
constructionP1 : 241893046,
constructionP2 : 241893049,
operating : 241892879
};
simcity.kRegionViewItemControlIDs = {
selectedState : 246489309,
hoverState : 246389670,
defaultState : 232731904,
cityNameFieldDefault : 225802565,
cityNameFieldHover : 246552109,
cityNameFieldSelected : 246551998,
cityDescField : 246391408,
lastPlayedText : 246462054,
alertSelectedText : 246635742,
selectedAlertIconsContainer : 247076019,
avatarContainerDefault : 247752254,
avatarContainerHover : 247153112,
hoverAlertIconsContainer : 247760085,
alertHoverText : 247669308,
avatarContainerSelected : 243447774,
gwSubPanelContainer : 241992393,
zoomButton : 250094029,
citySpecHover : 252857463,
citySpecSelected : 252857506,
closeButton : 252071697,
inviteButton : 246461213,
unclaimedDefaultIcon : 255007960,
unclaimedHoverIcon : 255007968,
unclaimedSelectedIcon : 255008020
};
simcity.kRegionViewItemMouseSelectionStates = {
unselected : 246488981,
mouseOver : 246488993,
selected : 246489E3
};
simcity.kRegionViewItemImagePaths = {
REGION_WALL_ACTIVE : "GameEntry/icon-chat.png",
REGION_WALL_INACTIVE : "GameEntry/leftnav-icon-chat.png",
CLAIMED_USER_AVATAR_FRAME : "GameEntry/avatarFrameOn.png",
RAIL_ON : "GameEntry/Play/CityResources-Icon-Rail-On.png",
RAIL_OFF : "GameEntry/Play/CityResources-Icon-Rail-Off.png",
SHIP_ON : "GameEntry/Play/CityResources-Icon-Ship-On.png",
SHIP_OFF : "GameEntry/Play/CityResources-Icon-Ship-Off.png"
};
simcity.cRegionViewItem = function (a) {
this.UIHandler = scrui.cUIHandler;
this.UIHandler();
this.mRefreshTimer = 0;
this.mRootLayout = a.mLayout;
this.mUnitRef = a.mUnitRef;
this.mRegionalBoxID = a.mRegionalBoxID;
this.mUnitID = a.mUnitID || 0;
this.mDataBinding = simcity.RegionViewGeneric;
this.mUnderConstruction = a.mUnderConstruction || !1;
this.mIsSelected = a.mIsSelected || !1;
this.mViewItemType = this.mViewUnitType = this.mMouseSelectionState = this.mCurrentState = null;
this.mIsDataLoaded = !1;
this.mDepthIndex = -1;
this.mBoxApiData = {
serverBoxID : 0,
regionalBoxID : 0,
boxName : "",
creatorID : 0,
isClaimed : !1,
unitRef : "0,0"
};
this.mControlCache = {
selectedStateLayer : null,
hoverStateLayer : null,
defaultStateLayer : null,
cityNameFieldDefault : null,
cityNameFieldHover : null,
cityNameFieldSelected : null,
cityDescField : null,
lastPlayedText : null,
alertSelectedText : null,
selectedAlertIconsContainer : null,
avatarContainerDefault : null,
avatarContainerSelected : null,
hoverAlertIconsContainer : null,
alertHoverText : null,
avatarContainerHover : null,
citySpecHover : null,
citySpecSelected : null,
subPanelContainer : null,
unclaimedDefaultIcon : null,
unclaimedHoverIcon : null,
unclaimedSelectedIcon : null
};
this.mCacheDirty = !0;
this.mDataCache = {
boxName : "",
boxCreator : {},
boxType : null
};
this.mRefLayoutsTargetControl = null;
this.mRefLayoutsTargetControlID = 246399331;
this.mDefaultData = this.mActiveLayout = null;
this.mViewItemLayers = {
unclaimedCity : "Layouts/Region/RegionBoxUnclaimedNamePlate.js",
claimedCity : "Layouts/Region/RegionBoxNamePlate.js",
unclaimedGW : "Layouts/Region/RegionGreatWorksUnclaimedNamePlate.js",
claimedGW : "Layouts/Region/RegionGreatWorksClaimedNamePlate.js"
}
};
var kAbandonedCityIcon = "Region_CityAbandoned.png";
goog.inherits(simcity.cRegionViewItem, scrui.cUIHandler);
simcity.cRegionViewItem.prototype.Init = function () {
this.mRefLayoutsTargetControl = this.mRootLayout.FindControlByID(this.mRefLayoutsTargetControlID);
this.PreloadData()
};
simcity.cRegionViewItem.prototype.SetMouseSelectionState = function (a) {
null !== this.mControlCache.hoverStateLayer && (this.mControlCache.hoverStateLayer.SetVisibility(a == simcity.kRegionViewItemMouseSelectionStates.mouseOver), this.mControlCache.defaultStateLayer.SetVisibility(a == simcity.kRegionViewItemMouseSelectionStates.unselected), this.mControlCache.selectedStateLayer.SetVisibility(a == simcity.kRegionViewItemMouseSelectionStates.selected), this.mMouseSelectionState = a, this.mMouseSelectionState === simcity.kRegionViewItemMouseSelectionStates.selected ?
(this.mIsSelected = !0, simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mViewingBox = simcity.gGlobalUIHandler.mAPIServerDataUIHandler.GetBoxByBoxUID(this.mRegionalBoxID)) : (this.mIsSelected = !1, simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mViewingBox = null))
};
simcity.cRegionViewItem.prototype.PreloadData = function () {
function a() {
setTimeout(function () {
b.PreloadData()
}, 500)
}
var b = this;
if (this.mCacheDirty) {
var c = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mRegionUnitsLookup[this.mRegionalBoxID];
if (c && this.mRegionalBoxID && simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCityDefaultData)
this.mCacheDirty = !1, this.mViewItemType = c.type, this.mDefaultData = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCityDefaultData.cities[this.mRegionalBoxID];
else
return a()
}
if ("city" == this.mViewItemType)
if (this.mIsDataLoaded)
this.SetAndCacheViewItemState(simcity.kRegionViewItemControlIDs.defaultState);
else
return this.LoadBoxAPIData(), a();
else
"greatwork" == this.mViewItemType && (this.mIsDataLoaded = !0, this.SetAndCacheViewItemState(simcity.kRegionViewItemControlIDs.defaultState), this.UpdateView_GreatWork())
};
simcity.cRegionViewItem.prototype.Update = scrui.Client_ProfZone("RegionViewItemUpdate", function (a) {
var b = this;
this.mRefreshTimer -= a;
0 >= this.mRefreshTimer && this.mIsDataLoaded && (this.mRefreshTimer = simcity.kViewItemRefreshTime, this.mActiveLayout && (a = [scrui.BuildRequestQuery([simcity.kDataUnits, this.mUnitRef, simcity.kDataPropKey])], scrui.RequestGameData(a, function (a) {
a[0] && a[0].instance && (b.mUnitID = a[0].instance, b.mDataBinding.update(b), "city" == b.mViewItemType ? b.UpdateView_City() : "greatwork" == b.mViewItemType &&
b.UpdateView_GreatWork(b.mRegionalBoxID))
})))
});
simcity.cRegionViewItem.prototype.SetAndCacheViewItemState = function (a) {
if (null == this.mCurrentState || a && a !== this.mCurrentState)
this.mRefLayoutsTargetControl.DestroyChildren(), "city" == this.mViewItemType && (this.mActiveLayout = this.mBoxApiData.isClaimed ? gUIManager.LoadAndCacheLayout(this.mViewItemLayers.claimedCity, this.mRefLayoutsTargetControl) : gUIManager.LoadAndCacheLayout(this.mViewItemLayers.unclaimedCity, this.mRefLayoutsTargetControl)), "greatwork" == this.mViewItemType && (this.mActiveLayout = gUIManager.LoadAndCacheLayout(this.mViewItemLayers.unclaimedGW,
this.mRefLayoutsTargetControl)), this.mControlCache.selectedStateLayer = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.selectedState), this.mControlCache.hoverStateLayer = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.hoverState), this.mControlCache.defaultStateLayer = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.defaultState), this.mControlCache.cityNameFieldDefault = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.cityNameFieldDefault),
this.mControlCache.cityNameFieldSelected = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.cityNameFieldSelected), this.mControlCache.cityNameFieldHover = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.cityNameFieldHover), this.mControlCache.lastPlayedText = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.lastPlayedText), this.mControlCache.alertSelectedText = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.alertSelectedText),
this.mControlCache.selectedAlertIconsContainer = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.selectedAlertIconsContainer), this.mControlCache.hoverAlertIconsContainer = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.hoverAlertIconsContainer), this.mControlCache.alertHoverText = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.alertHoverText), this.mControlCache.avatarContainerDefault = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.avatarContainerDefault),
this.mControlCache.avatarContainerSelected = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.avatarContainerSelected), this.mControlCache.avatarContainerHover = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.avatarContainerHover), this.mControlCache.zoomButton = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.zoomButton), this.mControlCache.closeButton = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.closeButton), this.mControlCache.citySpecHover =
this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.citySpecHover), this.mControlCache.citySpecSelected = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.citySpecSelected), this.mControlCache.selectedAlertBackground = this.mActiveLayout.FindControlByID(253983693), this.mControlCache.hoverAlertBackground = this.mActiveLayout.FindControlByID(253983845), this.mControlCache.unclaimedDefaultIcon = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.unclaimedDefaultIcon),
this.mControlCache.unclaimedHoverIcon = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.unclaimedHoverIcon), this.mControlCache.unclaimedSelectedIcon = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.unclaimedSelectedIcon), "greatwork" == this.mViewItemType && (this.mControlCache.subPanelContainer = this.mActiveLayout.FindControlByID(simcity.kRegionViewItemControlIDs.gwSubPanelContainer)), this.mCurrentState = a
};
simcity.cRegionViewItem.prototype.LoadBoxAPIData = function () {
var a = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mBoxes[this.mRegionalBoxID];
if (this.mBoxData = a)
this.mBoxApiData = {
serverBoxID : a.id,
regionalBoxID : a.uid,
boxName : a.name,
creatorID : a.creatorId,
isClaimed : "true" == a.isClaimed ? !0 : !1,
unitRef : a.unitRef,
status : a.status,
offensive : a.offensive
},
this.mIsDataLoaded = !0
};
simcity.cRegionViewItem.prototype.UpdateView_City = function () {
this.LoadBoxAPIData();
if (this.mBoxApiData.isClaimed) {
var a = this.mBoxApiData.boxName;
null !== this.mControlCache.cityNameFieldDefault && (this.mControlCache.cityNameFieldDefault.SetRawText(a || " "), this.mControlCache.cityNameFieldSelected.SetRawText(a || " "), this.mControlCache.cityNameFieldHover.SetRawText(a || " "), this.mActiveLayout.FindControlByID(158166954) || (a = this.mCurrentState, this.mCurrentState = null, this.SetAndCacheViewItemState(a)), "ACTIVE" !==
this.mBoxApiData.status ? (this.mActiveLayout.FindControlByID(252426255).SetVisibility(!0), this.mActiveLayout.FindControlByID(255199553).SetVisibility(!1)) : (this.mBoxApiData.creatorID == simcity.gGlobalUIHandler.mUserId && this.mActiveLayout.FindControlByID(246462065).SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0e9d1b75", "Load")), this.mBoxApiData.regionalBoxID == simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayingBox.uid && this.mActiveLayout.FindControlByID(235774183).SetVisibility(!1),
"true" == this.mBoxApiData.offensive && this.mBoxApiData.creatorID != simcity.gGlobalUIHandler.mUserId && this.mActiveLayout.FindControlByID(235774183).SetVisibility(!1)), this.mBoxApiData.regionalBoxID && (this.mActiveLayout.FindControlByID(158166954) && simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCityTradeData[this.mBoxApiData.regionalBoxID].localData) && (this.mActiveLayout.FindControlByID(158166954).SetTextFromNumber(simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCityTradeData[this.mBoxApiData.regionalBoxID].localData.data.budget),
this.mActiveLayout.FindControlByID(158773667).SetTextFromNumber(simcity.GetFudgedPopulation(simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCityTradeData[this.mBoxApiData.regionalBoxID].localData.data.population))), (this.mBoxApiData.creatorID || simcity.IsMainTutorialInProgress()) && (simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayers[this.mBoxApiData.creatorID] && this.mActiveLayout.FindControlByID(230895427)) && this.mActiveLayout.FindControlByID(230895427).SetRawText(simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayers[this.mBoxApiData.creatorID].screenName),
(a = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mBoxes[this.mBoxApiData.regionalBoxID]) ? (a = simcity.gUIToolbox.PrettyDateUtcMs(a.updated), this.mControlCache.lastPlayedText.SetRawText(a)) : this.mControlCache.lastPlayedText.SetRawText(""), this.HandleAlertTextAndIcons(), this.SetupAvatar(this.mControlCache.avatarContainerDefault, this.mBoxApiData, "default"), this.SetupAvatar(this.mControlCache.avatarContainerSelected, this.mBoxApiData, "selected"), this.SetupAvatar(this.mControlCache.avatarContainerHover,
this.mBoxApiData, "hover"), a = simcity.gGlobalUIHandler.mBoundaryUIHandler.GetCitySpecialization(Number(this.mBoxApiData.regionalBoxID)), this.mControlCache.citySpecHover.SetWindowImage(simcity.cBoundaryUIHandler.kCitySpecializationIcons[a]), this.mControlCache.citySpecSelected.SetWindowImage(simcity.cBoundaryUIHandler.kCitySpecializationIcons[a]))
} else if (this.mRegionalBoxID || !this.mRegionData.mCityDefaultData) {
var b = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCityDefaultData.cities[this.mRegionalBoxID];
b && this.mActiveLayout && (a = scrui.ParseLocaleString(b.cityName), b = scrui.ParseLocaleString(b.cityDescription), simcity.gGlobalUIHandler.mIsDemo && 1026 === this.mRegionalBoxID && this.mActiveLayout.FindControlByID(simcity.kUnclaimedCityPanelIDs.claimCityButton).SetVisibility(!1), null !== this.mControlCache.cityNameFieldDefault && (this.mControlCache.cityNameFieldDefault.SetLocaleText(a), this.mControlCache.cityNameFieldSelected.SetLocaleText(a), this.mControlCache.cityNameFieldHover.SetLocaleText(a), this.IsBoxAbandoned(this.mRegionalBoxID) &&
(this.mControlCache.unclaimedDefaultIcon.SetWindowImage(kAbandonedCityIcon), this.mControlCache.unclaimedHoverIcon.SetWindowImage(kAbandonedCityIcon), this.mControlCache.unclaimedSelectedIcon.SetWindowImage(kAbandonedCityIcon)), (a = this.mActiveLayout.FindControlByID(241277033)) && a.SetLocaleText(b)), this.ShowRatingsOverlay())
}
};
simcity.cRegionViewItem.prototype.UpdateView_GreatWork = function (a) {
this.HandleGreatWorksRegionViewItemText(a)
};
simcity.cRegionViewItem.prototype.HandleAlertTextAndIcons = function () {
this.DetermineAlertText();
this.mBoxApiData.regionalBoxID != simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayingBox.uid && (simcity.gGlobalUIHandler.mAvatarManagerHandler.AddAlertIcons(this.mBoxApiData.regionalBoxID, this.mControlCache.selectedAlertIconsContainer, this.mControlCache.selectedAlertBackground), simcity.gGlobalUIHandler.mAvatarManagerHandler.AddAlertIcons(this.mBoxApiData.regionalBoxID, this.mControlCache.hoverAlertIconsContainer,
this.mControlCache.hoverAlertBackground))
};
simcity.cRegionViewItem.prototype.DetermineAlertText = function () {
var a = this.mBoxApiData.regionalBoxID,
b = this.mControlCache.alertSelectedText,
c = this.mControlCache.alertHoverText;
b.SetTextColor("rgb(0,150,0)");
c.SetTextColor("rgb(0,150,0)");
if (a != simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayingBox.uid) {
b.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0ef414f0", "Doing O.K."));
c.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0ef414f0", "Doing O.K."));
for (var d = {
greatworkDatabinding : simcity.kRegionDataLayers.greatwork,
utilDatabinding : simcity.kRegionDataLayers.utilities,
servicesDatabinding : simcity.kRegionDataLayers.services,
commuterDatabinding : simcity.kRegionDataLayers.commuters,
giftingDatabinding : simcity.kRegionDataLayers.gifting,
transportDatabinding : simcity.kRegionDataLayers.transport
}, e = Object.keys(d), f = 0, g = e.length; f < g; f++)
for (var h = d[e[f]], i = h.layers.length, j = 0; j < i; j++) {
var k = h.layers[j];
if ("greatworkDatabinding" != e[f] && (k = simcity.gGlobalUIHandler.mAvatarManagerHandler.GetNeedText(a,
k.key))) {
b.SetTextColor("rgb(200,0,0)");
c.SetTextColor("rgb(200,0,0)");
b.SetLocaleText(k);
c.SetLocaleText(k);
return
}
}
} else
b.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0e1258ef", "Working")), c.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0e1258ef", "Working"))
};
simcity.cRegionViewItem.prototype.SetupAvatar = function (a, b, c) {
a = {
playerID : b.creatorID,
layoutInfo : a,
isBoxClaimed : b.isClaimed,
isMyBox : simcity.gGlobalUIHandler.mRegionViewUIHandler.IsOwnCity(b.regionalBoxID),
isCurrentBox : !1,
showAlerts : !1,
group : c + "RegionViewItem" + b.regionalBoxID,
serverBoxID : b.serverBoxID,
boxID : b.regionalBoxID
};
simcity.gGlobalUIHandler.mAvatarManagerHandler.AddSubscription(a)
};
simcity.cRegionViewItem.prototype.ShowRatingsOverlay = function () {
if (this.mActiveLayout) {
var a = this.mActiveLayout.FindControlByID(250083618),
b = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCityDefaultData.cities[this.mRegionalBoxID];
simcity.gUIToolbox.ToBoolean(b.rail) ? a.FindControlByID(simcity.kUnclaimedCityPanelIDs.RAIL_ICON).SetWindowImage(simcity.kRegionViewItemImagePaths.RAIL_ON) : a.FindControlByID(simcity.kUnclaimedCityPanelIDs.RAIL_ICON).SetWindowImage(simcity.kRegionViewItemImagePaths.RAIL_OFF);
simcity.gUIToolbox.ToBoolean(b.shipping) ? a.FindControlByID(simcity.kUnclaimedCityPanelIDs.SHIP_ICON).SetWindowImage(simcity.kRegionViewItemImagePaths.SHIP_ON) : a.FindControlByID(simcity.kUnclaimedCityPanelIDs.SHIP_ICON).SetWindowImage(simcity.kRegionViewItemImagePaths.SHIP_OFF);
this.SetRatingsImage(b.residentialDesirability, a, "RATE_RESIDENTIAL");
this.SetRatingsImage(b.wind, a, "RATE_WIND");
this.SetRatingsImage(b.water, a, "RATE_WATER");
this.SetRatingsImage(b.crudeOil, a, "RATE_OIL");
this.SetRatingsImage(b.rawOre,
a, "RATE_ORE");
this.SetRatingsImage(b.coal, a, "RATE_COAL")
}
};
simcity.cRegionViewItem.prototype.SetRatingsImage = function (a, b, c) {
var d = null;
if (a && b && c) {
switch (a) {
case "3":
d = "Graphics/GameEntry/Play/CityResources-Rating-3.png";
break;
case "2":
d = "Graphics/GameEntry/Play/CityResources-Rating-2.png";
break;
case "1":
d = "Graphics/GameEntry/Play/CityResources-Rating-1.png";
break;
case "0":
d = "Graphics/GameEntry/Play/CityResources-Rating-0.png";
break;
default:
d = "Graphics/GameEntry/Play/CityResources-Rating-0.png"
}
(a = b.FindControlByID(simcity.kUnclaimedCityPanelIDs[c])) && a.SetWindowImage(d)
}
};
simcity.cRegionViewItem.prototype.HandleGreatWorksRegionViewItemText = function (a) {
var b = this.mControlCache.cityNameFieldHover,
c = this.mControlCache.cityNameFieldSelected,
d = this.mActiveLayout.FindControlByID(250357829),
e = this.mActiveLayout.FindControlByID(250352716);
d.SetVisibility(!0);
e.SetVisibility(!0);
var f = simcity.gGlobalUIHandler.mRegionViewUIHandler.GetConnectedGWID();
if (!f || a != f)
a != f && (d.SetVisibility(!1), e.SetVisibility(!1), b.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0f07bfe5",
"Great Works")), c.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0f07bfe5", "Great Works")));
else if (f = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionViewItems[f].mUnitRef, a = simcity.gGlobalUIHandler.mRegionViewUIHandler.mGWLowerPanelUI.GetPhaseDetails()) {
var g = scrui.LocaleStringFromLocaleProperty(a.name);
b.SetLocaleText(g);
c.SetLocaleText(g);
e && d && (a.isSelected && 0 < a.isSelected.amount || a.greatWorksOperationalStage ? null !== a.greatWorksOperationalStage ? a.isOperating ? (e.SetLocaleText(new scrui.cLocaleString("RegionView.json",
"0x0e9d1acf", "operating")), d.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0e9d1acf", "operating"))) : null != a.enoughWorkers && 0 === a.enoughWorkers ? (e.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0ef15aa6", "needs workers")), d.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0ef15aa6", "needs workers"))) : null != a.powerOperational && 0 === a.powerOperational.amount ? (e.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0e125921", "needs power")), d.SetLocaleText(new scrui.cLocaleString("RegionView.json",
"0x0e125921", "needs power"))) : null != a.waterOperational && 0 === a.waterOperational.amount ? (e.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0e212f83", "needs water")), d.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0e212f83", "needs water"))) : null != a.closedByMission && 1 == a.closedByMission.amount && (e.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0ed1aac3", "stalled")), d.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0ed1aac3", "stalled"))) : a.constructionStage ?
(b = new scrui.cLocaleString("RegionView.json", "0x0e9d184f", "Phase " + a.constructionStage.amount + " of " + a.constructionStage.capacity), c = {
amount : a.constructionStage.amount,
total : a.constructionStage.capacity
}, e.SetLocaleText(b), e.UpdateLocaleText(c), d.SetLocaleText(b), d.UpdateLocaleText(c)) : (e.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0ed1a9ab", "waiting on permit")), d.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0ed1a9ab", "waiting on permit"))) : this.mUnitRef == f ? (e.SetLocaleText(new scrui.cLocaleString("RegionView.json",
"0x0eb1e492", "Build a great work")), d.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0eb1e492", "Build a great work"))) : (e.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0f0fa650", "GW outside your cluster")), d.SetLocaleText(new scrui.cLocaleString("RegionView.json", "0x0f0fa650", "GW outside your cluster"))))
}
};
simcity.cRegionViewItem.prototype.IsBoxAbandoned = function (a) {
return (a = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mBoxes[a]) ? "true" == a.abandoned : !1
};
simcity.RegionViewUI = {};
simcity.kBtnReturnToCity = 218562830;
simcity.kRegionView_CityNameText = 225802565;
simcity.kRegionView_UserNameText = 226095096;
simcity.kRegionView_AvatarPortrait = 226095099;
simcity.kRegionView_BoxNamePlate = 231598340;
simcity.kRegionView_UnclaimedBoxNamePlate = 232731904;
simcity.kRegionView_ViewCityButton = 250094029;
simcity.kRegionView_BtnCloseViewItem = 252071697;
simcity.kRegionView_Region2DMapContainer = 234715398;
simcity.kRegionView_DataLayerButton = 243622211;
simcity.kRegionView_DataLayerButtonOn = 243623003;
simcity.kRegionView_DataLayerButtonIconNormal = 164725874;
simcity.kRegionView_DataLayerButtonIconNormalOn = 227699592;
simcity.kRegionView_DataLayerButtonIconOpportunity = 215602420;
simcity.kRegionView_DataLayerWindowNeedExistsAnim = 245953381;
simcity.kRegionView_DataLayerButtonIconCritical = 215602425;
simcity.kRegionView_DataLayerButtonAnimTradeOpportunity = 219781060;
simcity.kRegionView_AvatarContainerWindow = 243442179;
simcity.kRegionView_AvatarContainerLowerWindow = 243447774;
simcity.kRegionView_DataLayerToggleOffButton = 231259684;
simcity.kRegionView_DataLayerWeathHideButtonAnim = 245429781;
simcity.kRegionView_RegionalBudgetText = 225479831;
simcity.kRegionView_RegionalPopulationText = 225479834;
simcity.kRegionView_GreatWorksChooserParent = 227633383;
simcity.kRegionView_GreatWorksResourcesContainer = 231802349;
simcity.kRegionView_GreatWorksChooserContainer = 227633381;
simcity.kRegionView_GreatWorksChooserCloseButton = 227641527;
simcity.kRegionView_GreatWorksChooserButton = 241884925;
simcity.kRegionView_GreatWorksResourceText = 227703106;
simcity.kRegionView_GreatWorksResourceProgressBar = 227703110;
simcity.kRegionView_GreatWorksResourceHitBox = 227968109;
simcity.kRegionView_GreatWorksUnclaimedNameplate = 231587612;
simcity.kRegionView_GreatWorksClaimedNameplate = 231606597;
simcity.kRegionview_GreatWroksUILowerContainer = 248180702;
simcity.kRegionView_BoxNameTextField = 225802565;
simcity.kRegionView_GreatWorkNameField = 231796660;
simcity.kRegionView_ConstructionStatusText = 231796651;
simcity.kRegionView_ConstructionStatusTextRed = 232538548;
simcity.kRegionView_LaunchSatelliteButton = 234650417;
simcity.kRegionView_LaunchSatelliteOKButton = 234651022;
simcity.kRegionView_BuildSatelliteButton = 241718977;
simcity.kRegionView_HomeBoxCityName = 243527088;
simcity.kRegionView_HomeBoxAvatar = 243530043;
simcity.kRegionView_HomeBoxCitySpecialization = 244132854;
simcity.kRegionView_HomeBoxBudget = 244132655;
simcity.kRegionView_HomeBoxPopulation = 244132657;
simcity.kRegionView_HomeBoxButton = 244559969;
simcity.kRegionView_LegendCloseButton = 246810102;
simcity.kRegionView_GreatWorksPrerequisiteParent = 227885861;
simcity.kRegionView_GreatWorksPrerequisiteContainer = 227886156;
simcity.kRegionView_GreatWorksPrerequisiteText = 227911178;
simcity.kRegionView_IntroductionDialogButton = 228252202;
simcity.kRegionView_LowerPanelSelfCity = 235061844;
simcity.kRegionView_LowerPanelFriendCity = 235059129;
simcity.kRegionView_LowerPanelUnclaimedCity = 235820907;
simcity.kRegionView_LowerPanelGreatWork = 235059279;
simcity.kLowerPanelStates = [simcity.kRegionView_LowerPanelSelfCity, simcity.kRegionView_LowerPanelFriendCity, simcity.kRegionView_LowerPanelUnclaimedCity, simcity.kRegionView_LowerPanelGreatWork];
simcity.kRegionView_LowerPanelCloseButton = 250601676;
simcity.kRegionView_LowerPanelIDs = {
mCityPanels : {
mCityNameText : 230894814,
mCityNameDesc : 241277033,
mCreatorNameText : 230895427,
mAvatarWindow : 231332822,
mImportingText : 236033545,
mExportingText : 236033486,
mBudgetText : 158166954,
mPopulationText : 158773667
}
};
simcity.kRegionView_MapToolTip_Container = 235599011;
simcity.kRegionView_MapToolTip_BoxName = 235599035;
simcity.kRegionView_MapToolTip_PlayerName = 235599038;
simcity.kRegionView_MapToolTip_Avatar = 235599032;
simcity.kRegionView_ContextPanelAnim = 236380019;
simcity.kRegionView_ContextPanelContainer = 236383413;
simcity.kGWCompleteOKButton = 231523245;
simcity.kGWPostCompleteOKButton = 232626346;
simcity.kWinLegendContainer = 235169418;
simcity.kWinTradeUI_ImportIconsContainer = 236015426;
simcity.kWinTradeUI_ExportIconsContainer = 236015423;
simcity.kWinTradeUI_VisitedTodayText = 232653395;
simcity.kWinTradeUI_LeftTodayText = 232653398;
simcity.kWinTradeUI_ImportingText = 224861873;
simcity.kWinTradeUI_ExportingText = 212592636;
simcity.kWinTradeUI_ImportingIcon = 212592634;
simcity.kWinTradeUI_ExportingIcon = 224855208;
simcity.kWinTradeUI_Tooltip = 243708346;
simcity.kWinTradeUI_IncreaseButton = 224854884;
simcity.kWinTradeUI_DecreaseButton = 224854887;
simcity.kWinTradeUI_DecreaseButton = 224854887;
simcity.kWinTradeUI_ToggleIncomingButton = 225310131;
simcity.kWinTradeUI_ToggleDebugButton = 224872493;
simcity.kWinTradeUI_CheatConnectionButton = 224958037;
simcity.kWinTradeUI_ToggleAdvancedModeButton = 225306938;
simcity.kWinTradeUI_TokenButton = 234973153;
simcity.kWinTradeUI_TokenBackground = 234973154;
simcity.kPropSpaceCenter_N = 4260807725;
simcity.kPropSpaceCenter_4U = 1040446595;
simcity.kPropSpaceCenterSatellite_U = 971803745;
simcity.kPropSpaceCenterSatellite_N = 971803770;
simcity.kPropTrading_MapHandler = 4257293625;
simcity.kTradeTypeNormal = 0;
simcity.kTradeTypePending = 1;
simcity.kTradeTypeBidirectional = 2;
simcity.kTradeTypePendingBidirectional = 3;
simcity.kMissionResources = [simcity.kResourceIDMissionResource1, simcity.kResourceIDMissionResource2, simcity.kResourceIDMissionResource3, simcity.kResourceIDMissionResource4, simcity.kResourceIDMissionResource5, simcity.kResourceIDMissionResource6, simcity.kResourceIDMissionResource7, simcity.kResourceIDMissionResource8];
simcity.kMissionLocalResources = [simcity.kResourceIDLocalMissionResource1, simcity.kResourceIDLocalMissionResource2, simcity.kResourceIDLocalMissionResource3, simcity.kResourceIDLocalMissionResource4, simcity.kResourceIDLocalMissionResource5, simcity.kResourceIDLocalMissionResource6, simcity.kResourceIDLocalMissionResource7, simcity.kResourceIDLocalMissionResource8];
simcity.kReturnToCityCommand = scrui.BuildCommand([simcity.kDataToolMessage, scrui.IDFromName("returntocity")]);
simcity.kRegionViewUpdateTimeMS = 1E3;
simcity.kRegionViewDataUpdateTimeMS = 3E3;
simcity.kRegionViewUpdateTimeInCityMS = 6E4;
simcity.RegionUnit = function (a) {
return {
localUnitRef : a.localUnitRef || null,
regionalUnitRef : a.regionalUnitRef || null,
type : a.type || null
}
};
simcity.RegionUnitTypes = {
CITY : "city",
GREATWORK : "greatwork"
};
simcity.cRegionViewUIHandler = function () {
this.UIHandler = scrui.cUIHandler;
this.UIHandler();
this.mTimeSinceLastDataUpdate = this.mTimeSinceLastUpdate = 0;
this.mRegionViewItemsContainerWindow = this.mRootWindow = null;
this.mRegionViewItems = {};
this.mSortedItemsList = [];
this.mSelectedUnitRef = simcity.kInvalidUnitRef;
this.mSelectedUnitID = 0;
this.mGWCompleteDialog = this.mIntroductionDialog = this.mHighlightedGreatWorkResource = this.mHighlightedGreatWorkOption = this.mMousedOverRegionViewItem = this.mSelectedRegionViewItem =
null;
this.mGWToolTipSelected = !1;
this.mRegionMapData = this.mRegionMap = this.mLaunchDialog = this.mGWPostCompletionDialog = null;
this.mViewingTradeUnitRefList = [];
this.mActiveLowerPanel = this.mLowerPanelState = this.mViewingUnitRef = null;
this.mCurrTotalPlayers = 0;
this.allowViewCity = !0;
this.mContextPanelDataBinding = this.mContextPanelAnim = this.mWinExportIconsContainer = this.mWinImportIconsContainer = null;
this.mIsContextPanelActive = !1;
this.mSelectedDataControl = this.mSelectedDataLayerID = this.mCashGiftUI = this.mTradeUI =
this.mContextPanelObj = this.mContextPanelData = this.mContextPanelContainer = null;
this.mInitialDataUpdate = this.mTradeUnitsLoaded = this.mGreatWorkDataLoaded = this.mServerDataChanged = this.mShouldUpdateDataLayerContextPanel = !1;
this.mDataLayerButtonHideAnim = this.mRegionAdvisors = this.mGWLowerUIContainer = this.mRegionalPopulationText = this.mRegionalBudgetText = null;
this.mLayerButtons = [];
this.mIsLoadingBox = this.mIsClaimingBox = !1;
this.mLowerPanels = {
mPlayingCity : {
mControl : null,
mTextCityName : null,
mTextCreatorName : null,
mWindowAvatar : null,
mTextImporting : null,
mTextExporting : null,
mTextBudget : null,
mTextPopulation : null
},
mFriendCity : {
mControl : null,
mTextCityName : null,
mTextCreatorName : null,
mWindowAvatar : null,
mTextImporting : null,
mTextExporting : null,
mTextBudget : null,
mTextPopulation : null
},
mUnclaimedCity : {
mControl : null,
mTextCityName : null,
mTextCityDesc : null
},
mGreatWorks : {
mControl : null
}
};
this.mLowerPanelStateControls = [];
this.mRegionTradeUnitList = [];
this.mRegionData = {
mRegionName : "",
mRegionTypeName : "",
mCityDefaultData : null,
mMapData : {},
mBoxes : {},
mPlayers : {},
mCities : {},
mPlayingBox : {},
mViewingBox : {},
mGreatWorksLocal : {},
mGreatWorksRegional : {},
mConnectedUnits : {},
mConnectedGreatWorkUnitRef : null,
mRegionUnitsLookup : {},
mCityTradeData : {},
mTotals : {
players : 0,
cities : 0,
boxes : 0,
tradeUnits : 0
}
};
this.mDataLayerButtonSparkles = {};
this.mResourceUIKeyValidationObj = null;
this.mRequestedVisualizedDataUIKeys = {};
this.mChangedVisualizedData = {};
this.mRequestedTradeDataResourceUIKeys = null;
this.mInitialTradeDataRequestCompleted = !1
};
goog.inherits(simcity.cRegionViewUIHandler, scrui.cUIHandler);
simcity.cRegionViewUIHandler.DepthSort = function (a, b) {
return a.mLayout.mTop - b.mLayout.mTop
};
simcity.cRegionViewUIHandler.SetBoxDataFromServer = function (a, b) {
var c = b.GetBoxByRegionID(a.mRegionalBoxID),
d = a.mLayout.FindControlByID(simcity.kRegionView_CityNameText);
simcity.gGlobalUIHandler.mRegionViewUIHandler.ShowRegionMap(simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mMapData);
if (c) {
var e = c.name || "";
d.SetRawText(e, !0);
"true" == c.isClaimed ? (a.mLayout.FindControlByID(simcity.kRegionView_BoxNamePlate).SetVisibility(!0), a.mLayout.FindControlByID(simcity.kRegionView_UnclaimedBoxNamePlate).SetVisibility(!1),
a.mLayout.FindControlByID(233337247).SetRawText(e), d = a.mLayout.FindControlByID(simcity.kRegionView_AvatarContainerWindow), c = {
playerID : c.creatorId,
layoutInfo : d,
isBoxClaimed : "true",
isMyBox : simcity.gGlobalUIHandler.mRegionViewUIHandler.IsOwnCity(c.uid),
isCurrentBox : !1,
showAlerts : !1,
group : "regionView",
specialization : 0,
serverBoxID : c.id,
boxID : c.uid
}, simcity.gGlobalUIHandler.mAvatarManagerHandler.AddSubscription(c), a.pollServer = !1) : (a.mLayout.FindControlByID(simcity.kRegionView_BoxNamePlate).SetVisibility(!1),
a.mLayout.FindControlByID(simcity.kRegionView_UnclaimedBoxNamePlate).SetVisibility(!0), (c = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCityDefaultData) && d.SetLocaleText(scrui.ParseLocaleString(c.cities[a.mRegionalBoxID].cityName)))
} else
a.mLayout.FindControlByID(simcity.kRegionView_BoxNamePlate).SetVisibility(!1), a.mLayout.FindControlByID(simcity.kRegionView_UnclaimedBoxNamePlate).SetVisibility(!0), (c = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mCityDefaultData) && d.SetLocaleText(scrui.ParseLocaleString(c.cities[a.mRegionalBoxID].cityName))
};
simcity.cRegionViewUIHandler.prototype.Update = scrui.Client_ProfZone("cRegionViewUIHandler.Update", function (a) {
this.UpdateData(a);
this.UpdateVisuals(a)
});
simcity.cRegionViewUIHandler.prototype.UpdateData = scrui.Client_ProfZone("cRegionViewUIHandler.UpdateData", function (a) {
this.mTimeSinceLastDataUpdate += a;
var b = this,
a = this.IsVisible() ? simcity.kRegionViewDataUpdateTimeMS : simcity.kRegionViewUpdateTimeInCityMS;
if (this.mTimeSinceLastDataUpdate > a) {
b.mTimeSinceLastDataUpdate = 0;
this.UpdateRegionViewList();
for (var c = [], d = simcity.gGlobalUIHandler.mBorderUnitsList.length, a = 0; a < d; ++a)
c[a] = scrui.BuildRequestQuery(["units", simcity.gGlobalUIHandler.mBorderUnitsList[a],
"bins", simcity.kResourceRegionalBoxUniqueID]);
scrui.RequestGameData(c, function (a) {
for (var c = 0; c < d; c++) {
var e = a[c] || null;
e && (b.mRegionData.mConnectedUnits[e.amount.toString()] = simcity.gGlobalUIHandler.mBorderUnitsList[c])
}
});
c = simcity.gGlobalUIHandler.mAPIServerDataUIHandler;
c.isGameEntry = !1;
for (var a = 0, e = this.mRegionViewItems.length; a < e; ++a) {
var f = this.mRegionViewItems[a];
f.pollServer && simcity.cRegionViewUIHandler.SetBoxDataFromServer(f, c)
}
if (0 === b.mRegionData.mTotals.tradeUnits) {
for (var g in this.mRegionData.mBoxes)
scrui.RequestGameData([scrui.BuildRequestQuery(["RegionTradeUnits",
g])], function (a) {
var c = !1;
b.mRegionData.mCityTradeData.hasOwnProperty(g.toString()) || (b.mRegionData.mCityTradeData[g] = {
connections : {}
}, c = !0);
for (var d = 0, e = a.length; d < e; d++)
for (var f = a[d], m = 0, n = f.length; m < n; m++) {
var p = f[m];
b.mRegionData.mCityTradeData[g].connections[p.toCity] = {
connectionUnitRef : p.tradeUnitRef.slot + "," + p.tradeUnitRef.stamp
};
if (c) {
var q = g.toString(),
o = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData;
o.mRegionUnitsLookup.hasOwnProperty(q) ? o.mRegionUnitsLookup[q].regionalUnitRef =
scrui.RequestStringFromUnitRef(p.tradeUnitRef) : o.mRegionUnitsLookup[q] = new simcity.RegionUnit({
regionalUnitRef : scrui.RequestStringFromUnitRef(p.tradeUnitRef),
type : simcity.RegionUnitTypes.CITY
})
}
}
b.mRegionData.mTotals.tradeUnits++
});
this.mTradeUnitsLoaded = !0
}
this.UpdateGreatWorksResources();
this.UpdateRegionResourceData();
this.UpdateRegionGreatWorksResourceData();
this.UpdateRegionalAlerts();
this.UpdateHomeBox();
this.mSelectedDataControl && this.mShouldUpdateDataLayerContextPanel && (this.UpdateDataLayerContextPanel(),
this.mShouldUpdateDataLayerContextPanel = !1);
this.mServerDataChanged = !1
}
});
simcity.cRegionViewUIHandler.prototype.UpdateVisuals = scrui.Client_ProfZone("cRegionViewUIHandler.UpdateVisuals", function (a) {
if (this.IsVisible() && (this.DepthSortRegionViewItems(), this.mTimeSinceLastUpdate += a, this.mTimeSinceLastUpdate > simcity.kRegionViewUpdateTimeMS || this.mServerDataChanged))
this.mTimeSinceLastUpdate = 0, this.ShowLowerPanel(), this.UpdateRegionalInfoPanel(), this.UpdateGWUnlockSparkleChecker(), this.mGWLowerPanelUI.Update()
});
simcity.cRegionViewUIHandler.prototype.DepthSort = function (a, b) {
var c = a[2].mIsSelected,
d = b[2].mIsSelected;
return c !== d ? c < d ? -1 : 1 : a[1] - b[1]
};
simcity.cRegionViewUIHandler.prototype.DepthSortRegionViewItems = function () {
if (0 !== this.mRegionViewItems.length) {
for (var a = Object.keys(this.mRegionViewItems), b = a.length, c = Array(a.length), d = 0, e = a.length; d < e; ++d)
c[d] = scrui.BuildRequestQuery(["units", this.mRegionViewItems[a[d]].mUnitRef, "screenPositionTop"]);
var f = this;
scrui.RequestGameData(c, function (c) {
for (var d = 0, e = 0; d < b; ++e) {
var j = c[e],
k = f.mRegionViewItems[a[d]],
l = k.mRootLayout;
if (j) {
var m = f.mNewlyRolledOverBoxID ? f.mNewlyRolledOverBoxID : 0;
if (m || l.mScreenPos !==
j[0] + "x" + j[1]) {
l.mScreenPos = j[0] + "x" + j[1];
var n = j[0],
p = j[1],
q = !1;
m && m == k.mRegionalBoxID && (m = scrui.GetClientWidth(), -20 > n ? (n = -20, q = !0) : n + l.mWidth > m && (n -= n + l.mWidth - m, q = !0), f.mNewlyRolledOverBoxID = 0);
if (k.mActiveLayout) {
var m = k.mActiveLayout.FindControlByID(253895354),
o = k.mActiveLayout.FindControlByID(253895035);
m.SetVisibility(!0);
o.SetVisibility(!0);
q && (m.SetVisibility(!1), o.SetVisibility(!1))
}
l.SetPosition(n, p, l.mWidth, l.mHeight);
f.mSortedItemsList[d] = [j[0], j[1], k]
}
++d
} else
f.RemoveRegionViewItemAtIndex(d),
--b
}
if (f.mSortedItemsList && 1 < f.mSortedItemsList.length) {
f.mSortedItemsList.sort(f.DepthSort);
c = -1;
e = !1;
d = 0;
for (j = f.mSortedItemsList.length; d < j; ++d) {
k = f.mSortedItemsList[d][2];
if (k.mDepthIndex <= c) {
e = !0;
break
}
c = k.mDepthIndex
}
if (e) {
d = 0;
for (j = f.mSortedItemsList.length; d < j; ++d)
k = f.mSortedItemsList[d][2], k.mRootLayout.Reparent(f.mRegionViewItemsContainerWindow), k.mDepthIndex = d
}
}
})
}
};
simcity.cRegionViewUIHandler.prototype.HandleGameEvent = function (a, b) {
switch (a) {
case simcity.kGameMessageGreatWorksContributors:
this.RefreshGreatWorksData(b);
break;
case simcity.kGameMessageRegionUpdated:
this.mServerDataChanged = !0;
this.UpdateRegionResourceData();
break;
case simcity.kGameMessageHideSiteUI:
case simcity.kGameMessageHideRegionUI:
this.HideRegionUI();
break;
case simcity.kGameMessageShowRegionUI:
this.OnShowRegionUI(a, b);
break;
case simcity.kGameMessageShowSiteUI:
this.OnShowSiteUI(a, b);
break;
case simcity.kGameMessageRequestTradeData:
this.OnTradeDataRequestReceived(b);
break;
case simcity.kGameMessagePauseTradeDataRequest:
this.OnTradeDataRequestPaused();
break;
case simcity.kGameMessageRegionUnitRolledOver:
this.mMousedOverRegionViewItem && !this.mMousedOverRegionViewItem.mIsSelected && this.mMousedOverRegionViewItem.SetMouseSelectionState(simcity.kRegionViewItemMouseSelectionStates.unselected);
if (this.mMousedOverRegionViewItem = this.mRegionViewItems[b.regionBoxID])
this.mNewlyRolledOverBoxID = b.regionBoxID,
this.mMousedOverRegionViewItem.SetMouseSelectionState(simcity.kRegionViewItemMouseSelectionStates.mouseOver);
this.DepthSortRegionViewItems();
break;
case simcity.kGameMessageBarGraphRolledOff:
case simcity.kGameMessageRegionUnitRolledOff:
this.mMousedOverRegionViewItem && !this.mMousedOverRegionViewItem.mIsSelected && this.mMousedOverRegionViewItem.SetMouseSelectionState(simcity.kRegionViewItemMouseSelectionStates.unselected);
this.mNewlyRolledOverBoxID = 1;
this.DepthSortRegionViewItems();
break;
case simcity.kGameMessageRegionUnitSelected:
if (simcity.IsTutorialInProgress() &&
(simcity.gGlobalUIHandler.mTutorialCallout.mRegionBoxID && simcity.gGlobalUIHandler.mTutorialCallout.mRegionBoxID != b.regionBoxID || !this.allowViewCity))
break;
simcity.gEventManager.TriggerEvent(simcity.gEventTypes.GENERICEVENT, b.regionBoxID, null);
null !== this.mSelectedRegionViewItem && this.mSelectedRegionViewItem.SetMouseSelectionState(simcity.kRegionViewItemMouseSelectionStates.unselected);
if (this.mSelectedRegionViewItem = this.mRegionViewItems[b.regionBoxID])
this.mSelectedRegionViewItem.SetMouseSelectionState(simcity.kRegionViewItemMouseSelectionStates.selected),
this.HandlePossibleGWSelection();
this.mSelectedDataControl && this.UpdateDataLayerContextPanel();
break;
case simcity.kGameMessageRegionUnitDeselected:
if (this.mSelectedRegionViewItem && "greatwork" == this.mSelectedRegionViewItem.mViewUnitType)
break;
this.mSelectedRegionViewItem = null;
for (var c = Object.keys(this.mRegionViewItems), d = 0, e = c.length; d < e; d++)
this.mRegionViewItems[c[d]].SetMouseSelectionState(simcity.kRegionViewItemMouseSelectionStates.unselected);
this.mSelectedDataControl && this.UpdateDataLayerContextPanel();
break;
case simcity.kGameMessageZoomToCity:
this.ZoomToCity(b.regionBoxID || null);
break;
case simcity.kGameMessageRegionViewItemSelected:
this.OnRegionViewItemClicked();
break;
case simcity.kGameMessageRegionViewItemMouseOver:
this.OnRegionViewMouseOver(b);
break;
case simcity.kGameMessageRegionViewItemMouseOut:
this.OnRegionViewMouseOut(b);
break;
case simcity.kGameMessageUnitRuleUIEvent:
switch (b.eventID) {
case simcity.kEventIDShowLaunchButton:
this.ShowLaunchButton(b);
break;
case simcity.kEventIDSatelliteLaunched:
this.ShowLaunchConfirm();
break;
case simcity.kEventIDRegionWorksCompleted:
var c = b || {},
f = c.unitRef ? scrui.RequestStringFromUnitRef(c.unitRef) : null,
c = scrui.BuildRequestQuery(["units", f, "propKey"]),
d = simcity.gGlobalUIHandler.mReturnToCityButton;
d.SetSelected(!0);
simcity.gGlobalUIHandler.mToolPaletteUIHandler.HandleUIMessage(scrui.kMsgTypeButtonClicked, simcity.kBtnReturnToCity, d);
scrui.RequestGameData([c], function (a) {
a = a[0];
null !== f && simcity.gGlobalUIHandler.mRegionViewUIHandler.ShowGWCompletePanel(f, simcity.GreatWorksOptions[a.instance])
});
break;
case simcity.kEventIDStopFlyoverCamera:
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage, scrui.IDFromName("EndCinematic")])),
simcity.gGlobalUIHandler.mSharedUIParent.SetVisibility(!0),
simcity.gGlobalUIHandler.mRegionUIParent.SetVisibility(!0),
simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(null, !1),
simcity.gGlobalUIHandler.HandleGameEvent(simcity.kGameMessageShowGlobalUI)
}
break;
case simcity.kMessageKeyTrigger:
this.HandleTriggerKey(b.triggerCode)
}
};
simcity.cRegionViewUIHandler.prototype.ClosePalette = function () {
null !== this.mSelectedDataControl && (this.mSelectedDataControl.SetSelected(!1), this.mSelectedDataLayerID = this.mSelectedDataControl = null, simcity.gGlobalUIHandler.mLayerUIHandler.DeactivateLayer(), this.HideDataLayerContextPanel())
};
simcity.cRegionViewUIHandler.prototype.HandleUIMessage = function (a, b, c) {
switch (a) {
case scrui.kMsgTypeButtonClicked:
switch (b) {
case simcity.kRegionView_DataLayerButtonOn:
case simcity.kRegionView_DataLayerButton:
this.mGWLowerPanelUI.HideGreatWorksLowerPanel();
c && c.mIsSelected ? (this.CheckForClearingGWSparkle(c), this.mSelectedDataControl = c, this.mSelectedDataLayerID = c.mUserData, this.mSelectedDataLayerID == simcity.kRegionDataLayer_GreatWorks && this.ForceGWUnitSelected(), this.ShowDataLayerContextPanel()) : this.ClosePalette();
break;
case simcity.kRegionView_LowerPanelCloseButton:
this.ClosePalette();
break;
case simcity.kRegionView_LegendCloseButton:
case simcity.kRegionView_DataLayerToggleOffButton:
this.IsVisible() && this.ActivateLightDataLayer();
break;
case simcity.kBtnRegionCamera:
(a = gUIManager.FindControlByID(simcity.kBtnRegionCamera)) && a.SetSelected(!0);
break;
case simcity.kRegionView_HomeBoxButton:
this.IsVisible() && (!this.mSelectedRegionViewItem || !this.mRegionData.mViewingBox || this.mRegionData.mViewingBox.uid != this.mRegionData.mPlayingBox.uid) &&
this.ZoomToCity(this.mRegionData.mPlayingBox.uid);
break;
case simcity.kRegionView_GreatWorksChooserButton:
this.mGWLowerPanelUI.ChooseGreatWorks(this.GetSelectedViewItem(), c);
break;
case simcity.kRegionView_IntroductionDialogButton:
this.mIntroductionDialog && (this.mIntroductionDialog.DestroyControl(), this.mIntroductionDialog = null);
simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(null, !1);
break;
case simcity.kGWCompleteOKButton:
this.mGWCompleteDialog.DestroyControl();
simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID,
simcity.audio.kInstancePlayGreatWorkComplete);
this.ZoomToGreatWork(c.mUserData);
break;
case simcity.kGWPostCompleteOKButton:
null !== this.mGWPostCompletionDialog && (simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kInstanceUIGreatWorkClose), this.mGWPostCompletionDialog.DestroyControl(), this.mGWPostCompletionDialog = null);
break;
case simcity.kGWLowerPanelIDs.mOperatingPanel.mPowerOnButton:
case simcity.kGWLowerPanelIDs.mOperatingPanel.mPowerOffButton:
this.mGWLowerPanelUI.HandlePowerButtonToggle(c);
break;
case simcity.kRegionView_LaunchSatelliteButton:
this.LaunchSatellite(c);
break;
case simcity.kRegionView_LaunchSatelliteOKButton:
this.mLaunchDialog.DestroyControl();
break;
case simcity.kUnclaimedCityPanelIDs.claimCityButton:
var d = this;
c.SetEnabled(!1);
setTimeout(function () {
c.SetEnabled(!0);
d.mIsClaimingBox = !1
}, 3E4);
this.ClaimBox(c);
break;
case simcity.kRegionView_BuildSatelliteButton:
this.BuildSatellite(c);
break;
case 235696435:
(a = c.mUserData || null) && this.ZoomToCity(a);
break;
case 235774183:
d = this;
c.SetEnabled(!1);
setTimeout(function () {
c.SetEnabled(!0);
d.mIsLoadingBox = !1
}, 3E4);
null !== this.mSelectedRegionViewItem && this.allowViewCity && (this.mRegionData.mPlayingBox.id === this.mSelectedRegionViewItem.mBoxApiData.serverBoxID ? this.ReturnToPlayingCity() : this.LaunchCity(this.mSelectedRegionViewItem.mBoxApiData.serverBoxID));
break;
case simcity.kRegionView_ViewCityButton:
this.mSelectedRegionViewItem && this.ZoomToCity(this.mSelectedRegionViewItem.mRegionalBoxID);
break;
case simcity.kRegionView_BtnCloseViewItem:
null !==
this.mSelectedRegionViewItem && ("greatwork" == this.mSelectedRegionViewItem.mViewUnitType ? (this.mSelectedRegionViewItem.SetMouseSelectionState(simcity.kRegionViewItemMouseSelectionStates.unselected), null != this.mSelectedDataControl && this.mSelectedDataControl.SetSelected(!1), simcity.gGlobalUIHandler.mLayerUIHandler.DeactivateLayer(), this.HideDataLayerContextPanel(), this.mGWLowerPanelUI.HideGreatWorksLowerPanel(), this.mLowerPanelState = this.mViewingUnitRef = null) : this.HandleGameEvent(simcity.kGameMessageRegionUnitDeselected,
null));
break;
case simcity.kGWLowerPanelIDs.mButtons.mStartContrib:
case simcity.kGWLowerPanelIDs.mButtons.mStopContrib:
a = this.GetConnectedGWID();
if ((a = this.mRegionViewItems[a].mUnitRef) && c.mDatabinding)
c.mDatabinding.onItemClicked(a);
break;
case simcity.kRegionViewItemControlIDs.inviteButton:
a = gUIManager.FindControlByID(244120857),
a.regionData = {
name : simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mRegionName
},
a.inviteCallback = this.SendInvites,
simcity.gGameInvitesController.ShowInvitePanel(a)
}
break;
case scrui.kMsgTypeButtonGainFocus:
switch (b.controlID) {
case simcity.kRegionView_GreatWorksChooserButton:
this.mHighlightedGreatWorkOption = c.mUserData;
break;
case simcity.kRegionView_GreatWorksResourceHitBox:
this.mHighlightedGreatWorkResource = c.mUserData
}
break;
case scrui.kMsgTypeButtonLoseFocus:
switch (b.controlID) {
case simcity.kRegionView_GreatWorksResourceHitBox:
this.mHighlightedGreatWorkResource = null
}
break;
case simcity.kMsgTypeAPIServerDataUpdated:
this.PushPlayerListToClient(),
this.mInitialDataUpdate ||
(this.UpdateData(simcity.kRegionViewUpdateTimeInCityMS + 1), this.mInitialDataUpdate = !0, scrui.PostGameCommand(scrui.BuildCommand(["uiLoaded"])))
}
};
simcity.cRegionViewUIHandler.prototype.Init = function (a) {
this.mRootWindow = a;
this.mTradeUI = new simcity.cRegionTradeUIHandler;
gUIManager.RegisterUIHandler(this.mTradeUI);
this.mGWLowerPanelUI = new simcity.cGreatWorksLowerPanelUI;
this.mGWLowerPanelUI.Init(this);
this.mRegionViewItemsContainerWindow = this.mRootWindow.FindControlByID(225802340);
this.mWinImportIconsContainer = this.mRootWindow.FindControlByID(simcity.kWinTradeUI_ImportIconsContainer);
this.mWinExportIconsContainer = this.mRootWindow.FindControlByID(simcity.kWinTradeUI_ExportIconsContainer);
this.mContextPanelAnim = this.mRootWindow.FindAnimationByID(simcity.kRegionView_ContextPanelAnim);
this.mContextPanelContainer = this.mRootWindow.FindControlByID(simcity.kRegionView_ContextPanelContainer);
this.mGWLowerUIContainer = this.mRootWindow.FindControlByID(simcity.kRegionview_GreatWroksUILowerContainer);
this.mRegionalBudgetText = this.mRootWindow.FindControlByID(simcity.kRegionView_RegionalBudgetText);
this.mRegionalPopulationText = this.mRootWindow.FindControlByID(simcity.kRegionView_RegionalPopulationText);
this.mDataLayerButtonHideAnim = this.mRootWindow.FindAnimationByID(simcity.kRegionView_DataLayerWeathHideButtonAnim);
this.mRegionAdvisors = new simcity.cRegionAdvisors;
this.mRegionAdvisors.Init(a);
this.allowViewCity = !0;
this.mDataLayerButtons = {};
this.mResourceUIKeyValidationObj = simcity.CreateResourceKeysValidationObject();
this.CollectRequestedVisualizedDataUIKeys()
};
simcity.cRegionViewUIHandler.prototype.PreloadData = function () {
var a = this,
b = [],
c = [],
d = scrui.BuildRequestQuery(["regionViewUnits"]);
scrui.RequestGameData([d], function (a) {
for (var a = a[0], d = 0, g = a.length; d < g; ++d)
c.push(scrui.RequestStringFromUnitRef(a[d])), b.push(scrui.BuildRequestQuery([simcity.kDataUnits, c[d], simcity.kDataBins, simcity.kResourceRegionalBoxUniqueID]))
});
scrui.RequestGameData(b, function (b) {
for (var d = 0, g = c.length; d < g; ++d) {
var h = c[d];
if (b[d]) {
var i = b[d].amount,
j = gUIManager.LoadAndCacheLayout("Layouts/Region/RegionViewItem.js",
a.mRegionViewItemsContainerWindow),
h = new simcity.cRegionViewItem({
mLayout : j,
mUnitRef : h,
mRegionalBoxID : i,
mDataBinding : simcity.RegionViewGeneric
});
gUIManager.RegisterUIHandler(h);
h.Init();
a.mRegionViewItems[i] = h
}
}
a.ShowDataLayerButtons();
a.LoadTradeIcons()
})
};
simcity.cRegionViewUIHandler.prototype.Shutdown = function () {
this.RunOnExitBoxRules()
};
simcity.cRegionViewUIHandler.prototype.UpdatePrerequisitesPopup = function () {
if (this.mSelectedRegionViewItem) {
var a = this.mSelectedRegionViewItem.mRootLayout.FindControlByID(simcity.kRegionView_GreatWorksPrerequisiteParent);
if (null !== this.mHighlightedGreatWorkOption) {
var b = simcity.GreatWorksUpgradeOptions[this.mSelectedUnitID][this.mHighlightedGreatWorkOption],
c = b.hasOwnProperty("mPrerequisiteFailedList") ? b.mPrerequisiteFailedList.length : 0;
a.SetVisibility(0 < c);
if (0 < c) {
var d = this.mSelectedRegionViewItem.mRootLayout.FindControlByID(simcity.kRegionView_GreatWorksPrerequisiteContainer);
d.DestroyChildren();
for (var e = 0, f = 0; f < c; ++f) {
var g = gUIManager.LoadAndCacheLayout("Layouts/Region/GreatWorksPrerequisite.js", d);
g.SetPosition(0, g.mHeight * f);
e += g.mHeight;
g.FindControlByID(simcity.kRegionView_GreatWorksPrerequisiteText).SetLocaleText(b.mPrerequisiteFailedList[f])
}
a.SetHeight(a.mHeight + e - d.mHeight)
}
} else
a && a.SetVisibility(!1)
}
};
simcity.cRegionViewUIHandler.prototype.GetCityButton = function (a, b) {
var c = this.mRegionViewItems[b];
if (c) {
var d = c.mActiveLayout.FindControlByID(a);
return d ? d : c.mActiveLayout
}
};
simcity.cRegionViewUIHandler.prototype.HideDataLayerButtons = function (a) {
if (this.mDataLayerButtonHideAnim)
if (a) {
for (var a = Object.keys(this.mDataLayerButtons), b = 0, c = a.length; b < c; b++)
this.mDataLayerButtons[a[b]].FindControlByID(simcity.kRegionView_DataLayerButton).SetSelected(!1);
this.mSelectedDataControl = null;
simcity.gGlobalUIHandler.mLayerUIHandler.DeactivateLayer();
this.HideDataLayerContextPanel();
this.mDataLayerButtonHideAnim.Start(scrui.cAnimation.kPlayForward)
} else
this.mDataLayerButtonHideAnim.Start(scrui.cAnimation.kPlayReverse)
};
simcity.cRegionViewUIHandler.prototype.UpdateRegionViewList = function () {
var a = this,
b = [],
c = [],
d = scrui.BuildRequestQuery(["regionViewUnits"]);
scrui.RequestGameData([d], function (a) {
for (var a = a[0], d = 0, g = a.length; d < g; ++d)
c.push(scrui.RequestStringFromUnitRef(a[d])), b.push(scrui.BuildRequestQuery([simcity.kDataUnits, c[d], simcity.kDataBins, simcity.kResourceRegionalBoxUniqueID]))
});
scrui.RequestGameData(b, function (b) {
for (var d = 0, g = c.length; d < g; ++d) {
a.mRegionData.mGreatWorksLocal = [];
g = b;
d = 0;
for (g = g.length; d <
g; ++d) {
var h = c[d];
if (b[d]) {
var i = b[d].amount;
if (null == a.mRegionViewItems[i] && !a.mRegionViewItems[i]) {
var j = gUIManager.LoadAndCacheLayout("Layouts/Region/RegionViewItem.js", a.mRegionViewItemsContainerWindow),
j = new simcity.cRegionViewItem({
mLayout : j,
mUnitRef : h,
mRegionalBoxID : i,
mDataBinding : simcity.RegionViewGeneric
});
gUIManager.RegisterUIHandler(j);
a.mRegionViewItems[i] = j
}
a.mRegionViewItems[i].mUnitRef = h;
"greatwork" == a.mRegionViewItems[i].mViewItemType && (a.mRegionData.mGreatWorksLocal[h] = {
regionViewItem : a.mRegionViewItems[d],
data : []
})
}
}
}
a.UpdateRegionViewItemDatabindings();
a.RefreshGreatWorksData()
})
};
simcity.cRegionViewUIHandler.prototype.UpdateRegionViewItemDatabindings = function () {
for (var a = Object.keys(this.mRegionViewItems), b = a.length, c = Array(b), d = {
argumentLists : Array(b)
}, e = [], f = [], g = this, h = 0; h < b; ++h) {
var i = this.mRegionViewItems[a[h]];
c[h] = i.mDataBinding;
d.argumentLists[h] = [i]
}
simcity.GenerateDataBindingQueries(c, e, d, f, !1);
simcity.RequestDataBindingData(e, c, f, !1, function (d) {
for (var e = 0; e < b; ++e)
c[e].update(g.mRegionViewItems[a[e]], d[e]);
g.UpdateGreatWorksResourcePopup()
})
};
simcity.cRegionViewUIHandler.prototype.UpdateRegionResourcePositions = function (a, b) {
var c = this.mRootWindow.FindControlByID(a);
if (c.mChildren)
for (var d = 0, e = 0, f = c.mChildren.length; d < f; ++d) {
var g = c.mChildren[d];
g.mIsVisible && (b ? g.SetPosition(g.mWidth * e, g.mTop) : g.SetPosition(c.mWidth - g.mWidth * (e + 1), g.mTop), ++e)
}
};
simcity.cRegionViewUIHandler.prototype.UpdateRegionResourceData = function () {
var a = this,
b = simcity.kRegionalCitiesResourceRegionTotals;
b.clear();
for (var c = Object.keys(this.mRegionData.mCityTradeData), d = 0, e = c.length; d < e; d++) {
var f = c[d];
if (f)
for (var g = this.mRegionData.mCityTradeData[f].connections, h = Object.keys(g), i = 0, j = h.length; i < j; i++) {
var k = h[i],
l = g[k],
m = [],
n = [],
p = {
argumentList : [l.connectionUnitRef, k == this.mRegionData.mPlayingBox.uid, this.mRegionData.mConnectedUnits[f], f == this.mRegionData.mPlayingBox.uid,
this.mRegionData.mConnectedUnits[k]]
},
q = this.mRegionData.mCityTradeData[k];
q && (q.localData || (q.localData = new simcity.kRegionalCitiesLocalData), simcity.GenerateDataBindingQueries([q.localData], m, p, n, !1), simcity.RequestDataBindingData(m, [q.localData], n, !1, function (a) {
q.localData.update(a[0])
}), m = [], n = [], q.giftableResources || (q.giftableResources = new simcity.kRegionalCitiesGiftableResources), simcity.GenerateDataBindingQueries([q.giftableResources], m, p, n, !1), simcity.RequestDataBindingData(m, [q.giftableResources],
n, !1, function (b) {
q.giftableResources.update(b[0]);
a.CollectChangedVisualizedDataResources(k, q.giftableResources)
}));
for (var o = 0, r = simcity.kRegionalCitiesResourceDataBindings.length; o < r; ++o) {
m = [];
n = [];
l.connectionData || (l.connectionData = {});
var s = simcity.kRegionalCitiesResourceDataBindings[o],
s = "function" == typeof s ? new s : s;
l.connectionData.hasOwnProperty(s.type) || (l.connectionData[s.type] = "function" == typeof s ? new s : s);
l.connectionData[s.type].queries && (simcity.GenerateDataBindingQueries([l.connectionData[s.type]],
m, p, n, !1), simcity.RequestDataBindingData(m, [l.connectionData[s.type]], n, !1, function (c) {
l.connectionData[s.type].update(c[0]);
b.update(l.connectionData[s.type]);
a.CollectChangedVisualizedDataResources(k, l.connectionData[s.type])
}))
}
}
}
0 < Object.keys(this.mChangedVisualizedData).length && scrui.PostGameCommand(scrui.BuildCommand(["UpdateVisualizedData"]));
this.mRequestedTradeDataResourceUIKeys && this.UpdateVisualizedTradeData();
if (simcity.IsMainTutorialInProgress()) {
if (c = this.mRegionData.mCityTradeData[simcity.TutorialMaxisBurgBoxID])
if (c =
c.connections[simcity.TutorialLuckyShoresBoxID])
c.connectionData.garbage.data.dumpCapacity = 400, c.connectionData.garbage.data.garbagePickedUp = 50, c.connectionData.garbage.data.totalGarbageAndRecyclingTruckTokensAssigned = 1, c.connectionData.garbage.data.totalGarbageAndRecyclingTruckTokensAvailable = 0;
if ((c = this.mRegionData.mCityTradeData[simcity.TutorialLuckyShoresBoxID]) && c.localData)
c.localData.data.population = 4734, c.localData.data.budget = 505600
}
};
simcity.cRegionViewUIHandler.prototype.CollectChangedVisualizedDataResources = function (a, b) {
if (b.hasOwnProperty("visualizedData"))
for (var c = b.visualizedData, d = Object.keys(c), e = 0, f = d.length; e < f; e++) {
var g = c[d[e]];
this.mRequestedVisualizedDataUIKeys[g.uiKey] && g.changed && (this.mChangedVisualizedData[a] || (this.mChangedVisualizedData[a] = {}), this.mChangedVisualizedData[a][d[e]] || (simcity.DEBUG && scrui.Assert(this.mResourceUIKeyValidationObj[g.uiKey], "Visualized Data ResourceUIKey in databinding does not exists: " +
scrui.DecimalToHex(g.uiKey)), this.mChangedVisualizedData[a][d[e]] = {
uiKey : g.uiKey,
amount : g.amount
}), g.changed = !1)
}
};
simcity.cRegionViewUIHandler.prototype.CollectRequestedVisualizedDataUIKeys = function () {
var a = this,
b = [scrui.BuildRequestQuery([simcity.kDataVisualizedDataRequestedUIKeys])];
scrui.RequestGameData(b, function (b) {
a.mRequestedVisualizedDataUIKeys = {};
for (var b = b[0].uiKeys, d = 0, e = b.length; d < e; ++d)
simcity.DEBUG && scrui.Assert(a.mResourceUIKeyValidationObj[b[d]], "Requested Visualized Data ResourceUIKey does not exists: " + scrui.DecimalToHex(b[d])), a.mRequestedVisualizedDataUIKeys[b[d]] = 1
})
};
simcity.cRegionViewUIHandler.prototype.OnTradeDataRequestReceived = function (a) {
a = a.uiKeys;
this.mRequestedTradeDataResourceUIKeys = {};
for (var b = 0, c = a.length; b < c; ++b)
simcity.DEBUG && scrui.Assert(this.mResourceUIKeyValidationObj[a[b]], "Requested Visualized Trade Data ResourceUIKey does not exists: " + scrui.DecimalToHex(a[b])), this.mRequestedTradeDataResourceUIKeys[a[b]] = 1;
this.mInitialTradeDataRequestCompleted = !1;
this.UpdateVisualizedTradeData()
};
simcity.cRegionViewUIHandler.prototype.UpdateVisualizedTradeData = function () {
scrui.PostGameCommand(scrui.BuildCommand(["UpdateVisualizedTradeData"]))
};
simcity.cRegionViewUIHandler.prototype.OnTradeDataRequestPaused = function () {
this.mRequestedTradeDataResourceUIKeys = null
};
simcity.GetRequestedTradeData = function () {
if (simcity.gGlobalUIHandler && simcity.gGlobalUIHandler.mRegionViewUIHandler)
return simcity.gGlobalUIHandler.mRegionViewUIHandler.GetRequestedTradeData()
};
simcity.cRegionViewUIHandler.prototype.GetRequestedTradeData = function () {
var a = [];
simcity.IsMainTutorialInProgress() && (simcity.gGlobalUIHandler.mTutorialManager.mTutorialData.hasOwnProperty("showTradeArrows"), this.mSelectedDataLayerID == simcity.kRegionDataLayer_Workers && simcity.gGlobalUIHandler.mLayerUIHandler.mCurrentLayerID == simcity.kRegionDataLayer_Workers ? a.push({
uiKey : Number(simcity.kResourceUIKeys.TradeCommutingWorkersOut),
box1 : Number(simcity.TutorialMaxisBurgBoxID),
box2 : Number(simcity.TutorialLuckyShoresBoxID),
amount : 1E3,
type : simcity.kTradeTypeNormal
}) : this.mSelectedDataLayerID == simcity.kRegionDataLayer_Workers && simcity.gGlobalUIHandler.mLayerUIHandler.mCurrentLayerID == simcity.kRegionDataLayer_WorkerLevels[0] && a.push({
uiKey : Number(simcity.kResourceUIKeys.CommutingWorkersW1),
box1 : Number(simcity.TutorialMaxisBurgBoxID),
box2 : Number(simcity.TutorialLuckyShoresBoxID),
amount : 1E3,
type : simcity.kTradeTypeNormal
}));
this.mRequestedTradeDataResourceUIKeys && (this.mSelectedDataLayerID == simcity.kRegionDataLayer_GreatWorks ?
this.CollectGreatWorksTradeData(a) : this.CollectCityTradeData(a), this.mInitialTradeDataRequestCompleted = !0);
return a
};
simcity.cRegionViewUIHandler.prototype.CollectGreatWorksTradeData = function (a) {
if (this.mSelectedRegionViewItem && "greatwork" == this.mSelectedRegionViewItem.mViewItemType && this.mGWLowerPanelUI.mActiveRequirements && simcity.gGlobalUIHandler.mAPIServerDataUIHandler.mServerDataSet) {
for (var b = this.mRegionData.mGreatWorksRegional[this.mSelectedRegionViewItem.mRegionalBoxID], c = [], d = this.mGWLowerPanelUI.mActiveRequirements.length, e = 0; e < d; e++) {
var f = this.mGWLowerPanelUI.mActiveRequirements[e];
f.hasOwnProperty("resourceUIKey") &&
c.push(f)
}
var d = c.length,
g;
for (g in b.cities) {
var h = b.cities[g];
if (this.mGWLowerPanelUI.mGWData.underConstruction)
if (h.UID != this.mRegionData.mPlayingBox.uid) {
if (simcity.GetOnlineStatus(h.UID) == simcity.kOnlineStatusOnlineYourRegion)
for (var i = scrui.RequestStringFromUnitRef(h.slotRef), e = 0; e < d; e++) {
var j = h.resources[e],
k = c[e],
f = [scrui.BuildRequestQuery([simcity.kDataRegionUnits, i, simcity.kDataBinAmount, k.signupBinResource])];
scrui.RequestGameData(f, function (c) {
if (c[0]) {
var d = 0;
0 < c[0] && (d = j.amount, 0 ==
d && (d = 1));
a.push({
uiKey : Number(k.resourceUIKey),
box1 : Number(h.UID),
box2 : Number(b.UID),
amount : d,
type : simcity.kTradeTypeNormal
})
}
})
}
} else {
i = {
argumentList : [this.mSelectedRegionViewItem.mUnitRef]
};
for (e = 0; e < d; e++) {
var j = h.resources[e],
k = c[e],
l = [k.dataBindingSignup],
f = [],
m = [];
simcity.GenerateDataBindingQueries(l, f, i, m, !1);
simcity.RequestDataBindingData(f, l, m, !1, function (c) {
if (c[0].signup) {
var d = 0;
if (c[0].signup.amount > 0) {
d = j.amount;
d == 0 && (d = 1)
}
a.push({
uiKey : Number(k.resourceUIKey),
box1 : Number(h.UID),
box2 : Number(b.UID),
amount : d,
type : simcity.kTradeTypeNormal
})
}
})
}
}
}
}
};
simcity.cRegionViewUIHandler.prototype.CollectCityTradeData = function (a) {
for (var b = {}, c = this.mRegionData.mCityTradeData, d = Object.keys(c), e = 0, f = d.length; e < f; e++) {
var g = d[e];
b[g] || (b[g] = {});
for (var h = Object.keys(c[g].connections), i = 0, j = h.length; i < j; i++) {
var k = h[i];
this.mRegionData.mCities[k] && !b[g][k] && (b[g][k] = 1, b[k] || (b[k] = {}), b[k][g] = 1, this.AppendVisualizedTradeDataResources(g, k, a, this.mInitialTradeDataRequestCompleted))
}
}
};
simcity.cRegionViewUIHandler.prototype.AppendVisualizedTradeDataResources = function (a, b, c, d) {
for (var e = this.GetDirectionalCityTradeData(a, b), f = this.GetDirectionalCityTradeData(b, a), g = Object.keys(e), h = 0, i = g.length; h < i; h++) {
var j = g[h],
k = e[j].visualizedTradeData,
j = f[j].visualizedTradeData;
if (k && j)
for (var l = Object.keys(k), m = 0, n = l.length; m < n; m++) {
var p = l[m],
q = k[p],
o = j[p];
if (!d || q.changed || o.changed)
"tradeCombine" == p ? this.AppendCombinedVisualizedTradeData(a, b, q, o, c) : this.AppendVisualizedTradeData(a, b, c,
q.uiKey, q.amount, o.amount, q) && (q.changed = !1, o.changed = !1)
}
}
};
simcity.cRegionViewUIHandler.prototype.AppendCombinedVisualizedTradeData = function (a, b, c, d, e) {
this.AppendVisualizedTradeData(a, b, e, c.uiKeyIn, c.outAmount, d.inAmount, c) && (c.changed = !1, d.changed = !1);
this.AppendVisualizedTradeData(a, b, e, c.uiKeyOut, c.inAmount, d.outAmount, c) && (c.changed = !1, d.changed = !1)
};
simcity.cRegionViewUIHandler.prototype.AppendVisualizedTradeData = function (a, b, c, d, e, f, g) {
simcity.DEBUG && scrui.Assert(this.mResourceUIKeyValidationObj[d], "Visualized Trade Data ResourceUIKey in databinding does not exists: " + scrui.DecimalToHex(d));
return this.mRequestedTradeDataResourceUIKeys[d] && (e = this.DetermineTradeData(e, f), null != e) ? (f = !0, 0 != e.amount && (f = this.DetermineTradeStatus(a, b, 0 < e.amount, g)), f || (e.amount = 0), c.push({
uiKey : Number(d),
box1 : Number(a),
box2 : Number(b),
amount : e.amount,
type : e.type
}),
!0) : !1
};
simcity.cRegionViewUIHandler.prototype.DetermineTradeStatus = function (a, b, c, d) {
if (!d.localExportTradeSwitchID && !d.localExportTradeSwitchID && !d.regionTradeSwitchID)
return !0;
var e = null,
f = null,
g = !1;
a == this.mRegionData.mPlayingBox.uid ? (e = this.mRegionData.mConnectedUnits[b], f = c ? d.localExportTradeSwitchID : d.localImportTradeSwitchID, g = !0) : b == this.mRegionData.mPlayingBox.uid ? (e = this.mRegionData.mConnectedUnits[a], f = c ? d.localImportTradeSwitchID : d.localExportTradeSwitchID, g = !0) : (e = c ? this.mRegionData.mCityTradeData[a].connections[b].connectionUnitRef : this.mRegionData.mCityTradeData[b].connections[a].connectionUnitRef,
f = d.regionTradeSwitchID);
if (e && f) {
var a = null,
a = g ? [scrui.BuildRequestQuery([simcity.kDataUnits, e, simcity.kDataBinAmount, f])] : [scrui.BuildRequestQuery([simcity.kDataRegionUnits, e, simcity.kDataBinAmount, f])],
h = 0;
a && scrui.RequestGameData(a, function (a) {
h = a[0] % 2
});
return 0 != h
}
return !0
};
simcity.cRegionViewUIHandler.prototype.DetermineTradeData = function (a, b) {
var c = {
amount : 0,
type : simcity.kTradeTypeNormal
};
a == b && 0 < b && 0 < a ? (c.amount = a, c.type = simcity.kTradeTypeBidirectional) : b > a && 0 == a ? (c.amount = b, c.type = simcity.kTradeTypeNormal) : a > b && 0 == b && (c.amount = -a, c.type = simcity.kTradeTypeNormal);
return c
};
simcity.GetChangedVisualizedDataFromRegion = function () {
if (simcity.gGlobalUIHandler && simcity.gGlobalUIHandler.mRegionViewUIHandler)
return simcity.gGlobalUIHandler.mRegionViewUIHandler.GetChangedVisualizedData();
scrui.Assert(!1, "simcity.GetChangedVisualizedDataFromRegion called without initialized region view UI");
return []
};
simcity.cRegionViewUIHandler.prototype.GetChangedVisualizedData = function () {
var a = [];
if (this.mChangedVisualizedData)
for (var b = Object.keys(this.mChangedVisualizedData), c = 0, d = b.length; c < d; c++) {
var e = b[c],
f = this.mChangedVisualizedData[e];
if (f)
for (var g = Object.keys(f), h = 0, i = g.length; h < i; h++) {
var j = f[g[h]];
a.push({
regionBoxID : Number(e),
uiKey : Number(j.uiKey),
amount : j.amount
})
}
}
this.mChangedVisualizedData = {};
return a
};
simcity.cRegionViewUIHandler.prototype.UpdateRegionGreatWorksResourceData = function () {
var a = simcity.kRegionalCitiesResourceRegionTotals,
b = simcity.FindConnectedGreatWork();
a.clear();
for (var c in this.mRegionData.mGreatWorksLocal)
if (c)
for (var a = 0, d = simcity.kRegionalCitiesResourceGreatWorksDataBindings.length; a < d; ++a) {
var e = [],
f = [],
g = {
argumentList : [c]
},
h = simcity.kRegionalCitiesResourceGreatWorksDataBindings[a],
i = "function" == typeof h ? new h : h;
simcity.GenerateDataBindingQueries([i], e, g, f, !1);
simcity.RequestDataBindingData(e,
[i], f, !1, function (a) {
i.update(a[0]);
if (b && a[0].regionalBoxUniqueID.amount == b[0]) {
simcity.kRegionalAlertsGreatWorks.connectionData = a[0];
simcity.kRegionalAlertsGreatWorks.update(b[0])
}
})
}
};
simcity.cRegionViewUIHandler.prototype.TotalUnclaimedBoxes = function () {
var a = 0;
if (this.mRegionData && this.mRegionData.mBoxes)
for (var b = Object.keys(this.mRegionData.mBoxes), c = 0, d = b.length; c < d; c++)
"false" == this.mRegionData.mBoxes[b[c]].isClaimed && a++;
return a
};
simcity.cRegionViewUIHandler.prototype.TotalActiveNeighbors = function () {
var a = 0;
if (this.mRegionData && this.mRegionData.mBoxes && this.mRegionData.mCityTradeData) {
var b = this.mRegionData.mCityTradeData[this.mRegionData.mPlayingBox.uid];
if (b)
for (var b = Object.keys(b.connections), c = 0, d = b.length; c < d; c++) {
var e = this.mRegionData.mBoxes[b[c]];
e && "true" == e.isClaimed && a++
}
}
return a
};
simcity.cRegionViewUIHandler.prototype.IsVisible = function () {
return this.mRootWindow.mIsVisible
};
simcity.cRegionViewUIHandler.prototype.ResetRegionViewItem = function (a) {
var b = [simcity.kRegionView_GreatWorksPrerequisiteParent, simcity.kRegionView_GreatWorksChooserParent, simcity.kRegionView_GreatWorksUnclaimedNameplate, simcity.kRegionView_GreatWorksClaimedNameplate];
if (a.mLayout)
for (var c in b)
a.mLayout.FindControlByID(b[c]).SetVisibility(!1)
};
simcity.cRegionViewUIHandler.prototype.RemoveRegionViewItemAtIndex = function (a) {
if (a < this.mRegionViewItems.length) {
var b = this.mRegionViewItems[a];
b === this.mSelectedRegionViewItem && (this.mSelectedRegionViewItem = null, this.mSelectedUnitID = simcity.kInvalidUnitRef, this.mHighlightedGreatWorkResource = this.mHighlightedGreatWorkOption = null);
b.mLayout.DestroyControl();
this.mRegionViewItems.splice(a, 1)
}
};
simcity.cRegionViewUIHandler.prototype.HidePopups = function () {
this.mSelectedRegionViewItem = null;
this.mSelectedUnitID = simcity.kInvalidUnitRef;
this.mHighlightedGreatWorkResource = this.mHighlightedGreatWorkOption = null;
for (var a = 0, b = this.mRegionViewItems.length; a < b; ++a)
this.ResetRegionViewItem(this.mRegionViewItems[a]);
this.HideBuildSatelliteButton()
};
simcity.cRegionViewUIHandler.prototype.HideRegionUI = function () {
this.HidePopups();
null !== this.mMousedOverRegionViewItem && !this.mMousedOverRegionViewItem.mIsSelected && this.mMousedOverRegionViewItem.SetMouseSelectionState(simcity.kRegionViewItemMouseSelectionStates.unselected);
this.mSelectedRegionViewItem = null;
for (var a = Object.keys(this.mRegionViewItems), b = 0, c = a.length; b < c; b++)
this.mRegionViewItems[a[b]].SetMouseSelectionState(simcity.kRegionViewItemMouseSelectionStates.unselected);
this.mRootWindow.SetVisibility(!1)
};
simcity.cRegionViewUIHandler.prototype.UpdateGreatWorksResources = function () {
if (this.mSelectedRegionViewItem && (this.mSelectedUnitRef = this.mViewingUnitRef = this.LookupUnitRef(this.mSelectedRegionViewItem.mRegionalBoxID, "local"), this.mSelectedUnitID = this.mSelectedRegionViewItem.mUnitID, null !== this.mSelectedUnitID && null !== this.mSelectedUnitRef)) {
var a = simcity.GreatWorksRequirements[this.mSelectedUnitID];
if (a) {
for (var b = a.length, c = Array(b), d = {
argumentLists : Array(b)
}, e = 0, f = 0; e < b; ++e) {
var g = a[e].dataBinding;
c[e] = g;
var h = [this.mSelectedUnitRef];
2 === g.queries.length && h.push(f++);
d.argumentLists[e] = h
}
var a = [],
b = [],
i = this;
simcity.GenerateDataBindingQueries(c, a, d, b, !1);
simcity.RequestDataBindingData(a, c, b, !1, function (a) {
c[0].update(i.mSelectedRegionViewItem.mRootLayout, a[0]);
i.mSelectedRegionViewItem.mRootLayout.FindControlByID(simcity.kRegionView_GreatWorksResourcesContainer);
for (var a = c.length, b = 1; b < a; b++);
})
}
}
};
simcity.cRegionViewUIHandler.prototype.UpdateGreatWorksResourcePopup = function () {
if (null !== this.mHighlightedGreatWorkResource) {
var a = simcity.GreatWorksRequirements[this.mSelectedUnitID][this.mHighlightedGreatWorkResource];
if (a.hasOwnProperty("resource")) {
var b = a.resource,
c = null;
b.mExportLayout.mIsVisible ? c = b.mExportLayout : b.mImportLayout.mIsVisible && (c = b.mImportLayout);
if (c) {
var d = c.FindControlByID(simcity.kRegionView_ResourceContributionParent);
d.SetVisibility(!0);
var e = [a.dataBindingLocalContribution],
b = [],
c = [this.mSelectedUnitRef];
a.hasOwnProperty("resourceIndex") && c.push(a.resourceIndex);
a = [];
simcity.GenerateDataBindingQueries(e, b, {
argumentList : c
}, a, !1);
simcity.RequestDataBindingData(b, e, a, !1, function (a) {
e[0].update(d, a[0])
})
}
}
}
};
simcity.cRegionViewUIHandler.prototype.OnShowSiteUI = function () {
this.mRootWindow.SetVisibility(!0);
null !== this.mRegionData.mViewingBox ? this.mRegionData.mViewingBox && "true" === this.mRegionData.mViewingBox.isClaimed ? this.SetLowerPanelState(simcity.kRegionView_LowerPanelFriendCity) : this.SetLowerPanelState(simcity.kRegionView_LowerPanelUnclaimedCity) : this.SetLowerPanelState(simcity.kRegionView_LowerPanelGreatWork)
};
simcity.cRegionViewUIHandler.prototype.OnShowRegionUI = function () {
simcity.gFriendController.UpdateFriendsFromServer();
this.mRegionData.mViewingBox = this.mRegionData.mPlayingBox;
this.mSelectedRegionViewItem || (this.mSelectedRegionViewItem = this.mRegionViewItems[this.mRegionData.mPlayingBox.uid]);
if (this.mSelectedRegionViewItem) {
this.UpdateRegionViewList();
this.mViewingUnitRef = this.mSelectedRegionViewItem.mUnitRef;
scrui.PostGameCommand(scrui.BuildCommand(["showCityRegionData", this.mRegionData.mPlayingBox.uid]));
this.mRootWindow.FindControlByID(248382578).SetRawText(this.mRegionData.mRegionName);
if (simcity.IsMainTutorialInProgress()) {
var a = scrui.ParseLocaleString(this.mRegionData.mCityDefaultData.regionName);
this.mRootWindow.FindControlByID(248382578).SetLocaleText(a)
}
this.mTimeSinceLastUpdate = simcity.kRegionViewUpdateTimeMS;
this.mRootWindow.SetVisibility(!0);
this.SetLowerPanelState(simcity.kRegionView_LowerPanelSelfCity);
a = [scrui.BuildRequestQuery(["doesUnitExist", simcity.kPropSpaceCenter_N]), scrui.BuildRequestQuery(["doesUnitExist",
simcity.kPropSpaceCenter_4U]), scrui.BuildRequestQuery(["doesUnitExist", simcity.kPropSpaceCenterSatellite_U]), scrui.BuildRequestQuery(["doesUnitExist", simcity.kPropSpaceCenterSatellite_N])];
scrui.RequestGameData(a, function () {})
} else
simcity.gGlobalUIHandler.mAPIServerDataUIHandler.RefreshRegionAPIData()
};
simcity.cRegionViewUIHandler.prototype.ShowLowerPanel = function () {
switch (this.mLowerPanelState) {
case simcity.kRegionView_LowerPanelGreatWork:
this.mGWLowerPanelUI.ShowGreatWorksLowerPanel();
simcity.gGlobalUIHandler.mLayerUIHandler.DeactivateLayer();
this.HideDataLayerContextPanel();
break;
case simcity.kRegionView_LowerPanelSelfCity:
var a = this.mRegionData.mCityTradeData[this.mRegionData.mPlayingBox.uid];
if (a && a.localData) {
var b = a.localData.data.budget,
a = simcity.GetFudgedPopulation(a.localData.data.population);
this.mLowerPanels.mPlayingCity.mTextBudget.SetTextFromNumber(b);
this.mLowerPanels.mPlayingCity.mTextPopulation.SetTextFromNumber(a)
}
break;
case simcity.kRegionView_LowerPanelFriendCity:
if (b = this.mRegionData.mConnectedUnits[this.mRegionData.mViewingBox.uid] || null, a = this.mViewingTradeUnitRefList[0] || null, b || a) {
var a = [],
c = [],
d = {
argumentList : [b]
};
b && (simcity.GenerateDataBindingQueries(simcity.kConnectedCitiesDataBindings, a, d, c, !1), simcity.RequestDataBindingData(a, simcity.kConnectedCitiesDataBindings, c,
!1, function (a) {
for (var b = 0, c = simcity.kConnectedCitiesDataBindings.length; b < c; ++b)
simcity.kConnectedCitiesDataBindings[b].update(a[b])
}));
this.UpdateTradeIcons();
a = this.mRegionData.mCityTradeData[this.mSelectedRegionViewItem.mRegionalBoxID];
a.localData && (b = a.localData.data.budget, a = simcity.GetFudgedPopulation(a.localData.data.population), this.mLowerPanels.mFriendCity.mTextBudget.SetTextFromNumber(b), this.mLowerPanels.mFriendCity.mTextPopulation.SetTextFromNumber(a))
} else
this.mLowerPanels.mFriendCity.mTextPopulation.SetTextFromNumber(0),
this.mLowerPanels.mFriendCity.mTextBudget.SetTextFromNumber(0)
}
};
simcity.cRegionViewUIHandler.prototype.SetLowerPanelState = function () {};
simcity.cRegionViewUIHandler.prototype.GetRegionViewItem = function (a) {
for (var b = 0, c = this.mRegionViewItems.length; b < c; ++b) {
var d = this.mRegionViewItems[b];
if (d.mUnitRef === a)
return d
}
return null
};
simcity.cRegionViewUIHandler.prototype.GetGreatWorkData = function () {
for (var a = simcity.kInvalidUnitRef, b = 0, c = 0, d = this.mRegionViewItems.length; c < d; ++c) {
var e = this.mRegionViewItems[c];
if (3939731971 !== e.mUnitID) {
a = simcity.RequestUnitRefFromString(e.mUnitRef);
b = e.mUnitID;
break
}
}
return {
unitRef : a,
unitID : b
}
};
simcity.cRegionViewUIHandler.prototype.OnRegionViewItemClicked = function () {
if (this.mSelectedRegionViewItem && (this.mSelectedUnitRef = this.LookupUnitRef(this.mSelectedRegionViewItem.mRegionalBoxID, "local")) && this.mRegionData.mGreatWorksLocal[this.mSelectedUnitRef] && this.mRegionData.mGreatWorksLocal[this.mSelectedUnitRef].regionViewItem)
this.mSelectedUnitID = this.mRegionData.mGreatWorksLocal[this.mSelectedUnitRef].regionViewItem.mUnitID || null
};
simcity.cRegionViewUIHandler.prototype.OnRegionViewMouseOver = function (a) {
this.mSelectedUnitRef = scrui.RequestStringFromUnitRef(a.unitRef);
this.mSelectedUnitID = a.unitID
};
simcity.cRegionViewUIHandler.prototype.OnRegionViewMouseOut = function () {};
simcity.cRegionViewUIHandler.prototype.GetSelectedViewItem = function () {
return this.mSelectedRegionViewItem
};
simcity.cRegionViewUIHandler.prototype.ShowGWCompletePanel = function (a, b) {
b = b[0];
this.mGWCompleteDialog = gUIManager.LoadAndCacheLayout("Layouts/Region/GreatWorksCompletion.js", gUIManager.GetRootWindow());
this.mGWCompleteDialog.FindControlByID(simcity.kGWCompleteOKButton).mUserData = a;
this.mGWCompleteDialog.FindControlByID(228252799).SetLocaleText(b.text);
this.mGWCompleteDialog.FindControlByID(228252804).SetLocaleText(b.completionText);
this.mGWCompleteDialog.FindControlByID(233843597).SetWindowImage(b.completionImage);
this.mGWCompleteDialog.FindControlByID(248970878).SetWindowImage(b.headerIcon);
this.mGWCompleteDialog.FindControlByID(250094611).SetLocaleText(b.descriptionText);
var c = b.benefitsArray,
d = [248958889, 248958886, 248958890];
2 == c.length && (d = [248958886, 248958890, 248958889]);
for (var e = 0, f = d.length; e < f; e++) {
var g = this.mGWCompleteDialog.FindControlByID(d[e]);
c[e] ? (g.FindControlByID(234460646).SetLocaleText(c[e].localeString), g.FindControlByID(234461784).SetWindowImage(c[e].altIcon)) : g.SetVisibility(!1)
}
this.mGWCompleteDialog.FindControlByID(250093099).SetVisibility(!0);
simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kInstanceUIGreatWorkComplete);
simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(this.mGWCompleteDialog, !0)
};
simcity.cRegionViewUIHandler.prototype.ZoomToGreatWork = function (a) {
this.mTimeSinceLastUpdate = simcity.kRegionViewUpdateTimeMS;
var b = gUIManager.FindControlByID(simcity.kBtnRegionCamera);
if (b && !1 == b.mIsSelected) {
var c = b.GetAbsolutePosition();
b.Private_OnClick(c[0], c[1])
}
gUIManager.FindControlByID(simcity.kWinMouseEaterID).SetVisibility(!1);
simcity.gGlobalUIHandler.mRegionViewUIHandler.OnShowRegionUI();
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage, scrui.IDFromName("lookAtUnit"), simcity.kDataUnitRef,
this.mViewingUnitRef]));
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage, 2545779150, simcity.kDataUnitRef, a]));
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage, scrui.IDFromName("StartCinematic")]));
simcity.gGlobalUIHandler.mRegionViewUIHandler.mViewingUnitRef = a;
simcity.gGlobalUIHandler.mSharedUIParent.SetVisibility(!1);
simcity.gGlobalUIHandler.mCityUIParent.SetVisibility(!1);
simcity.gGlobalUIHandler.mRegionUIParent.SetVisibility(!1);
this.UpdateRegionViewList()
};
simcity.cRegionViewUIHandler.prototype.ZoomToCity = function (a) {
this.mTimeSinceLastUpdate = simcity.kRegionViewUpdateTimeMS;
if (a) {
gUIManager.FindControlByID(simcity.kWinMouseEaterID).SetVisibility(!1);
this.UpdateRegionViewList();
var b = this.LookupUnitRef(a, "local"),
c = this.GetRegionalBoxType(a);
if (!("greatwork" == c && simcity.IsTutorialInProgress())) {
this.mViewingUnitRef = b;
"greatwork" == c ? (this.mRegionData.mViewingBox = null, scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage, scrui.IDFromName("lookAtUnit"),
simcity.kDataUnitRef, this.mViewingUnitRef])), scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage, 2545779150, simcity.kDataUnitRef, this.mViewingUnitRef]))) : (this.mRegionData.mViewingBox = this.mRegionData.mBoxes[a], this.RefreshRegionTradeUnitList(), this.UpdateRegionResourceData(), null === this.mViewingUnitRef ? (scrui.PostGameCommand(scrui.BuildCommand(["camera", "immediate", !1, "move", "[0, 0, 0]"])), simcity.gGlobalUIHandler.mRegionViewUIHandler.OnShowRegionUI()) : (scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage,
scrui.IDFromName("lookAtUnit"), simcity.kDataUnitRef, this.mViewingUnitRef])), scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage, 2545779150, simcity.kDataUnitRef, this.mViewingUnitRef])), this.mRegionData.mCityDefaultData && simcity.gGlobalUIHandler.mRegionViewUIHandler.OnShowSiteUI()), this.mIsContextPanelActive && this.UpdateDataLayerContextPanel());
scrui.PostGameCommand(scrui.BuildCommand(["showCityRegionData", a]));
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage, scrui.IDFromName("setSelectedRegionUnit"),
simcity.kDataSourceUnitRegionalBoxUniqueID, a]));
for (var d in this.mRegionViewItems)
(a = this.mRegionViewItems[d]) && (a.mControlCache && a.mControlCache.zoomButton) && (a != this.mSelectedRegionViewItem ? a.mControlCache.zoomButton.SetEnabled(!0) : a.mControlCache.zoomButton.SetEnabled(!1))
}
}
};
simcity.cRegionViewUIHandler.prototype.SetStartingRegionPanel = function (a) {
switch (a) {
case simcity.kCategoryIDZones:
case simcity.kCategoryIDRCI:
this.mSelectedDataLayerID = simcity.kRegionDataLayer_Workers;
break;
case simcity.kCategoryIDEducation:
this.mSelectedDataLayerID = simcity.kRegionDataLayer_Students;
break;
case simcity.kCategoryIDTransport:
case simcity.kCategoryIDMassTransit:
case simcity.kCategoryIDBusStation:
case simcity.kCategoryIDBusStop:
this.mSelectedDataLayerID = simcity.kRegionDataLayer_Transport;
break;
case simcity.kCategoryIDPower:
this.mSelectedDataLayerID = simcity.kRegionDataLayer_Power;
break;
case simcity.kCategoryIDWater:
this.mSelectedDataLayerID = simcity.kRegionDataLayer_Water;
break;
case simcity.kCategoryIDSewage:
this.mSelectedDataLayerID = simcity.kRegionDataLayer_Sewage;
break;
case simcity.kCategoryIDGarbage:
this.mSelectedDataLayerID = simcity.kRegionDataLayer_Garbage;
break;
case simcity.kCategoryIDFire:
this.mSelectedDataLayerID = simcity.kRegionDataLayer_Fire;
break;
case simcity.kCategoryIDPolice:
this.mSelectedDataLayerID =
simcity.kRegionDataLayer_Police;
break;
case simcity.kCategoryIDHealth:
this.mSelectedDataLayerID = simcity.kRegionDataLayer_Health;
break;
case simcity.kCategoryIDManufacturing:
this.mSelectedDataLayerID = simcity.kRegionDataLayer_ResourceGifting;
break;
default:
this.mSelectedDataLayerID = null
}
};
simcity.cRegionViewUIHandler.prototype.ShowStartingRegionPanel = function () {
if (this.mSelectedDataLayerID) {
var a = this.mDataLayerButtons[scrui.DecimalToHex(this.mSelectedDataLayerID)];
if (a) {
if (null !== this.mSelectedDataControl && (this.mSelectedDataControl.SetSelected(!1), this.mSelectedDataLayerID = this.mSelectedDataControl = null, simcity.gGlobalUIHandler.mLayerUIHandler.DeactivateLayer(), this.HideDataLayerContextPanel()), a = a.FindControlByID(simcity.kRegionView_DataLayerButton))
a.SetSelected(!0), this.mSelectedDataControl =
a, this.mSelectedDataLayerID = a.mUserData, this.ShowDataLayerContextPanel()
} else
this.mSelectedDataLayerID = null
}
};
simcity.cRegionViewUIHandler.prototype.ShowStartingCityPanel = function () {
var a = simcity.kRegionDataLayers_ContextPanels[this.mSelectedDataLayerID],
b = simcity.gGlobalUIHandler.mToolPaletteUIHandler;
b.mLastSelectedMainCategoryID = 0;
a && a.cityToolPanelID && (b.mLastSelectedMainCategoryID = a.cityToolPanelID)
};
simcity.cRegionViewUIHandler.prototype.EnterRegionView = function () {
scrui.PostGameCommand(simcity.gGlobalUIHandler.mRegionViewCommand);
simcity.gGlobalUIHandler.mSpeedUIHandler.GetGameSpeed() != simcity.kSpeedPaused && (simcity.gGlobalUIHandler.mSpeedUIHandler.sPreviousGameSpeed = simcity.gGlobalUIHandler.mSpeedUIHandler.GetGameSpeed(), scrui.PostGameCommand(scrui.BuildCommand(["setspeed", simcity.kSpeedTurtle])));
simcity.gGlobalUIHandler.mToyTaskPanelUIHandler.SetVisible(!1);
this.ShowStartingRegionPanel();
var a = gUIManager.FindControlByID(248193223);
a && a.SetSelected(!1)
};
simcity.cRegionViewUIHandler.prototype.OnReturnToCityButtonClicked = function () {
this.mSelectedRegionViewItem = null;
return this.ReturnToPlayingCity()
};
simcity.cRegionViewUIHandler.prototype.ReturnToPlayingCity = function () {
var a = !1;
simcity.gGlobalUIHandler.mRegionViewUIHandler.IsVisible() && (null != this.mSelectedDataControl && this.mSelectedDataControl.SetSelected(!1), simcity.gGlobalUIHandler.mLayerUIHandler.DeactivateLayer(), simcity.gGlobalUIHandler.mMissionUI.mMissionContainer.SetVisibility(!0), this.HideDataLayerContextPanel(), this.mGWLowerPanelUI.HideGreatWorksLowerPanel(), this.mLowerPanelState = this.mViewingUnitRef = null, scrui.PostGameCommand(simcity.kReturnToCityCommand),
0 <= simcity.gGlobalUIHandler.mSpeedUIHandler.sPreviousGameSpeed && scrui.PostGameCommand(scrui.BuildCommand(["setspeed", simcity.gGlobalUIHandler.mSpeedUIHandler.sPreviousGameSpeed])), this.ShowStartingCityPanel(), a = !0);
return a
};
simcity.cRegionViewUIHandler.prototype.ShowIntroductionPanel = function (a) {
this.mIntroductionDialog = gUIManager.LoadAndCacheLayout("Layouts/Region/GreatWorkIntroduction.js", this.mRootWindow);
this.mIntroductionDialog.FindControlByID(228252799).SetLocaleText(a.text);
this.mIntroductionDialog.FindControlByID(228252804).SetLocaleText(a.overviewText);
if (a.hasOwnProperty("resources") && (a = simcity.GreatWorksRequirements[a.resources]))
for (var b = 0, c = a.length; b < c; ++b) {
var d = this.mIntroductionDialog.FindControlByID(228252992 +
b);
d && d.SetWindowImage(a[b].icon)
}
simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(this.mIntroductionDialog, !0)
};
simcity.cRegionViewUIHandler.prototype.ShowLaunchButton = function (a) {
var b = this.mRootWindow.mIsVisible;
b.mIsVisible || (b = simcity.gGlobalUIHandler.mSharedUIParent);
this.mLaunchDialog = gUIManager.LoadAndCacheLayout("Layouts/Region/LaunchSatelliteButton.js", b);
this.mLaunchDialog.FindControlByID(234650414).SetVisibility(!0);
this.mLaunchDialog.FindControlByID(234650669).SetVisibility(!1);
a = a && a.unitRef ? scrui.RequestStringFromUnitRef(a.unitRef) : null;
this.mLaunchDialog.FindControlByID(234650417).mUserData =
a
};
simcity.cRegionViewUIHandler.prototype.LaunchSatellite = function (a) {
this.mLaunchDialog.DestroyControl();
simcity.CreateUnit("GreatWorks_Button_LaunchSatellite", a.mUserData || null)
};
simcity.cRegionViewUIHandler.prototype.ShowLaunchConfirm = function () {
var a = this.mRootWindow;
a.mIsVisible || (a = simcity.gGlobalUIHandler.mSharedUIParent);
this.mLaunchDialog = gUIManager.LoadAndCacheLayout("Layouts/Region/LaunchSatelliteButton.js", a);
this.mLaunchDialog.FindControlByID(234650414).SetVisibility(!1);
this.mLaunchDialog.FindControlByID(234650669).SetVisibility(!0)
};
simcity.cRegionViewUIHandler.prototype.RunOnExitBoxRules = function () {
var a = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData;
if (a && a.mPlayingBox && !simcity.IsMainTutorialInProgress()) {
var b = a.mCityTradeData[a.mPlayingBox.uid];
if (b && b.connections && (b = Object.keys(b.connections)))
for (var c = 0, d = b.length; c < d; c++) {
var e = a.mBoxes[b[c]];
e && (e = parseInt(e.uid), scrui.PostGameCommand(scrui.BuildCommand(["runUnitPlayerRule", a.mConnectedUnits[e], simcity.kRuleIDSCPlayerRuleOnExitBox])))
}
a = [scrui.BuildRequestQuery([simcity.kDataCachedUnits,
simcity.kPropTrading_MapHandler])];
scrui.RequestGameData(a, function (a) {
(a = a[0]) && a[0] && scrui.PostGameCommand(scrui.BuildCommand(["runUnitPlayerRule", scrui.RequestStringFromUnitRef(a[0]), simcity.kRuleIDSCPlayerRuleOnExitBox]))
})
}
};
simcity.cRegionViewUIHandler.prototype.LaunchCity = function (a) {
if (!this.mIsLoadingBox) {
this.mIsLoadingBox = !0;
this.RunOnExitBoxRules();
gUIManager.UnregisterAllUIHandlers();
simcity.gLoadingScreenUIHandler.Initialize(!0);
simcity.gLoadingScreenUIHandler.Show();
simcity.gLoadingScreenUIHandler.SetRegionByKey(this.mRegionData.mRegionTypeName);
for (var b = "", c = "", d = Object.keys(this.mRegionData.mBoxes), e = 0, f = d.length; e < f; e++) {
var g = d[e];
if (this.mRegionData.mBoxes[g].id == a) {
b = this.mRegionData.mBoxes[g].name;
c =
this.mRegionData.mCityDefaultData.cities[g].cityName;
break
}
}
"" == b && (b = scrui.ParseLocaleString(c).LoadAndGetTextSynchronous());
simcity.gLoadingScreenUIHandler.SetCityName(b);
scrui.PostGameCommand(scrui.BuildCommand(["loadGame", a, !1]))
}
};
simcity.cRegionViewUIHandler.prototype.LaunchLastCity = function () {
var a = [scrui.BuildRequestQuery(["lastPlayedBox", "boxID"])],
b = this;
scrui.RequestGameData(a, function (a) {
a && 0 < a[0] && b.LaunchCity(a[0])
})
};
simcity.cRegionViewUIHandler.prototype.ZoomToAndLaunchLastCity = function () {
var a = [scrui.BuildRequestQuery(["lastPlayedBox", "regionalBoxUID"]), scrui.BuildRequestQuery(["lastPlayedBox", "boxID"])],
b = this,
c = simcity.gGlobalUIHandler;
scrui.RequestGameData(a, function (a) {
a && (0 < a[0] && 0 < a[1] ? (b.ZoomToCity(a[0]), b.LaunchCity(a[1])) : (c.mNewspaperUIHandler.Shutdown(), c.mTicker.Shutdown(), scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataQuit]))))
})
};
simcity.cRegionViewUIHandler.prototype.PrompLeavingSpectatorCity = function (a) {
var b = simcity.gGlobalUIHandler,
c = this;
b.mDialogManager.ShowPrompt({
title : b.mLocaleStrings.kExitToMenuText,
titleParams : null,
message : b.mLocaleStrings.kExitToMenuConfirmationMsg,
messageParams : null,
buttons : [{
text : b.mLocaleStrings.kCancelText,
onClick : function () {
c.ReturnToPlayingCity()
}
}, {
text : b.mLocaleStrings.kExitText,
onClick : function () {
a && 0 < a ? c.LaunchCity(a) : (b.mNewspaperUIHandler.Shutdown(), b.mTicker.Shutdown(), scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataQuit])))
}
}
]
})
};
simcity.cRegionViewUIHandler.prototype.ShowBuildSatelliteButton = function (a) {
var b = this.mRootWindow;
b.mIsVisible || (b = simcity.gGlobalUIHandler.mSharedUIParent);
this.mBuildSatelliteDialog = gUIManager.LoadAndCacheLayout("Layouts/Region/BuildSatelliteButton.js", b);
this.mBuildSatelliteDialog.SetVisibility(!0);
a = a && a.unitRef ? scrui.RequestStringFromUnitRef(a.unitRef) : null;
this.mBuildSatelliteDialog.FindControlByID(simcity.kRegionView_BuildSatelliteButton).mUserData = a
};
simcity.cRegionViewUIHandler.prototype.BuildSatellite = function () {
this.mBuildSatelliteDialog.DestroyControl();
var a = [scrui.BuildRequestQuery(["getToyOfType", simcity.kPropSpaceCenter_N]), scrui.BuildRequestQuery(["getToyOfType", simcity.kPropSpaceCenter_4U])];
scrui.RequestGameData(a, function (a) {
var c = a[0],
a = a[1];
if (c || a)
simcity.CreateUnit("GreatWorks_SpaceCenterSatellite_01_01_U", null != c ? c : a)
})
};
simcity.cRegionViewUIHandler.prototype.HideBuildSatelliteButton = function () {
this.mBuildSatelliteDialog && this.mBuildSatelliteDialog.DestroyControl()
};
simcity.cRegionViewUIHandler.prototype.GetDataLayerButton = function (a) {
return this.mDataLayerButtons[scrui.DecimalToHex(a)].FindControlByID(simcity.kRegionView_DataLayerButton)
};
simcity.cRegionViewUIHandler.prototype.ShowDataLayerButtons = function () {
for (var a = {
greatworkDatabinding : simcity.kRegionDataLayers.greatwork,
commuterDatabinding : simcity.kRegionDataLayers.commuters,
servicesDatabinding : simcity.kRegionDataLayers.services,
utilDatabinding : simcity.kRegionDataLayers.utilities,
giftingDatabinding : simcity.kRegionDataLayers.gifting,
transportDatabinding : simcity.kRegionDataLayers.transport
}, b = Object.keys(a), c = 0, d = b.length; c < d; c++) {
var e = a[b[c]],
f = this.mRootWindow.FindControlByID(e.targetControl);
f.DestroyChildren();
for (var g = e.layers.length, h = 0; h < g; h++) {
var i = e.layers[h],
j = gUIManager.LoadAndCacheLayout("Layouts/Region/DataLayerbutton2.js", f);
j.FindControlByID(simcity.kRegionView_DataLayerButtonIconNormal).SetWindowImage(simcity.kRegionDataLayers_IconPath + i.icon);
j.FindControlByID(simcity.kRegionView_DataLayerButtonIconNormalOn).SetWindowImage(simcity.kRegionDataLayers_IconPath + i.iconWhite);
j.FindControlByID(simcity.kRegionView_DataLayerButtonIconCritical).SetWindowImage(simcity.kRegionDataLayers_IconPath +
i.iconRed);
j.FindControlByID(simcity.kRegionView_DataLayerButton).mUserData = i.key;
this.mDataLayerButtons[scrui.DecimalToHex(i.key)] = j;
j.SetPosition(h * j.mWidth, 5);
simcity.SetTooltipHelper(j, i.label);
this.mDataLayerButtonSparkles[i.key] = j.FindControlByID(simcity.kRegionView_DataLayerButtonAnimTradeOpportunity)
}
}
};
simcity.cRegionViewUIHandler.prototype.ClaimBox = function (a) {
if (!this.mIsClaimingBox) {
this.mIsClaimingBox = !0;
var b = this.mSelectedRegionViewItem.mBoxApiData.serverBoxID;
if (b)
var c = scrui.ParseLocaleString(this.mRegionData.mCityDefaultData.cities[this.mSelectedRegionViewItem.mBoxApiData.regionalBoxID].cityName).LoadAndGetTextSynchronous(), d = simcity.gGlobalUIHandler.mRegionID, e = this, c = {
url : scrui.GetRestPath() + "/region/" + d + "/boxes/" + b + "/owner.json",
params : [["boxName", c], ["boxDescription", ""]],
onSuccess : function () {
e.mIsClaimingBox =
!1;
e.LaunchCity(b)
},
onError : function () {
a && a.SetEnabled(!0);
e.mIsClaimingBox = !1
},
method : "post"
};
scrui.XHR.Request(c)
}
};
simcity.cRegionViewUIHandler.prototype.ShowDataLayerContextPanel = function () {
if (simcity.gGlobalUIHandler.mRegionCameraButton.mIsSelected) {
var a = simcity.kRegionDataLayers_ContextPanels[this.mSelectedDataLayerID] || simcity.kRegionDataLayers_ContextPanels[simcity.kRegionDataLayer_GreatWorks];
this.mContextPanelDataBinding = a || null;
this.mSelectedRegionViewItem && ("greatwork" == this.mSelectedRegionViewItem.mViewUnitType && "greatworks" != this.mContextPanelDataBinding.tradeType) && (this.mSelectedRegionViewItem = null);
this.ClearHeavyLayerButtons();
this.ActivateLightDataLayer();
this.mRegionAdvisors.ShowAdvisor(this.mSelectedDataLayerID);
var b = this.mRootWindow.FindControlByID(253387885);
b.mParentControl.SetVisibility(!1);
if (this.mContextPanelDataBinding && this.mContextPanelDataBinding.layout) {
this.mContextPanelContainer.DestroyChildren();
var c = null;
if (c = (c = "greatworks" == this.mContextPanelDataBinding.tradeType ? null : null !== this.mSelectedRegionViewItem ? this.GetRegionalConnectedCities(this.mSelectedRegionViewItem.mRegionalBoxID) :
this.GetRegionalConnectedCities(this.mRegionData.mPlayingBox.uid)) ? c[0] : null) {
var d = c[1],
e = [],
f;
for (f in d)
for (var g = 0, c = a.connectionData.length; g < c; g++)
d[f].type == a.connectionData[g].type && e.unshift(d[f]);
0 < e.length && (a.connectionData = e);
this.mContextPanelData = a.connectionData;
this.mContextPanelObj = gUIManager.LoadAndCacheLayout(this.mContextPanelDataBinding.layout, this.mContextPanelContainer);
if (a.heavyLayers) {
b.mParentControl.SetVisibility(!0);
var h = this,
i = a.heavyLayers.length;
f = Array(i);
d = 0;
for (c =
i; d < c; ++d)
e = 3 * d, g = scrui.RequestStringFromKey(new simcity.cKey(1088479232, a.heavyLayers[d], scrui.kResourceTypePropertyList)), f[e] = scrui.BuildRequestQuery([simcity.kDataProperties, g, simcity.kPropertyLayerName]), f[e + 1] = scrui.BuildRequestQuery([simcity.kDataProperties, g, simcity.kPropertyLayerIconKey]), f[e + 2] = scrui.BuildRequestQuery([simcity.kDataProperties, g, simcity.kPropertyLayerDarkIconKey]);
scrui.RequestGameData(f, function (c) {
for (var d = i - 1; d >= 0; --d) {
var e = d * 3,
f = gUIManager.LoadAndCacheLayout("Layouts/Palette/PaletteLayerToggle2.js",
b);
f.SetPosition(0, d * f.mHeight);
var g = Number(a.heavyLayers[d]);
f.mUserData = g;
f.mAllLayersButton = true;
for (var p = f.FindControlByID(231251442).mExposedProperties, q = 0, o = p.length; q < o; ++q) {
var r = p[q],
s = scrui.cProperties.GetPropertyDataByID(r.mPropertyID);
switch (r.mPropertyLabel) {
case "WhiteIcon":
s.mSet(r.mControl, scrui.PathFromResourceKey(c[e + 1]));
break;
case "DarkIcon":
var t = c[e + 2];
t || (t = c[e + 1]);
s.mSet(r.mControl, scrui.PathFromResourceKey(t));
break;
case "TooltipText":
if (t = c[e]) {
t = "/" + scrui.DecimalToHex(t.tableID) +
"/" + scrui.DecimalToHex(t.stringID);
s.mSet(r.mControl, t)
}
break;
case "UserData":
s.mSet(r.mControl, g)
}
}
h.mLayerButtons.push(f);
simcity.gGlobalUIHandler.mLayerUIHandler.RegisterLayerButton(f)
}
})
}
this.mIsContextPanelActive = !0;
this.mContextPanelAnim.Start(scrui.cAnimation.kPlayForward);
this.UpdateDataLayerContextPanel()
} else
this.mGWLowerPanelUI.ShowGreatWorksLowerPanel(this.mSelectedRegionViewItem), this.mContextPanelContainer.DestroyChildren(), this.mContextPanelObj = gUIManager.LoadAndCacheLayout(simcity.kRegionDataLayers_ContextPanels[simcity.kRegionDataLayer_GreatWorks].layout,
this.mContextPanelContainer), this.mContextPanelAnim.Start(scrui.cAnimation.kPlayForward)
}
}
};
simcity.cRegionViewUIHandler.prototype.ForceGWUnitSelected = function () {
var a = this.GetConnectedGWID();
a && (simcity.gEventManager.TriggerEvent(simcity.gEventTypes.GENERICEVENT, a, null), null !== this.mSelectedRegionViewItem && this.mSelectedRegionViewItem.SetMouseSelectionState(simcity.kRegionViewItemMouseSelectionStates.unselected), (this.mSelectedRegionViewItem = this.mRegionViewItems[a]) && this.mSelectedRegionViewItem.SetMouseSelectionState(simcity.kRegionViewItemMouseSelectionStates.selected), this.ZoomToCity(a))
};
simcity.cRegionViewUIHandler.prototype.GetConnectedGWID = function () {
for (var a = Object.keys(this.mRegionData.mConnectedUnits), b = Object.keys(this.mRegionData.mGreatWorksRegional), c = 0; c < a.length; c++)
for (var d = 0; d < b.length; d++) {
var e = b[d];
if (a[c] == e)
return e
}
return null
};
simcity.cRegionViewUIHandler.prototype.ActivateLightDataLayer = function () {
simcity.gGlobalUIHandler.mLayerUIHandler.ActivateLayer(this.mSelectedDataLayerID)
};
simcity.cRegionViewUIHandler.prototype.ClearHeavyLayerButtons = function () {
for (var a = this.mLayerButtons.length - 1; 0 <= a; a--)
simcity.gGlobalUIHandler.mLayerUIHandler.UnregisterLayerButton(this.mLayerButtons[a]), this.mLayerButtons[a].DestroyControl();
this.mLayerButtons = []
};
simcity.cRegionViewUIHandler.prototype.UpdateDataLayerContextPanel = function () {
if (this.mContextPanelDataBinding && this.mContextPanelDataBinding.tradeType && this.mContextPanelContainer.mChildren && (this.mContextPanelDataBinding.tokenType || this.mContextPanelDataBinding.tradeType || this.mContextPanelDataBinding.giftingType || this.mContextPanelDataBinding.greatWorksType))
switch (this.mContextPanelDataBinding.tradeType) {
case "token":
this.mTradeUI.ShowTokenUI(this.mContextPanelDataBinding.tokenType);
break;
case "trade":
this.mTradeUI.ShowTradeUI(this.mContextPanelDataBinding.utilityType);
break;
case "gifting":
this.mTradeUI.ShowGiftingUI(this.mContextPanelDataBinding.giftingType);
break;
case "greatworks":
this.ShowDataLayerContextPanel()
}
};
simcity.cRegionViewUIHandler.prototype.HideDataLayerContextPanel = function () {
this.ClearHeavyLayerButtons();
this.mContextPanelContainer.DestroyChildren();
this.mIsContextPanelActive = !1;
this.mGWLowerPanelUI.HideGreatWorksLowerPanel();
this.mContextPanelAnim.Start(scrui.cAnimation.kPlayReverse)
};
simcity.cRegionViewUIHandler.prototype.LoadTradeIcons = function () {};
simcity.cRegionViewUIHandler.prototype.UpdateTradeIcons = function () {};
simcity.cRegionViewUIHandler.prototype.RefreshRegionTradeUnitList = function () {
if (this.mSelectedRegionViewItem) {
var a = this;
scrui.RequestGameData([scrui.BuildRequestQuery(["RegionTradeUnits", this.mSelectedRegionViewItem.mRegionalBoxID])], function (b) {
a.mViewingTradeUnitRefList = b
})
}
};
simcity.UpdateIconForResource = function (a, b, c, d) {
c = 0 !== c;
a.exportingIcon.SetVisibility(c);
c ? a.importingIcon.SetVisibility(!1) : a.importingIcon.SetVisibility(0 !== b);
a.toggleIncomingButton && a.toggleIncomingButton.SetSelected(d)
};
simcity.cRegionViewUIHandler.prototype.GetClaimedCities = function () {
return this.mRegionData.mCities
};
simcity.cRegionViewUIHandler.prototype.GetRegionalConnectedCities = function (a) {
var b = [],
c;
for (c in this.mRegionData.mCityTradeData) {
var d = this.mRegionData.mCityTradeData[c];
d && d.connections && (d = d.connections[a]) && d.hasOwnProperty("connectionData") && b.push([this.mRegionData.mBoxes[c], d.connectionData])
}
return b
};
simcity.cRegionViewUIHandler.prototype.GetDirectionalCityTradeData = function (a, b) {
var c = this.mRegionData.mCityTradeData[a].connections[b];
return c && c.hasOwnProperty("connectionData") ? c.connectionData : null
};
simcity.cRegionViewUIHandler.prototype.GetCityTradeData = function (a) {
for (var b = {
outgoing : [],
incoming : []
}, c = this.GetRegionalConnectedCities(a), d = 0, e = c.length; d < e; d++) {
var f = c[d],
g = f[0],
f = f[1];
b.outgoing.push({
cityData : g,
tradeData : {
fireToken : 1 === f.tradeTokens.data.fireToken ? !0 : !1,
garbageToken : 1 === f.tradeTokens.data.garbageToken ? !0 : !1,
policeToken : 1 === f.tradeTokens.data.policeToken ? !0 : !1,
healthToken : 1 === f.tradeTokens.data.healthToken ? !0 : !1,
fireTokenPending : f.tradeTokens.data.fireTokenPending,
garbageTokenPending : f.tradeTokens.data.garbageTokenPending,
policeTokenPending : f.tradeTokens.data.policeTokenPending,
healthTokenPending : f.tradeTokens.data.healthTokenPending,
tradingPower : f.power.data.tradePower,
tradingWater : f.water.data.tradingWater
}
});
for (var f = this.GetRegionalConnectedCities(g.uid), h = 0, i = f.length; h < i; h++) {
var j = f[h];
j[0].uid == a && (j = j[1], b.incoming.push({
cityData : g,
tradeData : {
fireToken : 1 === j.tradeTokens.data.fireToken ? !0 : !1,
garbageToken : 1 === j.tradeTokens.data.garbageToken ? !0 : !1,
policeToken : 1 === j.tradeTokens.data.policeToken ? !0 : !1,
healthToken : 1 ===
j.tradeTokens.data.healthToken ? !0 : !1,
fireTokenPending : j.tradeTokens.data.fireTokenPending,
garbageTokenPending : j.tradeTokens.data.garbageTokenPending,
policeTokenPending : j.tradeTokens.data.policeTokenPending,
healthTokenPending : j.tradeTokens.data.healthTokenPending,
tradingPower : j.power.data.tradePower,
tradingWater : j.water.data.tradingWater
}
}))
}
}
return b
};
simcity.cRegionViewUIHandler.prototype.IsConnectedCity = function (a) {
return this.mRegionData.mConnectedUnits[a] ? !0 : !1
};
simcity.cRegionViewUIHandler.prototype.IsClaimedCity = function (a) {
return this.mRegionData.mCities[a] ? !0 : !1
};
simcity.cRegionViewUIHandler.prototype.IsPlayingCity = function (a) {
return this.mRegionData.mPlayingBox.uid == a ? !0 : !1
};
simcity.cRegionViewUIHandler.prototype.IsOwnCity = function (a) {
return this.IsClaimedCity(a) && this.mRegionData.mCities[a].creator.screenName === simcity.gGlobalUIHandler.mScreenName ? !0 : !1
};
simcity.cRegionViewUIHandler.prototype.PushPlayerListToClient = function () {
var a = '{"ids":[',
b = 0,
c;
for (c in this.mRegionData.mCities) {
var d = this.mRegionData.mCities[c];
0 !== b && (a += ",");
a += '{"city":' + c + ',"user":' + d.creatorId + "}";
b++
}
scrui.PostGameCommand(scrui.BuildCommand(["RegionPlayers", a + "]}"]))
};
simcity.cRegionViewUIHandler.prototype.RefreshGreatWorksData = function (a) {
if (a)
for (var b = 0, c = a.greatworks.length; b < c; b++) {
var d = a.greatworks[b];
this.mRegionData.mGreatWorksRegional[d.UID] = d;
this.mRegionData.mRegionUnitsLookup[d.UID] && (this.mRegionData.mRegionUnitsLookup[d.UID].regionalUnitRef = scrui.RequestStringFromUnitRef(d.unitRef), this.mGreatWorkDataLoaded = !0)
}
else
scrui.PostGameCommand(scrui.BuildCommand(["RequestGreatWorksContributors"]))
};
simcity.cRegionViewUIHandler.prototype.IsDataLoaded = function () {
return 0 == simcity.gGlobalUIHandler.mRegionID || this.mRegionData.mTotals.boxes ? !0 : Object.keys(this.mRegionData.mRegionUnitsLookup).length ? !0 : !1
};
simcity.cRegionViewUIHandler.prototype.LookupUnitRef = function (a, b) {
var c = this.mRegionData.mRegionUnitsLookup;
if (c.hasOwnProperty(a))
switch (c = c[a], b) {
case "local":
return c.localUnitRef;
default:
return c.regionalUnitRef
}
return null
};
simcity.cRegionViewUIHandler.prototype.GetRegionalBoxType = function (a) {
return this.mRegionData.mRegionUnitsLookup[a] ? this.mRegionData.mRegionUnitsLookup[a].type || null : null
};
simcity.cRegionViewUIHandler.prototype.UpdateRegionalAlerts = function () {
for (var a = this.mRegionData.mTotals.cities, b = Object.keys(this.mRegionData.mCities), c = 0, d = simcity.kRegionalAlerts.length; c < d; c++)
for (var e = simcity.kRegionalAlerts[c], f = 0; f < a; f++) {
var g = this.mRegionData.mCities[b[f]].uid,
h = this.GetRegionalConnectedCities(g)[0];
if (h) {
for (var h = h[1], i = Object.keys(h), j = Object.keys(e.connectionData), k = [], l = 0, m = i.length; l < m; l++)
for (var n = 0, p = j.length; n < p; n++)
h[i[l]].type == e.connectionData[j[n]].type &&
k.unshift(h[i[l]]);
0 < k.length && (e.connectionData = k)
}
e.update(g)
}
};
simcity.cRegionViewUIHandler.prototype.UpdateRegionalInfoPanel = function () {
var a = 0,
b = 0,
c = 0,
d = [scrui.BuildRequestQuery(["bins", simcity.kResourceIDTotalResidential])];
scrui.RequestGameData(d, function (a) {
c = a[0].amount
});
var d = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mPlayingBox.uid,
e;
for (e in this.mRegionData.mCityTradeData) {
var f = this.mRegionData.mCityTradeData[e];
f.localData && (a += f.localData.data.budget, b = e != d ? b + simcity.GetFudgedPopulation(f.localData.data.population) : b + simcity.GetFudgedPopulation(c))
}
this.mRegionalBudgetText.SetTextFromNumber(a);
this.mRegionalPopulationText.SetTextFromNumber(b)
};
simcity.cRegionViewUIHandler.prototype.SparklePaletteButton = function (a) {
var b = null;
switch (a) {
case simcity.kEventIDWireTradeServiceTokensFireServiceTokenCanGrant:
b = simcity.kRegionDataLayer_Fire;
break;
case simcity.kEventIDWireTradeServiceTokensGarbageServiceTokenCanGrant:
case simcity.kEventIDWireTradeServiceTokensRecyclingServiceTokenCanGrant:
b = simcity.kRegionDataLayer_Garbage;
break;
case simcity.kEventIDWireTradeServiceTokensHealthServiceTokenCanGrant:
b = simcity.kRegionDataLayer_Health;
break;
case simcity.kEventIDWireTradeServiceTokensPoliceServiceTokenCanGrant:
b =
simcity.kRegionDataLayer_Police
}
b && (a = this.mDataLayerButtonSparkles[b]) && a.SetVisibility(!0)
};
simcity.cRegionViewUIHandler.prototype.UpdateHomeBox = function () {
if (this.mRegionData.mPlayingBox.creatorId && this.mRegionData.mPlayers[this.mRegionData.mPlayingBox.creatorId]) {
var a = this.mRegionData.mPlayers[this.mRegionData.mPlayingBox.creatorId].screenName;
if (this.mRegionData.mPlayingBox.name && a && !this.homeBoxAvatarSet) {
this.homeBoxAvatarSet = !0;
var b = simcity.gGlobalUIHandler.mSharedUIParent.FindControlByID(simcity.kRegionView_HomeBoxAvatar);
simcity.gUIToolbox.SetAvatar(b, a)
}
}
};
simcity.cRegionViewUIHandler.prototype.SetGWUnlocked = function (a, b) {
a ? (this.mGWRecentlyUnlocked = a, this.mGWUnlockedID = b) : this.mGWRecentlyUnlocked = null
};
simcity.cRegionViewUIHandler.prototype.GetGWUnlocked = function () {
return this.hasOwnProperty("mGWRecentlyUnlocked") && !0 == this.mGWRecentlyUnlocked ? this.mGWUnlockedID : !1
};
simcity.cRegionViewUIHandler.prototype.UpdateGWUnlockSparkleChecker = function () {
var a = this.mDataLayerButtonSparkles[simcity.kRegionDataLayer_GreatWorks];
a && (!a.mIsVisible && this.GetGWUnlocked()) && a.SetVisibility(!0)
};
simcity.cRegionViewUIHandler.prototype.CheckForClearingGWSparkle = function () {
this.SetGWUnlocked(!1)
};
simcity.cRegionViewUIHandler.prototype.HandlePossibleGWSelection = function () {
if ("greatwork" == this.mSelectedRegionViewItem.mViewUnitType)
if (simcity.IsTutorialInProgress())
this.mSelectedRegionViewItem = null;
else {
var a = this.GetConnectedGWID();
if (this.mSelectedRegionViewItem.mRegionalBoxID == a) {
if (a = this.mDataLayerButtons[scrui.DecimalToHex(simcity.kRegionDataLayer_GreatWorks)])
a = a.FindControlByID(simcity.kRegionView_DataLayerButton), a.SetSelected(!0), this.mSelectedDataControl = a, this.mSelectedDataLayerID =
a.mUserData;
this.ForceGWUnitSelected();
this.ShowDataLayerContextPanel()
} else
this.ClosePalette()
}
else
this.mSelectedDataLayerID == simcity.kRegionDataLayer_GreatWorks && this.ClosePalette()
};
simcity.FindConnectedGreatWork = function () {
for (var a = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mRegionUnitsLookup, b = Object.keys(simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mConnectedUnits), c = 0, d = b.length; c < d; c++)
if (a[b[c]] && "greatwork" === a[b[c]].type)
return [b[c], a[b[c]]];
return null
};
simcity.cRegionViewUIHandler.prototype.HandleTriggerKey = function (a) {
if (simcity.gGlobalUIHandler.mRegionViewUIHandler.IsVisible() && !simcity.IsTutorialInProgress())
switch (a) {
case simcity.kKeyTrigger_NextHeavyLayer:
this.RegionViewCycleHeavyLayer()
}
};
simcity.cRegionViewUIHandler.prototype.RegionViewCycleHeavyLayer = function () {
var a = null;
switch (this.mSelectedDataLayerID) {
case simcity.kRegionDataLayer_Workers:
a = simcity.kRegionDataLayer_WorkerLevels;
break;
case simcity.kRegionDataLayer_Shoppers:
a = simcity.kRegionDataLayer_ShopperLevels;
break;
case simcity.kRegionDataLayer_Freight:
a = simcity.kRegionDataLayer_FreightLevels;
break;
case simcity.kRegionDataLayer_Students:
a = simcity.kRegionDataLayer_StudentLevels;
break;
case simcity.kRegionDataLayer_Power:
a = simcity.kRegionDataLayer_PowerLevels;
break;
case simcity.kRegionDataLayer_Water:
a = simcity.kRegionDataLayer_WaterLevels;
break;
case simcity.kRegionDataLayer_Sewage:
a = simcity.kRegionDataLayer_SewageLevels;
break;
case simcity.kRegionDataLayer_Fire:
a = simcity.kRegionDataLayer_FireLevels;
break;
case simcity.kRegionDataLayer_Police:
a = simcity.kRegionDataLayer_PoliceLevels;
break;
case simcity.kRegionDataLayer_Health:
a = simcity.kRegionDataLayer_HealthLevels;
break;
case simcity.kRegionDataLayer_Garbage:
a = simcity.kRegionDataLayer_GarbageLevels;
break;
case simcity.kRegionDataLayer_Transport:
a =
simcity.kRegionDataLayer_TransportLevels
}
if (a)
for (var b = simcity.gGlobalUIHandler.mLayerUIHandler.GetCurrentActiveLayer(), c = a.length, d = 0, d = 0; d < c; d++)
if (b == a[d]) {
d = d + 1 < c ? d + 1 : 0;
simcity.gGlobalUIHandler.mLayerUIHandler.ActivateLayer(a[d]);
break
}
};
simcity.cRegionViewUIHandler.prototype.SendInvites = function (a) {
var b = simcity.gGlobalUIHandler.mRegionID,
c = simcity.gGlobalUIHandler.mRegionViewUIHandler.mSelectedRegionViewItem.mBoxData.id,
d = {
tabName : "IN_GAME"
};
simcity.gGameInvitesController.HideInvitePanel(gUIManager.FindControlByID(244120857));
simcity.gGameInvitesController.InviteUsersToCity(b, c, a, function () {
simcity.AddTelemetry("SC_UI_INVITE_SUCCESS", 12, d);
var b = a.split(",") || "0";
simcity.gGameInvitesController.mDialogManager.ShowLocalizedModal(simcity.cGameInvitesController.LocaleString.kInviteTitle,
simcity.cGameInvitesController.LocaleString.kInviteSuccess, null, {
boxName : simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mRegionName
}, {
inviteCount : b.length
})
}, function () {
simcity.AddTelemetry("SC_UI_INVITE_FAILURE", 12, d);
simcity.gGameInvitesController.mDialogManager.ShowLocalizedModal(simcity.cGameInvitesController.LocaleString.kInviteTitle, simcity.cGameInvitesController.LocaleString.kInviteFailed, null, {
boxName : simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData.mRegionName
})
})
};
simcity.ListBox = {};
simcity.cListBox = function () {
scrui.cToolbox.call(this);
this.SetDimensionsFromConfigData();
this.mData = this.mSelection = null
};
goog.inherits(simcity.cListBox, scrui.cToolbox);
simcity.cListBox.kItemHeight = 20;
simcity.cListBox.kItemPadding = 5;
simcity.cListBox.kItemColor = "white";
simcity.cListBox.kSelectedItemColor = "#FFD700";
simcity.cListBox.kHighlightItemColor = "#FF8C00";
simcity.cListBox.prototype.SetContent = function (a) {
this.GetContainerElement();
this.mData = a;
this.Populate(this.mData, 0)
};
simcity.cListBox.prototype.SetDimensionsFromConfigData = function () {
this.mPinBottom = this.mPinRight = this.mPinTop = this.mPinLeft = !1;
this.mWidth = 300;
this.mHeight = 500;
this.mLeft = 25;
this.mTop = 150
};
simcity.cListBox.prototype.Show = function () {
this.Hide();
this.CreateDrawable("Speech Balloons");
this.mRootElement.onmousedown = simcity.cListBox.Private_RootMouseDown;
this.CreateCloseButton()
};
simcity.cListBox.prototype.Hide = function () {
this.IsVisible() && scrui.cToolbox.prototype.Hide.call(this)
};
simcity.cListBox.prototype.Populate = function (a, b) {
for (var c = this.GetContainerElement(), d = 0, e = this.mData.length; d < e; ++d) {
var f = this.mData[d],
g = b,
h = c,
i = document.createElement("div");
h.appendChild(i);
i.style.position = "absolute";
i.style.top = g + "px";
i.style.left = "10px";
i.style.width = "300px";
i.style.height = simcity.cListBox.kItemHeight + "px";
i.mTop = g;
h = document.createElement("span");
i.appendChild(h);
h.style.position = "absolute";
h.style.top = "0px";
h.style.left = "0px";
h.style.width = "300px";
h.style.height = simcity.cListBox.kItemHeight +
"px";
h.style.color = simcity.cListBox.kItemColor;
h.style.cursor = "default";
h.innerHTML = f;
var j = document.createElement("div");
i.appendChild(j);
j.style.position = "absolute";
j.style.top = "0px";
j.style.left = "0px";
j.style.width = "100%";
j.style.height = "100%";
j.onmousedown = simcity.cListBox.Private_ItemMouseDown;
j.onmouseover = simcity.cListBox.Private_ItemGainFocus;
j.onmouseout = simcity.cListBox.Private_ItemLoseFocus;
j.id = "coverElement";
j.mTop = g;
j.mToolbox = this;
j.mOriginalText = f;
j.mTextElement = h;
b = g += simcity.cListBox.kItemHeight
}
return b
};
simcity.cListBox.prototype.ClearItems = function () {
for (var a = this.GetContainerElement(); 0 < a.childNodes.length; )
a.removeChild(a.firstChild)
};
simcity.cListBox.prototype.SetSelection = function (a) {
for (var b = this.GetContainerElement(), c = b.childNodes.length, d = 0; d < c; ++d) {
var e = b.childNodes[d].firstChild;
e.style.color = e === a ? simcity.cListBox.kSelectedItemColor : simcity.cListBox.kItemColor
}
this.mSelection = a ? a.innerHTML : null
};
simcity.cListBox.Private_RootMouseDown = function () {
scrui.gUIManager.SetInputHandled(!0)
};
simcity.cListBox.Private_ItemGainFocus = function (a) {
a = scrui.GetEventTarget(a);
a.mTextElement && a.mTextElement.innerHTML !== a.mToolbox.mSelection && (a.mTextElement.style.color = simcity.cListBox.kHighlightItemColor);
scrui.gUIManager.mElementUnderMouse = a
};
simcity.cListBox.Private_ItemLoseFocus = function (a) {
a = scrui.GetEventTarget(a);
a.mTextElement && a.mTextElement.innerHTML !== a.mToolbox.mSelection && (a.mTextElement.style.color = simcity.cListBox.kItemColor);
scrui.gUIManager.mElementUnderMouse = null
};
simcity.cListBox.Private_ItemMouseDown = function (a) {
a = scrui.GetEventTarget(a);
a.mToolbox.SetSelection(a.mTextElement);
scrui.gUIManager.SetInputHandled(!0)
};
simcity.TutorialCalloutUI = {};
simcity.kKeyTrigger_SkipTutorial = 253189869;
simcity.cTutorialCalloutManager = function () {
this.UIHandler = scrui.cUIHandler;
this.UIHandler();
this.mDataBinding = null;
this.mCallout = new simcity.cTutorialCalloutUI;
this.mCallout.Init();
this.optionsMenu = this.mRegionBoxID = this.mTransportType = this.mBuildingPointerLayout = this.mUnitString = null
};
goog.inherits(simcity.cTutorialCalloutManager, scrui.cUIHandler);
simcity.cTutorialCalloutManager.prototype.PointToBuilding = function (a) {
this.mDataBinding = a;
var a = [scrui.BuildRequestQuery(["getToyOfType", this.mDataBinding.targetToy])],
b = this;
scrui.RequestGameData(a, function (a) {
if (a = a[0])
b.mUnitString = scrui.RequestStringFromUnitRef(a)
})
};
simcity.cTutorialCalloutManager.prototype.PointToTransport = function (a) {
this.mDataBinding = a;
this.mTransportType = this.mDataBinding.targetTransport
};
simcity.cTutorialCalloutManager.prototype.PointToRegionBox = function (a) {
this.mDataBinding = a;
this.mRegionBoxID = this.mDataBinding.targetRegionBox
};
simcity.cTutorialCalloutManager.prototype.ShowCallout = function (a) {
scrui.Assert(a, "a callout data binding must be specified!");
this.mDataBinding = a;
this.mCallout.SetDialogLayout(a.dialogLayoutPath, a.dialogInRegion);
if (this.mCallout.mDialogLayout) {
var b = this.mCallout.mDialogLayout.FindControlByID(simcity.cTutorialCalloutUI.kTxtIDDialogText);
if (b) {
var c = a.dialogString,
d = void 0,
c = new scrui.cLocaleString(c.tableID, c.stringID, c.placeholder);
a.hasOwnProperty("dialogStringTokens") && (d = a.dialogStringTokens());
b.SetLocaleText(c, d)
}
if ((b = this.mCallout.mDialogLayout.FindControlByID(simcity.cTutorialCalloutUI.kTxtIDHeaderText)) && a.headerString)
c = a.headerString, c = new scrui.cLocaleString(c.tableID, c.stringID, c.placeholder), b.SetLocaleText(c);
if (b = this.mCallout.mDialogLayout.FindControlByID(simcity.cTutorialCalloutUI.kTxtIDStepNumberText))
a.stepNumberString ? (c = a.stepNumberString, c = new scrui.cLocaleString(c.tableID, c.stringID, c.placeholder), b.SetLocaleText(c)) : b.SetRawText("")
}
this.mDataBinding.hasOwnProperty("targetControl") &&
(c = this.mDataBinding.allowNullTargetControl, this.mCallout.ShowOnControl(this.mDataBinding.targetControl(), c));
this.SetupCallout();
a.lockUIWithCamera && (simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(null, !1), simcity.gGlobalUIHandler.mTutorialManager.mMouseEaterWindow.SetIgnoreMouse(!0), gUIManager.mBlockMouseClick = !0);
a.init && a.init();
return this.mCallout
};
simcity.cTutorialCalloutManager.prototype.SetupCallout = function () {
simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(null, !1);
var a = gUIManager.FindControlByID(simcity.kWinIDMainMenu);
if (a.mIsVisible)
simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(simcity.GetOptionsMenuButton(), !0), simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(gUIManager.FindControlByID(simcity.kWinIDMainMenu), !0);
else if (this.mDataBinding && this.mDataBinding.hasOwnProperty("targetControl")) {
var b = this.mDataBinding.targetControl();
this.mCallout.mTargetInfo.mPosition = null;
this.mCallout.UpdateCallout(b, a.mIsVisible);
simcity.gGlobalUIHandler.mTutorialManager.mMouseEaterWindow.GetControlID() == simcity.kWinMouseEaterID && simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(simcity.GetOptionsMenuButton(), !0);
a = this.mCallout.mDialogLayout.FindControlByID(simcity.cTutorialCalloutUI.kBtnIDOkay);
this.mDataBinding && (this.mCallout.mDialogLayout && a && a.mIsVisible) && simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(this.mCallout.mDialogLayout,
!0);
this.ShowBlueInfoButtons()
} else
this.mCallout.mDialogLayout && (this.mDataBinding && this.mDataBinding.hasOwnProperty("lockUI") && !0 == this.mDataBinding.lockUI) && (simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(this.mCallout.mDialogLayout, !0), simcity.gGlobalUIHandler.mTutorialManager.mMouseEaterWindow.GetControlID() == simcity.kWinMouseEaterID && simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(simcity.GetOptionsMenuButton(), !0), this.ShowBlueInfoButtons());
gUIManager.UpdateControlUnderMouse()
};
simcity.cTutorialCalloutManager.prototype.ShowBlueInfoButtons = function () {
gUIManager.WalkChildren(function (a) {
(247237927 == a.GetControlID() || 253033863 == a.GetControlID() && (simcity.gGlobalUIHandler.mRegionViewUIHandler.IsVisible() || simcity.gGlobalUIHandler.mToolPaletteUIHandler.mToolPanelOpen)) && a.mIsVisible && simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(a, !0, !0)
})
};
simcity.cTutorialCalloutManager.prototype.HideCallout = function () {
if (this.mCallout.IsVisible()) {
this.mCallout.Hide();
var a = this.mDataBinding;
this.mDataBinding = null;
simcity.gGlobalUIHandler.mTutorialManager.TutorialStateOnCompletion(a)
}
this.mBuildingPointerLayout.SetVisibility(!1);
this.mRegionBoxID = this.mTransportType = this.mUnitString = null
};
simcity.cTutorialCalloutManager.prototype.EnableCallout = function () {
this.mCallout.IsVisible() && this.mCallout.Enable()
};
simcity.cTutorialCalloutManager.prototype.Init = function () {
this.mBuildingPointerLayout = gUIManager.LoadLayout("Layouts/Tutorial/BuildingPointer.js", gUIManager.GetRootWindow());
this.mBuildingPointerLayout.SetVisibility(!1);
this.optionsMenu = gUIManager.FindControlByID(simcity.kWinIDMainMenu)
};
simcity.cTutorialCalloutManager.prototype.Update = scrui.Client_ProfZone("cTutorialCalloutManager.Update", function () {
this.mDataBinding && (this.mDataBinding.hasOwnProperty("completionTest") && this.mDataBinding.completionTest()) && this.HideCallout();
this.mDataBinding && this.mDataBinding.lockUIWithCamera && (gUIManager.mControlUnderMouse && gUIManager.mControlUnderMouse.GetControlID() != simcity.cTutorialCalloutUI.kBtnIDOkay ? (gUIManager.mBlockMouseClick = !0, gUIManager.SetCaptureControl(null), gUIManager.SetControlUnderMouse(null)) :
gUIManager.mBlockMouseClick = !1);
var a = this.optionsMenu.mIsVisible;
this.mCallout.IsVisible() && this.mDataBinding.hasOwnProperty("targetControl") && this.mCallout.UpdateCallout(this.mDataBinding.targetControl(), a);
if (this.mTransportType) {
var b = [scrui.BuildRequestQuery(["agent", "findnearestagent", "screenPosition"])],
c = this;
scrui.RequestGameData(b, function (b) {
(b = b[0]) && c.mBuildingPointerLayout.SetPosition(b[0], b[1]);
c.mBuildingPointerLayout.SetVisibility(b !== null && !a)
})
}
if (this.mRegionBoxID) {
var c = this,
b = simcity.gGlobalUIHandler.mRegionViewUIHandler.GetCityButton(246461222, this.mRegionBoxID),
d = null;
b && (d = b.GetAbsolutePosition());
d && c.mBuildingPointerLayout.SetPosition(d[0], d[1]);
c.mBuildingPointerLayout.SetVisibility(null !== d && !a)
}
this.mUnitString && (b = [scrui.BuildRequestQuery(["units", this.mUnitString, "screenPositionTop"])], c = this, scrui.RequestGameData(b, function (b) {
(b = b[0]) ? c.mBuildingPointerLayout.SetPosition(b[0], b[1]) : c.mUnitString = null;
c.mBuildingPointerLayout.SetVisibility(b !== null && !a)
}))
});
simcity.cTutorialCalloutManager.prototype.HandleGameEvent = function (a, b) {
switch (a) {
case simcity.kMessageCinematicFinishedPlaying:
if (this.mDataBinding && this.mDataBinding.hasOwnProperty("onCinematicEnd"))
this.mDataBinding.onCinematicEnd();
break;
case simcity.kMessageKeyTrigger:
switch (b.triggerCode) {
case simcity.kKeyTrigger_SkipTutorial:
simcity.gGlobalUIHandler && simcity.IsTutorialInProgress() && simcity.SkipTutorial()
}
}
};
simcity.cTutorialCalloutManager.prototype.HandleUIMessage = function (a, b) {
switch (a) {
case scrui.kMsgTypeButtonClicked:
switch (b) {
case simcity.cTutorialCalloutUI.kBtnIDOkay:
case simcity.cTutorialCalloutUI.kBtnIDQuit:
case simcity.cTutorialCalloutUI.kBtnKeepPlaying:
this.mCallout.Hide();
simcity.gGlobalUIHandler.mTutorialManager.TutorialStateOnCompletion(this.mDataBinding);
break;
case simcity.cTutorialCalloutUI.kBtnIDCancel:
this.mCallout.Hide();
this.mDataBinding && this.mDataBinding.hasOwnProperty("onCancelled") &&
(this.mDataBinding.onCancelled(), simcity.gGlobalUIHandler.mTutorialManager.mTutorialState = simcity.cTutorialManager.kTutorialStateCompleted);
break;
case simcity.cTutorialCalloutUI.kBtnIDNext:
this.mCallout.Hide();
if (this.mDataBinding && this.mDataBinding.hasOwnProperty("onNext"))
this.mDataBinding.onNext();
break;
case simcity.cTutorialCalloutUI.kBtnIDQuitApp:
scrui.PostGameCommand(scrui.BuildCommand(["quitapp"]));
break;
case simcity.cTutorialCalloutUI.kBtnIDSkip:
simcity.SkipTutorial()
}
}
};
simcity.cTutorialCalloutUI = function () {
this.mTutorialParentWin = this.mDLCLayout = this.mOpeningLayout = this.mDialogLayout = this.mPointerLayout = null;
this.mFirstUpdate = 1;
this.mOriginalTop = 0;
this.mTargetInfo = {
mControl : null,
mPosition : null,
mDimensions : null
}
};
simcity.cTutorialCalloutUI.kWinIDArrowNW = 205421882;
simcity.cTutorialCalloutUI.kWinIDArrowNE = 205421884;
simcity.cTutorialCalloutUI.kWinIDArrowSE = 205421886;
simcity.cTutorialCalloutUI.kWinIDArrowSW = 205421888;
simcity.cTutorialCalloutUI.kTxtIDDialogText = 205599166;
simcity.cTutorialCalloutUI.kTxtIDHeaderText = 238505461;
simcity.cTutorialCalloutUI.kTxtIDStepNumberText = 238505767;
simcity.cTutorialCalloutUI.kBtnIDOkay = 206727489;
simcity.cTutorialCalloutUI.kBtnIDQuitApp = 3307640046;
simcity.cTutorialCalloutUI.kBtnIDCancel = 207064027;
simcity.cTutorialCalloutUI.kBtnIDNext = 234298221;
simcity.cTutorialCalloutUI.kBtnIDQuit = 238848936;
simcity.cTutorialCalloutUI.kBtnKeepPlaying = 238848937;
simcity.cTutorialCalloutUI.kBtnIDSkip = 249487164;
simcity.cTutorialCalloutUI.kWinIDNextButtonDialogContainer = 234294679;
simcity.cTutorialCalloutUI.kWinIDNextButtonDialogCenteredContainer = 238853793;
simcity.cTutorialCalloutUI.prototype.Init = function () {
this.mPointerLayout = gUIManager.LoadLayout("Layouts/Tutorial/PointerContainer.js", gUIManager.GetRootWindow());
this.mOpeningLayout = gUIManager.LoadLayout("Layouts/Tutorial/OpeningScreen.js", gUIManager.GetRootWindow());
this.mDLCLayout = gUIManager.LoadLayout("Layouts/Tutorial/DlcDialog.js", gUIManager.GetRootWindow());
this.mPointerLayout.SetVisibility(!1);
this.mOpeningLayout.SetVisibility(!1);
this.mDLCLayout.SetVisibility(!1);
this.mTutorialParentWin = gUIManager.FindControlByID(248363637)
};
simcity.cTutorialCalloutUI.prototype.IsNextButtonDialog = function () {
return this.mDialogLayout && this.mDialogLayout.FindControlByID(simcity.cTutorialCalloutUI.kWinIDNextButtonDialogContainer)
};
simcity.cTutorialCalloutUI.prototype.Enable = function () {
if (this.mDialogLayout) {
var a = this.mDialogLayout.FindControlByID(simcity.cTutorialCalloutUI.kBtnIDNext);
a && (a.SetEnabled(!0), a.SetVisibility(!0))
}
};
simcity.cTutorialCalloutUI.prototype.SetDialogLayout = function (a) {
this.ClearDialogLayout();
switch (a) {
case simcity.kDialogOpeningScreen:
this.mDialogLayout = this.mOpeningLayout;
var b = this.mDialogLayout.FindControlByID(simcity.kWinIDOpening),
c = this.mDialogLayout.FindControlByID(simcity.kWinIDClosing);
b.SetVisibility(!0);
c.SetVisibility(!1);
break;
case simcity.kDialogDemoEndScreen:
this.mDialogLayout = this.mOpeningLayout;
b = this.mDialogLayout.FindControlByID(simcity.kWinIDOpening);
c = this.mDialogLayout.FindControlByID(simcity.kWinIDClosing);
b.SetVisibility(!1);
c.SetVisibility(!0);
break;
case simcity.kDialogCenteredDLC:
this.mDialogLayout = this.mDLCLayout;
case simcity.kDialogTutorialEnd:
case simcity.kDialogTutorialCentered:
this.mDialogLayout = this.mTutorialParentWin.FindControlByID(simcity.cTutorialCalloutUI.kWinIDNextButtonDialogCenteredContainer);
break;
default:
this.mDialogLayout = this.mTutorialParentWin.FindControlByID(simcity.cTutorialCalloutUI.kWinIDNextButtonDialogContainer),
1 === this.mFirstUpdate && (this.mFirstUpdate = 0, this.mOriginalTop =
this.mDialogLayout.mTop),
this.mDialogLayout.SetPosition(this.mDialogLayout.mLeft, this.mOriginalTop, this.mDialogLayout.mWidth, this.mDialogLayout.mHeight)
}
var b = this.mDialogLayout.FindControlByID(simcity.cTutorialCalloutUI.kBtnIDOkay),
c = this.mDialogLayout.FindControlByID(simcity.cTutorialCalloutUI.kBtnIDCancel),
d = this.mDialogLayout.FindControlByID(simcity.cTutorialCalloutUI.kBtnIDNext),
e = this.mDialogLayout.FindControlByID(simcity.cTutorialCalloutUI.kBtnIDQuit),
f = this.mDialogLayout.FindControlByID(simcity.cTutorialCalloutUI.kBtnKeepPlaying);
b && b.SetVisibility(!1);
c && c.SetVisibility(!1);
d && d.SetVisibility(!1);
e && e.SetVisibility(!1);
f && f.SetVisibility(!1);
switch (a) {
case simcity.kDialogOkay:
case simcity.kDialogOpeningScreen:
case simcity.kDialogCenteredDLC:
b.SetVisibility(!0);
break;
case simcity.kDialogOkayCancel:
b.SetVisibility(!0);
c.SetVisibility(!0);
break;
case simcity.kDialogTextOnlyLow:
a = Math.min(this.mOriginalTop + 150, scrui.GetClientHeight() - this.mDialogLayout.mHeight);
this.mDialogLayout.SetPosition(this.mDialogLayout.mLeft, a, this.mDialogLayout.mWidth,
this.mDialogLayout.mHeight);
break;
case simcity.kDialogTextOnlyLiftUp:
a = Math.min(this.mOriginalTop - 230, scrui.GetClientHeight() - this.mDialogLayout.mHeight);
this.mDialogLayout.SetPosition(this.mDialogLayout.mLeft, a, this.mDialogLayout.mWidth, this.mDialogLayout.mHeight);
break;
case simcity.kDialogTextOnlyLiftMid:
a = Math.min(this.mOriginalTop - 120, scrui.GetClientHeight() - this.mDialogLayout.mHeight);
this.mDialogLayout.SetPosition(this.mDialogLayout.mLeft, a, this.mDialogLayout.mWidth, this.mDialogLayout.mHeight);
break;
case simcity.kDialogTextOnlyMidLow:
a = Math.min(this.mOriginalTop + 100, scrui.GetClientHeight() - this.mDialogLayout.mHeight);
this.mDialogLayout.SetPosition(this.mDialogLayout.mLeft, a, this.mDialogLayout.mWidth, this.mDialogLayout.mHeight);
break;
case simcity.kDialogOkayLow:
b.SetVisibility(!0);
a = Math.min(this.mOriginalTop + 120, scrui.GetClientHeight() - this.mDialogLayout.mHeight - 30);
this.mDialogLayout.SetPosition(this.mDialogLayout.mLeft, a, this.mDialogLayout.mWidth, this.mDialogLayout.mHeight);
break;
case simcity.kDialogOkayLiftUp:
b.SetVisibility(!0);
a = Math.min(this.mOriginalTop - 230, scrui.GetClientHeight() - this.mDialogLayout.mHeight - 30);
this.mDialogLayout.SetPosition(this.mDialogLayout.mLeft, a, this.mDialogLayout.mWidth, this.mDialogLayout.mHeight);
break;
case simcity.kDialogOkayLiftMid:
b.SetVisibility(!0);
a = Math.min(this.mOriginalTop - 120, scrui.GetClientHeight() - this.mDialogLayout.mHeight - 30);
this.mDialogLayout.SetPosition(this.mDialogLayout.mLeft, a, this.mDialogLayout.mWidth, this.mDialogLayout.mHeight);
break;
case simcity.kDialogTutorialEnd:
simcity.gGlobalUIHandler.mIsTimed &&
simcity.gGlobalUIHandler.mTutorialDemo ? f.SetVisibility(!0) : e.SetVisibility(!0);
break;
case simcity.kDialogTutorialCentered:
f.SetVisibility(!0)
}
this.mDialogLayout.SetVisibility(!0)
};
simcity.cTutorialCalloutUI.prototype.ClearDialogLayout = function () {
if (this.mDialogLayout) {
if (this.IsNextButtonDialog()) {
var a = gUIManager.FindControlByID(simcity.cTutorialCalloutUI.kWinIDNextButtonDialogContainer);
a.SetVisibility(!1);
a.FindControlByID(simcity.cTutorialCalloutUI.kBtnIDNext).SetEnabled(!1)
} else
this.mDialogLayout.SetVisibility(!1);
this.mDialogLayout = null
}
};
simcity.cTutorialCalloutUI.prototype.UpdateCallout = function (a, b) {
if (a) {
this.mTargetInfo.mControl = a;
var c = a.GetAbsolutePosition(),
c = [c[0] + a.mWidth / 2, c[1] + a.mHeight / 2];
if (null == this.mTargetInfo.mPosition || c[0] !== this.mTargetInfo.mPosition[0] || c[1] !== this.mTargetInfo.mPosition[1])
this.mTargetInfo.mPosition = c, this.mTargetInfo.mDimensions = [a.mWidth, a.mHeight], this.ShowHelper(), simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(a, null), this.mDialogLayout && simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(this.mDialogLayout,
!0), simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(a, !0), simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(simcity.GetOptionsMenuButton(), !0), simcity.gGlobalUIHandler.mTutorialCallout.ShowBlueInfoButtons();
this.mPointerLayout.SetVisibility(!b);
a.SetVisibility(!0)
}
};
simcity.cTutorialCalloutUI.prototype.ShowOnControl = function (a, b) {
if (a) {
var c = function () {
simcity.gEventManager.RemoveEventListener(simcity.gEventTypes.CLICK, a.GetControlID(), c);
gUIManager.mBlockMouseClick = !0
};
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, a.GetControlID(), c)
} else
b || scrui.Assert(a, "no control specified as target for showing tutorial callout")
};
simcity.cTutorialCalloutUI.prototype.SyncPositionWithTarget = function () {
if (this.mTargetInfo.mControl) {
var a = this.mTargetInfo.mControl,
b = a.GetAbsolutePosition(),
b = [b[0] + a.mWidth / 2, b[1] + a.mHeight / 2];
if (b[0] !== this.mTargetInfo.mPosition[0] || b[1] !== this.mTargetInfo.mPosition[1])
this.mTargetInfo.mPosition = b, this.mTargetInfo.mDimensions = [a.mWidth, a.mHeight], this.ShowHelper()
}
};
simcity.cTutorialCalloutUI.prototype.ShowAtPosition = function (a, b) {
this.mTargetInfo.mControl = null;
this.mTargetInfo.mPosition = a.slice(0);
this.mTargetInfo.mCornerOffset = [2 * b, 2 * b];
this.ShowHelper()
};
simcity.cTutorialCalloutUI.prototype.ShowHelper = function () {
var a = scrui.GetClientWidth(),
b = scrui.GetClientHeight(),
c = this.mTargetInfo.mPosition,
d = this.mTargetInfo.mDimensions,
e = null;
simcity.gGlobalUIHandler.mTutorialCallout && (simcity.gGlobalUIHandler.mTutorialCallout.mDataBinding && simcity.gGlobalUIHandler.mTutorialCallout.mDataBinding.hasOwnProperty("calloutArrow")) && (e = simcity.gGlobalUIHandler.mTutorialCallout.mDataBinding.calloutArrow);
var f = [this.mPointerLayout.mWidth / 2, this.mPointerLayout.mHeight /
2];
(e && e == simcity.cTutorialCalloutUI.kWinIDArrowSW || !e) && c[0] + d[0] / 2 + f[0] < a && 0 < c[1] - this.mPointerLayout.mHeight ? (this.SetArrowVisible(simcity.cTutorialCalloutUI.kWinIDArrowSW), this.mPointerLayout.SetPosition(c[0] + d[0] / 2, c[1] - d[1] / 2 - 2 * f[1], this.mPointerLayout.mWidth, this.mPointerLayout.mHeight)) : (e && e == simcity.cTutorialCalloutUI.kWinIDArrowNW || !e) && c[0] + d[0] / 2 + f[0] < a && c[1] + d[1] / 2 + f[1] < b ? (this.SetArrowVisible(simcity.cTutorialCalloutUI.kWinIDArrowNW), this.mPointerLayout.SetPosition(c[0] + d[0] / 2, c[1] +
d[1] / 2, this.mPointerLayout.mWidth, this.mPointerLayout.mHeight)) : (e && e == simcity.cTutorialCalloutUI.kWinIDArrowSE || !e) && 0 < c[0] - d[0] / 2 - f[0] && 0 < c[1] - this.mPointerLayout.mHeight - f[1] ? (this.SetArrowVisible(simcity.cTutorialCalloutUI.kWinIDArrowSE), this.mPointerLayout.SetPosition(c[0] - d[0] / 2 - 2 * f[0], c[1] - d[1] / 2 - 2 * f[1], this.mPointerLayout.mWidth, this.mPointerLayout.mHeight)) : (this.SetArrowVisible(simcity.cTutorialCalloutUI.kWinIDArrowNE), this.mPointerLayout.SetPosition(c[0] - d[0] / 2 - 2 * f[0], c[1] + d[1] / 2, this.mPointerLayout.mWidth,
this.mPointerLayout.mHeight));
this.mPointerLayout.SetVisibility(!0);
this.mDialogLayout && this.mDialogLayout.SetVisibility(!0)
};
simcity.cTutorialCalloutUI.prototype.SetArrowVisible = function (a) {
for (var b = [simcity.cTutorialCalloutUI.kWinIDArrowNW, simcity.cTutorialCalloutUI.kWinIDArrowNE, simcity.cTutorialCalloutUI.kWinIDArrowSE, simcity.cTutorialCalloutUI.kWinIDArrowSW], c = 0; c < b.length; ++c) {
var d = b[c],
e = this.mPointerLayout.FindControlByID(d);
e.SetVisibility(!1);
e.SetVisibility(d === a)
}
};
simcity.cTutorialCalloutUI.prototype.Hide = function () {
simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(null, !1);
this.mTargetInfo.mControl = null;
this.mTargetInfo.mPosition = null;
this.mTargetInfo.mDimensions = null;
this.mDialogLayout && this.mDialogLayout.SetVisibility(!1);
this.mPointerLayout.SetVisibility(!1)
};
simcity.cTutorialCalloutUI.prototype.IsVisible = function () {
return this.mDialogLayout && this.mDialogLayout.mIsVisible
};
simcity.GameAudio = {};
simcity.audio = {};
simcity.audio.kGlobalSoundObjectID = 100;
simcity.audio.kInstanceUIPause = 2792155208;
simcity.audio.kInstanceUIPlay1x = 3001632316;
simcity.audio.kInstanceUIPlay4x = 2951299571;
simcity.audio.kInstanceUIPlay8x = 2884188999;
simcity.audio.kInstanceUICategorySwitch = 1080246573;
simcity.audio.kInstanceUIUnlockReward = 3089277192;
simcity.audio.kInstanceUITaskAppear = 2745460279;
simcity.audio.kInstanceUIAlertStart = 3215452160;
simcity.audio.kInstanceUIAlert = 2343992537;
simcity.audio.kInstanceUIRolloverOn = 1470519903;
simcity.audio.kInstanceUIRolloverOff = 1373648531;
simcity.audio.kInstanceUIBuildingEditorActivate = 1397656934;
simcity.audio.kInstanceUIBuildingEditorDeactivate = 3499636039;
simcity.audio.kInstancePlayDisasterMusic = 1213927059;
simcity.audio.kInstanceStopDisasterMusic = 2334929265;
simcity.audio.kInstanceUICompleteObjective = 1408650347;
simcity.audio.kInstanceUICompleteMission = 2777328896;
simcity.audio.kInstanceUIMissionAppear = 1092403476;
simcity.audio.kInstanceUIMissionLock = 876512206;
simcity.audio.kInstanceUIMissionUnlock = 1327670751;
simcity.audio.kInstanceUIMissionRollLocked = 933088973;
simcity.audio.kInstanceUIMissionOpenDetails = 971251224;
simcity.audio.kInstanceUIMissionCloseDetails = 4082846110;
simcity.audio.kInstanceUIMissionCompleteClose = 2776357879;
simcity.audio.kInstanceUIChatReceive = 3996313678;
simcity.audio.kInstanceUIChatWindowOpen = 596385706;
simcity.audio.kInstanceUIChatWindowClose = 2396721518;
simcity.audio.kInstanceUIChatStatusOnline = 3670511699;
simcity.audio.kInstanceUIChatStatusOffline = 3453773015;
simcity.audio.kInstanceAlertAppear = 76864608;
simcity.audio.kInstanceAlertClick = 647012730;
simcity.audio.kInstanceSpeechBalloonClick = 2438320052;
simcity.audio.kInstanceSpeechBalloonPopUp = 3449133739;
simcity.audio.kInstanceAccept = 1432550301;
simcity.audio.kInstanceDecline = 1831299441;
simcity.audio.kAudioThoughtGainFocus = 3765868508;
simcity.audio.kAudioThoughtLoseFocus = 783352538;
simcity.audio.kAudioBubbleCoalTest = 210351335;
simcity.audio.kInstanceBubbleFireStation = 3183038514;
simcity.audio.kInstanceBubblePoliceStation = 3945375176;
simcity.audio.KInstanceBubbleAmbulance = 891172503;
simcity.audio.kInstanceBubbleConnection = 1354944053;
simcity.audio.kInstanceBubbleCasinoRequest = 2457579103;
simcity.audio.kInstanceBubbleCasinoReject = 176252149;
simcity.audio.kInstanceBubbleCoalRequest = 1795015962;
simcity.audio.kInstanceBubbleCoalAccept = 692392639;
simcity.audio.kInstanceBubblePower = 3529653194;
simcity.audio.kInstanceBubbleWater = 970846312;
simcity.audio.kInstanceBubbleAddToCoalMine = 2878794795;
simcity.audio.kInstanceBubbleStripMineTutorial = 2474336761;
simcity.audio.kInstanceBubbleWantCoal = 2509683276;
simcity.audio.kInstanceBubbleArsonistMission = 3993606830;
simcity.audio.kInstanceThoughtSigh = 1365754275;
simcity.audio.kInstanceThoughtHappy = 3441347292;
simcity.audio.kInstanceThoughtSick = 1432864892;
simcity.audio.kInstanceImportSwitch = 1433716310;
simcity.audio.kInstanceExportSwitch = 2214362571;
simcity.audio.kInstanceOnSwitch = 2287207141;
simcity.audio.kInstanceOffSwitch = 2302712689;
simcity.audio.kInstanceAcceptCoalOn = 3763762083;
simcity.audio.kInstanceAcceptCoalOff = 3541571159;
simcity.audio.kInstance_vo_spbub_coal_offer = 3155881122;
simcity.audio.kInstance_vo_spbub_arsonist = 103702237;
simcity.audio.kInstance_vo_spbub_coal_full = 2628826007;
simcity.audio.kInstance_vo_spbub_connect = 2730182098;
simcity.audio.kInstance_vo_spbub_stripmine = 3245962263;
simcity.audio.kInstance_vo_spbub_ambulance = 1563245886;
simcity.audio.kInstance_vo_spbub_power = 3570798307;
simcity.audio.kInstance_vo_spbub_multichat = 3404061849;
simcity.audio.kInstance_vo_spbub_build_firestation = 1497233469;
simcity.audio.kInstance_vo_spbub_emergency_build_firestation = 3102427647;
simcity.audio.kInstance_vo_spbub_firechief_welcome = 3524139946;
simcity.audio.kInstance_vo_spbub_firechief_nocasualties = 1303665573;
simcity.audio.kInstance_vo_spbub_firechief_casualties = 2697855320;
simcity.audio.kInstance_vo_spbub_firechief_upgrade = 422210854;
simcity.audio.kInstance_vo_spbub_water = 951022805;
simcity.audio.kInstance_vo_spbub_jobs = 3995575968;
simcity.audio.kInstance_vo_spbub_housing = 3437558957;
simcity.audio.kInstance_vo_spbub_school = 952842116;
simcity.audio.kInstance_vo_spbub_police = 1407935922;
simcity.audio.kInstance_vo_spbub_budget = 2097774171;
simcity.audio.kInstance_vo_spbub_shopping = 3800798508;
simcity.audio.kInstance_vo_spbub_levelup = 2305612601;
simcity.audio.kInstanceUIWireClick = 3755280172;
simcity.audio.kInstanceUIWireWinOpen = 1134944347;
simcity.audio.kInstanceUIWireWinClose = 3566946441;
simcity.audio.kInstanceUIWireMessageAppear = 119786511;
simcity.audio.kInstanceUISelectClick = 3694329007;
simcity.audio.kInstanceUIGreatWorkComplete = 1984804212;
simcity.audio.kInstanceUIGreatWorkClose = 1718662359;
simcity.audio.kInstanceUIAchievementUnlocked = 4004853950;
simcity.audio.kInstanceUIAchievementClose = 1782621006;
simcity.audio.kInstancePlayGreatWorkComplete = 2503220764;
simcity.audio.kQueryOverride_UnPowered = 557776375;
simcity.audio.kQueryOverride_UnWatered = 2925516809;
simcity.audio.kQueryOverride_IsBurning = 2986081577;
simcity.audio.kQueryOverride_ZombieTarget = 973669882;
simcity.audio.kQueryOverride_Plague = 2123319754;
simcity.audio.kQueryOverride_Vacant = 857862240;
simcity.audio.kQueryOverride_ClosedToShoppers = 4114980673;
simcity.audio.kQueryOverride_Crime = 1344867940;
simcity.audio.kQueryOverride_Sickness = 1397674046;
simcity.audio.kQueryOverride_Sewage = 2608390080;
simcity.audio.kQueryOverride_Garbage = 4244034606;
simcity.audio.kQueryOverride_Pollution = 2610609233;
simcity.audio.kQueryOverride_Death = 2062244753;
simcity.audio.kQueryOverride_Injury = 1244248500;
simcity.audio.kQueryOverride_Homeless = 3497009279;
simcity.audio.kQueryOverride_Abandoned = 3537765551;
simcity.audio.kQueryOverride_Rubble = 1389315223;
simcity.audio.mLastQueryOverrideID = 0;
simcity.audio.mQueueQuerySoundEvent = 0;
simcity.audio.queryMsg = {};
simcity.audio.queryMsg.mObjectID = 0;
simcity.audio.queryMsg.mEventID = 0;
simcity.audio.queryMsg.mSlot = -1;
simcity.SendSoundEvent = function (a, b) {
scrui.PostGameCommand(scrui.BuildCommand(["sendsoundevent", a, b]))
};
simcity.PlayUnitQueryEvent = function (a, b, c) {
scrui.PostGameCommand(scrui.BuildCommand(["PlayUnitQueryEvent", a, b, c]))
};
simcity.StopUnitQueryEvent = function (a, b, c) {
scrui.PostGameCommand(scrui.BuildCommand(["StopUnitQueryEvent", a, b, c]))
};
simcity.SetAudioQueryOverridedID = function (a) {
0 != a && a != simcity.audio.mLastQueryOverrideID && (scrui.PostGameCommand(scrui.BuildCommand(["SetAudioQueryOverridedID", a])), simcity.audio.mLastQueryOverrideID = a)
};
simcity.QueueAudioQueryEvent = function (a, b, c) {
simcity.SetAudioQueryOverridedID(0);
simcity.audio.mQueueQuerySoundEvent = 1;
simcity.audio.queryMsg.mObjectID = a;
simcity.audio.queryMsg.mEventID = b;
simcity.audio.queryMsg.mSlot = c
};
simcity.ClearQueuedAudioQueryEvent = function () {
simcity.audio.mQueueQuerySoundEvent = 0;
simcity.audio.queryMsg.mObjectID = 0;
simcity.audio.queryMsg.mEventID = 0;
simcity.audio.queryMsg.mSlot = -1
};
simcity.SpeechBalloon = {};
simcity.SpeechBalloonLayouts = {
kSpeechBalloonMultiPageAcceptDismiss : "Layouts/SpeechBalloonMultiPageAcceptDismiss.js",
kThoughtBalloon_Happiness1_AcceptOnlyTemplate : "Layouts/ThoughtBalloon_Happiness1_AcceptOnlyTemplate.js",
kThoughtBalloon_Happiness2_AcceptOnlyTemplate : "Layouts/ThoughtBalloon_Happiness2_AcceptOnlyTemplate.js",
kThoughtBalloon_Happiness3_AcceptOnlyTemplate : "Layouts/ThoughtBalloon_Happiness3_AcceptOnlyTemplate.js",
kThoughtBalloon_Happiness4_AcceptOnlyTemplate : "Layouts/ThoughtBalloon_Happiness4_AcceptOnlyTemplate.js",
kThoughtBalloon_Happiness5_AcceptOnlyTemplate : "Layouts/ThoughtBalloon_Happiness5_AcceptOnlyTemplate.js"
};
simcity.SpeechBalloonButtonConfigs = {
kDoItAskLaterNoThanks : 1,
kOkay : 2,
kEditNoThanks : 3
};
simcity.kSpeechBalloonLocaleTable = 2113026203;
simcity.kVignetteID = 657478559;
simcity.cSpeechBalloonItem = function (a, b, c) {
this.mDisplayUnitRef = b;
this.mSourceUnitRef = c ? c : b;
this.mDataBinding = a;
this.mIsThoughtBubble = a.hasOwnProperty("isThoughtBubble") && a.isThoughtBubble;
this.mLayout = this.mLocaleTokens = null;
this.mbShouldBeVisible = !0;
this.mValidated = this.mbButtonEnabled = !1;
this.mButtonConfig = this.mTextBubbleWindow = this.mDetailedInfoWindow = this.mIconParent = this.mOpenButton = null;
this.mDepthIndex = this.mExpirationTime = -1
};
simcity.cSpeechBalloonItem.prototype.Init = function (a, b) {
var c = this.mDataBinding.layoutPath;
switch (c) {
case "Layouts/SpeechBalloons/SpeechBalloonAcceptOnlyTemplate.js":
case "Layouts/SpeechBalloons/SpeechBalloonMultiPageAcceptOnly.js":
case "Layouts/SpeechBalloons/SpeechBalloonMultiAcceptSpecialization.js":
case "Layouts/SpeechBalloons/SpeechBalloonRegion.js":
case "Layouts/SpeechBalloons/SpeechBalloonMultiAcceptArrow.js":
case "Layouts/SpeechBalloons/SpeechBalloonAcceptDismissArrow.js":
this.mButtonConfig =
simcity.SpeechBalloonButtonConfigs.kOkay;
break;
case "Layouts/SpeechBalloons/SpeechBalloonMultiPageAcceptDismiss.js":
case "Layouts/SpeechBalloons/SpeechBalloonAcceptDismissTemplate.js":
this.mButtonConfig = simcity.SpeechBalloonButtonConfigs.kDoItAskLaterNoThanks;
break;
case "Layouts/SpeechBalloons/SpeechBalloonEditor.js":
this.mButtonConfig = simcity.SpeechBalloonButtonConfigs.kEditNoThanks
}
var d = !1,
e = !1;
switch (c) {
case "Layouts/SpeechBalloons/SpeechBalloonMultiAcceptArrow.js":
case "Layouts/SpeechBalloons/SpeechBalloonAcceptDismissArrow.js":
e =
!0;
case "Layouts/SpeechBalloons/SpeechBalloonMultiAcceptSpecialization.js":
d = !0
}
this.mButtonConfig && (c = simcity.SpeechBalloonLayouts.kSpeechBalloonMultiPageAcceptDismiss);
this.mLayout = gUIManager.LoadAndCacheLayout(c, a.mContainerWindow);
this.mOpenButton = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kBtnOpen);
this.mIconParent = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kWinIconParent);
this.mDetailedInfoWindow = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kWinDetailedInfo);
this.mTextBubbleWindow = this.mLayout.FindControlByID(248200241);
switch (this.mButtonConfig) {
case simcity.SpeechBalloonButtonConfigs.kDoItAskLaterNoThanks:
c = this.mDetailedInfoWindow.FindControlByID(248270154);
c.SetVisibility(!0);
break;
case simcity.SpeechBalloonButtonConfigs.kOkay:
c = this.mDetailedInfoWindow.FindControlByID(248270156);
c.SetVisibility(!0);
break;
case simcity.SpeechBalloonButtonConfigs.kEditNoThanks:
this.mDetailedInfoWindow.FindControlByID(248298087).SetVisibility(!0)
}
this.mButtonConfig ===
simcity.SpeechBalloonButtonConfigs.kOkay && (c = this.mDetailedInfoWindow.FindControlByID(248270156), c.SetVisibility(!0), c = this.mDetailedInfoWindow.FindControlByID(248270154), c.SetVisibility(!1));
var f = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kWinIcon);
f && (this.mDataBinding.hasOwnProperty("iconPath") ? (c = this.mDataBinding.iconPath, "number" === typeof c && (c = scrui.DecimalToHex(c) + ".png"), f.SetWindowImage(c)) : f.SetVisibility(!1));
if ((f = this.mLayout.FindControlByID(242489423)) && this.mDataBinding.hasOwnProperty("portrait"))
c =
this.mDataBinding.portrait, "number" === typeof c && (c = scrui.DecimalToHex(c) + ".png"), f.SetWindowImage(c);
this.mDataBinding.hasOwnProperty("expirationTime") && (this.mExpirationTime = Math.random() * (this.mDataBinding.expirationTime[1] - this.mDataBinding.expirationTime[0]) + this.mDataBinding.expirationTime[0]);
c = simcity.gGlobalUIHandler.mGameTimeManager.GetTotalElapsedGameTimeSeconds();
this.mDataBinding.lastExecuted = c;
var g = this.mDetailedInfoWindow;
if ((c = this.mLayout.FindAnimationByID(210268304)) && !this.mDataBinding.isThoughtBubble)
a =
this, c.RegisterEventCallback(scrui.cAnimation.kEventStopped, function () {
g.mIsVisible && a.PlaySpeech()
});
this.LoadMissionInfo();
var h = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData,
c = h.mPlayingBox,
f = c.creatorId;
this.mLocaleTokens = {
local_city_name : c.name || "[localCity]",
local_player_name : f ? h.mPlayers[f].screenName : "[localPlayer]",
region_name : h.mRegionName || "[regionName]"
};
if (this.mDataBinding.isRegional) {
var c = [scrui.BuildRequestQuery([simcity.kDataUnits, scrui.RequestStringFromUnitRef(this.mSourceUnitRef),
simcity.kDataBinAmount, simcity.kResourceRegionalBoxUniqueID])],
i = this;
scrui.RequestGameData(c, function (a) {
if (a = a[0])
if (a = h.mBoxes[a]) {
i.mLocaleTokens.friend_city_name = a.name || "[neighborCity]";
(a = a.creatorId) && (i.mLocaleTokens.friend_player_name = h.mPlayers[a].screenName || "[neighborPlayer]")
}
})
}
if (this.mDataBinding.hasOwnProperty("localeTokenQueries")) {
var f = [this.mDataBinding],
c = [],
j = [],
k = {
argumentList : [scrui.RequestStringFromUnitRef(a.mDisplayUnitRef)]
};
simcity.GenerateDataBindingQueries(f, c, k, j,
!1, "localeTokenQueries");
var l = this;
simcity.RequestDataBindingData(c, f, j, !1, function (a) {
var a = l.mDataBinding.getLocaleTokens(a[0], b),
c;
for (c in a)
l.mLocaleTokens[c] = a[c];
l.UpdateText(false)
})
} else
this.UpdateText(!1);
this.mIconParent.SetVisibility(!1);
this.mIconParent.SetVisibility(!0);
this.mDataBinding.enableInTutorial ? (this.mValidated = !0, this.mLayout.SetVisibility(!1), this.mLayout.SetVisibility(!0)) : this.mLayout.SetVisibility(!1);
d && (this.mLayout.FindAnimationByID(248284603).Start(scrui.cAnimation.kPlayForward),
e && this.mLayout.FindControlByID(238097675).SetVisibility(!0))
};
simcity.cSpeechBalloonItem.prototype.LoadMissionInfo = function () {
if (this.mDataBinding.hasOwnProperty("missionUnitID") && !this.mDataBinding.enableInTutorial) {
var a = this.mLayout.FindControlByID(247089461);
if (a) {
var b = this.mLayout.FindControlByID(247055005);
a.SetVisibility(!0);
this.mDetailedInfoWindow.SetHeight(this.mDetailedInfoWindow.mHeight + a.mHeight);
var a = [scrui.BuildRequestQuery([simcity.kDataUnitEntryIDSimProperties, this.mDataBinding.missionUnitID, simcity.LoadMissionInfo.kPropMissionTitle]), scrui.BuildRequestQuery([simcity.kDataUnitEntryIDSimProperties,
this.mDataBinding.missionUnitID, simcity.LoadMissionInfo.kPropMissionRewardAmount])],
c = this;
scrui.RequestGameData(a, function (a) {
var e = scrui.LocaleStringFromLocaleProperty(a[0]),
f = b.mHeight;
b.SetLocaleText(e);
c.mDetailedInfoWindow.SetHeight(c.mDetailedInfoWindow.mHeight + (b.GetTextHeight() - f));
0 < a[1] && (e = c.mLayout.FindControlByID(217355105), e.SetVisibility(!0), c.mLayout.FindControlByID(217355107).UpdateLocaleText({
rewardAmount : a[1]
}), c.mDetailedInfoWindow.SetHeight(c.mDetailedInfoWindow.mHeight + e.mHeight))
})
}
}
};
simcity.cSpeechBalloonItem.prototype.Expand = function () {
this.mIconParent.SetVisibility(!1);
this.mDetailedInfoWindow.SetVisibility(!0);
this.SetupFirstPage();
this.mIsThoughtBubble ? this.PlaySpeech() : simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(this.mDetailedInfoWindow, !0)
};
simcity.cSpeechBalloonItem.prototype.Collapse = function () {
this.mIconParent.SetVisibility(!0);
this.mDetailedInfoWindow && this.mDetailedInfoWindow.SetVisibility(!1);
this.mIsThoughtBubble || (simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(null, !1), 0 !== this.mDataBinding.textIndex && this.MovePage(-this.mDataBinding.textIndex))
};
simcity.cSpeechBalloonItem.prototype.IsExpanded = function () {
return this.mDetailedInfoWindow && this.mDetailedInfoWindow.mIsVisible
};
simcity.cSpeechBalloonItem.prototype.UpdateText = function (a) {
a && simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(null, !1);
this.mDataBinding.hasOwnProperty("textIndex") || (this.mDataBinding.textIndex = 0);
var b = this.mDataBinding.messages[this.mDataBinding.textIndex];
this.mDataBinding.isThoughtBubble && (++this.mDataBinding.textIndex, this.mDataBinding.textIndex === this.mDataBinding.messages.length && (this.mDataBinding.textIndex = 0));
var c = this,
d = this.mDetailedInfoWindow,
e = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kTxtSummary),
b = new scrui.cLocaleString(scrui.DecimalToHex(b[0]), scrui.DecimalToHex(b[1]));
e.SetLocaleText(b, this.mLocaleTokens, function () {
var b = e.mHeight;
d.SetVisibility(true);
var g = e.GetTextHeight();
g === 0 && (g = 90);
b = g - b;
a || d.SetVisibility(false);
if (c.mIsThoughtBubble) {
b = d.mHeight + b;
g = c.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kWinThoughtBubbleBacking);
g = d.mHeight - g.mHeight;
b = g + Math.ceil((b - g) / 32) * 32;
d.SetPosition(d.mLeft, d.mTop - (b - d.mHeight), d.mWidth, b)
} else
c.mTextBubbleWindow && c.mTextBubbleWindow.SetPosition(c.mTextBubbleWindow.mLeft,
c.mTextBubbleWindow.mTop - b, c.mTextBubbleWindow.mWidth, c.mTextBubbleWindow.mHeight + b);
a && simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(d, true)
})
};
simcity.cSpeechBalloonItem.prototype.SetupFirstPage = function () {
var a = this.mDataBinding.textIndex === this.mDataBinding.messages.length - 1;
if (0 === this.mDataBinding.textIndex) {
var b = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kBtnAccept),
c = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kBtnDismissForever),
d = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kBtnDismiss);
b && b.SetVisibility(a);
switch (this.mButtonConfig) {
case simcity.SpeechBalloonButtonConfigs.kDoItAskLaterNoThanks:
case simcity.SpeechBalloonButtonConfigs.kEditNoThanks:
d &&
d.SetVisibility(1 != this.mDataBinding.displayCountLimit && a),
c && c.SetVisibility(a)
}
(b = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kBtnNext)) && b.SetVisibility(!a)
}
};
simcity.cSpeechBalloonItem.prototype.MovePage = function (a, b) {
this.mDataBinding.textIndex += a;
var c = this.mDataBinding.textIndex === this.mDataBinding.messages.length - 1,
d = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kBtnAccept),
e = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kBtnDismissForever),
f = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kBtnDismiss);
d && d.SetVisibility(c);
switch (this.mButtonConfig) {
case simcity.SpeechBalloonButtonConfigs.kDoItAskLaterNoThanks:
case simcity.SpeechBalloonButtonConfigs.kEditNoThanks:
f &&
f.SetVisibility(1 != this.mDataBinding.displayCountLimit && c),
e && e.SetVisibility(c)
}
(d = this.mLayout.FindControlByID(simcity.cSpeechBalloonHandler.kBtnNext)) && d.SetVisibility(!c);
this.UpdateText(b)
};
simcity.cSpeechBalloonItem.prototype.PlaySpeech = function () {
scrui.Play2DSound(this.mDataBinding.messages[this.mDataBinding.textIndex][2])
};
simcity.cSpeechBalloonHandler = function () {
this.UIHandler = scrui.cUIHandler;
this.UIHandler();
this.mDataBindings = null;
this.mSpeechBalloons = [];
this.mVisibilityCounter = 1;
this.mNumVisibleThoughtBubbles = this.mNumVisibleSpeechBalloons = 0;
this.mSpeechBalloonQueue = [];
this.mThoughtBubbleQueue = [];
this.mUpdateTimer = this.mSpeechBalloonQueueUpdateTimer = 0;
this.mCurrentOpenBalloon = this.mListBox = this.mPreviousCameraState = this.mContainerWindow = null;
this.mHideThoughtBubbles = this.mHideSpeechBubbles = !1
};
goog.inherits(simcity.cSpeechBalloonHandler, scrui.cUIHandler);
simcity.cSpeechBalloonHandler.kLayoutIDSpeechBalloon = 207072196;
simcity.cSpeechBalloonHandler.kBtnOpen = 204914388;
simcity.cSpeechBalloonHandler.kBtnNext = 213369346;
simcity.cSpeechBalloonHandler.kBtnAccept = 205495732;
simcity.cSpeechBalloonHandler.kBtnDismiss = 205495728;
simcity.cSpeechBalloonHandler.kBtnDismissForever = 247054153;
simcity.cSpeechBalloonHandler.kWinDetailedInfo = 204914593;
simcity.cSpeechBalloonHandler.kTxtSummary = 205505356;
simcity.cSpeechBalloonHandler.kWinIconParent = 208347290;
simcity.cSpeechBalloonHandler.kWinIcon = 208536371;
simcity.cSpeechBalloonHandler.kWinThoughtBubbleBacking = 209653274;
simcity.cSpeechBalloonHandler.kTimeBetweenSpeechBalloons = 6;
simcity.cSpeechBalloonHandler.kMaxVisibleSpeechBalloons = 30;
simcity.cSpeechBalloonHandler.prototype.Init = function () {
this.mContainerWindow = gUIManager.FindControlByID(simcity.kWinSpeechBallonContainer);
this.mHideSpeechBubbles = 0 !== simcity.CheckOption(simcity.OptionItems.kGameplayTab.kHideSpeechBubbles.optionID);
this.mHideThoughtBubbles = 0 !== simcity.CheckOption(simcity.OptionItems.kGameplayTab.kHideThoughtBubbles.optionID);
this.OptionsUpdated()
};
simcity.cSpeechBalloonHandler.prototype.OptionsUpdated = function () {
this.mHideSpeechBubbles && this.RemoveSpeechBalloonsOfType(!1);
this.mHideThoughtBubbles && this.RemoveSpeechBalloonsOfType(!0);
simcity.gGlobalUIHandler.mEventTriggersManager.mEnabled = !(this.mHideSpeechBubbles && this.mHideThoughtBubbles)
};
simcity.cSpeechBalloonHandler.prototype.CacheLayouts = function () {
for (var a in simcity.SpeechBalloonLayouts) {
var b = gUIManager.LoadAndCacheLayout(simcity.SpeechBalloonLayouts[a], this.mContainerWindow);
b && b.DestroyControl()
}
};
simcity.cSpeechBalloonHandler.prototype.GetExpandedSpeechBalloon = function () {
for (var a = 0; a < this.mSpeechBalloons.length; a++)
if (this.mSpeechBalloons[a].IsExpanded())
return this.mSpeechBalloons[a];
return null
};
simcity.cSpeechBalloonHandler.prototype.GetExpandedSpeechBalloonInfo = function () {
for (var a = 0; a < this.mSpeechBalloons.length; a++)
if (this.mSpeechBalloons[a].IsExpanded())
return {
item : this.mSpeechBalloons[a],
index : a
};
return null
};
simcity.cSpeechBalloonHandler.prototype.Shutdown = function () {
this.mContainerWindow && (this.mContainerWindow.DestroyAllChildren(), this.mContainerWindow = null);
this.mSpeechBalloons = [];
this.mDataBindings = null
};
simcity.cSpeechBalloonHandler.prototype.ShowSpeechBalloons = function (a) {
a ? ++this.mVisibilityCounter : --this.mVisibilityCounter;
this.mContainerWindow.SetVisibility(0 < this.mVisibilityCounter)
};
simcity.cSpeechBalloonHandler.prototype.SpeechBallonsVisible = function () {
return 0 < this.mVisibilityCounter
};
simcity.cSpeechBalloonHandler.prototype.GetSpeechBalloonCount = function () {
return this.mNumVisibleSpeechBalloons + this.mNumVisibleThoughtBubbles
};
simcity.cSpeechBalloonHandler.prototype.RestoreCamera = function () {
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandMoveCameraMinusOrientation, this.mPreviousCameraState.distance, this.mPreviousCameraState.targetPitch]))
};
simcity.cSpeechBalloonHandler.prototype.RestorCameraMinusTransition = function () {
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandMoveCameraNoTransition, this.mPreviousCameraState.distance, this.mPreviousCameraState.targetPitch]))
};
simcity.cSpeechBalloonHandler.prototype.AddDebugSpeechBalloon = function (a, b) {
var a = Number(a),
c = null;
if (simcity.SpeechBalloonEvents.DataBindings.hasOwnProperty(a))
c = simcity.SpeechBalloonEvents.DataBindings[a];
else
for (var d in simcity.SpeechBalloonPolling)
if (simcity.SpeechBalloonPolling[d].DataBindings.hasOwnProperty(a)) {
c = simcity.SpeechBalloonPolling[d].DataBindings[a];
break
}
scrui.Assert(c, "Undefined dataBinding " + a);
this.mDebugSpeechBalloonItem && (this.mDebugSpeechBalloonItem.mDebugName === a && (c.textIndex =
this.mDebugSpeechBalloonItem.mDataBinding.textIndex), this.mDebugSpeechBalloonItem.mLayout.DestroyControl());
this.mDebugSpeechBalloonItem = new simcity.cSpeechBalloonItem(c, b);
this.mDebugSpeechBalloonItem.Init(this);
this.mDebugSpeechBalloonItem.mbShouldBeVisible = !0;
this.mDebugSpeechBalloonItem.mDebugName = a
};
simcity.cSpeechBalloonHandler.prototype.IsDebugSpeechBalloon = function (a) {
var b = !1;
if (this.mDebugSpeechBalloonItem) {
for (a = a.GetParentLayout(); a && a.GetControlID() !== simcity.cSpeechBalloonHandler.kLayoutIDSpeechBalloon; )
a = a.GetParentLayout();
b = a === this.mDebugSpeechBalloonItem.mLayout
}
return b
};
simcity.cSpeechBalloonHandler.prototype.AddSpeechBalloonToQueue = function (a, b, c, d) {
if (!simcity.gGlobalUIHandler.mIsSpectatorMode || a.isThoughtBubble) {
for (var e = a.isThoughtBubble ? this.mThoughtBubbleQueue : this.mSpeechBalloonQueue, f = 0, g = e.length; f < g; ++f) {
var h = e[f];
if (a === h.mDataBinding) {
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandSetSpeechBalloonTarget, scrui.RequestStringFromUnitRef(h.mDisplayUnitRef), 0]));
h.mDisplayUnitRef = b;
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandSetSpeechBalloonTarget,
scrui.RequestStringFromUnitRef(h.mDisplayUnitRef), a.importance]));
return
}
if (a.importance > h.mDataBinding.importance) {
e.splice(f, 0, {
mDataBinding : a,
mDisplayUnitRef : b,
mSourceUnitRef : c,
mExtraData : d
});
return
}
}
e.push({
mDataBinding : a,
mDisplayUnitRef : b,
mSourceUnitRef : c,
mExtraData : d
})
}
};
simcity.cSpeechBalloonHandler.prototype.UpdateQueue = scrui.Client_ProfZone("cSpeechBalloonHandler.UpdateQueue", function (a) {
0 < this.mSpeechBalloonQueueUpdateTimer && (this.mSpeechBalloonQueueUpdateTimer -= a);
if (0 >= this.mSpeechBalloonQueueUpdateTimer && (this.mSpeechBalloonQueueUpdateTimer = 0, 0 !== this.mSpeechBalloonQueue.length && this.mNumVisibleSpeechBalloons < simcity.cSpeechBalloonHandler.kMaxVisibleSpeechBalloons && (a = this.mSpeechBalloonQueue.shift(), this.AddSpeechBalloon(a.mDataBinding, a.mDisplayUnitRef, a.mSourceUnitRef,
a.mExtraData)), 0 !== this.mThoughtBubbleQueue.length && this.mNumVisibleThoughtBubbles < simcity.cSpeechBalloonHandler.kMaxVisibleSpeechBalloons))
a = this.mThoughtBubbleQueue.shift(), this.AddSpeechBalloon(a.mDataBinding, a.mDisplayUnitRef, a.mSourceUnitRef, a.mExtraData)
});
simcity.cSpeechBalloonHandler.prototype.AddSpeechBalloon = function (a, b, c, d) {
for (var e = !1, f = 0, g = this.mSpeechBalloons.length; f < g; ++f) {
var h = this.mSpeechBalloons[f];
if (simcity.CompareUnitRefs(h.mDisplayUnitRef, b)) {
if (h.mIsThoughtBubble)
if (a.importance > h.mDataBinding.importance)
this.RemoveSpeechBalloonAtIndex(f);
else
return null;
else {
if (a.importance > h.mDataBinding.importance) {
if (h.IsExpanded())
return null;
h.mbShouldBeVisible = !1
} else
e = !0;
--this.mNumVisibleSpeechBalloons
}
break
}
}
c = new simcity.cSpeechBalloonItem(a,
b, c);
c.Init(this, d);
a.isThoughtBubble ? (++this.mNumVisibleThoughtBubbles, this.DecrementDisplayCountLimit(a)) : ++this.mNumVisibleSpeechBalloons;
e ? c.mbShouldBeVisible = !1 : scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandSetSpeechBalloonTarget, scrui.RequestStringFromUnitRef(b), a.importance]));
this.mSpeechBalloonQueueUpdateTimer = simcity.cSpeechBalloonHandler.kTimeBetweenSpeechBalloons;
f = 0;
for (g = this.mSpeechBalloons.length; f < g; ++f)
if (h = this.mSpeechBalloons[f], a.importance > h.mDataBinding.importance)
return this.mSpeechBalloons.splice(f,
0, c), c;
this.mSpeechBalloons.push(c);
return c
};
simcity.cSpeechBalloonHandler.prototype.RemoveAllSpeechBalloons = function () {
for (var a = 0, b = this.mSpeechBalloons.length; a < b; ++a) {
var c = this.mSpeechBalloons[a];
c.IsExpanded() && !c.mIsThoughtBubble && (simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(null, !1), this.RestoreCamera());
this.RemoveSpeechBalloonAtIndex(0)
}
};
simcity.cSpeechBalloonHandler.prototype.RemoveSpeechBalloonsOfType = function (a) {
for (var b = 0; b < this.mSpeechBalloons.length; ) {
var c = this.mSpeechBalloons[b];
c.mIsThoughtBubble == a ? (c.IsExpanded() && !c.mIsThoughtBubble && (simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(null, !1), this.RestoreCamera()), this.RemoveSpeechBalloonAtIndex(b)) : ++b
}
a = a ? this.mThoughtBubbleQueue : this.mSpeechBalloonQueue;
for (b = 0; b < a.length; ++b)
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandSetSpeechBalloonTarget, scrui.RequestStringFromUnitRef(a[b].mDisplayUnitRef),
0]));
a.length = 0
};
simcity.cSpeechBalloonHandler.prototype.RemoveSpeechBalloonItem = function (a) {
0 <= a.index ? this.RemoveSpeechBalloonAtIndex(a.index) : a.item === this.mDebugSpeechBalloonItem && (a = a.item, a.IsExpanded() && !a.mIsThoughtBubble && simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(null, !1), a.mLayout.DestroyControl(), this.mDebugSpeechBalloonItem = null)
};
simcity.cSpeechBalloonHandler.prototype.RemoveSpeechBalloonAtIndex = function (a) {
for (var b = this.mSpeechBalloons[a], c = 0, d = 0, e = this.mSpeechBalloons.length; d < e; ++d) {
var f = this.mSpeechBalloons[d];
if (b !== f && simcity.CompareUnitRefs(f.mDisplayUnitRef, b.mDisplayUnitRef)) {
f.mbShouldBeVisible = !0;
++this.mNumVisibleSpeechBalloons;
c = f.mDataBinding.importance;
break
}
}
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandSetSpeechBalloonTarget, scrui.RequestStringFromUnitRef(b.mDisplayUnitRef), c]));
b.mIsThoughtBubble ?
--this.mNumVisibleThoughtBubbles : (--this.mNumVisibleSpeechBalloons, b.mDataBinding.textIndex = 0, b.IsExpanded() && simcity.gGlobalUIHandler.mTutorialManager.SetModalWindow(null, !1));
b.mLayout.DestroyControl();
this.mSpeechBalloons.splice(a, 1)
};
simcity.cSpeechBalloonHandler.prototype.RemoveSpeechBalloonDataBinding = function (a) {
simcity.SpeechBalloonEvents.DataBindings.hasOwnProperty(a.id) ? delete simcity.SpeechBalloonEvents.DataBindings[a.id] : simcity.gGlobalUIHandler.mEventTriggersManager.RemoveDataBinding(a)
};
simcity.cSpeechBalloonHandler.prototype.AddSpeechBalloonWithoutUnit = scrui.Client_ProfZone("cSpeechBalloonHandler.AddSpeechBalloonWithoutUnit", function (a, b, c, d) {
var e = !0;
if (!0 !== a.isThoughtBubble)
for (var f = 0, g = this.mSpeechBalloons.length; f < g; ++f)
if (this.mSpeechBalloons[f].mDataBinding === a) {
e = !1;
break
}
if (e) {
var h = this,
e = simcity.GetSpeechBalloonTarget(a);
0 !== e && (e = scrui.BuildRequestQuery([simcity.kDataSpeechBalloonTarget, e, a.importance]), scrui.RequestGameData([e], function (e) {
e = e[0];
simcity.IsUnitRefValid(e) &&
(b ? (e = h.AddSpeechBalloon(a, e, c, d)) && h.HandleSpeechBalloonClick(e) : h.AddSpeechBalloonToQueue(a, e, c, d))
}))
}
});
simcity.cSpeechBalloonHandler.prototype.AddSpeechBalloonFromTrigger = function (a, b) {
if (a.hasOwnProperty("triggerTime")) {
var c = simcity.gGlobalUIHandler.mGameTimeManager.GetTotalElapsedGameTimeSeconds();
if (!a.hasOwnProperty("timeToFire") || c > a.timeToFire)
a.timeToFire = c + Math.random() * (a.triggerTime[1] - a.triggerTime[0]) + a.triggerTime[0];
else
return
}
var d = b.unitRef,
e = b.extraData,
f = a.hasOwnProperty("speechBalloonTarget") || a.hasOwnProperty("unitID");
if (a.hasOwnProperty("queries")) {
scrui.RequestStringFromUnitRef(d);
c = [];
simcity.AddSimpleQueries(c, a.queries);
var g = [Object.keys(a.queries)],
h = this;
simcity.RequestDataBindingDataSimple(c, g, function (b) {
if (!a.hasOwnProperty("test") || a.test(b[0]))
f ? h.AddSpeechBalloonWithoutUnit(a, !1, d, e) : h.AddSpeechBalloonToQueue(a, d, d, e)
})
} else
f ? this.AddSpeechBalloonWithoutUnit(a, !1, d, e) : this.AddSpeechBalloonToQueue(a, d, d, e)
};
simcity.cSpeechBalloonHandler.prototype.DecrementDisplayCountLimit = function (a) {
a.hasOwnProperty("displayCountLimit") && (a.displayCountLimit--, 0 >= a.displayCountLimit && this.RemoveSpeechBalloonDataBinding(a))
};
simcity.cSpeechBalloonHandler.prototype.OpenSpeechBalloon = function (a) {
for (var b = 0, c = this.mSpeechBalloons.length; b < c; ++b) {
var d = this.mSpeechBalloons[b];
if (d.mDataBinding.id == a) {
this.HandleSpeechBalloonClick(d);
return
}
}
b = 0;
for (c = this.mSpeechBalloonQueue.length; b < c; ++b)
if (d = this.mSpeechBalloonQueue[b], d.mDataBinding.id == a) {
this.AddSpeechBalloon(d.mDataBinding, d.mDisplayUnitRef);
this.mSpeechBalloonQueue.splice(b, 1);
return
}
for (var e in simcity.SpeechBalloonDataBindings)
if (b = simcity.SpeechBalloonDataBindings[e],
b.id == a) {
this.AddSpeechBalloonWithoutUnit(b, !0);
break
}
};
simcity.cSpeechBalloonHandler.prototype.HandleGameEvent = scrui.Client_ProfZone("cSpeechBalloonHandler.HandleGameEvent", function (a, b) {
switch (a) {
case simcity.kGameMessageUnitRuleUIEvent:
case simcity.kGameMessageGlobalRuleUIEvent:
var c = b.eventID,
d = simcity.SpeechBalloonEvents.DataBindings;
if (d.hasOwnProperty(c)) {
d = d[c];
if (!d.isThoughtBubble && this.mHideSpeechBubbles || d.isThoughtBubble && this.mHideThoughtBubbles)
break;
var e = !0;
if (!d.isThoughtBubble)
for (var f = 0, g = this.mSpeechBalloons.length; f < g; ++f)
if (this.mSpeechBalloons[f].mDataBinding ===
d) {
e = !1;
break
}
e && (d.id = Number(c), simcity.TestSpeechBalloonTriggerHelper(d) && this.AddSpeechBalloonFromTrigger(d, b))
}
break;
case simcity.kGameMessageBuildingSelected:
simcity.DEBUG && (this.mListBox && this.mListBox.IsVisible() && this.mListBox.mSelection) && (this.AddDebugSpeechBalloon(this.mListBox.mSelection, b.unitRef), this.mListBox.SetSelection(null));
break;
case simcity.kGameMessageToolSelected:
case simcity.kGameMessageShowRegionUI:
case simcity.kMessageEditorActivated:
case simcity.kGameMessageHeavyDataLayerToggledOn:
this.ShowSpeechBalloons(!1);
break;
case simcity.kGameMessageToolDeselected:
case simcity.kGameMessageHideRegionUI:
case simcity.kMessageEditorDeactivated:
case simcity.kGameMessageHeavyDataLayerToggledOff:
this.ShowSpeechBalloons(!0)
}
});
simcity.cSpeechBalloonHandler.prototype.HandleSpeechBalloonClick = function (a) {
a.Expand();
this.mCurrentOpenBalloon = a;
if (!a.mIsThoughtBubble) {
var b = this,
c = [scrui.BuildRequestQuery([simcity.kDataCamera])];
scrui.RequestGameData(c, function (c) {
b.mPreviousCameraState = c[0];
var c = a.mDataBinding,
e = scrui.RequestStringFromUnitRef(a.mDisplayUnitRef);
c.isThoughtBubble || (simcity.gGlobalUIHandler.mSpeedUIHandler.GetGameSpeed() != simcity.kSpeedPaused && (simcity.gGlobalUIHandler.mSpeedUIHandler.sPreviousGameSpeed = simcity.gGlobalUIHandler.mSpeedUIHandler.GetGameSpeed(),
scrui.PostGameCommand(scrui.BuildCommand(["setspeed", simcity.kSpeedTurtle]))), c.vignetteActorPalette ? scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandActivateVignette, e, simcity.kVignetteID, c.vignetteActorPalette])) : scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandActivateVignette, e, simcity.kVignetteID])), scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandZoomToSpeechBalloon, e])), scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataToolMessage, scrui.IDFromName("DeselectAll")])));
simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kInstanceSpeechBalloonClick)
})
}
};
simcity.cSpeechBalloonHandler.prototype.HandleUIMessage = function (a, b, c) {
switch (a) {
case scrui.kMsgTypeButtonClicked:
switch (b) {
case simcity.cSpeechBalloonHandler.kBtnOpen:
a = this.GetSpeechBalloonItemInfo(c);
(a = a.item) && this.HandleSpeechBalloonClick(a);
break;
case simcity.cSpeechBalloonHandler.kBtnNext:
a = this.GetSpeechBalloonItemInfo(c);
if (a = a.item)
a.MovePage(1, !0), a.PlaySpeech();
break;
case simcity.cSpeechBalloonHandler.kBtnAccept:
a = this.GetSpeechBalloonItemInfo(c);
this.ExitSpeechBalloon(a, !0, !1);
break;
case simcity.cSpeechBalloonHandler.kBtnDismiss:
a = this.GetSpeechBalloonItemInfo(c);
this.OnAskMeLater(a);
break;
case simcity.cSpeechBalloonHandler.kBtnDismissForever:
a = this.GetSpeechBalloonItemInfo(c),
this.ExitSpeechBalloon(a, !1, !1)
}
break;
case scrui.kMsgTypeButtonGainFocus:
switch (b.controlID) {
case simcity.cSpeechBalloonHandler.kBtnOpen:
if (a = this.GetSpeechBalloonItemInfo(c), (a = a.item) && a.mIsThoughtBubble)
simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kAudioThoughtGainFocus), a.Expand()
}
break;
case scrui.kMsgTypeButtonLoseFocus:
switch (b.controlID) {
case simcity.cSpeechBalloonHandler.kWinDetailedInfo:
a = this.GetSpeechBalloonItemInfo(c);
if ((a = a.item) && a.mIsThoughtBubble)
if (c = a.mLayout, !b.newFocus || b.newFocus.GetParentLayout() !== c)
simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kAudioThoughtLoseFocus), a.Collapse();
break;
case simcity.cSpeechBalloonHandler.kBtnOpen:
if (!b.newFocus || b.newFocus.GetControlID() !== simcity.cSpeechBalloonHandler.kWinDetailedInfo)
a = this.GetSpeechBalloonItemInfo(c),
(a = a.item) && a.mIsThoughtBubble && a.Collapse()
}
break;
case scrui.cLocaleManager.kLocaleSet:
this.CacheLayouts();
break;
case simcity.cSettingsUIHandler.kMessageOptionUpdated:
switch (b.itemData.optionID) {
case simcity.OptionItems.kGameplayTab.kHideSpeechBubbles.optionID:
this.mHideSpeechBubbles = 0 !== b.value;
this.OptionsUpdated();
break;
case simcity.OptionItems.kGameplayTab.kHideThoughtBubbles.optionID:
this.mHideThoughtBubbles = 0 !== b.value,
this.OptionsUpdated()
}
}
};
simcity.cSpeechBalloonHandler.prototype.PrintDebugInfo = function () {
if (simcity.DEBUG) {
var a = Object.keys(simcity.SpeechBalloonEvents).length,
b;
for (b in simcity.SpeechBalloonPolling)
a += Object.keys(simcity.SpeechBalloonPolling[b].DataBindings).length;
scrui.DebugPrint("cSpeechBalloonHandler mSpeechBalloons = " + this.mSpeechBalloons.length + ", mSpeechBalloonQueue = " + this.mSpeechBalloonQueue.length + ", mThoughtBubbleQueue = " + this.mThoughtBubbleQueue.length + ", dataBindings = " + a);
a = 0;
for (b = this.mSpeechBalloons.length; a <
b; ++a)
scrui.DebugPrint(" active: " + scrui.DecimalToHex(this.mSpeechBalloons[a].mDataBinding.id));
a = 0;
for (b = this.mSpeechBalloonQueue.length; a < b; ++a)
scrui.DebugPrint(" SB queue: " + scrui.DecimalToHex(this.mSpeechBalloonQueue[a].mDataBinding.id));
a = 0;
for (b = this.mThoughtBubbleQueue.length; a < b; ++a)
scrui.DebugPrint(" TB queue: " + scrui.DecimalToHex(this.mThoughtBubbleQueue[a].mDataBinding.id))
}
};
simcity.cSpeechBalloonHandler.prototype.OnAskMeLater = function (a) {
this.ExitSpeechBalloon(a, !1, !0)
};
simcity.cSpeechBalloonHandler.prototype.ExitSpeechBalloon = function (a, b, c) {
var d = null;
if (null == a)
if (this.mCurrentOpenBalloon) {
for (var d = this.mCurrentOpenBalloon, e = -1, f = 0, a = this.mSpeechBalloons.length; f < a; ++f)
if (d === this.mSpeechBalloons[f]) {
e = f;
break
}
this.mCurrentOpenBalloon = null;
if (0 <= e)
a = {
item : d,
index : e
};
else
return
} else
return;
else
d = a.item;
d && (e = d.mDataBinding, e.textIndex = 0, f = d === this.mDebugSpeechBalloonItem, this.RemoveSpeechBalloonItem(a), a = b && d.mButtonConfig === simcity.SpeechBalloonButtonConfigs.kEditNoThanks,
a || (b ? (e.hasOwnProperty("missionUnitID") && scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandCreateUnit, e.missionUnitID, simcity.kDataUnitRef, scrui.RequestStringFromUnitRef(d.mSourceUnitRef)])), simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kInstanceAccept)) : simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kInstanceDecline)), f || (c ? this.DecrementDisplayCountLimit(e) : this.RemoveSpeechBalloonDataBinding(e)), 0 < simcity.gGlobalUIHandler.mSpeedUIHandler.sPreviousGameSpeed &&
scrui.PostGameCommand(scrui.BuildCommand(["setspeed", simcity.gGlobalUIHandler.mSpeedUIHandler.sPreviousGameSpeed])), d.mDataBinding.bNoTransitionOut ? this.RestorCameraMinusTransition() : this.RestoreCamera(), scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandDeactivateVignette, scrui.RequestStringFromUnitRef(d.mDisplayUnitRef), simcity.kVignetteID])), a && scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandEditBuilding, scrui.RequestStringFromUnitRef(d.mDisplayUnitRef)])))
};
simcity.cSpeechBalloonHandler.prototype.GetSpeechBalloonItemInfo = function (a) {
for (var b = a.GetParentLayout(); b && b.GetControlID() !== simcity.cSpeechBalloonHandler.kLayoutIDSpeechBalloon; )
b = b.GetParentLayout();
scrui.Assert(b, "Failed to find a speech bubble container layout!");
for (var c = 0, d = this.mSpeechBalloons.length; c < d; ++c) {
var e = this.mSpeechBalloons[c];
if (e.mLayout === b)
return {
item : e,
index : c
}
}
if (this.mDebugSpeechBalloonItem) {
for (b = a.GetParentLayout(); b && b.GetControlID() !== simcity.cSpeechBalloonHandler.kLayoutIDSpeechBalloon; )
b =
b.GetParentLayout();
if (b === this.mDebugSpeechBalloonItem.mLayout)
return {
item : this.mDebugSpeechBalloonItem,
index : -1
}
}
return {
item : null,
index : -1
}
};
simcity.cSpeechBalloonHandler.prototype.DepthSort = function (a, b) {
var c = a.IsExpanded(),
d = b.IsExpanded();
return c !== d ? c < d ? -1 : 1 : a.mLayout.mTop - b.mLayout.mTop
};
simcity.TestSpeechBalloonTriggerHelper = scrui.Client_ProfZone("simcity.TestSpeechBalloonTriggerHelper", function (a) {
var b = simcity.gGlobalUIHandler.mSpeechBalloonHandler;
return (a.enableInTutorial || !simcity.IsTutorialInProgress()) && (a.enableInDisaster || !simcity.IsDisasterInProgress()) && (!a.missionUnitID || a.enableWithMaxMissions || 3 > simcity.GetMissionCount()) && (a.isThoughtBubble && !b.mHideThoughtBubbles || !a.isThoughtBubble && !b.mHideSpeechBubbles)
});
simcity.TestSpeechBalloonTriggerWithGlobalQueries = function (a, b) {
return simcity.TestSpeechBalloonTriggerHelper(a) && !b.isMissionActive && (!a.hasOwnProperty("test") || a.test(b))
};
simcity.TestSpeechBalloonItemHelper = function (a, b) {
var c = a.mDataBinding;
return a.IsExpanded() || b.isNormal && b.isOpenedForBusiness && !b.isEvacuated && (!b.isBurning || c.enableWhileBurning) && (!c.unitBin || 0 < b.unitBin) && simcity.TestSpeechBalloonTriggerWithGlobalQueries(c, b)
};
simcity.GetSpeechBalloonTarget = function (a) {
var b = 0;
return b = a.hasOwnProperty("unitID") ? a.unitID : a.hasOwnProperty("speechBalloonTarget") ? a.speechBalloonTarget : 3403061518
};
simcity.cSpeechBalloonHandler.prototype.Update = scrui.Client_ProfZone("cSpeechBalloonHandler.Update", function () {
if (0 < this.mVisibilityCounter) {
var a = simcity.gGlobalUIHandler.mGameTimeManager.GetElapsedGameTimeSeconds();
this.UpdateQueue(a);
if (0 !== this.mSpeechBalloons.length) {
for (var b = Array(2 * this.mSpeechBalloons.length), c = !1, d = 0, e = this.mSpeechBalloons.length; d < e; ++d) {
var f = this.mSpeechBalloons[d];
7 > f.mDataBinding.importance && (c = !0);
f = scrui.RequestStringFromUnitRef(f.mDisplayUnitRef);
b[2 * d] = scrui.BuildRequestQuery([simcity.kDataUnits,
f, simcity.kDataScreenPositionTop, simcity.kDataCheckFrustum]);
b[2 * d + 1] = scrui.BuildRequestQuery([simcity.kDataUnits, f, simcity.kDataScreenPositionSpeechBalloon])
}
c && b.push(scrui.BuildRequestQuery([simcity.kDataCamera]));
var g = this;
scrui.RequestGameData(b, function (b) {
for (var d = scrui.GetClientWidth(), e = scrui.GetClientHeight(), f = c ? b[b.length - 1] : null, l = 0, m = 0, n = g.mSpeechBalloons.length; l < n; ++l) {
var p = b[2 * l],
q = g.mSpeechBalloons[m];
if (p) {
var o = b[2 * l + 1],
o = !q.IsExpanded() || q.mIsThoughtBubble ? p : o,
r = q.mValidated &&
q.mbShouldBeVisible && o && 0 <= o[0] && o[0] < d && 0 <= o[1] && o[1] < e,
s = q.mLayout,
p = q.mDataBinding;
r && (c && 8 > p.importance) && (r = f.distance < 300 * p.importance);
s.SetVisibility(r);
r && s.SetPosition(o[0], o[1], s.mWidth, s.mHeight);
++m
} else !q.mIsThoughtBubble && q.IsExpanded() && g.RestoreCamera(), g.RemoveSpeechBalloonAtIndex(m)
}
if (1 < g.mSpeechBalloons.length) {
g.mSpeechBalloons.sort(g.DepthSort);
p = -1;
b = !1;
l = 0;
for (n = g.mSpeechBalloons.length; l < n; ++l) {
q = g.mSpeechBalloons[l];
if (q.mDepthIndex <= p) {
b = !0;
break
}
p = q.mDepthIndex
}
if (b) {
l =
0;
for (n = g.mSpeechBalloons.length; l < n; ++l)
q = g.mSpeechBalloons[l], q.mLayout.Reparent(g.mContainerWindow), q.mDepthIndex = l
}
}
g.mUpdateTimer += a;
if (1 < g.mUpdateTimer) {
n = g.mUpdateTimer;
g.mUpdateTimer = 0;
for (var t = g.mSpeechBalloons.length, l = 0; l < t; )
p = !1, q = g.mSpeechBalloons[l], -1 !== q.mExpirationTime && (q.mExpirationTime -= n, 0 >= q.mExpirationTime && !q.IsExpanded() && (g.RemoveSpeechBalloonAtIndex(l), --t, p = !0)), p || ++l;
if (0 !== t) {
n = [];
b = Array(t);
for (l = 0; l < t; ++l)
if (q = g.mSpeechBalloons[l], p = q.mDataBinding, p.hasOwnProperty("queries") ?
(simcity.AddSimpleQueries(n, p.queries), b[l] = Object.keys(p.queries)) : b[l] = [], q = scrui.RequestStringFromUnitRef(q.mDisplayUnitRef), n.push(scrui.BuildRequestQuery([simcity.kDataUnits, q, simcity.kDataFlags, simcity.kUnitFlagNormal])), b[l].push("isNormal"), n.push(scrui.BuildRequestQuery([simcity.kDataUnits, q, simcity.kDataFlags, simcity.kUnitFlagOpenForBusiness])), b[l].push("isOpenedForBusiness"), n.push(scrui.BuildRequestQuery([simcity.kDataUnits, q, simcity.kDataFlags, simcity.kUnitFlagEvacuation])), b[l].push("isEvacuated"),
p.enableWhileBurning || (n.push(scrui.BuildRequestQuery([simcity.kDataUnits, q, simcity.kDataFlags, simcity.kUnitFlagIsOnFire])), b[l].push("isBurning")), p.unitBin)
n.push(scrui.BuildRequestQuery([simcity.kDataUnits, q, simcity.kDataBinAmount, p.unitBin])), b[l].push("unitBin");
simcity.RequestDataBindingDataSimple(n, b, function (a) {
for (var b = 0, c = 0; b < t; ++b) {
var d = g.mSpeechBalloons[c];
simcity.TestSpeechBalloonItemHelper(d, a[b]) ? (d.mValidated = !0, ++c) : g.RemoveSpeechBalloonAtIndex(c)
}
})
}
}
})
}
simcity.DEBUG && this.mDebugSpeechBalloonItem &&
(b = scrui.RequestStringFromUnitRef(this.mDebugSpeechBalloonItem.mDisplayUnitRef), b = [scrui.BuildRequestQuery([simcity.kDataUnits, b, simcity.kDataScreenPositionTop, simcity.kDataCheckFrustum]), scrui.BuildRequestQuery([simcity.kDataUnits, b, simcity.kDataScreenPositionSpeechBalloon])], g = this, scrui.RequestGameData(b, function (a) {
if (a[0]) {
var b = scrui.GetClientWidth(),
c = scrui.GetClientHeight(),
d = a[0],
a = a[1],
d = !g.mDebugSpeechBalloonItem.IsExpanded() || g.mDebugSpeechBalloonItem.mIsThoughtBubble ? d : a,
b = g.mDebugSpeechBalloonItem.mbShouldBeVisible &&
d && 0 <= d[0] && d[0] < b && 0 <= d[1] && d[1] < c,
c = g.mDebugSpeechBalloonItem.mLayout;
c.SetVisibility(b);
b && c.SetPosition(d[0], d[1], c.mWidth, c.mHeight)
} else
g.mDebugSpeechBalloonItem.mLayout.DestroyControl(), g.mDebugSpeechBalloonItem = null
}))
}
});
simcity.cSpeechBalloonHandler.prototype.OnKeyDown = function (a, b, c, d, e) {
if (simcity.DEBUG && a === scrui.kKeyCodeLetterB && c && !d && !e)
if (this.mListBox || (this.mListBox = new simcity.cListBox), this.mListBox.IsVisible())
this.mListBox.Hide();
else {
var a = [],
f;
for (f in simcity.SpeechBalloonPolling)
for (var g in simcity.SpeechBalloonPolling[f].DataBindings)
a.push(scrui.DecimalToHex(Number(g)));
for (g in simcity.SpeechBalloonEvents.DataBindings)
a.push(scrui.DecimalToHex(Number(g)));
this.mListBox.Show();
this.mListBox.SetContent(a)
}
};
simcity.LoadMissionInfo = {
kPropMissionRewardAmount : 213280849,
kPropMissionTitle : 213281542
};
simcity.GamePropertyIDs = {};
simcity.kPropertySCUnitProductionInput = 164390534;
simcity.kPropertySCUnitProductionOutput = 164390535;
simcity.kPropertyUnitPopupItemIDs = 215278748;
simcity.kPropertyUnitShowOnOffToggle = 212148229;
simcity.kPropertyUnitShowImportExportToggle = 212148215;
simcity.kPropertyUnitShowGlobalTradeToggle = 212148216;
simcity.kPropertyUnitShowDeliveriesToggle = 212148225;
simcity.kPropertySCUnitCategory = 184428465;
simcity.kPropertySCUnitEditorCategory = 184428490;
simcity.kPropertySCUnitIsModule = 184430571;
simcity.kPropSCUnitAbandoned = 162404819;
simcity.kPropSCUnitName = 167475403;
simcity.kPropSCUnitBuildingType = 162404824;
simcity.kPropSCUnitLocalizationFile = 228496751;
simcity.kPropertyLayerName = 162992579;
simcity.kPropertyLayerIconKey = 162992581;
simcity.kPropertyLayerLegend = 234967577;
simcity.kPropertyLayerDarkIconKey = 231328322;
simcity.kPropEcoGameToolCategoryGroup = 161791652;
simcity.kPropEcoGameToolGroup = 150302909;
simcity.kPropToolCategoryPaletteLayout = 203617502;
simcity.kPropToolCategoryToolList = 184264845;
simcity.kPropToolCategoryGroupID = 203785649;
simcity.kPropToolCategoryOrder = 3452891567;
simcity.kPropertyDescription = 11717834;
simcity.kPropToolPaletteToolCategoryIDs = 161783844;
simcity.kPropToolPaletteCategoryOffsets = 210097221;
simcity.kPropToolPaletteCategoryIsDebug = 219240790;
simcity.kPropToolCategoryName = 204207203;
simcity.kPropToolCategoryIconKeys = 179881228;
simcity.kPropSCUnitConstructionCost = 176832986;
simcity.kPropSCUnitMaintenanceCost = 162404823;
simcity.kPropSCUnitIsModule = 184430571;
simcity.kPropTaxesBuildingTaxValue = 175708100;
simcity.kPropEcoUnitResourceBins = 132164899;
simcity.kPropEcoUnitResourceBinCapacities = 132164900;
simcity.kPropEcoUnitLeaderboardID = 246722129;
simcity.kPropToolDemoLocked = 253368349;
simcity.kPropStadium_MaxAttendance = 232631573;
simcity.kPropSCUnitIconKey = 184863207;
simcity.kPropSCToolCategoryInfoLayout = 185028011;
simcity.kPropSCToolCategoryContextualInfoLayout = 215861361;
simcity.kPropToolCategoryLayerKey = 183208612;
simcity.kPropEcoAlertIcon = 169304569;
simcity.kPropEcoUnitDirectionalTrade = 182461265;
simcity.kPropSCUnitRolloverTextFile = 224007796;
simcity.kPropSkillConsumer_SkillThresholdE2 = 205848713;
simcity.kPropSkillConsumer_SkillThresholdE3 = 205848714;
simcity.kPropHappiness_HappinessTokensThresholdForDensityUpgrade = 240412562;
simcity.kPropHappiness_DefaultHappinessTokens = 240412560;
simcity.kPropRCI_TotalPopulation = 175708107;
simcity.kPropProfit_ProfitTokensThresholdForDensityUpgrade = 240412647;
simcity.kPropProfit_DefaultProfitTokens = 179930538;
simcity.kPropTaxes_ToyIncomePerResource = 229427166;
simcity.kPropTaxes_ToyIncomePerResourceW1 = 249734413;
simcity.kPropTaxes_ToyIncomePerResourceW2 = 249734414;
simcity.kPropTaxes_ToyIncomePerResourceW3 = 249734415;
simcity.kPropWork_MinimumWorkersForProduction = 175708104;
simcity.kPropWork_JobsW1 = 175708101;
simcity.kPropWork_JobsW2 = 175708102;
simcity.kPropWork_JobsW3 = 175708103;
simcity.kPropWork_TotalJobs = 175708099;
simcity.kPropShopping_TotalShoppers = 181839653;
simcity.kPropPowerProducer_Amount = 184260737;
simcity.kPropPowerProducer_Rate = 184260739;
simcity.kPropPowerProducer_ResourceInputAmount = 196859290;
simcity.kPropPowerConsumer_Amount = 193499214;
simcity.kPropPowerConsumer_Rate = 184260738;
simcity.kPropPowerConsumer_Capacity = 201972384;
simcity.kPropAirPollutionTransmitter_Amount = 202579140;
simcity.kPropAirPollutionTransmitter_Rate = 202579145;
simcity.kPropGroundPollutionTransmitter_Amount = 202579196;
simcity.kPropGroundPollutionTransmitter_Rate = 202579201;
simcity.kPropAirPollutionProduced = 2384844795;
simcity.kPropAirPollutionPerHour = 295846734;
simcity.kPropGroundPollutionProduced = 3460390506;
simcity.kPropGroundPollutionPerHour = 4093723865;
simcity.kPropExtractor_GroundPollutionAmount = 234972321;
simcity.kPropExtractor_AirPollutionAmount = 234972327;
simcity.kPropExtractor_Rate = 234972325;
simcity.kPropWaterProducer_Rate = 201972355;
simcity.kPropWaterProducer_Amount_Minimum = 215598739;
simcity.kPropWaterProducer_Amount_OneOverSteps = 215598740;
simcity.kPropWaterProducer_Amount_PerStep = 215598741;
simcity.kPropWaterConsumer_Amount = 201972325;
simcity.kPropWaterConsumer_Rate = 201972330;
simcity.kPropWaterConsumer_Capacity = 201972314;
simcity.kPropGarbageProducer_GarbageOnlyAmount = 203515234;
simcity.kPropStorage_AlloyCapacity = 230118656;
simcity.kPropStorage_FuelCapacity = 230118657;
simcity.kPropStorage_MetalCapacity = 230118658;
simcity.kPropStorage_OilCrudeCapacity = 230118659;
simcity.kPropStorage_OreRawCapacity = 230118660;
simcity.kPropStorage_PlasticCapacity = 230118661;
simcity.kPropStorage_CoalCapacity = 230118662;
simcity.kPropSewageConsumer_Amount = 198000208;
simcity.kPropSewageConsumer_Rate = 198000222;
simcity.kPropFlammable_SelfIgniteThreshold_High = 225896677;
simcity.kPropMissionThreshold = 204206796;
simcity.kPropSelectSolarFarmCost = 240656657;
simcity.kPropSelectAirportCost = 240656673;
simcity.kPropSelectSpaceCenterCost = 240656689;
simcity.kPropSelectArcologyCost = 245092989;
simcity.kPropUpgradeSolarFarmCost = 240722193;
simcity.kPropUpgradeAirportCost = 240722209;
simcity.kPropUpgradeCoalMineCost = 240722225;
simcity.kPropJoinSolarFarmCost = 240726289;
simcity.kPropJoinAirportCost = 240726305;
simcity.kPropJoinCoalMineCost = 240726321;
simcity.kPropNetUserID = 150330521;
simcity.kPropToolRolloverLayout = 200496699;
simcity.kPropToolLockedRolloverLayout = 200656636;
simcity.kPropUnlock_Bin = 200659683;
simcity.kPropUnlock_BinAmount = 200659684;
simcity.kPropUnlock_Bin2 = 200659667;
simcity.kPropUnlock_BinAmount2 = 200659668;
simcity.kPropUnlock_Bin3 = 200659699;
simcity.kPropUnlock_BinAmount3 = 200659700;
simcity.kPropToolUnlockMissionStringID = 202401640;
simcity.kPropToolUnlockMissionLayout = 202402855;
simcity.kPropToolIconKey = 158837391;
simcity.kPropModule_UnlockTokenCost = 214482518;
simcity.kPropToolMarqueeImage = 232713814;
simcity.kPropBorderUIGreatWorksIcon = 241963153;
simcity.kPropToolUnlockBin = 233328073;
simcity.kPropToolUnlockTargetAmount = 233328083;
simcity.kPropToolUnlockString = 233328092;
simcity.kPropToolUnlockImage = 249666093;
simcity.kPropToolUpgradeString = 249664254;
simcity.kPropToolUnlockConversionType = 248907074;
simcity.kPropscToolUpgradeConversionType = 248958669;
simcity.kPropUILayoutSize = 237392575;
simcity.kPropWallMessageRequiredOnPlop = 245926208;
simcity.kPropCoalHarvester_HarvestRate = 203163684;
simcity.kPropCoalHarvester_HarvestAmount = 203163685;
simcity.kPropCoalHarvester_HarvestAmountSoil = 205944737;
simcity.kPropCoalDelivery_MaxCoalLoad = 204296255;
simcity.kPropCoal_ProductionUpdateRate = 207825329;
simcity.kPropCoalMiningHQ_CoalSoldForLevel1 = 208433081;
simcity.kPropCoalMiningHQ_CoalSoldForLevel2 = 208433082;
simcity.kPropCoalMiningHQ_CoalSoldForLevel3 = 208433083;
simcity.kPropscCoalBuyPrice = 234955856;
simcity.kPropscCoalSellPrice = 234955857;
simcity.kPropTradeGlobalMarket_CoalBuyRate = 204116265;
simcity.kPropTradeGlobalMarket_CoalSellRate = 204203786;
simcity.kPropHQ_ProgressAmount_Level2 = 230741050;
simcity.kPropHQ_ProgressAmount_Level3 = 230741051;
simcity.kPropHQ_ProgressAmount_Level4 = 230741052;
simcity.kPropscPlasticBuyPrice = 234955858;
simcity.kPropscPlasticSellPrice = 234955859;
simcity.kPropscAlloyBuyPrice = 234955860;
simcity.kPropscAlloySellPrice = 234955861;
simcity.kPropscElectronicsBuyPrice = 234955862;
simcity.kPropscElectronicsSellPrice = 234955863;
simcity.kPropscComputerBuyPrice = 234974850;
simcity.kPropscComputerSellPrice = 234974856;
simcity.kPropscTelevisionBuyPrice = 234974880;
simcity.kPropscTelevisionSellPrice = 234974881;
simcity.kPropscOilCrudeBuyPrice = 234955864;
simcity.kPropscOilCrudeSellPrice = 234955865;
simcity.kPropscOreRawBuyPrice = 234955866;
simcity.kPropscOreRawSellPrice = 234955867;
simcity.kPropscMetalBuyPrice = 234955868;
simcity.kPropscMetalSellPrice = 234955869;
simcity.kPropscFuelBuyPrice = 234955870;
simcity.kPropscFuelSellPrice = 234955871;
simcity.kPropscscGlobalMarketTransferAmount = 241528555;
simcity.kPropResearch_Project1_ResearchCost = 227803142;
simcity.kPropResearch_Project2_ResearchCost = 227803158;
simcity.kPropResearch_Project3_ResearchCost = 227803174;
simcity.kPropResearch_Project4_ResearchCost = 227803190;
simcity.kPropResearch_Project5_ResearchCost = 227803206;
simcity.kPropResearch_Project6_ResearchCost = 227803222;
simcity.kPropResearch_Project7_ResearchCost = 227803238;
simcity.kPropResearch_Project8_ResearchCost = 227803254;
simcity.kPropResearch_Project9_ResearchCost = 227803270;
simcity.kPropResearch_Project10_ResearchCost = 227803286;
simcity.kPropResearch_Project11_ResearchCost = 227803302;
simcity.kPropResearch_Project12_ResearchCost = 227803318;
simcity.kPropResearch_Project13_ResearchCost = 227803334;
simcity.kPropResearch_Project14_ResearchCost = 227803350;
simcity.kPropResearch_Project15_ResearchCost = 227803366;
simcity.kPropResearch_Project16_ResearchCost = 227803382;
simcity.kPropResearch_Project17_ResearchCost = 227803398;
simcity.kPropResearch_Project18_ResearchCost = 227803414;
simcity.kPropResearch_Project19_ResearchCost = 227803430;
simcity.kPropResearch_Project20_ResearchCost = 227803446;
simcity.kPropMissionTitle = 213281542;
simcity.kPropMissionTip = 2776865048;
simcity.kPropMissionLayout = 213280685;
simcity.kPropMissionBadgeGraphics = 213281827;
simcity.kPropMissionObjectiveResources = 213280652;
simcity.kPropMissionObjectiveResourcesFromNeighbors = 223125386;
simcity.kPropMissionObjectiveStrings = 213280659;
simcity.kPropMissionObjectiveType = 214390666;
simcity.kPropMissionObjectiveLayout = 222886474;
simcity.kPropMissionObjectiveIsGlobal = 241891091;
simcity.kPropMissionRewardResource = 213280845;
simcity.kPropMissionRewardAmount = 213280849;
simcity.kPropMissionIsTutorial = 768128695;
simcity.kPropMissionPortrait = 218719241;
simcity.kPropMissionIcon = 218719254;
simcity.kPropMission_Linear = 239782996;
simcity.kPropMissionCanClose = 255809596;
simcity.kPropMission_Objective1_Goal = 213889488;
simcity.kPropMission_Objective2_Goal = 213889521;
simcity.kPropMission_Objective3_Goal = 214667092;
simcity.kPropMission_Objective4_Goal = 214667109;
simcity.kPropMission_Objective5_Goal = 214310239;
simcity.kPropMission_Objective6_Goal = 214667172;
simcity.kPropMission_Objective7_Goal = 214667184;
simcity.kPropMission_Objective8_Goal = 214667192;
simcity.kPropMission_Objective1_Ignore = 223492306;
simcity.kPropMission_Objective2_Ignore = 223488211;
simcity.kPropMission_Objective3_Ignore = 223492308;
simcity.kPropMission_Objective4_Ignore = 223492309;
simcity.kPropMission_Objective5_Ignore = 223951068;
simcity.kPropMission_Objective6_Ignore = 223951071;
simcity.kPropMission_Objective7_Ignore = 207441881;
simcity.kPropMission_Objective8_Ignore = 207441626;
simcity.kPropEcoAlertIcon = 169304569;
simcity.kPropEcoNetRESTAPI = 150330524;
simcity.kPropNetServiceNews = 170244787;
simcity.kPropQuitGameSurveyURL = 253103863;
simcity.kPropEnableTutorial = 225478632;
simcity.kPropEnableNewUI = 188100158;
simcity.kPropEnableOriginLogin = 231936915;
simcity.kPropOriginAddOnStore = 4263713262;
simcity.kPropAdWebServer = 242821410;
simcity.kShowStore = 242912640;
simcity.kSkipIntroMovie = 4220525218;
simcity.kBetaFlow = 2002965982;
simcity.databindings.DataBindingsRegionWallMessages = {};
simcity.cUnitRefDummy = function () {
this.slot = -1;
this.stamp = 4294967295
};
simcity.kInvalidUnitRef = new simcity.cUnitRefDummy;
simcity.RegionMessageEvents = {
2970307211 : {
stringID : 3177370982,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
3551534130 : {
stringID : 967122675,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
4050545318 : {
stringID : 664914800,
isLocal : !1,
queries : {
CriminalsAtLarge : [simcity.kDataResourceAmount, simcity.kResourceIDCriminalsAtLarge]
},
test : function (a) {
return 0 < a.CriminalsAtLarge
},
triggerTime : [60, 120],
priority : 3
},
1869765365 : {
stringID : 3452127560,
isLocal : !1,
triggerTime : [20, 20],
priority : 3
},
2946006796 : {
stringID : 2454109659,
isLocal : !1,
triggerTime : [20, 20],
priority : 3
},
692471217 : {
stringID : 1980527812,
isLocal : !1,
triggerTime : [20, 20],
priority : 3
},
4106396754 : {
stringID : 356131754,
isLocal : !1,
triggerTime : [20, 20],
priority : 3
},
2129960862 : {
stringID : 2670027139,
isLocal : !1,
triggerTime : [20, 20],
priority : 3
},
3650755860 : {
stringID : 2117497028,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
3316408922 : {
stringID : 4129470338,
isLocal : !0,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
560208010 : {
stringID : 793760923,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
784034921 : {
stringID : 1099531607,
isLocal : !0,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
3279936225 : {
stringID : 2759714656,
isLocal : !1,
triggerTime : [300, 500],
priority : 3
},
4492462 : {
stringID : 4196671358,
isLocal : !1,
triggerTime : [10, 10],
priority : 3
},
4492461 : {
stringID : 2196025111,
isLocal : !1,
triggerTime : [10, 10],
priority : 3
},
4492460 : {
stringID : 3066998032,
isLocal : !1,
triggerTime : [10, 10],
priority : 3
},
4492459 : {
stringID : 332265001,
isLocal : !1,
triggerTime : [10, 10],
priority : 3
},
4492458 : {
stringID : 2358472010,
isLocal : !1,
triggerTime : [10,
10],
priority : 3
},
4492457 : {
stringID : 2233964595,
isLocal : !1,
triggerTime : [10, 10],
priority : 3
},
85485812 : {
stringID : 3819634570,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
85485813 : {
stringID : 3819634570,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
85485810 : {
stringID : 3819634570,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
4030411196 : {
stringID : 941407708,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
4030411197 : {
stringID : 941407708,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
4030411194 : {
stringID : 941407708,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
604702533 : {
stringID : 93373763,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
604702532 : {
stringID : 93373763,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
604702531 : {
stringID : 93373763,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
2507953789 : {
stringID : 3427503266,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
2507953788 : {
stringID : 3427503266,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
2507953787 : {
stringID : 3427503266,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
336192205 : {
stringID : 1947141656,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
213897803 : {
stringID : 786324363,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
213897802 : {
stringID : 786324363,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
213897805 : {
stringID : 786324363,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
1352364268 : {
stringID : 1642056741,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
1085112231 : {
stringID : 748028166,
isLocal : !1,
triggerTime : [100, 110],
priority : 3
},
273246572 : {
stringID : 1082443687,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
2086471872 : {
stringID : 1077886423,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
547493367 : {
stringID : 2746897420,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
3434896602 : {
stringID : 1407186544,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
3394549971 : {
stringID : 1167198253,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
2191451156 : {
stringID : 1062646558,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
2151991692 : {
stringID : 623086870,
isLocal : !1,
triggerTime : [100, 100],
unitName : !0,
priority : 3
},
240614315 : {
stringID : 1702137092,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
1056682224 : {
stringID : 3528894317,
isLocal : !1,
triggerTime : [100, 110],
priority : 3
},
3404809973 : {
stringID : 2784019700,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
1237310193 : {
stringID : 2773304644,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
613821749 : {
stringID : 824008538,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
2527348735 : {
stringID : 3978288325,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
1457920863 : {
stringID : 1084542248,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
315552047 : {
stringID : 2431079350,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
3649530926 : {
stringID : 336694083,
isLocal : !1,
triggerTime : [100, 110],
priority : 3
},
305275097 : {
stringID : 3981011126,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
1008546581 : {
stringID : 3049739914,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
1403598348 : {
stringID : 313028661,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
1857207937 : {
stringID : 4189369887,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
1978875843 : {
stringID : 2428539334,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
953251713 : {
stringID : 3271851124,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
1996490892 : {
stringID : 1676148221,
isLocal : !1,
triggerTime : [100, 110],
priority : 3
},
784057384 : {
stringID : 2047222683,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
3327882344 : {
stringID : 387971453,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
518487999 : {
stringID : 2034335728,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
1777076971 : {
stringID : 1730229604,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
984231477 : {
stringID : 2574005888,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
3928368755 : {
stringID : 3475060852,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
3427807351 : {
stringID : 822635594,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
1712294531 : {
stringID : 300016405,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
1260164361 : {
stringID : 3758833016,
isLocal : !1,
triggerTime : [100, 100],
priority : 3
},
3829571872 : {
stringID : 1954274090,
isLocal : !1,
triggerTime : [10, 10],
priority : 3
},
2135241320 : {
stringID : 1170243501,
isLocal : !1,
queries : {
shoppersCommuting : [simcity.kDataUnits, simcity.kInvalidUnitRef, simcity.kDataBins, simcity.kResourceIDTotalShoppers]
},
test : function (a) {
return 5E3 < a.shoppersCommuting.amount && 1E4 > a.shoppersCommuting.amount
},
triggerTime : [10, 10],
isRegional : !0,
priority : 3
},
4147164626 : {
stringID : 2970835738,
isLocal : !1,
queries : {
freightD1 : [simcity.kDataBinAmount,
simcity.kResourceIDTradeExcessFreightConsumerD1],
freightD2 : [simcity.kDataBinAmount, simcity.kResourceIDTradeExcessFreightConsumerD2],
freightD3 : [simcity.kDataBinAmount, simcity.kResourceIDTradeExcessFreightConsumerD3]
},
test : function (a) {
return 500 < a.freightD1 + a.freightD2 + a.freightD3
},
triggerTime : [12E3, 14400],
priority : 3
},
1043389051 : {
stringID : 802776009,
isLocal : !1,
queries : {
studentsE2 : [simcity.kDataBinAmount, simcity.kResourceIDExcessStudentE2],
studentsE3 : [simcity.kDataBinAmount, simcity.kResourceIDExcessStudentE3]
},
test : function (a) {
return 200 < a.studentsE2 + a.studentsE3
},
triggerTime : [12E3, 14400],
priority : 3
},
3973798850 : {
stringID : 3768062206,
isLocal : !1,
queries : {
shopperW1 : [simcity.kDataResourceAmount, simcity.kResourceIDExcessShoppersNeededW1],
shopperW2 : [simcity.kDataResourceAmount, simcity.kResourceIDExcessShoppersNeededW2],
shopperW3 : [simcity.kDataResourceAmount, simcity.kResourceIDExcessShoppersNeededW3]
},
test : function (a) {
return 500 < a.shopperW1 + a.shopperW2 + a.shopperW3
},
triggerTime : [12E3, 14400],
priority : 3
},
1936017881 : {
stringID : 712468257,
isLocal : !1,
queries : {
dayJobsW1 : [simcity.kDataResourceAmount, simcity.kResourceIDTradeExcessDayJobsW1],
dayJobsW2 : [simcity.kDataResourceAmount, simcity.kResourceIDTradeExcessDayJobsW2],
dayJobsW3 : [simcity.kDataResourceAmount, simcity.kResourceIDTradeExcessDayJobsW3],
nightJobsW1 : [simcity.kDataResourceAmount, simcity.kResourceIDTradeExcessNightJobsW1],
nightJobsW2 : [simcity.kDataResourceAmount, simcity.kResourceIDTradeExcessNightJobsW2],
nightJobsW3 : [simcity.kDataResourceAmount, simcity.kResourceIDTradeExcessNightJobsW3]
},
test : function (a) {
return 500 < a.dayJobsW1 + a.dayJobsW2 + a.dayJobsW3 + a.nightJobsW1 + a.nightJobsW2 + a.nightJobsW3
},
triggerTime : [12E3, 14400],
priority : 3
},
1581786865 : {
stringID : 422554281,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
3553151980 : {
stringID : 4035345238,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
2698180085 : {
stringID : 1121250989,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
3172414392 : {
stringID : 2778337362,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
1587092137 : {
stringID : 1514516641,
isLocal : !1,
triggerTime : [100,
140],
priority : 3
},
2908384248 : {
stringID : 1710717970,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
1574501649 : {
stringID : 1778853833,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
1814056736 : {
stringID : 4071459514,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
1240223 : {
stringID : 2822698367,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
2276394404 : {
stringID : 1713629742,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
3093946627 : {
stringID : 2117497028,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
173036551 : {
stringID : 2898957654,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
2536123487 : {
stringID : 2591661151,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
2234708352 : {
stringID : 872116442,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
1204312109 : {
stringID : 1326826885,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
603282453 : {
stringID : 1240312237,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
3949915358 : {
stringID : 307661544,
isLocal : !1,
triggerTime : [100, 140],
priority : 3
},
2748655574 : {
stringID : 2284692441,
isLocal : !1,
triggerTime : [100, 100],
isRegional : !0,
priority : 3
},
1563948172 : {
stringID : 1413570719,
isLocal : !1,
triggerTime : [100, 100],
isRegional : !0,
priority : 3
},
4252978561 : {
stringID : 1221922650,
isLocal : !1,
triggerTime : [100, 100],
isRegional : !0,
priority : 3
},
1906924031 : {
stringID : 4103272604,
isLocal : !1,
triggerTime : [100, 100],
isRegional : !0,
priority : 3
},
2472555140 : {
stringID : 2973558083,
isLocal : !1,
triggerTime : [100, 100],
isRegional : !0,
priority : 3
},
3348893750 : {
stringID : 2539580621,
isLocal : !1,
triggerTime : [100, 100],
isRegional : !0,
priority : 3
},
1469982804 : {
stringID : 3951761431,
isLocal : !1,
triggerTime : [100, 100],
isRegional : !0,
priority : 3
},
931115782 : {
stringID : 190247489,
isLocal : !1,
triggerTime : [100, 100],
isRegional : !0,
priority : 3
},
3950694920 : {
stringID : 3117442942,
isLocal : !1,
triggerTime : [300, 300],
isRegional : !0,
priority : 3
},
599006482 : {
stringID : 1916897296,
isLocal : !1,
triggerTime : [300, 300],
isRegional : !0,
priority : 3
},
2169095412 : {
stringID : 4069536574,
isLocal : !1,
triggerTime : [100, 100],
isRegional : !0,
priority : 3
},
3256678384 : {
stringID : 1026147784,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
1267120863 : {
stringID : 1002677135,
isLocal : !1,
queries : {
fireServiceExported : [simcity.kDataResourceAmount, simcity.kResourceIDProtestNoWater],
simoleonsFromFireService : [simcity.kDataBinAmount, simcity.kResourceIDGlobalMission_MSCivicProtestAboutNoWater]
},
test : function (a) {
return 0 !== a.fireServiceExported
},
triggerTime : [100, 140],
priority : 3
},
4009418537 : {
stringID : 205711322,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
2758405397 : {
stringID : 2052436420,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
2685183399 : {
stringID : 4244328430,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
2515094167 : {
stringID : 1330715536,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
3641364886 : {
stringID : 3762122959,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
3641364885 : {
stringID : 1017361590,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
1088504669 : {
stringID : 4101518932,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
3989997002 : {
stringID : 3814398643,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
422466847 : {
stringID : 2074705640,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
218485210 : {
stringID : 1293270685,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
54497777 : {
stringID : 2253475904,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
3866011022 : {
stringID : 423665131,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
756866224 : {
stringID : 2225839005,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
4180706698 : {
stringID : 1026896249,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
3022707775 : {
stringID : 3387670628,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
3022707772 : {
stringID : 776339729,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
177105306 : {
stringID : 2856055673,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
3924901731 : {
stringID : 3015018040,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
1623329854 : {
stringID : 950650955,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
302924469 : {
stringID : 1121030768,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
1864216859 : {
stringID : 243842452,
isLocal : !1,
triggerTime : [100, 140],
isRegional : !0,
priority : 3
},
3518522253 : {
stringID : 2289449385,
isLocal : !1,
triggerTime : [300, 300],
isRegional : !0,
priority : 3
},
1673692569 : {
stringID : 2221901229,
isLocal : !1,
triggerTime : [300, 300],
isRegional : !0,
priority : 3
},
2671259898 : {
stringID : 127752192,
isLocal : !1,
triggerTime : [300, 300],
isRegional : !0,
priority : 3
},
148571676 : {
stringID : 911839530,
isLocal : !1,
triggerTime : [300, 300],
isRegional : !0,
priority : 3
}
};
simcity.Ticker = {};
simcity.cMessage = function (a, b, c) {
var d = this;
this.mDataBinding = a;
this.mText = b;
this.mInterrupt = a.hasOwnProperty("interrupt") ? a.interrupt : !1;
this.mInterruptBasic = a.hasOwnProperty("interruptBasic") ? a.interruptBasic : !1;
b = a.category;
this.mColor = a.hasOwnProperty("color") ? a.color : b.color;
this.mBlink = a.hasOwnProperty("blink") ? a.blink : b.blink;
this.mImportance = a.hasOwnProperty("importance") ? a.importance : 1;
scrui.Assert(1 <= this.mImportance);
this.mRepeats = 1;
var e = null;
a.hasOwnProperty("popOut") ? e = a.popOut : b && (e =
b.popOut);
if ("number" === typeof e) {
var f = a.extension || b && b.extension,
f = f ? scrui.DecimalToHex(f) : "png";
this.mPopout = scrui.DecimalToHex(e) + "." + f
} else
this.mPopout = e;
e = null;
a.hasOwnProperty("popoutsound") ? e = a.popoutsound : b && (e = b.popousound);
this.mPopoutSound = e;
this.mPopoutText = null;
if (a.hasOwnProperty("localizedPopOutText")) {
var b = a.hasOwnProperty("tableID") ? scrui.DecimalToHex(a.tableID) : "AutomatedTicker",
g = new scrui.cLocaleString(b, scrui.DecimalToHex(a.localizedPopOutText));
g.LoadString(function () {
d.mPopoutText =
simcity.cTicker.debuggingWireArticles ? g.mStringID + " " + g.GetText(c) : g.GetText(c);
if (!d.mDataBinding.hasOwnProperty("stringID")) {
d.mText = d.mPopoutText;
d.mColor = "rgba(0,0,0,0.0)"
}
})
}
this.mHyperLink = a.hasOwnProperty("hyperlink") ? a.hyperlink : null;
this.mUnitRef = a.hasOwnProperty("unitRef") ? a.unitRef : null;
this.mRolloverCategoryImage = a.hasOwnProperty("rolloverCategory") ? a.rolloverCategory : null;
this.mFriendCreatorID = a.hasOwnProperty("friendCreatorID") ? a.friendCreatorID : null;
this.mNewsData = [];
this.mNewsData.hash =
a.hash;
this.mNewsData.rolloverCategoryImage = this.mRolloverCategoryImage;
this.mNewsData.category = a.hasOwnProperty("newsCategory") ? a.newsCategory : null;
this.mNewsData.popoutThumbnail = this.mPopout;
this.mNewsData.popoutText = this.mPopoutText;
this.mNewsData.hyperlink = this.mHyperLink;
this.mNewsData.speechBalloon = a.hasOwnProperty("speechBalloon") ? a.speechBalloon : null;
this.mNewsData.bodyText = a.hasOwnProperty("newsBodyText") ? a.newsBodyText : null;
if (a.hasOwnProperty("localizedNewsBodyText")) {
var h = this.mNewsData;
a.localizedNewsBodyText.LoadString(function () {
h.bodyText = a.localizedNewsBodyText.GetText(c)
})
}
this.mDetokenizers = a.detokenizers;
this.mTimeInQueue = this.mCount = 0;
this.mMaxTimeInQueue = 360
};
simcity.cTicker = function () {
this.UIHandler = scrui.cUIHandler;
this.UIHandler();
this.mRoot = this.mContainer = null;
this.mMessageQueue = [];
this.mSpeed = 0.25;
this.mMode = simcity.cTicker.kModeScrollVertical;
this.mNextMode = this.mCurMode = simcity.cTicker.kModeNone;
this.mSubMode = simcity.cTicker.kSubModeVertToHoriz;
this.mBlink = !0;
this.mWritingDirection = simcity.cTicker.kLeftToRight;
this.mTimeBetweenMessages = 0;
this.mCurrentMessage = null;
this.mDisasterOverride = this.mDataBindingsModsLoaded = !1;
this.mGreatWorkUnlocks = Array(10);
this.mDebugNewsCounter = this.mDebugTimeSinceLastNewsArticle = 0;
this.mDebugNewsArticlesLimitInMinute = 60
};
goog.inherits(simcity.cTicker, scrui.cUIHandler);
simcity.cTicker.kWinIDTickerContainer = 183745325;
simcity.cTicker.kWinIDTickerRoot = 171649983;
simcity.cTicker.kPropUITickerSpeed = 3401832362;
simcity.cTicker.kPropUITickerMode = 1297872964;
simcity.cTicker.kPropUITickerBlink = 3687662925;
simcity.cTicker.kPropUITickerIgnore = 3214831283;
simcity.cTicker.kWinTickerBackground = 232464831;
simcity.cTicker.kModeNone = 0;
simcity.cTicker.kModeScrollHorizontal = 1;
simcity.cTicker.kModeScrollVertical = 2;
simcity.cTicker.kSubModeVertToHoriz = 6;
simcity.cTicker.kBlinkTime = 1.5;
simcity.cTicker.kTickerMinTime = 800;
simcity.cTicker.kMinImportance = 1;
simcity.cTicker.kMaxImportance = 10;
simcity.cTicker.kLeftToRight = 0;
simcity.cTicker.kRightToLeft = 1;
simcity.cTicker.kSpaceBetweenTapeParts = 5;
simcity.cTicker.kHyperlinkNews = 1;
simcity.cTicker.kHyperlinkUnit = 2;
simcity.cTicker.kHyperlinkPaletteTool = 3;
simcity.cTicker.kHyperlinkDisaster = 4;
simcity.cTicker.kHyperlinkRegionView = 5;
simcity.cTicker.kPopoutCategoryWorld = 1;
simcity.cTicker.kPopoutCategoryLocal = 2;
simcity.cTicker.kPopoutCategoryMisc = 3;
simcity.cTicker.kPopoutCategoryTraffic = 4;
simcity.cTicker.kPopoutCategoryFire = 5;
simcity.cTicker.kPopoutCategoryEarthquake = 6;
simcity.cTicker.kPopoutCount = 6;
simcity.cTicker.kTimeBetweenMessages = 2E3;
simcity.cTicker.kVerticalScrollSpeed = 0.33;
simcity.cTicker.kHorizontalScrollSpeedSlow = 0.05;
simcity.cTicker.kHorizontalScrollSpeedFast = 0.5;
simcity.cTicker.kTimeToHoldLongMessageAtEdge = 3E3;
simcity.cTicker.kSmallTextWidth = 100;
simcity.cTicker.kSmallTextHoldTime = 6E3;
simcity.cTicker.kMediumTextWidth = 500;
simcity.cTicker.kMediumTextHoldTime = 8E3;
simcity.cTicker.kLongTextHoldTime = 1E4;
simcity.cTicker.prototype.Init = function () {
scrui.Assert(!Boolean(this.mRoot), "cTicker.prototype.Init: already ran when mRoot is set");
for (var a in simcity.TickerMessageEvents)
simcity.TickerMessageEvents[a].hash = Number(a);
this.mBoxID = simcity.gGlobalUIHandler.GetBoxID();
this.mDataBindingsModsLoaded = !1;
this.LoadTickerDataBindingMods();
this.mContainer = gUIManager.FindControlByID(simcity.cTicker.kWinIDTickerContainer);
this.mRoot = this.mContainer.FindControlByID(simcity.cTicker.kWinIDTickerRoot);
scrui.Assert(Boolean(this.mRoot),
"cTicker.prototype.Init: missing ticker text mRoot")
};
simcity.cTicker.prototype.AddTickerMessageHelper = function (a, b, c) {
var d = simcity.gGlobalUIHandler.mRegionViewUIHandler.mRegionData,
e = !1,
f = !1,
g = "[]",
h = "[]",
i = null,
j = d.mPlayingBox,
k = j.hasOwnProperty("creatorId") ? j.creatorId : null,
l = null !== k ? d.mPlayers[j.creatorId].screenName : "[]",
j = j.hasOwnProperty("name") ? j.name : "[]",
m = d.mRegionName;
if (!simcity.IsTutorialInProgress() && simcity.gGlobalUIHandler.mAPIServerDataUIHandler.mServerDataSet) {
if (b && b.regionalBoxUniqueID)
if (e = !0, d.mRegionUnitsLookup[b.regionalBoxUniqueID] &&
"greatwork" == d.mRegionUnitsLookup[b.regionalBoxUniqueID].type)
f = !0;
else {
var n = d.mBoxes[b.regionalBoxUniqueID];
if (n && (g = n.name, i = n.creatorId))
h = d.mPlayers[i].screenName, f = !0
}
if (!e || f) {
d = a.hasOwnProperty("tableID") ? scrui.DecimalToHex(a.tableID) : "AutomatedTicker";
g = {
localeString : new scrui.cLocaleString(d, scrui.DecimalToHex(a.stringID ? a.stringID : a.localizedPopOutText)),
friendCreatorID : i,
localCreatorID : k,
detokenizers : {
friend_city_name : g,
friend_player_name : h,
local_city_name : j,
local_player_name : l,
region_name : m,
unit_name : b && b.unitName ? scrui.TextFromLocaleProperty(b.unitName) : ""
}
};
if (a.hasOwnProperty("getLocaleTokens")) {
var b = a.getLocaleTokens(b),
p;
for (p in b)
g.detokenizers[p] = b[p]
}
simcity.gGlobalUIHandler.mTicker.AddMessage(g, a, c)
}
}
};
simcity.cTicker.prototype.HandleGameEvent = function (a, b) {
switch (a) {
case simcity.kGameMessageUnitRuleUIEvent:
case simcity.kGameMessageGlobalRuleUIEvent:
if (simcity.TickerMessageEvents.hasOwnProperty(b.eventID)) {
var c = simcity.TickerMessageEvents[b.eventID];
if (!c.hasOwnProperty("displayCountLimit") || 0 < c.displayCountLimit) {
var d = simcity.gGlobalUIHandler.mGameTimeManager.GetTotalElapsedGameTimeSeconds();
if (!c.hasOwnProperty("timeToFire") || d > c.timeToFire) {
var e = c.triggerTime ? Math.random() * (c.triggerTime[1] -
c.triggerTime[0]) + c.triggerTime[0] : 0;
c.timeToFire = d + e;
d = b.unitRef ? scrui.RequestStringFromUnitRef(b.unitRef) : null;
e = [];
simcity.AddSimpleQueriesWithUnitRefReplacement(e, c.queries, d);
var f = c.queries ? [Object.keys(c.queries)] : [[]];
if (d && (c.isRegional && (e.push(scrui.BuildRequestQuery([simcity.kDataUnits, d, simcity.kDataBinAmount, simcity.kResourceRegionalBoxUniqueID])), f[0].push("regionalBoxUniqueID")), c.unitName))
e.push(scrui.BuildRequestQuery([simcity.kDataUnits, d, simcity.kDataUnitName])), f[0].push("unitName");
var g = this;
simcity.RequestDataBindingDataSimple(e, f, function (a) {
a = a[0];
(!c.hasOwnProperty("test") || c.test(a)) && g.AddTickerMessageHelper(c, a, b.unitRef)
})
}
}
}
switch (b.eventID) {
case 2957722673:
this.CreateTemporaryInterruptMessage("BreakingNewsEarthquake.js", new scrui.cLocaleString("Ticker.json", "0x0ea0f40e"), b.unitRef);
break;
case 3494952824:
this.CreateTemporaryInterruptMessage("BreakingNewsPlague.js", new scrui.cLocaleString("Ticker.json", "0x0ea0f40f"), b.unitRef);
break;
case 2937931224:
this.CreateTemporaryInterruptMessage("BreakingNewsMeteor.js",
new scrui.cLocaleString("Ticker.json", "0x0ea0f410"), b.unitRef);
break;
case 2379974111:
this.CreateTemporaryInterruptMessage("BreakingNewsUFO.js", new scrui.cLocaleString("Ticker.json", "0x0ea0f411"), b.unitRef);
break;
case 3552569805:
this.CreateTemporaryInterruptMessage("BreakingNewsTornado.js", new scrui.cLocaleString("Ticker.json", "0x0ea0f412"), b.unitRef);
break;
case 3749223463:
this.CreateTemporaryInterruptMessage("BreakingNewsZombies.js", new scrui.cLocaleString("Ticker.json", "0x0ea0f413"), b.unitRef);
break;
case 862871991:
this.CreateTemporaryInterruptMessage("BreakingNewsRoboTank.js", new scrui.cLocaleString("Ticker.json", "0x0ea0f414"), b.unitRef);
break;
case 4106396754:
this.CreateTemporaryInterruptMessage("BreakingNewsNuclearMeltdown.js", new scrui.cLocaleString("Ticker.json", "0x0ea0f415"), b.unitRef);
break;
case 1687307652:
this.CreateTemporaryInterruptMessage("BreakingNewsBigLizard.js", new scrui.cLocaleString("Ticker.json", "0x0ea0f416"), b.unitRef);
break;
case simcity.kEventIDSpaceCenterUnlockedLocal:
case simcity.kEventIDArcologyUnlockedLocal:
case simcity.kEventIDInternationalAirportUnlockedLocal:
case simcity.kEventIDSolarFarmUnlockedLocal:
this.HandleGreatWorkUnlock(b.eventID)
}
}
};
simcity.cTicker.prototype.HandleGreatWorkUnlock = function (a) {
switch (a) {
case simcity.kEventIDSpaceCenterUnlockedLocal:
if (this.mGreatWorkUnlocks[0])
return;
this.mGreatWorkUnlocks[0] = !0;
break;
case simcity.kEventIDArcologyUnlockedLocal:
if (this.mGreatWorkUnlocks[1])
return;
this.mGreatWorkUnlocks[1] = !0;
break;
case simcity.kEventIDInternationalAirportUnlockedLocal:
if (this.mGreatWorkUnlocks[2])
return;
this.mGreatWorkUnlocks[2] = !0;
break;
case simcity.kEventIDSolarFarmUnlockedLocal:
if (this.mGreatWorkUnlocks[3])
return;
this.mGreatWorkUnlocks[3] = !0
}
simcity.gGlobalUIHandler.mRegionUnlockEffect.SetVisibility(!0);
simcity.gGlobalUIHandler.mRegionViewUIHandler.SetGWUnlocked(!0, a)
};
simcity.DummyDataBindingUnlockData = {
importance : 2,
displayCountLimit : 100,
color : "rgba(0,0,0,0.0)",
blink : !1
};
simcity.cTicker.prototype.HandleUnlock = function (a) {
var b = {
localeString : new scrui.cLocaleString("Ticker.json", "0x0bf75f17", "Ticker message missing: ?Unlocked ~tool_name~!"),
detokenizers : {
tool_name : a.GetText()
}
};
a.popOut ? simcity.DummyDataBindingUnlockData.popOut = scrui.StringFromResourceKey(a.popOut) : delete simcity.DummyDataBindingUnlockData.popOut;
simcity.DummyDataBindingUnlockData.hyperlink = a.hyperlink;
simcity.DummyDataBindingUnlockData.rolloverCategory = a.rolloverCategory;
this.AddMessage(b, simcity.DummyDataBindingUnlockData)
};
simcity.DummyDataBindingTestTickerData = {
importance : 10,
interrupt : 0,
displayCountLimit : 100,
color : "#265e94",
popOut : "cat2.png",
hyperlink : null,
blink : !1
};
simcity.DummyDataBindingTestTickerDataInterrupt = {
importance : 10,
interrupt : "BreakingNewsEarthquake.js",
displayCountLimit : 100,
color : "#265e94",
popOut : "cat2.png",
hyperlink : 2,
blink : !1
};
simcity.DummyDataBindingTestTickerNewsArticle = {
importance : 11,
displayCountLimit : 2,
color : "#265e94",
newsCategory : 1,
hyperlink : null,
blink : !1,
popOut : "cat2.png",
popOutText : "Mayor Pledges Power",
rolloverCategory : "rollover1.png",
newsBodyText : "Test news body text text.",
newsLargeImage : "Graphics/NewsHub/roadconnectiondone.png"
};
simcity.TemporaryInterruptMessage = {
importance : 10,
interrupt : "BreakingNewsEarthquake.js",
displayCountLimit : 100,
color : "#265e94",
popOut : "cat2.png",
hyperlink : null,
blink : !1
};
simcity.cTicker.prototype.CreateDummyMessage = function (a) {
var b = {
localeString : new scrui.cLocaleString("Ticker.json", 0 == a ? "0x0bf75f1b" : "0x0bfefca1", "Ticker message missing: ?A Bridge Has Been Built!")
};
this.mTimeBetweenMessages = 0;
0 == a ? this.AddMessage(b, simcity.DummyDataBindingTestTickerDataInterrupt) : 1 == a ? this.AddMessage(b, simcity.DummyDataBindingTestTickerData) : this.AddMessage(b, simcity.DummyDataBindingTestTickerNewsArticle)
};
simcity.cTicker.prototype.CreateTemporaryInterruptMessage = function (a, b, c) {
b = {
localeString : b
};
simcity.TemporaryInterruptMessage.interrupt = a;
simcity.TemporaryInterruptMessage.unitRef = c;
simcity.TemporaryInterruptMessage.hyperlink = simcity.cTicker.kHyperlinkDisaster;
this.mDisasterOverride = !0;
this.AddMessage(b, simcity.TemporaryInterruptMessage)
};
simcity.cTicker.prototype.AddMessage = function (a, b, c) {
if (simcity.IsTutorialInProgress())
return null;
var d = this;
a.hasOwnProperty("friendCreatorID") ? b.friendCreatorID = a.friendCreatorID : delete b.friendCreatorID;
a.localeString.LoadString(function () {
var e;
e = simcity.cTicker.debuggingWireArticles ? a.localeString.mStringID + " " + a.localeString.GetText(a.detokenizers) : a.localeString.GetText(a.detokenizers);
e = new simcity.cMessage(b, e, a.detokenizers);
null == e.mUnitRef && (e.mUnitRef = c);
var f = !1;
if (e.mInterrupt || e.mInterruptBasic ||
b.debugInterrupt)
f = !0;
else if (10 <= e.mImportance && (null == d.mCurrentMessage || e.mImportance > d.mCurrentMessage.mImportance))
f = !0;
f ? d.HandleInterrupt(e) : d.mMessageQueue.push(e)
})
};
simcity.cTicker.prototype.RemoveAllCurrentMessages = function () {
for (var a = this.mMessageQueue.length; 0 < a; a--)
this.mMessageQueue.pop();
this.mRoot.mChildren && this.mRoot.mChildren[0] && this.mRoot.mChildren[0].DestroyControl()
};
simcity.cTicker.prototype.RemoveCurrentMessage = function () {
this.mRoot && (this.mRoot.mChildren && this.mRoot.mChildren[0]) && this.mRoot.mChildren[0].DestroyControl()
};
simcity.cTicker.prototype.HandleInterrupt = function (a) {
this.RemoveCurrentMessage();
this.mTimeBetweenMessages = 0;
this.mMessageQueue.unshift(a)
};
simcity.cTicker.prototype.UpdateMessageQueue = function (a) {
var b,
c;
for (b = 0; b < this.mMessageQueue.length; b++)
c = this.mMessageQueue[b], c.mTimeInQueue += a, scrui.Assert(0 < c.mMaxTimeInQueue, "cTicker.prototype.UpdateMessageQueue: mMaxTimeInQueue must be larger than zero");
this.mMessageQueue.sort(function (a, b) {
return b.mImportance - 0.0010 * b.mTimeInQueue / b.mMaxTimeInQueue - (a.mImportance - 0.0010 * a.mTimeInQueue / a.mMaxTimeInQueue)
});
for (b = this.mMessageQueue.length; 0 < b; b--)
c = this.mMessageQueue[b - 1], 0 > c.mImportance -
0.0010 * c.mTimeInQueue / c.mMaxTimeInQueue && (void 0 !== c.mDataBinding.callback && c.mDataBinding.callback(0), this.mMessageQueue.pop())
};
simcity.cTicker.prototype.GetMessage = function () {
var a = this.mMessageQueue.shift();
Boolean(a) && a.mCount < a.mRepeats - 1 && (a.mCount++, this.mMessageQueue.unshift(a));
if (a && a.mDataBinding && a.mDataBinding.hasOwnProperty("displayCountLimit")) {
if (0 > a.mDataBinding.displayCountLimit - 1)
return !1;
a.mDataBinding.displayCountLimit--
}
return a
};
simcity.cTicker.prototype.IsTapeReadyForMessage = function (a) {
var b = !1;
if (simcity.IsDisasterInProgress() && !this.mDisasterOverride)
return !1;
this.mDisasterOverride = !1;
this.mNextMode === simcity.cTicker.kModeNone && (this.mNextMode = this.mMode);
this.mRoot.mChildren || (1 > this.mTimeBetweenMessages ? (this.mCurMode = this.mNextMode, this.mNextMode = simcity.cTicker.kModeNone, b = !0, this.mTimeBetweenMessages = simcity.cTicker.kTimeBetweenMessages) : this.mTimeBetweenMessages -= a);
return b
};
simcity.cTicker.prototype.GetMessageTextWidth = function (a, b) {
var c = b.mChildren[0],
d = c.GetText();
c.SetRawText(a);
var e = c.GetTextWidth();
c.SetRawText(d);
return e
};
simcity.cTicker.prototype.GetMessagePart = function (a) {
var b;
b = a.mText;
a.mText = "";
return b
};
simcity.cTicker.prototype.AddMessagePartToTape = function (a, b, c, d) {
c = c.mChildren[0];
c.SetRawText(b);
c.SetTextColor(a.mColor);
c.SetPosition(d, (this.mRoot.mHeight - b.mHeight) / 2, c.GetTextWidth(), c.mHeight);
c.mTickerBlink = c.mTickerBlink || a.mBlink;
this.mSubMode == simcity.cTicker.kSubModeVertToHoriz && 0 != d && (c.mTickerBlink = !1)
};
simcity.cTicker.prototype.SetupPopoutAndRollover = function (a) {
if (this.mDebugNewsCounter < this.mDebugNewsArticlesLimitInMinute) {
var b = simcity.gGlobalUIHandler.mNewspaperUIHandler;
a.mInterrupt ? b.ShowInterrupt(a.mPopoutText, a.mInterrupt) : null != a.mPopout && (null !== a.mPopoutText ? b.ShowPopOutPicture(a.mPopoutText, a.mPopout, a.mFriendCreatorID) : b.ShowPopOutPicture(a.mText, a.mPopout, a.mFriendCreatorID), null !== a.mPopoutSound && simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, a.mPopoutSound), simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID,
simcity.audio.kInstanceUIWireMessageAppear));
null != a.mRolloverCategoryImage && b.SetRolloverCategoryImage(a.mRolloverCategoryImage);
a.mNewsData && a.mNewsData.category && b.AddNewsStory(a.mNewsData, a.mDetokenizers);
this.mDebugNewsCounter++
}
};
simcity.cTicker.prototype.AddMessageToTape = function (a) {
this.SetupPopoutAndRollover(a);
this.mCurrentMessage = a;
for (this.mSpeed = simcity.cTicker.kVerticalScrollSpeed; Boolean(a) && Boolean(a.mText) && 0 < a.mText.length; ) {
var b = gUIManager.LoadAndCacheLayout("Layouts/TickerTape.js", this.mRoot);
scrui.Assert(null !== b, "cTicker.prototype.AddMessagePartToTape: load of Layouts/Tickertape.js failed");
var c = this.GetMessagePart(a, b);
this.AddMessagePartToTape(a, c, b, 0)
}
this.SetTickerBackgroundVisibility(!0)
};
simcity.cTicker.prototype.SetTickerBackgroundVisibility = function (a) {
gUIManager.FindControlByID(simcity.cTicker.kWinTickerBackground).SetVisibility(a)
};
simcity.cTicker.prototype.IsBlinking = function (a) {
var b = a.GetTextWidth();
return !0 === this.mBlink && !0 === a.mTickerBlink && a.mLeft <= 0.5 * (this.mRoot.mWidth - b) && 0 < a.mTickerTime ? !0 : !1
};
simcity.cTicker.prototype.CalcBlink = function (a) {
var b = a.GetTextWidth();
a.SetPosition(a.mLeft, a.mTop, b, a.mHeight);
var b = a.mTickerTime / simcity.cTicker.kBlinkTime,
c = Math.cos(3 * Math.PI * b);
return 0.2 < b && 0.8 > b ? c * c : c * c * a.mTickerOpacity
};
simcity.cTicker.prototype.TapeScrollHorizontal = function (a) {
var b,
c = !1;
if (this.mRoot.mChildren) {
b = this.mRoot.mChildren[0].mChildren[0];
b.mTickerTime = b.mTickerTime || simcity.cTicker.kBlinkTime;
b.mTickerOpacity = b.mTickerOpacity || b.mOpacity;
this.IsBlinking(b) && (c = !0);
var d = b.GetTextWidth();
c ? this.IsBlinking(b) && (d = this.CalcBlink(b), b.SetOpacity(d), b.mTickerTime -= 0.0010 * a) : d > this.mRoot.mWidth ? (this.mCurrentMessage.hasOwnProperty("animating") || (this.mCurrentMessage.animating = !0, this.mRoot.mChildren[0].mRootElement.className =
"animatedSlow translateLeftSlow"), c = this.GetAnimatedDivPos(), d + c < this.mRoot.mWidth && !this.mLongMessagePauseHandled) ? (this.mRoot.mChildren[0].mRootElement.className = "", b.SetPosition(c, b.mTop, b.mWidth, b.mHeight), b.mLongMessagePauseTimer = simcity.cTicker.kTimeToHoldLongMessageAtEdge) : b.mLongMessagePauseTimer && (b.mLongMessagePauseTimer -= a, 0 >= b.mLongMessagePauseTimer && (this.mLongMessagePauseHandled = !0, this.mRoot.mChildren[0].mRootElement.className = "animatedFast translateLeftFast")) : this.mCurrentMessage.hasOwnProperty("animating") ||
(this.mCurrentMessage.animating = !0, this.mRoot.mChildren[0].mRootElement.className = "animatedFast translateLeftFast")
}
};
simcity.cTicker.prototype.TapeScrollVertical = function (a) {
if (this.mRoot.mChildren && 0 < this.mRoot.mChildren.length) {
var b = this.mRoot.mChildren[0].mChildren[0],
c = b.GetTextWidth(),
d = 0,
d = c < simcity.cTicker.kSmallTextWidth ? simcity.cTicker.kSmallTextHoldTime : c < simcity.cTicker.kMediumTextWidth ? simcity.cTicker.kMediumTextHoldTime : simcity.cTicker.kLongTextHoldTime;
b.mInit || (b.mInit = !0, b.mTickerDisplayTime = d);
var d = b.mTickerDisplayTime / d,
e;
0.9 < d ? (e = Math.sin(2.5 * Math.PI * (d - 0.9)), e *= b.mHeight * e) : e = 0;
this.mSubMode ==
simcity.cTicker.kSubModeVertToHoriz && 0.01 >= d ? (this.mCurMode = simcity.cTicker.kModeScrollHorizontal, this.mNextMode = simcity.cTicker.kModeNone, c > this.mRoot.mWidth && (this.mLongMessagePauseHandled = !1)) : (b.SetPosition(0, e, c, b.mHeight), b.mTickerTime = b.mTickerTime || simcity.cTicker.kBlinkTime, b.mTickerOpacity = b.mTickerOpacity || b.mOpacity, c = b.mTickerOpacity, 0.8 > d && (0.2 < d && this.IsBlinking(b)) && (c = this.CalcBlink(b), b.mTickerTime -= 0.0010 * a), b.SetOpacity(c), b.mTickerDisplayTime -= a)
}
};
simcity.cTicker.prototype.GetAnimatedDivPos = function () {
var a = 0;
if (this.mRoot.mChildren && 0 < this.mRoot.mChildren.length) {
var b = window.getComputedStyle(this.mRoot.mChildren[0].mRootElement, null).getPropertyValue("-webkit-transform");
if (!b.split("(")[1])
return a;
a = b.split("(")[1].split(")")[0].split(",");
a = parseInt(a[4])
}
return a
};
simcity.cTicker.prototype.TapeCleanupByPosition = function () {
if (this.mRoot.mChildren && 0 < this.mRoot.mChildren.length) {
var a = this.mRoot.mChildren[0].mChildren[0].GetTextWidth();
0 > this.GetAnimatedDivPos() + a && (this.mRoot.mChildren[0].DestroyControl(), this.SetTickerBackgroundVisibility(!1))
}
};
simcity.cTicker.prototype.UpdateTape = function (a) {
switch (this.mCurMode) {
case simcity.cTicker.kModeScrollVertical:
this.TapeScrollVertical(a);
break;
default:
case simcity.cTicker.kModeScrollHorizontal:
this.TapeScrollHorizontal(a),
this.TapeCleanupByPosition()
}
};
simcity.cTicker.kBtnIDPopOut = 223048948;
simcity.cTicker.kBtnIDTickerPopOut = 223052350;
simcity.cTicker.prototype.HandleUIMessage = function (a, b, c) {
scrui.cUIHandler.prototype.HandleUIMessage.call(this, a, b, c);
switch (a) {
case scrui.kMsgTypeButtonClicked:
switch (b) {
case simcity.cTicker.kBtnIDPopOut:
case simcity.cTicker.kBtnIDTickerPopOut:
if (a = simcity.gGlobalUIHandler.mNewspaperUIHandler, a.IsPopoutVisible())
if (null != this.mCurrentMessage.mHyperLink)
switch (this.mCurrentMessage.mHyperLink) {
case simcity.cTicker.kHyperlinkNews:
a.Show();
break;
case simcity.cTicker.kHyperlinkUnit:
this.mCurrentMessage.mUnitRef &&
scrui.PostGameCommand(scrui.BuildCommand(["zoomToUnit", scrui.RequestStringFromUnitRef(this.mCurrentMessage.mUnitRef)]));
break;
case simcity.cTicker.kHyperlinkPaletteTool:
alert("hyperlink TOOL PALETTE");
break;
case simcity.cTicker.kHyperlinkDisaster:
null != this.mCurrentMessage.mUnitRef && scrui.PostGameCommand(scrui.BuildCommand(["zoomToDisaster", scrui.RequestStringFromUnitRef(this.mCurrentMessage.mUnitRef)]))
}
else
this.mCurrentMessage.mUnitRef && (gUIManager.FindControlByID(simcity.kBtnRegionCamera).mIsSelected ?
(a = gUIManager.FindControlByID(simcity.kBtnReturnToCity), b = a.GetAbsolutePosition(), a.Private_OnClick(b[0], b[1])) : scrui.PostGameCommand(scrui.BuildCommand(["zoomToUnit", scrui.RequestStringFromUnitRef(this.mCurrentMessage.mUnitRef)])))
}
}
};
simcity.cTicker.prototype.Update = scrui.Client_ProfZone("cTicker.Update", function (a) {
var b = this.mRoot && this.mRoot.GetAbsoluteVisibility();
simcity.gGlobalUIHandler.mGameTimeManager.GetElapsedGameTimeSeconds();
var c = simcity.gGlobalUIHandler.mNewspaperUIHandler;
if (b && (b = this.mDataBindingsModsLoaded && c.IsReady(), this.UpdateMessageQueue(a), this.IsTapeReadyForMessage(a) && b && (b = this.GetMessage(), Boolean(b) && (void 0 !== b.mDataBinding.callback && b.mDataBinding.callback(1), this.AddMessageToTape(b))), this.UpdateTape(a),
this.mDebugTimeSinceLastNewsArticle += a, 6E4 < this.mDebugTimeSinceLastNewsArticle))
this.mDebugNewsCounter = this.mDebugTimeSinceLastNewsArticle = 0
});
simcity.cTicker.prototype.PrintDebugInfo = function () {
if (simcity.DEBUG) {
scrui.DebugPrint("cTicker mMessageQueue = " + this.mMessageQueue.length + ", dataBinding categories = " + Object.keys(simcity.TickerCategories).length + ", dataBinding events = " + Object.keys(simcity.TickerMessageEvents).length);
for (var a = 0; a < this.mMessageQueue.length; ++a) {
var b = this.mMessageQueue[a].mDataBinding,
c = b.hash ? b.hash : b.localizedPopOutText;
c || (c = b.stringID);
scrui.DebugPrint(" " + scrui.DecimalToHex(c))
}
}
};
simcity.cTicker.prototype.SaveTickerDataBindingMods = function () {
if (0 != this.mBoxID) {
scrui.PostGameCommand(scrui.BuildCommand(["tickerMod", "start"]));
for (var a in simcity.TickerMessageEvents) {
var b = simcity.TickerMessageEvents[a];
b.hash = Number(a);
b.hasOwnProperty("hash") && b.hasOwnProperty("displayCountLimit") && scrui.PostGameCommand(scrui.BuildCommand(["tickerMod", b.hash, b.displayCountLimit]))
}
scrui.PostGameCommand(scrui.BuildCommand(["tickerMod", "end"]))
}
};
simcity.cTicker.prototype.LoadTickerDataBindingMods = function () {
var a = this;
if (0 == a.mBoxID)
a.mDataBindingsModsLoaded = !0;
else {
var b = scrui.BuildRequestQuery(["box", this.mBoxID, "metadata", "tickerMod"]);
scrui.RequestRestData([b], [], "get", function (b) {
a.mDataBindingsModsLoaded = !0;
if (null != b && (b = scrui.ParseJSON(b.contentText)) && !b.hasOwnProperty("errorCode"))
for (var b = b.values, d = 0; d < b.length; d++) {
var e = b[d][0],
f = b[d][1],
g = simcity.TickerMessageEvents[e];
g && g.hasOwnProperty("hash") && g.hash == e && (g.displayCountLimit =
f)
}
})
}
};
simcity.cTicker.prototype.Shutdown = function () {
this.SaveTickerDataBindingMods()
};
simcity.cTicker.currentDebugWireArticle = 0;
simcity.cTicker.debuggingWireArticles = !1;
simcity.cTicker.prototype.DebugShowWireArticle = function (a) {
if (simcity.DEBUG) {
simcity.cTicker.debuggingWireArticles = !0;
var b = Object.keys(simcity.TickerMessageEvents);
0 == a ? 0 <= simcity.cTicker.currentDebugWireArticle - 1 && simcity.cTicker.currentDebugWireArticle-- : 1 == a && simcity.cTicker.currentDebugWireArticle + 1 < b.length && simcity.cTicker.currentDebugWireArticle++;
a = simcity.TickerMessageEvents[b[simcity.cTicker.currentDebugWireArticle]];
this.mTimeBetweenMessages = a.displayCountLimit = 100;
a.hasOwnProperty("getLocaleTokens") &&
delete a.getLocaleTokens;
a.debugInterrupt = !0;
this.AddTickerMessageHelper(a, null)
}
};
simcity.cTicker.prototype.PopoutAnimDone = function () {};
simcity.ToolPaletteUI = {};
simcity.cToolPaletteUIHandler = function () {
this.UIHandler = scrui.cUIHandler;
this.UIHandler();
this.mToolKeys = this.mRolloverButton = this.mRolloverLayout = this.mLayerUIHandler = this.mInfoLayout = this.mNewAlertItemsContainer = this.mAlertsContainer = this.mContextualInfoBodyTextWin = this.mContextualInfoHeaderTextWin = this.mNewContextualInfoContainer = this.mCategoryName = this.mSubCategoryBtnsContainer = this.mHelpText = this.mSimIconWindow = this.mInfoContainer = this.mPagingSystemContainer = this.mRevealAnim = this.mPanelContainer =
this.mCitySpecializationContainer = this.mCategoryContainer = null;
this.mNeedsUpdated = !1;
this.mSelectedToolCursorKey = this.mSelectedToolButton = this.mSelectedCategoryButton = null;
this.mOverridingCursor = !1;
this.mSelectedSubCategoryLayer = this.mSelectedSubCategoryButton = null;
this.mModeSwap = !1;
this.mCategoryToOpen = 0;
this.mCitySpecializationModeActive = !1;
this.mLastSelectedCitySpecializationID = this.mLastSelectedMainCategoryID = 0;
this.mCategoryGroupID = 161790467;
this.mSubCategoryGroupID = 0;
this.mIsSubPanel = this.mIsLegendShifted =
this.mIsPaletteLoaded = !1;
this.mPanelLayoutKey = this.mPanelLayout = null;
this.mCategoryData = {};
this.mCategoryButtonsMap = {};
this.mRootCategoryAlerts = {};
this.mCitySpecializationCategoryAlerts = {};
this.mToolButtons = [];
this.mToolUnlockInfoArray = {};
this.mNewlyUnlocked = {};
this.mNumTotalPages = this.mNumItemsPerPage = this.mPageIndex = 0;
this.mKeyShortcutIx = -1;
this.mEditorCategory = this.mEditorLayout = this.mEditorKeyString = this.mEditedBuildingRefString = null;
this.mInfoPanelTimeSinceUpdate = 0;
this.mPreviousAlertLevel = {};
this.mEditorIsOpen = this.mToolPanelOpen = !1;
this.mCurrentLightLayer = this.mBeatCount = 0;
this.mLayerButtons = [];
this.mGuideMeWarningDialog = null;
this.mHasLockedTool = this.mHasProgressBarTool = this.mHasRoadTool = !1;
this.mWaitingCategory = null;
this.mRegionViewCounter = 0
};
goog.inherits(simcity.cToolPaletteUIHandler, scrui.cUIHandler);
simcity.cToolPaletteUIHandler.kBtnIDCategoryButton = 161711552;
simcity.cToolPaletteUIHandler.kBtnIDCategoryButtonOn = 228930836;
simcity.cToolPaletteUIHandler.kWinIDCategoryIconNormal = 164725874;
simcity.cToolPaletteUIHandler.kWinIDCategoryIconNormalOn = 227699592;
simcity.cToolPaletteUIHandler.kWinIDCategoryIconCaution = 215602420;
simcity.cToolPaletteUIHandler.kWinIDCategoryIconCritical = 215602425;
simcity.cToolPaletteUIHandler.kTxtCategoryTextOn = 230397837;
simcity.cToolPaletteUIHandler.kTxtCategoryTextOff = 230397836;
simcity.cToolPaletteUIHandler.kWinIDPalettePanel = 161793066;
simcity.cToolPaletteUIHandler.kWinIDToolIcon = 158840632;
simcity.cToolPaletteUIHandler.kBtnIDSelectTool = 158753137;
simcity.cToolPaletteUIHandler.kTxtPaletteRolloverName = 173289992;
simcity.cToolPaletteUIHandler.kTxtPaletteRolloverDescription = 173349051;
simcity.cToolPaletteUIHandler.kWinContainerRolloverDescription = 238865488;
simcity.cToolPaletteUIHandler.kWinContainerRolloverRegionalBenefitDescription = 243440736;
simcity.cToolPaletteUIHandler.kTxtIDRolloverRegionalBenefitDescription = 243442873;
simcity.cToolPaletteUIHandler.kWinPaletteRolloverLockedBackground = 230914691;
simcity.cToolPaletteUIHandler.kWinPaletteRolloverLockedIcon = 232453066;
simcity.cToolPaletteUIHandler.kWinPaletteRolloverLockedText = 232453067;
simcity.cToolPaletteUIHandler.kWinPaletteRolloverPlacedText = 250188623;
simcity.cToolPaletteUIHandler.kTxtPaletteRolloverCost = 173348034;
simcity.cToolPaletteUIHandler.kTxtPaletteRolloverUpkeep = 173348037;
simcity.cToolPaletteUIHandler.kWinPaletteRolloverMarqueeImage = 232538146;
simcity.cToolPaletteUIHandler.kWinPaletteRolloverMoreInfoContainer = 245866218;
simcity.cToolPaletteUIHandler.kBtnExitEditor = 210351623;
simcity.cToolPaletteUIHandler.kBtnEditBuilding = 184860118;
simcity.cToolPaletteUIHandler.kWinIDBuildingIcon = 184860120;
simcity.cToolPaletteUIHandler.kWinInfoContainer = 185017193;
simcity.cToolPaletteUIHandler.kWinSimIconWindow = 247683512;
simcity.cToolPaletteUIHandler.kTxtHelpInfo = 244903423;
simcity.cToolPaletteUIHandler.kTxtCategoryName = 250208043;
simcity.cToolPaletteUIHandler.kWinNewContextualInfoContainer = 230828025;
simcity.cToolPaletteUIHandler.kWinAlertItemsContainer = 213800222;
simcity.cToolPaletteUIHandler.kWinCategoryButtonAlert = 213716619;
simcity.cToolPaletteUIHandler.kWinIDPagingSystemContainer = 213112837;
simcity.cToolPaletteUIHandler.kBtnIDPageLeft = 185281788;
simcity.cToolPaletteUIHandler.kBtnIDPageRight = 185281790;
simcity.cToolPaletteUIHandler.kWinIDLayerToggleContainer = 186757736;
simcity.cToolPaletteUIHandler.kAnimIDCategoryButtonWarning = 199534789;
simcity.cToolPaletteUIHandler.kBtnSubCategory = 204051110;
simcity.cToolPaletteUIHandler.kWinSubCategoryBtnsContainer = 204052135;
simcity.cToolPaletteUIHandler.kWinUnlockContainer = 219781060;
simcity.cToolPaletteUIHandler.kBtnIDToggleContextualInfo = 230919578;
simcity.cToolPaletteUIHandler.kWinLegendShift = 236788010;
simcity.cToolPaletteUIHandler.kAnimIDPanelRevealUp = 250100054;
simcity.cToolPaletteUIHandler.kWinIDNonRoadToolContainer = 250344887;
simcity.cToolPaletteUIHandler.kWinIDRoadToolContainer = 250344888;
simcity.cToolPaletteUIHandler.kWinIDRoadToolButtonContainer = 250345119;
simcity.cToolPaletteUIHandler.kBtnIDRoadToolPageRight = 250344947;
simcity.cToolPaletteUIHandler.kBtnIDRoadToolPageLeft = 250344948;
simcity.cToolPaletteUIHandler.kWinUpgradeApproved = 246633369;
simcity.cToolPaletteUIHandler.kWinUpgradeText = 249663410;
simcity.cToolPaletteUIHandler.kWinUpgradeImage = 246529001;
simcity.cToolPaletteUIHandler.kWinUpgradeProgress = 246633368;
simcity.cToolPaletteUIHandler.kWinUpgradeProgressGroup = 246486429;
simcity.cToolPaletteUIHandler.kWinUpgradeProgressBar = 246485544;
simcity.cToolPaletteUIHandler.kWinUpgradeSubtitle = 246632530;
simcity.cToolPaletteUIHandler.kWinUpgradeMaxedGroup = 251405092;
simcity.cToolPaletteUIHandler.kWinSubCategoryIcon = 204053071;
simcity.cToolPaletteUIHandler.kWinToolLockIcon = 200667583;
simcity.cToolPaletteUIHandler.kWinToolBetaLockIcon = 253379202;
simcity.cToolPaletteUIHandler.kUpgradeSlotTypeUsed = 0;
simcity.cToolPaletteUIHandler.kUpgradeSlotTypeAvailable = 1;
simcity.cToolPaletteUIHandler.kUpgradeSlotTypeLocked = 2;
simcity.cToolPaletteUIHandler.kKeyTriggerClosePanel = 4253027725;
simcity.cToolPaletteUIHandler.kKeyTriggerBigBusinessPanel = 251043506;
simcity.cToolPaletteUIHandler.kKeyTriggerZoneResidential = 251030847;
simcity.cToolPaletteUIHandler.kKeyTriggerZoneCommercial = 251030854;
simcity.cToolPaletteUIHandler.kKeyTriggerZoneIndustrial = 251030860;
simcity.cToolPaletteUIHandler.kKeyTriggerZoneUnzone = 251030866;
simcity.cToolPaletteUIHandler.kKeyTriggerDrawStraight = 252768402;
simcity.cToolPaletteUIHandler.kKeyTriggerDrawCircle = 252768403;
simcity.cToolPaletteUIHandler.kKeyTriggerDrawCurvy = 252768404;
simcity.cToolPaletteUIHandler.kKeyTriggerDrawRectangle = 252768405;
simcity.cToolPaletteUIHandler.kKeyTriggerDrawArc = 252768406;
simcity.cToolPaletteUIHandler.kKeyTriggerRoadUpgrade = 253721349;
simcity.cToolPaletteUIHandler.kKeyTriggerEditorDemolish = 251030870;
simcity.kKeyTrigger_NextHeavyLayer = 251319898;
simcity.cToolPaletteUIHandler.kBtnDrawStraight = 238502129;
simcity.cToolPaletteUIHandler.kBtnDrawCurvy = 238502130;
simcity.cToolPaletteUIHandler.kBtnDrawGrid = 238502131;
simcity.cToolPaletteUIHandler.kBtnDrawArc = 238502132;
simcity.cToolPaletteUIHandler.kBtnDrawCircle = 238502133;
simcity.cToolPaletteUIHandler.kBtnRoadSelector = 251495679;
simcity.cToolPaletteUIHandler.kBtnBulldozer = 241884167;
simcity.cToolPaletteUIHandler.kBtnToggleGuides = 244663392;
simcity.cToolPaletteUIHandler.kOptionIDRoadGuides = 244650932;
simcity.cToolPaletteUIHandler.kWinRoadButtonContainer = 239814192;
simcity.cToolPaletteUIHandler.kBtnGuideMe = 247924453;
simcity.cToolPaletteUIHandler.kBtnGoToRegion = 250010473;
simcity.cToolPaletteUIHandler.kBtnClose = 240419369;
simcity.cToolPaletteUIHandler.kGuideMeDescription = 245253398;
simcity.cToolPaletteUIHandler.kGuideMeTitle = 250070465;
simcity.cToolPaletteUIHandler.kGuideMeCurrentText = 250070466;
simcity.cToolPaletteUIHandler.kGuideMeTextWindow = 250073221;
simcity.cToolPaletteUIHandler.kWinRightBracket = 250184322;
simcity.cToolPaletteUIHandler.kWinLeftBracket = 250184323;
simcity.cToolPaletteUIHandler.kWinCenterBracket = 250184321;
simcity.cToolPaletteUIHandler.kWinMoreRightBracket = 250184325;
simcity.cToolPaletteUIHandler.kWinMoreLeftBracket = 250184324;
simcity.cToolPaletteUIHandler.kWinModuleCount = 250184320;
simcity.cToolPaletteUIHandler.kTxtModulesUsed = 250184326;
simcity.cToolPaletteUIHandler.kTxtModuleLimit = 250184327;
simcity.cToolPaletteUIHandler.kToolIDBulldozer = 2536567712;
simcity.cToolPaletteUIHandler.kToolIDPathSelector = 3342964767;
simcity.cToolPaletteUIHandler.kRoadTypeCurvy = 0;
simcity.cToolPaletteUIHandler.kRoadTypeStraight = 1;
simcity.cToolPaletteUIHandler.kRoadTypeGrid = 2;
simcity.cToolPaletteUIHandler.kRoadTypeArc = 3;
simcity.cToolPaletteUIHandler.kRoadTypeCircle = 4;
simcity.kLayerCategory1 = [3469784512, 3437286480, 1551159691];
simcity.kLayerCategory2 = [2664615274, 1454310548, 3251691267, 3334161007, 3334161012];
simcity.kLayerCategory3 = [3250089732, 261282902, 3441286197];
simcity.kLayerCategory4 = [2092055118, 2678880713, 244026082, 2680278561, 2510935805];
simcity.kLayerCategory5 = [2069247941, 1350102368, 1044908733, 1537061107, 493973294];
simcity.kLayerCategory6 = [714721605, 2789071991, 1260877650, 1795056175];
simcity.kLayerCategory7 = [3469052172, 2905154932, 2678778480, 1981100101, 2735439586];
simcity.kLayerRows = [simcity.kLayerCategory1, simcity.kLayerCategory2, simcity.kLayerCategory3, simcity.kLayerCategory4, simcity.kLayerCategory5, simcity.kLayerCategory6, simcity.kLayerCategory7];
simcity.cToolPaletteUIHandler.prototype.Init = function (a) {
this.mRootParent = a;
this.mCategoryContainer = a.FindControlByID(simcity.kWinIDPaletteHolder);
this.mCitySpecializationContainer = a.FindControlByID(249751677);
this.mPanelContainer = a.FindControlByID(simcity.kWinIDPalettePanelHolder);
this.mRevealAnim = a.FindAnimationByID(233068662);
scrui.Assert(null !== this.mPanelContainer && null !== this.mCategoryContainer && null !== this.mLayerUIHandler, "must specify a parent control and the layer UI handler at activation!");
gUIManager.CacheLayout("Layouts/Palette/BuildingItemUI.js");
gUIManager.CacheLayout("Layouts/Palette/CategoryButtonWithIcon2.js");
this.mEditorLayout = gUIManager.LoadLayout("Layouts/Palette/PalettePanelEditor3.js", a.FindControlByID(231606740));
this.mEditorLayout.SetVisibility(!1);
this.mEditorIsOpen = this.mToolPanelOpen = !1;
this.mLastEditorUsedRoadControlID = this.mLastUsedRoadControlID = 0;
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandRoadDrawType, simcity.cToolPaletteUIHandler.kRoadTypeStraight]));
a = gUIManager.FindControlByID(simcity.kWinToolRolloverContainer);
this.mRolloverLayout = gUIManager.LoadAndCacheLayout("Layouts/PaletteRolloverPreview.js", a);
this.mRolloverLayout.SetVisibility(!1);
this.mHasRoadTool = !1;
this.LoadPalette()
};
simcity.cToolPaletteUIHandler.prototype.Shutdown = function () {
null !== this.mRolloverLayout && this.mRolloverLayout.DestroyControl();
this.mLayerUIHandler = this.mInfoContainer = this.mPanelContainer = this.mCategoryContainer = this.mRolloverButton = this.mRolloverLayout = null;
null !== this.mPanelLayout && this.mPanelLayout.DestroyControl();
this.mRootParent = this.mPreviousAlertLevel = this.mPanelLayout = null
};
simcity.cToolPaletteUIHandler.prototype.Update = scrui.Client_ProfZone("cToolPaletteUIHandler.Update", function (a) {
this.mWaitingCategory && 0 <= this.mRegionViewCounter ? (simcity.gGlobalUIHandler.mRegionViewUIHandler.SetStartingRegionPanel(this.mWaitingCategory), simcity.gGlobalUIHandler.mRegionCameraButton.SetSelected(!0), this.mWaitingCategory = null, this.mRegionViewCounter = 1) : 0 > this.mRegionViewCounter && (this.mRegionViewCounter += a);
0 !== this.mCategoryToOpen && (this.OpenToolPanelFromID(this.mCategoryToOpen), this.mCategoryToOpen =
0);
this.mRolloverButton && this.UpdateRollover(!0);
this.UpdateToolCursor();
this.mInfoPanelTimeSinceUpdate += a;
1E3 < this.mInfoPanelTimeSinceUpdate && (this.mInfoPanelTimeSinceUpdate = 0, this.UpdateContextualInfo())
});
simcity.cToolPaletteUIHandler.prototype.UpdateToolCursor = function () {
this.mSelectedToolCursorKey && (!gUIManager.IsMouseInUI() && !this.mOverridingCursor) && (scrui.CursorManager.SetCursor(this.mSelectedToolCursorKey), this.mOverridingCursor = !0, simcity.gGlobalUIHandler.mBuildingRolloverManager && (simcity.gGlobalUIHandler.mBuildingRolloverManager.mRolloverUI.mRolloverCursorKey = null));
gUIManager.IsMouseInUI() && this.mOverridingCursor && (scrui.CursorManager.SetCursor(null), this.mOverridingCursor = !1)
};
simcity.cToolPaletteUIHandler.prototype.GetParentAndSubCategoryIDs = function () {
var a = this.mEditorCategory,
b = null;
!a && this.mSelectedCategoryButton && (a = this.mSelectedCategoryButton.mUserData, b = this.mSelectedSubCategoryButton ? this.mSelectedSubCategoryButton.mUserData : null);
return [a, b]
};
simcity.cToolPaletteUIHandler.prototype.UpdateContextualInfo = function () {
var a = !1,
b = this.mNewContextualInfoContainer;
if (this.mSelectedCategoryButton && b && !simcity.gGlobalUIHandler.mIsSpectatorMode) {
var c = this.GetParentAndSubCategoryIDs(),
d = c[0],
e = simcity.gGlobalUIHandler.mCategoryQueryingHandler,
f = e.mContextualInfo[d];
f || (f = e.mContextualInfo[c[1]]);
if (f && (a = f.showInfo && e.mShouldDisplayContextualInfo))
this.mContextualInfoHeaderTextWin.textID !== f.headerTextID && (this.mContextualInfoHeaderTextWin.SetLocaleText(new scrui.cLocaleString(f.tableID,
f.headerTextID), !0), this.mContextualInfoHeaderTextWin.textID = f.headerTextID), this.mContextualInfoBodyTextWin.textID !== f.bodyTextID && (f.hasOwnProperty("bodyTableID") ? this.mContextualInfoBodyTextWin.SetLocaleText(new scrui.cLocaleString(f.bodyTableID, f.bodyTextID), !0) : this.mContextualInfoBodyTextWin.SetLocaleText(new scrui.cLocaleString(f.tableID, f.bodyTextID), !0), this.mContextualInfoBodyTextWin.textID = f.bodyTextID), simcity.gGlobalUIHandler.mAlertsUIHandler.UpdateAlertItems(d, this.mNewAlertItemsContainer,
!0)
}
b && b.SetVisibility(a)
};
simcity.SetCategoryButtonAlertLevelHelper = function (a) {
var b = a.win,
a = a.alertLevel;
if (b && b.alertLevel !== a) {
var c = simcity.gGlobalUIHandler.mToolPaletteUIHandler.mSelectedCategoryButton;
if (a == simcity.kAlertLevelUnlock) {
var d = b.mParentControl.FindControlByID(simcity.cToolPaletteUIHandler.kWinUnlockContainer);
d && (d.SetVisibility(!0), a = simcity.kAlertLevelNormal)
}
b.buttonIconNormal && b.buttonIconNormal.SetVisibility(c !== b && a === simcity.kAlertLevelNormal);
b.buttonIconNormalOn && b.buttonIconNormalOn.SetVisibility(c === b &&
a === simcity.kAlertLevelNormal);
b.buttonIconCaution && b.buttonIconCaution.SetVisibility(a === simcity.kAlertLevelCaution || a === simcity.kAlertLevelAlert);
b.buttonIconCritical.SetVisibility(a === simcity.kAlertLevelCritical);
if (b.buttonTextOn && b.buttonTextOff) {
c = null;
switch (a) {
case simcity.kAlertLevelCaution:
case simcity.kAlertLevelAlert:
c = "rgb(222, 152, 0)";
break;
case simcity.kAlertLevelCritical:
c = "rgb(207, 21, 21)"
}
b.buttonTextOn.SetTextColor(a === simcity.kAlertLevelNormal ? "white" : c);
b.buttonTextOff.SetTextColor(a ===
simcity.kAlertLevelNormal ? "rgb(38, 94, 148)" : c)
}
b.alertLevel = a
}
};
simcity.cToolPaletteUIHandler.prototype.SetCategoryButtonAlertLevel = function (a, b) {
a.alertLevel != b && simcity.gGlobalUIHandler.mBeatCountUpdates.push({
callback : simcity.SetCategoryButtonAlertLevelHelper,
win : a,
alertLevel : b
})
};
simcity.cToolPaletteUIHandler.prototype.UpdateAlert = function (a, b, c) {
this.mPreviousAlertLevel.hasOwnProperty(a) || (this.mPreviousAlertLevel[a] = simcity.kAlertLevelNormal);
this.mPreviousAlertLevel[a] !== b && (this.mPreviousAlertLevel[a] = b, simcity.AddTelemetry("SC_UI_CATEGORY_ALERT", 92, {
category : a,
level : b
}));
if (c) {
if (this.mPanelLayout && this.mPanelLayout.mIsVisible && this.mSubCategoryBtnsContainer && this.mSubCategoryBtnsContainer.mChildren)
for (var d = 0, c = this.mSubCategoryBtnsContainer.mChildren.length; d < c; ++d) {
var e =
this.mSubCategoryBtnsContainer.mChildren[d].button;
if (e.mUserData === a) {
this.SetCategoryButtonAlertLevel(e, b);
break
}
}
} else if (this.mCategoryButtonsMap.hasOwnProperty(a) && this.SetCategoryButtonAlertLevel(this.mCategoryButtonsMap[a], b), c = (e = this.mCategoryData.hasOwnProperty(a) && !this.mCategoryData[a].citySpecialization) ? this.mRootCategoryAlerts : this.mCitySpecializationCategoryAlerts, e = e ? simcity.gGlobalUIHandler.mReturnToCityButton : simcity.gGlobalUIHandler.mCitySpecializationButton, c[a] = b, a = b === simcity.kAlertLevelUnlock ?
simcity.kAlertLevelNormal : b, a < simcity.kAlertLevelCritical) {
for (d in c)
if (b = c[d], b !== simcity.kAlertLevelUnlock && (a = Math.max(b, a), a === simcity.kAlertLevelCritical))
break;
this.SetCategoryButtonAlertLevel(e, a)
}
};
simcity.cToolPaletteUIHandler.prototype.UnlockTool = function (a) {
for (var b = 0, c = this.mToolButtons.length; b < c; ++b) {
var d = this.mToolButtons[b];
if (d.mUserData === a) {
b = this.mToolUnlockInfoArray[a];
scrui.Assert(b, "Didn't find unlock info for toolID " + a);
this.SetToolButtonLockState(d, a, b, !1);
simcity.SetBeatCountVisibility(d.mUnlockWindowContainer);
break
}
}
};
simcity.cToolPaletteUIHandler.prototype.SetToolButtonLockStateHelper = function (a, b, c, d) {
b.isLocked = c || d;
var e = a.FindControlByID(simcity.cToolPaletteUIHandler.kWinToolLockIcon),
f = a.FindControlByID(simcity.cToolPaletteUIHandler.kWinToolBetaLockIcon);
a.SetIgnoreMouse(!1);
c || d ? (a.SetOpacity(1), a.SetEnabled(!1), this.mHasLockedTool = !0) : (a.SetOpacity(1), a.SetEnabled(!0));
var g = a.FindControlByID(247609107);
g && g.SetVisibility(!1);
(g = a.FindControlByID(246486429)) && g.SetVisibility(!1);
if (void 0 != b.amountTowardsUpgrade &&
void 0 != b.amountForUpgrade && -1 != b.amountTowardsUpgrade && -1 != b.amountForUpgrade)
if (e && e.SetVisibility(!1), -1 == b.upgradeAvailable)
(g = a.FindControlByID(247609107)) && g.SetVisibility(!1), (g = a.FindControlByID(246486429)) && g.SetVisibility(!1);
else if (b.upgradeAvailable || b.amountTowardsUpgrade >= b.amountForUpgrade)
(g = a.FindControlByID(247609107)) && g.SetVisibility(!0);
else {
if (b.amountTowardsUpgrade < b.amountForUpgrade && (g = a.FindControlByID(246486429))) {
g.SetVisibility(!0);
var h = a.FindControlByID(246485544);
h.SetPosition(h.mLeft, h.mTop, g.mWidth * (b.amountTowardsUpgrade / b.amountForUpgrade), h.mHeight);
this.mHasProgressBarTool = !0
}
}
else
e && e.SetVisibility(c);
f && (e && d && e.SetVisibility(!1), f.SetVisibility(d));
!0 === simcity.gGlobalUIHandler.mToyTaskPanelUIHandler.ToolHasAPicker(a.mUserData) && (c ? a.mUnlockWindowContainer.SetVisibility(!1) : simcity.SetBeatCountVisibility(a.mUnlockWindowContainer))
};
simcity.cToolPaletteUIHandler.prototype.SetToolButtonLockState = function (a, b, c, d) {
if (simcity.gGlobalUIHandler.mIsDemo) {
var e = this,
b = scrui.BuildRequestQuery([simcity.kDataTools, b, simcity.kDataProperties, simcity.kPropToolDemoLocked]);
scrui.RequestGameData([b], function (b) {
e.SetToolButtonLockStateHelper(a, c, d, b[0] ? !0 : !1)
})
} else
this.SetToolButtonLockStateHelper(a, c, d, !1)
};
simcity.cToolPaletteUIHandler.prototype.GetButtonFromToolID = function (a) {
for (var b = this.mToolButtons.length, c = 0; c < b; ++c) {
var d = this.mToolButtons[c];
if (d.mUserData === a)
return d
}
return null
};
simcity.cToolPaletteUIHandler.prototype.HandleGameEvent = function (a, b) {
switch (a) {
case simcity.kGameMessageToolSelected:
this.mSelectedToolCursorKey = b.cursorKey.instance ? b.cursorKey : null;
var c = this.GetButtonFromToolID(b.toolID);
if (b.toolID === simcity.cToolPaletteUIHandler.kToolIDBulldozer && this.mEditorLayout.mIsVisible) {
var d = this.mEditorLayout.FindControlByID(simcity.cToolPaletteUIHandler.kBtnBulldozer);
d && (c = d)
} else
b.toolID === simcity.cToolPaletteUIHandler.kToolIDPathSelector && (d = this.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kBtnRoadSelector)) &&
(c = d);
c && this.SetActiveToolButton(c);
break;
case simcity.kGameMessageToolDeselected:
c = b.toolID;
scrui.Assert(null === this.mSelectedToolButton || this.mSelectedToolButton.mUserData === c, "expecting a current button that matches the deselected tool!");
this.mOverridingCursor && (scrui.CursorManager.SetCursor(null), this.mOverridingCursor = !1);
this.SetActiveToolButton(null);
this.mSelectedToolCursorKey = null;
!this.mEditorIsOpen && (c === simcity.cToolPaletteUIHandler.kToolIDBulldozer && (!this.mSelectedCategoryButton ||
this.mSelectedCategoryButton.mUserData === simcity.kCategoryIDDemolish)) && this.CloseToolPanel(!1, !0);
break;
case simcity.kGameMessageBeatCountChanged:
if (2 <= this.mBeatCount && !1 == this.mHasProgressBarTool && !0 == this.mNeedsUpdated)
this.mNeedsUpdated = !1, this.mBeatCount = 0;
else if (!0 === this.mNeedsUpdated && !simcity.IsMainTutorialInProgress()) {
this.mBeatCount += 1;
var e = this.mToolButtons.length,
f = this.mToolButtons;
if (0 < e) {
for (var d = Array(2 * e), g = 0, h = 0; g < e; ++g)
c = f[g], c = c.mUserData, d[h++] = scrui.BuildRequestQuery([simcity.kDataTools,
c, simcity.kDataToolCountUsed]), d[h++] = scrui.BuildRequestQuery([simcity.kDataTools, c, simcity.kDataToolInfo]);
var i = this,
j = [];
scrui.RequestGameData(d, function (a) {
for (var b = 0, c = 0; b < e; ++b, ++c)
if (null != a[b]) {
var d = f[b],
g = a[c++],
h = g.toolCountUsed,
o = g.toolCountLimit,
r = g.toolCountShared;
if (g.toolModuleLimitIndex)
if (0 === j.length) {
var s = {
moduleLimitIndex : g.toolModuleLimitIndex,
tools : [b],
currentCount : h,
limit : o
};
j.push(s)
} else {
for (var s = !1, t = 0; t < j.length; t++)
if (j[t].moduleLimitIndex == g.toolModuleLimitIndex) {
j[t].tools.push(b);
j[t].currentCount += h;
s = !0;
break
}
s || (s = {
moduleLimitIndex : g.toolModuleLimitIndex,
tools : [b],
currentCount : h,
limit : o
}, j.push(s))
}
t = a[c];
s = i.IsToolLockedByAchievement(t.achievementLock);
r = t.isLocked || s || 0 < o && r >= o;
o = d.mUserData;
0 <= t.amountForUpgrade && (i.mToolUnlockInfoArray[o].amountForUpgrade = t.amountForUpgrade);
0 <= t.amountTowardsUpgrade && (i.mToolUnlockInfoArray[o].amountTowardsUpgrade = t.amountTowardsUpgrade);
i.mToolUnlockInfoArray[o].upgradeAvailable = t.upgradeAvailable;
i.SetToolButtonLockState(d, o, i.mToolUnlockInfoArray[o],
r);
0 < h && h == g.toolIndividualLimit ? (h = d.FindControlByID(simcity.cToolPaletteUIHandler.kWinPaletteRolloverPlacedText), g = d.FindControlByID(simcity.cToolPaletteUIHandler.kWinPaletteRolloverLockedText), h && h.SetVisibility(!0), g && g.SetVisibility(!1), d.SetOpacity(0.5), d.SetEnabled(!1)) : ((h = d.FindControlByID(simcity.cToolPaletteUIHandler.kWinPaletteRolloverPlacedText)) && h.SetVisibility(!1), d.SetOpacity(1), r || d.SetEnabled(!0));
i.mToolUnlockInfoArray[o].isLockedByAchievement = s
}
for (b = 0; b < j.length; b++)
if (c = j[b],
1 === c.tools.length) {
if (h = 2 * c.tools[0], 1 != a[h].toolIsHQReliant && (d = f[c.tools[0]], 0 < c.limit && c.currentCount == c.limit && (h = d.FindControlByID(simcity.cToolPaletteUIHandler.kWinPaletteRolloverPlacedText), h.SetVisibility(!0), d.SetOpacity(0.5), d.SetEnabled(!1)), 1 !== c.limit))
h = d.mParentControl.FindControlByID(simcity.cToolPaletteUIHandler.kWinModuleCount), h.SetVisibility(!0), t = d.mParentControl.FindControlByID(simcity.cToolPaletteUIHandler.kTxtModulesUsed), t.SetRawText(c.currentCount), t = d.mParentControl.FindControlByID(simcity.cToolPaletteUIHandler.kTxtModuleLimit),
t.SetRawText(c.limit), h.SetPosition(22, h.mTop)
} else
for (g = 0; g < c.tools.length; g++) {
d = f[c.tools[g]];
0 < c.limit && c.currentCount == c.limit && (h = 2 * c.tools[g] + 1, !1 == a[h].isLocked && (h = d.FindControlByID(simcity.cToolPaletteUIHandler.kWinPaletteRolloverPlacedText), h.SetVisibility(!0), d.SetOpacity(0.5), d.SetEnabled(!1)));
s = d.mParentControl.FindControlByID(simcity.cToolPaletteUIHandler.kWinLeftBracket);
o = d.mParentControl.FindControlByID(simcity.cToolPaletteUIHandler.kWinRightBracket);
r = d.mParentControl.FindControlByID(simcity.cToolPaletteUIHandler.kWinCenterBracket);
h = d.mParentControl.FindControlByID(simcity.cToolPaletteUIHandler.kWinModuleCount);
s.SetVisibility(!1);
o.SetVisibility(!1);
r.SetVisibility(!1);
h.SetVisibility(!1);
if (0 === g || 0 === c.tools[g] % i.mNumItemsPerPage)
t = d.mParentControl.FindControlByID(simcity.cToolPaletteUIHandler.kTxtModulesUsed), t.SetRawText(c.currentCount), t = d.mParentControl.FindControlByID(simcity.cToolPaletteUIHandler.kTxtModuleLimit), t.SetRawText(c.limit), h.SetVisibility(!0), h.SetPosition(35, h.mTop), d.mParentControl.FindControlByID(253646749).SetVisibility(!0);
0 === g ? s.SetVisibility(!0) : g === c.tools.length - 1 ? o.SetVisibility(!0) : r.SetVisibility(!0)
}
})
}
} else
this.mHasLockedTool && (this.mBeatCount += 1, 30 < this.mBeatCount && (this.mBeatCount = -2, this.mNeedsUpdated = !0));
break;
case simcity.kGameMessageUnitRuleUIEvent:
if (b.eventID === simcity.kToyPlopped || b.eventID === simcity.kToyDestroyed)
this.mNeedsUpdated = !0, this.mBeatCount = -2;
break;
case simcity.kMessageKeyTrigger:
this.HandleTriggerKey(b.triggerCode)
}
};
simcity.cToolPaletteUIHandler.prototype.SetCurrentRoadDrawType = function () {
if (this.mLastUsedRoadControlID) {
var a = this.mPanelLayout.FindControlByID(this.mLastUsedRoadControlID);
a && a.SetSelected(!0)
}
};
simcity.cToolPaletteUIHandler.prototype.HandleUIMessage = function (a, b, c) {
switch (a) {
case scrui.kMsgTypeButtonClicked:
switch (b) {
case simcity.cToolPaletteUIHandler.kBtnDrawCurvy:
this.mEditorLayout.mIsVisible ? this.mLastEditorUsedRoadControlID = b : this.mLastUsedRoadControlID = b;
c.SetSelected(!0);
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandRoadDrawType, simcity.cToolPaletteUIHandler.kRoadTypeCurvy]));
break;
case 248042660:
0 != this.mCurrentLightLayer ? scrui.PostGameCommand(scrui.BuildCommand(["GotoNextEcoSetItem",
this.mCurrentLightLayer, 200])) : this.mSelectedSubCategoryLayer && 0 != this.mSelectedSubCategoryLayer && scrui.PostGameCommand(scrui.BuildCommand(["GotoNextEcoSetItem", this.mSelectedSubCategoryLayer, 200]));
break;
case simcity.cToolPaletteUIHandler.kBtnDrawStraight:
this.mEditorLayout.mIsVisible ? this.mLastEditorUsedRoadControlID = b : this.mLastUsedRoadControlID = b;
c.SetSelected(!0);
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandRoadDrawType, simcity.cToolPaletteUIHandler.kRoadTypeStraight]));
break;
case simcity.cToolPaletteUIHandler.kBtnDrawGrid:
this.mEditorLayout.mIsVisible ?
this.mLastEditorUsedRoadControlID = b : this.mLastUsedRoadControlID = b;
c.SetSelected(!0);
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandRoadDrawType, simcity.cToolPaletteUIHandler.kRoadTypeGrid]));
break;
case simcity.cToolPaletteUIHandler.kBtnDrawArc:
this.mEditorLayout.mIsVisible ? this.mLastEditorUsedRoadControlID = b : this.mLastUsedRoadControlID = b;
c.SetSelected(!0);
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandRoadDrawType, simcity.cToolPaletteUIHandler.kRoadTypeArc]));
break;
case simcity.cToolPaletteUIHandler.kBtnDrawCircle:
this.mEditorLayout.mIsVisible ?
this.mLastEditorUsedRoadControlID = b : this.mLastUsedRoadControlID = b;
c.SetSelected(!0);
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandRoadDrawType, simcity.cToolPaletteUIHandler.kRoadTypeCircle]));
break;
case simcity.cToolPaletteUIHandler.kBtnToggleGuides:
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandSetAppProperty, simcity.cToolPaletteUIHandler.kOptionIDRoadGuides, c.mIsSelected ? 1 : 0]));
break;
case simcity.cToolPaletteUIHandler.kBtnRoadSelector:
this.mSelectedToolButton === c ? (c.SetSelected(!1),
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataDeselectTool]))) : (c.SetSelected(!0), scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataSelectTool, simcity.cToolPaletteUIHandler.kToolIDPathSelector])));
break;
case simcity.cToolPaletteUIHandler.kBtnBulldozer:
this.mSelectedToolButton === c ? scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataDeselectTool])) : scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataSelectTool, simcity.cToolPaletteUIHandler.kToolIDBulldozer]));
break;
case simcity.cToolPaletteUIHandler.kBtnClose:
this.CloseToolPanel();
break;
case simcity.cToolPaletteUIHandler.kBtnGoToRegion:
!simcity.IsTutorialInProgress() && 0 !== simcity.gGlobalUIHandler.GetBoxID() && (this.mEditorLayout.mIsVisible ? (this.mWaitingCategory = this.mEditorCategory, this.mRegionViewCounter = -350, this.CloseEditorPanel()) : simcity.gGlobalUIHandler.mRegionCameraButton.SetSelected(!0));
break;
case simcity.cToolPaletteUIHandler.kBtnGuideMe:
this.mGuideMeWarningDialog && this.mGuideMeWarningDialog.DestroyControl();
if (this.mSelectedCategoryButton && (b = this.mSelectedCategoryButton.mUserData,
this.mSelectedSubCategoryButton && (b = this.mSelectedSubCategoryButton.mUserData), a = simcity.GetCitySpecializationDatabindingFromCategoryID(b)))
if (a.specializationID == simcity.cCitySpecializationHandler.guidedSpecialization)
simcity.cCitySpecializationHandler.SelectNewCitySpecializationGuide(simcity.Specializations.UnGuided);
else if (this.mGuideMeWarningDialog = gUIManager.LoadAndCacheLayout("Layouts/DialogBoxes/GuideMeDialog.js", gUIManager.FindControlByID(simcity.kWinCityUIParent)))
this.mGuideMeWarningDialog.SetVisibility(!0),
c = this.mGuideMeWarningDialog.FindControlByID(simcity.cToolPaletteUIHandler.kGuideMeDescription), b = this.mGuideMeWarningDialog.FindControlByID(simcity.cToolPaletteUIHandler.kGuideMeTitle), a.nameString.LoadString(), a.descriptionString.LoadString(), b.UpdateLocaleText({
Specialization_Title : a.nameString.mRawString
}), c.SetLocaleText(a.descriptionString), a = c.GetTextHeight(), c = simcity.cCitySpecializationHandler.guidedSpecialization, c != simcity.Specializations.UnGuided ? (c = simcity.kSpecializationDataBindings[c],
c.nameString.LoadString(), b = this.mGuideMeWarningDialog.FindControlByID(simcity.cToolPaletteUIHandler.kGuideMeCurrentText), b.SetVisibility(!0), b.UpdateLocaleText({
Specialization_Title : c.nameString.mRawString
}), a += 25, b.SetPosition(b.mLeft, a), a += b.GetTextHeight()) : (b = this.mGuideMeWarningDialog.FindControlByID(simcity.cToolPaletteUIHandler.kGuideMeCurrentText), b.SetVisibility(!1)), c = this.mGuideMeWarningDialog.FindControlByID(simcity.cToolPaletteUIHandler.kGuideMeTextWindow), c.SetPosition(c.mLeft, c.mTop,
c.mWidth, a);
break;
case 250014817:
this.mGuideMeWarningDialog.DestroyControl();
(c = this.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kBtnGuideMe)) && c.SetSelected(!1);
break;
case 250014816:
this.mSelectedCategoryButton && (b = this.mSelectedCategoryButton.mUserData, this.mSelectedSubCategoryButton && (b = this.mSelectedSubCategoryButton.mUserData), a = simcity.GetCitySpecializationDatabindingFromCategoryID(b), c = this.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kBtnGuideMe), a && c && c.mIsSelected ?
simcity.cCitySpecializationHandler.SelectNewCitySpecializationGuide(a.specializationID) : simcity.cCitySpecializationHandler.SelectNewCitySpecializationGuide(simcity.Specializations.UnGuided), this.mGuideMeWarningDialog.DestroyControl());
break;
case simcity.kBtnIDCitySpecialization:
case simcity.kBtnReturnToCity:
if (c.mIsSelected) {
a = simcity.gGlobalUIHandler.mRegionViewUIHandler.OnReturnToCityButtonClicked();
c = this.mToolPanelOpen;
this.mModeSwap = !0;
this.CloseToolPanel();
if (this.mCitySpecializationModeActive =
b === simcity.kBtnIDCitySpecialization)
this.LoadCitySpecialization();
else if (this.mSelectedCategoryButton = null, this.mCitySpecializationContainer.mChildren) {
simcity.gGlobalUIHandler.RemoveFromBeatUpdate(this.mCitySpecializationContainer);
for (var d = 0, e = this.mCitySpecializationContainer.mChildren.length; d < e; ++d)
b = this.mCitySpecializationContainer.mChildren[d].FindControlByID(simcity.cToolPaletteUIHandler.kBtnIDCategoryButton).mUserData, delete this.mCategoryButtonsMap[b];
this.mCitySpecializationContainer.DestroyChildren()
}
(a ||
!c || !a && 0 !== this.mCategoryToOpen) && this.SetCategoryToOpen();
a && 0 === this.mCategoryToOpen && this.mPanelLayout && (this.mPanelLayout.SetVisibility(!1), (a = this.mPanelLayout.FindAnimationByID(simcity.cToolPaletteUIHandler.kAnimIDPanelRevealUp)) && a.Reset())
} else
c.SetSelected(!0)
}
}
};
simcity.cToolPaletteUIHandler.prototype.PrintDebugInfo = function () {
simcity.DEBUG && (scrui.DebugPrint("cToolPaletteUIHandler"), scrui.DebugPrint(" mCategoryData = " + Object.keys(this.mCategoryData).length + ", mCategoryButtonsMap = " + Object.keys(this.mCategoryButtonsMap).length), scrui.DebugPrint(" mToolButtons = " + this.mToolButtons.length + ", mToolUnlockInfoArray = " + Object.keys(this.mToolUnlockInfoArray).length + ", mNewlyUnlocked = " + Object.keys(this.mNewlyUnlocked).length), scrui.DebugPrint(" mPreviousAlertLevel = " +
(this.mPreviousAlertLevel ? Object.keys(this.mPreviousAlertLevel).length : 0)), scrui.DebugPrint(" mLayerButtons = " + this.mLayerButtons.length))
};
simcity.cToolPaletteUIHandler.prototype.HandleUnlock = function (a, b, c) {
this.mNewlyUnlocked[a] = !0;
for (var d = 0, e = b.length; d < e; ++d) {
var f = this.GetButtonFromCategory(0 === c[d] ? b[d] : c[d]);
f && (f = f.GetParentLayout().FindControlByID(simcity.cToolPaletteUIHandler.kWinUnlockContainer), simcity.SetBeatCountVisibility(f))
}
this.UnlockTool(a)
};
simcity.cToolPaletteUIHandler.prototype.UpdateRollover = function (a) {
if (!this.mRolloverLayout.mIsVisible) {
var b = this.mRolloverLayout.mParentControl,
c = this.mRolloverButton.mUserData;
this.mRolloverLayout.DestroyControl();
this.mRolloverLayout = gUIManager.LoadAndCacheLayout("Layouts/PaletteRolloverPreview.js", b);
a = !1;
this.mRolloverLayout.SetVisibility(!1);
this.mRolloverLayout.SetVisibility(!0);
var d = this,
e = simcity.kPaletteRolloverDataBindings,
b = [],
f = [];
simcity.GenerateDataBindingQueries(e, b, {
argumentList : [c]
},
f, a);
if (0 < b.length) {
var g = this;
g.mRolloverLayout && simcity.RequestDataBindingData(b, e, f, a, function (b) {
simcity.HandleDataBindingResults(b, g.mRolloverLayout, e, a);
(b = g.mToolUnlockInfoArray[c]) && d.UpdateRolloverWindow(b.isLocked, b.isLockedByAchievement)
})
}
}
};
simcity.cToolPaletteUIHandler.prototype.UpdateRolloverWindow = function (a, b) {
var c = this.mRolloverLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinPaletteRolloverMarqueeImage),
d = this.mRolloverLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinPaletteRolloverLockedBackground),
e = this.mRolloverLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinPaletteRolloverMoreInfoContainer);
b && (e.SetVisibility(!1), c.SetVisibility(!1));
e.mIsVisible && (c.SetHeight(c.mHeight - e.mHeight), this.mRolloverLayout.SetHeight(this.mRolloverLayout.mHeight +
e.mHeight), e.SetPosition(e.mLeft, d.mTop - e.mHeight));
var e = this.mRolloverLayout.FindControlByID(simcity.cToolPaletteUIHandler.kTxtPaletteRolloverDescription),
f = this.mRolloverLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinContainerRolloverDescription),
g = this.mRolloverLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinPaletteRolloverLockedIcon),
h = e.GetTextHeight(),
i = d.mHeight;
c.SetHeight(c.mHeight - i);
e.SetHeight(h);
f.SetHeight(h);
g.SetVisibility(a);
c = this.mRolloverLayout.mHeight + i;
if (b)
if (0 !=
d.mHeight)
c = d.mHeight + 30;
else {
this.mRolloverLayout.SetVisibility(!1);
return
}
d = this.mRolloverButton.GetAbsolutePosition();
e = this.mRolloverLayout.mWidth;
f = d[0];
g = scrui.GetClientWidth();
f + e > g && (f -= f + e - g, (h = this.mRolloverLayout.FindControlByID(231594633)) && f && h.SetPosition(h.mLeft + (d[0] + e - g), h.mTop));
this.mRolloverLayout.SetPosition(f, d[1] - c - 5, this.mRolloverLayout.mWidth, c)
};
simcity.cToolPaletteUIHandler.prototype.ClearPanel = function () {
if (this.mPanelLayout) {
var a = void 0;
this.mHasRoadTool && (a = this.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDRoadToolButtonContainer));
if (!1 === this.mHasRoadTool || null == a | void 0 == a)
a = this.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDPalettePanel);
a && (simcity.gGlobalUIHandler.RemoveFromBeatUpdate(a), a.DestroyChildren());
this.mToolButtons = [];
this.mToolUnlockInfoArray = {};
this.mSelectedToolButton = null;
this.mAlertsContainer &&
this.mAlertsContainer.SetVisibility(!1)
}
};
simcity.cToolPaletteUIHandler.prototype.LoadRootToolPanel = function (a) {
var b = this;
if (a.instance == simcity.kCategoryIDZones) {
var c = scrui.BuildRequestQuery([simcity.kDataSelectedTool, simcity.kDataToolID]);
scrui.RequestGameData([c], function (c) {
b.LoadPaletteZones(a, c[0]);
b.LoadInfoPanel(a)
});
-1 !== b.mKeyShortcutIx && b.mPanelLayout.FindAnimationByID(simcity.cToolPaletteUIHandler.kAnimIDPanelRevealUp).RegisterEventCallback(scrui.cAnimation.kEventStopped, simcity.ForceRCIActive);
simcity.gGlobalUIHandler.mIsSpectatorMode &&
(b.mPanelLayout.FindControlByID(238522843).SetVisibility(!1), b.mPanelLayout.FindControlByID(238001564).SetVisibility(!1), b.mPanelLayout.FindControlByID(238001568).SetVisibility(!1), b.mPanelLayout.FindControlByID(238001572).SetVisibility(!1))
} else {
c = scrui.RequestStringFromKey(a);
c = scrui.BuildRequestQuery([simcity.kDataProperties, c, simcity.kPropToolCategoryGroupID]);
scrui.RequestGameData([c], function (c) {
c = c[0];
null === c ? (b.mSubCategoryGroupID = 0, b.LoadToolPanel(a, function () {
b.LoadInfoPanel(a)
})) : (b.mSubCategoryGroupID =
c, b.LoadSubCategoriesToolPanel(a, c, b.mCategoryData[b.mSelectedCategoryButton.mUserData].lastSubCategorySelected));
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataDeselectTool]));
simcity.gGlobalUIHandler.mIsSpectatorMode && (b.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDPagingSystemContainer) && b.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDPagingSystemContainer).SetVisibility(!1), b.mPanelLayout.FindControlByID(239887022) && b.mPanelLayout.FindControlByID(239887022).SetVisibility(!1),
b.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinRoadButtonContainer) && b.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinRoadButtonContainer).SetVisibility(!1), b.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kBtnToggleGuides) && b.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kBtnToggleGuides).SetVisibility(!1));
b.SetCurrentRoadDrawType();
(c = b.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kBtnRoadSelector)) && c.SetSelected(!1)
});
var d =
b.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kBtnToggleGuides);
d && (c = [scrui.BuildRequestQuery([simcity.kDataAppProperties, simcity.cToolPaletteUIHandler.kOptionIDRoadGuides])], scrui.RequestGameData(c, function (a) {
d.SetSelected(a[0])
}));
this.mNeedsUpdated = !0;
this.mBeatCount = -5;
this.mHasLockedTool = this.mHasProgressBarTool = !1
}
};
simcity.cToolPaletteUIHandler.prototype.LoadSubCategoriesToolPanel = function (a, b, c) {
var d = gUIManager.FindAnimationByID(simcity.cToolPaletteUIHandler.kWinLegendShift);
d && d.Start(scrui.cAnimation.kPlayForward);
this.mIsLegendShifted = !0;
var e = this,
a = scrui.RequestStringFromKey(a),
a = scrui.BuildRequestQuery([simcity.kDataProperties, a, simcity.kPropToolCategoryPaletteLayout]),
b = scrui.BuildRequestQuery([simcity.kDataResourceKeys, scrui.kResourceTypePropertyList, b]);
scrui.RequestGameData([a, b], function (a) {
var b =
a[1],
d = b.length;
e.LoadPalettePanelHelper(a[0]);
e.ClearPanel();
var i = new simcity.cKey;
i.group = e.mSubCategoryGroupID;
i.instance = c;
var j = e.mSubCategoryBtnsContainer.mParentControl;
if (e.mSubCategoryBtnsContainer.mChildren)
e.LoadTools(i, !1);
else {
for (var a = Array(2 * d), k = 0; k < d; ++k) {
var l = scrui.RequestStringFromKey(b[k]);
a[2 * k] = scrui.BuildRequestQuery([simcity.kDataProperties, l, simcity.kPropToolCategoryName]);
a[2 * k + 1] = scrui.BuildRequestQuery([simcity.kDataProperties, l, simcity.kPropToolCategoryOrder])
}
scrui.RequestGameData(a,
function (a) {
for (var f = 0; f < d; ++f) {
var l = a[2 * f],
k = a[2 * f + 1] || f,
o = b[f].instance,
r = gUIManager.LoadAndCacheLayout("Layouts/Palette/PaletteSubCategoryButton.js", e.mSubCategoryBtnsContainer),
s = r.mWidth * d - 2;
j.mWidth !== j && j.SetWidth(s);
r.SetPosition((k - 1) * r.mWidth, 0, r.mWidth, r.mHeight);
s = r.FindControlByID(simcity.cToolPaletteUIHandler.kBtnSubCategory);
s.mUserData = o;
r.button = s;
0 === c && 1 === k && (c = o, e.mCategoryData[e.mSelectedCategoryButton.mUserData].lastSubCategorySelected = o, i.instance = c);
c === o && (s.SetSelected(!0),
e.mSelectedSubCategoryButton = s);
l = scrui.LocaleStringFromLocaleProperty(l);
s.buttonTextOn = r.FindControlByID(simcity.cToolPaletteUIHandler.kTxtCategoryTextOn);
s.buttonTextOff = r.FindControlByID(simcity.cToolPaletteUIHandler.kTxtCategoryTextOff);
s.buttonTextOn.SetLocaleText(l);
s.buttonTextOff.SetLocaleText(l);
s.buttonIconCritical = r.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDCategoryIconCritical);
s.alertLevel = simcity.kAlertLevelNormal
}
e.LoadTools(i, !1)
})
}
});
this.mNeedsUpdated = !0;
this.mBeatCount =
-2
};
simcity.OnToolPanelClosed = function (a) {
var b = simcity.gGlobalUIHandler.mToolPaletteUIHandler;
b.mModeSwap && a.animation.mPlayDirection === scrui.cAnimation.kPlayReverse && b.SetCategoryToOpen()
};
simcity.cToolPaletteUIHandler.prototype.SetCategoryToOpen = function () {
this.mCategoryToOpen = this.mCitySpecializationModeActive ? this.mLastSelectedCitySpecializationID : this.mLastSelectedMainCategoryID
};
simcity.cToolPaletteUIHandler.prototype.LoadPalettePanelHelper = function (a) {
if (!simcity.CompareKeys(a, this.mPanelLayoutKey)) {
this.mPanelLayout && (this.ClearInfoPanel(), simcity.gGlobalUIHandler.RemoveFromBeatUpdate(this.mPanelLayout), this.mPanelLayout.DestroyControl());
this.mPanelLayout = gUIManager.LoadAndCacheLayout(scrui.PathFromResourceKey(a), this.mPanelContainer);
this.mPanelLayout.SetVisibility(!1);
this.mInfoContainer = this.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinInfoContainer);
this.mSimIconWindow = this.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinSimIconWindow);
this.mHelpText = this.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kTxtHelpInfo);
this.mSubCategoryBtnsContainer = this.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinSubCategoryBtnsContainer);
var b = this.mPanelLayout.FindAnimationByID(simcity.cToolPaletteUIHandler.kAnimIDPanelRevealUp);
b && b.RegisterEventCallback(scrui.cAnimation.kEventStopped, simcity.OnToolPanelClosed);
this.mPagingSystemContainer =
this.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDPagingSystemContainer);
this.mPanelLayoutKey = a
}
this.mPanelLayout.SetVisibility(!0);
this.mSelectedCategoryButton.mUserData === simcity.kCategoryIDDemolish && (a = this.mPanelLayout.FindControlByID(250601161), simcity.AutoSizeHelpText(a));
(a = this.mPanelLayout.FindControlByID(215780043)) && a.SetVisibility(0 !== this.mSubCategoryGroupID)
};
simcity.kCitySpecializationGroupID = 204049373;
simcity.kGetCitySpecialziationCategories = [scrui.BuildRequestQuery([simcity.kDataResourceKeys, scrui.kResourceTypePropertyList, simcity.kCitySpecializationGroupID])];
simcity.cToolPaletteUIHandler.prototype.LoadCitySpecialization = function () {
if (this.mCitySpecializationContainer && !this.mCitySpecializationContainer.mChildren) {
var a = this;
scrui.RequestGameData(simcity.kGetCitySpecialziationCategories, function (b) {
for (var c = b[0], d = c.length, b = Array(4 * d), e = 0; e < d; ++e) {
var f = c[e];
f.group = simcity.kCitySpecializationGroupID;
f = scrui.RequestStringFromKey(f);
b[4 * e] = scrui.BuildRequestQuery([simcity.kDataProperties, f, simcity.kPropToolCategoryName]);
b[4 * e + 1] = scrui.BuildRequestQuery([simcity.kDataProperties,
f, simcity.kPropToolCategoryIconKeys]);
b[4 * e + 2] = scrui.BuildRequestQuery([simcity.kDataProperties, f, simcity.kPropToolCategoryLayerKey]);
b[4 * e + 3] = scrui.BuildRequestQuery([simcity.kDataProperties, f, simcity.kPropToolCategoryOrder])
}
scrui.RequestGameData(b, function (b) {
for (var e = [], f = 0; f < d; ++f) {
for (var j = b[4 * f + 3], k = !1, l = 0, m = e.length; l < m; ++l)
if (j < e[l]) {
e.splice(l, 0, j);
k = !0;
break
}
k || e.push(j)
}
for (f = 0; f < d; ++f) {
var n = gUIManager.LoadAndCacheLayout("Layouts/Palette/CategoryButtonWithIcon2.js", a.mCitySpecializationContainer),
k = n.FindControlByID(simcity.cToolPaletteUIHandler.kBtnIDCategoryButton),
l = c[f].instance,
p = b[4 * f],
q = b[4 * f + 1],
m = b[4 * f + 2],
j = b[4 * f + 3];
n.SetPosition(e.indexOf(j) * n.mWidth, 0);
k.mUserData = l;
k.mCitySpecialization = !0;
simcity.SetTooltipHelper(n, p);
simcity.SetupCategoryButton(k, n);
null !== q && (k.buttonIconNormal.SetWindowImage(scrui.PathFromResourceKey(q[0])), k.buttonIconCaution.SetWindowImage(scrui.PathFromResourceKey(q[1])), k.buttonIconCritical.SetWindowImage(scrui.PathFromResourceKey(q[3])), j = q[4] ? scrui.PathFromResourceKey(q[4]) :
scrui.PathFromResourceKey(q[0]), k.buttonIconNormalOn.SetWindowImage(j));
a.mCategoryData[l] = {
layer : m,
lastSubCategorySelected : 0,
citySpecialization : !0
};
a.mCategoryButtonsMap[l] = k;
a.mCitySpecializationCategoryAlerts.hasOwnProperty(l) && simcity.SetCategoryButtonAlertLevelHelper({
win : k,
alertLevel : a.mCitySpecializationCategoryAlerts[l]
})
}
})
})
}
};
simcity.cToolPaletteUIHandler.prototype.GetPanelLayout = function () {
return this.mEditorLayout.mIsVisible ? this.mEditorLayout : this.mPanelLayout
};
simcity.cToolPaletteUIHandler.prototype.IsToolLockedByAchievement = function (a) {
return a ? !simcity.gGlobalUIHandler.mAchievementManager.IsUnlocked(a.instance) : !1
};
simcity.cToolPaletteUIHandler.prototype.GuideMeHelper = function () {
if (this.mPanelLayout) {
var a = this.mPanelLayout.FindControlByID(247924457);
a && a.SetVisibility(!1);
if (this.mSelectedCategoryButton) {
var b = this.mSelectedCategoryButton.mUserData;
this.mSelectedSubCategoryButton && (b = this.mSelectedSubCategoryButton.mUserData);
if ((b = simcity.GetCitySpecializationDatabindingFromCategoryID(b)) && simcity.ResourcesExistForSpecialization(b.specializationID) && a) {
a.SetVisibility(!0);
var c = a.FindControlByID(simcity.cToolPaletteUIHandler.kBtnGuideMe);
c && (b.specializationID == simcity.cCitySpecializationHandler.guidedSpecialization ? (c.SetSelected(!0), a.SetVisibility(!0)) : c.SetSelected(!1))
}
}
}
};
simcity.cToolPaletteUIHandler.prototype.LoadToolsHelper = function (a, b) {
var c = this;
c.GuideMeHelper();
for (var d = b.length, e = Array(d), f = 0; f < d; ++f)
e[f] = scrui.BuildRequestQuery([simcity.kDataTools, b[f].instance, simcity.kDataToolInfo]);
c.ClearPanel();
var g = c.GetPanelLayout();
if (0 < e.length) {
var h = g.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDPalettePanel);
simcity.gGlobalUIHandler.RemoveFromBeatUpdate(h);
h.DestroyChildren();
var i = h.mParentControl;
scrui.RequestGameData(e, function (e) {
c.mToolButtons = Array(d);
c.mToolUnlockInfoArray = {};
var f = 0;
c.mHasRoadTool = !1;
for (var j = 0; j < d; ++j) {
var k = e[j];
!1 == c.mHasRoadTool && (c.mHasRoadTool = k.isRoadTool)
}
j = g.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDNonRoadToolContainer);
if (void 0 == j || null == j)
j = g.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDPagingSystemContainer);
if (j)
if (c.mHasRoadTool) {
if (k = g.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDRoadToolButtonContainer))
h = k, h.DestroyChildren(), i = h.mParentControl, j.SetVisibility(!1), (k = g.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDRoadToolContainer)) &&
k.SetVisibility(!0)
} else (k = g.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDRoadToolButtonContainer)) && k.DestroyChildren(), j.SetVisibility(!0), (j = g.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDRoadToolContainer)) && j.SetVisibility(!1);
(j = g.FindControlByID(simcity.cToolPaletteUIHandler.kWinRoadButtonContainer)) && (!0 == c.mHasRoadTool && !1 == j.mIsVisible ? j.SetVisibility(!0) : !1 == c.mHasRoadTool && !0 == j.mIsVisible && j.SetVisibility(!1));
for (var q = j = 0; j < d; ++j) {
var k = e[j],
o = b[j].instance;
c.mToolUnlockInfoArray[o] = {
isLocked : k ? k.isLocked : !0,
achievementLock : k ? k.achievementLock : null
};
if (k && k.shouldDisplay) {
var f = gUIManager.LoadAndCacheLayout("Layouts/Palette/BuildingItemUI.js", h),
r = Math.floor(i.mWidth / f.mWidth);
c.mNumItemsPerPage = r;
var s = Math.floor(q / r);
f.SetPosition(q % r * f.mWidth + s * i.mWidth, h.mHeight - f.mHeight, f.mWidth, f.mHeight);
f.SetVisibility(q < r);
r = f.FindControlByID(simcity.cToolPaletteUIHandler.kBtnIDSelectTool);
r.mUserData = o;
f.FindControlByID(247609078).mUserData = o;
var t = r.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDToolIcon);
t.SetWindowImage(scrui.PathFromResourceKey(k.iconKey));
r.mUnlockWindowContainer = f.FindControlByID(simcity.cToolPaletteUIHandler.kWinUnlockContainer);
r.mMouseOverAnim = f.FindAnimationByID(245429366);
c.mToolButtons[q] = r;
o === a && (r.SetSelected(!0), c.mSelectedToolButton = r);
f = s + 1;
(s = c.IsToolLockedByAchievement(k.achievementLock)) && t.SetWindowImage(scrui.PathFromResourceKey(k.lockedIconKey));
c.SetToolButtonLockState(r, o, c.mToolUnlockInfoArray[o], k.isLocked || s);
c.mToolUnlockInfoArray[o].isLockedByAchievement =
s;
void 0 != k.amountForUpgrade && (c.mToolUnlockInfoArray[o].amountForUpgrade = k.amountForUpgrade);
void 0 != k.amountTowardsUpgrade && (c.mToolUnlockInfoArray[o].amountTowardsUpgrade = k.amountTowardsUpgrade);
c.mNewlyUnlocked.hasOwnProperty(o) && simcity.SetBeatCountVisibility(r.mUnlockWindowContainer);
++q
}
}
c.mToolButtons.length = q;
c.mPageIndex = 0;
c.mNumTotalPages = f;
h.SetPosition(0, 0, i.mWidth * f, h.mHeight);
c.UpdateScrollButtons()
})
}
if ((e = g.FindControlByID(239814192)) && e.GetAbsoluteVisibility())
for (var j = 0, j = this.mEditorLayout.mIsVisible ?
this.mLastEditorUsedRoadControlID : this.mLastUsedRoadControlID, f = 0; 6 > f; f++) {
var k = e.FindControlByID(238502129 + f);
k && (0 == j || j == 238502129 + f ? (j = k.GetAbsolutePosition(), k.Private_OnClick(j[0], j[1]), j = 1) : k.SetSelected(!1))
}
};
simcity.cToolPaletteUIHandler.prototype.LoadPaletteZones = function (a, b) {
var c = scrui.RequestStringFromKey(a),
c = scrui.BuildRequestQuery([simcity.kDataProperties, c, simcity.kPropToolCategoryPaletteLayout]),
d = this;
scrui.RequestGameData([c], function (a) {
a = a[0];
if (!simcity.CompareKeys(a, d.mPanelLayoutKey)) {
d.mPanelLayout && (d.ClearInfoPanel(), simcity.gGlobalUIHandler.RemoveFromBeatUpdate(d.mPanelLayout), d.mPanelLayout.DestroyControl());
d.mPanelLayout = gUIManager.LoadAndCacheLayout(scrui.PathFromResourceKey(a),
d.mPanelContainer);
d.mPanelLayout.SetVisibility(!1);
d.mInfoContainer = d.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinInfoContainer);
d.mSimIconWindow = d.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinSimIconWindow);
d.mHelpText = d.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kTxtHelpInfo);
d.mSubCategoryBtnsContainer = null;
var c = d.mPanelLayout.FindAnimationByID(simcity.cToolPaletteUIHandler.kAnimIDPanelRevealUp);
c && c.RegisterEventCallback(scrui.cAnimation.kEventStopped,
simcity.OnToolPanelClosed);
d.mPagingSystemContainer = d.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDPagingSystemContainer);
d.mPanelLayoutKey = a
}
d.mPanelLayout.SetVisibility(!0);
a = [250601161, 250601183, 250602352];
for (c = 0; c < a.length; c++) {
var g = d.mPanelLayout.FindControlByID(a[c]);
simcity.AutoSizeHelpText(g)
}
d.ClearPanel();
for (var a = Array(h), c = [238522843, 238264762, 238265268, 238265630], h = c.length, g = 0; g < h; g++) {
var i = d.mPanelLayout.FindControlByID(c[g]),
j = i.FindControlByID(simcity.cToolPaletteUIHandler.kBtnIDSelectTool);
d.mToolButtons[g] = j;
d.mToolButtons[g].mUnlockWindowContainer = i.FindControlByID(simcity.cToolPaletteUIHandler.kWinUnlockContainer);
a[g] = scrui.BuildRequestQuery([simcity.kDataTools, j.mUserData, simcity.kDataToolInfo])
}
scrui.RequestGameData(a, function (a) {
d.mToolUnlockInfoArray = {};
for (var c = 0; c < h; ++c) {
var e = d.mToolButtons[c],
f = e.mUserData,
g = a[c];
d.mToolUnlockInfoArray[f] = {
isLocked : g ? g.isLocked : !0
};
g && g.shouldDisplay && (f === b && (e.SetSelected(!0), d.mSelectedToolButton = e), d.SetToolButtonLockState(e, f, d.mToolUnlockInfoArray[f],
g.isLocked), d.mNewlyUnlocked.hasOwnProperty(f) && simcity.SetBeatCountVisibility(e.mUnlockWindowContainer))
}
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataDeselectTool]))
})
})
};
simcity.cToolPaletteUIHandler.prototype.SetBuildingItemVisibilityForCurrentPage = function (a) {
var b = this.GetPanelLayout(),
c = void 0;
this.mHasRoadTool && (c = b.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDRoadToolButtonContainer));
if (!1 === this.mHasRoadTool || null == c | void 0 == c)
c = b.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDPalettePanel);
if (c.mChildren)
for (var b = this.mPageIndex * this.mNumItemsPerPage, d = Math.min(c.mChildren.length, (this.mPageIndex + 1) * this.mNumItemsPerPage); b < d; ++b)
c.mChildren[b].SetVisibility(a)
};
simcity.cToolPaletteUIHandler.prototype.UpdateScrollButtons = function () {
var a = this.GetPanelLayout(),
b = a.FindControlByID(simcity.cToolPaletteUIHandler.kBtnIDPageLeft),
c = a.FindControlByID(simcity.cToolPaletteUIHandler.kBtnIDPageRight),
d = a.FindControlByID(simcity.cToolPaletteUIHandler.kBtnIDRoadToolPageLeft),
a = a.FindControlByID(simcity.cToolPaletteUIHandler.kBtnIDRoadToolPageRight);
b.SetVisibility(0 < this.mPageIndex);
c.SetVisibility(this.mPageIndex + 1 < this.mNumTotalPages);
d && a && (d.SetVisibility(0 < this.mPageIndex),
a.SetVisibility(this.mPageIndex + 1 < this.mNumTotalPages))
};
simcity.cToolPaletteUIHandler.prototype.HandleToolSelection = function (a) {
var b = a.mUserData,
c = this.mToolUnlockInfoArray[b];
a.mIsSelected && c.isLocked ? a.SetSelected(!1) : !0 === a.mIsSelected ? scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataSelectTool, b])) : scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataDeselectTool]))
};
simcity.cToolPaletteUIHandler.prototype.LoadToolPanel = function (a, b) {
this.mIsSubPanel = !1;
var c = scrui.RequestStringFromKey(a),
d = scrui.BuildRequestQuery([simcity.kDataSelectedTool, simcity.kDataToolID]),
c = scrui.BuildRequestQuery([simcity.kDataProperties, c, simcity.kPropToolCategoryPaletteLayout]),
e = scrui.BuildRequestQuery([simcity.kDataUIToolCategory, a.instance, simcity.kPropToolCategoryToolList]),
f = scrui.BuildRequestQuery([simcity.kDataSelectedTool, simcity.kDataCursorKey]),
g = this;
scrui.RequestGameData([d,
c, f, e], function (a) {
var c = a[0],
d = a[1];
g.mSelectedToolCursorKey = a[2] && a[2].instance ? a[2] : null;
a = a[3] ? a[3] : [];
0 < a.length && (g.mToolKeys = a);
g.LoadPalettePanelHelper(d);
g.LoadToolsHelper(c, a);
b && b()
})
};
simcity.cToolPaletteUIHandler.prototype.LoadTools = function (a) {
this.mIsSubPanel = !0;
var b = this,
c = scrui.RequestStringFromKey(a),
d = scrui.BuildRequestQuery([simcity.kDataSelectedTool, simcity.kDataToolID]),
c = scrui.BuildRequestQuery([simcity.kDataProperties, c, simcity.kPropToolCategoryLayerKey]),
e = scrui.BuildRequestQuery([simcity.kDataUIToolCategory, a.instance, simcity.kPropToolCategoryToolList]);
scrui.RequestGameData([d, c, e], function (c) {
if (null !== b.mSelectedSubCategoryLayer)
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandToggleLayer,
b.mSelectedSubCategoryLayer, !1]));
else {
var d = b.mCategoryData[b.mSelectedCategoryButton.mUserData].layer;
null !== d && scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandToggleLayer, d.instance, !1]))
}
d = c[0];
b.mSelectedSubCategoryLayer = c[1] ? c[1].instance : null;
c = c[2] ? c[2] : [];
null !== b.mSelectedSubCategoryLayer && scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandToggleLayer, b.mSelectedSubCategoryLayer, !0]));
b.LoadToolsHelper(d, c);
b.LoadInfoPanel(a);
b.mNeedsUpdated = !0;
b.mBeatCount = -2
});
this.mNeedsUpdated =
!0;
this.mBeatCount = -2
};
simcity.cToolPaletteUIHandler.prototype.ClearInfoPanel = function () {
if (this.mInfoLayout) {
var a = this.mInfoLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDLayerToggleContainer);
if (a && a.mChildren)
for (var b = a.mChildren.length, c = 0; c < b; ++c) {
var d = a.mChildren[c].FindControlByID(simcity.cLayerUIHandler.kBtnLayerToggleID);
d || a.mChildren[c].FindControlByID(186685937);
scrui.Assert(null !== d, "Invalid control structure found in layer buttons!");
null !== d && this.mLayerUIHandler.UnregisterLayerButton(d)
}
this.mInfoLayout.DestroyControl()
}
this.mInfoLayout = null;
this.mNewAlertItemsContainer && (this.mNewAlertItemsContainer.DestroyChildren(), this.mNewAlertItemsContainer = null);
this.mContextualInfoBodyTextWin = this.mContextualInfoHeaderTextWin = this.mNewContextualInfoContainer = null;
for (a = this.mLayerButtons.length - 1; 0 <= a; a--)
this.mLayerUIHandler.UnregisterLayerButton(this.mLayerButtons[a]), this.mLayerButtons[a].DestroyControl();
this.mLayerButtons = []
};
simcity.cToolPaletteUIHandler.prototype.LoadInfoPanel = function (a) {
this.ClearInfoPanel();
var b = this,
c = this.mEditorLayout.mIsVisible,
d = simcity.GetCategoryInfo(c ? a.instance : this.mSelectedCategoryButton.mUserData, c ? null : a.instance);
if (d) {
var e = c ? this.mEditorLayout.FindControlByID(simcity.cToolPaletteUIHandler.kWinInfoContainer) : this.mInfoContainer.FindControlByID(247767080);
this.mInfoLayout = gUIManager.LoadAndCacheLayout(d.categoryInfoLayout, e);
if (c)
this.mCategoryName = this.mEditorLayout.FindControlByID(simcity.cToolPaletteUIHandler.kTxtCategoryName),
simcity.ForceUpdateCategory(a.instance, c);
else {
this.mCategoryName = this.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kTxtCategoryName);
simcity.ForceUpdateCategory(a.instance, !0);
this.mSimIconWindow && (e = d.hasOwnProperty("simIcon"), this.mSimIconWindow.SetVisibility(e), e && this.mSimIconWindow.SetWindowImage(scrui.DecimalToHex(d.simIcon) + ".png"));
this.mHelpText && d.hasOwnProperty("helpText") && (this.mHelpText.SetLocaleText(new scrui.cLocaleString("PaletteInfoPanel", scrui.DecimalToHex(d.helpText))),
e = this.mHelpText.GetTextHeight(!1), e += 35, this.mHelpText.mParentControl.SetPosition(this.mHelpText.mParentControl.mLeft, -1 * e, this.mHelpText.mParentControl.mWidth, e));
(e = this.mInfoContainer.FindControlByID(247770860)) && e.SetSelected(!0);
this.mNewContextualInfoContainer = this.mInfoContainer.mParentControl.FindControlByID(simcity.cToolPaletteUIHandler.kWinNewContextualInfoContainer);
this.mNewContextualInfoContainer || (this.mNewContextualInfoContainer = gUIManager.FindControlByID(249888433));
this.mNewContextualInfoContainer &&
(this.mNewContextualInfoContainer.SetVisibility(!1), this.mNewAlertItemsContainer = this.mNewContextualInfoContainer.FindControlByID(simcity.cToolPaletteUIHandler.kWinAlertItemsContainer), this.mContextualInfoHeaderTextWin = this.mNewContextualInfoContainer.FindControlByID(229170960), this.mContextualInfoBodyTextWin = this.mNewContextualInfoContainer.FindControlByID(229170956), (e = this.mNewContextualInfoContainer.FindAnimationByID(230923108)) && e.Reset());
for (var f = d.heavyLayers.length, e = Array(f), g = 0; g < f; ++g) {
var h =
3 * g,
i = scrui.RequestStringFromKey(new simcity.cKey(1088479232, d.heavyLayers[g], scrui.kResourceTypePropertyList));
e[h] = scrui.BuildRequestQuery([simcity.kDataProperties, i, simcity.kPropertyLayerName]);
e[h + 1] = scrui.BuildRequestQuery([simcity.kDataProperties, i, simcity.kPropertyLayerIconKey]);
e[h + 2] = scrui.BuildRequestQuery([simcity.kDataProperties, i, simcity.kPropertyLayerDarkIconKey])
}
var j = this.mInfoContainer.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDLayerToggleContainer),
k = 0,
l = 0,
m = 0;
scrui.RequestGameData(e,
function (e) {
for (var g = f - 1; g >= 0; --g) {
var h = g * 3,
i = gUIManager.LoadAndCacheLayout("Layouts/Palette/PaletteLayerToggle2.js", j),
r = Math.floor(j.mWidth / i.mWidth);
b.mLayerButtons.push(i);
k = k + i.mWidth;
i.SetPosition(m * i.mWidth, l * i.mHeight);
++m;
if (m === r) {
++l;
m = 0
}
r = Number(d.heavyLayers[g]);
i.mUserData = r;
for (var s = i.FindControlByID(231251442).mExposedProperties, t = 0, u = s.length; t < u; ++t) {
var v = s[t],
x = scrui.cProperties.GetPropertyDataByID(v.mPropertyID);
switch (v.mPropertyLabel) {
case "WhiteIcon":
x.mSet(v.mControl, scrui.PathFromResourceKey(e[h +
1]));
break;
case "DarkIcon":
var w = e[h + 2];
w || (w = e[h + 1]);
x.mSet(v.mControl, scrui.PathFromResourceKey(w));
break;
case "TooltipText":
w = e[h];
w = "/" + scrui.DecimalToHex(w.tableID) + "/" + scrui.DecimalToHex(w.stringID);
x.mSet(v.mControl, w);
break;
case "UserData":
x.mSet(v.mControl, r)
}
}
b.mLayerUIHandler.RegisterLayerButton(i)
}
j && j.mParentControl.SetWidth(j.mParentControl.mWidth + k - j.mWidth);
simcity.ForceUpdateCategory(b.mSelectedCategoryButton ? b.mSelectedCategoryButton.mUserData : a.instance, c)
})
}
if (d.hasOwnProperty("categoryName")) {
if (this.mCategoryName =
c ? this.mEditorLayout.FindControlByID(simcity.cToolPaletteUIHandler.kTxtCategoryName) : this.mPanelLayout.FindControlByID(simcity.cToolPaletteUIHandler.kTxtCategoryName))
e = "ToolCategories", d.categoryText && (e = d.categoryText), this.mCategoryName.SetLocaleText(new scrui.cLocaleString(e, scrui.DecimalToHex(d.categoryName))), this.mCategoryName.SetVisibility(!0)
} else (this.mCategoryName = this.mEditorLayout.FindControlByID(simcity.cToolPaletteUIHandler.kTxtCategoryName)) && this.mCategoryName.SetVisibility(!1)
} else (this.mCategoryName =
gUIManager.FindControlByID(simcity.cToolPaletteUIHandler.kTxtCategoryName)) && this.mCategoryName.SetVisibility(!1)
};
simcity.SetTooltipHelper = function (a, b) {
if (a && b)
for (var c = a.mExposedProperties, d = 0, e = c.length; d < e; ++d) {
var f = c[d],
g = scrui.cProperties.GetPropertyDataByID(f.mPropertyID);
if (g)
switch (f.mPropertyLabel) {
case "TooltipText":
if (4294967295 !== b.tableID) {
var h = "/" + scrui.DecimalToHex(b.tableID) + "/" + scrui.DecimalToHex(b.stringID);
g.mSet(f.mControl, h)
}
break;
case "TooltipRawText":
simcity.DEBUG && g.mSet(f.mControl, scrui.TextFromLocaleProperty(b))
}
}
};
simcity.SetupCategoryButton = function (a, b) {
a.buttonIconNormal = b.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDCategoryIconNormal);
a.buttonIconNormalOn = b.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDCategoryIconNormalOn);
a.buttonIconCaution = b.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDCategoryIconCaution);
a.buttonIconCritical = b.FindControlByID(simcity.cToolPaletteUIHandler.kWinIDCategoryIconCritical);
a.alertLevel = simcity.kAlertLevelNormal
};
simcity.cToolPaletteUIHandler.prototype.LoadPalette = function (a) {
scrui.Assert(null !== this.mPanelContainer && null !== this.mCategoryContainer, "Expecting a parent control");
scrui.Client_ProfBegin("LoadPalette");
var b = gUIManager.FindControlByID(simcity.kWinDebugToolCategories),
c = this;
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, simcity.cToolPaletteUIHandler.kBtnIDCategoryButton, function (a) {
if (simcity.gGlobalUIHandler.mRegionCameraButton.mIsSelected)
a.SetSelected(!1);
else if (c.mSelectedCategoryButton !==
a) {
var b = a.GetParentLayout().FindControlByID(simcity.cToolPaletteUIHandler.kBtnIDCategoryButtonOn);
b && b.SetVisibility(!0);
a.SetVisibility(!1);
c.OpenToolPanelFromID(a.mUserData)
} else
a.SetSelected(!0)
});
simcity.gEventManager.AddEventListener(simcity.gEventTypes.MOUSEOVER, simcity.cToolPaletteUIHandler.kBtnIDCategoryButton, function (a) {
a = a.GetParentLayout();
a.Reparent(a.mParentControl)
});
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, simcity.cToolPaletteUIHandler.kBtnIDCategoryButtonOn,
function (a) {
c.mToolPanelOpen && (a.SetVisibility(!1), (a = a.GetParentLayout().FindControlByID(simcity.cToolPaletteUIHandler.kBtnIDCategoryButton)) && a.SetVisibility(!0), c.CloseToolPanel())
});
simcity.gEventManager.AddEventListener(simcity.gEventTypes.MOUSEOVER, simcity.cToolPaletteUIHandler.kBtnIDSelectTool, function (a) {
if (c.mToolPanelOpen) {
c.mRolloverButton = a;
c.UpdateRollover(!1);
var a = a.mUserData,
b = c.mRolloverButton.mMouseOverAnim;
b && !c.mToolUnlockInfoArray[a].isLocked && b.Start(scrui.cAnimation.kPlayForward);
c.mRolloverButton.mUnlockWindowContainer.SetVisibility(!1);
delete c.mNewlyUnlocked[a]
}
});
simcity.gEventManager.AddEventListener(simcity.gEventTypes.MOUSEOUT, simcity.cToolPaletteUIHandler.kBtnIDSelectTool, function (a) {
if (c.mToolPanelOpen) {
c.mRolloverButton = a;
var a = c.mRolloverButton.mUserData,
b = c.mRolloverButton.mMouseOverAnim;
b && (!c.mToolUnlockInfoArray[a] || !c.mToolUnlockInfoArray[a].isLocked) && b.Start(scrui.cAnimation.kPlayReverse);
c.mRolloverButton = null;
c.mRolloverLayout.SetVisibility(!1)
}
});
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK,
simcity.cToolPaletteUIHandler.kBtnSubCategory, function (a) {
if (c.mToolPanelOpen && a.mIsSelected) {
var b = new simcity.cKey;
b.group = c.mSubCategoryGroupID;
b.instance = a.mUserData;
scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataDeselectTool]));
c.mSelectedSubCategoryButton = a;
c.mCategoryData[c.mSelectedCategoryButton.mUserData].lastSubCategorySelected = b.instance;
c.LoadTools(b)
}
});
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, 247609078, function (a) {
if (c.mToolPanelOpen && (a = a.mUserData))
scrui.PostGameCommand(scrui.BuildCommand(["UpgradeTool",
a, simcity.kRuleIDSCPlayerRuleUpgradeBuilding])), c.mBeatCount = -5, c.mNeedsUpdated = !0
});
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, simcity.cToolPaletteUIHandler.kBtnIDSelectTool, function (a) {
c.SelectTool(a)
});
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, simcity.cToolPaletteUIHandler.kBtnExitEditor, function () {
c.CloseEditorPanel()
});
var a = new simcity.cKey(161790466, 1465331116),
d = scrui.RequestStringFromKey(a),
a = [scrui.BuildRequestQuery([simcity.kDataProperties, d,
simcity.kPropToolPaletteToolCategoryIDs]), scrui.BuildRequestQuery([simcity.kDataProperties, d, simcity.kPropToolPaletteCategoryOffsets]), scrui.BuildRequestQuery([simcity.kDataProperties, d, simcity.kPropToolPaletteCategoryIsDebug])];
scrui.RequestGameData(a, function (a) {
var f = a[0],
g = a[1],
h = a[2];
scrui.Assert(f, "categoryIDs not loaded properly from prop: " + d);
for (var i = f.length, a = Array(3 * i), j = 0; j < i; ++j) {
var k = f[j];
k.group = c.mCategoryGroupID;
k = scrui.RequestStringFromKey(k);
a[3 * j] = scrui.BuildRequestQuery([simcity.kDataProperties,
k, simcity.kPropToolCategoryName]);
a[3 * j + 1] = scrui.BuildRequestQuery([simcity.kDataProperties, k, simcity.kPropToolCategoryIconKeys]);
a[3 * j + 2] = scrui.BuildRequestQuery([simcity.kDataProperties, k, simcity.kPropToolCategoryLayerKey])
}
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, simcity.cToolPaletteUIHandler.kBtnIDRoadToolPageRight, function () {
var a = c.GetPanelLayout().FindControlByID(simcity.cToolPaletteUIHandler.kWinIDRoadToolButtonContainer),
b = a.mParentControl.mWidth;
a.mLeft + a.mWidth >
a.mParentControl.mWidth && (c.SetBuildingItemVisibilityForCurrentPage(!1), ++c.mPageIndex, c.SetBuildingItemVisibilityForCurrentPage(!0), c.UpdateScrollButtons(), a.SetPosition(a.mLeft - b, a.mTop, a.mWidth, a.mHeight))
});
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, simcity.cToolPaletteUIHandler.kBtnIDRoadToolPageLeft, function () {
var a = c.GetPanelLayout().FindControlByID(simcity.cToolPaletteUIHandler.kWinIDRoadToolButtonContainer),
b = a.mParentControl.mWidth;
0 > a.mLeft && (c.SetBuildingItemVisibilityForCurrentPage(!1),
--c.mPageIndex, c.SetBuildingItemVisibilityForCurrentPage(!0), c.UpdateScrollButtons(), a.SetPosition(a.mLeft + b, a.mTop, a.mWidth, a.mHeight))
});
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, simcity.cToolPaletteUIHandler.kBtnIDPageRight, function () {
var a = c.GetPanelLayout().FindControlByID(simcity.cToolPaletteUIHandler.kWinIDPalettePanel),
b = a.mParentControl.mWidth;
a.mLeft + a.mWidth > a.mParentControl.mWidth && (c.SetBuildingItemVisibilityForCurrentPage(!1), ++c.mPageIndex, c.SetBuildingItemVisibilityForCurrentPage(!0),
c.UpdateScrollButtons(), a.SetPosition(a.mLeft - b, a.mTop, a.mWidth, a.mHeight))
});
simcity.gEventManager.AddEventListener(simcity.gEventTypes.CLICK, simcity.cToolPaletteUIHandler.kBtnIDPageLeft, function () {
var a = c.GetPanelLayout().FindControlByID(simcity.cToolPaletteUIHandler.kWinIDPalettePanel),
b = a.mParentControl.mWidth;
0 > a.mLeft && (c.SetBuildingItemVisibilityForCurrentPage(!1), --c.mPageIndex, c.SetBuildingItemVisibilityForCurrentPage(!0), c.UpdateScrollButtons(), a.SetPosition(a.mLeft + b, a.mTop, a.mWidth, a.mHeight))
});
scrui.RequestGameData(a, function (a) {
for (var d = 0, e = 0, j = !1, k = 0; k < i; ++k) {
var o = f[k],
r = a[3 * k],
s = a[3 * k + 1],
t = a[3 * k + 2],
u = h[k];
if (!simcity.DEBUG && u)
break;
if (r) {
var v = null;
o.instance === simcity.kCategoryIDDemolish ? v = gUIManager.FindControlByID(244738929) : (v = gUIManager.LoadAndCacheLayout(u ? "Layouts/CategoryButtonDebug.js" : "Layouts/Palette/CategoryButtonWithIcon2.js", u ? b : c.mCategoryContainer), simcity.SetTooltipHelper(v, r));
var r = v.FindControlByID(simcity.cToolPaletteUIHandler.kBtnIDCategoryButton),
x = v.mHeight,
w = v.mWidth,
w = u ? 0 : k * w + d,
u = u ? e++ * x : 0;
v.SetPosition(w, u, v.mWidth, v.mHeight);
r.mUserData = o.instance;
simcity.SetupCategoryButton(r, v);
null !== s && (r.buttonIconNormal.SetWindowImage(scrui.PathFromResourceKey(s[0])), r.buttonIconCaution.SetWindowImage(scrui.PathFromResourceKey(s[1])), r.buttonIconCritical.SetWindowImage(scrui.PathFromResourceKey(s[3])), s = s[4] ? scrui.PathFromResourceKey(s[4]) : scrui.PathFromResourceKey(s[0]), r.buttonIconNormalOn.SetWindowImage(s));
c.mCategoryData[o.instance] = {
layer : t,
lastSubCategorySelected : 0
};
c.mCategoryButtonsMap[o.instance] = r;
j && ((j = v.FindControlByID(244289442)) && j.SetVisibility(!0), j = !1);
t = g[k];
0 < t && (j = !0);
d += t;
simcity.gGlobalUIHandler.mIsSpectatorMode && o.instance == simcity.kCategoryIDDisasters && v.SetVisibility(!1)
}
}
c.mIsPaletteLoaded = !0
})
});
scrui.Client_ProfEnd()
};
simcity.cToolPaletteUIHandler.prototype.SelectTool = function (a) {
if (this.mToolPanelOpen) {
var b = a.mUserData,
c = this.mToolUnlockInfoArray[b];
a.mIsSelected && c.isLocked ? a.SetSelected(!1) : simcity.gGlobalUIHandler.mToyTaskPanelUIHandler.ToolHasAPicker(b) ? (simcity.gGlobalUIHandler.mToyTaskPanelUIHandler.Start(b), a.SetSelected(!1)) : !0 === a.mIsSelected ? scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataSelectTool, b])) : scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataDeselectTool]))
}
};
simcity.cToolPaletteUIHandler.prototype.GetButtonFromCategory = function (a) {
return this.mCategoryButtonsMap[a]
};
simcity.cToolPaletteUIHandler.prototype.GetSubCategoryButton = function (a) {
if (this.mSubCategoryBtnsContainer && this.mSubCategoryBtnsContainer.mChildren)
for (var b = 0, c = this.mSubCategoryBtnsContainer.mChildren.length; b < c; ++b) {
var d = this.mSubCategoryBtnsContainer.mChildren[b].button;
if (d.mUserData === a)
return d
}
return null
};
simcity.cToolPaletteUIHandler.prototype.GetLayerToggleButton = function (a, b) {
for (var c = 0; c < this.mLayerUIHandler.mLayerButtons.length; c++) {
var d = this.mLayerUIHandler.mLayerButtons[c];
if (d.mUserData == a && !d.mAllLayersButton)
return d.FindControlByID(b)
}
return null
};
simcity.cToolPaletteUIHandler.prototype.CloseEditorPanel = function () {
this.mEditorLayout.SetVisibility(!1);
this.mEditorCategory = null;
this.mEditorIsOpen = this.mToolPanelOpen = !1;
this.mToolKeys = null;
this.mNeedsUpdated = !1;
null !== this.mEditedBuildingRefString && (this.mEditedBuildingRefString = null, scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandExitBuildingEditor])), gUIManager.FindAnimationByID(210343216).Start(scrui.cAnimation.kPlayReverse));
this.SetCategoryToOpen();
simcity.gGlobalUIHandler.mBoundaryUIHandler.SetVisibility(!0);
this.mRolloverLayout.SetVisibility(!1);
this.mRolloverButton = null
};
simcity.cToolPaletteUIHandler.prototype.OpenEditorPanel = function (a, b, c, d) {
this.mEditorCategory = a;
this.CloseToolPanel(!0);
simcity.gGlobalUIHandler.mToyTaskPanelUIHandler.SetVisible(!1);
simcity.gGlobalUIHandler.mBoundaryUIHandler.SetVisibility(!1);
this.mEditedBuildingRefString = scrui.RequestStringFromUnitRef(d);
b = new simcity.cKey;
b.group = this.mCategoryGroupID;
b.instance = c;
this.mEditorKeyString = scrui.RequestStringFromKey(b);
var b = scrui.BuildRequestQuery([simcity.kDataUnits, this.mEditedBuildingRefString,
simcity.kDataUnitName]),
c = scrui.BuildRequestQuery([simcity.kDataUIToolCategory, c, simcity.kPropToolCategoryToolList]),
e = this;
scrui.RequestGameData([b, c], function (b) {
e.mEditorLayout.SetVisibility(!0);
var c = e.mEditorLayout.FindControlByID(231511931);
b[0] && c.SetLocaleText(scrui.LocaleStringFromLocaleProperty(b[0]));
c = b[1];
e.mToolKeys = b[1];
e.LoadToolsHelper(null, c);
b = new simcity.cKey;
b.group = e.mCategoryGroupID;
b.instance = a;
e.LoadInfoPanel(b);
e.mNeedsUpdated = !0;
e.mBeatCount = -2
});
this.mNeedsUpdated = this.mEditorIsOpen =
this.mToolPanelOpen = !0;
this.mBeatCount = -2;
gUIManager.FindAnimationByID(210343216).Start(scrui.cAnimation.kPlayForward)
};
simcity.cToolPaletteUIHandler.prototype.OpenToolPanelHelper = function (a) {
this.mCitySpecializationModeActive ? (this.mLastSelectedMainCategoryID = a, a = simcity.gGlobalUIHandler.mReturnToCityButton, a.SetSelected(!0), this.HandleUIMessage(scrui.kMsgTypeButtonClicked, simcity.kBtnReturnToCity, a)) : this.OpenToolPanelFromID(a)
};
simcity.cToolPaletteUIHandler.prototype.OpenToolPanelFromID = function (a) {
this.mCitySpecializationModeActive ? this.mLastSelectedCitySpecializationID = a === simcity.kCategoryIDDemolish ? 0 : a : this.mLastSelectedMainCategoryID = a === simcity.kCategoryIDDemolish ? 0 : a;
this.mModeSwap = !1;
(a = this.mCategoryButtonsMap[a]) && this.OpenToolPanel(a)
};
simcity.AutoSizeHelpText = function (a) {
if (a) {
var b = a.mIsVisible;
a.SetVisibility(!0);
var c = a.GetTextHeight(!1),
c = c + 30;
a.mParentControl.SetPosition(a.mParentControl.mLeft, -1 * c, a.mParentControl.mWidth, c);
a.SetVisibility(b)
}
};
simcity.cToolPaletteUIHandler.prototype.OpenToolPanel = function (a) {
this.SetCategoryButtonsState(a);
var b = a.mUserData,
c = new simcity.cKey;
c.group = a.mCitySpecialization ? simcity.kCitySpecializationGroupID : this.mCategoryGroupID;
c.instance = b;
this.LoadRootToolPanel(c);
this.mRevealAnim.Start(scrui.cAnimation.kPlayForward);
!0 === this.mIsSubPanel && ((a = gUIManager.FindAnimationByID(simcity.cToolPaletteUIHandler.kWinLegendShift)) && a.Start(scrui.cAnimation.kPlayForward), this.mIsLegendShifted = !0);
this.mNeedsUpdated =
this.mToolPanelOpen = !0;
simcity.gGlobalUIHandler.mRegionViewUIHandler.SetStartingRegionPanel(b);
this.mBeatCount = -2;
b === simcity.kCategoryIDDemolish && scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataSelectTool, simcity.cToolPaletteUIHandler.kToolIDBulldozer]))
};
simcity.cToolPaletteUIHandler.prototype.CloseToolPanel = function (a, b) {
!this.mModeSwap && !a && (this.mCitySpecializationModeActive ? this.mLastSelectedCitySpecializationID = 0 : this.mLastSelectedMainCategoryID = 0);
this.mToolPanelOpen = this.mHasLockedTool = this.mHasProgressBarTool = !1;
this.ClearPanel();
this.SetCategoryButtonsState(null);
this.mRevealAnim.Start(scrui.cAnimation.kPlayReverse);
this.mToolKeys = null;
this.mNeedsUpdated = !1;
if (!0 === this.mIsLegendShifted) {
var c = gUIManager.FindAnimationByID(simcity.cToolPaletteUIHandler.kWinLegendShift);
c && c.Start(scrui.cAnimation.kPlayReverse);
this.mIsLegendShifted = !1
}
this.mRolloverButton = null;
this.mRolloverLayout.SetVisibility(!1);
a || simcity.gGlobalUIHandler.mRegionViewUIHandler.SetStartingRegionPanel(null);
b || scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataDeselectTool]))
};
simcity.cToolPaletteUIHandler.prototype.SetCategoryButtonsState = function (a) {
this.mSelectedSubCategoryButton = null;
if (a !== this.mSelectedCategoryButton) {
if (null !== this.mSelectedCategoryButton) {
if (null !== this.mSelectedSubCategoryLayer)
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandToggleLayer, this.mSelectedSubCategoryLayer, !1])), this.mSelectedSubCategoryLayer = null;
else {
var b = this.mCategoryData[this.mSelectedCategoryButton.mUserData].layer;
null !== b && (this.mCurrentLightLayer = 0, scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandToggleLayer,
b.instance, !1])))
}
this.mPanelLayout && this.mPanelLayout.SetVisibility(!1);
this.mSelectedCategoryButton.SetSelected(!1);
this.mSelectedCategoryButton = null;
!0 === this.mIsLegendShifted && ((b = gUIManager.FindAnimationByID(simcity.cToolPaletteUIHandler.kWinLegendShift)) && b.Start(scrui.cAnimation.kPlayReverse), this.mIsLegendShifted = !1)
}
if (null !== a && (b = this.mCategoryData[a.mUserData].layer, null !== b && (scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandToggleLayer, b.instance, !0])), this.mCurrentLightLayer =
b.instance), simcity.SendSoundEvent(simcity.audio.kGlobalSoundObjectID, simcity.audio.kInstanceUICategorySwitch), this.mSelectedCategoryButton = a, this.mSelectedCategoryButton.SetSelected(!0), this.mPanelLayout && this.mSubCategoryBtnsContainer))
simcity.gGlobalUIHandler.RemoveFromBeatUpdate(this.mSubCategoryBtnsContainer), this.mSubCategoryBtnsContainer.DestroyChildren()
} else
this.mSelectedCategoryButton && !this.mSelectedCategoryButton.mIsSelected && this.mSelectedCategoryButton.SetSelected(!0)
};
simcity.cToolPaletteUIHandler.prototype.SetActiveToolButton = function (a) {
null !== this.mSelectedToolButton && this.mSelectedToolButton.SetSelected(!1);
(this.mSelectedToolButton = a) && this.mSelectedToolButton.SetSelected(!0)
};
simcity.cToolPaletteUIHandler.prototype.GetBulldozerButton = function () {
return this.mCategoryButtonsMap[simcity.kCategoryIDDemolish]
};
simcity.cToolPaletteUIHandler.prototype.HandleTriggerKey = function (a) {
if (!simcity.gGlobalUIHandler.mRegionViewUIHandler.IsVisible() && !simcity.IsTutorialInProgress() && !simcity.IsOptionMenuVisible() && !simcity.IsMouseEatingWindowVisible()) {
switch (a) {
case simcity.cToolPaletteUIHandler.kKeyTriggerDrawStraight:
this.HandleKeyRoadDraw(simcity.cToolPaletteUIHandler.kBtnDrawStraight, simcity.cToolPaletteUIHandler.kRoadTypeStraight);
break;
case simcity.cToolPaletteUIHandler.kKeyTriggerDrawCircle:
this.HandleKeyRoadDraw(simcity.cToolPaletteUIHandler.kBtnDrawCircle,
simcity.cToolPaletteUIHandler.kRoadTypeCircle);
break;
case simcity.cToolPaletteUIHandler.kKeyTriggerDrawCurvy:
this.HandleKeyRoadDraw(simcity.cToolPaletteUIHandler.kBtnDrawCurvy, simcity.cToolPaletteUIHandler.kRoadTypeCurvy);
break;
case simcity.cToolPaletteUIHandler.kKeyTriggerDrawRectangle:
this.HandleKeyRoadDraw(simcity.cToolPaletteUIHandler.kBtnDrawGrid, simcity.cToolPaletteUIHandler.kRoadTypeGrid);
break;
case simcity.cToolPaletteUIHandler.kKeyTriggerDrawArc:
this.HandleKeyRoadDraw(simcity.cToolPaletteUIHandler.kBtnDrawArc,
simcity.cToolPaletteUIHandler.kRoadTypeArc);
break;
case simcity.cToolPaletteUIHandler.kKeyTriggerRoadUpgrade:
this.HandleKeyRoadSelector();
break;
case simcity.cToolPaletteUIHandler.kKeyTriggerEditorDemolish:
if (this.mEditorIsOpen) {
var b = this.mEditorLayout.FindControlByID(241884167);
if (b) {
var c = b.GetAbsolutePosition();
b.Private_OnClick(c[0], c[1])
}
}
}
if (!this.mEditorIsOpen)
if (b = {
251030870 : simcity.kCategoryIDDemolish,
251030874 : simcity.kCategoryIDTransport,
251030879 : simcity.kCategoryIDPower,
251030884 : simcity.kCategoryIDWater,
251030889 : simcity.kCategoryIDSewage,
251030893 : simcity.kCategoryIDGarbage,
251030898 : simcity.kCategoryIDCivic,
251043418 : simcity.kCategoryIDFire,
251043423 : simcity.kCategoryIDHealth,
251043427 : simcity.kCategoryIDPolice,
251043431 : simcity.kCategoryIDEducation,
251043435 : simcity.kCategoryIDMassTransit,
251043439 : simcity.kCategoryIDTourism,
252069935 : simcity.kCategoryIDDisasters
}, b.hasOwnProperty(a))
a = b[a], this.mSelectedCategoryButton && this.mSelectedCategoryButton.mUserData == a ? this.CloseToolPanel() : this.OpenToolPanelHelper(a);
else
switch (a) {
case simcity.cToolPaletteUIHandler.kKeyTriggerBigBusinessPanel:
a = simcity.gGlobalUIHandler.mCitySpecializationButton;
a.SetSelected(!0);
this.HandleUIMessage(scrui.kMsgTypeButtonClicked, simcity.kBtnIDCitySpecialization, a);
break;
case simcity.cToolPaletteUIHandler.kKeyTriggerZoneResidential:
this.HandleKeyShortCut(1);
break;
case simcity.cToolPaletteUIHandler.kKeyTriggerZoneCommercial:
this.HandleKeyShortCut(2);
break;
case simcity.cToolPaletteUIHandler.kKeyTriggerZoneIndustrial:
this.HandleKeyShortCut(3);
break;
case simcity.cToolPaletteUIHandler.kKeyTriggerZoneUnzone:
this.HandleKeyShortCut(0)
}
}
};
simcity.cToolPaletteUIHandler.prototype.HandleKeyShortCut = function (a) {
this.mSelectedCategoryButton && this.mSelectedCategoryButton.mUserData === simcity.kCategoryIDZones ? (this.mToolButtons[a].SetSelected(!0), this.SelectTool(this.mToolButtons[a])) : (this.mKeyShortcutIx = a, this.OpenToolPanelHelper(simcity.kCategoryIDZones))
};
simcity.cToolPaletteUIHandler.prototype.HandleKeyRoadDraw = function (a, b) {
if (this.GetPanelLayout()) {
var c = this.GetPanelLayout().FindControlByID(239814192);
if (c && c.GetAbsoluteVisibility()) {
var d = 0,
d = this.mEditorLayout.mIsVisible ? this.mLastEditorUsedRoadControlID : this.mLastUsedRoadControlID;
d != a && ((d = c.FindControlByID(d)) && d.SetSelected(!1), c = c.FindControlByID(a), this.mEditorLayout.mIsVisible ? this.mLastEditorUsedRoadControlID = a : this.mLastUsedRoadControlID = a, scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandRoadDrawType,
b])), c.SetSelected(!0))
}
}
};
simcity.cToolPaletteUIHandler.prototype.HandleKeyRoadSelector = function () {
if (this.GetPanelLayout()) {
var a = this.GetPanelLayout().FindControlByID(239814192);
if (a && a.GetAbsoluteVisibility() && (a = a.FindControlByID(simcity.cToolPaletteUIHandler.kBtnRoadSelector)) && a.GetAbsoluteVisibility() && this.mSelectedToolButton !== a)
a.SetSelected(!0), scrui.PostGameCommand(scrui.BuildCommand([simcity.kDataSelectTool, simcity.cToolPaletteUIHandler.kToolIDPathSelector]))
}
};
simcity.ForceRCIActive = function (a) {
var b = simcity.gGlobalUIHandler.mToolPaletteUIHandler;
-1 !== b.mKeyShortcutIx && a.animation.mPlayDirection === scrui.cAnimation.kPlayForward && (b.mToolButtons[b.mKeyShortcutIx].SetSelected(!0), b.SelectTool(b.mToolButtons[b.mKeyShortcutIx]), b.mKeyShortcutIx = -1)
};
simcity.cToolPaletteUIHandler.prototype.CycleHeavyLayer = function () {
if (this.mToolPanelOpen && 0 !== this.mLayerButtons.length) {
var a = this.mLayerUIHandler.GetCurrentActiveLayer();
if (a)
for (var b = 0; b < this.mLayerButtons.length; b++)
if (this.mLayerButtons[b].mUserData == a) {
b + 1 < this.mLayerButtons.length ? this.mLayerUIHandler.ActivateLayer(this.mLayerButtons[b + 1].mUserData) : this.mLayerUIHandler.ActivateLayer(this.mLayerButtons[0].mUserData);
return
}
this.mLayerUIHandler.ActivateLayer(this.mLayerButtons[0].mUserData)
}
};
simcity.databindings.DataBindingsPaletteRollover = {};
simcity.PaletteRolloverName = {
dynamic : !1,
controlID : simcity.cToolPaletteUIHandler.kTxtPaletteRolloverName,
queries : function (a) {
return {
name : [simcity.kDataTools, a, simcity.kDataName]
}
},
action : function (a, b, c) {
b.SetLocaleText(scrui.LocaleStringFromLocaleProperty(c.name))
}
};
simcity.PaletteRolloverDescription = {
dynamic : !1,
controlID : simcity.cToolPaletteUIHandler.kTxtPaletteRolloverDescription,
allowNullResults : !0,
queries : function (a) {
return {
description : [simcity.kDataTools, a, "description"],
lockedDescription : [simcity.kDataTools, a, "lockedDescription"]
}
},
action : function (a, b, c) {
null != c.lockedDescription && 4294967295 != c.lockedDescription.stringID ? b.SetLocaleText(scrui.LocaleStringFromLocaleProperty(c.lockedDescription)) : b.SetLocaleText(scrui.LocaleStringFromLocaleProperty(c.description))
}
};
simcity.PaletteRolloverMoreInfo = {
dynamic : !1,
controlID : simcity.cToolPaletteUIHandler.kWinPaletteRolloverMoreInfoContainer,
allowNullResults : !0,
queries : function (a) {
return {
moreInfoStrings : [simcity.kDataTools, a, "toolMoreInfo"]
}
},
action : function (a, b, c) {
var d = c.moreInfoStrings ? c.moreInfoStrings.length : 0;
b.SetVisibility(0 < d);
if (0 < d) {
b.SetHeight(b.mHeight * d);
for (var e = 0, f = b.mChildren.length; e < f; ++e) {
var g = b.FindControlByID(246544E3 + e);
g.SetVisibility(e < d);
if (e < d) {
var h = g.FindControlByID(246546704 + e);
if (h) {
var g =
c.moreInfoStrings[e],
i = scrui.LocaleStringFromLocaleProperty(g.text),
j = g.type;
simcity.IsFormattableType(j) ? (j = simcity.FormatLargeNumberByType(g.token, j), h.SetLocaleText(i, {
amount : j.number,
exponent : j.exponent
})) : h.SetLocaleText(i, {
amount : g.token
});
switch (g.text.stringID) {
case 241717119:
case 241717103:
case 241717087:
h = a.FindControlByID(253033008),
h.SetVisibility(!0),
h.FindAnimationByID(253138655).PlayToKeyFrame(g.text.stringID)
}
}
}
}
}
}
};
simcity.PaletteRolloverRegionalBenefits = {
dynamic : !1,
controlID : simcity.cToolPaletteUIHandler.kWinContainerRolloverRegionalBenefitDescription,
allowNullResults : !0,
queries : function (a) {
return {
regionalBenefitDescription : [simcity.kDataTools, a, "regionalBenefitDescription"],
isLocked : [simcity.kDataTools, a, "isLocked"]
}
},
action : function (a, b, c) {
null != c.regionalBenefitDescription && 4294967295 != c.regionalBenefitDescription.stringID ? (b.SetVisibility(!0), a = b.FindControlByID(simcity.cToolPaletteUIHandler.kTxtIDRolloverRegionalBenefitDescription),
a.SetLocaleText(scrui.LocaleStringFromLocaleProperty(c.regionalBenefitDescription)), a.mParentControl.SetWidth(a.GetTextWidth() + 10)) : b.SetVisibility(!1)
}
};
simcity.kUpgradePopulationFudgingIDs = [2186398481];
simcity.kUnitAttachedUITypeIDMansion = 2154380328;
simcity.PaletteRolloverLockedCriteria = {
dynamic : !0,
controlID : simcity.cToolPaletteUIHandler.kWinPaletteRolloverLockedBackground,
allowNullResults : !0,
mLocalToolID : 0,
queries : function (a) {
this.mLocalToolID = a;
return {
unlockBinCurrentValues : [simcity.kDataTools, a, "toolBinValues"],
unlockTargetAmount : [simcity.kDataTools, a, simcity.kDataProperties, simcity.kPropToolUnlockTargetAmount],
unlockString : [simcity.kDataTools, a, simcity.kDataProperties, simcity.kPropToolUnlockString],
unlockConversionType : [simcity.kDataTools,
a, simcity.kDataProperties, simcity.kPropToolUnlockConversionType],
isLockedByAchievement : [simcity.kDataTools, a, "isLockedByAchievement"],
upgradeDescription : [simcity.kDataTools, a, "upgradeDescription"],
upgradeConversionType : [simcity.kDataTools, a, simcity.kDataProperties, simcity.kPropscToolUpgradeConversionType],
upgradeString : [simcity.kDataTools, a, simcity.kDataProperties, simcity.kPropToolUpgradeString],
upgradeImage : [simcity.kDataTools, a, simcity.kDataProperties, simcity.kPropToolUnlockImage],
mansionTarget : [simcity.kDataCachedUnits,
simcity.kUnitAttachedUITypeIDMansion, simcity.kDataBinAmount, simcity.kResourceIDMansionUpgradeTarget],
toolInfo : [simcity.kDataTools, a, simcity.kDataToolInfo]
}
},
action : function (a, b, c) {
var d = simcity.gGlobalUIHandler.mToolPaletteUIHandler,
e = d.GetButtonFromToolID(this.mLocalToolID);
this.mContainerWindow = a.FindControlByID(simcity.cToolPaletteUIHandler.kWinPaletteRolloverLockedBackground);
this.mContainerWindow.mHeight = 0;
var f = a.FindControlByID(246655021);
f && (c.toolInfo.isRoadTool ? f.SetVisibility(!0) : f.SetVisibility(!1));
if (-1 != c.toolInfo.amountForUpgrade && -1 != c.toolInfo.amountTowardsUpgrade) {
this.mUnlockLayouts = [];
this.mUnlockLayouts[0] = gUIManager.LoadAndCacheLayout("Layouts/Palette/PaletteRolloverUpgradeItem.js", this.mContainerWindow);
this.mContainerWindow.mHeight = this.mUnlockLayouts[0].mHeight;
d = this.mUnlockLayouts[0];
c.upgradeImage && d.FindControlByID(simcity.cToolPaletteUIHandler.kWinUpgradeImage).SetWindowImage(scrui.PathFromResourceKey(c.upgradeImage));
var b = d.FindControlByID(simcity.cToolPaletteUIHandler.kWinUpgradeApproved),
g = d.FindControlByID(simcity.cToolPaletteUIHandler.kWinUpgradeProgress),
e = d.FindControlByID(simcity.cToolPaletteUIHandler.kWinUpgradeMaxedGroup);
if (-1 == c.toolInfo.upgradeAvailable)
b.SetVisibility(!1), g.SetVisibility(!1), e.SetVisibility(!0);
else if (c.toolInfo.upgradeAvailable || c.toolInfo.amountTowardsUpgrade >= c.toolInfo.amountForUpgrade)
d.FindControlByID(simcity.cToolPaletteUIHandler.kWinUpgradeText).SetLocaleText(scrui.LocaleStringFromLocaleProperty(c.upgradeString)), b.SetVisibility(!0), g.SetVisibility(!1),
e.SetVisibility(!1);
else if (c.toolInfo.amountTowardsUpgrade < c.toolInfo.amountForUpgrade) {
g.SetVisibility(!0);
b.SetVisibility(!1);
e.SetVisibility(!1);
b = d.FindControlByID(simcity.cToolPaletteUIHandler.kWinUpgradeProgressGroup);
f = d.FindControlByID(simcity.cToolPaletteUIHandler.kWinUpgradeProgressBar);
f.SetPosition(f.mLeft, f.mTop, b.mWidth * (c.toolInfo.amountTowardsUpgrade / c.toolInfo.amountForUpgrade), f.mHeight);
d = d.FindControlByID(simcity.cToolPaletteUIHandler.kWinUpgradeSubtitle);
e = c.toolInfo.amountTowardsUpgrade;
b = c.toolInfo.amountForUpgrade;
-1 != simcity.kUpgradePopulationFudgingIDs.indexOf(this.mLocalToolID) && (e = simcity.GetFudgedPopulation(e), b = simcity.GetRoundedFudgedPopulation(b));
var h = "";
c.upgradeConversionType && simcity.IsFormattableType(c.upgradeConversionType.instance) && (e = simcity.FormatLargeNumberByType(e, c.upgradeConversionType.instance), g = simcity.FormatLargeNumberByType(b, c.upgradeConversionType.instance), e = e.number, b = g.number, h = g.exponent);
c.mansionTarget ? d.SetLocaleText(scrui.LocaleStringFromLocaleProperty(c.upgradeDescription), {
amount : e,
capacity : b,
target : c.mansionTarget
}) : d.SetLocaleText(scrui.LocaleStringFromLocaleProperty(c.upgradeDescription), {
amount : e,
capacity : b
})
}
a.FindControlByID(simcity.cToolPaletteUIHandler.kWinPaletteRolloverLockedText).SetVisibility(!1)
} else if (e && e.mUnlockWindowContainer && (e = e.mUnlockWindowContainer, g = !1, e && (g = e.mIsVisible, e.SetVisibility(!1))), d = d.IsToolLockedByAchievement(c.toolInfo.achievementLock), (g || c.toolInfo.isLocked || d) && null != c.unlockTargetAmount && null != c.unlockBinCurrentValues) {
var i =
"defaultLockedDescription";
this.mUnlockLayouts = [];
for (e = g = b = this.mUnlockCount = 0; e < c.unlockString.length; e++) {
this.mUnlockLayouts[this.mUnlockCount] = gUIManager.LoadAndCacheLayout("Layouts/Palette/ToolProgressBar.js", this.mContainerWindow);
var f = scrui.LocaleStringFromLocaleProperty(c.unlockString[e]),
j = new scrui.cLocaleString(f.mTableID, f.mStringID),
f = this.mUnlockLayouts[this.mUnlockCount].FindControlByID(simcity.cMissionUI.kWinProgressBarObjective),
k = this.mUnlockLayouts[this.mUnlockCount].FindControlByID(202394872),
l = c.unlockBinCurrentValues[e].amount < c.unlockTargetAmount[e] ? c.unlockBinCurrentValues[e].amount : c.unlockTargetAmount[e],
m = c.unlockTargetAmount[e],
h = "";
if (c.unlockConversionType)
if (3469784512 === c.unlockConversionType[e].instance)
l = simcity.GetFudgedPopulation(l), m = simcity.GetRoundedFudgedPopulation(m);
else
var l = simcity.FormatLargeNumberByType(l, c.unlockConversionType[e].instance).number, n = simcity.FormatLargeNumberByType(m, c.unlockConversionType[e].instance), m = n.number, h = n.exponent;
j.LoadString(function () {
i =
j.GetText({
unlockValue : m,
currentValue : l,
exponent : h
})
});
n = l / m;
1 <= n && !d && (n = 1, k.SetVisibility(!0));
f.mParentControl.SetVisibility(3 <= c.unlockTargetAmount[e] && !d);
f && (f.mParentControl.SetWidth(1.42 * a.mWidth), scrui.SetProgressBarWidth(f, n));
f = this.mUnlockLayouts[this.mUnlockCount].FindControlByID(simcity.cMissionUI.kTextObjective);
f.SetRawText(i);
k = f.GetTextHeight() + 5;
f.mParentControl.SetPosition(f.mParentControl.mLeft, f.mParentControl.mTop, f.mParentControl.mWidth, k);
this.mUnlockLayouts[this.mUnlockCount].SetPosition(0,
this.mUnlockCount * b);
b = this.mUnlockLayouts[this.mUnlockCount].mHeight;
g += b;
this.mUnlockCount++
}
this.mContainerWindow.mHeight = g
} else
b.SetVisibility(!1)
}
};
simcity.PaletteRolloverCost = {
dynamic : !1,
controlID : simcity.cToolPaletteUIHandler.kTxtPaletteRolloverCost,
queries : function (a) {
return {
cost : [simcity.kDataTools, a, "paletterollovercost"],
editorActive : [simcity.kDataEditor, simcity.kDataEnabled],
simoleons : [simcity.kDataBins, simcity.kResourceIDSimoleons]
}
},
action : function (a, b, c) {
a = c.cost ? c.cost : 0;
0 < a ? (b.UpdateLocaleText({
cost : a
}), c.cost >= c.simoleons.amount ? b.SetTextColor("red") : b.SetTextColor("#265e94")) : 0 === a ? b.SetLocaleText(new scrui.cLocaleString("PaletteToolRollovers.json",
"0x0d96b40b", "PLACEHOLDER TEXT")) : -1 === a && b.SetLocaleText(new scrui.cLocaleString("PaletteToolRollovers.json", "0x0eb1f03b", "PLACEHOLDER TEXT"))
}
};
simcity.PaletteRolloverMaintenanceCost = {
dynamic : !1,
controlID : simcity.cToolPaletteUIHandler.kTxtPaletteRolloverUpkeep,
allowNullResults : !0,
queries : function (a) {
return {
income : [simcity.kDataBins, simcity.kResourceIDIncome],
expenses : [simcity.kDataBins, simcity.kResourceIDExpenses],
maintenance : [simcity.kDataTools, a, "secondaryUnitProperties", simcity.kPropSCUnitMaintenanceCost]
}
},
action : function (a, b, c) {
a = a.FindControlByID(238175217);
null !== c.maintenance ? 0 === c.maintenance ? b.SetLocaleText(new scrui.cLocaleString("PaletteToolRollovers.json",
"0x0d96b40c", "PLACEHOLDER TEXT")) : (b.SetVisibility(!0), b.mParentControl.SetVisibility(!0), b.UpdateLocaleText({
maintenance : c.maintenance
})) : (b.SetVisibility(!1), b.mParentControl.SetVisibility(!1), a.SetVisibility(!1))
}
};
simcity.PaletteRolloverMarqueeImage = {
dynamic : !0,
controlID : simcity.cToolPaletteUIHandler.kWinPaletteRolloverMarqueeImage,
allowNullResults : !0,
queries : function (a) {
return {
image : [simcity.kDataTools, a, simcity.kDataProperties, simcity.kPropToolMarqueeImage],
toolCount : [simcity.kDataTools, a, "toolCountUsed"],
isLocked : [simcity.kDataTools, a, "isLocked"],
toolInfo : [simcity.kDataTools, a, simcity.kDataToolInfo]
}
},
action : function (a, b, c) {
var d = simcity.gGlobalUIHandler.mToolPaletteUIHandler.IsToolLockedByAchievement(c.toolInfo.achievementLock);
c.image && (d ? b.SetWindowImage("KillBug.png") : b.SetWindowImage(scrui.PathFromResourceKey(c.image)));
b = c.toolCount.toolCountLimit;
d = c.toolCount.toolCountShared;
c.toolCount.toolIsHQReliant && (b = c.toolCount.toolIndividualLimit, d = c.toolCount.toolCountUsed);
if (0 != b && d <= b) {
var e = a.FindControlByID(simcity.kWinModulesFree),
a = a.FindControlByID(simcity.kTextModulesFree);
e && a && (e.SetVisibility(!c.isLocked), a.SetRawText(b - d))
} else
a.FindControlByID(simcity.kWinModulesFree).SetVisibility(!1)
}
};
var kKeySmallLayout = 1846755610, kKeyMediumLayout = 2849147824, kKeyLargeLayout = 4284352190;
simcity.PaletteRolloverLayoutSize = {
dynamic : !1,
allowNullResults : !0,
queries : function (a) {
return {
isLocked : [simcity.kDataTools, a, "isLocked"]
}
},
action : function (a) {
a.SetWidth(1.5 * a.mWidth);
a.SetHeight(1.5 * a.mHeight)
}
};
simcity.kPaletteRolloverDataBindings = [simcity.PaletteRolloverName, simcity.PaletteRolloverDescription, simcity.PaletteRolloverMoreInfo, simcity.PaletteRolloverRegionalBenefits, simcity.PaletteRolloverLockedCriteria, simcity.PaletteRolloverCost, simcity.PaletteRolloverMaintenanceCost, simcity.PaletteRolloverMarqueeImage, simcity.PaletteRolloverLayoutSize];
simcity.databindings.DataBindingsTicker = {};
simcity.TickerCategories = {
kGeneric0 : {
popOut : 3826500308,
popoutsound : 711277662,
color : "#be7000",
blink : !0
},
kGeneric1 : {
popOut : 608491202,
popoutsound : 432147147,
color : "#265e94",
blink : !1
},
kGeneric2 : {
popOut : 2520413864,
popoutsound : 432147147,
color : "#265e94",
blink : !1
},
kGeneric3 : {
popOut : 2637923960,
popoutsound : 432147147,
color : "#265e94",
blink : !1
},
kGeneric4 : {
popOut : 3156693456,
popoutsound : 432147147,
color : "#265e94",
blink : !1
},
kGeneric5 : {
popOut : 597541823,
popoutsound : 432147147,
color : "#265e94",
blink : !1
},
kGeneric6 : {
color : "#265e94",
blink : !1
},
kGeneric7 : {
color : "#ba2616",
blink : !1
},
kGeneric8 : {
popOut : 2637923960,
color : "#265e94",
blink : !1
},
kGeneric9 : {
popOut : 2637923960,
color : "#ba2616",
blink : !0
},
kGeneric10 : {
popOut : 3156693456,
color : "#265e94",
blink : !1
},
kGeneric11 : {
popOut : 4088429864,
popoutsound : 2920163307,
color : "#265e94",
blink : !1
},
kGeneric12 : {
popOut : 4088429865,
popoutsound : 2920163307,
color : "#00a700",
blink : !0
},
kGeneric13 : {
popOut : 995543781,
color : "#be7000",
blink : !1
},
kGeneric14 : {
popOut : 995543781,
popoutsound : 711277662,
color : "#265e94",
blink : !1
},
kGeneric15 : {
popOut : 3247900340,
popoutsound : 711277662,
color : "#265e94",
blink : !1
},
kGeneric16 : {
popOut : 3051065891,
popoutsound : 2988507092,
color : "#be7000",
blink : !1
},
kGeneric17 : {
popOut : 3051065891,
popoutsound : 711277662,
color : "#265e94",
blink : !1
},
kGeneric18 : {
popOut : 505280647,
popoutsound : 711277662,
color : "#265e94",
blink : !1
},
kGeneric19 : {
popOut : 505280647,
popoutsound : 2497209459,
color : "#be7000",
blink : !1
},
kGeneric20 : {
popOut : 3167787360,
popoutsound : 2497209459,
extension : 445441141,
color : "#265e94",
blink : !0
},
kGeneric21 : {
popOut : 4079394120,
popoutsound : 2497209459,
color : "#265e94",
blink : !0
},
kGeneric22 : {
popOut : 1565890522,
popoutsound : 2497209459,
color : "#265e94",
blink : !0
},
kGeneric23 : {
popOut : 4155948883,
color : "#ba2616",
blink : !0
},
kGeneric24 : {
popOut : 283783434,
popoutsound : 2497209459,
extension : 445441141,
color : "#265e94",
blink : !0
},
kGeneric25 : {
popOut : 2806233011,
popoutsound : 2497209459,
extension : 445441141,
color : "#265e94",
blink : !0
},
kGeneric26 : {
popOut : 2229669014,
popoutsound : 2497209459,
extension : 445441141,
color : "#265e94",
blink : !0
},
kGeneric27 : {
popOut : 568671253,
popoutsound : 2497209459,
extension : 445441141,
color : "#265e94",
blink : !0
},
kGeneric28 : {
popOut : 702837965,
popoutsound : 2497209459,
extension : 445441141,
color : "#265e94",
blink : !0
},
kGeneric29 : {
popOut : 4088429868,
popoutsound : 2920163307,
color : "#0000ff",
blink : !1
},
kGeneric30 : {
popOut : 4088429870,
popoutsound : 2920163307,
color : "#0000ff",
blink : !1
},
kGeneric31 : {
popOut : 4088429866,
popoutsound : 2920163307,
color : "#0000ff",
blink : !1
},
kGeneric32 : {
popOut : 4088429869,
popoutsound : 2920163307,
color : "#0000ff",
blink : !1
},
kGeneric33 : {
popOut : 4088429865,
popoutsound : 2920163307,
color : "#0000ff",
blink : !1
},
kGeneric34 : {
popOut : 746870563,
popoutsound : 711277662,
color : "#be7000",
blink : !1
},
kGeneric35 : {
popOut : 4211742235,
popoutsound : 2920163307,
color : "#00a700",
blink : !1
},
kGeneric36 : {
popOut : 4211742235,
popoutsound : 711277662,
color : "#be7000",
blink : !1
},
kGeneric37 : {
popOut : 4211742235,
popoutsound : 2920163307,
color : "#265e94",
blink : !1
},
kGeneric38 : {
popOut : 4211742235,
popoutsound : 2920163307,
color : "#265e94",
blink : !0
},
kGeneric39 : {
popOut : 3279112622,
popoutsound : 711277662,
color : "#be7000",
blink : !1
},
kGeneric40 : {
popOut : 3228915691,
popoutsound : 541125585,
color : "#00a700",
blink : !1
},
kGeneric41 : {
popOut : 3228915691,
popoutsound : 711277662,
color : "#265e94",
blink : !1
},
kGeneric42 : {
popOut : 3228915691,
popoutsound : 2920163307,
color : "#265e94",
blink : !1
},
kGeneric43 : {
popOut : 3228915691,
color : "#be7000",
blink : !1
},
kGeneric44 : {
popOut : 3228915691,
color : "#265e94",
blink : !1
},
kGeneric45 : {
popOut : 2237876459,
popoutsound : 711277662,
color : "#be7000",
blink : !1
},
kGeneric46 : {
popOut : 90951737,
popoutsound : 711277662,
color : "#be7000",
blink : !1
},
kGeneric47 : {
popOut : 4006569959,
popoutsound : 711277662,
color : "#be7000",
blink : !1
},
kGeneric48 : {
popOut : 2989660663,
popoutsound : 711277662,
color : "#be7000",
blink : !1
},
kGeneric49 : {
popOut : 1935439822,
popoutsound : 711277662,
color : "#be7000",
blink : !1
},
kGeneric50 : {
popOut : 3119349554,
popoutsound : 711277662,
color : "#be7000",
blink : !1
},
kGeneric51 : {
popOut : 1976039930,
color : "#00a700",
blink : !1
},
kGeneric52 : {
popOut : 1976039930,
popoutsound : 711277662,
color : "#be7000",
blink : !1
},
kGeneric53 : {
popOut : 1976039930,
popoutsound : 711277662,
color : "#265e94",
blink : !1
},
kGeneric54 : {
popOut : 1976039930,
color : "#265e94",
blink : !1
},
kGeneric55 : {
popOut : 2799331856,
popoutsound : 2920163307,
color : "#00a700",
blink : !1
},
kGeneric56 : {
popOut : 2799331856,
popoutsound : 711277662,
color : "#be7000",
blink : !1
},
kGeneric57 : {
popOut : 2799331856,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric58 : {
popOut : 2799331856,
popoutsound : 711277662,
color : "#265e94",
blink : !1
},
kGeneric59 : {
popOut : 2799331856,
popoutsound : 2920163307,
color : "#265e94",
blink : !1
},
kGeneric60 : {
popOut : 2799331856,
color : "#265e94",
blink : !1
},
kGeneric61 : {
popOut : 2485824774,
color : "#be7000",
blink : !0
},
kGeneric62 : {
popOut : 1343341559,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric63 : {
popOut : 2051197110,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric64 : {
popOut : 3193605517,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric65 : {
popOut : 2186895585,
popoutsound : 711277662,
color : "#00a700",
blink : !1
},
kGeneric66 : {
popOut : 2186895585,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric67 : {
popOut : 1117831206,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric68 : {
popOut : 1528591452,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric69 : {
popOut : 898156440,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric70 : {
popOut : 608491202,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric71 : {
popOut : 2328119309,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric72 : {
popOut : 780439254,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric73 : {
popOut : 2916625810,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric74 : {
popOut : 2324210422,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric75 : {
popOut : 634315867,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric76 : {
popOut : 507449055,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric77 : {
popOut : 1077852763,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric78 : {
popOut : 1935439822,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric79 : {
popOut : 2520413864,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric80 : {
popOut : 2637923960,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric81 : {
popOut : 3156693456,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric82 : {
popOut : 2989660663,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric83 : {
popOut : 2186895585,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric84 : {
popOut : 750415515,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric85 : {
popOut : 3319890007,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric86 : {
popOut : 2072411743,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric87 : {
popOut : 1662723423,
popoutsound : 2920163307,
color : "#00a700",
blink : !1
},
kGeneric88 : {
popOut : 1662723423,
popoutsound : 2497209459,
color : "#00a700",
blink : !1
},
kGeneric89 : {
popOut : 1662723423,
popoutsound : 2497209459,
color : "#00a700",
blink : !0
},
kGeneric90 : {
popOut : 1080312848,
popoutsound : 2497209459,
color : "#be7000",
blink : !1
},
kGeneric91 : {
popOut : 1080312848,
popoutsound : 2920163307,
color : "#00a700",
blink : !0
},
kGeneric92 : {
popOut : 1080312848,
popoutsound : 2920163307,
color : "#00a700",
blink : !1
},
kGeneric93 : {
popOut : 1080312848,
popoutsound : 2497209459,
color : "#00a700",
blink : !0
},
kGeneric94 : {
popOut : 1080312848,
popoutsound : 2497209459,
color : "#00a700",
blink : !1
},
kGeneric95 : {
popOut : 2514012217,
popoutsound : 2497209459,
color : "#be7000",
blink : !1
},
kGeneric96 : {
popOut : 2514012217,
popoutsound : 2988507092,
color : "#00a700",
blink : !1
},
kGeneric97 : {
popOut : 138339017,
popoutsound : 2920163307,
color : "#00a700",
blink : !1
},
kGeneric98 : {
popOut : 2514012217,
popoutsound : 2920163307,
color : "#00a700",
blink : !1
},
kGeneric99 : {
popOut : 4068651255,
popoutsound : 2988507092,
color : "#00a700",
blink : !1
},
kGeneric100 : {
popOut : 4068651255,
popoutsound : 2920163307,
color : "#00a700",
blink : !1
},
kGeneric101 : {
popOut : 4088429864,
popoutsound : 711277662,
color : "#00a700",
blink : !1
},
kGeneric102 : {
popOut : 1978225469,
popoutsound : 2497209459,
color : "#be7000",
blink : !1
},
kGeneric103 : {
popOut : 1978225469,
popoutsound : 2920163307,
color : "#00a700",
blink : !1
},
kGeneric104 : {
popOut : 2686844891,
popoutsound : 2920163307,
color : "#00a700",
blink : !1
},
kGeneric105 : {
popOut : 1978225469,
popoutsound : 2497209459,
color : "#00a700",
blink : !1
},
kGeneric106 : {
popOut : 2686844891,
popoutsound : 2497209459,
color : "#00a700",
blink : !1
},
kGeneric107 : {
popOut : 4145716298,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric108 : {
popOut : 287114150,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric109 : {
popOut : 90951737,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric110 : {
popOut : 4145716298,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric111 : {
popOut : 287114150,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric112 : {
popOut : 90951737,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric113 : {
popOut : 2766989671,
popoutsound : 2497209459,
color : "#00a700",
blink : !1
},
kGeneric114 : {
popOut : 2766989671,
popoutsound : 2920163307,
color : "#00a700",
blink : !1
},
kGeneric115 : {
popOut : 2766989671,
popoutsound : 3820351317,
color : "#00a700",
blink : !1
},
kGeneric116 : {
popOut : 4150508453,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric117 : {
popOut : 1753425282,
popoutsound : 2577172899,
color : "#00a700",
blink : !0
},
kGeneric118 : {
popOut : 1753425282,
popoutsound : 3274445481,
color : "#00a700",
blink : !1
},
kGeneric119 : {
popOut : 746870563,
popoutsound : 2988507092,
color : "#be7000",
blink : !0
},
kGeneric120 : {
popOut : 1767794936,
popoutsound : 2577172899,
color : "#00a700",
blink : !0
},
kGeneric121 : {
popOut : 1767794936,
popoutsound : 3274445481,
color : "#00a700",
blink : !1
},
kGeneric122 : {
popOut : 634315867,
popoutsound : 2988507092,
color : "#be7000",
blink : !0
},
kGeneric123 : {
popOut : 138339017,
popoutsound : 2577172899,
color : "#00a700",
blink : !0
},
kGeneric124 : {
popOut : 138339017,
popoutsound : 3274445481,
color : "#00a700",
blink : !1
},
kGeneric125 : {
popOut : 2740467664,
popoutsound : 2988507092,
color : "#be7000",
blink : !0
},
kGeneric126 : {
popOut : 780439254,
popoutsound : 2577172899,
color : "#00a700",
blink : !0
},
kGeneric127 : {
popOut : 780439254,
popoutsound : 3274445481,
color : "#00a700",
blink : !1
},
kGeneric128 : {
popOut : 4270790685,
popoutsound : 2988507092,
color : "#be7000",
blink : !0
},
kGeneric129 : {
popOut : 2328119309,
popoutsound : 2577172899,
color : "#00a700",
blink : !0
},
kGeneric130 : {
popOut : 2328119309,
popoutsound : 3274445481,
color : "#00a700",
blink : !1
},
kGeneric131 : {
popOut : 1576074270,
popoutsound : 2988507092,
color : "#be7000",
blink : !0
},
kGeneric132 : {
popOut : 2916625810,
popoutsound : 2577172899,
color : "#00a700",
blink : !0
},
kGeneric133 : {
popOut : 2916625810,
popoutsound : 3274445481,
color : "#00a700",
blink : !1
},
kGeneric134 : {
popOut : 2237876459,
popoutsound : 2988507092,
color : "#be7000",
blink : !0
},
kGeneric135 : {
popOut : 1935439822,
popoutsound : 2577172899,
color : "#00a700",
blink : !0
},
kGeneric136 : {
popOut : 1935439822,
popoutsound : 3274445481,
color : "#00a700",
blink : !1
},
kGeneric137 : {
popOut : 1935439822,
popoutsound : 2988507092,
color : "#be7000",
blink : !0
},
kGeneric138 : {
popOut : 1228851207,
popoutsound : 2577172899,
color : "#00a700",
blink : !0
},
kGeneric139 : {
popOut : 1228851207,
popoutsound : 3274445481,
color : "#00a700",
blink : !1
},
kGeneric140 : {
popOut : 1784441106,
popoutsound : 2988507092,
color : "#be7000",
blink : !0
},
kGeneric141 : {
popOut : 3148804527,
popoutsound : 2577172899,
color : "#00a700",
blink : !0
},
kGeneric142 : {
popOut : 3148804527,
popoutsound : 3274445481,
color : "#00a700",
blink : !1
},
kGeneric143 : {
popOut : 3119349554,
popoutsound : 2988507092,
color : "#be7000",
blink : !0
},
kGeneric144 : {
popOut : 3558728339,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric145 : {
popOut : 3558728339,
popoutsound : 711277662,
color : "#00a700",
blink : !1
},
kGeneric146 : {
popOut : 3558728339,
popoutsound : 2988507092,
color : "#be7000",
blink : !0
},
kGeneric147 : {
popOut : 1687865527,
popoutsound : 2577172899,
color : "#00a700",
blink : !0
},
kGeneric148 : {
popOut : 1687865527,
popoutsound : 3274445481,
color : "#00a700",
blink : !1
},
kGeneric149 : {
popOut : 1687865527,
popoutsound : 2988507092,
color : "#be7000",
blink : !0
},
kGeneric150 : {
popOut : 3833589313,
popoutsound : 432147147,
color : "#00a700",
blink : !0
},
kGeneric151 : {
popOut : 618893759,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric152 : {
popOut : 2437035926,
popoutsound : 432147147,
color : "#00a700",
blink : !1
},
kGeneric153 : {
popOut : 4006569959,
popoutsound : 432147147,
color : "#00a700",
blink : !1
}
};
simcity.TickerMessageEvents = {
2862522295 : {
stringID : 406060696,
localizedPopOutText : 4225465767,
queries : {
adjustedExpenses : [simcity.kDataBinAmount, simcity.kResourceIDAdjustedExpenses],
simoleons : [simcity.kDataBinAmount, simcity.kResourceIDSimoleons]
},
test : function (a) {
return a.simoleons / 24 < a.adjustedExpenses && 0 < a.simoleons
},
getLocaleTokens : function (a) {
return {
calc1 : Math.floor(a.simoleons / a.adjustedExpenses) + 1
}
},
importance : 10,
triggerTime : [0, 0],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric0
},
2216564935 : {
stringID : 117522932,
localizedPopOutText : 2106191243,
queries : {
income : [simcity.kDataBinAmount, simcity.kResourceIDCasinoSpecialtyLastMonthIncome],
expenses : [simcity.kDataBinAmount, simcity.kResourceIDCasinoSpecialtyLastMonthExpenses],
HQ : [simcity.kDataBinAmount, simcity.kResourceIDHQ_Casino_IsOn]
},
test : function (a) {
return 0 < a.HQ
},
getLocaleTokens : function (a) {
return {
calc1 : a.income - a.expenses
}
},
importance : 5,
triggerTime : [100, 140],
category : simcity.TickerCategories.kGeneric1
},
2190777279 : {
stringID : 1057882443,
localizedPopOutText : 1297307354,
queries : {
income : [simcity.kDataBinAmount, simcity.kResourceIDElectronicsSpecialtyLastMonthIncome],
expenses : [simcity.kDataBinAmount, simcity.kResourceIDElectronicsSpecialtyLastMonthExpenses],
HQ : [simcity.kDataBinAmount, simcity.kResourceIDHQ_Electronics_IsOn]
},
test : function (a) {
return 0 < a.HQ
},
getLocaleTokens : function (a) {
return {
calc1 : a.income - a.expenses
}
},
importance : 5,
triggerTime : [100, 140],
category : simcity.TickerCategories.kGeneric2
},
4056021231 : {
stringID : 1458643196,
localizedPopOutText : 3099287075,
queries : {
income : [simcity.kDataBinAmount, simcity.kResourceIDMetalSpecialtyLastMonthIncome],
expenses : [simcity.kDataBinAmount, simcity.kResourceIDMetalSpecialtyLastMonthExpenses],
HQ : [simcity.kDataBinAmount, simcity.kResourceIDHQ_Mining_IsOn]
},
test : function (a) {
return 0 < a.HQ
},
getLocaleTokens : function (a) {
return {
calc1 : a.income - a.expenses
}
},
importance : 5,
triggerTime : [100, 140],
category : simcity.TickerCategories.kGeneric3
},
3806113539 : {
stringID : 901384120,
localizedPopOutText : 3856130631,
queries : {
oilIncome : [simcity.kDataBinAmount,
simcity.kResourceIDPetroleumSpecialtyLastMonthIncome],
oilExpenses : [simcity.kDataBinAmount, simcity.kResourceIDPetroleumSpecialtyLastMonthExpenses],
oilHQ : [simcity.kDataBinAmount, simcity.kResourceIDHQ_Oil_IsOn]
},
test : function (a) {
return 0 < a.oilHQ
},
getLocaleTokens : function (a) {
return {
calc1 : a.oilIncome - a.oilExpenses
}
},
importance : 5,
triggerTime : [100, 140],
category : simcity.TickerCategories.kGeneric4
},
1053008090 : {
stringID : 324203730,
localizedPopOutText : 3419798537,
queries : {
income : [simcity.kDataBinAmount, simcity.kResourceIDTradeSpecialtyLastMonthIncome],
expenses : [simcity.kDataBinAmount, simcity.kResourceIDTradeSpecialtyLastMonthExpenses],
HQ : [simcity.kDataBinAmount, simcity.kResourceIDHQ_Trade_IsOn]
},
test : function (a) {
return 0 < a.HQ
},
getLocaleTokens : function (a) {
return {
calc1 : a.income - a.expenses
}
},
importance : 5,
triggerTime : [100, 140],
category : simcity.TickerCategories.kGeneric5
},
3491343762 : {
stringID : 2141884545,
localizedPopOutText : 1695229200,
importance : 10,
triggerTime : [0, 0],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric0
},
3485381822 : {
stringID : 2960973370,
queries : {
guided : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Guided],
HQ : [simcity.kDataResourceAmount, simcity.kResourceIDHQ_Electronics_Built]
},
test : function (a) {
return 0 === a.guided && 0 === a.HQ
},
importance : 5,
triggerTime : [300, 900],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
555604848 : {
stringID : 479587983,
queries : {
electronics_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Electronics]
},
test : function (a) {
return 1 === a.electronics_specialized
},
importance : 8,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
2417386553 : {
stringID : 4205128247,
queries : {
electronics_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Electronics],
T1 : [simcity.kDataResourceAmount, simcity.kResourceIDNumT1ElectronicsBase]
},
test : function (a) {
return 1 === a.electronics_specialized && 1 <= a.T1
},
importance : 8,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
2237690367 : {
stringID : 1875333833,
queries : {
electronics_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Electronics],
ElectronicHQ : [simcity.kDataBinAmount, simcity.kResourceIDNumberOfElectronicHQs]
},
test : function (a) {
return 1 === a.electronics_specialized && 1 <= a.ElectronicHQ
},
importance : 8,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
4014134237 : {
stringID : 4201490899,
queries : {
electronics_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Electronics],
electronicsFactoryT2 : [simcity.kDataBinAmount, simcity.kResourceIDNumT2ElectronicsBase]
},
test : function (a) {
return 1 === a.electronics_specialized && 1 <= a.electronicsFactoryT2
},
importance : 8,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
592687806 : {
stringID : 244303228,
queries : {
electronics_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Electronics],
computers : [simcity.kDataResourceAmount, simcity.kResourceIDTotalComputerAssembled]
},
test : function (a) {
return 1 ===
a.electronics_specialized && 1 <= a.computers
},
importance : 8,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
1595331192 : {
stringID : 3249197276,
queries : {
gambling_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Gambling],
casinos : [simcity.kDataBinAmount, simcity.kResourceIDNumberOfCasinos]
},
test : function (a) {
return 1 === a.gambling_specialized && 1 <= a.casinos
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
1121631731 : {
stringID : 968862560,
queries : {
gambling_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Gambling],
BigGamble10 : [simcity.kDataBinAmount, simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble10]
},
test : function (a) {
return 1 === a.gambling_specialized && 1 === a.BigGamble10
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric7
},
1816067128 : {
stringID : 347808313,
queries : {
gambling_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Gambling]
},
test : function (a) {
return 1 === a.gambling_specialized
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
1119856555 : {
stringID : 2490494359,
queries : {
gambling_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Gambling],
CasinoHQ : [simcity.kDataBinAmount, simcity.kResourceIDNumberOfCasinoHQs]
},
test : function (a) {
return 1 === a.gambling_specialized && 1 <= a.CasinoHQ
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3990571085 : {
stringID : 3361467280,
queries : {
gambling_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Gambling],
BigGamble5 : [simcity.kDataBinAmount, simcity.kResourceIDGlobalMission_MSBusinessGamblingBigGamble5]
},
test : function (a) {
return 1 === a.gambling_specialized && 1 === a.BigGamble5
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric7
},
3289957511 : {
stringID : 1223690171,
queries : {
gambling_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Gambling],
HQ_CityHall_Transportation_Module_IsOn : [simcity.kDataResourceAmount, simcity.kResourceIDHQ_CityHall_Transportation_Module_IsOn]
},
test : function (a) {
return 1 === a.gambling_specialized && 1 === a.HQ_CityHall_Transportation_Module_IsOn
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
2126793774 : {
stringID : 2961672730,
queries : {
guided : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Guided],
casinoHQs : [simcity.kDataBinAmount, simcity.kResourceIDHQ_Casino_Built]
},
test : function (a) {
return 0 === a.guided && 0 === a.casinoHQs
},
importance : 5,
triggerTime : [300, 900],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3241423309 : {
stringID : 995028134,
queries : {
guided : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Guided],
HQ : [simcity.kDataResourceAmount, simcity.kResourceIDHQ_Trade_Built],
rail_in_box : [simcity.kDataResourceAmount, simcity.kResourceIDNumberOfRailConnections],
waterinbox : [simcity.kDataResourceAmount, simcity.kResourceIDNumberOfBoatConnections]
},
test : function (a) {
return 0 === a.guided && 0 === a.HQ && (1 <= a.rail_in_box || 1 <= a.waterinbox)
},
importance : 5,
triggerTime : [300, 900],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
344128374 : {
stringID : 1442247270,
queries : {
guided : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Guided],
HQ : [simcity.kDataResourceAmount, simcity.kResourceIDHQ_Mining_Built]
},
test : function (a) {
return 0 === a.guided && 0 === a.HQ
},
importance : 5,
triggerTime : [300, 900],
displayCountLimit : 5,
category : simcity.TickerCategories.kGeneric6
},
389610818 : {
stringID : 3188548680,
queries : {
metals_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Metals],
coalmines_built : [simcity.kDataBinAmount, simcity.kResourceIDCoalMinesBuilt_T1]
},
test : function (a) {
return 1 === a.metals_specialized && 1 <= a.coalmines_built
},
importance : 8,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
611741879 : {
stringID : 3059208004,
localizedPopOutText : 3727184955,
queries : {
metals_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Metals]
},
test : function (a) {
return 1 === a.metals_specialized
},
importance : 8,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric8
},
3057508149 : {
stringID : 2319390571,
queries : {
metals_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Metals],
mining_HQ_built : [simcity.kDataResourceAmount, simcity.kResourceIDHQ_Mining_Built]
},
test : function (a) {
return 1 === a.metals_specialized && 1 <= a.mining_HQ_built
},
importance : 8,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3529811841 : {
stringID : 1825163777,
localizedPopOutText : 852657552,
queries : {
metals_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Metals]
},
test : function (a) {
return 1 === a.metals_specialized
},
importance : 8,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric9
},
2213573849 : {
stringID : 2931078471,
queries : {
metals_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Metals],
coalT2 : [simcity.kDataResourceAmount, simcity.kResourceIDCoalMinesBuilt_T2]
},
test : function (a) {
return 1 === a.metals_specialized && 1 <= a.coalT2
},
importance : 8,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
2199591307 : {
stringID : 3067011501,
queries : {
guided : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Guided],
HQ : [simcity.kDataResourceAmount, simcity.kResourceIDHQ_Mining_Built]
},
test : function (a) {
return 0 === a.guided && 0 === a.HQ
},
importance : 5,
triggerTime : [300, 900],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
355747780 : {
stringID : 723760258,
queries : {
petroleum_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Petroleum],
oilwells_built : [simcity.kDataBinAmount, simcity.kResourceIDNumberOfOilWells]
},
test : function (a) {
return 1 === a.petroleum_specialized && 1 <= a.oilwells_built
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
4069684218 : {
stringID : 4088610612,
queries : {
petroleum_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Petroleum],
oilHQs_built : [simcity.kDataBinAmount,
simcity.kResourceIDHQ_Oil_Built]
},
test : function (a) {
return 1 === a.petroleum_specialized && 1 === a.oilHQs_built
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
980995476 : {
stringID : 3203030671,
localizedPopOutText : 2022709318,
queries : {
petroleum_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Petroleum]
},
test : function (a) {
return 1 === a.petroleum_specialized
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric10
},
4075518179 : {
stringID : 2273955257,
queries : {
petroleum_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Petroleum],
oil_refineries : [simcity.kDataBinAmount, simcity.kResourceIDNumberOfOilManufacturingBases]
},
test : function (a) {
return 1 === a.petroleum_specialized && 1 <= a.oil_refineries
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
1822446140 : {
stringID : 2467812122,
queries : {
petroleum_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Petroleum],
plasticAssemblers : [simcity.kDataBinAmount, simcity.kResourceIDNumberOfPlasticAssemblers]
},
test : function (a) {
return 1 === a.petroleum_specialized && 1 <= a.plasticAssemblers
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
4233742703 : {
stringID : 350876893,
queries : {
guided : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Guided],
oilHQ : [simcity.kDataBinAmount, simcity.kResourceIDHQ_Oil_Built]
},
test : function (a) {
return 0 === a.guided && 0 === a.oilHQ
},
importance : 5,
triggerTime : [300, 900],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
2798332768 : {
stringID : 3501867033,
localizedPopOutText : 2561456216,
importance : 5,
triggerTime : [100, 140],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric11
},
1271082866 : {
stringID : 3159633222,
localizedPopOutText : 1314488965,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric12
},
2261483553 : {
stringID : 3705579627,
localizedPopOutText : 235553658,
importance : 10,
triggerTime : [300,
500],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric13
},
1637247490 : {
stringID : 464337342,
localizedPopOutText : 2993317709,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 10,
isRegional : !0,
category : simcity.TickerCategories.kGeneric14
},
2494240695 : {
stringID : 742114689,
localizedPopOutText : 1601575952,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 10,
isRegional : !0,
category : simcity.TickerCategories.kGeneric15
},
3904912538 : {
stringID : 2028961269,
localizedPopOutText : 1622856684,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric16
},
3174134949 : {
stringID : 3391099183,
localizedPopOutText : 2706197350,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 10,
isRegional : !0,
category : simcity.TickerCategories.kGeneric17
},
4059387345 : {
stringID : 4060750571,
localizedPopOutText : 472997626,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 10,
isRegional : !0,
category : simcity.TickerCategories.kGeneric18
},
1800060862 : {
stringID : 3511082065,
localizedPopOutText : 1947549056,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric19
},
1323680520 : {
stringID : 1050341333,
localizedPopOutText : 2394128972,
queries : {
died : [simcity.kDataBinAmount, simcity.kResourceIDDeathPerDay]
},
test : function (a) {
return 0 < a.died
},
getLocaleTokens : function (a) {
return {
calc1 : a.died
}
},
importance : 10,
triggerTime : [20, 20],
displayCountLimit : 40,
category : simcity.TickerCategories.kGeneric20
},
1606613579 : {
stringID : 3705562746,
localizedPopOutText : 1034499937,
queries : {
died : [simcity.kDataBinAmount,
simcity.kResourceIDDeathPerDay]
},
test : function (a) {
return 0 < a.died
},
getLocaleTokens : function (a) {
return {
calc1 : a.died
}
},
importance : 10,
triggerTime : [20, 20],
displayCountLimit : 40,
category : simcity.TickerCategories.kGeneric21
},
849218788 : {
stringID : 1087229135,
localizedPopOutText : 557046534,
queries : {
died : [simcity.kDataBinAmount, simcity.kResourceIDDeathPerDay]
},
test : function (a) {
return 0 < a.died
},
getLocaleTokens : function (a) {
return {
calc1 : a.died
}
},
importance : 10,
triggerTime : [20, 20],
displayCountLimit : 40,
category : simcity.TickerCategories.kGeneric22
},
706007498 : {
stringID : 989294323,
localizedPopOutText : 394017554,
queries : {
Meltdown : [simcity.kDataResourceAmount, simcity.kResourceIDDisasterActiveMeltdown]
},
importance : 10,
triggerTime : [20, 20],
displayCountLimit : 40,
category : simcity.TickerCategories.kGeneric23
},
158623644 : {
stringID : 123681553,
localizedPopOutText : 3652456640,
queries : {
died : [simcity.kDataBinAmount, simcity.kResourceIDDeathPerDay]
},
test : function (a) {
return 0 < a.died
},
getLocaleTokens : function (a) {
return {
calc1 : a.died
}
},
importance : 10,
triggerTime : [20, 20],
displayCountLimit : 40,
category : simcity.TickerCategories.kGeneric24
},
1678288329 : {
stringID : 1774760283,
localizedPopOutText : 2803718986,
queries : {
died : [simcity.kDataBinAmount, simcity.kResourceIDDeathPerDay]
},
test : function (a) {
return 0 < a.died
},
getLocaleTokens : function (a) {
return {
calc1 : a.died
}
},
importance : 10,
triggerTime : [20, 20],
displayCountLimit : 40,
category : simcity.TickerCategories.kGeneric25
},
2497225335 : {
stringID : 2718027768,
localizedPopOutText : 3662821639,
queries : {
died : [simcity.kDataBinAmount, simcity.kResourceIDDeathPerDay]
},
test : function (a) {
return 0 < a.died
},
getLocaleTokens : function (a) {
return {
calc1 : a.died
}
},
importance : 10,
triggerTime : [20, 20],
displayCountLimit : 40,
category : simcity.TickerCategories.kGeneric26
},
3218687294 : {
stringID : 2195188595,
localizedPopOutText : 2480163986,
importance : 10,
triggerTime : [20, 20],
displayCountLimit : 40,
category : simcity.TickerCategories.kGeneric27
},
3410603091 : {
stringID : 1397116883,
localizedPopOutText : 3004681842,
queries : {
died : [simcity.kDataBinAmount, simcity.kResourceIDDeathPerDay]
},
test : function (a) {
return 0 <
a.died
},
getLocaleTokens : function (a) {
return {
calc1 : a.died
}
},
importance : 10,
triggerTime : [20, 20],
displayCountLimit : 40,
category : simcity.TickerCategories.kGeneric28
},
1352952059 : {
stringID : 273388231,
queries : {
education_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Education],
NumGradeSchoolBases : [simcity.kDataBinAmount, simcity.kResourceIDNumberOfGradeSchoolBases]
},
test : function (a) {
return 1 === a.education_specialized && 1 <= a.NumGradeSchoolBases
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3912979267 : {
stringID : 3625358573,
queries : {
education_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Education],
nuke : [simcity.kDataBinAmount, simcity.kResourceIDPower_NumberOfNuclearPowerPlants]
},
test : function (a) {
return 1 === a.education_specialized && 1 <= a.nuke
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
1086865800 : {
stringID : 1148522316,
queries : {
education_specialized : [simcity.kDataResourceAmount,
simcity.kResourceIDSpecialization_Education],
deptOfEdu : [simcity.kDataBinAmount, simcity.kResourceIDHQ_CityHall_Education_Module_IsOn]
},
test : function (a) {
return 1 === a.education_specialized && 1 === a.deptOfEdu
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3755975519 : {
stringID : 1049121891,
queries : {
education_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Education],
NumberOfHighSchoolBases : [simcity.kDataResourceAmount, simcity.kResourceIDNumberOfHighSchoolBases]
},
test : function (a) {
return 1 === a.education_specialized && 1 <= a.NumberOfHighSchoolBases
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
650782 : {
stringID : 425389498,
queries : {
education_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Education],
numberOfHighSchoolGyms : [simcity.kDataBinAmount, simcity.kResourceIDNumberOfHighSchoolGyms],
libraries : [simcity.kDataBinAmount, simcity.kResourceIDNumberOfLibraries]
},
test : function (a) {
return 1 ===
a.education_specialized && 1 <= a.numberOfHighSchoolGyms && 1 <= a.libraries
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
2679869757 : {
stringID : 3359711705,
queries : {
education_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Education],
NumberOfCollegeBases : [simcity.kDataResourceAmount, simcity.kResourceIDNumberOfCollegeBases]
},
test : function (a) {
return 1 === a.education_specialized && 1 <= a.NumberOfCollegeBases
},
importance : 5,
triggerTime : [300,
500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3560657356 : {
stringID : 530858440,
queries : {
education_specialized : [simcity.kDataResourceAmount, simcity.kResourceIDSpecialization_Education],
university : [simcity.kDataBinAmount, simcity.kResourceIDNumberOfUniversities]
},
test : function (a) {
return 1 === a.education_specialized && 1 <= a.university
},
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3162950861 : {
stringID : 1593087349,
queries : {
guided : [simcity.kDataResourceAmount,
simcity.kResourceIDSpecialization_Guided],
NumberOfUniversities : [simcity.kDataBinAmount, simcity.kResourceIDNumberOfUniversities]
},
test : function (a) {
return 0 === a.guided && 0 === a.NumberOfUniversities
},
importance : 5,
triggerTime : [300, 900],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3172445582 : {
stringID : 876056814,
localizedPopOutText : 1982624413,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric29
},
3024572645 : {
stringID : 2634763815,
localizedPopOutText : 212948302,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric30
},
1664877296 : {
stringID : 3669431012,
localizedPopOutText : 422114907,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric29
},
813626371 : {
stringID : 1527300745,
localizedPopOutText : 49775144,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric30
},
3045040548 : {
stringID : 24630284,
localizedPopOutText : 1292337171,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric29
},
452126727 : {
stringID : 3014904449,
localizedPopOutText : 4243522320,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric31
},
3102886986 : {
stringID : 3388288302,
localizedPopOutText : 3801519197,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric29
},
938476001 : {
stringID : 2292289639,
localizedPopOutText : 2148043534,
importance : 8,
triggerTime : [100,
140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric31
},
3451080315 : {
stringID : 1344395625,
localizedPopOutText : 3878867464,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric29
},
793375054 : {
stringID : 3846303986,
localizedPopOutText : 3222211497,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric32
},
4146082347 : {
stringID : 942439677,
localizedPopOutText : 1178884644,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric29
},
2500531390 : {
stringID : 3686868934,
localizedPopOutText : 1958288901,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric32
},
108845600 : {
stringID : 2319509428,
localizedPopOutText : 959405515,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric29
},
1040548979 : {
stringID : 3864037529,
localizedPopOutText : 3616787928,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric32
},
2931558408 : {
stringID : 2618617088,
localizedPopOutText : 954748447,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric29
},
3044592107 : {
stringID : 3541338789,
localizedPopOutText : 1932239932,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric33
},
3738875514 : {
stringID : 577705306,
localizedPopOutText : 1993022913,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric29
},
2683538385 : {
stringID : 1140007571,
localizedPopOutText : 4044169138,
importance : 8,
triggerTime : [100, 140],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric30
},
1706339152 : {
stringID : 1707896182,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDCW1D2]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
1706339153 : {
stringID : 3671422021,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDCW1D3]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
2008189200 : {
stringID : 1012703494,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDCW2D1]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
2008189203 : {
stringID : 2815110751,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDCW2D2]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
2008189202 : {
stringID : 82586552,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDCW2D3]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
1370492553 : {
stringID : 3862896077,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDCW3D1]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
1370492554 : {
stringID : 190797840,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDCW3D2]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
1370492555 : {
stringID : 3614792215,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDCW3D3]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
4269770864 : {
stringID : 2357287060,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDIW1D2]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
4269770865 : {
stringID : 863291179,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDIW1D3]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
276550448 : {
stringID : 1737986764,
queries : {
RCIType : [simcity.kDataBinAmount,
simcity.kResourceIDIW2D1]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
276550451 : {
stringID : 3949176153,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDIW2D2]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
276550450 : {
stringID : 1014853946,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDIW2D3]
},
test : function (a) {
return 0 <
a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3933821097 : {
stringID : 1684496179,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDIW3D1]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3933821098 : {
stringID : 1809003594,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDIW3D2]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10,
10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3933821099 : {
stringID : 4077763881,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDIW3D3]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3886424745 : {
stringID : 2913326493,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDRW1D2]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3886424744 : {
stringID : 2843964366,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDRW1D3]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3047102481 : {
stringID : 831439109,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDRW2D1]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3047102482 : {
stringID : 2657220968,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDRW2D2]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3047102483 : {
stringID : 2078708815,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDRW2D3]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3684799160 : {
stringID : 2499816542,
queries : {
RCIType : [simcity.kDataBinAmount,
simcity.kResourceIDRW3D1]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3684799163 : {
stringID : 457696887,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDRW3D2]
},
test : function (a) {
return 0 < a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
3684799162 : {
stringID : 945685872,
queries : {
RCIType : [simcity.kDataBinAmount, simcity.kResourceIDRW3D3]
},
test : function (a) {
return 0 <
a.RCIType
},
importance : 5,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric6
},
386334239 : {
stringID : 9054379,
localizedPopOutText : 4026105914,
importance : 8,
triggerTime : [300, 900],
unitName : !0,
category : simcity.TickerCategories.kGeneric34
},
3704729337 : {
stringID : 1400879162,
localizedPopOutText : 3989938081,
importance : 10,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric35
},
4256661998 : {
stringID : 3927947641,
localizedPopOutText : 195449016,
importance : 10,
triggerTime : [300,
500],
category : simcity.TickerCategories.kGeneric36
},
2057105206 : {
stringID : 1907472020,
localizedPopOutText : 4231417643,
importance : 10,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric37
},
553803811 : {
stringID : 1907472020,
localizedPopOutText : 3140607406,
importance : 10,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric38
},
2552163895 : {
stringID : 271753890,
localizedPopOutText : 1112660537,
importance : 8,
triggerTime : [300, 900],
unitName : !0,
category : simcity.TickerCategories.kGeneric39
},
1394842079 : {
stringID : 837702387,
localizedPopOutText : 2843592466,
importance : 8,
triggerTime : [300, 900],
category : simcity.TickerCategories.kGeneric39
},
2287756871 : {
stringID : 1897402331,
localizedPopOutText : 3093627594,
importance : 8,
triggerTime : [300, 900],
unitName : !0,
category : simcity.TickerCategories.kGeneric39
},
2851900225 : {
stringID : 2834654E3,
localizedPopOutText : 4136285103,
importance : 8,
triggerTime : [300, 900],
unitName : !0,
category : simcity.TickerCategories.kGeneric39
},
1645829750 : {
stringID : 3730349535,
localizedPopOutText : 780289782,
importance : 10,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric40
},
3288367759 : {
stringID : 1905302148,
localizedPopOutText : 85932283,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 5,
category : simcity.TickerCategories.kGeneric41
},
165457269 : {
stringID : 2609999572,
localizedPopOutText : 358693355,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 5,
category : simcity.TickerCategories.kGeneric41
},
1607336928 : {
stringID : 3650737555,
localizedPopOutText : 85932283,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 5,
category : simcity.TickerCategories.kGeneric42
},
4120749035 : {
stringID : 751599288,
localizedPopOutText : 1253478215,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 3,
category : simcity.TickerCategories.kGeneric43
},
2383687319 : {
stringID : 2412897707,
localizedPopOutText : 4097560378,
importance : 10,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric44
},
4147007240 : {
stringID : 2412897707,
localizedPopOutText : 3109685205,
importance : 10,
triggerTime : [10,
10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric44
},
4247238887 : {
stringID : 3517482139,
localizedPopOutText : 2186984970,
importance : 8,
triggerTime : [300, 900],
unitName : !0,
category : simcity.TickerCategories.kGeneric45
},
3171144225 : {
localizedPopOutText : 672061682,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 10,
unitName : !0,
category : simcity.TickerCategories.kGeneric46
},
2062849511 : {
localizedPopOutText : 696129156,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 10,
unitName : !0,
category : simcity.TickerCategories.kGeneric47
},
2776390503 : {
localizedPopOutText : 3474927084,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 10,
unitName : !0,
category : simcity.TickerCategories.kGeneric48
},
2676572717 : {
localizedPopOutText : 2564614568,
importance : 8,
triggerTime : [300, 900],
unitName : !0,
category : simcity.TickerCategories.kGeneric49
},
741629676 : {
stringID : 2806754922,
localizedPopOutText : 4194870065,
importance : 8,
triggerTime : [300, 900],
unitName : !0,
category : simcity.TickerCategories.kGeneric50
},
766203056 : {
stringID : 3479226875,
localizedPopOutText : 4106438762,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric51
},
4046738029 : {
localizedPopOutText : 3956459487,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric52
},
3213653837 : {
localizedPopOutText : 2971304887,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 5,
category : simcity.TickerCategories.kGeneric53
},
1386102563 : {
localizedPopOutText : 896968703,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 5,
category : simcity.TickerCategories.kGeneric53
},
1067401634 : {
localizedPopOutText : 683142406,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 5,
category : simcity.TickerCategories.kGeneric53
},
2252877243 : {
stringID : 2273535175,
localizedPopOutText : 1313618414,
importance : 10,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric54
},
1866320540 : {
stringID : 2273535175,
localizedPopOutText : 3757386057,
importance : 10,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric54
},
2888378838 : {
stringID : 2779864589,
localizedPopOutText : 2422030420,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric55
},
3009035561 : {
stringID : 4275254696,
localizedPopOutText : 2368444183,
importance : 8,
triggerTime : [300, 900],
unitName : !0,
category : simcity.TickerCategories.kGeneric56
},
812747997 : {
localizedPopOutText : 1581182191,
importance : 10,
triggerTime : [10, 10],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric57
},
3810487919 : {
stringID : 1689287254,
localizedPopOutText : 4023163637,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 5,
category : simcity.TickerCategories.kGeneric58
},
3926157269 : {
localizedPopOutText : 1764469997,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 5,
category : simcity.TickerCategories.kGeneric58
},
2738122816 : {
localizedPopOutText : 1541244744,
importance : 10,
triggerTime : [300, 500],
displayCountLimit : 5,
category : simcity.TickerCategories.kGeneric59
},
2609853804 : {
localizedPopOutText : 1297165622,
importance : 10,
triggerTime : [10, 10],
displayCountLimit : 10,
category : simcity.TickerCategories.kGeneric55
},
3825521097 : {
stringID : 217096821,
localizedPopOutText : 91725164,
importance : 10,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric60
},
3462689662 : {
stringID : 217096821,
localizedPopOutText : 3349371251,
importance : 10,
triggerTime : [10, 10],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric60
},
2937274104 : {
stringID : 2370396834,
localizedPopOutText : 3567262265,
importance : 2,
triggerTime : [300, 500],
displayCountLimit : 3,
category : simcity.TickerCategories.kGeneric61
},
1205305622 : {
stringID : 705173484,
localizedPopOutText : 3450174963,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric62
},
2344654164 : {
stringID : 2673657973,
localizedPopOutText : 287891308,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric62
},
567903298 : {
stringID : 584444512,
localizedPopOutText : 71201663,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric63
},
2825610023 : {
stringID : 2440143603,
localizedPopOutText : 268252946,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric62
},
2473304163 : {
stringID : 3373452564,
localizedPopOutText : 83713707,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric62
},
2389244847 : {
stringID : 1826186679,
localizedPopOutText : 860866558,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric63
},
736740220 : {
stringID : 3635404267,
localizedPopOutText : 3873683450,
queries : {
examsPassedTodayE2 : [simcity.kDataBinAmount, simcity.kResourceIDExamsPassedTodayE2],
examsPassedTodayE3 : [simcity.kDataBinAmount, simcity.kResourceIDExamsPassedTodayE3],
localStudents : [simcity.kDataBinAmount, simcity.kResourceIDLocalStudentsYesterday]
},
test : function (a) {
return 100 < a.examsPassedTodayE2 + a.examsPassedTodayE3 - a.localStudents
},
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric64
},
837100762 : {
stringID : 3105526924,
localizedPopOutText : 3242737043,
queries : {
examsPassedTodayE2 : [simcity.kDataBinAmount, simcity.kResourceIDExamsPassedTodayE2],
examsPassedTodayE3 : [simcity.kDataBinAmount, simcity.kResourceIDExamsPassedTodayE3],
localStudents : [simcity.kDataBinAmount, simcity.kResourceIDLocalStudentsYesterday]
},
test : function (a) {
return 1E3 < a.examsPassedTodayE2 + a.examsPassedTodayE3 - a.localStudents
},
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric64
},
1374436624 : {
stringID : 972974575,
localizedPopOutText : 2039787430,
queries : {
examsPassedTodayE2 : [simcity.kDataBinAmount, simcity.kResourceIDExamsPassedTodayE2],
examsPassedTodayE3 : [simcity.kDataBinAmount, simcity.kResourceIDExamsPassedTodayE3],
localStudents : [simcity.kDataBinAmount, simcity.kResourceIDLocalStudentsYesterday]
},
test : function (a) {
return 500 < a.examsPassedTodayE2 + a.examsPassedTodayE3 - a.localStudents
},
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric65
},
835848277 : {
stringID : 2825869252,
localizedPopOutText : 46737851,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric64
},
1727318385 : {
stringID : 1590540845,
localizedPopOutText : 1752109556,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric64
},
198151645 : {
stringID : 3124374968,
localizedPopOutText : 2066031687,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric66
},
3022974907 : {
stringID : 2448475180,
localizedPopOutText : 2950717363,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric67
},
635281231 : {
stringID : 607720885,
localizedPopOutText : 230501164,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric67
},
3660377443 : {
stringID : 2752100512,
localizedPopOutText : 2508716607,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric67
},
3305824498 : {
stringID : 381103667,
localizedPopOutText : 1139684306,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric67
},
3339688296 : {
stringID : 1970440788,
localizedPopOutText : 3162058859,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric67
},
4010631518 : {
stringID : 4020537335,
localizedPopOutText : 3647398846,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric67
},
2167306996 : {
stringID : 2436818621,
localizedPopOutText : 1788551268,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric68
},
296702791 : {
stringID : 600731664,
localizedPopOutText : 873617679,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric68
},
1013991476 : {
stringID : 3624614369,
localizedPopOutText : 1390475376,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric68
},
788503175 : {
stringID : 3643125508,
localizedPopOutText : 4129837691,
importance : 5,
triggerTime : [30,
50],
category : simcity.TickerCategories.kGeneric68
},
902874420 : {
stringID : 2577544845,
localizedPopOutText : 768574932,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric68
},
3114420103 : {
stringID : 3347313952,
localizedPopOutText : 1654606783,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric68
},
256022521 : {
stringID : 3463507354,
localizedPopOutText : 1637650817,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric68
},
3485815114 : {
stringID : 1325988547,
localizedPopOutText : 4255315778,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric68
},
836684252 : {
stringID : 1140620561,
localizedPopOutText : 3046885056,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric68
},
2865422159 : {
stringID : 3496764276,
localizedPopOutText : 2568865291,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric68
},
2326840166 : {
stringID : 2287718827,
localizedPopOutText : 2420519738,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric68
},
4039290501 : {
stringID : 1488657618,
localizedPopOutText : 2404725769,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric68
},
3229982503 : {
stringID : 3433814529,
localizedPopOutText : 3275240848,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric69
},
293762772 : {
stringID : 3672745380,
localizedPopOutText : 814151323,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric70
},
3471514620 : {
stringID : 487338200,
localizedPopOutText : 2501341543,
importance : 5,
triggerTime : [30,
50],
category : simcity.TickerCategories.kGeneric69
},
3293942639 : {
stringID : 892415189,
localizedPopOutText : 2465026380,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric70
},
3139374469 : {
stringID : 1328313483,
localizedPopOutText : 1137726106,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric69
},
42789526 : {
stringID : 2527873586,
localizedPopOutText : 320450665,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric70
},
223162703 : {
stringID : 2962875303,
localizedPopOutText : 448260558,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric69
},
2058662332 : {
stringID : 4288864126,
localizedPopOutText : 2598005645,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric70
},
488998310 : {
stringID : 1215787526,
localizedPopOutText : 236736453,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric71
},
1000001221 : {
stringID : 1521939279,
localizedPopOutText : 455252614,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric71
},
3339309328 : {
stringID : 2450799170,
localizedPopOutText : 3359241689,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric72
},
569481875 : {
stringID : 3662933611,
localizedPopOutText : 4079871354,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric72
},
214014959 : {
stringID : 296127787,
localizedPopOutText : 1231948218,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric73
},
2673439836 : {
stringID : 474554450,
localizedPopOutText : 2119475849,
importance : 5,
triggerTime : [30,
50],
category : simcity.TickerCategories.kGeneric74
},
3065292143 : {
stringID : 750532553,
localizedPopOutText : 1174824936,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric75
},
898033116 : {
stringID : 2332760268,
localizedPopOutText : 1062586963,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric75
},
4119722366 : {
stringID : 3673719986,
localizedPopOutText : 3680308201,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric76
},
2994741597 : {
stringID : 2653189403,
localizedPopOutText : 1691192202,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric76
},
3991231920 : {
stringID : 745239968,
localizedPopOutText : 776489279,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric77
},
3344725265 : {
stringID : 2457611813,
localizedPopOutText : 2785735356,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric78
},
3236061377 : {
stringID : 3883253965,
localizedPopOutText : 1119965076,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric72
},
3685232210 : {
stringID : 3980214368,
localizedPopOutText : 678937983,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric79
},
1705678572 : {
stringID : 1570575720,
localizedPopOutText : 1050282071,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric73
},
3463571167 : {
stringID : 1130127845,
localizedPopOutText : 635143164,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric80
},
2542308469 : {
stringID : 1782316973,
localizedPopOutText : 1376204404,
importance : 5,
triggerTime : [30,
50],
category : simcity.TickerCategories.kGeneric77
},
612522118 : {
stringID : 2763789504,
localizedPopOutText : 1700330079,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric81
},
1018356190 : {
localizedPopOutText : 3916215464,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric82
},
3337463196 : {
localizedPopOutText : 513949377,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric82
},
2474060671 : {
localizedPopOutText : 1285834481,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric82
},
3467124283 : {
localizedPopOutText : 1934039370,
importance : 1,
triggerTime : [3300, 3300],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric82
},
3118116995 : {
stringID : 2594565110,
localizedPopOutText : 1112740885,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric83
},
1818965712 : {
stringID : 2384376703,
localizedPopOutText : 4048637206,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric84
},
117525694 : {
stringID : 689798823,
localizedPopOutText : 108323534,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric83
},
1948498333 : {
stringID : 3729967742,
localizedPopOutText : 818533517,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
1919923391 : {
stringID : 1374009136,
localizedPopOutText : 3697086383,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric83
},
2146326444 : {
stringID : 3833598477,
localizedPopOutText : 834124884,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
104362725 : {
stringID : 773845013,
localizedPopOutText : 3476464652,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric83
},
2754023926 : {
stringID : 2615391208,
localizedPopOutText : 1330474967,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
3563247378 : {
stringID : 3386357701,
localizedPopOutText : 307867996,
importance : 5,
triggerTime : [30,
50],
category : simcity.TickerCategories.kGeneric86
},
3986736353 : {
stringID : 1203807576,
localizedPopOutText : 4234390247,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
3372460267 : {
stringID : 1131787822,
localizedPopOutText : 2983782237,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric86
},
196003928 : {
stringID : 2748274967,
localizedPopOutText : 455346398,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
2251708498 : {
stringID : 3380529585,
localizedPopOutText : 164609760,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric86
},
4027037473 : {
stringID : 597883796,
localizedPopOutText : 294712875,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric86
},
664726691 : {
stringID : 1113798592,
localizedPopOutText : 2815183711,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
4086896624 : {
stringID : 2564447645,
localizedPopOutText : 741388740,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
1302522794 : {
stringID : 2611181279,
localizedPopOutText : 3118533110,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
3788916089 : {
stringID : 2582388022,
localizedPopOutText : 1756861653,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
712475373 : {
stringID : 2302673100,
localizedPopOutText : 2291483219,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
1496290846 : {
stringID : 1152130345,
localizedPopOutText : 3263912776,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
865181461 : {
stringID : 714148598,
localizedPopOutText : 670988565,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
2648227878 : {
stringID : 2533745279,
localizedPopOutText : 1541431830,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
3263289223 : {
stringID : 1367275914,
localizedPopOutText : 3562329425,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
360068916 : {
stringID : 4132054131,
localizedPopOutText : 3192795026,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
489908703 : {
stringID : 907780724,
localizedPopOutText : 831818507,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
2087733452 : {
stringID : 2086482609,
localizedPopOutText : 882684384,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric85
},
4100655093 : {
localizedPopOutText : 169922733,
importance : 5,
triggerTime : [100, 100],
isRegional : !0,
category : simcity.TickerCategories.kGeneric87
},
3819042126 : {
localizedPopOutText : 3247291188,
importance : 5,
triggerTime : [100, 100],
isRegional : !0,
category : simcity.TickerCategories.kGeneric87
},
2359443595 : {
localizedPopOutText : 1793873937,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric87
},
3191875928 : {
localizedPopOutText : 2607133870,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric87
},
1849816363 : {
localizedPopOutText : 240889393,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 3,
isRegional : !0,
category : simcity.TickerCategories.kGeneric88
},
2179209047 : {
localizedPopOutText : 2155780581,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 3,
isRegional : !0,
category : simcity.TickerCategories.kGeneric89
},
1019633164 : {
localizedPopOutText : 2289302572,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 3,
isRegional : !0,
category : simcity.TickerCategories.kGeneric89
},
1615137518 : {
localizedPopOutText : 1652053912,
importance : 5,
triggerTime : [240, 240],
isRegional : !0,
category : simcity.TickerCategories.kGeneric90
},
1385030164 : {
localizedPopOutText : 1850651310,
importance : 5,
triggerTime : [100, 100],
isRegional : !0,
category : simcity.TickerCategories.kGeneric91
},
489091125 : {
localizedPopOutText : 1109717637,
importance : 5,
triggerTime : [100, 100],
isRegional : !0,
category : simcity.TickerCategories.kGeneric91
},
1174652592 : {
localizedPopOutText : 1644865992,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric92
},
714915676 : {
localizedPopOutText : 82595180,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 3,
isRegional : !0,
category : simcity.TickerCategories.kGeneric93
},
2241911229 : {
localizedPopOutText : 3031806319,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 3,
isRegional : !0,
category : simcity.TickerCategories.kGeneric94
},
3900350469 : {
localizedPopOutText : 235556425,
importance : 5,
triggerTime : [240, 240],
category : simcity.TickerCategories.kGeneric95
},
3477466969 : {
localizedPopOutText : 646014787,
importance : 5,
triggerTime : [300, 900],
isRegional : !0,
category : simcity.TickerCategories.kGeneric96
},
527284971 : {
localizedPopOutText : 4247226783,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric97
},
1091383536 : {
localizedPopOutText : 4020389466,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric98
},
2317981561 : {
localizedPopOutText : 2667027173,
importance : 5,
triggerTime : [300, 900],
isRegional : !0,
category : simcity.TickerCategories.kGeneric99
},
754895330 : {
localizedPopOutText : 2163248940,
importance : 5,
triggerTime : [300, 900],
isRegional : !0,
category : simcity.TickerCategories.kGeneric96
},
185554269 : {
localizedPopOutText : 739387759,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric100
},
642788878 : {
localizedPopOutText : 2667027173,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 3,
isRegional : !0,
category : simcity.TickerCategories.kGeneric99
},
2971140367 : {
stringID : 4223250222,
localizedPopOutText : 1996098141,
importance : 10,
triggerTime : [100, 110],
displayCountLimit : 1,
category : simcity.TickerCategories.kGeneric37
},
3314618110 : {
stringID : 4061670708,
localizedPopOutText : 2042266187,
importance : 5,
triggerTime : [30, 50],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric101
},
2249387993 : {
localizedPopOutText : 2792725529,
importance : 5,
triggerTime : [240, 240],
isRegional : !0,
category : simcity.TickerCategories.kGeneric102
},
1066921807 : {
localizedPopOutText : 956870575,
importance : 5,
triggerTime : [100, 100],
isRegional : !0,
category : simcity.TickerCategories.kGeneric103
},
2097013508 : {
localizedPopOutText : 2240768906,
importance : 5,
triggerTime : [100, 100],
isRegional : !0,
category : simcity.TickerCategories.kGeneric104
},
2455529609 : {
localizedPopOutText : 2442905343,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric104
},
2019190184 : {
localizedPopOutText : 3679794512,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 3,
isRegional : !0,
category : simcity.TickerCategories.kGeneric105
},
142759929 : {
localizedPopOutText : 942332319,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 3,
isRegional : !0,
category : simcity.TickerCategories.kGeneric105
},
2418364149 : {
localizedPopOutText : 1242946507,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 3,
isRegional : !0,
category : simcity.TickerCategories.kGeneric106
},
165657166 : {
localizedPopOutText : 1347684166,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 3,
isRegional : !0,
category : simcity.TickerCategories.kGeneric106
},
1380747748 : {
localizedPopOutText : 824517450,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 3,
isRegional : !0,
category : simcity.TickerCategories.kGeneric106
},
272039023 : {
localizedPopOutText : 3451752818,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric107
},
1299557211 : {
localizedPopOutText : 3329806142,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric108
},
1564911794 : {
localizedPopOutText : 2412481167,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric109
},
2763154245 : {
localizedPopOutText : 751219008,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric108
},
2945415290 : {
localizedPopOutText : 3932664359,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric107
},
744427913 : {
localizedPopOutText : 4219038316,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric110
},
2523044269 : {
localizedPopOutText : 1988095216,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric111
},
3419546264 : {
localizedPopOutText : 818528645,
importance : 5,
triggerTime : [300,
500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric112
},
2874050975 : {
localizedPopOutText : 3549539474,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric111
},
4157819788 : {
localizedPopOutText : 3223547841,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric107
},
2234484777 : {
localizedPopOutText : 2514089620,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric112
},
2591371939 : {
localizedPopOutText : 1882331710,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric113
},
2585087251 : {
localizedPopOutText : 213849823,
importance : 5,
triggerTime : [30, 50],
category : simcity.TickerCategories.kGeneric114
},
686752831 : {
localizedPopOutText : 1924559527,
importance : 5,
triggerTime : [1E4, 1E4],
displayCountLimit : 1,
isRegional : !0,
category : simcity.TickerCategories.kGeneric115
},
4215758728 : {
stringID : 513026910,
localizedPopOutText : 3475128813,
importance : 5,
triggerTime : [900, 1800],
displayCountLimit : 5,
category : simcity.TickerCategories.kGeneric116
},
3014702446 : {
localizedPopOutText : 3544364539,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric117
},
1236193741 : {
localizedPopOutText : 3231545360,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric118
},
1576530832 : {
localizedPopOutText : 4059281301,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric119
},
3507257078 : {
localizedPopOutText : 1992563027,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric120
},
2665834581 : {
localizedPopOutText : 3832201800,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric121
},
3427069192 : {
localizedPopOutText : 2866863517,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric122
},
2525503284 : {
localizedPopOutText : 3222186729,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric123
},
3761766791 : {
localizedPopOutText : 2870164106,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric124
},
938214978 : {
localizedPopOutText : 1241466655,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric125
},
2150332046 : {
localizedPopOutText : 2252669235,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric126
},
3479607021 : {
localizedPopOutText : 1617543720,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric127
},
1238396208 : {
localizedPopOutText : 1667006205,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric128
},
3315280111 : {
localizedPopOutText : 1930292442,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric129
},
4244910428 : {
localizedPopOutText : 2004425385,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric130
},
2540088839 : {
localizedPopOutText : 838471106,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric131
},
1070364894 : {
localizedPopOutText : 670308931,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric132
},
571912381 : {
localizedPopOutText : 1231624888,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric133
},
2862773152 : {
localizedPopOutText : 1719922413,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric134
},
2246151690 : {
localizedPopOutText : 3647679367,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric135
},
1357377753 : {
localizedPopOutText : 2167352172,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric136
},
1591856956 : {
localizedPopOutText : 646311617,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric137
},
1731593861 : {
localizedPopOutText : 4024194368,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric138
},
2805355414 : {
localizedPopOutText : 278555787,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric139
},
2344190529 : {
localizedPopOutText : 364085764,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric140
},
749303235 : {
localizedPopOutText : 777980846,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric141
},
1352231952 : {
localizedPopOutText : 2886818413,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric142
},
2916830987 : {
localizedPopOutText : 3357258342,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric143
},
2134550134 : {
localizedPopOutText : 2749148075,
importance : 5,
triggerTime : [30, 50],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric144
},
2169095412 : {
localizedPopOutText : 875552640,
importance : 5,
triggerTime : [30, 50],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric145
},
972812271 : {
localizedPopOutText : 225652453,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric146
},
2430323423 : {
localizedPopOutText : 1436863154,
importance : 5,
triggerTime : [30, 50],
isRegional : !0,
category : simcity.TickerCategories.kGeneric147
},
1558485452 : {
localizedPopOutText : 3593133473,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric148
},
2867964951 : {
localizedPopOutText : 3567986378,
importance : 5,
triggerTime : [120, 120],
isRegional : !0,
category : simcity.TickerCategories.kGeneric149
},
3492598502 : {
localizedPopOutText : 3528029561,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric150
},
3248744848 : {
localizedPopOutText : 2127174083,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric150
},
2544231940 : {
localizedPopOutText : 821588519,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric150
},
436794662 : {
localizedPopOutText : 1554329881,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric150
},
2597422333 : {
localizedPopOutText : 3481791134,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric150
},
1915414808 : {
localizedPopOutText : 1411514923,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric151
},
338868450 : {
localizedPopOutText : 3864748693,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric151
},
4264875246 : {
localizedPopOutText : 1903064225,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric151
},
4205117752 : {
localizedPopOutText : 4184348283,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric151
},
2346385127 : {
localizedPopOutText : 594173416,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric151
},
2737418649 : {
localizedPopOutText : 759571228,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric152
},
794046589 : {
localizedPopOutText : 1935915552,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric152
},
2834101256 : {
localizedPopOutText : 2286471253,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric152
},
3119121743 : {
localizedPopOutText : 2880055138,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric152
},
3857351228 : {
localizedPopOutText : 205314193,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric152
},
3629485403 : {
localizedPopOutText : 884167910,
importance : 5,
triggerTime : [300,
500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric153
},
1902955551 : {
localizedPopOutText : 542822730,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric153
},
2323216350 : {
localizedPopOutText : 1686127075,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric153
},
2064983649 : {
localizedPopOutText : 2223125092,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric153
},
2800738454 : {
localizedPopOutText : 3585208379,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric153
},
1532002531 : {
localizedPopOutText : 3375705862,
importance : 5,
triggerTime : [300, 500],
displayCountLimit : 5,
isRegional : !0,
category : simcity.TickerCategories.kGeneric152
}
};
simcity.CitySpecializationGuideUI = {};
simcity.cCitySpecializationHandler = {
selectedSpecialization : 0,
guidedSpecialization : 0
};
simcity.cCitySpecializationHandler.Init = function () {
this.selectedSpecialization = simcity.Specializations.Gambling;
this.guidedSpecialization = simcity.Specializations.UnGuided;
this.CheckSpecializationBins()
};
simcity.cCitySpecializationHandler.CheckSpecializationBins = function () {
var a = [scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDSpecialization_Guided]), scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDSpecialization_Education]), scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDSpecialization_Gambling]), scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDSpecialization_Metals]), scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDSpecialization_Petroleum]),
scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDSpecialization_Trade]), scrui.BuildRequestQuery([simcity.kDataBinAmount, simcity.kResourceIDSpecialization_Electronics])],
b = this;
scrui.RequestGameData(a, function (a) {
a[0] ? 0 < a[1] ? b.guidedSpecialization = simcity.Specializations.Education : 0 < a[2] ? b.guidedSpecialization = simcity.Specializations.Gambling : 0 < a[3] ? b.guidedSpecialization = simcity.Specializations.Metals : 0 < a[4] ? b.guidedSpecialization = simcity.Specializations.Petroleum : 0 < a[5] ? b.guidedSpecialization =
simcity.Specializations.Trade : 0 < a[6] && (b.guidedSpecialization = simcity.Specializations.Electronics) : b.guidedSpecialization = simcity.Specializations.UnGuided
})
};
simcity.cCitySpecializationHandler.SelectNewCitySpecializationGuide = function (a) {
a = (a = simcity.kSpecializationDataBindings[a]) && a.hasOwnProperty("selectionUnit") ? a.selectionUnit : 90013432;
scrui.PostGameCommand(scrui.BuildCommand([simcity.kCommandCreateUnit, a]));
this.CheckSpecializationBins()
};
simcity.cCitySpecializationHandler.GetCurrentSpecialization = function () {
return this.guidedSpecialization
};
simcity.QuickTextField = {};
var QuickTextField = function (a) {
this.mTargetDivID = a.targetDivID || null;
this.mTargetDivObj = null;
this.mEditIconClass = a.editIconClass || "pencilIcon";
this.mTextFieldClassName = a.textFieldClass || "inputInnerShadow roundCorners5px";
this.mEditableClassName = "editableField";
this.mNewFieldValue = this.mDefaultFieldValue = "";
this.mInEditMode = !1;
this.mFormAction = null;
this.mFormMethod = "post";
this.mEventListeners = [];
this.mInputFieldObj = null;
this.mOnSave = a.onSave || new Function;
this.mEventListeners = [];
this.mTargetDivID &&
(this.mTargetDivObj = document.getElementById(this.mTargetDivID), null !== this.mTargetDivObj && (this.mDefaultFieldValue = this.mTargetDivObj.innerHTML, this.SetListenerState("default"), this.mTargetDivObj.innerHTML += "<span class='pencilIcon'></span>", this.mTargetDivObj.className = this.mTargetDivObj.className + " " + this.mEditableClassName))
};
QuickTextField.prototype.OnKeyDown = function (a, b) {
27 == a.keyCode && b.ToggleEditMode();
13 == a.keyCode && b.SubmitForm()
};
QuickTextField.prototype.OnClick = function (a, b) {
b.ToggleEditMode()
};
QuickTextField.prototype.ToggleEditMode = function () {
if (this.mInEditMode)
this.mTargetDivObj.style.color = "#fffffd", this.mTargetDivObj.innerHTML = "", this.mTargetDivObj.innerHTML = this.mDefaultFieldValue + "<span class='pencilIcon'></span>", this.mInEditMode = !1, this.SetListenerState("default");
else {
this.mTargetDivObj.style.color = "#2e5c71";
var a = document.createElement("div");
a.className = this.mTextFieldClassName;
var b = document.createElement("input");
b.type = "text";
b.value = this.mDefaultFieldValue;
a.appendChild(b);
this.mInputFieldObj = b;
this.mTargetDivObj.innerHTML = "";
this.mTargetDivObj.appendChild(a);
b.focus();
this.mInEditMode = !0;
this.SetListenerState("edit")
}
};
QuickTextField.prototype.SubmitForm = function () {
this.mDefaultFieldValue !== this.mInputFieldObj.value && (this.mDefaultFieldValue = this.mInputFieldObj.value, this.mOnSave(this.mInputFieldObj.value));
this.ToggleEditMode()
};
QuickTextField.prototype.RemoveAllListeners = function () {
for (; 0 < this.mEventListeners.length; ) {
var a = this.mEventListeners.pop();
a[0].removeEventListener ? a[0].removeEventListener(a[1], a[2], !1) : a[0].detachEvent(a[1], a[2])
}
};
QuickTextField.prototype.SetListenerState = function (a) {
this.RemoveAllListeners();
var b = this;
"default" === a ? (a = function (a) {
b.OnClick(a, b)
}, b.mTargetDivObj.addEventListener ? (b.mTargetDivObj.addEventListener("click", a, !1), b.mEventListeners.push([b.mTargetDivObj, "click", a])) : (b.mTargetDivObj.attachEvent("onclick", a), b.mEventListeners.push([b.mTargetDivObj, "onclick", a]))) : (a = function (a) {
b.SubmitForm(a, b)
}, b.mInputFieldObj.addEventListener ? (b.mInputFieldObj.addEventListener("blur", a, !1), b.mEventListeners.push([b.mInputFieldObj,
"blur", a])) : (b.mInputFieldObj.attachEvent("onblur", a), b.mEventListeners.push([b.mInputFieldObj, "onblur", a])), a = function (a) {
b.OnKeyDown(a, b)
}, b.mInputFieldObj.addEventListener) ? (b.mInputFieldObj.addEventListener("keydown", a, !1), b.mEventListeners.push([b.mInputFieldObj, "keydown", a])) : (b.mInputFieldObj.attachEvent("onkeydown", a), b.mEventListeners.push([b.mInputFieldObj, "onkeydown", a]))
};
simcity.databindings.DataBindingsPopupMenu = {};
simcity.kWinPopupIconID = 181820561;
simcity.kPropBuildingInfo = 236183466;
simcity.SetPopupItemIcon = function (a, b) {
if (b) {
var c = a.FindControlByID(simcity.kWinPopupIconID);
null !== c && c.SetWindowImage(b)
}
};
simcity.PopupItems = {};
simcity.PopupItems.kToggleLayer = {
layoutPath : "Layouts/PopupMenu/PopupMenuItemToggle.js",
tooltipString : {
tableID : "GlobalUI.json",
stringID : "0x0b287e59",
placeholder : "kPopupItemToggleLayer"
},
closeMenu : !1,
allowNullResults : !0,
initQueries : function () {
return {
layerKey : ["selectedUnit", "categoryProperties", simcity.kPropToolCategoryLayerKey],
layerIconKeys : ["selectedUnit", "categoryProperties", simcity.kPropToolCategoryIconKeys]
}
},
initTest : function (a) {
return a.layerKey && a.layerIconKeys ? !0 : !1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment