FTB-Gamepedia / Tilesheets

Adds a parser function that looks up a table for an item and returns the requested image.
MIT License
7 stars 5 forks source link

Make the tilesheets deletable in the interface. #19

Open xbony2 opened 8 years ago

xbony2 commented 8 years ago

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.

xbony2 commented 8 years ago

And shit, it doesn't look like that really worked either. Trying to re-create my tilesheets reveals that it so appears the tile data is still there (it fails).

elifoster commented 8 years ago

Hm. Perhaps there's something outdated in SheetManager as well as OreDictEntryManager, as the issue seems to be the same in both.

Also you are a noob for using irb. It's all about pry.

xbony2 commented 8 years ago

Will try pry out sometime I guess.

xbony2 commented 8 years ago

Hmm.

irb(main):007:0> butt.post({action: "deletesheet", tsmod: "TDM", tssummary: "", tstoken: butt.get_token("edit")})
=> {"edit"=>{"deletesheet"=>[]}}

And it's in the tilesheet log...

‎ESAEBSAD (Talk | contribs) deleted the [INVALID] tilesheet. ‎

([INVALID] is a bugged-out name for a tilesheet, but we'll go with it)

But going on Special:TileList shows something disappointing...

The tilesheet is indeed deleted, but none of the tiles in it are. That's a bit disappointing, huh? The "Registered sizes" thing seemed to be bugged out too.

xbony2 commented 8 years ago

The tiles on ESAETEST (the 1x1 test tilesheet) were deleted when running the same command. Yuck.

Maybe I'll try recreating TDM and deleting it again.

Test:

SUCCESS Adding new tilesheet...
FAIL Adding Test from TDM on [Tilesheet TDM %.png] (0,0) to entry list...

There's a new tilesheet, so that works.

And now running...

butt.post({action: "deletesheet", tsmod: "TDM", tssummary: "", tstoken: butt.get_token("edit")})

does the same thing; deletes the tilesheet but not the tiles. Yeh.

elifoster commented 8 years ago

That's not a bug as far as I'm aware. Just bulk delete all the tiles then delete the sheet.

xbony2 commented 8 years ago

But why would someone want to delete the sheet without deleting the tiles? >.> that's stupid.

retep998 commented 8 years ago

Deleting a sheet requires deleting every individual tile regardless, and for large sheets doing all that as a single operation will time out. Therefore if you add support to a bot to delete a sheet you will need to add support for having it delete the individual tiles in batches anyway, thus negating the need for deletesheet to delete tiles as well.

xbony2 commented 8 years ago

That's what I was doing but I couldn't get it to work >.> but you can make it delete the tiles in batches on the wiki too.

elifoster commented 8 years ago

I think this issue (along with the one in the OreDictEntryManager) might be caused by the entries being updated after they get deleted, because I have no problem in #28 doing it what seems to be properly.