Merge pull request 'Optimize mobs textures and villagers badges messing up non-64px textures (clean version of #2703)' (#2713) from talamh_texture_fixes into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2713icebergs
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 298 B |
Before Width: | Height: | Size: 830 B After Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 978 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 917 B After Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 939 B After Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 919 B After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 921 B After Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 923 B After Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 952 B After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 938 B After Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 904 B After Width: | Height: | Size: 122 B |
Before Width: | Height: | Size: 932 B After Width: | Height: | Size: 160 B |
Before Width: | Height: | Size: 930 B After Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 930 B After Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 367 B |
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 426 B |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 231 B |
After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 475 B After Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 755 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 790 B |
After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1002 B |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 936 B After Width: | Height: | Size: 679 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 966 B After Width: | Height: | Size: 680 B |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 569 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 573 B After Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 301 B |
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 298 B |
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 444 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 978 B |
After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 847 B After Width: | Height: | Size: 472 B |
Before Width: | Height: | Size: 1021 B After Width: | Height: | Size: 595 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1000 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 629 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 622 B |
Before Width: | Height: | Size: 764 B After Width: | Height: | Size: 447 B |
Before Width: | Height: | Size: 259 B After Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 169 B |
|
@ -66,11 +66,11 @@ local tiernames = {
|
||||||
}
|
}
|
||||||
|
|
||||||
local badges = {
|
local badges = {
|
||||||
"default_wood.png",
|
"mobs_mc_stone.png",
|
||||||
"default_steel_block.png",
|
"mobs_mc_iron.png",
|
||||||
"default_gold_block.png",
|
"mobs_mc_gold.png",
|
||||||
"mcl_core_emerald_block.png",
|
"mobs_mc_emerald.png",
|
||||||
"default_diamond_block.png",
|
"mobs_mc_diamond.png",
|
||||||
}
|
}
|
||||||
|
|
||||||
local professions = {
|
local professions = {
|
||||||
|
@ -84,10 +84,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
farmer = {
|
farmer = {
|
||||||
name = N("Farmer"),
|
name = N("Farmer"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_farmer.png",
|
||||||
"mobs_mc_villager_farmer.png",
|
|
||||||
"mobs_mc_villager_farmer.png",
|
|
||||||
},
|
|
||||||
jobsite = "mcl_composters:composter",
|
jobsite = "mcl_composters:composter",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
|
@ -121,10 +118,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
fisherman = {
|
fisherman = {
|
||||||
name = N("Fisherman"),
|
name = N("Fisherman"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_fisherman.png",
|
||||||
"mobs_mc_villager_fisherman.png",
|
|
||||||
"mobs_mc_villager_fisherman.png",
|
|
||||||
},
|
|
||||||
jobsite = "mcl_barrels:barrel_closed",
|
jobsite = "mcl_barrels:barrel_closed",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
|
@ -158,10 +152,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
fletcher = {
|
fletcher = {
|
||||||
name = N("Fletcher"),
|
name = N("Fletcher"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_fletcher.png",
|
||||||
"mobs_mc_villager_fletcher.png",
|
|
||||||
"mobs_mc_villager_fletcher.png",
|
|
||||||
},
|
|
||||||
jobsite = "mcl_fletching_table:fletching_table",
|
jobsite = "mcl_fletching_table:fletching_table",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
|
@ -200,10 +191,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
shepherd ={
|
shepherd ={
|
||||||
name = N("Shepherd"),
|
name = N("Shepherd"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_sheperd.png",
|
||||||
"mobs_mc_villager_sheperd.png",
|
|
||||||
"mobs_mc_villager_sheperd.png",
|
|
||||||
},
|
|
||||||
jobsite = "mcl_loom:loom",
|
jobsite = "mcl_loom:loom",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
|
@ -233,10 +221,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
librarian = {
|
librarian = {
|
||||||
name = N("Librarian"),
|
name = N("Librarian"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_librarian.png",
|
||||||
"mobs_mc_villager_librarian.png",
|
|
||||||
"mobs_mc_villager_librarian.png",
|
|
||||||
},
|
|
||||||
jobsite = "mcl_books:bookshelf", --FIXME: lectern
|
jobsite = "mcl_books:bookshelf", --FIXME: lectern
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
|
@ -271,10 +256,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
cartographer = {
|
cartographer = {
|
||||||
name = N("Cartographer"),
|
name = N("Cartographer"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_cartographer.png",
|
||||||
"mobs_mc_villager_cartographer.png",
|
|
||||||
"mobs_mc_villager_cartographer.png",
|
|
||||||
},
|
|
||||||
jobsite = "mcl_cartography_table:cartography_table",
|
jobsite = "mcl_cartography_table:cartography_table",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
|
@ -317,10 +299,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
armorer = {
|
armorer = {
|
||||||
name = N("Armorer"),
|
name = N("Armorer"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_armorer.png",
|
||||||
"mobs_mc_villager_armorer.png",
|
|
||||||
"mobs_mc_villager_armorer.png",
|
|
||||||
},
|
|
||||||
jobsite = "mcl_blast_furnace:blast_furnace",
|
jobsite = "mcl_blast_furnace:blast_furnace",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
|
@ -357,10 +336,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
leatherworker = {
|
leatherworker = {
|
||||||
name = N("Leatherworker"),
|
name = N("Leatherworker"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_leatherworker.png",
|
||||||
"mobs_mc_villager_leatherworker.png",
|
|
||||||
"mobs_mc_villager_leatherworker.png",
|
|
||||||
},
|
|
||||||
jobsite = "mcl_cauldrons:cauldron",
|
jobsite = "mcl_cauldrons:cauldron",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
|
@ -389,10 +365,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
butcher = {
|
butcher = {
|
||||||
name = N("Butcher"),
|
name = N("Butcher"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_butcher.png",
|
||||||
"mobs_mc_villager_butcher.png",
|
|
||||||
"mobs_mc_villager_butcher.png",
|
|
||||||
},
|
|
||||||
jobsite = "mcl_smoker:smoker",
|
jobsite = "mcl_smoker:smoker",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
|
@ -422,10 +395,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
weapon_smith = {
|
weapon_smith = {
|
||||||
name = N("Weapon Smith"),
|
name = N("Weapon Smith"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_weaponsmith.png",
|
||||||
"mobs_mc_villager_weaponsmith.png",
|
|
||||||
"mobs_mc_villager_weaponsmith.png",
|
|
||||||
},
|
|
||||||
jobsite = "mcl_grindstone:grindstone",
|
jobsite = "mcl_grindstone:grindstone",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
|
@ -453,10 +423,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
tool_smith = {
|
tool_smith = {
|
||||||
name = N("Tool Smith"),
|
name = N("Tool Smith"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_toolsmith.png",
|
||||||
"mobs_mc_villager_toolsmith.png",
|
|
||||||
"mobs_mc_villager_toolsmith.png",
|
|
||||||
},
|
|
||||||
jobsite = "mcl_smithing_table:table",
|
jobsite = "mcl_smithing_table:table",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
|
@ -490,10 +457,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
cleric = {
|
cleric = {
|
||||||
name = N("Cleric"),
|
name = N("Cleric"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_priest.png",
|
||||||
"mobs_mc_villager_priest.png",
|
|
||||||
"mobs_mc_villager_priest.png",
|
|
||||||
},
|
|
||||||
jobsite = "mcl_brewing:stand_000",
|
jobsite = "mcl_brewing:stand_000",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
|
@ -522,10 +486,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
nitwit = {
|
nitwit = {
|
||||||
name = N("Nitwit"),
|
name = N("Nitwit"),
|
||||||
textures = {
|
texture = "mobs_mc_villager_nitwit.png",
|
||||||
"mobs_mc_villager_nitwit.png",
|
|
||||||
"mobs_mc_villager_nitwit.png",
|
|
||||||
},
|
|
||||||
-- No trades for nitwit
|
-- No trades for nitwit
|
||||||
trades = nil,
|
trades = nil,
|
||||||
}
|
}
|
||||||
|
@ -559,12 +520,11 @@ local function init_trader_vars(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_badge_textures(self)
|
local function get_badge_textures(self)
|
||||||
local t = professions[self._profession].textures
|
local t = professions[self._profession].texture
|
||||||
if self._profession == "unemployed" or self._profession == "nitwit" then return t end
|
if self._profession == "unemployed" or self._profession == "nitwit" then return t end
|
||||||
local tier = self._max_trade_tier or 1
|
local tier = self._max_trade_tier or 1
|
||||||
return {
|
return {
|
||||||
"[combine:64x64:0,0="..t[1]..":11,55=".. badges[tier].."\\^[resize\\:2x2",
|
t .. "^" .. badges[tier]
|
||||||
t[2]
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|