26 Commits

Author SHA1 Message Date
AntumDeluge
98d859fc22 Replace deprecated method 'setting_getbool' with 'settings:get_bool' 2017-09-30 11:44:27 -07:00
Auke Kok
feb203fb40 Fix whitespace. 2016-12-15 11:47:34 -08:00
Auke Kok
ff3c34cb2f Convert to meshoptions plantlike.
- remove custom model for corn!
- corn model stays the same shape, param2 = 3
- tomato now is + shaped, not x, param2 = 1
2016-10-18 14:09:34 -07:00
Auke Kok
3b6c0e5e78 Luacheck cleanups and .luacheckrc
Use `luacheck .` to run luacheck on this mod.

Cleaned up luacheck errors.
2016-10-18 09:33:30 -07:00
xisd
e6421d8d49 Intllib (#5)
Support for translation via intllib.
2016-10-18 09:13:59 -07:00
Auke Kok
9e0c43feeb For future use, make corn waving just like plantlike.
This needs a patch to the core client code to actually work.
2015-12-28 21:36:19 -08:00
Auke Kok
9a42477859 Enable placement prediction everywhere. 2015-12-11 15:57:08 -08:00
Auke Kok
5329ff5b36 Particle spawner on dead plants: flies.
These buzz around dead plants, right after they die.
2015-11-25 22:25:41 -08:00
Auke Kok
6c32b3c6c1 Fix corn withering - wrong node name here broke it 2015-05-09 23:15:08 -07:00
Auke Kok
c33ff695c0 Off-by one change.
take damge when water <>= damage_limit (and not <>)

corn can go down to 5. 0-4 is considered bone dry anyway.
2015-05-07 23:44:23 -07:00
Auke Kok
68f0acc354 Prevented corn from actually taking damage 2015-05-07 23:43:27 -07:00
Auke Kok
7ba94da27a Abstract crops.register method a bit. 2015-05-07 23:40:14 -07:00
Auke Kok
bcf27ebd99 Fix a few errors exposed by difficult setting. 2015-05-07 23:08:53 -07:00
Auke Kok
a1be5250b8 Unify the difficulty settings into init.lua
All the scaling factors are now either in the plant table or the
crops.settings table. This makes end-user tuning a bit harder, but
switching easier and configuring easier as well.
2015-05-06 23:59:25 -07:00
Auke Kok
761c6618aa No need for this. 2015-05-06 00:29:00 -07:00
Auke Kok
fa07d3307a Humidity for corn.
Adding some code to handle double sized plants easily. The
watering can now redirects water to the bottom, and the hydrometer
reads the bottom half water value instead of the top. No ABM's for
hydration happen on the top half, so no risk of double damage there.
2015-05-05 23:47:42 -07:00
Auke Kok
baf1b9ce6a Configuration - persistent config file
This allows a server admin to tweak the mods growth rate, chance
and required light level. For convenience I've made 3 sets of
"easy", "normal" and "difficult" settings so that it's easy to
understand what the difference is and what good starting values
are.
2015-04-23 22:51:27 -07:00
Auke Kok
318f3815d3 Interval/chance update.
- Globally use the same across all veggies
- use a shorter ABM, with lower chance

I don't like the fact that if you have 100 plants, then half of them
will ALL change phase every 90 seconds. It's just very unnatural. By
changing the rate/chance proportionally, plants still grow about as
fast (~1200secs for 90% growth rate to 5 phases), but there will be
less abrupt changes and no massive block updates, just small amounts
at a time. Yes, more ABM's will fire, but that's unlikely a load that
it won't be able to handle.
2015-04-13 21:01:45 -07:00
Auke Kok
5f9a5d7835 Add default leaf sounds to all the crops.
Only melon blocks have a different sound at this point.
2015-04-12 18:56:52 -07:00
Auke Kok
076bf8e031 Use the default plant interval and chance (90/2) 2015-04-10 16:42:31 -07:00
Auke Kok
44505e2282 restrict all of these crops from growing if they're not on soil 2015-04-10 16:41:48 -07:00
Auke Kok
c80f253432 Properly add dig handlers for these 2 corn tops. 2015-04-10 16:04:16 -07:00
Auke Kok
c686740080 I make this mistake a lot... Get proper name from node. 2015-04-10 11:52:27 -07:00
Auke Kok
acd6cf5db5 Don't make it wither if removing unripe corn plants. 2015-04-10 11:46:07 -07:00
Auke Kok
d9e83d0e40 Also break non-ripe tops properly. 2015-04-10 11:45:01 -07:00
Auke Kok
25f37fbd0d Corn.
Corn plants are 2 blocks high, and yield corn cobs. These can be
cooked to corn-on-the-cob, or processed to make corn seed (corn
kernels, basically).

Digging a mature plant yields the corn cob. A harvested corn plant
"wilts", and needs to be dug away to make the land usable, or can
be left as ornamental 2-block plant. Digging either top or bottom
block works in all cases, although I need to verify that I've
covered every block combo.
2015-04-10 11:08:27 -07:00