Liquid Guard

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Liquid Guard

by everamzah » Sun Jul 10, 2016 15:02

Description: Require a priv named 'liquid' to use liquid source nodes. Lava, including its bucket, require a `lava` priv.
License: WTFPL
Depends: default, bucket
Git repo: https://github.com/everamzah/liquid_guard


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
minetest.register_privilege("liquid", "Can place liquid source nodes.")
minetest.register_privilege("lava", "Can use liquid igniters.")

local old_lava_bucket_place = minetest.registered_items["bucket:bucket_lava"].on_place

minetest.override_item("bucket:bucket_lava", {
   on_place = function(itemstack, placer, pointed_thing)
      if not minetest.check_player_privs(placer:get_player_name(),
            {lava = true}) then
         return itemstack
      else
         return old_lava_bucket_place(itemstack, placer, pointed_thing)
      end
   end,
})

minetest.override_item("default:lava_source", {
   after_place_node = function(pos, placer, itemstack, pointed_thing)
      if not minetest.check_player_privs(placer:get_player_name(),
            {liquid = true, lava = true}) then
         minetest.remove_node(pos)
      end
   end,
})

minetest.override_item("default:water_source", {
   after_place_node = function(pos, placer, itemstack, pointed_thing)
      if not minetest.check_player_privs(placer:get_player_name(),
            {liquid = true}) then
         minetest.remove_node(pos)
      end
   end,
})

minetest.override_item("default:river_water_source", {
   after_place_node = function(pos, placer, itemstack, pointed_thing)
      if not minetest.check_player_privs(placer:get_player_name(),
            {liquid = true}) then
         minetest.remove_node(pos)
      end
   end,
})
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: Liquid Guard

by MineYoshi » Mon Jul 11, 2016 20:53

liquid privileges?
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

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

Re: Liquid Guard

by azekill_DIABLO » Tue Jul 12, 2016 23:42

Yes you can transform into slime with this
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
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: Liquid Guard

by D00Med » Wed Jul 13, 2016 06:23

^lol
Nice mod though, it will be useful.
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: Liquid Guard

by DS-minetest » Fri Jul 15, 2016 16:25

good against griefing with lava or corium (technic mod)
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

Fixerol
Member
 
Posts: 633
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer

Re: Liquid Guard

by Fixerol » Wed Nov 09, 2016 16:39

 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 11 guests

cron