Permalink
Browse files

Merge branch 'master' into us1

  • Loading branch information...
2 parents 38086e9 + cf31d6a commit e10b0f3105dfacb5dada9af4a3af6d6fb336ceed ian docherty committed Jan 27, 2012
Showing with 96 additions and 6 deletions.
  1. +1 −1 about.js
  2. +64 −0 buildingTheDillonForge.js
  3. +5 −5 buildingTradeMinistry.js
  4. +7 −0 load.js
  5. +1 −0 mapPlanet.js
  6. +18 −0 smd.js
View
@@ -1,5 +1,5 @@
YAHOO.namespace("lacuna");
-
+
if (typeof YAHOO.lacuna.About == "undefined" || !YAHOO.lacuna.About) {
(function(){
@@ -0,0 +1,64 @@
+YAHOO.namespace("lacuna.buildings");
+
+if (typeof YAHOO.lacuna.buildings.TheDillonForge == "undefined" || !YAHOO.lacuna.buildings.TheDillonForge) {
+
+(function(){
+ var Lang = YAHOO.lang,
+ Util = YAHOO.util,
+ Dom = Util.Dom,
+ Event = Util.Event,
+ Lacuna = YAHOO.lacuna,
+ Game = Lacuna.Game,
+ Lib = Lacuna.Library;
+
+ var TheDillonForge = function(result){
+ TheDillonForge.superclass.constructor.call(this, result);
+
+ this.service = Game.Services.Buildings.TheDillonForge;
+ };
+
+ Lang.extend(TheDillonForge, Lacuna.buildings.Building, {
+ getChildTabs : function() {
+ return [this._getSplitTab(), this._getMakeTab()];
+ },
+ _getSplitTab : function() {
+ this.splitTab = new YAHOO.widget.Tab({ label: "Split Plans", content: [
+ '<div id="forgeSplitReadyContainer">',
+ ' Ready to split a plan',
+ ' <button id="forgeSplitButton">Split</button>',
+ '</div>',
+ '<div id="forgeSplitWorkingContainer">',
+ ' Forge is busy splitting a plan',
+ '</div>',
+ ].join('')});
+
+ return this.splitTab;
+ },
+ _getMakeTab : function() {
+ this.makeTab = new YAHOO.widget.Tab({ label: "Combine Plans", content: [
+ '<div id="TheDillonForge_make">',
+ ' Combine level 1 plans into higher level plans.',
+ '</div>'
+ ].join('')});
+ return this.makeTab;
+ },
+ checkIfWorking : function() {
+ if(this.result.tasks.can && this.result.tasks.seconds_remaining) {
+ Dom.setStyle("forgeSplitReadyContainer", "display", "none");
+ Dom.setStyle("forgeSplitWorkingContainer", "display", "");
+ }
+ else {
+ Dom.setStyle("forgeSplitReadyContainer", "display", "");
+ Dom.setStyle("forgeSplitWorkingContainer", "display", "none");
+ }
+ }
+
+ });
+
+ YAHOO.lacuna.buildings.TheDillonForge = TheDillonForge;
+
+})();
+YAHOO.register("TheDillonForge", YAHOO.lacuna.buildings.TheDillonForge, {version: "1", build: "0"});
+
+}
+// vim: noet:ts=4:sw=4
@@ -238,7 +238,7 @@ _getAvailTab : function() {
' <option value="ship">Ship</option><option value="plan">Plan</option></select></div>',
' <ul class="tradeHeader tradeInfo clearafter">',
' <li class="tradeEmpire">Empire</li>',
- ' <li class="tradeOfferedDate">Offered Date</li>',
+ ' <li class="tradeOfferedDate">Travel Time</li>',
' <li class="tradeAsking">Cost</li>',
' <li class="tradeOffer">Offering</li>',
' <li class="tradeAction"></li>',
@@ -462,10 +462,10 @@ _getAddTab : function() {
Event.on(nLi, "click", this.EmpireProfile, trade.empire);
nUl.appendChild(nLi);
- nLi = li.cloneNode(false);
- Dom.addClass(nLi,"tradeOfferedDate");
- nLi.innerHTML = Lib.formatServerDateTimeShort(trade.date_offered);
- nUl.appendChild(nLi);
+ nLi = li.cloneNode(false);
+ Dom.addClass(nLi,"tradeOfferedDate");
+ nLi.innerHTML = Lib.formatTime(Math.round(trade.delivery.duration));
+ nUl.appendChild(nLi);
nLi = li.cloneNode(false);
Dom.addClass(nLi,"tradeAsking");
View
@@ -322,6 +322,12 @@
fullpath: urlBuilder("buildingThemePark.js"),
requires : ["building"]
});
+ loader.addModule({
+ name: "thedillonforge",
+ type: "js",
+ fullpath: urlBuilder("buildingTheDillonForge.js"),
+ requires : ["building"]
+ });
loader.addModule({
name: "trade",
type: "js",
@@ -411,6 +417,7 @@
"templeofthedrajilites",
"thefttraining",
"themepark",
+ "thedillonforge",
"trade",
"transporter",
"waterstorage",
View
@@ -46,6 +46,7 @@ if (typeof YAHOO.lacuna.MapPlanet == "undefined" || !YAHOO.lacuna.MapPlanet) {
"/subspacesupplydepot": Lacuna.buildings.SubspaceSupplyDepot,
"/thefttraining": Lacuna.buildings.TheftTraining,
"/themepark": Lacuna.buildings.ThemePark,
+ "/thedillonforge": Lacuna.buildings.TheDillonForge,
"/templeofthedrajilites": Lacuna.buildings.TempleOfTheDrajilites,
"/trade": Lacuna.buildings.Trade,
"/transporter": Lacuna.buildings.Transporter,
View
@@ -2225,6 +2225,24 @@ if (typeof YAHOO.lacuna.SMD == "undefined" || !YAHOO.lacuna.SMD) {
}
}
},
+ TheDillonForge : {
+ "SMDVersion":"2.0",
+ "description": "The Dillon Forge",
+ "envelope":"JSON-RPC-2.0",
+ "transport":"POST",
+ "target":"/thedillonforge",
+
+ "services": {
+ "operate" : {
+ "description": "",
+ "parameters": [
+ {"name":"session_id", "type":"string", "optional":false},
+ {"name":"building_id", "type":"string", "optional":false}
+ ],
+ "returns":{"type":"object"}
+ }
+ }
+ },
Trade : {
"SMDVersion":"2.0",
"description": "Trade",

0 comments on commit e10b0f3

Please sign in to comment.