Changes

m
no edit summary
Line 1: Line 1: −
local _ = require('Module:Core')
+
local U = require('Module:Core')
 +
local F = require('Module:Formatting')
 
local view = require('Module:View')
 
local view = require('Module:View')
 
local data = require('Module:Data/Expedition')
 
local data = require('Module:Data/Expedition')
Line 13: Line 14:     
local template = [=[|-
 
local template = [=[|-
|style="${style}"|{{tooltip|${id}|ID number as displayed in the game}}
+
|style="${style}"|${id}
|style="${style}"|{{tooltip|${name}|${details}}}
+
|style="${style}"|${name}
|style="${style}"|{{tooltip|${time}|Time required for expedition}}
+
|style="${style}"|${time}
|style="${style}"|{{tooltip|${hq}|Admiral experience gained upon completion from this expedition}}
+
|style="${style}"|${hq}
|style="${style}"|{{tooltip|${ship}|Ship experience gained upon completion from this expedition}}
+
|style="${style}"|${ship}
|style="${style}"|{{tooltip|${fuel}|Base resources gain from expedition (at 100% ratio)}}
+
|style="${style}"|${fuel}
|style="${style}"|{{tooltip|${ammo}|Base resources gain from expedition (at 100% ratio)}}
+
|style="${style}"|${ammo}
|style="${style}"|{{tooltip|${steel}|Base resources gain from expedition (at 100% ratio)}}
+
|style="${style}"|${steel}
|style="${style}"|{{tooltip|${bauxite}|Base resources gain from expedition (at 100% ratio)}}
+
|style="${style}"|${bauxite}
 
|style="${style}"|${item1}
 
|style="${style}"|${item1}
 
|style="${style}"|${item2}]=]
 
|style="${style}"|${item2}]=]
Line 31: Line 32:  
local function render(args)
 
local function render(args)
 
   local id = args.explicit.id
 
   local id = args.explicit.id
   local e = _.ifindBy(data, function(e) return e.disp_no == id end)
+
   local e = U.ifindBy(data, function(e) return e.disp_no == id end)
   return _.format{
+
   return U.format{
 
     template,
 
     template,
 
     style = string.format('text-align: center; height: 35px; background: #%s; color:#000', backgrounds[e.maparea_id] or backgrounds[0]),
 
     style = string.format('text-align: center; height: 35px; background: #%s; color:#000', backgrounds[e.maparea_id] or backgrounds[0]),
     id = id,
+
     id = F:tooltip(id, 'ID number as displayed in game'),
     name = e.name,
+
     name = F:tooltip(e.name, e.details),
    details = e.details,
+
     time = F:tooltip(formatTime(e.time), 'Time required for expedition'),
     time = formatTime(e.time),
+
     hq = F:tooltip(args.explicit.hq or '??', 'Admiral experience gained upon completion from this expedition'),
     hq = args.explicit.hq,
+
     ship = F:tooltip(args.explicit.ship or '??', 'Ship experience gained upon completion from this expedition'),
     ship = args.explicit.ship,
+
     fuel = F:tooltip(args.explicit.fuel or '??', 'Base resources gain from expedition (at 100% ratio)'),
     fuel = args.explicit.fuel,
+
     ammo = F:tooltip(args.explicit.ammo or '??', 'Base resources gain from expedition (at 100% ratio)'),
     ammo = args.explicit.ammo,
+
     steel = F:tooltip(args.explicit.steel or '??', 'Base resources gain from expedition (at 100% ratio)'),
     steel = args.explicit.steel,
+
     bauxite = F:tooltip(args.explicit.bauxite or '??', 'Base resources gain from expedition (at 100% ratio)'),
     bauxite = args.explicit.bauxite,
+
     item1 = args.explicit.item1 or '??',
     item1 = args.explicit.item1,
+
     item2 = args.explicit.item2 or '??',
     item2 = args.explicit.item2,
   
   }
 
   }
 
end
 
end
cssedit, gkautomate
7,064

edits