Module talk:Inventory slot

Background / text font
i tried to sue this module for my server wiki and i don't have a background / text police, why i can forget --Thesweetiger (talk) 21:34, 2 February 2014 (UTC)
 * You can download Minecraft font at these links: http://hydra-media.cursecdn.com/hydra/fonts/minecraft.eot?#iefix, http://hydra-media.cursecdn.com/hydra/fonts/minecraft.woff or http://hydra-media.cursecdn.com/hydra/fonts/minecraft.ttf . Regarding the background, I think it is included to Gamepedia but I'm not sure. —  Itouchmasterpro  d  c 21:54, 2 February 2014 (UTC)

Some things about Grid
First, this Module needs to change from anyone can edit to registered users can edit, since any vandalism would affect almost every article. Second, is there a way to add Armor and tool damage bars currently or in the future? --KnightMiner (talk 15:39, 11 February 2014 (UTC)


 * In terms of actually implementing it, it wouldn't be difficult. The issue comes with what would the syntax be? I also wonder if it's something that is actually going to be used. If there's only like one instance where it is useful, I'd just upload a separate grid image with a damage bar included on it and just change the title and link. –Matt ᐸ Talk Contribs ⎜ 04:43, 12 February 2014 (UTC)

Banners
Banners got multiples of different ways they can be displayed in the inventory depending on what patterns are applied to it. Is there any reasonable ways to support this without having to upload loads of grid images for possible pattern/color combos? :P Oozebull (talk) 18:37, 11 August 2014 (UTC)

Alternate brewing layout
Would it be a good idea to modify the brewing layout from the vanilla layout slightly to allow an input and output slot? Issues would include possible confusion from readers as to its look in game, but it would solve the confusion caused by a lack of an input image. – KnightMiner  (t·c) 04:46, 6 January 2015 (UTC)

Add special aliases
Certain aliases, such as the music discs or the damaged tools simply repeat a pattern over and over again, causing redundancies in the alias module. That also prevents adding aliases for proper display of the banner pattern titles, as hundreds of them would be a pain to add and update.

A simple solution would be adding "special aliases", which would basically be aliases with a bit of logic rather than simple text return.

To enable this using the module Module:Grid/SpecialAliases, I need the code -- Comment this next line out if you're not using special aliases local specialAliases = require( 'Module:Grid/SpecialAliases' ) added after the original alias declaration on line 24, the code if aliases or modAliases then from line 33 changed to if aliases or specialAliases or modAliases then and the code elseif specialAliases and specialAliases( id ) then alias = specialAliases( id ) added after line 47.

Because of the way it is coded, aliases take precedent over special aliases, causing alias to also act as a sort of "blacklist" for names that should not match the special aliases.

– KnightMiner  (t·c) 19:31, 4 February 2015 (UTC)


 * – KnightMiner  (t·c) 17:29, 10 February 2015 (UTC)


 * I'm not a fan of having this code run (twice) on every invoke. Entries in the table are cheap, so don't worry about how many there are. If less repetitive code is what you're after, you could add a pre-processing stage to the alias table to add these "special" aliases before the table is output. Something like:

 local aliases = [the normal table definition] for _ in ipairs{ [list of banners] } do   table.insert( aliases, [banner stuff] ) end [etc.] return aliases
 * –Majr ᐸ Talk Contribs 09:37, 11 February 2015 (UTC)


 * The main thing I'm after is not having to add 608 aliases to the alias table, when each one would be the same as the last except changing one word.
 * We could attempt to insert all the banners into the alias table. I assume you mean something like these: (Module:KnightMiner/Aliases and Module:KnightMiner/Banners) That would remove the redundant code and prevent the banners from being processed once per #invoke:, with the minor downside of new banners needing to be added manually. (although, I doubt many new patterns will get added any time soon)
 * – KnightMiner  (t·c) 17:29, 11 February 2015 (UTC)


 * Well you wouldn't need to have every variation of banner, just the unique repetitions:

 for _, colour in ipairs{ [colours] } do   for _, banner in ipairs{ [banner types] } do        table.insert( aliases, [colour .. banner] ) end end
 * Maybe it could be split up further into repeatable patterns, like all banners which have normal/inverted versions.
 * –Majr ᐸ Talk Contribs 07:12, 12 February 2015 (UTC)