Jump to content

Attempting to make orange gems fuel the lazy explorer


Recommended Posts

I am attempting to make a small personal mod that refuels the lazy explorer by 25% with orange gems. Here's the code for it

GLOBAL.FUELTYPE.ORANGEM = "ORANGEM"

AddPrefabPostInit("orangestaff", function(inst)
    inst:DoTaskInTime(0, function()
        if inst.components.fueled then
            inst.components.fueled.fueltype = GLOBAL.FUELTYPE.ORANGEM
            inst.components.fueled.accepting = true
        end
    end)
end)

AddPrefabPostInit("orangegem", function(inst)
    if inst.components.fuel == nil then
        inst:AddComponent("fuel")
    end
    if inst.components.fuel then
        inst.components.fuel.fuelvalue = GLOBAL.TUNING.ORANGESTAFF_FUEL * 1/4
        inst.components.fuel.fueltype = GLOBAL.FUELTYPE.ORANGEM
    end
end)

however, upon picking up an orange gem i get the crash message I'm assuming is below the text

any help at all i greatly appreciate as the no-refueling of the staff greatly annoys me =)

bandicam 2018-05-11 16-55-23-375.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...