Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 4 commits
  • 4 files changed
  • 0 comments
  • 1 contributor
29 buildingSpacePort.js
@@ -39,7 +39,7 @@ if (typeof YAHOO.lacuna.buildings.SpacePort == "undefined" || !YAHOO.lacuna.buil
39 39 return [this._getTravelTab(), this._getViewTab(), this._getOrbitingTab(), this._getForeignTab(), this._getSendTab(), this._getSendFleetTab()];
40 40 },
41 41 _getTravelTab : function() {
42   - this.travelTab = new YAHOO.widget.Tab({ label: "Traveling", content: [
  42 + this.travelTab = new YAHOO.widget.Tab({ label: "Travelling", content: [
43 43 '<div>',
44 44 ' <div style="overflow:auto;margin-top:2px;">',
45 45 ' <ul id="shipDetails"></ul>',
@@ -175,14 +175,14 @@ if (typeof YAHOO.lacuna.buildings.SpacePort == "undefined" || !YAHOO.lacuna.buil
175 175
176 176 getTravel : function(e) {
177 177 if(e.newValue) {
178   - if(!this.shipsTraveling) {
  178 + if(!this.shipsTravelling) {
179 179 Lacuna.Pulser.Show();
180 180 this.service.view_ships_travelling({session_id:Game.GetSession(),building_id:this.building.id,page_number:1}, {
181 181 success : function(o){
182 182 YAHOO.log(o, "info", "SpacePort.view_ships_travelling.success");
183 183 Lacuna.Pulser.Hide();
184 184 this.rpcSuccess(o);
185   - this.shipsTraveling = {
  185 + this.shipsTravelling = {
186 186 number_of_ships_travelling: o.result.number_of_ships_travelling,
187 187 ships_travelling: o.result.ships_travelling
188 188 };
@@ -310,7 +310,7 @@ if (typeof YAHOO.lacuna.buildings.SpacePort == "undefined" || !YAHOO.lacuna.buil
310 310 },
311 311
312 312 SpacePortPopulate : function() {
313   - var ships = this.shipsTraveling.ships_travelling,
  313 + var ships = this.shipsTravelling.ships_travelling,
314 314 details = Dom.get("shipDetails");
315 315
316 316 if(details) {
@@ -392,7 +392,7 @@ if (typeof YAHOO.lacuna.buildings.SpacePort == "undefined" || !YAHOO.lacuna.buil
392 392 YAHOO.log(o, "info", "SpacePort.ShipHandlePagination.view_ships_travelling.success");
393 393 Lacuna.Pulser.Hide();
394 394 this.rpcSuccess(o);
395   - this.shipsTraveling = {
  395 + this.shipsTravelling = {
396 396 number_of_ships_travelling: o.result.number_of_ships_travelling,
397 397 ships_travelling: o.result.ships_travelling
398 398 };
@@ -620,7 +620,7 @@ if (typeof YAHOO.lacuna.buildings.SpacePort == "undefined" || !YAHOO.lacuna.buil
620 620 Lacuna.Pulser.Hide();
621 621 this.Self.rpcSuccess(o);
622 622 delete this.Self.shipsView;
623   - delete this.Self.shipsTraveling;
  623 + delete this.Self.shipsTravelling;
624 624 this.Ship.name = newName;
625 625 if(this.Input) {
626 626 this.Input.value = newName;
@@ -936,12 +936,12 @@ if (typeof YAHOO.lacuna.buildings.SpacePort == "undefined" || !YAHOO.lacuna.buil
936 936 this.Self.result.docks_available++;
937 937 info.innerHTML = ['This SpacePort can dock a maximum of ', this.Self.result.max_ships, ' ships. There are ', this.Self.result.docks_available, ' docks available.'].join('');
938 938 }
939   - //set to traveling
  939 + //set to travelling
940 940 var ad = Sel.query("ul.shipActionDetails", this.Line, true);
941 941 ad.innerHTML = this.Self.ViewActionDetails(this.Line, o.result.ship, true);
942 942
943   - //remove ships traveling so the tab gets reloaded when viewed next time
944   - delete this.Self.shipsTraveling;
  943 + //remove ships travelling so the tab gets reloaded when viewed next time
  944 + delete this.Self.shipsTravelling;
945 945 },
946 946 failure : function(o){
947 947 matchedEl.disabled = false;
@@ -962,7 +962,7 @@ if (typeof YAHOO.lacuna.buildings.SpacePort == "undefined" || !YAHOO.lacuna.buil
962 962 Lacuna.Pulser.Hide();
963 963 this.rpcSuccess(o);
964 964
965   - delete this.shipsTraveling;
  965 + delete this.shipsTravelling;
966 966 delete this.shipsView;
967 967 this.getShips({newValue:true});
968 968 },
@@ -1084,7 +1084,7 @@ if (typeof YAHOO.lacuna.buildings.SpacePort == "undefined" || !YAHOO.lacuna.buil
1084 1084 Lacuna.Pulser.Hide();
1085 1085 this.Self.rpcSuccess(o);
1086 1086 delete this.Self.shipsView;
1087   - delete this.Self.shipsTraveling;
  1087 + delete this.Self.shipsTravelling;
1088 1088 this.Self.GetShipsFor();
1089 1089 Event.purgeElement(this.Line, true);
1090 1090 this.Line.innerHTML = "Successfully sent " + this.Ship.type_human + ".";
@@ -1196,12 +1196,13 @@ if (typeof YAHOO.lacuna.buildings.SpacePort == "undefined" || !YAHOO.lacuna.buil
1196 1196 var btn = Event.getTarget(e);
1197 1197 btn.disabled = true;
1198 1198
1199   - var speed = Dom.get("setSpeed").value;
  1199 + var speed = parseInt(Dom.get("setSpeed").value,10);
1200 1200 var selected = Sel.query("input:checked", "sendFleetAvail");
1201 1201 if(selected.length > 0) {
1202   - var ships = [], shipIds = [], confirmIso, minSpeed = 99999999;
  1202 + var ships = [], shipIds = [], minSpeed = 999999999;
1203 1203 for(var n=0; n<selected.length; n++) {
1204 1204 var s = selected[n].Ship;
  1205 + s.speed = parseInt(s.speed,10); // probably not needed but play it safe
1205 1206 ships.push(s);
1206 1207 shipIds.push(s.id);
1207 1208 if (s.speed < minSpeed) {
@@ -1230,7 +1231,7 @@ if (typeof YAHOO.lacuna.buildings.SpacePort == "undefined" || !YAHOO.lacuna.buil
1230 1231 btn.disabled = false;
1231 1232 delete this.FleetTarget;
1232 1233 delete this.shipsView;
1233   - delete this.shipsTraveling;
  1234 + delete this.shipsTravelling;
1234 1235 this.GetFleetFor();
1235 1236 },
1236 1237 failure : function(o){
2  load.js
@@ -494,7 +494,7 @@
494 494 'breaking atmo',
495 495 'calculating trajectory',
496 496 'engaging hyper drive',
497   - 'traveling the verse',
  497 + 'travelling the verse',
498 498 'other witty comments',
499 499 'reticulating splines',
500 500 'compacting nebulas',
5 mapStar.js
@@ -908,12 +908,13 @@ if (typeof YAHOO.lacuna.MapStar == "undefined" || !YAHOO.lacuna.MapStar) {
908 908 panel = this.starDetails;
909 909 }
910 910
911   - var speed = Dom.get((panel.isStarPanel ? "starDetailSetSpeed" : "planetDetailSetSpeed")).value;
  911 + var speed = parseInt(Dom.get(panel.isStarPanel ? "starDetailSetSpeed" : "planetDetailSetSpeed").value,10);
912 912 var selected = Sel.query("input:checked", (panel.isStarPanel ? "starDetailSendFleet" : "planetDetailSendFleet"));
913 913 if(selected.length > 0) {
914   - var ships = [], shipIds = [], confirmIso, minSpeed = 99999999;
  914 + var ships = [], shipIds = [], minSpeed = 999999999;
915 915 for(var n=0; n<selected.length; n++) {
916 916 var s = selected[n].Ship;
  917 + s.speed = parseInt(s.speed,10); // probably not needed but play it safe
917 918 ships.push(s);
918 919 shipIds.push(s.id);
919 920 if (s.speed < minSpeed) {
7 moduleParliament.js
@@ -95,7 +95,6 @@ if (typeof YAHOO.lacuna.modules.Parliament == "undefined" || !YAHOO.lacuna.modul
95 95 return tab;
96 96 },
97 97 _getCreateTab : function() {
98   -
99 98 this.createEvent("onAllianceMembers");
100 99
101 100 var opts = ['<option value="proposeWrit" selected>Writ</option>'],
@@ -115,7 +114,7 @@ if (typeof YAHOO.lacuna.modules.Parliament == "undefined" || !YAHOO.lacuna.modul
115 114 opts = [];
116 115 for(var n=0; n<this.allianceMembers.length; n++) {
117 116 var member = this.allianceMembers[n];
118   - if(!member.isLeader) {
  117 + if(member.id != Game.EmpireData.id) {
119 118 opts[opts.length] = '<option value="'+member.id+'">'+member.name+'</option>';
120 119 }
121 120 }
@@ -205,7 +204,7 @@ if (typeof YAHOO.lacuna.modules.Parliament == "undefined" || !YAHOO.lacuna.modul
205 204 opts = [];
206 205 for(var n=0; n<this.allianceMembers.length; n++) {
207 206 var member = this.allianceMembers[n];
208   - if(!member.isLeader) {
  207 + if(!member.isLeader && member.id != Game.EmpireData.id) {
209 208 opts[opts.length] = '<option value="'+member.id+'">'+member.name+'</option>';
210 209 }
211 210 }
@@ -230,7 +229,7 @@ if (typeof YAHOO.lacuna.modules.Parliament == "undefined" || !YAHOO.lacuna.modul
230 229 opts = [];
231 230 for(var n=0; n<this.allianceMembers.length; n++) {
232 231 var member = this.allianceMembers[n];
233   - if(!member.isLeader) {
  232 + if(!member.isLeader && member.id != Game.EmpireData.id) {
234 233 opts[opts.length] = '<option value="'+member.id+'">'+member.name+'</option>';
235 234 }
236 235 }

No commit comments for this range

Something went wrong with that request. Please try again.