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/2713
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 |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_diamond.png
Normal file
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 |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_emerald.png
Normal file
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 |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_gold.png
Normal file
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 |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_iron.png
Normal file
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 |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_stone.png
Normal file
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 = {
|
||||
"default_wood.png",
|
||||
"default_steel_block.png",
|
||||
"default_gold_block.png",
|
||||
"mcl_core_emerald_block.png",
|
||||
"default_diamond_block.png",
|
||||
"mobs_mc_stone.png",
|
||||
"mobs_mc_iron.png",
|
||||
"mobs_mc_gold.png",
|
||||
"mobs_mc_emerald.png",
|
||||
"mobs_mc_diamond.png",
|
||||
}
|
||||
|
||||
local professions = {
|
||||
|
@ -84,10 +84,7 @@ local professions = {
|
|||
},
|
||||
farmer = {
|
||||
name = N("Farmer"),
|
||||
textures = {
|
||||
"mobs_mc_villager_farmer.png",
|
||||
"mobs_mc_villager_farmer.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_farmer.png",
|
||||
jobsite = "mcl_composters:composter",
|
||||
trades = {
|
||||
{
|
||||
|
@ -121,10 +118,7 @@ local professions = {
|
|||
},
|
||||
fisherman = {
|
||||
name = N("Fisherman"),
|
||||
textures = {
|
||||
"mobs_mc_villager_fisherman.png",
|
||||
"mobs_mc_villager_fisherman.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_fisherman.png",
|
||||
jobsite = "mcl_barrels:barrel_closed",
|
||||
trades = {
|
||||
{
|
||||
|
@ -158,10 +152,7 @@ local professions = {
|
|||
},
|
||||
fletcher = {
|
||||
name = N("Fletcher"),
|
||||
textures = {
|
||||
"mobs_mc_villager_fletcher.png",
|
||||
"mobs_mc_villager_fletcher.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_fletcher.png",
|
||||
jobsite = "mcl_fletching_table:fletching_table",
|
||||
trades = {
|
||||
{
|
||||
|
@ -200,10 +191,7 @@ local professions = {
|
|||
},
|
||||
shepherd ={
|
||||
name = N("Shepherd"),
|
||||
textures = {
|
||||
"mobs_mc_villager_sheperd.png",
|
||||
"mobs_mc_villager_sheperd.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_sheperd.png",
|
||||
jobsite = "mcl_loom:loom",
|
||||
trades = {
|
||||
{
|
||||
|
@ -233,10 +221,7 @@ local professions = {
|
|||
},
|
||||
librarian = {
|
||||
name = N("Librarian"),
|
||||
textures = {
|
||||
"mobs_mc_villager_librarian.png",
|
||||
"mobs_mc_villager_librarian.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_librarian.png",
|
||||
jobsite = "mcl_books:bookshelf", --FIXME: lectern
|
||||
trades = {
|
||||
{
|
||||
|
@ -271,10 +256,7 @@ local professions = {
|
|||
},
|
||||
cartographer = {
|
||||
name = N("Cartographer"),
|
||||
textures = {
|
||||
"mobs_mc_villager_cartographer.png",
|
||||
"mobs_mc_villager_cartographer.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_cartographer.png",
|
||||
jobsite = "mcl_cartography_table:cartography_table",
|
||||
trades = {
|
||||
{
|
||||
|
@ -317,10 +299,7 @@ local professions = {
|
|||
},
|
||||
armorer = {
|
||||
name = N("Armorer"),
|
||||
textures = {
|
||||
"mobs_mc_villager_armorer.png",
|
||||
"mobs_mc_villager_armorer.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_armorer.png",
|
||||
jobsite = "mcl_blast_furnace:blast_furnace",
|
||||
trades = {
|
||||
{
|
||||
|
@ -357,10 +336,7 @@ local professions = {
|
|||
},
|
||||
leatherworker = {
|
||||
name = N("Leatherworker"),
|
||||
textures = {
|
||||
"mobs_mc_villager_leatherworker.png",
|
||||
"mobs_mc_villager_leatherworker.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_leatherworker.png",
|
||||
jobsite = "mcl_cauldrons:cauldron",
|
||||
trades = {
|
||||
{
|
||||
|
@ -389,10 +365,7 @@ local professions = {
|
|||
},
|
||||
butcher = {
|
||||
name = N("Butcher"),
|
||||
textures = {
|
||||
"mobs_mc_villager_butcher.png",
|
||||
"mobs_mc_villager_butcher.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_butcher.png",
|
||||
jobsite = "mcl_smoker:smoker",
|
||||
trades = {
|
||||
{
|
||||
|
@ -422,10 +395,7 @@ local professions = {
|
|||
},
|
||||
weapon_smith = {
|
||||
name = N("Weapon Smith"),
|
||||
textures = {
|
||||
"mobs_mc_villager_weaponsmith.png",
|
||||
"mobs_mc_villager_weaponsmith.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_weaponsmith.png",
|
||||
jobsite = "mcl_grindstone:grindstone",
|
||||
trades = {
|
||||
{
|
||||
|
@ -453,10 +423,7 @@ local professions = {
|
|||
},
|
||||
tool_smith = {
|
||||
name = N("Tool Smith"),
|
||||
textures = {
|
||||
"mobs_mc_villager_toolsmith.png",
|
||||
"mobs_mc_villager_toolsmith.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_toolsmith.png",
|
||||
jobsite = "mcl_smithing_table:table",
|
||||
trades = {
|
||||
{
|
||||
|
@ -490,10 +457,7 @@ local professions = {
|
|||
},
|
||||
cleric = {
|
||||
name = N("Cleric"),
|
||||
textures = {
|
||||
"mobs_mc_villager_priest.png",
|
||||
"mobs_mc_villager_priest.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_priest.png",
|
||||
jobsite = "mcl_brewing:stand_000",
|
||||
trades = {
|
||||
{
|
||||
|
@ -522,10 +486,7 @@ local professions = {
|
|||
},
|
||||
nitwit = {
|
||||
name = N("Nitwit"),
|
||||
textures = {
|
||||
"mobs_mc_villager_nitwit.png",
|
||||
"mobs_mc_villager_nitwit.png",
|
||||
},
|
||||
texture = "mobs_mc_villager_nitwit.png",
|
||||
-- No trades for nitwit
|
||||
trades = nil,
|
||||
}
|
||||
|
@ -559,12 +520,11 @@ local function init_trader_vars(self)
|
|||
end
|
||||
|
||||
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
|
||||
local tier = self._max_trade_tier or 1
|
||||
return {
|
||||
"[combine:64x64:0,0="..t[1]..":11,55=".. badges[tier].."\\^[resize\\:2x2",
|
||||
t[2]
|
||||
t .. "^" .. badges[tier]
|
||||
}
|
||||
end
|
||||
|
||||
|
|