From e943d35d8d6a76224a050267a8c0b8fe9d52bb0c Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Fri, 15 Jul 2011 07:30:09 +0000 Subject: [PATCH] disable moddable tiles in non shockbolt mode git-svn-id: http://svn.net-core.org/repos/t-engine4@3844 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/Actor.lua | 2 +- game/modules/tome/class/Game.lua | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 8fcc1fac29..66a6a5f6b5 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -1763,7 +1763,7 @@ end --- Update tile for races that can handle it function _M:updateModdableTile() - if not self.moddable_tile then return end + if not self.moddable_tile or Map.tiles.no_moddable_tiles then return end self:removeAllMOs() local base = "player/"..self.moddable_tile:gsub("#sex#", self.female and "female" or "male").."/" diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 0da6105797..e2009260fd 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -399,10 +399,21 @@ function _M:setupDisplayMode(reboot, mode) Map.object_stack_count = true Map.tiles.use_images = true - if gfx.tiles == "ascii" then Map.tiles.use_images = false Map.tiles.force_back_color = {r=0, g=0, b=0, a=255} end - if gfx.tiles == "ascii_full" then Map.tiles.use_images = false end - if gfx.tiles == "shockbolt" then Map.tiles.nicer_tiles = true end - if gfx.tiles == "oldrpg" then Map.tiles.nicer_tiles = true end + if gfx.tiles == "ascii" then + Map.tiles.use_images = false + Map.tiles.force_back_color = {r=0, g=0, b=0, a=255} + Map.tiles.no_moddable_tiles = true + elseif gfx.tiles == "ascii_full" then + Map.tiles.use_images = false + Map.tiles.no_moddable_tiles = true + elseif gfx.tiles == "shockbolt" then + Map.tiles.nicer_tiles = true + elseif gfx.tiles == "oldrpg" then + Map.tiles.nicer_tiles = true + Map.tiles.no_moddable_tiles = true + elseif gfx.tiles == "mushroom" then + Map.tiles.no_moddable_tiles = true + end if self.level then if self.level.map.finished then -- GitLab