mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-27 11:47:32 +01:00
Fix villager badges messing up non-64px textures
This commit is contained in:
parent
ad307aa445
commit
fb5fd6b2e9
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_diamond.png
Normal file
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_diamond.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 181 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_emerald.png
Normal file
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_emerald.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 181 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_gold.png
Normal file
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_gold.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 181 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_iron.png
Normal file
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_iron.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 181 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_stone.png
Normal file
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_stone.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 181 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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user