39 lines
850 B
Lua
39 lines
850 B
Lua
|
|
local ns = artifact
|
|
|
|
function ns.apply_key(m)
|
|
m.object:set_properties {
|
|
textures = {"artifact_key.png"},
|
|
visual_size = vector.new(1,1,1) *0.88,
|
|
eye_height = 1.6
|
|
}
|
|
m.eye_height = 1.6
|
|
-- Switch hand appearance.
|
|
m.inv:set_stack("main", 1, ItemStack("input_"..m.character))
|
|
end
|
|
|
|
function ns.apply_vix(m)
|
|
m.object:set_properties {
|
|
textures = {"artifact_vix.png"},
|
|
visual_size = vector.new(1,1,1) *0.8,
|
|
eye_height = 1.5
|
|
}
|
|
m.eye_height = 1.5
|
|
-- Switch hand appearance.
|
|
m.inv:set_stack("main", 1, ItemStack("input_"..m.character))
|
|
end
|
|
|
|
function ns.swap_character(m)
|
|
if m.character == "vix" then
|
|
m:set_character("key")
|
|
ns.apply_key(m)
|
|
else
|
|
m:set_character("vix")
|
|
ns.apply_vix(m)
|
|
end
|
|
end
|
|
|
|
|
|
|
|
include "key.lua"
|
|
include "vix.lua"
|