From 3c961b151266b67045d314df3b0e02a205445043 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Sun, 23 Jan 2011 18:11:43 +0000
Subject: [PATCH] Sandworm tunneler should finaly strengthen existing tunnels

git-svn-id: http://svn.net-core.org/repos/t-engine4@2473 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/ai/sandworm_tunneler.lua    | 2 +-
 game/modules/tome/class/Game.lua              | 9 ---------
 game/modules/tome/data/general/grids/sand.lua | 1 +
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/game/modules/tome/ai/sandworm_tunneler.lua b/game/modules/tome/ai/sandworm_tunneler.lua
index 0c17874fb0..3b34bd2654 100644
--- a/game/modules/tome/ai/sandworm_tunneler.lua
+++ b/game/modules/tome/ai/sandworm_tunneler.lua
@@ -97,7 +97,7 @@ newAI("sandworm_tunneler", function(self)
 		self:useEnergy()
 	else
 		local feat = game.level.map(lx, ly, engine.Map.TERRAIN)
-		if feat:check("block_move") then
+		if feat:check("block_move") or feat:check("tunneler_dig") then
 			self:project({type="hit"}, lx, ly, DamageType.DIG, 1)
 		end
 		self:move(lx, ly)
diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua
index 25ba612346..e518c67bc1 100644
--- a/game/modules/tome/class/Game.lua
+++ b/game/modules/tome/class/Game.lua
@@ -763,15 +763,6 @@ function _M:setupCommands()
 		end end,
 		[{"_g","ctrl"}] = function() if config.settings.cheat then
 			self.nicer_tiles:postProcessLevelTiles(self.level)
-
-		for i, e in ipairs(game.zone.object_list) do
-			if e.subtype == "staff" and e.rarity and e.name then
-				local a = game.zone:finishEntity(game.level, "object", e)
-				a.no_unique_lore = true -- to not spam
-				a:identify(true)
-				game.zone:addEntity(game.level, a, "object", game.player.x, game.player.y)
-			end
-		end
 		end end,
 	}
 
diff --git a/game/modules/tome/data/general/grids/sand.lua b/game/modules/tome/data/general/grids/sand.lua
index 7024c9238e..51531d814d 100644
--- a/game/modules/tome/data/general/grids/sand.lua
+++ b/game/modules/tome/data/general/grids/sand.lua
@@ -70,6 +70,7 @@ newEntity{
 					end
 				end
 			end,
+			tunneler_dig = 1,
 			dig = function(src, x, y, old)
 				old.temporary = 20
 				return nil, old, true
-- 
GitLab