Skip to content
Snippets Groups Projects
Commit 38862d20 authored by dg's avatar dg
Browse files

As a thanks to donators I have added a feature for them: custom player tiles....

As a thanks to donators I have added a feature for them: custom player tiles. Donators (who are logged on) will be able to select a custom tile for their character from a list of over 180, ranging from "classics" to "downright wonky". Have fun, and thanks to you all!


git-svn-id: http://svn.net-core.org/repos/t-engine4@3701 51575b47-30f0-44d4-a5cc-537603b46e54
parent db45d3a3
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,7 @@ newBirthDescriptor
},
copy = {
moddable_tile = "dwarf_#sex#",
moddable_tile_ornament = {male="beard_02"},
moddable_tile_ornament = {male="beard_02", female="braid_01"},
life_rating=12,
},
experience = 1.25,
......
......@@ -752,17 +752,20 @@ function _M:setTile(f, w, h)
end
function _M:selectTileNoDonations()
Dialog:simpleLongPopup("Custom tiles",
[[Custom Tiles have been added as a thank you to everyone that's donated to ToME.
If you'd like to use this (purely cosmetic) feature you should consider donating.
While this is a free game that I am doing for fun, if it can help feeding my family a bit I certainly will not complain.
]], 400)
Dialog:yesnoLongPopup("Custom tiles",
[[Custom Tiles have been added as a thank you to everyone that has donated to ToME.
They are a fun cosmetic feature that allows you to choose a tile for your character from a list of nearly 180, ranging from special humanoid tiles to downright wonky ones!
If you'd like to use this feature and find this game good you should consider donating, it will help ensure its survival.
While this is a free game that I am doing for fun, if it can help feeding my family a bit I certainly will not complain as real life can be harsh sometimes.
You will need an online profile active and connected for the tile selector to enable. If you choose to donate now you will need to restart the game to be granted access.]], 400, function(ret)
if not ret then
game:registerDialog(require("mod.dialogs.Donation").new())
end
end, "Later", "Donate!")
end
function _M:selectTile()
if not profile.auth or not tonumber(profile.auth.donated) or tonumber(profile.auth.donated) <= 1 then return self:selectTileNoDonations() end
local d = Dialog.new("Select a Tile", 600, 550)
local list = {
......@@ -965,7 +968,11 @@ function _M:selectTile()
end}
local list = ImageList.new{width=500, height=500, tile_w=64, tile_h=64, padding=10, list=list, fct=function(item)
game:unregisterDialog(d)
self:setTile(item.f, item.w, item.h)
if not profile.auth or not tonumber(profile.auth.donated) or tonumber(profile.auth.donated) <= 1 then
self:selectTileNoDonations()
else
self:setTile(item.f, item.w, item.h)
end
end}
d:loadUI{
{left=0, top=0, ui=list},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment