First (non-functional) version of the drinking fountain
parent
79c90ddc87
commit
3a820a3b26
43
init.lua
43
init.lua
|
@ -412,7 +412,7 @@ function thirsty.on_use_hydro_container( capacity )
|
|||
elseif itemstack:get_wear() ~= 0 then
|
||||
-- drinking from it
|
||||
local hydro_missing = 20 - pl.hydro;
|
||||
if hydro_missing > 0 then
|
||||
if hydro_missing > 0 then
|
||||
local wear_missing = hydro_missing / capacity * 65535.0;
|
||||
local wear = itemstack:get_wear()
|
||||
local new_wear = math.ceil(math.max(wear + wear_missing, 1))
|
||||
|
@ -464,6 +464,47 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
--[[
|
||||
|
||||
Tier 3
|
||||
|
||||
]]
|
||||
|
||||
minetest.register_node('thirsty:drinking_fountain', {
|
||||
description = 'Drinking fountain',
|
||||
drawtype = 'nodebox',
|
||||
tiles = {
|
||||
-- top, bottom, right, left, front, back
|
||||
'thirsty_drinkfount_top.png',
|
||||
'thirsty_drinkfount_bottom.png',
|
||||
'thirsty_drinkfount_side.png',
|
||||
'thirsty_drinkfount_side.png',
|
||||
'thirsty_drinkfount_side.png',
|
||||
'thirsty_drinkfount_side.png',
|
||||
},
|
||||
paramtype = 'light',
|
||||
groups = {cracky=3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -3/16, -8/16, -3/16, 3/16, 3/16, 3/16 },
|
||||
{ -8/16, 3/16, -8/16, 8/16, 6/16, 8/16 },
|
||||
{ -8/16, 6/16, -8/16, 8/16, 8/16, -6/16 },
|
||||
{ -8/16, 6/16, 6/16, 8/16, 8/16, 8/16 },
|
||||
{ -8/16, 6/16, -6/16, -6/16, 8/16, 6/16 },
|
||||
{ 6/16, 6/16, -6/16, 8/16, 8/16, 6/16 },
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "regular",
|
||||
},
|
||||
collision_box = {
|
||||
type = "regular",
|
||||
},
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
-- TODO: drink ;-)
|
||||
end
|
||||
})
|
||||
|
||||
-- read on startup
|
||||
thirsty.read_stash()
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
<?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="16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="birdbath_side.svg"
|
||||
inkscape:export-filename="/home/ben/progs/minetest/minetest-thirsty/textures/thirsty_birdbath_side.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs4">
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3824"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3820"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3761"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3761-8"
|
||||
is_visible="true" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#838181"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="31.678384"
|
||||
inkscape:cx="9.7439934"
|
||||
inkscape:cy="7.3273732"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="744"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:snap-bbox="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3755"
|
||||
empspacing="5"
|
||||
visible="true"
|
||||
enabled="true"
|
||||
snapvisiblegridlinesonly="true" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<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="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-1036.3622)">
|
||||
<rect
|
||||
style="fill:#b9b9b9;fill-opacity:1;stroke:none"
|
||||
id="rect3861-5"
|
||||
width="16"
|
||||
height="15.999983"
|
||||
x="0"
|
||||
y="1036.3622" />
|
||||
<rect
|
||||
style="fill:#878787;fill-opacity:1;stroke:none"
|
||||
id="rect3861-5-7"
|
||||
width="14"
|
||||
height="14.000017"
|
||||
x="1"
|
||||
y="1037.3622" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
|
@ -0,0 +1,115 @@
|
|||
<?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="16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="drinkfount_side.svg"
|
||||
inkscape:export-filename="/home/ben/progs/minetest/minetest-thirsty/textures/thirsty_drinkfount_side.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs4">
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3824"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3820"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3761"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3761-8"
|
||||
is_visible="true" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#838181"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="31.678384"
|
||||
inkscape:cx="9.7124262"
|
||||
inkscape:cy="9.316111"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="744"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:snap-bbox="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3755"
|
||||
empspacing="5"
|
||||
visible="true"
|
||||
enabled="true"
|
||||
snapvisiblegridlinesonly="true" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<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="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-1036.3622)">
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none"
|
||||
id="rect3015"
|
||||
width="16"
|
||||
height="16"
|
||||
x="0"
|
||||
y="0"
|
||||
transform="translate(0,1036.3622)" />
|
||||
<rect
|
||||
style="fill:#b9b9b9;fill-opacity:1;stroke:none"
|
||||
id="rect3861"
|
||||
width="16"
|
||||
height="1.0000174"
|
||||
x="0"
|
||||
y="1040.3622" />
|
||||
<rect
|
||||
style="fill:#b9b9b9;fill-opacity:1;stroke:none"
|
||||
id="rect3861-5-5"
|
||||
width="1"
|
||||
height="11.000017"
|
||||
x="6"
|
||||
y="1041.3622" />
|
||||
<rect
|
||||
style="fill:#b9b9b9;fill-opacity:1;stroke:none"
|
||||
id="rect3861-5-5-0"
|
||||
width="1"
|
||||
height="11.000017"
|
||||
x="9"
|
||||
y="1041.3622" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.1 KiB |
|
@ -0,0 +1,114 @@
|
|||
<?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="16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="birdbath_top.svg"
|
||||
inkscape:export-filename="/home/ben/progs/minetest/minetest-thirsty/textures/thirsty_birdbath_top.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs4">
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3824"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3820"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3761"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect3761-8"
|
||||
is_visible="true" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#838181"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="31.678384"
|
||||
inkscape:cx="7.3448812"
|
||||
inkscape:cy="8.5584966"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="744"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:snap-global="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3755"
|
||||
empspacing="5"
|
||||
visible="true"
|
||||
enabled="true"
|
||||
snapvisiblegridlinesonly="true" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<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="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-1036.3622)">
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none"
|
||||
id="rect3015"
|
||||
width="16"
|
||||
height="16"
|
||||
x="0"
|
||||
y="0"
|
||||
transform="translate(0,1036.3622)" />
|
||||
<rect
|
||||
style="fill:#c5c5c5;fill-opacity:1;stroke:none"
|
||||
id="rect3785-8"
|
||||
width="13.988738"
|
||||
height="13.95717"
|
||||
x="1"
|
||||
y="1037.3723" />
|
||||
<rect
|
||||
style="fill:#0063c8;fill-opacity:1;stroke:none"
|
||||
id="rect3785"
|
||||
width="12"
|
||||
height="12"
|
||||
x="2.0315673"
|
||||
y="1038.3622" />
|
||||
<rect
|
||||
style="fill:#0681ff;fill-opacity:1;stroke:none"
|
||||
id="rect3785-9"
|
||||
width="10.04283"
|
||||
height="10.04283"
|
||||
x="2.9988904"
|
||||
y="1039.3081" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 184 B |
Binary file not shown.
After Width: | Height: | Size: 182 B |
Binary file not shown.
After Width: | Height: | Size: 236 B |
Loading…
Reference in New Issue