Fix jewel overlay rotation for jeweled wield img
This commit is contained in:
parent
7807a5eb17
commit
79f2ad3bbc
@ -58,6 +58,7 @@ function jewels.register_jewel(toolname, new_toolname, def)
|
||||
local data = {
|
||||
name = new_toolname, -- the new name of the tool
|
||||
overlay = def.overlay or "jewels_jeweled_handle.png", -- overlay image
|
||||
overlay_wield = def.overlay_wield, -- overlay wield image
|
||||
description = def.description or nil,
|
||||
stats = {
|
||||
digspeed = def.stats.digspeed, -- negative digs faster
|
||||
@ -68,6 +69,9 @@ function jewels.register_jewel(toolname, new_toolname, def)
|
||||
range = def.stats.range, -- positive increases reach distance with tool
|
||||
}
|
||||
}
|
||||
if not data.overlay_wield then
|
||||
data.overlay_wield = data.overlay
|
||||
end
|
||||
|
||||
if not jewels.registered_jewels[toolname] then
|
||||
jewels.registered_jewels[toolname] = {}
|
||||
@ -107,12 +111,12 @@ function jewels.register_jewel(toolname, new_toolname, def)
|
||||
|
||||
local new_tool_invimage = ""
|
||||
if tooldef.inventory_image then
|
||||
new_tool_invimage = tooldef.inventory_image .. "^" .. data.overlay
|
||||
new_tool_invimage = "(" .. tooldef.inventory_image .. ")^(" .. data.overlay .. ")"
|
||||
end
|
||||
|
||||
local new_tool_wieldimage = ""
|
||||
if tooldef.wield_image then
|
||||
new_tool_wieldimage = tooldef.wield_image .. "^" .. data.overlay
|
||||
new_tool_wieldimage = "(" .. tooldef.wield_image .. ")^(" .. data.overlay_wield .. ")"
|
||||
end
|
||||
|
||||
local new_tooldef = tooldef
|
||||
|
@ -124,6 +124,7 @@ local tool_types = {
|
||||
spear = {
|
||||
steel = {
|
||||
description = S("Jeweled Steel Spear"),
|
||||
overlay_wield = "jewels_jeweled_handle.png^[transformR90",
|
||||
reach = {
|
||||
range = 1,
|
||||
},
|
||||
@ -136,6 +137,7 @@ local tool_types = {
|
||||
},
|
||||
carbon_steel = {
|
||||
description = S("Jeweled Carbon Steel Spear"),
|
||||
overlay_wield = "jewels_jeweled_handle.png^[transformR90",
|
||||
reach = {
|
||||
range = 2,
|
||||
},
|
||||
@ -148,6 +150,7 @@ local tool_types = {
|
||||
},
|
||||
bronze = {
|
||||
description = S("Jeweled Bronze Spear"),
|
||||
overlay_wield = "jewels_jeweled_handle.png^[transformR90",
|
||||
reach = {
|
||||
range = 2,
|
||||
},
|
||||
@ -162,6 +165,7 @@ local tool_types = {
|
||||
shears = {
|
||||
steel = {
|
||||
description = S("Jeweled Steel Shears"),
|
||||
overlay_wield = "jewels_jeweled_handle.png^[transformR90",
|
||||
digspeed = {
|
||||
digspeed = -0.1,
|
||||
},
|
||||
@ -171,6 +175,7 @@ local tool_types = {
|
||||
},
|
||||
carbon_steel = {
|
||||
description = S("Jeweled Carbon Steel Shears"),
|
||||
overlay_wield = "jewels_jeweled_handle.png^[transformR90",
|
||||
digspeed = {
|
||||
digspeed = -0.13,
|
||||
},
|
||||
@ -180,6 +185,7 @@ local tool_types = {
|
||||
},
|
||||
bronze = {
|
||||
description = S("Jeweled Bronze Shears"),
|
||||
overlay_wield = "jewels_jeweled_handle.png^[transformR90",
|
||||
digspeed = {
|
||||
digspeed = -0.14,
|
||||
},
|
||||
@ -200,6 +206,7 @@ for tool_name, tool_def in pairs(tool_types) do
|
||||
{
|
||||
stats = jewel_def,
|
||||
description = material_def.description,
|
||||
overlay_wield = material_def.overlay_wield,
|
||||
}
|
||||
)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user