Rush can produce lua errors with invasion portals

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Rush can produce lua errors with invasion portals

#1 Post by Hachem_Muche »

If you move onto either the naga or fearscape invasion portals by a means other than normal movement, the prompt to enter or destroy does not come up and you can switch level manually. Returning to the main level creates a lua error.

Since the block_move function for the tile cannot return true, the fix is switch it to an on_move function and eliminate the force check.

Code: Select all

Index: game/modules/tome/data/general/events/fearscape-portal.lua
===================================================================
--- game/modules/tome/data/general/events/fearscape-portal.lua	(revision 6570)
+++ game/modules/tome/data/general/events/fearscape-portal.lua	(working copy)
@@ -152,19 +152,19 @@
 	self.real_change = nil
 	return true
 end
-g.block_move = function(self, x, y, who, act, couldpass)
-	if not who or not who.player or not act then return false end
+g.on_move = function(self, x, y, who, act, couldpass)
+	if not who or not who.player then return false end
 	if self.broken then
 		game.log("#VIOLET#The portal is already broken!")
 		return false
 	end

 	require("engine.ui.Dialog"):yesnoPopup("Fearscape Portal", "Do you wish to enter the portal or just destroy it?", function(ret)
 		game.log("#VIOLET#The portal is broken!")
 		if not ret then
 			self:change_level_check()
 		end
 		self.broken = true
+		self.name = "broken fearscape invasion portal"
 		self.change_level = nil
 		self.autoexplore_ignore = true
 	end, "Destroy", "Enter")
Index: game/modules/tome/data/general/events/naga-portal.lua
===================================================================
--- game/modules/tome/data/general/events/naga-portal.lua	(revision 6570)
+++ game/modules/tome/data/general/events/naga-portal.lua	(working copy)
@@ -121,19 +121,19 @@
 	self.real_change = nil
 	return true
 end
-g.block_move = function(self, x, y, who, act, couldpass)
-	if not who or not who.player or not act then return false end
+g.on_move = function(self, x, y, who, act, couldpass)
+	if not who or not who.player then return false end
 	if self.broken then
 		game.log("#VIOLET#The portal is already broken!")
 		return false
 	end

 	require("engine.ui.Dialog"):yesnoPopup("Coral Portal", "Do you wish to enter the portal or just destroy it?", function(ret)
 		game.log("#VIOLET#The portal is broken!")
 		if not ret then
 			self:change_level_check()
 		end
 		self.broken = true
+		self.name = "broken naga invasion coral portal"
 		self.change_level = nil
 		self.autoexplore_ignore = true
 	end, "Destroy", "Enter")
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

R_D
Halfling
Posts: 104
Joined: Fri Jan 18, 2013 6:53 pm
Location: Somewhere only we know...

Re: Rush can produce lua errors with invasion portals

#2 Post by R_D »

This happened to me on version 1.0.0 as well. I used wanderer's rest active ability (telekinetic leap) to jump onto a demon invasion portal. I wasn't taken inside, so I stepped off and back on. I can't remember if/when I got any .lua errors, but I know that when I returned from the portal, I was taken to the entrance of that floor instead of where the portal was, and I found that while the portal was gone, demons were still spawning infinitely from the now-disappeared portal.
?Wub?Wub?Wub?

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Rush can produce lua errors with invasion portals

#3 Post by darkgod »

fixed
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply