Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local assets =
- {
- Asset("ANIM", "anim/log.zip"),
- }
- local function fn()
- local inst = CreateEntity()
- inst.entity:AddTransform()
- inst.entity:AddAnimState()
- inst.entity:AddNetwork()
- MakeInventoryPhysics(inst)
- inst.AnimState:SetBank("log")
- inst.AnimState:SetBuild("log")
- inst.AnimState:PlayAnimation("idle")
- MakeDragonflyBait(inst, 3)
- inst.entity:SetPristine()
- if not TheWorld.ismastersim then
- return inst
- end
- inst:AddComponent("edible")
- inst.components.edible.foodtype = FOODTYPE.WOOD
- inst.components.edible.woodiness = 10
- inst.components.edible.healthvalue = 0
- inst.components.edible.hungervalue = 0
- inst:AddComponent("fuel")
- inst.components.fuel.fuelvalue = TUNING.MED_FUEL
- MakeSmallBurnable(inst, TUNING.MED_BURNTIME)
- MakeSmallPropagator(inst)
- MakeHauntableLaunchAndIgnite(inst)
- ---------------------
- inst:AddComponent("inspectable")
- inst:AddComponent("inventoryitem")
- inst:AddComponent("stackable")
- inst:AddComponent("repairer")
- inst.components.repairer.repairmaterial = MATERIALS.WOOD
- inst.components.repairer.healthrepairvalue = TUNING.REPAIR_LOGS_HEALTH
- return inst
- end
- return Prefab("log", fn, assets)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement