2016-03-25 12:53:52: ERROR[Main]: ServerError: Runtime error from mod 'lightning' in callback environment_Step(): Runtime error from mod 'lightning' in callback node_on_construct(): ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:41: Invalid core.after invocation
2016-03-25 12:53:52: ERROR[Main]: stack traceback:
2016-03-25 12:53:52: ERROR[Main]: [C]: in function 'assert'
2016-03-25 12:53:52: ERROR[Main]: ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:41: in function 'after'
2016-03-25 12:53:52: ERROR[Main]: ....1.0-win64\bin\..\games\default\files\lightning\init.lua:203: in function <....1.0-win64\bin\..\games\default\files\lightning\init.lua:201>
2016-03-25 12:53:52: ERROR[Main]: [C]: in function 'set_node'
2016-03-25 12:53:52: ERROR[Main]: ....1.0-win64\bin\..\games\default\files\lightning\init.lua:153: in function 'func'
2016-03-25 12:53:52: ERROR[Main]: ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:34: in function <...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:11>
2016-03-25 12:53:52: ERROR[Main]: ...\MultiCraft-1.1.0-win64\bin\..\builtin\game\register.lua:369: in function <...\MultiCraft-1.1.0-win64\bin\..\builtin\game\register.lua:349>
2016-03-25 12:53:52: ERROR[Main]: stack traceback:
2016-03-25 12:53:52: ERROR[Main]: [C]: in function 'set_node'
2016-03-25 12:53:52: ERROR[Main]: ....1.0-win64\bin\..\games\default\files\lightning\init.lua:153: in function 'func'
2016-03-25 12:53:52: ERROR[Main]: ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:34: in function <...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:11>
2016-03-25 12:53:52: ERROR[Main]: ...\MultiCraft-1.1.0-win64\bin\..\builtin\game\register.lua:369: in function <...\MultiCraft-1.1.0-win64\bin\..\builtin\game\register.lua:349>
2016-03-25 12:53:52: ERROR[Main]: ServerError: Runtime error from mod 'lightning' in callback environment_Step(): Runtime error from mod 'lightning' in callback node_on_construct(): ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:41: Invalid core.after invocation
MultiCraft-1.1.0-win64, what is that?
No seriously, go away. Try it on minetest instead, I can't possibly know or want to support clones or forks.
2016-03-25 12:53:52: ERROR[Main]: ServerError: Runtime error from mod 'lightning' in callback environment_Step(): Runtime error from mod 'lightning' in callback node_on_construct(): ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:41: Invalid core.after invocation
MultiCraft-1.1.0-win64, what is that?
No seriously, go away. Try it on minetest instead, I can't possibly know or want to support clones or forks.
2016-03-25 12:53:52: ERROR[Main]: ServerError: Runtime error from mod 'lightning' in callback environment_Step(): Runtime error from mod 'lightning' in callback node_on_construct(): ...ktop\MultiCraft-1.1.0-win64\bin\..\builtin\game\misc.lua:41: Invalid core.after invocation
MultiCraft-1.1.0-win64, what is that?
No seriously, go away. Try it on minetest instead, I can't possibly know or want to support clones or forks.
This is Minetest 0.4.13-master.
Is it 0.4.13, or is it master? It can't be both.
If you really want to *seriously* help out find bugs, then DO US ALL A FAVOR, and stop reporting bugs against your fork. Make a clean checkout of minetest and minetest_game from *git*, and then re-test your problematic test case. If you find a bug in there, then you've found a bug.
sofar wrote:
Is it 0.4.13, or is it master? It can't be both.
If you really want to *seriously* help out find bugs, then DO US ALL A FAVOR, and stop reporting bugs against your fork. Make a clean checkout of minetest and minetest_game from *git*, and then re-test your problematic test case. If you find a bug in there, then you've found a bug.
I'll do it later. I use the master, my changes are superficial, no change api
Very nice mod. But it's a shame you couldn't control the lightning to make it hit only a certain spot if desired. If that was the case though you could have a staff that will strike anyone who is hit by the staff.
rpgsniper2452 wrote:Very nice mod. But it's a shame you couldn't control the lightning to make it hit only a certain spot if desired. If that was the case though you could have a staff that will strike anyone who is hit by the staff.
Any mod can control strike location if they want it by using `lightning.strike(pos)`. It would be relative simple to implement buildin command, but it would be just one variation. For e.g. server oriented admin mod only needs lightning dependecy and they can define variations whatever they want (e.g. lightning strike on player pos + kick player - with single command).
minetest.register_craftitem("lightningrod:rod",{
description = "lightning rod",
inventory_image = "default_stick.png",
stack_max = 1,
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type == "node" then
local p = pointed_thing.above
lightning.strike(p) if minetest.setting_getbool("cat") then itemstack:take_item() end
return itemstack
end
end,
})
boom, i do not know how to upload to github so it takes hour to upload so here is code
With the latest dev build this mod is crashing minetest to desktop. Im using xeranus's weather mod and when it begins to strike lightening, the program will crash. Problem im having is the debug log isn't showing any errors, it did once awhile back but im still searching through the log to find it. Not a hundred percent sure but i think since the changes of particles behavior may have something to do with it.
The most i can find is this error that looks to be caused from the weather mod however only happens when lightening begins striking.
2016-07-08 12:19:45: WARNING[Server]: Undeclared global variable "dtime" accessed at ...160707\bin\..\games\minetest_2.0\mods\weather\rain\init.lua:143
2016-07-08 12:19:45: WARNING[Server]: Undeclared global variable "dtime" accessed at ...160707\bin\..\games\minetest_2.0\mods\weather\rain\init.lua:143
Seems like the crash is not in *this* mod, but the *rain* mod.
Yeah that's what i though however it is strange that it only happens when raining and i get about two lightening strikes until it crashes. I can have it raining for over an hour with no problems but whenever the lightening starts the two mods are clashing. This also began when i started using the latest dev build which has some changes to particles.
You're most likely right it maybe a bug with xeranus's weather mod therefor i will post the issue there aswell. There is also another bug i noticed with xeranus's weather mod anyway i might aswell bring to his attention. Thanks for having a look anyway
I've used your Lightning mod as a dependency of a mod of my own and had to make a few changes to your mod. If you are interested in these changes, I'll figure out how to create a pull request.
Changes:
Fixed a bug that would leave the player's sky permanently white after two lightning strikes occur in rapid succession.
Added ability to optionally specify the strength of a lightning strike (light, medium, heavy), with a default of "light".
Added variation in the damage a player takes based on how close he is to the strike point.
I've used your Lightning mod as a dependency of a mod of my own and had to make a few changes to your mod. If you are interested in these changes, I'll figure out how to create a pull request.
Changes:
Fixed a bug that would leave the player's sky permanently white after two lightning strikes occur in rapid succession.
Added ability to optionally specify the strength of a lightning strike (light, medium, heavy), with a default of "light".
Added variation in the damage a player takes based on how close he is to the strike point.
Yup, go ahead and make a pull request! Check the github help - it's quite well explained!
very need to make chat code to enable / disable lighting.
I try make to code but its only disable lighting ( when write /light false ) but when write /light true its still wont make any strike.... maybe someone can explain why this code dont work ? :)
That's because the mod uses a timer which is not rearmed once you have set lightning.auto to false.
lightning.strike will rearm it if lightning.auto is true, so all you have to do is call manually lightning.strike() once.