ftb-gamepedia / tilesheets Goto Github PK
View Code? Open in Web Editor NEWAdds a parser function that looks up a table for an item and returns the requested image.
License: MIT License
Adds a parser function that looks up a table for an item and returns the requested image.
License: MIT License
There are two legal issues need to be taken care of by the end of next week.
1.) Licensing
There was discussion on the #gamepedia IRC channel previously about this. I forget what the final open source license was decided on and if it was for OreDict or Tilesheets.
The company(Curse Inc.) is requesting to be able to use Tilesheets under the MIT license. However, if not MIT then GPLv2 would be acceptable.
Preferably the license would be included in the repository in the root folder titled similar to "LICENSE" in all capital letters.
2.) Repository Ownership
Even though Tilesheets is used primarily on a Gamepedia wiki the primary maintainers of the Tilesheets project are not Curse employees or contractors. As such legal has informed us that it would be best that the repository ownership be officially transferred to either the personal Github account of a primary maintainer or a an organization account controlled by the primary maintainers. I will facilitate transferring the repository to the location decided.
This came out of New Relic error reporting. I can not find exactly what caused it other than the user being on Special:RecentChanges.
in trigger_error called at includes/Message.php (1078)
in Message::extractParam called at includes/Message.php (1037)
…sage::replaceParameters called at includes/Message.php (804)
in Message::toString called at includes/Message.php (897)
…e::escaped called at includes/logging/LogFormatter.php (407)
…tActionText called at includes/changes/ChangesList.php (442)
…LogEntry called at includes/changes/OldChangesList.php (115)
…angeLine called at includes/changes/OldChangesList.php (51)
…e called at includes/specials/SpecialRecentchanges.php (356)
…led at includes/specialpage/ChangesListSpecialPage.php (348)
…led at includes/specialpage/ChangesListSpecialPage.php (77)
…e called at includes/specials/SpecialRecentchanges.php (64)
…execute called at includes/specialpage/SpecialPage.php (384)
… called at includes/specialpage/SpecialPageFactory.php (553)
…eFactory::executePath called at includes/MediaWiki.php (281)
…aWiki::performRequest called at includes/MediaWiki.php (714)
in MediaWiki::main called at includes/MediaWiki.php (508)
in MediaWiki::run called at index.php (41)
In an effort to improve the tilesheet extension the following plan has been laid out which will allow for translation of tilesheet icons as well as improved tooltips. Even translation into English will be useful as it will allow multiple icons on a tilesheet to share the same display name, as well as allowing custom tooltips to be assigned across the wiki.
en
, de
, or ru
), display name, and description.In progress at tilelist-filters
Can the recent changes log get the untranslated name along with the tile ID because seeing that tile 11023 has been translated means nothing, but that Iron Horse Armor (11023) has been translated is useful information.
So I don't need to have multiple mod abbreviations for GregTech 6.
For example:
{
"edit": {
"edittile": {
"W": "W",
"16,32": "16,32,64"
}
}
}
For some reason all new items that get added to the item list have an index that is incrementing by 3 rather than 1.
For example:
https://ftb.gamepedia.com/index.php?title=Special:TileList&page=17®ex=&mod=&langs=&invertlang=0&limit=5000
# | Item name | Mod name | X position | Y position | Registered sizes | |||
---|---|---|---|---|---|---|---|---|
Edit | Translate | View | 272089 | Lazurite Plate | TR | 13 | 15 | 16px,32px |
Edit | Translate | View | 272092 | Lead Dust | TR | 14 | 15 | 16px,32px |
Edit | Translate | View | 272095 | Magic Energy Absorber | TR | 15 | 15 | 16px,32px |
I was trying to make a tile deletion script because I was too lazy to delete the tiles manually, but it didn't work.
# Copyright (C) 2016, Eric Schneider (xbony2)
# All rights reserved.
require "mediawiki/butt"
butt = MediaWiki::Butt.new("http://ftb.gamepedia.com")
puts "Please enter the password."
butt.login("ESAEBSAD", gets.chomp)
puts "Please enter the tilesheet abbreviation."
tilesheet = gets.chomp
tiles = butt.post({action: "query", list: "tiles", tslimit: 500, tsmod: tilesheet})
#butt.post({action: "deletetiles", tsids: tiles["query"]["tiles"].keys, tssummary: "", tstoken: butt.get_token("edit")})
puts tiles.to_s
returns
{"batchcomplete"=>"", "query"=>{"tiles"=>[]}}
Showing that the query seems to be broken or that I'm missing something.
(Also TODO: delete tilesheet "ESAEBSADTEST" on the FTB Wiki once possible)
On [[Special:TileList]], there are options that aren't available in the API: "Search item names matching regex," "Filter by languages translated to (comma separated)," and "Invert language selection." I sort of just threw in the last two but the first would be fairly useful.
Are there any objections to transferring this repository to the @HydraWiki organization? We are working consolidating all of the various wiki repositories under a new organization structure that will allow us to more easily interact with public contributors.
We need a way to see all uses of a given tile, like WhatLinksHere but for tile invocations.
There needs to be a database table that tracks every single time a tile is used on a given article, with a special page to browse it. Look into how it's implemented for the actual backlinks thing within MW.
Name for the special page is Special:WhatUsesThisTile
The deletesheet API always returns:
{
"edit":{
"deletesheet": []
}
}
The following special pages contain English words
The extension needs an API. Here's what is needed:
Do all work on the API branch until fully working.
Before adding a new tile it checks whether the tile already exists. However because it does not do the check and insertion as a single atomic transaction, there is a race condition where another request can insert the tile between the check and the insertion resulting in the tile being duplicated.
There should be two distinct rights: tiletranslator, and whatever the current one is. tiletranslator will allow you to use the TileTranslator and see the "Translate" button on the TileList, while not allowing you to modify tile data or sheet data.
Exception encountered, of type "TypeError"
[9d263bf59c5102e2cc29954f] /Special:CreateTileSheet TypeError from line 501 of /home/hydra/stable_public_html/includes/logging/LogEntry.php: Argument 1 passed to ManualLogEntry::setTarget() must be an instance of Title, null given, called in /home/hydra/stable_public_html/extensions/Tilesheets/special/TileManager.php on line 107
Backtrace:
#0 /home/hydra/stable_public_html/extensions/Tilesheets/special/TileManager.php(107): ManualLogEntry->setTarget(NULL)
#1 /home/hydra/stable_public_html/extensions/Tilesheets/special/CreateTileSheet.php(87): TileManager::createTile(string, string, string, string, User, string)
#2 /home/hydra/stable_public_html/includes/specialpage/SpecialPage.php(479): CreateTileSheet->execute(NULL)
#3 /home/hydra/stable_public_html/includes/specialpage/SpecialPageFactory.php(576): SpecialPage->run(NULL)
#4 /home/hydra/stable_public_html/includes/MediaWiki.php(282): SpecialPageFactory::executePath(Title, RequestContext)
#5 /home/hydra/stable_public_html/includes/MediaWiki.php(745): MediaWiki->performRequest()
#6 /home/hydra/stable_public_html/includes/MediaWiki.php(519): MediaWiki->main()
#7 /home/hydra/stable_public_html/index.php(43): MediaWiki->run()
#8 {main}
For example, MFDevice <Debugger>
.
I was going to try to work on this to practice some PHP but time is short.
Restricting the creation of tilesheets because you have to use a bot so it won't spam the RC is the dumbest thing ever; making tilesheets should be easy as possible, you shouldn't have to rely on the two people who can (not to mention bots and this don't work right now anyway).
https://github.com/HydraWiki/Tilesheets/blob/master/install/sql/ext_tilesheet_languages.sql#L5
`description` varchar(100)
This is way too short for some descriptions, in particular GT6 where &bConverts 1 HU into +1 K per 100kg/&4Melts down when stored Heat is too much! (2500 K)/Can put Blocks around it on Fire! (4m)/&8Tool to harvest: &fPickaxe (0)/&7Contains 7.0 Units of Clay/Melt: 2000 K - Boil: 4000 K - Weight: 1392.355 kg
was truncated to &bConverts 1 HU into +1 K per 100kg/&4Melts down when stored Heat is too much! (2500 K)/Can put Bloc
Add
PRIMARY KEY (entry_id, lang)
to main SQL
Add new upgrade sql
ALTER TABLE ext_tilesheet_languages ADD PRIMARY KEY(entry_id, lang);
The next/prev/first/last page links open in a new tab/window and that is annoying.
Since {{Gc}} is written in lua, it would make sense to have a lua wrapper to shave off the extra millisecond or whatever that callParserFunction() causes.
I would consider doing this myself, but last time I tried to touch PHP I ended up... [let's not scare curse staff, bony]
It is incorrectly placed in the "other" section of Special:Version. The type
value in extension.json
should be changed from parserhooks
to parserhook
.
It's not super-useful, but having a special page for looking at a particular tile could be useful. The unofficial wiki and the Minecraft wiki use single-image tiles so they can be linked to which is useful (for example, linking to https://ftbwiki.org/File:Grid_Dragon_Heart.png was used to help create the /r/ftb part of /r/place).
When I attempt to delete tiles using my bot account via the API I get the following error.
{
"error": {
"*": "See http://ftb.gamepedia.com/api.php for API usage",
"code": "tspermissiondenied",
"info": "You do not have permission to delete tiles"
}
}
I'm pretty sure I am logged in to my bot account and my bot account is definitely has the edittilesheets
right, so I'm not sure what is going on.
On Special:CreateTileSheet, clicking the "override existing" checkbox and then saving yields this:
A database query error has occurred. This may indicate a bug in the software.
(which it does so indicate).
Test input:
[Update: test input is crap right now because ESAEBSADTEST is deleted]
Test 2:
It seems to work.
If you look at any other action=query list, you'll notice they all return a simply array without keys. This difference makes writing code that can abstract across all types of action=query really difficult.
It's kind of hard to search for items there because of the exactitude you have to use for an item, take for instance searching "conduit" and on "mod" you input "EIO", if I do that, it doesn't give back any results, but under "mod: EIO" only, there's like 5 or 6 items with "conduit" on its name, I think it's because it case sensitive.
From Frenchiveruti on Template talk:Navbox Ender IO
I really hate having to look back at the TileList for the name of the entry. It should be somewhere on the Translation interface.
With the same "Arthana|Butt" entry from #69, the following is what is shown:
The item names and mod abbreviations must go through input validation to ensure we don't have errors by putting weird characters in them. Both of these must match $wgLegalTitleChars
(see also #56) to be valid for page titles.
After this is implemented, someone will need to run a script to check all tile names and mod abbreviations that they are valid. For invalid chars, someone will need to manually update the database directly (since invalid characters prevents you from saving any changes after the invalid characters are added).
Could an IRC web service be added with the following settings:
Server: irc.esper.net
Port: 6667
Room: #FTB-Wiki-Dev
Nick: Tilesheets
Branches:
NickServ Password:
SSL: false
Message Without Join: true
No colors: false
Long URL: false
Notice: true
Currently the tiles list for the query API doesn't take advantage of the continue mechanism that other query lists use. This will need to be fixed eventually.
This is one of my crazy ideas, but I don't think it's too crazy, so I'll share it. Simple idea: allowing a tile to have aliases. For example, Stained Clay, Hardened Clay and Terracotta are all three names for one block in Vanilla in different versions. Doing {{Gc|mod=V|dis=false|title=Blue Hardened Clay|Blue Terracotta}}
every page through 1.10-1.11 seems silly, and also it hurts automatically translated tile names (hopefully each alias could be translated).
The text that tells the person to look at Template:G/Mods is weirdly placed. http://puu.sh/e4RA7/6eba0ce747.png
irb(main):006:0> butt.post({action: "deletesheet", tsmods: "FSPA", tssummary: "", tstoken: butt.get_token("edit")})
=> {"edit"=>{"deletesheet"=>[]}}
...worked before (with the exclusion of the changed argument), but no tilesheet is deleted now.
It's called "Tilesheets" as well as "Tile Sheets" in many places. We should decide on a single term. Personally, I prefer "Tilesheets" because that's just what we've been calling them this whole time.
The SheetManager doesn't allow the sheet to be deleted. Trying to click the checkmarks yields to nothing. The only way to delete it is using the API.
I literally had to use irb to delete it >.> and since the extension api isn't part of the butt gem yet I had to type out butt.post({action: "deletesheet", tsmod: "TDM", tssummary: "", tstoken: butt.get_token("edit")})
which was kind of annoying.
Edit: tsmod should be "tsmods" right now.
If you ask for the description of a tile without any translation it will return the tilename, instead of what you'd expect of an empty string.
Like {{#itemloc:Macerator|IC2|description|en}} should be "" as there's no translation but it instead returns Macerator, which you'd only expect to occur if you called for the name.
[9424e66706b9a361a2d5bdc4] /Special:CreateTileSheet TypeError from line 493 of /home/hydra/stable_public_html/includes/logging/LogEntry.php: Argument 1 passed to ManualLogEntry::setPerformer() must be an instance of User, string given, called in /home/hydra/stable_public_html/extensions/Tilesheets/special/SheetManager.php on line 96
Backtrace:
#0 /home/hydra/stable_public_html/extensions/Tilesheets/special/SheetManager.php(96): ManualLogEntry->setPerformer(string)
#1 /home/hydra/stable_public_html/extensions/Tilesheets/special/CreateTileSheet.php(72): SheetManager::deleteEntry(string, string)
#2 /home/hydra/stable_public_html/includes/specialpage/SpecialPage.php(522): CreateTileSheet->execute(NULL)
#3 /home/hydra/stable_public_html/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#4 /home/hydra/stable_public_html/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
#5 /home/hydra/stable_public_html/includes/MediaWiki.php(862): MediaWiki->performRequest()
#6 /home/hydra/stable_public_html/includes/MediaWiki.php(523): MediaWiki->main()
#7 /home/hydra/stable_public_html/index.php(43): MediaWiki->run()
#8 {main}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.