Jump to content

How to add durability to hat?


Recommended Posts

7 hours ago, noobyt3 said:

i reccomend looking into the C:\Program Files (x86)\Steam\steamapps\common\dont_starve\data\scripts\prefabs folder and looking at the coding 

I will probably do it since people keep ignoring my posts.

Link to comment
Share on other sites

You have to add to:   

 

local function onequip(inst, owner, fname_override)

this part:

 

if inst.components.fueled then

inst.components.fueled:StartConsuming()

end

 

and to

 

local function onunequip(inst, owner)

this part:

 

if inst.components.fueled then

inst.components.fueled:StopConsuming()       

end

 

and this

 

        inst:AddComponent("fueled")
        inst.components.fueled.fueltype = "USAGE"
        inst.components.fueled:InitializeFuelLevel(TUNING.GASMASK_PERISHTIME)
        inst.components.fueled:SetDepletedFn(generic_perish)

 

You don`t have to use this TUNING.GASMASK_PERISHTIME, you can take an other one form the tuning file, but this one would be the same usage lost than the gasmask

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...