local assets =
{
Asset("ANIM", "anim/scythe.zip"),
Asset("ANIM", "anim/swap_scythe.zip"),
}
local function onequip(inst, owner)
owner.AnimState:OverrideSymbol("swap_object", "swap_scythe", "swap_scythe")
owner.AnimState:Show("ARM_carry")
owner.AnimState:Hide("ARM_normal")
end
local function onunequip(inst, owner)
owner.AnimState:Hide("ARM_carry")
owner.AnimState:Show("ARM_normal")
end
local function fn()
local inst = CreateEntity()
inst.entity:AddTransform()
inst.entity:AddAnimState()
inst.entity:AddNetwork()
MakeInventoryPhysics(inst)
inst.AnimState:SetBank("scythe")
inst.AnimState:SetBuild("scythe")
inst.AnimState:PlayAnimation("idle")
inst:AddTag("sharp")
inst.entity:SetPristine()
if not TheWorld.ismastersim then
return inst
end
inst:AddComponent("weapon")
inst.components.weapon:SetDamage(15)
-------
inst:AddComponent("finiteuses")
inst.components.finiteuses:SetMaxUses(TUNING.SPEAR_USES*3)
inst.components.finiteuses:SetUses(TUNING.SPEAR_USES*3)
inst.components.finiteuses:SetOnFinished(inst.Remove)
inst:AddComponent("inspectable")
inst:AddComponent("inventoryitem")
inst.components.inventoryitem.atlasname = "images/inventoryimages/scythe.xml"
inst:AddComponent("equippable")
inst.components.equippable:SetOnEquip(onequip)
inst.components.equippable:SetOnUnequip(onunequip)
MakeHauntableLaunch(inst)
return inst
end
STRINGS.NAMES.SCYTHE= "Stone scythe"
STRINGS.RECIPE_DESC.SCYTHE = "Slice and dice."
STRINGS.CHARACTERS.GENERIC.DESCRIBE.SCYTHE = "It would take a king to lift that up."
STRINGS.CHARACTERS.WILLOW.DESCRIBE.SCYTHE = "The scythe is the stone."
STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.SCYTHE = "Weapon suited for mighty Wolfgang!"
STRINGS.CHARACTERS.WENDY.DESCRIBE.SCYTHE = "The earth itself is my weapon."
STRINGS.CHARACTERS.WX78.DESCRIBE.SCYTHE = "INCREASES COMBAT EFFECTIVENESS"
STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.SCYTHE = "A primitive scythe made from a slate of flint."
STRINGS.CHARACTERS.WOODIE.DESCRIBE.SCYTHE = "Can it cut trees?"
STRINGS.CHARACTERS.WAXWELL.DESCRIBE.SCYTHE = "It is nothing compared to a real scythe."
STRINGS.CHARACTERS.WATHGRITHR.DESCRIBE.SCYTHE = "A weapon made for battle."
STRINGS.CHARACTERS.WEBBER.DESCRIBE.SCYTHE = "It weighs a ton!"
return Prefab( "common/inventory/scythe", fn, assets)
{
Asset("ANIM", "anim/scythe.zip"),
Asset("ANIM", "anim/swap_scythe.zip"),
}
local function onequip(inst, owner)
owner.AnimState:OverrideSymbol("swap_object", "swap_scythe", "swap_scythe")
owner.AnimState:Show("ARM_carry")
owner.AnimState:Hide("ARM_normal")
end
local function onunequip(inst, owner)
owner.AnimState:Hide("ARM_carry")
owner.AnimState:Show("ARM_normal")
end
local function fn()
local inst = CreateEntity()
inst.entity:AddTransform()
inst.entity:AddAnimState()
inst.entity:AddNetwork()
MakeInventoryPhysics(inst)
inst.AnimState:SetBank("scythe")
inst.AnimState:SetBuild("scythe")
inst.AnimState:PlayAnimation("idle")
inst:AddTag("sharp")
inst.entity:SetPristine()
if not TheWorld.ismastersim then
return inst
end
inst:AddComponent("weapon")
inst.components.weapon:SetDamage(15)
-------
inst:AddComponent("finiteuses")
inst.components.finiteuses:SetMaxUses(TUNING.SPEAR_USES*3)
inst.components.finiteuses:SetUses(TUNING.SPEAR_USES*3)
inst.components.finiteuses:SetOnFinished(inst.Remove)
inst:AddComponent("inspectable")
inst:AddComponent("inventoryitem")
inst.components.inventoryitem.atlasname = "images/inventoryimages/scythe.xml"
inst:AddComponent("equippable")
inst.components.equippable:SetOnEquip(onequip)
inst.components.equippable:SetOnUnequip(onunequip)
MakeHauntableLaunch(inst)
return inst
end
STRINGS.NAMES.SCYTHE= "Stone scythe"
STRINGS.RECIPE_DESC.SCYTHE = "Slice and dice."
STRINGS.CHARACTERS.GENERIC.DESCRIBE.SCYTHE = "It would take a king to lift that up."
STRINGS.CHARACTERS.WILLOW.DESCRIBE.SCYTHE = "The scythe is the stone."
STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.SCYTHE = "Weapon suited for mighty Wolfgang!"
STRINGS.CHARACTERS.WENDY.DESCRIBE.SCYTHE = "The earth itself is my weapon."
STRINGS.CHARACTERS.WX78.DESCRIBE.SCYTHE = "INCREASES COMBAT EFFECTIVENESS"
STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.SCYTHE = "A primitive scythe made from a slate of flint."
STRINGS.CHARACTERS.WOODIE.DESCRIBE.SCYTHE = "Can it cut trees?"
STRINGS.CHARACTERS.WAXWELL.DESCRIBE.SCYTHE = "It is nothing compared to a real scythe."
STRINGS.CHARACTERS.WATHGRITHR.DESCRIBE.SCYTHE = "A weapon made for battle."
STRINGS.CHARACTERS.WEBBER.DESCRIBE.SCYTHE = "It weighs a ton!"
return Prefab( "common/inventory/scythe", fn, assets)