Showing 509 of 1,320 total issues
Function StashExchangeAdd
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
StashExchangeAdd : function(e, matchedEl, container){
var quantity = Lib.getSelectedOptionValue(matchedEl.previousSibling)*1,
li = matchedEl.parentNode,
c = Dom.get("embassyStashToExchange");
if(quantity && c) {
Consider simplifying this complex logical expression. Open
Open
if (typeof YAHOO.rpc.Service == "undefined" || !YAHOO.rpc.Service) {
(function() {
var Lang = YAHOO.lang,
Function getTileData
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getTileData : function(callback, x1, x2, y1, y2) {
var xDiff = Math.abs(x2-x1),
yDiff = Math.abs(y2-y1);
if((xDiff * yDiff) > MAX_STAR_AREA) { //if out of bounds split and try again
Function viewSupplyShips
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
viewSupplyShips : function(e) {
// we have 2 asynchronous functions below both wanting to hide
// the pulser - keep a count of requests so it only gets hidden
// once they've both completed
var request_count = 0;
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render : function() {
return (
<div>
<div
className="ui horizontal inverted divider"
Function _getOneForOneTab
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_getOneForOneTab : function() {
this.oneForOne = new YAHOO.widget.Tab({ label: "One For One", content: ['<div class="transporterOneForOne">',
'<div>You may trade one-for-one with Lacuna Corp for 3<img src="',Lib.AssetUrl,'ui/s/essentia.png" class="smallEssentia smallImg" /> per transaction.</div>',
'<ul>',
' <li><label>Want:</label><select id="transporterOneForOneWant"></select></li>',
Function _getOreTab
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_getOreTab : function() {
var stored = this.result.ore_stored;
var details = function(type) {
return [
'<li title="',Lib.formatNumber(stored[type]),'"><label>',
Function Abandon
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Abandon : function() {
var cp = Game.GetCurrentPlanet();
if(confirm(['Are you sure you want to abandon ',cp.name,'?'].join(''))) {
require('js/actions/menu/loader').show();
Game.Services.Body.abandon({
Function _getSupplyChainTab
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_getSupplyChainTab : function() {
var planets = Lib.planetarySort(Game.EmpireData.planets),
current_planet = Game.GetCurrentPlanet(),
target_options = "";
Function ShowSpies
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ShowSpies : function(tab) {
Dom.setStyle(tab.elSpiesPane, 'display', 'block');
Dom.setStyle(tab.elSpyShipsPane, 'display', 'none');
if ( tab.avail && tab.avail.spies && tab.avail.spyShips ) {
return;
Function resetDisplay
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.planetDetails.resetDisplay = function(oSelf) {
delete oSelf.currentShips;
delete oSelf.selectedBody;
delete oSelf.selectedTile;
this.resetQueue();
Function ShipyardDisplay
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ShipyardDisplay : function() {
var bq = this.ship_build_queue,
div = Dom.get("shipsBuilding");
if(div) {
Function CreateStarSearch
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
CreateStarSearch : function(id) {
var dataSource = new Util.XHRDataSource("/map");
dataSource.connMethodPost = "POST";
dataSource.maxCacheEntries = 2;
dataSource.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;
Function Dump
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Dump : function(e) {
var building = this.building;
if(building) {
var sel = Dom.get("type");
var type = sel[sel.selectedIndex].value;
Function Dump
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Dump : function(e) {
var building = this.building;
if(building) {
var sel = Dom.get("type");
var type = sel[sel.selectedIndex].value;
Function PendingPopulate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
PendingPopulate : function() {
var details = Dom.get("embassySendDetails");
if(details) {
var pendingInvites = this.pendingInvites,
ul = document.createElement("ul"),
Function _createToSelect
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createToSelect : function() {
var dataSource = new Util.XHRDataSource("/empire");
dataSource.connMethodPost = "POST";
dataSource.maxCacheEntries = 2;
dataSource.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;
Function ReserveSubmit
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ReserveSubmit : function() {
var data = {
session_id: Game.GetSession(""),
building_id: this.building.id
},
Function getResourceStatus
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getResourceStatus : function(hour, stored, capicity, hasCapicity) {
// Different players have differnet strategies regarding waste. Some would consider full
// waste good. Some would consider empty waste good. Therefore, we shouldn't comment
// on what a player does or does not do with their waste.
if (this.props.type === 'waste') {
Function move
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
move : function(mx,my) {
var mb = this._map.maxBounds; // = {x1Left:-15,x2Right:15,y1Top:15,y2Bottom:-15};
var maxWidth = this._map.width;
var maxHeight = this._map.height;
if(mb) {