Multiplayer-safe TNT

gpcf
Member
 
Posts: 57
Joined: Fri May 27, 2016 10:48
In-game: gabriel

Multiplayer-safe TNT

by gpcf » Wed Oct 19, 2016 10:05

I have modified the TNT mod included with the default game to be safe for multiplayer games (To be fair, I've added about 3 lines). In my mod, TNT does not explode under any circumstances when placed above -100, so it can be used in deep mines without having to worry about griefing. It is deliberately named the same as the default mod, since this mod replaces it. It is used exactly the same way as the default mod.

Edit: When you light the gunpowder, there is an air-raid alarm to warn other players.

Browse the code, Download a .zip.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Multiplayer-safe TNT

by azekill_DIABLO » Wed Oct 19, 2016 15:34

nice! you should also add a check to make the tnt only active if there is no tnt next to it!
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

gpcf
Member
 
Posts: 57
Joined: Fri May 27, 2016 10:48
In-game: gabriel

Re: Multiplayer-safe TNT

by gpcf » Wed Oct 19, 2016 19:55

No, that's okay, since the TNT only explodes below -100. There is no way to make it explode above that height. I like to have big explosions in mines.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Multiplayer-safe TNT

by azekill_DIABLO » Thu Oct 20, 2016 09:16

ok! that your mod! +1
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Multiplayer-safe TNT

by taikedz » Thu Oct 20, 2016 17:55

Nice :-)

Might be interesting to use a configurable depth?

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local tntmindepth = minetest.get_setting("tnt.mindpeth") or -100


I love the air-raid touch too ;-)
 

gpcf
Member
 
Posts: 57
Joined: Fri May 27, 2016 10:48
In-game: gabriel

Re: Multiplayer-safe TNT

by gpcf » Sat Oct 22, 2016 11:25

Done!
 

amadin
Member
 
Posts: 471
Joined: Tue Jun 16, 2015 16:23
GitHub: Amadin

Re: Multiplayer-safe TNT

by amadin » Sat Oct 22, 2016 15:07

I thought about a similar mod when I had a server.
Edit: When you light the gunpowder, there is an air-raid alarm to warn other players.

I think it's not necessary, is not too realistic, or add an option in config file.
 

User avatar
AnxiousInfusion
Member
 
Posts: 146
Joined: Sun Aug 02, 2015 05:43
GitHub: AnxiousInfusion[GitLab]
IRC: AnxiousInfusion
In-game: AnxiousInfusion

Re: Multiplayer-safe TNT

by AnxiousInfusion » Fri Nov 04, 2016 03:37

Game crashes when TNT explodes at -600 Y in single player.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2016-11-03 23:33:50: ACTION[Server]: LuaEntitySAO at (-1.15,-593.5,-23.1137) punched by LuaEntitySAO at (-1.15,-593.5,-23.1137), damage 12 hp, health now 0 hp
2016-11-03 23:33:50: ACTION[Server]: LuaEntitySAO at (-1.22515,-593.5,-27.85) punched by LuaEntitySAO at (-1.22515,-593.5,-27.85), damage 4 hp, health now 1 hp
minetest: /build/minetest-_IuHPE/minetest-0.4.14/src/util/serialize.h:278: void writeF1000(irr::u8*, irr::f32): Assertion `i >= ((float)(s32)((-0x7FFFFFFF - 1) / 1000.0f)) && i <= ((float)(s32)((0x7FFFFFFF) / 1000.0f))' failed.
Aborted


You are supposed to replace the default tnt mod for this to work?
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 13 guests

cron