First working version

master
prestidigitator 2014-07-05 16:30:45 -07:00
parent c055545b6b
commit 76bd0c9ea5
15 changed files with 1716 additions and 0 deletions

105
README.txt Normal file
View File

@ -0,0 +1,105 @@
Wardrobe Minetest Mod
=====================
This mod provides a very simple way to change the skin on the default charcater
mesh. Unlike other skin-changing mods out there, it does not attempt to change
the character mesh, does not provide for the old 2D billboard-type character
appearance, and does not depend on any kind of inventory extension mods. It
also does not rely on running external scripts, downloading skins from a
server, or anything of that nature.
Changing skins is done via a new "wardrobe" node, which brings up a form with
skin names when you right-click on it (like a chest or furnace). Choosing a
skin instantly changes your character's appearance, and this change is kept if
you log out (unless the skin is removed from the server, in which case your
appearance will revert to the default when you log in).
The list of skins is static and determined when the server starts based on two
files: <modsPath>/wardrobe/skins.txt and <worldPath>/skins.txt. Both files
have the same syntax (see "Skins File Syntax" below). The simplest way to add
a skin is to either drop the image into the <modsPath>/wardrobe/textures
directory or add them to a texture pack, then add the simple name of the
texture file to one of these skins.txt files.
For convenience, some SVG images have been included with this mod. One
("skinTemplate.svg") shows the exact layout of a Minetest skin for the default
character model, and should be useful for creating new skins. This layout is
also (mostly?) compatible with Minecraft skins. The others can be used to
create higher resolution textures for the wardrobe object, in case you are
using a texture pack with resolutions greater than 16x16. Skins too may be
higher resolution as long as they have an aspect ratio of 2:1. The author of
this mod created a very high resolution version of the default character and it
works well (but has not been included to simplify mod licensing).
Skins File Syntax
-----------------
A comment line starts with two dashes (like in Lua), but must be the only thing
on the line:
-- This is a comment and has no effect.
Except for empty lines and comments, each line names a texture (file) and a
name, separated by optional whitespace and a colon (:):
texture_file_name.png: My Skin
skin_other_texture_file_name.png: Other Skin
The first string (e.g. "texture_file_name.png") will be passed to the minetest
API just like any other node or item texture. Generally it is simply the whole
file name of an image in a mod "texture" directory or texture pack. The second
string (e.g. "My Skin") is presented to the player in-world as the name of the
texture. If this name is omitted, as in:
texture_file_name.png
skin_other_texture_file_name.png
Then a name is constructed by removing any ".png" suffix any optional "skin_"
or "wardrobe_skin_" prefix, and replacing underscores with spaces. So the
above skins would be named "texture file name" and "other texture file name",
respectively.
To remove a skin that was added elsewhere (for example, to a remove a skin in a
particular world), prepend a minus sign (-) to the line. For example:
-skin_other_texture_file_name.png
Would remove the "skin_other_texture_file_name.png" skin no matter where it was
specified or what name it was given.
Mod Details
-----------
Required Minetest Version: >=0.4.9 (not tested in earlier versions)
Dependencies: default, farming, wool (all included in minetest_game)
Recipies:
* W - any wood (same kinds you can make a chest from)
* S - any stick
* L - any wool
wardrobe:
W S W
W L W
W L W
Git Repo: https://github.com/prestidigitator/minetest-mod-wardrobe
Copyright and Licensing
-----------------------
All contents, including source code, documentation, and images, are the
original creations of the mod author.
Author: prestidigitator (as registered on forum.minetest.net)
License: WTFPL (all content)
Change History
--------------
Version 1.0
* Released 2014-07-05
* First working version

3
depends.txt Normal file
View File

@ -0,0 +1,3 @@
default
farming
wool

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

621
doc/svg/skinTemplate.svg Normal file
View File

@ -0,0 +1,621 @@
<?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="64"
height="32"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="skinTemplate.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="22.203125"
inkscape:cx="32"
inkscape:cy="16"
inkscape:document-units="px"
inkscape:current-layer="layer3"
showgrid="true"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="1918"
inkscape:window-y="-3"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid4860"
units="px"
empspacing="4"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px" />
</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="template"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1020.3622)"
sodipodi:insensitive="true">
<flowRoot
xml:space="preserve"
id="flowRoot4001"
style="font-size:4px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
transform="translate(0,1020.3622)"><flowRegion
id="flowRegion4003"><rect
id="rect4005"
width="36.178391"
height="16.751614"
x="23.821686"
y="17.3503" /></flowRegion><flowPara
id="flowPara4007"></flowPara></flowRoot> <g
style="display:inline"
id="g4689"
transform="translate(-20,0)">
<path
style="fill:#ff00ff;fill-opacity:1;stroke:#000000;stroke-width:0.25;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 20,1052.3622 16,0 0,-12 -4,0 0,-4 -8,0 0,4 -4,0 z"
id="path4691"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccc" />
<path
id="path4693"
style="fill:none;stroke:#000000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1, 0.25;stroke-dashoffset:0"
d="m 24,1040.3622 4,0 m 0,0 0,12 m 4,0 0,-12 m -8,0 0,12"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
<path
id="path4818-8"
style="fill:none;stroke:#000000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
d="m 32,1040.3622 -4,0 m 0,-4 0,4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<g
id="g4695">
<text
sodipodi:linespacing="125%"
id="text4697"
y="1045.1437"
x="27.926758"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:3px;text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1"
y="1045.1437"
x="27.926758"
id="tspan4699"
sodipodi:role="line">Legs</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4701"
y="1039.4557"
x="26.000732"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:3px;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1"
y="1039.4557"
x="26.000732"
id="tspan4703"
sodipodi:role="line">T</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4705"
y="1039.4557"
x="29.958252"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:3px;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1"
y="1039.4557"
x="29.958252"
id="tspan4707"
sodipodi:role="line">B</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4709"
y="1049.4557"
x="25.941406"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:3px;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1"
y="1049.4557"
x="25.941406"
id="tspan4711"
sodipodi:role="line">F</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4713"
y="1049.4557"
x="34"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:3px;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1"
y="1049.4557"
x="34"
id="tspan4715"
sodipodi:role="line">H</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4717"
y="1049.4542"
x="22"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:3px;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1"
y="1049.4542"
x="22"
id="tspan4719"
sodipodi:role="line">O</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4721"
y="1049.4557"
x="30"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:3px;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1"
y="1049.4557"
x="30"
id="tspan4723"
sodipodi:role="line">I</tspan></text>
</g>
</g>
<g
style="display:inline"
id="g4128">
<path
sodipodi:nodetypes="ccccccccc"
inkscape:connector-curvature="0"
id="path3925"
d="m 64,1036.3622 0,-8 -8,0 0,-8 -16,0 0,8 -8,0 0,8 z"
style="fill:#8181ff;fill-opacity:1;stroke:#000000;stroke-width:0.25;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
id="path3964"
style="fill:none;stroke:#000000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.5, 0.5;stroke-dashoffset:0"
d="m 40,1028.3622 8,0 m 8,0 0,8 m -8,-8 0,8 m -8,-8 0,8"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
<path
id="path4818-6"
style="fill:none;stroke:#000000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
d="m 56,1028.3622 -8,0 m 0,-8 0,8"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<g
id="g4180">
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans"
x="47.980957"
y="1029.4806"
id="text3973"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3975"
x="47.980957"
y="1029.4806"
style="font-size:3px;text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1">Helm</tspan></text>
<text
xml:space="preserve"
style="font-size:3px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="44.000732"
y="1025.4557"
id="text3977"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3979"
x="44.000732"
y="1025.4557">T</tspan></text>
<text
xml:space="preserve"
style="font-size:3px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="51.958252"
y="1025.4557"
id="text3981"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3983"
x="51.958252"
y="1025.4557">B</tspan></text>
<text
xml:space="preserve"
style="font-size:3px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="35.896729"
y="1033.4557"
id="text3985"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3987"
x="35.896729"
y="1033.4557">R</tspan></text>
<text
xml:space="preserve"
style="font-size:3px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="43.941406"
y="1033.4557"
id="text3989"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3991"
x="43.941406"
y="1033.4557">F</tspan></text>
<text
xml:space="preserve"
style="font-size:3px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="51.860107"
y="1033.4557"
id="text3993"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3995"
x="51.860107"
y="1033.4557">L</tspan></text>
<text
xml:space="preserve"
style="font-size:3px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="60"
y="1033.4557"
id="text3997"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3999"
x="60"
y="1033.4557">H</tspan></text>
</g>
</g>
<g
style="display:inline"
id="g4196"
transform="translate(-32,0)">
<path
style="fill:#90ff81;fill-opacity:1;stroke:#000000;stroke-width:0.25;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 64,1036.3622 0,-8 -8,0 0,-8 -16,0 0,8 -8,0 0,8 z"
id="path4198"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccc" />
<path
d="m 40,1028.3622 8,0 m 8,0 0,8 m -8,-8 0,8 m -8,-8 0,8"
style="fill:none;stroke:#000000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.5, 0.5;stroke-dashoffset:0"
id="path4200"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
<path
id="path4818"
transform="translate(32,1020.3622)"
style="fill:none;stroke:#000000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 24,8 -8,0 m 0,-8 0,8"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<g
id="g4202">
<text
sodipodi:linespacing="125%"
id="text4204"
y="1029.4806"
x="47.989014"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:3px;text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1"
y="1029.4806"
x="47.989014"
id="tspan4206"
sodipodi:role="line">Head</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4208"
y="1025.4557"
x="44.000732"
style="font-size:3px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="1025.4557"
x="44.000732"
id="tspan4210"
sodipodi:role="line">T</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4212"
y="1025.4557"
x="51.958252"
style="font-size:3px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="1025.4557"
x="51.958252"
id="tspan4214"
sodipodi:role="line">B</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4216"
y="1033.4557"
x="35.896729"
style="font-size:3px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="1033.4557"
x="35.896729"
id="tspan4218"
sodipodi:role="line">R</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4220"
y="1033.4557"
x="43.941406"
style="font-size:3px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="1033.4557"
x="43.941406"
id="tspan4222"
sodipodi:role="line">F</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4224"
y="1033.4557"
x="51.860107"
style="font-size:3px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="1033.4557"
x="51.860107"
id="tspan4226"
sodipodi:role="line">L</tspan></text>
<text
sodipodi:linespacing="125%"
id="text4228"
y="1033.4557"
x="60"
style="font-size:3px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
y="1033.4557"
x="60"
id="tspan4230"
sodipodi:role="line">H</tspan></text>
</g>
</g>
<g
style="display:inline"
transform="translate(20,0)"
id="g4496">
<path
sodipodi:nodetypes="ccccccccc"
inkscape:connector-curvature="0"
id="path4232"
d="m 20,1052.3622 16,0 0,-12 -4,0 0,-4 -8,0 0,4 -4,0 z"
style="fill:#ff00ff;fill-opacity:1;stroke:#000000;stroke-width:0.25;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
d="m 24,1040.3622 4,0 m 0,0 0,12 m 4,0 0,-12 m -8,0 0,12"
style="fill:none;stroke:#000000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1, 0.25;stroke-dashoffset:0"
id="path4277" />
<path
id="path4818-1"
style="fill:none;stroke:#000000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
d="m 32,1040.3622 -4,0 m 0,-4 0,4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<g
id="g4480">
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans"
x="28.062256"
y="1045.4344"
id="text4280"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4282"
x="28.062256"
y="1045.4344"
style="font-size:3px;text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1">Arms</tspan></text>
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="26.000732"
y="1039.4557"
id="text4280-6"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4282-3"
x="26.000732"
y="1039.4557"
style="font-size:3px;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1">T</tspan></text>
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="29.958252"
y="1039.4557"
id="text4280-6-3"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4282-3-4"
x="29.958252"
y="1039.4557"
style="font-size:3px;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1">B</tspan></text>
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="25.941406"
y="1049.4557"
id="text4280-6-3-8"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4282-3-4-1"
x="25.941406"
y="1049.4557"
style="font-size:3px;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1">F</tspan></text>
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="34"
y="1049.4557"
id="text4280-6-3-0"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4282-3-4-2"
x="34"
y="1049.4557"
style="font-size:3px;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1">H</tspan></text>
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="22"
y="1049.4542"
id="text4280-6-3-88"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4282-3-4-23"
x="22"
y="1049.4542"
style="font-size:3px;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1">O</tspan></text>
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="30"
y="1049.4557"
id="text4280-6-3-6"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4282-3-4-16"
x="30"
y="1049.4557"
style="font-size:3px;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1">I</tspan></text>
</g>
</g>
<g
style="display:inline"
id="g4670"
transform="translate(0,1000.3622)">
<path
sodipodi:nodetypes="ccccccccc"
inkscape:connector-curvature="0"
id="path4533"
d="m 16,52 24,0 0,-12 -4,0 0,-4 -16,0 0,4 -4,0 z"
style="fill:#00bdc0;fill-opacity:1;stroke:#000000;stroke-width:0.25;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
d="m 32,40 0,12 m -4,-12 0,12 m -8,-12 8,0 m -8,0 0,12"
style="fill:none;stroke:#000000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1, 0.5;stroke-dashoffset:0"
id="path4541" />
<path
id="path4818-2"
style="fill:none;stroke:#000000;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
d="m 36,40 -8,0 m 0,-4 0,4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<g
id="g4654">
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans"
x="27.897461"
y="44.827637"
id="text4544"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4546"
x="27.897461"
y="44.827637"
style="font-size:3px;text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1">Body</tspan></text>
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
x="24.000732"
y="39.093506"
id="text4544-0"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4546-8"
x="24.000732"
y="39.093506"
style="font-size:3px;text-align:center;text-anchor:middle">T</tspan></text>
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
x="31.958252"
y="39.093506"
id="text4544-0-7"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4546-8-7"
x="31.958252"
y="39.093506"
style="font-size:3px;text-align:center;text-anchor:middle">B</tspan></text>
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
x="17.896729"
y="49.093506"
id="text4544-0-1"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4546-8-3"
x="17.896729"
y="49.093506"
style="font-size:3px;text-align:center;text-anchor:middle">R</tspan></text>
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
x="23.941406"
y="49.093506"
id="text4544-0-16"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4546-8-1"
x="23.941406"
y="49.093506"
style="font-size:3px;text-align:center;text-anchor:middle">F</tspan></text>
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
x="29.860107"
y="49.093506"
id="text4544-0-6"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4546-8-9"
x="29.860107"
y="49.093506"
style="font-size:3px;text-align:center;text-anchor:middle">L</tspan></text>
<text
xml:space="preserve"
style="font-size:1px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
x="36"
y="49.093506"
id="text4544-0-60"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4546-8-19"
x="36"
y="49.093506"
style="font-size:3px;text-align:center;text-anchor:middle">H</tspan></text>
</g>
</g>
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="drawing" />
</svg>

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,343 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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="New document 1">
<defs
id="defs4">
<linearGradient
id="linearGradient5302"
osb:paint="solid">
<stop
style="stop-color:#46341e;stop-opacity:1;"
offset="0"
id="stop5304" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="50.75"
inkscape:cx="8"
inkscape:cy="8"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="990"
inkscape:window-x="-2"
inkscape:window-y="32"
inkscape:window-maximized="1" />
<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)">
<g
id="g5525-0"
transform="translate(6,0)" />
<g
id="g5783">
<g
id="g5762">
<rect
style="fill:#b48b5b;fill-opacity:1;stroke:none"
id="rect3753"
width="16"
height="16"
x="0"
y="1036.3622" />
<rect
style="fill:#46341e;fill-opacity:1;stroke:none"
id="rect3753-0"
width="14"
height="14"
x="1"
y="1037.3622" />
<rect
style="fill:#d7d7d7;fill-opacity:1;stroke:none"
id="rect3753-0-9"
width="14"
height="1"
x="1"
y="1039.3622" />
</g>
<g
id="g5775">
<rect
style="fill:#cdc0b2;fill-opacity:1;stroke:none"
id="rect3753-0-9-0"
width="1"
height="3"
x="2"
y="1038.3622" />
<rect
style="fill:#cdc0b2;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-4"
width="1"
height="3"
x="4"
y="1038.3622" />
<rect
y="1038.3622"
x="6"
height="3"
width="1"
id="rect5362"
style="fill:#cdc0b2;fill-opacity:1;stroke:none" />
<rect
style="fill:#cdc0b2;fill-opacity:1;stroke:none"
id="rect5364"
width="1"
height="3"
x="8"
y="1038.3622" />
<rect
y="1038.3622"
x="10"
height="3"
width="1"
id="rect5366"
style="fill:#cdc0b2;fill-opacity:1;stroke:none" />
<rect
style="fill:#cdc0b2;fill-opacity:1;stroke:none"
id="rect5368"
width="1"
height="3"
x="13"
y="1038.3622" />
</g>
<g
id="g5767">
<g
id="g5432">
<path
style="fill:#3c58c8;fill-opacity:1;stroke:none"
d="m 14,15 0,-3 -1,0 0,2 -1,0 0,1 z"
id="path5434"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc"
transform="translate(0,1036.3622)" />
<rect
style="fill:#c8c8c8;fill-opacity:1;stroke:none"
id="rect5436"
width="1"
height="1"
x="13"
y="1048.3622" />
</g>
<g
id="g5428"
transform="translate(1,0)">
<path
sodipodi:nodetypes="ccccccc"
transform="translate(0,1036.3622)"
inkscape:connector-curvature="0"
id="path5424"
d="m 14,15 0,-3 -1,0 0,2 -1,0 0,1 z"
style="fill:#5577ff;fill-opacity:1;stroke:none" />
<rect
y="1048.3622"
x="13"
height="1"
width="1"
id="rect5426"
style="fill:#e6e6e6;fill-opacity:1;stroke:none" />
</g>
</g>
<g
id="g5499">
<rect
style="fill:#ff0000;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47"
width="1"
height="5"
x="2"
y="1040.3622" />
<rect
style="fill:#ffff00;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47-8"
width="1"
height="1"
x="2"
y="1043.3622" />
<rect
style="fill:#c80000;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47-0-9"
width="1"
height="3"
x="2"
y="1045.3622" />
</g>
<g
transform="translate(2,0)"
id="g5525">
<rect
style="fill:#213c94;fill-opacity:1;stroke:none"
id="rect5505"
width="1"
height="8"
x="4"
y="1041.3622" />
<rect
style="fill:#293765;fill-opacity:1;stroke:none"
id="rect5505-9"
width="1"
height="8"
x="3"
y="1041.3622" />
</g>
<g
id="g5499-8"
transform="translate(2,0)">
<rect
style="fill:#5aff00;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47-1"
width="1"
height="5"
x="2"
y="1040.3622" />
<rect
style="fill:#47c800;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47-0-9-2"
width="1"
height="3"
x="2"
y="1045.3622" />
</g>
<g
id="g5499-85"
transform="translate(6,0)">
<rect
style="fill:#ff0000;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47-3"
width="1"
height="5"
x="2"
y="1040.3622" />
<rect
style="fill:#3141d3;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47-8-5"
width="1"
height="1"
x="2"
y="1043.3622" />
<rect
style="fill:#394184;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47-0-9-8"
width="1"
height="3"
x="2"
y="1045.3622" />
<rect
style="fill:#3141d3;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47-8-5-0"
width="1"
height="1"
x="2"
y="1041.3622" />
</g>
<g
transform="matrix(-1,0,0,1,15,-4)"
id="g5525-8">
<rect
style="fill:#213c94;fill-opacity:1;stroke:none"
id="rect5505-1"
width="1"
height="4"
x="4"
y="1045.3622" />
<rect
style="fill:#293765;fill-opacity:1;stroke:none"
id="rect5505-9-1"
width="1"
height="4"
x="3"
y="1045.3622" />
</g>
<g
id="g5499-8-1"
transform="translate(11,0)">
<rect
style="fill:#f000ff;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47-1-0"
width="1"
height="5"
x="2"
y="1040.3622" />
<rect
style="fill:#bc00c8;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47-0-9-2-3"
width="1"
height="3"
x="2"
y="1045.3622" />
</g>
<g
transform="translate(0.13374519,0.09950469)"
id="g5734">
<rect
style="fill:#bc00c8;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47-0-9-2-3-4"
width="1"
height="1"
x="9.8662548"
y="1050.2627" />
<rect
y="1049.2627"
x="9.8662548"
height="1"
width="1"
id="rect5426-7"
style="fill:#b1b1b1;fill-opacity:1;stroke:none" />
</g>
<g
transform="translate(-1.8662548,0.09950469)"
id="g5734-5">
<rect
style="fill:#bc00c8;fill-opacity:1;stroke:none"
id="rect3753-0-9-0-47-0-9-2-3-4-1"
width="1"
height="1"
x="9.8662548"
y="1050.2627" />
<rect
y="1050.2627"
x="8.8662548"
height="1"
width="1"
id="rect5426-7-9"
style="fill:#979797;fill-opacity:1;stroke:none" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -0,0 +1,236 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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="wardrobe_wardrobeFront.svg"
inkscape:export-filename="/home/merlin/dev/mt/wardrobe/wardrobe_wardrobeFront.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<linearGradient
id="linearGradient5302"
osb:paint="solid">
<stop
style="stop-color:#46341e;stop-opacity:1;"
offset="0"
id="stop5304" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="35.885669"
inkscape:cx="7.7796302"
inkscape:cy="7.6898499"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="990"
inkscape:window-x="-2"
inkscape:window-y="32"
inkscape:window-maximized="1" />
<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)">
<g
id="g5525-0"
transform="translate(6,0)" />
<g
id="g6128">
<rect
y="1036.3622"
x="0"
height="16"
width="16"
id="rect3753"
style="fill:#b48b5b;fill-opacity:1;stroke:none" />
<rect
style="fill:#9a764c;fill-opacity:1;stroke:none"
id="rect5926"
width="1"
height="16"
x="3"
y="1036.3622" />
<rect
y="1036.3622"
x="5"
height="16"
width="1"
id="rect5928"
style="fill:#9a764c;fill-opacity:1;stroke:none" />
<rect
style="fill:#9a764c;fill-opacity:1;stroke:none"
id="rect5930"
width="1"
height="16"
x="7"
y="1036.3622" />
<rect
y="1036.3622"
x="10"
height="16"
width="1"
id="rect5932"
style="fill:#9a764c;fill-opacity:1;stroke:none" />
<rect
y="1036.3622"
x="14"
height="16"
width="1"
id="rect5936"
style="fill:#9a764c;fill-opacity:1;stroke:none" />
<g
id="g5975">
<rect
style="fill:#9a764c;fill-opacity:1;stroke:none"
id="rect5951"
width="1"
height="3"
x="8"
y="1047.3622" />
<rect
y="1043.3622"
x="8"
height="2"
width="1"
id="rect5971"
style="fill:#9a764c;fill-opacity:1;stroke:none" />
<rect
style="fill:#9a764c;fill-opacity:1;stroke:none"
id="rect5973"
width="1"
height="3"
x="8"
y="1037.3622" />
</g>
<g
transform="matrix(1,0,0,-1,-5.9901478,2088.7244)"
id="g5980">
<rect
y="1047.3622"
x="8"
height="3"
width="1"
id="rect5982"
style="fill:#9a764c;fill-opacity:1;stroke:none" />
<rect
style="fill:#9a764c;fill-opacity:1;stroke:none"
id="rect5984"
width="1"
height="2"
x="8"
y="1043.3622" />
<rect
y="1037.3622"
x="8"
height="3"
width="1"
id="rect5986"
style="fill:#9a764c;fill-opacity:1;stroke:none" />
</g>
<g
id="g5975-9"
transform="translate(4,1.0000174)">
<rect
style="fill:#9a764c;fill-opacity:1;stroke:none"
id="rect5951-3"
width="1"
height="3"
x="8"
y="1047.3622" />
<rect
y="1041.3622"
x="8"
height="3"
width="1"
id="rect5971-2"
style="fill:#9a764c;fill-opacity:1;stroke:none" />
<rect
style="fill:#9a764c;fill-opacity:1;stroke:none"
id="rect5973-2"
width="1"
height="2"
x="8"
y="1037.3622" />
</g>
<rect
y="1042.3622"
x="5"
height="4"
width="1"
id="rect5928-7"
style="fill:#aa7b45;fill-opacity:1;stroke:none" />
<g
id="g6087">
<rect
style="fill:#aa7b45;fill-opacity:1;stroke:none"
id="rect5928-7-4"
width="1"
height="3"
x="10"
y="1047.3622" />
<rect
style="fill:#aa7b45;fill-opacity:1;stroke:none"
id="rect5928-7-4-0"
width="1"
height="3"
x="10"
y="1041.3622" />
<rect
style="fill:#aa7b45;fill-opacity:1;stroke:none"
id="rect5928-7-4-0-3"
width="1"
height="1"
x="10"
y="1037.3622" />
</g>
<rect
y="1036.3622"
x="1"
height="16"
width="1"
id="rect5936-9"
style="fill:#ba9973;fill-opacity:1;stroke:none" />
<rect
y="1036.3622"
x="13"
height="16"
width="1"
id="rect5936-9-3"
style="fill:#ba9973;fill-opacity:1;stroke:none" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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="wardrobe_wardrobe_sides.svg"
inkscape:export-filename="/home/merlin/dev/mt/wardrobe/wardrobe_wardrobeFront.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<linearGradient
id="linearGradient5302"
osb:paint="solid">
<stop
style="stop-color:#46341e;stop-opacity:1;"
offset="0"
id="stop5304" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="35.885669"
inkscape:cx="7.7796302"
inkscape:cy="7.6898499"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="990"
inkscape:window-x="-2"
inkscape:window-y="32"
inkscape:window-maximized="1" />
<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)">
<g
id="g5525-0"
transform="translate(6,0)" />
<rect
style="fill:#b48b5b;fill-opacity:1;stroke:none"
id="rect3753"
width="16"
height="16"
x="0"
y="1036.3622" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

56
init.lua Normal file
View File

@ -0,0 +1,56 @@
wardrobe = wardrobe or {};
local MOD_NAME = minetest.get_current_modname();
local MOD_PATH = minetest.get_modpath(MOD_NAME);
local WORLD_PATH = minetest.get_worldpath();
if MOD_NAME ~= "wardrobe" then
error("mod directory must be named 'wardrobe'");
end
dofile(MOD_PATH.."/storage.lua");
dofile(MOD_PATH.."/wardrobe.lua");
wardrobe.storage.loadSkins();
wardrobe.storage.loadPlayerSkins();
function wardrobe.setPlayerSkin(player)
local playerName = player:get_player_name();
if not playerName or playerName == "" then return; end
local skin = wardrobe.playerSkins[playerName];
if not skin or not wardrobe.skinNames[skin] then return; end
player:set_properties(
{
visual = "mesh",
visual_size = { x = 1, y = 1 },
mesh = "character.x",
textures = { skin }
});
end
function wardrobe.changePlayerSkin(playerName, skin)
local player = minetest.get_player_by_name(playerName);
if not player then
error("unknown player '"..playerName.."'");
end
if skin and not wardrobe.skinNames[skin] then
error("unknown skin '"..skin.."'");
end
wardrobe.playerSkins[playerName] = skin;
wardrobe.storage.savePlayerSkins();
wardrobe.setPlayerSkin(player);
end
minetest.register_on_joinplayer(
function(player)
minetest.after(1,
function(player)
wardrobe.setPlayerSkin(player);
end,
player);
end);

1
skins.txt Normal file
View File

@ -0,0 +1 @@
character.png: Default Skin

184
storage.lua Normal file
View File

@ -0,0 +1,184 @@
wardrobe = wardrobe or {};
wardrobe.storage = wardrobe.storage or {};
local MOD_NAME = minetest.get_current_modname();
local MOD_PATH = minetest.get_modpath(MOD_NAME);
local WORLD_PATH = minetest.get_worldpath();
local SKIN_FILES = { MOD_PATH.."/skins.txt", WORLD_PATH.."/skins.txt" };
local PLAYER_SKIN_DB = WORLD_PATH.."/playerSkins.txt";
local function removePrefix(str, prefix)
local n = #prefix;
if #str >= n and string.sub(str, 1, n) == prefix then
return string.sub(str, n+1);
else
return str;
end
end
local function removeSuffix(str, suffix)
local n = #suffix;
if #str >= n and string.sub(str, -n, -1) == suffix then
return string.sub(str, 1, -(n+1));
else
return str;
end
end
local function trimTail(str)
local e = string.find(str, "%s+$");
return (e and string.sub(str, e-1)) or str;
end
local function parsePlayerSkinLine(line)
local k, v;
local p = string.find(line, "%S");
if p and not string.find(line, "^%-%-", p) then
local ss, se = string.find(line, "%s*:%s*", p);
if ss then
k = string.sub(line, p, ss-1);
v = trimTail(string.sub(line, se+1));
if k == "" then k = nil; end
if v == "" then v = nil; end
end
end
return k, v;
end
local function parseSkinLine(line)
local k, v, n, e;
local p = string.find(line, "%S");
if p then
n, e = string.find(line, "^%-%-?", p);
if not n or n == e then
if n then p = n+1; end
local ss, se = string.find(line, "%s*:%s*", p);
if ss then
k = string.sub(line, p, ss-1);
v = trimTail(string.sub(line, se+1));
if v == "" then v = nil; end
else
k = trimTail(string.sub(line, p));
end
if k == "" then k = nil; end
end
end
return k, v, n;
end
--- Parses the files with the given paths for key/value pairs. Once a key is
-- negated, it stays negated. Otherwise, the last (non-nil) value assigned to
-- a key wins.
--
-- @return A list of non-negated keys. This may include keys for which the
-- values are nil.
-- @return A map from key to value for all non-negated keys with non-nil
-- values.
--
local function loadSkinsFromFiles(filePaths)
local normKeys, negKeys, values = {}, {}, {}
for _, filePath in ipairs(filePaths) do
local file = io.open(filePath, "r");
if file then
for line in file:lines() do
local k, v, n = parseSkinLine(line)
if k then
if n then
normKeys[k] = nil;
values[k] = nil;
negKeys[k] = k;
elseif not negKeys[k] then
normKeys[k] = k;
if v then
values[k] = v;
end
end
end
end
file:close()
end
end
local keyList = {};
for k in pairs(normKeys) do
table.insert(keyList, k);
end
return keyList, values;
end
--- Loads skin names from skin files, storing the result in wardrobe.skins and
-- wardrobe.skinNames.
--
function wardrobe.storage.loadSkins()
local skins, skinNames = loadSkinsFromFiles(SKIN_FILES);
for i, skin in ipairs(skins) do
local name = skinNames[skin];
if not name then
local s, e;
name = removeSuffix(
removePrefix(
removePrefix(skin, MOD_NAME.."_"),
"skin_"),
".png");
if name == "" then
name = skin;
else
name = string.gsub(name, "_", " ");
end
end
skinNames[skin] = name;
end
table.sort(skins,
function(sL, sR)
return skinNames[sL] < skinNames[sR];
end);
wardrobe.skins = skins;
wardrobe.skinNames = skinNames;
end
--- Parses the player skins database file and stores the result in
-- wardrobe.playerSkins.
--
function wardrobe.storage.loadPlayerSkins()
local playerSkins = {};
local file = io.open(PLAYER_SKIN_DB, "r");
if file then
for line in file:lines() do
local name, skin = parsePlayerSkinLine(line);
if name then
playerSkins[name] = skin;
end
end
file:close();
end
wardrobe.playerSkins = playerSkins;
end
--- Writes wardrobe.playerSkins to the player skins database file.
--
function wardrobe.storage.savePlayerSkins()
local file = io.open(PLAYER_SKIN_DB, "w");
if not file then error("Couldn't write file '"..filePath.."'"); end
for name, skin in pairs(wardrobe.playerSkins) do
file:write(name, ":", skin, "\n");
end
file:close();
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

88
wardrobe.lua Normal file
View File

@ -0,0 +1,88 @@
local FORM_NAME = "wardrobe_wardrobeSkinForm";
local SKINS_PER_PAGE = 8;
local function showForm(player, page)
local playerName = player:get_player_name();
if not playerName or playerName == "" then return; end
local n = #wardrobe.skins;
if n <= 0 then return; end
local nPages = math.ceil(n/SKINS_PER_PAGE);
if not page or page > nPages then page = 1; end
local s = 1 + SKINS_PER_PAGE*(page-1);
local e = math.min(s+SKINS_PER_PAGE-1, n);
local fs = "size[5,10]";
fs = fs.."label[0,0;Change Into:]";
for i = s, e do
local slot = i-s+1;
local skin = wardrobe.skins[i];
local skinName = minetest.formspec_escape(wardrobe.skinNames[skin]);
fs = fs.."button_exit[0,"..slot..";5,1;s:"..skin..";"..skinName.."]";
end
fs = fs.."label[2,9;Page "..page.."/"..nPages.."]";
if page > 1 then
fs = fs.."button_exit[0,9;1,1;n:p"..(page-1)..";prev]";
end
if page < nPages then
fs = fs.."button_exit[4,9;1,1;n:p"..(page+1)..";next]";
end
minetest.show_formspec(playerName, FORM_NAME, fs);
end
minetest.register_on_player_receive_fields(
function(player, formName, fields)
if formName ~= FORM_NAME then return; end
local playerName = player:get_player_name();
if not playerName or playerName == "" then return; end
for fieldName in pairs(fields) do
if #fieldName > 2 then
local action = string.sub(fieldName, 1, 1);
local value = string.sub(fieldName, 3);
if action == "n" then
showForm(player, tonumber(string.sub(value, 2)));
return;
elseif action == "s" then
wardrobe.changePlayerSkin(playerName, value);
return;
end
end
end
end);
minetest.register_node(
"wardrobe:wardrobe",
{
description = "Wardrobe",
paramtype2 = "facedir",
tiles = {
"wardrobe_wardrobe_topbottom.png",
"wardrobe_wardrobe_topbottom.png",
"wardrobe_wardrobe_sides.png",
"wardrobe_wardrobe_sides.png",
"wardrobe_wardrobe_sides.png",
"wardrobe_wardrobe_front.png"
},
inventory_image = "wardrobe_wardrobe_front.png",
sounds = default.node_sound_wood_defaults(),
groups = { choppy = 3, oddly_breakable_by_hand = 2, flammable = 3 },
on_rightclick = function(pos, node, player, itemstack, pointedThing)
showForm(player, 1);
end
});
minetest.register_craft(
{
output = "wardrobe:wardrobe",
recipe = { { "group:wood", "group:stick", "group:wood" },
{ "group:wood", "group:wool", "group:wood" },
{ "group:wood", "group:wool", "group:wood" } }
});