diff --git a/assets/colors/arcticfox.toml b/assets/colors/arcticfox.toml
index 78e7bed..0427e8f 100644
--- a/assets/colors/arcticfox.toml
+++ b/assets/colors/arcticfox.toml
@@ -1,6 +1,7 @@
-body_color = "eef2f4"
-ear_color = "8599ad"
-ear_fluff_color = "a0c7de"
-sheen_color = "bfdef4"
-hand_stroke_color = "8599ad"
-face_details = "313131"
\ No newline at end of file
+BODYCOLOR = "eef2f4"
+EARCOLOR = "8599ad"
+EARFLUFF = "a0c7de"
+SHEENCOLOR = "bfdef4"
+HANDSTROKE = "8599ad"
+FACEDETAILS = "313131"
+TAILCOLOR = "bfdef4"
\ No newline at end of file
diff --git a/assets/colors/base.toml b/assets/colors/base.toml
deleted file mode 100644
index 7954259..0000000
--- a/assets/colors/base.toml
+++ /dev/null
@@ -1,8 +0,0 @@
-body_color = "BODYCOLOR"
-ear_color = "EARCOLOR"
-ear_fluff_color = "EARFLUFF"
-sheen_color = "SHEENCOLOR"
-hand_stroke_color = "HANDSTROKE"
-face_details = "FACEDETAILS"
-cup_liquid = "CUPLIQUID"
-heart_color = "HEARTFILL"
\ No newline at end of file
diff --git a/assets/colors/cat.toml b/assets/colors/cat.toml
index 0241816..2029498 100644
--- a/assets/colors/cat.toml
+++ b/assets/colors/cat.toml
@@ -1,6 +1,7 @@
-body_color = "fcc21b"
-ear_color = "e9ae20"
-ear_fluff_color = "8a6135"
-sheen_color = "fcc21b"
-hand_stroke_color = "313131"
-face_details = "313131"
\ No newline at end of file
+BODYCOLOR = "fcc21b"
+EARCOLOR = "e9ae20"
+EARFLUFF = "8a6135"
+SHEENCOLOR = "fcc21b"
+HANDSTROKE = "313131"
+FACEDETAILS = "313131"
+TAILCOLOR = "313131"
\ No newline at end of file
diff --git a/assets/colors/fox.toml b/assets/colors/fox.toml
index d5e444f..ff3673f 100644
--- a/assets/colors/fox.toml
+++ b/assets/colors/fox.toml
@@ -1,6 +1,7 @@
-body_color = "ff8702"
-ear_color = "313131"
-ear_fluff_color = "ebdccc"
-hand_stroke_color = "313131"
-sheen_color = "ff8702"
-face_details = "313131"
\ No newline at end of file
+BODYCOLOR = "ff8702"
+EARCOLOR = "313131"
+EARFLUFF = "ebdccc"
+HANDSTROKE = "313131"
+SHEENCOLOR = "ff8702"
+FACEDETAILS = "313131"
+TAILCOLOR = "313131"
\ No newline at end of file
diff --git a/assets/eyes/left/aww.svg b/assets/eyes/left/aww.svg
index ae565bb..f7a6e91 100644
--- a/assets/eyes/left/aww.svg
+++ b/assets/eyes/left/aww.svg
@@ -1,4 +1,4 @@
diff --git a/assets/eyes/left/base.svg b/assets/eyes/left/base.svg
index 43beb1e..3b58b83 100644
--- a/assets/eyes/left/base.svg
+++ b/assets/eyes/left/base.svg
@@ -1,3 +1,3 @@
diff --git a/assets/eyes/left/evil.svg b/assets/eyes/left/evil.svg
index 76cba86..7e25863 100644
--- a/assets/eyes/left/evil.svg
+++ b/assets/eyes/left/evil.svg
@@ -1,3 +1,3 @@
diff --git a/assets/eyes/left/happy.svg b/assets/eyes/left/happy.svg
index 015c2ea..2681582 100644
--- a/assets/eyes/left/happy.svg
+++ b/assets/eyes/left/happy.svg
@@ -1,3 +1,3 @@
diff --git a/assets/eyes/left/small.svg b/assets/eyes/left/small.svg
index d14a25d..0440491 100644
--- a/assets/eyes/left/small.svg
+++ b/assets/eyes/left/small.svg
@@ -1,6 +1,6 @@
diff --git a/assets/eyes/left/squint.svg b/assets/eyes/left/squint.svg
index 268ac95..c5a4c6b 100644
--- a/assets/eyes/left/squint.svg
+++ b/assets/eyes/left/squint.svg
@@ -1,3 +1,3 @@
diff --git a/assets/eyes/right/aww.svg b/assets/eyes/right/aww.svg
index 2ffdf2d..1dd89f6 100644
--- a/assets/eyes/right/aww.svg
+++ b/assets/eyes/right/aww.svg
@@ -1,4 +1,4 @@
diff --git a/assets/eyes/right/base.svg b/assets/eyes/right/base.svg
index b7cb304..c75688f 100644
--- a/assets/eyes/right/base.svg
+++ b/assets/eyes/right/base.svg
@@ -1,3 +1,3 @@
diff --git a/assets/eyes/right/evil.svg b/assets/eyes/right/evil.svg
index f9c34c1..3d416e5 100644
--- a/assets/eyes/right/evil.svg
+++ b/assets/eyes/right/evil.svg
@@ -1,3 +1,3 @@
diff --git a/assets/eyes/right/happy.svg b/assets/eyes/right/happy.svg
index 597368b..df804e4 100644
--- a/assets/eyes/right/happy.svg
+++ b/assets/eyes/right/happy.svg
@@ -1,3 +1,3 @@
diff --git a/assets/eyes/right/small.svg b/assets/eyes/right/small.svg
index 96784a5..9fd4776 100644
--- a/assets/eyes/right/small.svg
+++ b/assets/eyes/right/small.svg
@@ -1,4 +1,4 @@
diff --git a/assets/eyes/right/squint.svg b/assets/eyes/right/squint.svg
index f389ab1..a088cbf 100644
--- a/assets/eyes/right/squint.svg
+++ b/assets/eyes/right/squint.svg
@@ -1,3 +1,3 @@
diff --git a/assets/fur/cat/base.svg b/assets/fur/cat/base.svg
index d0b2dd8..f62849d 100644
--- a/assets/fur/cat/base.svg
+++ b/assets/fur/cat/base.svg
@@ -1,9 +1,9 @@
diff --git a/assets/fur/cat/pat.svg b/assets/fur/cat/pat.svg
index 5f25954..68db8dd 100644
--- a/assets/fur/cat/pat.svg
+++ b/assets/fur/cat/pat.svg
@@ -1,14 +1,14 @@
diff --git a/assets/fur/fox/base.svg b/assets/fur/fox/base.svg
index d0b699d..5f392f8 100644
--- a/assets/fur/fox/base.svg
+++ b/assets/fur/fox/base.svg
@@ -1,10 +1,10 @@
diff --git a/assets/fur/fox/pat.svg b/assets/fur/fox/pat.svg
index 455db9d..8766728 100644
--- a/assets/fur/fox/pat.svg
+++ b/assets/fur/fox/pat.svg
@@ -1,17 +1,17 @@
diff --git a/assets/fur/fox/snug.svg b/assets/fur/fox/snug.svg
index 320087f..7583c0c 100644
--- a/assets/fur/fox/snug.svg
+++ b/assets/fur/fox/snug.svg
@@ -1,11 +1,11 @@
diff --git a/assets/hand/big_left.svg b/assets/hand/big_left.svg
index 08987c8..ad36810 100644
--- a/assets/hand/big_left.svg
+++ b/assets/hand/big_left.svg
@@ -1,3 +1,3 @@
diff --git a/assets/hand/big_right.svg b/assets/hand/big_right.svg
index e19341d..66068a9 100644
--- a/assets/hand/big_right.svg
+++ b/assets/hand/big_right.svg
@@ -1,3 +1,3 @@
diff --git a/assets/hand/left.svg b/assets/hand/left.svg
index 8db6a5d..a3867fb 100644
--- a/assets/hand/left.svg
+++ b/assets/hand/left.svg
@@ -1,3 +1,3 @@
diff --git a/assets/hand/right.svg b/assets/hand/right.svg
index 20f9455..a3cf3b0 100644
--- a/assets/hand/right.svg
+++ b/assets/hand/right.svg
@@ -1,3 +1,3 @@
diff --git a/assets/hand/wow_left.svg b/assets/hand/wow_left.svg
index 8c36a8d..71fbb9a 100644
--- a/assets/hand/wow_left.svg
+++ b/assets/hand/wow_left.svg
@@ -1,4 +1,3 @@
\ No newline at end of file
diff --git a/assets/hand/wow_right.svg b/assets/hand/wow_right.svg
index 6229b82..cb3d5ff 100644
--- a/assets/hand/wow_right.svg
+++ b/assets/hand/wow_right.svg
@@ -1,4 +1,3 @@
\ No newline at end of file
diff --git a/assets/holding/cup_liquid/coffee_color.toml b/assets/holding/cup_liquid/coffee_color.toml
index cc5e2a1..37a8867 100644
--- a/assets/holding/cup_liquid/coffee_color.toml
+++ b/assets/holding/cup_liquid/coffee_color.toml
@@ -1 +1 @@
-cup_liquid = "28160b"
\ No newline at end of file
+CUPLIQUID = "28160b"
\ No newline at end of file
diff --git a/assets/holding/cup_liquid/hot_coco_color.toml b/assets/holding/cup_liquid/hot_coco_color.toml
index 3cfe150..5eb08b1 100644
--- a/assets/holding/cup_liquid/hot_coco_color.toml
+++ b/assets/holding/cup_liquid/hot_coco_color.toml
@@ -1 +1 @@
-cup_liquid = "62422d"
\ No newline at end of file
+CUPLIQUID = "62422d"
\ No newline at end of file
diff --git a/assets/holding/cup_liquid/liquid.svg b/assets/holding/cup_liquid/liquid.svg
index cc526fb..6ca2b6b 100644
--- a/assets/holding/cup_liquid/liquid.svg
+++ b/assets/holding/cup_liquid/liquid.svg
@@ -1,3 +1,3 @@
diff --git a/assets/holding/hearts/colors/blue.toml b/assets/holding/hearts/colors/blue.toml
index 769e1ea..8ecc810 100644
--- a/assets/holding/hearts/colors/blue.toml
+++ b/assets/holding/hearts/colors/blue.toml
@@ -1 +1 @@
-heart_color = "5ec9db"
\ No newline at end of file
+HEARTCOLOR = "5ec9db"
\ No newline at end of file
diff --git a/assets/holding/hearts/colors/red.toml b/assets/holding/hearts/colors/red.toml
deleted file mode 100644
index 71ceacb..0000000
--- a/assets/holding/hearts/colors/red.toml
+++ /dev/null
@@ -1 +0,0 @@
-heart_color = "e40809"
\ No newline at end of file
diff --git a/assets/holding/hearts/heart.svg b/assets/holding/hearts/heart.svg
index ff7a305..0948bf2 100644
--- a/assets/holding/hearts/heart.svg
+++ b/assets/holding/hearts/heart.svg
@@ -1,4 +1,4 @@
diff --git a/assets/holding/knife_right.toml b/assets/holding/knife_right.toml
new file mode 100644
index 0000000..37d6cb2
--- /dev/null
+++ b/assets/holding/knife_right.toml
@@ -0,0 +1,4 @@
+file = "holding/knife.svg"
+scale = 1
+rotate = 76
+translate = [50, 54]
diff --git a/assets/mouth/cat/w_mouth.svg b/assets/mouth/cat/w_mouth.svg
index a04f745..d0769f4 100644
--- a/assets/mouth/cat/w_mouth.svg
+++ b/assets/mouth/cat/w_mouth.svg
@@ -1,3 +1,3 @@
diff --git a/assets/mouth/downturned.svg b/assets/mouth/downturned.svg
index 78fdc6d..d855b80 100644
--- a/assets/mouth/downturned.svg
+++ b/assets/mouth/downturned.svg
@@ -1,3 +1,3 @@
diff --git a/assets/mouth/w_mouth.svg b/assets/mouth/w_mouth.svg
index ed2ce40..44ed622 100644
--- a/assets/mouth/w_mouth.svg
+++ b/assets/mouth/w_mouth.svg
@@ -1,3 +1,3 @@
diff --git a/assets/nose/aww.svg b/assets/nose/aww.svg
index 67835fa..a6c4fd2 100644
--- a/assets/nose/aww.svg
+++ b/assets/nose/aww.svg
@@ -1,4 +1,4 @@
diff --git a/assets/nose/base.svg b/assets/nose/base.svg
index 1ab7dbf..e9131c0 100644
--- a/assets/nose/base.svg
+++ b/assets/nose/base.svg
@@ -1,4 +1,4 @@
diff --git a/assets/nose/evil.svg b/assets/nose/evil.svg
index 30cdb86..dce1fb5 100644
--- a/assets/nose/evil.svg
+++ b/assets/nose/evil.svg
@@ -1,4 +1,4 @@
diff --git a/assets/nose/happy.svg b/assets/nose/happy.svg
index 8a67451..d1bb8ea 100644
--- a/assets/nose/happy.svg
+++ b/assets/nose/happy.svg
@@ -1,4 +1,4 @@
diff --git a/assets/nose/no_outline.svg b/assets/nose/no_outline.svg
index fab7a8d..e1bf910 100644
--- a/assets/nose/no_outline.svg
+++ b/assets/nose/no_outline.svg
@@ -1,3 +1,3 @@
diff --git a/assets/nose/squint.svg b/assets/nose/squint.svg
index 1232aa0..6d511f8 100644
--- a/assets/nose/squint.svg
+++ b/assets/nose/squint.svg
@@ -1,4 +1,4 @@
diff --git a/assets/overlay/blanket_ear/cat.svg b/assets/overlay/blanket_ear/cat.svg
index d142fd6..0a26c40 100644
--- a/assets/overlay/blanket_ear/cat.svg
+++ b/assets/overlay/blanket_ear/cat.svg
@@ -1,4 +1,4 @@
diff --git a/assets/overlay/blanket_ear/fox.svg b/assets/overlay/blanket_ear/fox.svg
index 2e086c7..9784343 100644
--- a/assets/overlay/blanket_ear/fox.svg
+++ b/assets/overlay/blanket_ear/fox.svg
@@ -1,4 +1,4 @@
diff --git a/definitions.toml b/definitions.toml
index 6ebc2d8..2a7c4ee 100644
--- a/definitions.toml
+++ b/definitions.toml
@@ -1,11 +1,13 @@
cup_empty = ["holding/cup_lower.toml", "hand/right_lower.toml"]
cup_coffee = ["overlay/steam.svg","holding/cup.svg","holding/cup_liquid/liquid.svg", "holding/cup_liquid/coffee_color.toml", "hand/right.svg"]
cup_hot_coco = ["overlay/steam.svg","holding/cup.svg","holding/cup_liquid/liquid.svg", "holding/cup_liquid/hot_coco_color.toml", "hand/right.svg"]
+knife = ["holding/knife.svg", "hand/left.svg"]
-knife = ["holding/knife.svg", "hand/left.svg"]
+knife_right = ["holding/knife_right.toml", "hand/right.svg"]
egg = ["holding/egg.svg"]
blanket_fox = ["overlay/blanket.svg", "overlay/blanket_ear/fox.svg"]
arctic = ["colors/arcticfox.toml"]
+red_fox = ["colors/fox.toml"]
fox_color = ["colors/fox.toml"]
fox_fur = ["fur/fox/base.svg"]
@@ -33,7 +35,7 @@ demi_heart = ["holding/hearts/demisexual.svg"]
enby_heart = ["holding/hearts/enby.svg"]
pan_heart = ["holding/hearts/pan.svg"]
pride_heart = ["holding/hearts/progress.svg"]
-red_heart = ["holding/hearts/heart.svg", "holding/hearts/colors/red.toml"]
+red_heart = ["holding/hearts/heart.svg"]
trans_heart = ["holding/hearts/trans.svg"]
pat_blush = ["overlay/blush_pat.toml"]
diff --git a/designs.toml b/designs.toml
index 5ef25b1..9871765 100644
--- a/designs.toml
+++ b/designs.toml
@@ -1,7 +1,7 @@
arctic_blush = ["arctic", "fox_fur", "blush"]
arctic_extra_blush = ["arctic", "fox_fur", "squint_eyes", "extra_blush"]
arctic_happy = ["arctic", "fox_fur", "happy"]
-arctic_shock = ["arctic", "fox_fur", "shock"]
+arctic_shock = ["arctic", "fox_fur", "shock", "knife_right"]
arctic_upset = ["arctic", "fox_fur", "upset"]
arctic_upset_mild = ["arctic", "fox_fur", "upset_mild"]
arctic_evil = ["arctic", "fox_fur", "evil"]
diff --git a/src/main.py b/src/main.py
index 5eb863f..a3cac25 100644
--- a/src/main.py
+++ b/src/main.py
@@ -11,8 +11,6 @@ with open("../designs.toml", "r") as design_file: #Load the user designs
designs = toml.loads(design_file.read())
with open("../config.toml", "r") as config_file: #Load the user config
config = toml.loads(config_file.read())
-with open("../assets/colors/base.toml", "r") as color_file: #Load the user config
- base_colors = toml.loads(color_file.read())
os.makedirs("../output/vector/", exist_ok=True)
os.makedirs("../output/" + str(config["raster_size"]) + "/", exist_ok=True)
@@ -42,23 +40,24 @@ for key in designs:
else:
with open(asset_path + part) as transform_file:
transforms = toml.loads(transform_file.read())
- svg_parts.append(SVG(transforms["file"]).scale(transforms["scale"]).rotate(transforms["rotate"]).move(transforms["translate"][0], transforms["translate"][1]))
+ svg_parts.append(SVG(transforms["file"]).scale(transforms["scale"]).rotate(transforms["rotate"], 64, 64).move(transforms["translate"][0], transforms["translate"][1]))
else:
svg_parts.append(SVG(part)) #Add each element of the list of paths to a new list as a SVG element
Figure("128","128", *svg_parts, SVG("credits.svg")).save(f"../output/vector/{key}.svg") #Compile all parts into an SVG
with open(f"../output/vector/{key}.svg", "r") as inFile:
inLines = inFile.read()
- for colorKey in colorsOut:
- if base_colors[colorKey].lower() in inLines.lower():
- pattern = re.compile(base_colors[colorKey], re.IGNORECASE)
- inLines = pattern.sub(colorsOut[colorKey].lower(), inLines)
if "DARKEN" in inLines:
- darkenMatches = re.findall("(#DARKEN\( ?((?:(?:[a-f]|[A-F]|[0-9]){3}){1,2}) ?\, ?(\d{1,2}) ?\))", inLines)
+ darkenMatches = re.findall("(DARKEN\( ?((?:[A-Z])+?) ?\, ?(\d{1,2}) ?\))", inLines)
if darkenMatches:
for match in darkenMatches:
- newColor = DarkenColor(match[1], match[2])
- inLines = inLines.replace(match[0], "#"+newColor.lower())
+ newColor = DarkenColor(colorsOut[match[1]], match[2])
+ colorsOut.update({match[0]: newColor})
+
+ for colorKey in colorsOut.keys():
+ if colorKey in inLines:
+ pattern = re.compile("#(?:(?:[a-f]|[A-F]|[0-9]){3}){1,2};replace:"+colorKey.replace("(","\\(").replace(")","\\)"), re.IGNORECASE)
+ inLines = pattern.sub("#"+colorsOut[colorKey].lower(), inLines)
with open(f"../output/vector/{key}.svg", "w") as out_file:
out_file.write(inLines)