[Mod] Hydroponics [git] [hydroponics]

[Mod] Hydroponics [git] [hydroponics]

Postby mtmodder148 » Sun Feb 01, 2015 3:14 am

"Hydroponics" (hydroponics)

License: WTFPL

Dependencies:
default (Comes with minetest_game)
dye (Comes with minetest_game)
pipeworks?
mesecons?

Adds:
- A hydroponic bucket that works with pipeworks.
- A grow light that works with mesecons and an infinite (customizable) amount of nodes above soil.

How to Use:

Bucket -

- Can be used with pipeworks or (without pipeworks) placed next to water.
- It also counts toward both grassland and desert fertility.

Light -

- Can be used with mesecons or (without mesecons) punched to turn on.
- Can be placed infinitely (customizable) above soil/medium.

Screenshots:
+ Spoiler


Crafting:
+ Spoiler


Download: https://github.com/MT-Modder/ hydroponics /archive/master.zip
Browse Code: https://github.com/MT-Modder/ hydroponics 
Dropbox: https://www.dropbox.com/s/dvi5kjhwl0oxs42/ hydroponics .zip?dl=0
mtmodder148
Member
 
Posts: 131
Joined: Wed May 14, 2014 1:44 pm
GitHub: MT-Modder
In-game: mtmodder148

Re: [Mod] Hydroponics [git] [hydroponics]

Postby Topywo » Sun Feb 01, 2015 1:19 pm

Nice!

Iirc in mauvebic's hydro mod, there were 4 spaces between the earth and lightsource. You might want to consider that distance too for crops that grow higher than 1 node.
Topywo
Member
 
Posts: 1724
Joined: Fri May 18, 2012 8:27 pm

Re: [Mod] Hydroponics [git] [hydroponics]

Postby mtmodder148 » Sun Feb 01, 2015 3:39 pm

I'll think about it, thanks for the input.

Edit: I've been fiddling with this idea and until I learn to set the lighting for air multi-node plants won't grow unless the mod checks for "airlike" or "buildable_to". Papyrus is one example of this.
mtmodder148
Member
 
Posts: 131
Joined: Wed May 14, 2014 1:44 pm
GitHub: MT-Modder
In-game: mtmodder148

Re: [Mod] Hydroponics [git] [hydroponics]

Postby mtmodder148 » Sun Feb 01, 2015 5:49 pm

Updated: Now you can place the light however high up you want and it works with all growing plants.
mtmodder148
Member
 
Posts: 131
Joined: Wed May 14, 2014 1:44 pm
GitHub: MT-Modder
In-game: mtmodder148

Re: [Mod] Hydroponics [git] [hydroponics]

Postby Topywo » Sun Feb 01, 2015 6:39 pm

Great, thanks for making it possible :-)
Topywo
Member
 
Posts: 1724
Joined: Fri May 18, 2012 8:27 pm

Re: [Mod] Hydroponics [git] [hydroponics]

Postby mtmodder148 » Sun Feb 01, 2015 6:41 pm

No thank you for giving me the idea :-). I would have never thought to do it.
mtmodder148
Member
 
Posts: 131
Joined: Wed May 14, 2014 1:44 pm
GitHub: MT-Modder
In-game: mtmodder148

Re: [Mod] Hydroponics [git] [hydroponics]

Postby mtmodder148 » Mon Feb 02, 2015 12:23 am

I added a height max setting if someone wants to use it. It's located at the top of grow_light.lua. Default is 0, which means there is no height max.
mtmodder148
Member
 
Posts: 131
Joined: Wed May 14, 2014 1:44 pm
GitHub: MT-Modder
In-game: mtmodder148

Re: [Mod] Hydroponics [git] [hydroponics]

Postby mtmodder148 » Wed Feb 04, 2015 6:01 am

Major cleanup/rewrite. See github for more info.
mtmodder148
Member
 
Posts: 131
Joined: Wed May 14, 2014 1:44 pm
GitHub: MT-Modder
In-game: mtmodder148

Re: [Mod] Hydroponics [git] [hydroponics]

Postby mtmodder148 » Sun Mar 01, 2015 11:04 pm

This mod has been optimized and now runs a bit faster.
mtmodder148
Member
 
Posts: 131
Joined: Wed May 14, 2014 1:44 pm
GitHub: MT-Modder
In-game: mtmodder148

Re: [Mod] Hydroponics [git] [hydroponics]

Postby tbillion » Wed Dec 09, 2015 8:41 am

is there a way to get this to work with saplings?
tbillion
Member
 
Posts: 189
Joined: Wed Apr 03, 2013 4:07 pm

Re: [Mod] Hydroponics [git] [hydroponics]

Postby mtmodder148 » Sat Feb 27, 2016 11:19 pm

Sorry for the late reply but default saplings should work unless you have a mod such as ethereal because certain mods like that will override how they grow.
mtmodder148
Member
 
Posts: 131
Joined: Wed May 14, 2014 1:44 pm
GitHub: MT-Modder
In-game: mtmodder148

Re: [Mod] Hydroponics [git] [hydroponics]

Postby mtmodder148 » Thu Mar 03, 2016 1:41 am

Another Complete Cleanup/Optimization/Rewrite
Whatever you wanna call it...

Changes:
- Remove a lot of unneeded comments
- Drop support for homedecor & moreblocks
- Unify grow light functions
- Update gravel texture
- Made the default light height 2
mtmodder148
Member
 
Posts: 131
Joined: Wed May 14, 2014 1:44 pm
GitHub: MT-Modder
In-game: mtmodder148

Re: [Mod] Hydroponics [git] [hydroponics]

Postby benrob0329 » Wed May 25, 2016 2:46 pm

I'm confused as to what this does for plants...
benrob0329
Member
 
Posts: 1262
Joined: Thu Aug 06, 2015 10:39 pm
GitHub: Benrob0329
In-game: benrob03

Re: [Mod] Hydroponics [git] [hydroponics]

Postby mtmodder148 » Thu May 26, 2016 12:50 am

@benrob329

Nothing much. lol

The hydroponic bucket is best used with pipeworks otherwise it's just a different looking soil.

The hydroponic light can be placed, by default, 2 nodes above a plant and it will still grow.

So like this:

[light]
[air]
[plant]
[soil/medium]
mtmodder148
Member
 
Posts: 131
Joined: Wed May 14, 2014 1:44 pm
GitHub: MT-Modder
In-game: mtmodder148

Re: [Mod] Hydroponics [git] [hydroponics]

Postby benrob0329 » Thu May 26, 2016 1:28 am

Does it help the plants grow better, like bonemeal?
benrob0329
Member
 
Posts: 1262
Joined: Thu Aug 06, 2015 10:39 pm
GitHub: Benrob0329
In-game: benrob03

Re: [Mod] Hydroponics [git] [hydroponics]

Postby mtmodder148 » Thu May 26, 2016 2:26 am

No sorry.

But if you use tenplus1's farming_redo and ethereal mods then dirt will randomly drop a bone which can be crafted into bonemeal and used on those plants to make them grow faster, I believe.
mtmodder148
Member
 
Posts: 131
Joined: Wed May 14, 2014 1:44 pm
GitHub: MT-Modder
In-game: mtmodder148

Re: [Mod] Hydroponics [git] [hydroponics]

Postby casp3r » Sat Dec 09, 2017 12:11 pm

hi good job for the mod but i have a probleme nothing growing in my house
i've past 6 h to build a giant underground hydroponics room and nothing growing

i think the probleme is the growing light cause when i place the buckets outside they are no probleme
bucket with pipework work fine really good but i need a working growing light

i'm on mntst 0.4.16 with farming_redo 1.29
casp3r
Member
 
Posts: 21
Joined: Sat Nov 11, 2017 10:38 am

Re: [Mod] Hydroponics [git] [hydroponics]

Postby dawgdoc » Sun Dec 10, 2017 4:40 am

casp3r wrote:hi good job for the mod but i have a probleme nothing growing in my house
i've past 6 h to build a giant underground hydroponics room and nothing growing

i think the probleme is the growing light cause when i place the buckets outside they are no probleme
bucket with pipework work fine really good but i need an working growing light

i'm on mntst 0.4.16 with farming_redo 1.29

It could be because light levels for torches was lowered either with 0.4.16 or 0.4.15. You now need something brighter to get plants and crops to grow anywhere other than outdoors. I haven't looked at the code to see what the light levels for the grow lights is, but maybe you could change it if necessary. LIkewise, I don't know if you could use a mese torch or mese lamp. The code could be specific for the grow lights, requiring you to use them.
dawgdoc
Member
 
Posts: 251
Joined: Mon Feb 27, 2017 1:10 am
GitHub: dawgdoc

Re: [Mod] Hydroponics [git] [hydroponics]

Postby casp3r » Sun Dec 10, 2017 11:54 am

ok that's working with a mese lamp , i've compare the two code and ...
https://github.com/MT-Modder/hydroponic ... _light.lua
Code: Select all
minetest.register_node("hydroponics:grow_light_on", {
   description = "Hydroponic Grow Light (On)",
   tiles = {
      "hydroponics_grow_light_ts.png",
      "hydroponics_grow_light_b_on.png",
      "hydroponics_grow_light_ts.png"
   },
   light_source = 14, -- i'm changing it to the meselamp value (default.LIGHT_MAX)
   drop = "hydroponics:grow_light_off",
   groups = {snappy = 2, not_in_creative_inventory = 1},
   sounds = default.node_sound_stone_defaults(),
   on_punch = function(pos, node, puncher, pointed_thing)
      if not mesecons_mod then
         hydroponics.toggle_light(pos, false)
      else
         return
      end
end,


it's working now :)
BUT only on the first block under how can i make it working on 2 block under, somebody can tell me the line to add or change for this
i think the probleme is here maybe outdated or something like this

Code: Select all
-- How far lights can be from a plant. 0 = infinite
local height_max = 2

local grow_light_rules = {
   {x = 1, y = 0, z = 0},
   {x = -1, y = 0, z = 0},
   {x = 0, y = -1, z = 0},
   {x = 0, y = 1, z = 0},
   {x = 0, y = 0, z = -1},
   {x = 0, y = 0, z = 1},
}

function hydroponics.toggle_light(pos, toggle_state, dug)
   if toggle_state then
      minetest.set_node(pos, {name = "hydroponics:grow_light_on"})
   elseif not dug then
      minetest.set_node(pos, {name = "hydroponics:grow_light_off"})
   end
   local p = {x = pos.x, y = pos.y - 1, z = pos.z}
   local n = minetest.get_node(p)
   local height = 0
   while n.name == "air" and height ~= height_max do
      if toggle_state then
         minetest.set_node(p, {name = "air", param1 = 238})
      else
         minetest.set_node(p, {name = "air", param1 = 0})
      end
      p = {x = p.x, y = p.y - 1, z = p.z}
      n = minetest.get_node(p)
      height = height + 1
end
casp3r
Member
 
Posts: 21
Joined: Sat Nov 11, 2017 10:38 am

Re: [Mod] Hydroponics [git] [hydroponics]

Postby Fixer » Fri Apr 19, 2019 9:35 pm

Original repo is no longer available, mirror of it is here: https://github.com/Fixer-007/hydroponics
Fixer
Member
 
Posts: 891
Joined: Sun Jul 31, 2011 11:23 am
In-game: Fixer



Return to Mod Releases



Who is online

Users browsing this forum: Yandex Bot [Bot] and 0 guests