Jump to content

Recommended Posts

was the infinitearmor

 

but now is the infiniteTools

HELP?

It's a game bug. The game assumes the finiteuses component exists on some items but the mod is removing it from them. Disable the Infinite Tools mod and it should no longer crash.

Unfortunately, there's no easy way for the mod to fix this. You might try reporting the bug here.

well finiteuses component can be overrided till bug fix

so instead of removing component you can check tag, for example "infinite"

 

something like:

FiniteUses = require "components/finiteuses" local oldSetUses = FiniteUses.SetUses or function() return false endlocal oldUse = FiniteUses.Use or function() return false end function FiniteUses:SetUses(val)if self.inst:HasTag("infinite") then self.current = self.total else oldSetUses(self,val) endendfunction FiniteUses:Use(num)if not self.inst:HasTag("infinite") then oldUse(self,num) endend return FiniteUses

and add tag "infinite" to any object that must not end

Edited by iWitch

That's a good solution, iWitch. There's a few syntax errors, though: the return is unnecessary, and you can't access the functions using the tbl:fn syntax, only call/define them; it should be local oldSetUses = FiniteUses.SetUses.

Edited by squeek

oh yes, its mistake about ":"

about return - its just my common copypaste for such functions. So if function must return something, you not failed.

I meant the return at the very bottom, but that's only a problem if the code is inside modmain.lua. If that code was in a separate file that got require'd from modmain, then it's no problem.

Yeah, I tend to move that sort of stuff out of modmain.lua as well. I'd keep it out of the components folder, though, because it doesn't need to be there and it being there creates the chance for another mod to have a file of the same name. I'd put it somewhere like <modfolder>/scripts/modname/finitetoolspatch.lua and then use require "modname/finitetoolspatch" in modmain.lua.

Edited by squeek

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
×
  • Create New...