Jump to content

Recommended Posts

Basically I need to get following upon inspecting my custom machine:

Character quote + current fuel level

My approach:

inst.components.inspectable.getspecialdescription=GetDescription


local function GetDescription(inst)

    local character_quote = ????
    return character_quote .. "Fuel "..math.ceil(inst.components.fueled:GetPercent()*100).."%."


end
 

Thanks in advance.

Edited by Desblat

You're in for an interesting study-session :)

Open stringutil.lua and take a look around line 156 for this function declaration: function GetString(inst, stringtype, modifier)

Then, search all the game code for: GetString(

Have fun!

  • Like 2

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...