diff options
author | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2019-04-30 14:04:50 -0700 |
---|---|---|
committer | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2019-04-30 14:04:50 -0700 |
commit | 9a19a3cc0c5e8b7343954008887f82358dca156f (patch) | |
tree | 29df6fa04e63e58f35cc876e6181fdbef1123368 | |
parent | Maintainer logic (diff) | |
download | tome4-9a19a3cc0c5e8b7343954008887f82358dca156f.tar.xz |
Updated offline patch to newer version.
Renamed patches to better explain their purpose.
-rw-r--r-- | O3-support.patch (renamed from O3.patch) | 0 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | glext-include-removal.patch (renamed from glext.patch) | 0 | ||||
-rw-r--r-- | offline-donator.patch (renamed from tome4-offline.patch) | 31 | ||||
-rw-r--r-- | offline-item-storage-hack.patch | 78 | ||||
-rw-r--r-- | sdl2-path-fix.patch (renamed from aur-tome4.patch) | 0 |
6 files changed, 90 insertions, 41 deletions
diff --git a/O3.patch b/O3-support.patch index 2728810..2728810 100644 --- a/O3.patch +++ b/O3-support.patch @@ -13,7 +13,7 @@ pkgname=tome4 pkgver=1.5.10 -pkgrel=3 +pkgrel=4 pkgdesc="An open-source, single-player, role-playing roguelike game set in the world of Eyal." pkgdesc+="Includes DLC and offline patch." arch=('i686' 'x86_64') @@ -23,10 +23,10 @@ depends=(glu openal libvorbis sdl2_ttf sdl2_image) makedepends=(premake zip unzip) options=(!makeflags emptydirs) source=("${url}dl/t-engine/t-engine4-src-${pkgver}.tar.bz2" - aur-tome4.patch - tome4-offline.patch - O3.patch - glext.patch + sdl2-path-fix.patch + glext-include-removal.patch + O3-support.patch + offline-donator.patch ashes-urhrok.teaac orcs.teaac cults.teaac @@ -35,9 +35,9 @@ source=("${url}dl/t-engine/t-engine4-src-${pkgver}.tar.bz2" conflicts=('tome4-beta' 'tome4-git' 'tome4-nomusic') sha256sums=('a76d29d2c0b964e9ab121873041c55930db1a0ccdaf877228dcba62ee06b8555' '37f5be7020a06228b7d22f4c622ab5a8843b4dbea7493d7e3b324bd592cd818e' - '2d338ff8b1e690f1583ca891f4a62e7e2eb99a96310f9fb1fb16c88a1af165e8' - '3e8c53ef138edc00ccbffed840dca89df973e688497e8bd2f9cf9d84826c3618' '04e7fc180b1df55c63c91a0c59bbd092db0995db5600a168a6e68458b49327a8' + '3e8c53ef138edc00ccbffed840dca89df973e688497e8bd2f9cf9d84826c3618' + '7fda796a4ce59dc02e4bb21a07c190133a6c8da678bccba4437ea5704e69014c' '5e5e28b44a4ff154f4a86aca17d35aa6da70c5c3ca2ef38b45a61eb3ddbb2c8f' '2bf91a7a65690f813478f839bf2ebb48af76f9669f7d94b4fa1a43d8b0216017' 'a392bf93c83baa3cdb4d29d7ae6e8d27e3a2e7ba5bf4cdd139c9ac15bfd6cd8e' @@ -49,10 +49,10 @@ sha256sums=('a76d29d2c0b964e9ab121873041c55930db1a0ccdaf877228dcba62ee06b8555' ############################################################################### prepare() { cd "$srcdir"/t-engine4-src-${pkgver} - patch -p1 -i "${srcdir}/aur-tome4.patch" - patch -p1 -i "${srcdir}/tome4-offline.patch" - patch -p1 -i "${srcdir}/O3.patch" - patch -p1 -i "${srcdir}/glext.patch" + patch -p1 -i "${srcdir}/sdl2-path-fix.patch" + patch -p1 -i "${srcdir}/glext-include-removal.patch" + patch -p1 -i "${srcdir}/O3-support.patch" + patch -p1 -i "${srcdir}/offline-donator.patch" cp "${srcdir}/ashes-urhrok.teaac" "${srcdir}/t-engine4-src-${pkgver}/game/addons/" cp "${srcdir}/orcs.teaac" "${srcdir}/t-engine4-src-${pkgver}/game/addons/" cp "${srcdir}/cults.teaac" "${srcdir}/t-engine4-src-${pkgver}/game/addons/" diff --git a/glext.patch b/glext-include-removal.patch index 0ae15c5..0ae15c5 100644 --- a/glext.patch +++ b/glext-include-removal.patch diff --git a/tome4-offline.patch b/offline-donator.patch index 9c35bf4..e724540 100644 --- a/tome4-offline.patch +++ b/offline-donator.patch @@ -13,7 +13,7 @@ \ No newline at end of file --- a/game/mod/addons/dgo/superload/engine/PlayerProfile.lua +++ b/game/mod/addons/dgo/superload/engine/PlayerProfile.lua -@@ -0,0 +1,56 @@ +@@ -0,0 +1,27 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 Nicolas Casalini +-- @@ -40,33 +40,4 @@ + return 6 +end + -+local getDLCD = _M.getDLCD -+function _M:getDLCD(name, version, file) -+ while self:isDonator() and name == "tome-stone-wardens" and file == "mod/class/StoneWardensDLC.lua" do -- breakable if -+ local f = fs.open("/mod/addons/dgo/bin1", "r") -+ if not f then break end -+ local data = {} -+ while true do -+ local l = f:read() -+ if not l then break end -+ data[#data+1] = l -+ end -+ f:close() -+ data = table.concat(data) -+ data = mime.unb64(data) -+ return zlib.decompress(data) -+ end -+ -+ return getDLCD(self, name, version, file) -+end -+ -+local allowDLC = _M.allowDLC -+function _M:allowDLC(dlc) -+ if dlc[1] == 2 then return true end -+ if dlc[1] == 3 then return true end -+ if dlc[1] == 4 then return true end -+ if dlc[1] == 5 then return true end -+ return allowDLC(self, dlc) -+end -+ +return _M diff --git a/offline-item-storage-hack.patch b/offline-item-storage-hack.patch new file mode 100644 index 0000000..8d82bc1 --- /dev/null +++ b/offline-item-storage-hack.patch @@ -0,0 +1,78 @@ +# This patch: +# --Sets the offline item storage cap to 100 +# --Removes the time requirement for withdrawing stored items +# --Removes the level restriction added to stored items +# + +--- a/overload/data/chats/items-vault-command-orb-offline.lua ++++ b/overload/data/chats/items-vault-command-orb-offline.lua +@@ -24,9 +24,6 @@ + + function willModify(o) + local msg = "" +- if not rawget(o, "require") and getLevelReq(o) > 0 then +- msg = ("Transfering this item will place a level %d requirement on it, since it has no requirements. "):format(getLevelReq(o)) +- end + if o.unvault_ego then + msg = msg.."Some properties of the item will be lost upon transfer, since they are class- or talent-specific. " + end +@@ -34,9 +31,6 @@ + end + + function doModify(o) +- if not rawget(o, "require") and getLevelReq(o) > 0 then +- o.require = {level=getLevelReq(o)} +- end + if o.unvault_ego then + local list = table.clone(o.ego_list) + local n = #list, i, j +@@ -62,7 +56,7 @@ + Only items from a validated game versions are uploadable.#WHITE#* + + #CRIMSON#Offline mode#WHITE#: The item's vault works even without a network connection but items will thus only be saved on your computer and can not be shared to an other one. +-The offline vault is only available when offline and contains 3 slots.]], ++The offline vault is only available when offline and contains 100 slots.]], + answers = { + {"[Place an item in the vault]", cond=function() return profile:isDonator() end, action=function(npc, player) + if game:isTainted() then +--- a/overload/mod/class/ItemsVaultDLC.lua ++++ b/overload/mod/class/ItemsVaultDLC.lua +@@ -106,7 +106,7 @@ + + function transferToVaultOffline(actor, o, cb_success) + if not world.items_vault then world.items_vault = {} end +- if #world.items_vault >= 3 then return end ++ if #world.items_vault >= 100 then return end + + world.items_vault[#world.items_vault+1] = {o=o, time=os.time()} + +@@ -334,15 +334,15 @@ + + function listVaultOffline() + if not world.items_vault then world.items_vault = {} end +- local done = {list={}, max=3} ++ local done = {list={}, max=100} + + for i, o in ipairs(world.items_vault) do + done.list[#done.list+1] = { + id_entity = i, + name = o.o:getName{do_color=1, no_image=1}:toString(), + desc = o.o:getDesc{do_color=1, no_image=1}:toString(), +- usable = (os.time() - o.time) >= 3600, +- sec_until = 3600 - (os.time() - o.time), ++ usable = (os.time() - o.time) >= 1, ++ sec_until = 1 - (os.time() - o.time), + last_updated = o.time, + } + end +--- a/overload/mod/dialogs/ItemsVaultOffline.lua ++++ b/overload/mod/dialogs/ItemsVaultOffline.lua +@@ -37,7 +37,7 @@ + + Dialog.init(self, ("Item's Vault (%d/%d)"):format(#self.iv.list, self.iv.max), game.w * 0.8, game.h * 0.8) + +- local txt = Textzone.new{width=math.floor(self.iw - 10), auto_height=true, text=[[Retrieve an item from the vault. When you place an item in the vault the paradox energies around it are so powerful you must wait one hour before retrieving it. ++ local txt = Textzone.new{width=math.floor(self.iw - 10), auto_height=true, text=[[Retrieve an item from the vault. + #CRIMSON#Warning: while you *can* retrieve items made with previous versions of the game, no guaranty is given that the universe (or your character) will not explode.]]} + + self.c_list = ListColumns.new{width=math.floor(self.iw - 10), height=self.ih - 10 - txt.h - 20, scrollbar=true, sortable=true, columns={ diff --git a/aur-tome4.patch b/sdl2-path-fix.patch index 3831dfb..3831dfb 100644 --- a/aur-tome4.patch +++ b/sdl2-path-fix.patch |