Changes

no edit summary
Line 11: Line 11:  
   [4] = 'C5E6D5',
 
   [4] = 'C5E6D5',
 
   [5] = 'D3D3EB',
 
   [5] = 'D3D3EB',
 +
  -- [7] = '?',
 
}
 
}
   Line 35: Line 36:     
local function render(args)
 
local function render(args)
   local id = args.explicit.id
+
   local es = U.ifilter(data, function(e) return e.maparea_id == args.explicit.world end)
  local e = U.ifindBy(data, function(e) return e.disp_no == id end)
+
   return U.joinLines(U.imap(es, function(e)
   return U.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 = tooltip(id, 'ID number as displayed in game'),
+
      id = tooltip(e.disp_no, 'ID number as displayed in game'),
    name = tooltip(e.name, e.details),
+
      name = tooltip(e.name, e.details),
    time = tooltip(formatTime(e.time), 'Time required for expedition'),
+
      time = tooltip(formatTime(e.time), 'Time required for expedition'),
    hq = tooltip(args.explicit.hq or '??', 'Admiral experience gained upon completion from this expedition'),
+
      hq = tooltip(args.explicit.hq or '??', 'Admiral experience gained upon completion from this expedition'),
    ship = tooltip(args.explicit.ship or '??', 'Ship experience gained upon completion from this expedition'),
+
      ship = tooltip(args.explicit.ship or '??', 'Ship experience gained upon completion from this expedition'),
    fuel = tooltip(args.explicit.fuel or '??', 'Base resources gain from expedition (at 100% ratio)'),
+
      fuel = tooltip(args.explicit.fuel or '??', 'Base resources gain from expedition (at 100% ratio)'),
    ammo = tooltip(args.explicit.ammo or '??', 'Base resources gain from expedition (at 100% ratio)'),
+
      ammo = tooltip(args.explicit.ammo or '??', 'Base resources gain from expedition (at 100% ratio)'),
    steel = tooltip(args.explicit.steel or '??', 'Base resources gain from expedition (at 100% ratio)'),
+
      steel = tooltip(args.explicit.steel or '??', 'Base resources gain from expedition (at 100% ratio)'),
    bauxite = tooltip(args.explicit.bauxite or '??', 'Base resources gain from expedition (at 100% ratio)'),
+
      bauxite = tooltip(args.explicit.bauxite or '??', 'Base resources gain from expedition (at 100% ratio)'),
    item1 = args.explicit.item1 or '??',
+
      item1 = args.explicit.item1 or '??',
    item2 = args.explicit.item2 or '??',
+
      item2 = args.explicit.item2 or '??',
   }
+
    }
 +
   end))
 
end
 
end
   −
local test = { explicit = { id = '01' } }
+
local test = { explicit = { world = 7 } }
 
-- print(p.test())
 
-- print(p.test())
    
return view(render, test)
 
return view(render, test)
cssedit, gkautomate
7,060

edits