mod of tools. #19
6
abm.lua
|
@ -92,8 +92,8 @@ minetest.register_abm({
|
|||
label="Planting crops",
|
||||
nodenames = farming.change_soil,
|
||||
neighbors = {"air"},
|
||||
interval = 15+math.random(-1,1), -- little noise
|
||||
chance = 200,
|
||||
interval = farming.abm_planting+math.random(-1,1), -- little noise
|
||||
chance = farming.abm_planting_chance,
|
||||
action = function(pos)
|
||||
local starttime=os.clock()
|
||||
local ptabove={x=pos.x,y=pos.y+1,z=pos.z}
|
||||
|
@ -125,7 +125,7 @@ minetest.register_abm({
|
|||
if line.temp_min<=node_temp and line.temp_max>=node_temp then
|
||||
local node_hum=minetest.get_humidity(pos)
|
||||
if line.hum_min<=node_hum and line.hum_max>=node_hum then
|
||||
if line.light_min<=ptlight and line.light_max >= ptlight then
|
||||
if line.light_min<ptlight and line.light_max >= ptlight then
|
||||
for k=1,line.base_rate do
|
||||
table.insert(sc,line.name)
|
||||
end
|
||||
|
|
|
@ -116,6 +116,7 @@ farming.punch_step = function(pos, node, puncher, pointed_thing)
|
|||
meta:set_int("farming:step",pre_def.groups.step)
|
||||
|
||||
if pre_def.next_step then
|
||||
local waittime=math.random(pre_def.grow_time_min or 100, pre_def.grow_time_max or 200) * farming.factor_regrow
|
||||
minetest.get_node_timer(pos):start(math.random(pre_def.grow_time_min or 100, pre_def.grow_time_max or 200))
|
||||
end
|
||||
--table.insert(farming.time_plantpunch,1000*(os.clock()-starttime))
|
||||
|
|
|
@ -24,7 +24,10 @@ farming.wait_max = 20
|
|||
farming.wilt_removal_time = 60
|
||||
farming.wilt_time = 5
|
||||
farming.min_light = 10
|
||||
farming.health_threshold=50
|
||||
farming.health_threshold=50 -- plant with healthiness smaller this threshold can get ill
|
||||
farming.factor_regrow = 2 -- after punching fruits the plant needs more time to regrow
|
||||
farming.abm_planting=15 -- time intervall for abm planting
|
||||
farming.abm_planting_change=200 -- change for abm planting for execution
|
||||
|
||||
-- node type, where grain can be randomly found
|
||||
farming.change_soil = {}
|
||||
|
|
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 514 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 17 KiB |
|
@ -0,0 +1,96 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="79.658127mm"
|
||||
height="75.527893mm"
|
||||
viewBox="0 0 79.658127 75.527893"
|
||||
version="1.1"
|
||||
id="svg4316"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="flail.svg"
|
||||
inkscape:export-filename="/home/ademant/src/mt5/mods/farming/textures/src/flail.png"
|
||||
inkscape:export-xdpi="161.67673"
|
||||
inkscape:export-ydpi="161.67673">
|
||||
<defs
|
||||
id="defs4310" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.6064103"
|
||||
inkscape:cx="105.37983"
|
||||
inkscape:cy="158.44129"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="717"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" />
|
||||
<metadata
|
||||
id="metadata4313">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(126.76158,8.3718467)">
|
||||
<path
|
||||
id="path1908"
|
||||
style="display:inline;fill:#ffffff;stroke:#000000;stroke-width:0.79374999;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m -53.697918,-3.884967 0.33368,25.648531"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
id="rect1901"
|
||||
transform="matrix(-0.70560272,-0.70860765,-0.70601585,0.70819603,0,0)"
|
||||
y="32.394314"
|
||||
x="40.257351"
|
||||
ry="1.355962"
|
||||
rx="1.6597018"
|
||||
height="8.2304306"
|
||||
width="4.241715"
|
||||
style="display:inline;fill:#897103;fill-opacity:1;stroke:#000000;stroke-width:0.79375273;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
id="rect1896"
|
||||
style="display:inline;fill:#e9cf59;fill-opacity:1;stroke:#000000;stroke-width:1.50000504;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="matrix(-0.70560272,-0.70860765,-0.70601585,0.70819603,0,0)"
|
||||
y="38.924084"
|
||||
x="37.86248"
|
||||
ry="2.2674632"
|
||||
rx="1.6597018"
|
||||
height="94.341919"
|
||||
width="8.9980364" />
|
||||
<path
|
||||
id="rect1898"
|
||||
d="m -51.657948,21.194001 -3.07373,-0.35569 c -1.43594,-0.166163 -4.63519,1.842921 -4.74822,3.30295 l -0.46555,30.263773 c -0.16375,2.115281 1.94072,8.71192 1.94072,8.71192 l 3.07373,0.355679 c 0,0 3.0794,-5.996762 3.24316,-8.11204 l 4.18693,-29.833127 c -0.0282,-1.366192 -2.72111,-4.167304 -4.15704,-4.333465 z"
|
||||
style="display:inline;fill:#e9cf59;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:transform-center-x="-37.170081"
|
||||
inkscape:transform-center-y="40.25125"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 23 KiB |
|
@ -0,0 +1,134 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="79.396439mm"
|
||||
height="86.114304mm"
|
||||
viewBox="0 0 79.396439 86.114303"
|
||||
version="1.1"
|
||||
id="svg4316"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="picker.svg"
|
||||
inkscape:export-filename="/home/ademant/src/mt5/mods/farming/textures/src/flail.png"
|
||||
inkscape:export-xdpi="161.67673"
|
||||
inkscape:export-ydpi="161.67673">
|
||||
<defs
|
||||
id="defs4310" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.6064103"
|
||||
inkscape:cx="167.9206"
|
||||
inkscape:cy="254.97909"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="717"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
showguides="false" />
|
||||
<metadata
|
||||
id="metadata4313">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(127.11345,5.585217)">
|
||||
<g
|
||||
id="g4642"
|
||||
transform="rotate(9.4220578,-127.57705,0.62509843)">
|
||||
<rect
|
||||
style="display:inline;fill:#897103;fill-opacity:1;stroke:#000000;stroke-width:0.79375273;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
width="4.241715"
|
||||
height="8.2304306"
|
||||
rx="1.6597018"
|
||||
ry="1.355962"
|
||||
x="-75.67511"
|
||||
y="-83.60553"
|
||||
transform="matrix(0.70560272,-0.70860765,0.70601585,0.70819603,0,0)"
|
||||
id="rect1901" />
|
||||
<rect
|
||||
width="8.9980364"
|
||||
height="94.341919"
|
||||
rx="1.6597018"
|
||||
ry="2.2674632"
|
||||
x="-78.069984"
|
||||
y="-77.07576"
|
||||
transform="matrix(0.70560272,-0.70860765,0.70601585,0.70819603,0,0)"
|
||||
style="display:inline;fill:#e9cf59;fill-opacity:1;stroke:#000000;stroke-width:1.50000501;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect1896" />
|
||||
</g>
|
||||
<g
|
||||
id="g4618"
|
||||
transform="matrix(-1,0,0,1,-194.11662,-47.376608)">
|
||||
<rect
|
||||
ry="2.7999799"
|
||||
y="41.791466"
|
||||
x="-81.69323"
|
||||
height="7.9058261"
|
||||
width="4.2823219"
|
||||
id="rect842"
|
||||
style="fill:#897103;fill-opacity:1;stroke-width:1.29283738;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||
<rect
|
||||
ry="2.7999799"
|
||||
y="41.791466"
|
||||
x="-75.824684"
|
||||
height="7.9058261"
|
||||
width="4.2823219"
|
||||
id="rect842-7"
|
||||
style="fill:#897103;fill-opacity:1;stroke-width:1.29283738;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect842-5"
|
||||
d="m -85.420919,41.791391 c -0.183218,0 -0.35965,0.0333 -0.529166,0.0894 v 7.727177 c 0.169516,0.0561 0.345948,0.0894 0.529166,0.0894 1.186202,0 2.141472,-1.24864 2.141472,-2.799828 v -2.30632 c 0,-1.551189 -0.95527,-2.799829 -2.141472,-2.799829 z"
|
||||
style="fill:#897103;fill-opacity:1;stroke-width:1.29283738;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||
<path
|
||||
id="rect842-5-3"
|
||||
d="m -67.814675,41.791391 c 0.18322,0 0.35965,0.0333 0.52917,0.0894 v 7.727177 c -0.16952,0.0561 -0.34595,0.0894 -0.52917,0.0894 -1.1862,0 -2.14147,-1.24864 -2.14147,-2.799829 v -2.30632 c 0,-1.551188 0.95527,-2.799828 2.14147,-2.799828 z"
|
||||
style="fill:#897103;fill-opacity:1;stroke-width:1.29283738;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
ry="5.5714097"
|
||||
y="46.583424"
|
||||
x="-85.80497"
|
||||
height="17.422543"
|
||||
width="18.156679"
|
||||
id="rect4610"
|
||||
style="fill:#e8e1c0;fill-opacity:1;stroke:#000000;stroke-width:1.290241;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
y="45.909138"
|
||||
x="-85.950089"
|
||||
height="3.6988285"
|
||||
width="18.152788"
|
||||
id="rect4608"
|
||||
style="fill:#897103;fill-opacity:1;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.9 KiB |