From 1541ea713f8f5423c77af58af203581a476b132c Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Fri, 19 Aug 2022 19:42:13 -0600 Subject: [PATCH] icons for farming achievements --- df_achievements/farming.lua | 55 +++++++++++------- df_achievements/food.lua | 6 +- df_achievements/init.lua | 8 +++ df_achievements/mod.conf | 4 +- .../dfcaverns_awards_backgroundx32.png | Bin 0 -> 83 bytes .../dfcaverns_awards_foregroundx32.png | Bin 0 -> 117 bytes .../dfcaverns_bloodthorn_achievement.png | Bin 0 -> 637 bytes .../dfcaverns_plump_helmet_achievement.png | Bin 0 -> 409 bytes .../dfcaverns_spindlestem_achievement.png | Bin 0 -> 478 bytes .../dfcaverns_torchspine_achievement.png | Bin 0 -> 333 bytes df_dependencies/misc.lua | 2 + df_trees/torchspine.lua | 27 ++++++++- 12 files changed, 74 insertions(+), 28 deletions(-) create mode 100644 df_achievements/textures/dfcaverns_awards_backgroundx32.png create mode 100644 df_achievements/textures/dfcaverns_awards_foregroundx32.png create mode 100644 df_achievements/textures/dfcaverns_bloodthorn_achievement.png create mode 100644 df_achievements/textures/dfcaverns_plump_helmet_achievement.png create mode 100644 df_achievements/textures/dfcaverns_spindlestem_achievement.png create mode 100644 df_achievements/textures/dfcaverns_torchspine_achievement.png diff --git a/df_achievements/farming.lua b/df_achievements/farming.lua index 9483796..9c0f9a7 100644 --- a/df_achievements/farming.lua +++ b/df_achievements/farming.lua @@ -1,31 +1,42 @@ local S = minetest.get_translator(minetest.get_current_modname()) local nethercap_name = df_dependencies.nethercap_name +local hoe_texture = df_dependencies.texture_tool_steelhoe +local soil_texture = df_dependencies.texture_farming_soil +local ice_texture = df_dependencies.texture_ice +local coal_ore = "(".. df_dependencies.texture_stone .."^".. df_dependencies.texture_mineral_coal ..")" + +local make_texture = function(plant_texture, bg_tex) + bg_tex = bg_tex or soil_texture + plant_texture = plant_texture or "dfcaverns_black_cap_sapling.png" + return "dfcaverns_awards_backgroundx32.png^[combine:32x32:3,4="..bg_tex.."^[combine:32x32:3,2="..plant_texture.."^[combine:32x32:14,13="..hoe_texture.."^dfcaverns_awards_foregroundx32.png" +end + -- forestry local plant_node_achievements = { - ["df_trees:black_cap_sapling"] = {achievement="dfcaverns_plant_black_cap", title=S("Plant Black Cap"), desc=S(""), icon=""}, - ["df_trees:fungiwood_sapling"] = {achievement="dfcaverns_plant_fungiwood", title=S("Plant Fungiwood"), desc=S(""), icon=""}, - ["df_trees:goblin_cap_sapling"] = {achievement="dfcaverns_plant_goblin_cap", title=S("Plant Goblin Cap"), desc=S(""), icon=""}, - ["df_trees:nether_cap_sapling"] = {achievement="dfcaverns_plant_nethercap", title=S("Plant @1", nethercap_name), desc=S(""), icon=""}, - ["df_trees:spore_tree_sapling"] = {achievement="dfcaverns_plant_spore_tree", title=S("Plant Spore Tree"), desc=S(""), icon=""}, - ["df_trees:tower_cap_sapling"] = {achievement="dfcaverns_plant_tower_cap", title=S("Plant Tower Cap"), desc=S(""), icon=""}, - ["df_trees:tunnel_tube_sapling"] = {achievement="dfcaverns_plant_tunnel_tube", title=S("Plant Tunnel Tube"), desc=S(""), icon=""}, - ["df_trees:torchspine_ember"] = {achievement="dfcaverns_plant_torchspine", title=S("Plant Torchspine"), desc=S(""), icon=""}, - ["df_trees:spindlestem_seedling"] = {achievement="dfcaverns_plant_spindlestem", title=S("Plant Spindlestem"), desc=S(""), icon=""}, - ["df_trees:blood_thorn"] = {achievement="dfcaverns_plant_bloodthorn", title=S("Plant Bloodthorn"), desc=S(""), icon=""}, - ["df_primordial_items:giant_hypha_apical_meristem"] = {achievement="dfcaverns_plant_giant_mycelium", title=S("Plant Primordial Mycelium"), desc=S(""), icon=""}, - ["df_primordial_items:fern_sapling"] = {achievement="dfcaverns_plant_primordial_fern", title=S("Plant Primordial Fern"), desc=S(""), icon=""}, - ["df_primordial_items:jungle_mushroom_sapling"] = {achievement="dfcaverns_plant_primordial_jungle_mushroom", title=S("Plant Primordial Jungle Mushroom"), desc=S(""), icon=""}, - ["df_primordial_items:jungletree_sapling"] = {achievement="dfcaverns_plant_primordial_jungletree", title=S("Plant Primordial Jungle Tree"), desc=S(""), icon=""}, - ["df_primordial_items:mush_sapling"] = {achievement="dfcaverns_plant_primordial_mushroom", title=S("Plant Primordial Mushroom"), desc=S(""), icon=""}, - ["df_farming:cave_wheat_seed"] = {achievement="dfcaverns_plant_cave_wheat", title=S("Plant Cave Wheat"), desc=S(""), icon=""}, - ["df_farming:dimple_cup_seed"] = {achievement="dfcaverns_plant_dimple_cup", title=S("Plant Dimple Cup"), desc=S(""), icon=""}, - ["df_farming:pig_tail_seed"] = {achievement="dfcaverns_plant_pig_tail", title=S("Plant Pig Tail"), desc=S(""), icon=""}, - ["df_farming:plump_helmet_spawn"] = {achievement="dfcaverns_plant_plump_helmet", title=S("Plant Plump Helmet"), desc=S(""), icon=""}, - ["df_farming:quarry_bush_seed"] = {achievement="dfcaverns_plant_quarry_bush", title=S("Plant Quarry Bush"), desc=S(""), icon=""}, - ["df_farming:sweet_pod_seed"] = {achievement="dfcaverns_plant_sweet_pod", title=S("Plant Sweet Pod"), desc=S(""), icon=""}, + ["df_trees:black_cap_sapling"] = {achievement="dfcaverns_plant_black_cap", title=S("Plant Black Cap"), desc=S(""), icon=make_texture("dfcaverns_black_cap_sapling.png", coal_ore)}, + ["df_trees:fungiwood_sapling"] = {achievement="dfcaverns_plant_fungiwood", title=S("Plant Fungiwood"), desc=S(""), icon=make_texture("dfcaverns_fungiwood_sapling.png")}, + ["df_trees:goblin_cap_sapling"] = {achievement="dfcaverns_plant_goblin_cap", title=S("Plant Goblin Cap"), desc=S(""), icon=make_texture("dfcaverns_goblin_cap_sapling.png")}, + ["df_trees:nether_cap_sapling"] = {achievement="dfcaverns_plant_nethercap", title=S("Plant @1", nethercap_name), desc=S(""), icon=make_texture("dfcaverns_nether_cap_sapling.png", ice_texture)}, + ["df_trees:spore_tree_sapling"] = {achievement="dfcaverns_plant_spore_tree", title=S("Plant Spore Tree"), desc=S(""), icon=make_texture("dfcaverns_spore_tree_sapling.png")}, + ["df_trees:tower_cap_sapling"] = {achievement="dfcaverns_plant_tower_cap", title=S("Plant Tower Cap"), desc=S(""), icon=make_texture("dfcaverns_tower_cap_sapling.png")}, + ["df_trees:tunnel_tube_sapling"] = {achievement="dfcaverns_plant_tunnel_tube", title=S("Plant Tunnel Tube"), desc=S(""), icon=make_texture("dfcaverns_tunnel_tube_sapling.png")}, + ["df_trees:torchspine_ember"] = {achievement="dfcaverns_plant_torchspine", title=S("Plant Torchspine"), desc=S(""), icon=make_texture("dfcaverns_torchspine_achievement.png")}, + ["df_trees:spindlestem_seedling"] = {achievement="dfcaverns_plant_spindlestem", title=S("Plant Spindlestem"), desc=S(""), icon=make_texture("dfcaverns_spindlestem_achievement.png")}, + ["df_trees:blood_thorn"] = {achievement="dfcaverns_plant_bloodthorn", title=S("Plant Bloodthorn"), desc=S(""), icon=make_texture("dfcaverns_bloodthorn_achievement.png")}, + ["df_primordial_items:giant_hypha_apical_meristem"] = {achievement="dfcaverns_plant_giant_mycelium", title=S("Plant Primordial Mycelium"), desc=S(""), icon=make_texture("dfcaverns_mush_soil.png")}, + ["df_primordial_items:fern_sapling"] = {achievement="dfcaverns_plant_primordial_fern", title=S("Plant Primordial Fern"), desc=S(""), icon=make_texture("dfcaverns_jungle_fern_03.png")}, + ["df_primordial_items:jungle_mushroom_sapling"] = {achievement="dfcaverns_plant_primordial_jungle_mushroom", title=S("Plant Primordial Jungle Mushroom"), desc=S(""), icon=make_texture("dfcaverns_jungle_mushroom_02.png")}, + ["df_primordial_items:jungletree_sapling"] = {achievement="dfcaverns_plant_primordial_jungletree", title=S("Plant Primordial Jungle Tree"), desc=S(""), icon=make_texture("dfcaverns_jungle_sapling.png")}, + ["df_primordial_items:mush_sapling"] = {achievement="dfcaverns_plant_primordial_mushroom", title=S("Plant Primordial Mushroom"), desc=S(""), icon=make_texture("dfcaverns_mush_sapling.png")}, + ["df_farming:cave_wheat_seed"] = {achievement="dfcaverns_plant_cave_wheat", title=S("Plant Cave Wheat"), desc=S(""), icon=make_texture("dfcaverns_cave_wheat_8.png")}, + ["df_farming:dimple_cup_seed"] = {achievement="dfcaverns_plant_dimple_cup", title=S("Plant Dimple Cup"), desc=S(""), icon=make_texture("dfcaverns_dimple_cup_4.png")}, + ["df_farming:pig_tail_seed"] = {achievement="dfcaverns_plant_pig_tail", title=S("Plant Pig Tail"), desc=S(""), icon=make_texture("dfcaverns_pig_tail_8.png")}, + ["df_farming:plump_helmet_spawn"] = {achievement="dfcaverns_plant_plump_helmet", title=S("Plant Plump Helmet"), desc=S(""), icon=make_texture("dfcaverns_plump_helmet_achievement.png")}, + ["df_farming:quarry_bush_seed"] = {achievement="dfcaverns_plant_quarry_bush", title=S("Plant Quarry Bush"), desc=S(""), icon=make_texture("dfcaverns_quarry_bush_5.png")}, + ["df_farming:sweet_pod_seed"] = {achievement="dfcaverns_plant_sweet_pod", title=S("Plant Sweet Pod"), desc=S(""), icon=make_texture("dfcaverns_sweet_pod_6.png")}, } minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing) @@ -74,7 +85,7 @@ for _, def in pairs(plant_node_achievements) do awards.register_achievement(def.achievement, { title = def.title, description = def.desc, - --icon = def.icon, + icon = def.icon, }) end diff --git a/df_achievements/food.lua b/df_achievements/food.lua index 1c0ccd9..0c7a87d 100644 --- a/df_achievements/food.lua +++ b/df_achievements/food.lua @@ -12,7 +12,7 @@ for itemname, def in pairs(minetest.registered_items) do awards.register_achievement("dfcaverns_meal_"..meal_name, { title = S("Eat @1", meal_desc), description = S("One of the many delights that can be crafted only from fungal growths found deep underground."), - icon = image, + icon = "dfcaverns_awards_backgroundx32.png^" .. image .. "^dfcaverns_awards_foregroundx32.png", trigger = { type = "eat", item = itemname, @@ -45,7 +45,7 @@ if minetest.get_modpath("df_primordial_items") then awards.register_achievement("dfcaverns_primordial_fruit", { title = S("Eat a Primordial Fruit"), description = S(""), - --icon =, + icon ="dfcaverns_awards_backgroundx32.png^dfcaverns_primordial_fruit.png^dfcaverns_awards_foregroundx32.png", trigger = { type = "eat", item = "df_primordial_items:primordial_fruit", @@ -56,7 +56,7 @@ if minetest.get_modpath("df_primordial_items") then awards.register_achievement("dfcaverns_glowtato", { title = S("Eat a Glowtato"), description = S(""), - --icon =, + icon ="dfcaverns_awards_backgroundx32.png^dfcaverns_glowtato.png^dfcaverns_awards_foregroundx32.png", trigger = { type = "eat", item = "df_primordial_items:glowtato", diff --git a/df_achievements/init.lua b/df_achievements/init.lua index 556a15b..e752663 100644 --- a/df_achievements/init.lua +++ b/df_achievements/init.lua @@ -1,3 +1,11 @@ +if not minetest.get_modpath("awards") then + minetest.log("warning", "[df_achievements] the df_achievements mod was installed but the [awards] mod was not." + .. " df_achievements depends on awards, but it is listed as an optional dependency so that installing the" + .. " dfcaverns modpack won't automatically enable it. If you want df_achievements to function please" + .. " install awards as well, otherwise you should disable df_achievements.") + return +end + df_achievements = {} local S = minetest.get_translator(minetest.get_current_modname()) diff --git a/df_achievements/mod.conf b/df_achievements/mod.conf index 2e45f26..11fb8e7 100644 --- a/df_achievements/mod.conf +++ b/df_achievements/mod.conf @@ -1,4 +1,4 @@ name=df_achievements description=Achievements for DFCaverns -depends=awards, df_caverns, df_trees, df_farming, df_mapitems, df_dependencies, pit_caves -optional_depends=df_underworld_items, hunter_statue \ No newline at end of file +depends=df_caverns, df_trees, df_farming, df_mapitems, df_dependencies, pit_caves +optional_depends=df_underworld_items, hunter_statue, awards \ No newline at end of file diff --git a/df_achievements/textures/dfcaverns_awards_backgroundx32.png b/df_achievements/textures/dfcaverns_awards_backgroundx32.png new file mode 100644 index 0000000000000000000000000000000000000000..2d230fa94941f0e4ff606537f754bbd10934d162 GIT binary patch literal 83 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnL3?x0byx0z;m;-!5ToYoWWf)`U1G(IuE{-7; camf--fSd&kj54OqOh6Wcr>mdKI;Vst0C?;WvH$=8 literal 0 HcmV?d00001 diff --git a/df_achievements/textures/dfcaverns_awards_foregroundx32.png b/df_achievements/textures/dfcaverns_awards_foregroundx32.png new file mode 100644 index 0000000000000000000000000000000000000000..df60df805b98200412feab11eb86fa85baa6e11f GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnL3?x0byx0z;*aCb)ToYoW733s;RzKMc6k#k0 z@(X5gcy=QV$dUDQaSW-5Oa8&n!ow~hF+);HLPCO_o3ZRdy#fP6g_-#5#7$+QK!psR Lu6{1-oD!M<<`oLR|m<|If?}5;SArv18TP&}UGPWKhnRQmp3X zi{}#$5)e<}=MNN+C=ilpR8&k8kqHx&NE4Uv26K|4|$`g_b6Ol~iGAbBdq!7)sVVH5*|xH80gQ@?>gnR) z=H>kU`uTzr8rILRcSr~*@W_a$a8U{2b`B}=$%(N!#M9PtWXY2$Au5eqzVw_~lcUl& u=gyu#O-?F|7avW!WW+XuL87D6*nx$iE>Nb+F=sKzV+@|IelF{r5}E+4-Hpir literal 0 HcmV?d00001 diff --git a/df_achievements/textures/dfcaverns_plump_helmet_achievement.png b/df_achievements/textures/dfcaverns_plump_helmet_achievement.png new file mode 100644 index 0000000000000000000000000000000000000000..a82307cda19b2dcdef927f27af5055ec33397214 GIT binary patch literal 409 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbMf_5hy{*Z=?j=P=|%F+@c(L?Y=P>5PF~k7{;~CVGLn03^5T5 z5kNyS88TBCQW6;w{TTd!<^WCbXYdCa)$W(o8=Bu9kX!4TS!SJ)CY!V%t#ol#)uQaG z`I(ioGRhhwk{4%IF3qZ5mRmbNxny=`c~e;O%7TU!`SmOF8y2UP&&{Z4jYwTv)U>{+ zd09r)ywp-3iGLbEFL0Lx`GLFw0}~~d{Rgt!JY5_^D&k7d9~C+jAm9=xG^aAp@XFoT zfB$!{SQM9F_VQ`uT|Ln?k}Qe5jyvU!o2>b_VCiqqNf-PMJ0JCM?3l9ZHDgP0OG?vL z+k!l0UB(=~DA$k_%^UOBKeHaI;A_!(%d_OqeM5=9W0N(TZq{s!SsVB=ZTD^YJ`TU< kr@xjRe=c|a`tAqc*%v(KDy?eXdmH3BPgg&ebxsLQ02qCj&;S4c literal 0 HcmV?d00001 diff --git a/df_achievements/textures/dfcaverns_spindlestem_achievement.png b/df_achievements/textures/dfcaverns_spindlestem_achievement.png new file mode 100644 index 0000000000000000000000000000000000000000..f767e34fd2ee9b181acb83d22f7f750481aab1e8 GIT binary patch literal 478 zcmV<40U`d0P)# zm!+ebrlgsqp_P`Bh>D1RpPG?^fOm(5e1(E|o0pEJqnDm!+bZsic{il!}jxf`@{7udSl1rkk6WjggLpiG+NF zfqJg0prW3XlaPmuh=8`UsG^*cjfsJ>uA`)&m6no;jf;Y|v8J`KrKF*jmXnE(jDxwe zskpSMs-&5lmyD8*g}b?}yt=Ncrkb6akCv2*g@by)y|J#Uo}r$SrJ$DH0d5EY000Se zQchC<0000000000b7Y&L0001mNkl-QC@t`=5nP;U&wz zNM1NXI0zvON)gck5Ys=Z($$>vI-4&LmaFw6f0rf2o UTbz@0D*ylh07*qoM6N<$g3nartpET3 literal 0 HcmV?d00001 diff --git a/df_achievements/textures/dfcaverns_torchspine_achievement.png b/df_achievements/textures/dfcaverns_torchspine_achievement.png new file mode 100644 index 0000000000000000000000000000000000000000..1bc320cffd0afcef94257f10b71ed9b58200e2be GIT binary patch literal 333 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbMfP*e~T6B7{;QBqU_+NGtX zsjI7NZ*Om7W22|5YhYmDQ=42SFdm5RJyAmbld*GUc-zawz?w6 zG3L-^unyyMm?p035bDi&q3kb%f!}7Ph-<%@AN;JUXL#}Z_Thi5GOUuiyu24dwtBky KxvX