Page 4 of 6

PostPosted: Thu Oct 11, 2012 20:21
by Temperest
Certainly.

Code: Select all
-- Mesecon Stuff:
if minetest.get_modpath("mesecons") then
    mesecon:register_on_signal_on(function(pos, node)
            if node.name:find("nuke:") then
            minetest.env:remove_node(p)
            spawn_tnt(p, node.name)
            nodeupdate(p)
        end
    end)
end

PostPosted: Thu Oct 11, 2012 22:11
by Comp52
where should I put this? at the end? that didn't seem to work.

PostPosted: Thu Oct 11, 2012 22:17
by Temperest
Yes, put it at the very end.

Didn't seem to work? What does that mean? Was there an error? If so, what was it? Check your debug logfile for it, if necessary.

PostPosted: Thu Oct 11, 2012 22:26
by Comp52
no, no error, but when I run the game, i place a pressure plate over the TNT, stand on it, and it doesn't activate the TNT. I also tried hooking mesecons to the TNT, and it still didn't do anything(actually, it didn't connect to the TNT)

PostPosted: Thu Oct 11, 2012 23:35
by Temperest
Hmm, does the TNT mod work for you? The one by PilzAdam, I mean. If it does not, then perhaps it's a different problem.

I'll see if I can get around to testing it later.

PostPosted: Thu Oct 11, 2012 23:57
by Comp52
no, I don't have the dev build. I use 0.4.3. But, I know that the Nuke mod works, and I know that mesecons works, so...i dunno.

PostPosted: Sun Oct 14, 2012 07:35
by breinzter11
Can you make it
we can active it with mesecons

PostPosted: Mon Oct 15, 2012 20:23
by Temperest
The problem was that the code didn't register the effectors:

Code: Select all
-- Mesecon Stuff:
mesecon:register_effector("nuke:iron_tnt", "nuke:iron_tnt")
mesecon:register_effector("nuke:mese_tnt", "nuke:mese_tnt")
mesecon:register_effector("nuke:hardcore_iron_tnt", "nuke:hardcore_iron_tnt")
mesecon:register_effector("nuke:hardcore_mese_tnt", "nuke:hardcore_mese_tnt")
if minetest.get_modpath("mesecons") then
    mesecon:register_on_signal_on(function(pos, node)
        if node.name:find("^nuke:") then
            minetest.env:remove_node(pos)
            spawn_tnt(pos, node.name)
            nodeupdate(pos)
        end
    end)
end


Put this at the end of the init.lua and activate your TNT with Mesecons!

PostPosted: Tue Oct 16, 2012 07:00
by breinzter11
Temperest wrote:The problem was that the code didn't register the effectors:

Code: Select all
-- Mesecon Stuff:
mesecon:register_effector("nuke:iron_tnt", "nuke:iron_tnt")
mesecon:register_effector("nuke:mese_tnt", "nuke:mese_tnt")
mesecon:register_effector("nuke:hardcore_iron_tnt", "nuke:hardcore_iron_tnt")
mesecon:register_effector("nuke:hardcore_mese_tnt", "nuke:hardcore_mese_tnt")
if minetest.get_modpath("mesecons") then
    mesecon:register_on_signal_on(function(pos, node)
        if node.name:find("^nuke:") then
            minetest.env:remove_node(pos)
            spawn_tnt(pos, node.name)
            nodeupdate(pos)
        end
    end)
end


Put this at the end of the init.lua and activate your TNT with Mesecons!

Thanks !!
now i can bully my friend

PostPosted: Sat Nov 10, 2012 16:32
by prof-turbo
I love this mod! why do you don't add sounds now? :D

Made in an ancient version with your mod and the creative ;): Image

PostPosted: Sat Nov 10, 2012 19:35
by terminalerror
prof-turbo wrote:why do you don't add sounds now?

That would result in burst eardrums.

PostPosted: Fri Dec 21, 2012 03:21
by VanessaE
Hey Sfan5... Given the changes made recently to Mese:

http://minetest.net/forum/viewtopic.php?id=4154

You may want to update your recipes if you're still maintaining this. Probably use two of the new Mese Blocks instead of the two old Mese objects. That's a far more expensive recipe, but IMHO it should be anyway given the craft result. :-)

PostPosted: Sun Feb 24, 2013 00:17
by proller
sometimes server crashes:
03:39:00: ACTION[ServerThread]: ginox places node nuke:hardcore_mese_tnt at (22,-124,60)
03:39:01: ACTION[ServerThread]: ginox punches object 3: LuaEntitySAO at (23,-124.4,61)
03:39:01: ACTION[ServerThread]: LuaEntitySAO at (23,-124.4,61) punched by player ginox, damage 1 hp, health now 9 hp
03:39:02: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error running function 'on_punch': ...ler/.minetest/games/minetest_game/mods/nuke/init.lua:460: attempt to call method 'add_to_inventory' (a nil value)
03:39:02: ERROR[main]: stack traceback:

In thread 805007400:
/home/proller/minetest/src/main.cpp:1801: int main(int, char**): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 805007400:
#0 int main(int, char**)
(Leftover data: #1 Dedicated server branch)
(Leftover data: #2 virtual void ServerMap::save(ModifiedState))
(Leftover data: #3 virtual void ServerMap::saveBlock(MapBlock*))
Abort trap: 6 (core dumped)

PostPosted: Mon Feb 25, 2013 10:00
by proller
one more:
stack:get_name()="nuke:hardcore_mese_tnt", stack:get_count()=99
03:51:28: ACTION[ServerThread]: ShadowNinja places node nuke:hardcore_mese_tnt at (40,-46,36)
03:51:31: ACTION[ServerThread]: ShadowNinja punches object 9: LuaEntitySAO at (40,-46,36)
03:51:31: ACTION[ServerThread]: LuaEntitySAO at (40,-46,36) punched by player ShadowNinja, damage 1 hp, health now 9 hp
03:51:32: ERROR[main]: ServerEnvironment::deactivateFarObjects(): id=4 m_static_exists=true but static data doesn't actually exist in (0,1,2)
WARNING: StaticObjectList::remove(): id=4 not found
03:51:32: ERROR[main]: ServerEnvironment::deactivateFarObjects(): id=11 m_static_exists=true but static data doesn't actually exist in (0,0,2)
WARNING: StaticObjectList::remove(): id=11 not found
03:51:32: ERROR[main]: ServerEnvironment::deactivateFarObjects(): id=17 m_static_exists=true but static data doesn't actually exist in (0,1,3)
WARNING: StaticObjectList::remove(): id=17 not found
03:51:33: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error running function 'on_punch': ...ler/.minetest/games/minetest_game/mods/nuke/init.lua:460: attempt to call method 'add_to_inventory' (a nil value)
03:51:33: ERROR[main]: stack traceback:

In thread 805007400:
/home/proller/minetest/src/main.cpp:1802: int main(int, char**): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 805007400:
#0 int main(int, char**)
(Leftover data: #1 Dedicated server branch)
(Leftover data: #2 virtual void ServerMap::save(ModifiedState))
(Leftover data: #3 virtual void ServerMap::saveBlock(MapBlock*))
(Leftover data: #4 void ServerMap::loadBlock(std::string*, v3s16, MapSector*, bool))
Abort trap: 6 (core dumped)

PostPosted: Mon Feb 25, 2013 17:24
by 2232
Thanks :)

PostPosted: Fri Apr 12, 2013 15:20
by the_blocks
super mese tnt

PostPosted: Fri Apr 12, 2013 19:31
by sfan5
Update!
I finally got around updating this mod.
Changes:
  • Fixed all crashes
  • Removed all deprecated and legacy stuff
  • Mese TNT is now crafted with Mese Crystals
Download in first Post

PostPosted: Mon Jul 15, 2013 14:39
by Element
i guess when you use to much hardcore mese tnt...its stalls your game

PostPosted: Thu Jul 18, 2013 14:04
by Rancon
COOL!

PostPosted: Thu Jul 18, 2013 18:14
by sfan5
Really nice how you just removed the License Notice...

PostPosted: Fri Jul 19, 2013 14:47
by THEGGABOOK77
nice mod!

PostPosted: Mon Jul 22, 2013 18:35
by 2232
prof-turbo wrote:I love this mod! why do you don't add sounds now? :D

Made in an ancient version with your mod and the creative ;): Image


Nice! I think I might do that (:

PostPosted: Sun Jan 12, 2014 09:15
by sfan5
Update!
Changes:
  • Reworked the code a bit
  • You can now use mesecons to activate TNT
Download in first post

Re: [Mod] Nuke Mod [1.6] [nuke]

PostPosted: Wed Jul 30, 2014 21:53
by Dogzilla131
I made a video about this mod. :)
https://www.youtube.com/watch?v=Mx5NZ9YdF24

Re: [Mod] Nuke Mod [1.6] [nuke]

PostPosted: Tue Feb 24, 2015 06:52
by csf2618
got an available source code?