[mod] Teleporter Pads [1.1][tpad]

entuland
Member
Posts: 123
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Teleporter Pads [1.0][tpad]

by entuland » Post

luizsab wrote:Hello, thanks for your answer.

My Minetest Settings is disabled, all things, shadders ...

I did that you recommended and I can read tpad file in my world folder, moreover the teleport works very well, just texture is dark and I downloaded again from your git and the problem persists. I create a new world with just tpad mod active and happens the same so I guess the trouble is not about other mods.

My configurations is: Debian Stretch OS, i5 processor with 6GB Ram and video is simple Intel adapter.
You're welcome luizsab :)

Try opening the init.lua file inside of the /mods/tpad folder, you should see this at its bottom:

Code: Select all

minetest.register_node(tpad.nodename, {
	drawtype = "mesh",
	tiles = { tpad.texture },
	mesh = tpad.mesh,
	paramtype2 = "facedir",
	on_place = tpad.on_place,
	collision_box = collision_box,
	selection_box = collision_box,
	description = "Teleporter Pad",
	groups = {choppy = 2, dig_immediate = 2},
	on_rightclick = tpad.on_rightclick,
	can_dig = tpad.can_dig,
	on_destruct = tpad.on_destruct,
})
- edit it adding the paramtype line as follows:

Code: Select all

minetest.register_node(tpad.nodename, {
	drawtype = "mesh",
	tiles = { tpad.texture },
	mesh = tpad.mesh,

	-- line to be added, don't forget the comma
	paramtype = "light",

	paramtype2 = "facedir",
	on_place = tpad.on_place,
	collision_box = collision_box,
	selection_box = collision_box,
	description = "Teleporter Pad",
	groups = {choppy = 2, dig_immediate = 2},
	on_rightclick = tpad.on_rightclick,
	can_dig = tpad.can_dig,
	on_destruct = tpad.on_destruct,
})
- finally restart the game and see if the above makes any difference for the texture color - it's just a wildguess, but it may fix it, let me know.

User avatar
luizsab
Member
Posts: 39
Joined: Mon Jan 16, 2017 13:49

Re: [mod] Teleporter Pads [1.0][tpad]

by luizsab » Post

Great!! It works now! Thank you and congratulations for your job.
Luiz
[luizsab]

entuland
Member
Posts: 123
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Teleporter Pads [1.0][tpad]

by entuland » Post

luizsab wrote:Great!! It works now! Thank you and congratulations for your job.
Thank you, I'm glad it worked, it was really a blindshot :P

I'll push that change to the repo and release a new version for it.

entuland
Member
Posts: 123
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Teleporter Pads [1.1][tpad]

by entuland » Post

The feeling when you reply to an old support request without even remembering about tackling and sorting it out already.

*facepalms heavily*

markodon
Member
Posts: 33
Joined: Fri Apr 06, 2018 14:25
In-game: mark

Re: [mod] Teleporter Pads [1.1][tpad]

by markodon » Post

got error, at begging worked ok, but now i got error when i press global button:

2020-11-22 21:05:17: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod '' in callback environment_Step(): ...in\..\games\MineClone2-94d4ad9\mods\tpad-1.1/storage.lua:12: table index is nil
2020-11-22 21:05:17: ERROR[Main]: stack traceback:
2020-11-22 21:05:17: ERROR[Main]: ...in\..\games\MineClone2-94d4ad9\mods\tpad-1.1/storage.lua:12: in function '_get_all_pads'
2020-11-22 21:05:17: ERROR[Main]: ...2\bin\..\games\MineClone2-94d4ad9\mods\tpad-1.1\init.lua:278: in function 'global_helper'
2020-11-22 21:05:17: ERROR[Main]: ...2\bin\..\games\MineClone2-94d4ad9\mods\tpad-1.1\init.lua:391: in function 'global'
2020-11-22 21:05:17: ERROR[Main]: ...2\bin\..\games\MineClone2-94d4ad9\mods\tpad-1.1\init.lua:524: in function 'func'
2020-11-22 21:05:17: ERROR[Main]: D:\minetest-0.4.17.1-win32\bin\..\builtin\common\after.lua:18: in function <D:\minetest-0.4.17.1-win32\bin\..\builtin\common\after.lua:4>
2020-11-22 21:05:17: ERROR[Main]: D:\minetest-0.4.17.1-win32\bin\..\builtin\game\register.lua:420: in function <D:\minetest-0.4.17.1-win32\bin\..\builtin\game\register.lua:400>
2020-11-22 21:05:17: ERROR[Main]: stack traceback:

entuland
Member
Posts: 123
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Teleporter Pads [1.1][tpad]

by entuland » Post

Not sure what could be causing that, you can check the "tpad" file in the "mod_storage" subfolder of your world, it may have been corrupted somehow and my code may not account for handling corrupted storage properly.

I fired up MT 5.3.0 with the TPad version I have in my computer (which seems to match the Github repo) and I created three pads (private, public and global) to have a sample to compare:

Code: Select all

{"_version":"1.2","pads:singleplayer":"return {[\"(56,3,205)\"] = {[\"name\"] = \"Global Pad\", [\"type\"] = 4}, [\"(56,3,204)\"] = {[\"name\"] = \"Public Pad\", [\"type\"] = 2}, [\"(56,3,203)\"] = {[\"name\"] = \"Private Pad\", [\"type\"] = 1}}"}
(ignore the 1.2 version there, I don't recall why I increased the storage version without increasing the mod version, it was probably some bugfix or adding some feature, in fact I have code in place that converts any possible 1.1 storage into 1.2 format)

The "pads:singleplayer" entry deserializes to this:

Code: Select all

{
        ['(56,3,205)'] = {
                ['name'] = 'Global Pad',
                ['type'] = 4
        },
        ['(56,3,204)'] = {
                ['name'] = 'Public Pad',
                ['type'] = 2
        },
        ['(56,3,203)'] = {
                ['name'] = 'Private Pad',
                ['type'] = 1
        }
}
Checking the content of that "tpad" file in your world may help finding out what is going wrong.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 7 guests