Heal and Shave actions use the incorrect strings


JohnWatson
  • Closed

Shaving and healing are supposed to have different strings when doing it on yourself or on another entity. From strings.lua:

        SHAVE =
        {
            GENERIC = "Shave",
            SELF = "Shave Self",
        },
        HEAL =
        {
            GENERIC = "Heal",
            SELF = "Heal Self",
        },

However, the game only uses the 'GENERIC' string. So even if you're going to perform the action on yourself, it shows 'Shave' and 'Heal', instead of 'Shave Self' and 'Heal Self' as intended.

unknown.png

unknown.png

This is because of the functions ACTIONS.SHAVE.strfn and ACTIONS.HEAL.strfn in actions.lua:

ACTIONS.SHAVE.strfn = function(act)
    return (act.target == nil or act.target == act.doer)
        and TheInput:ControllerAttached()
        and "SELF"
        or nil
end
ACTIONS.HEAL.strfn = function(act)
    return (act.target == nil or act.target == act.doer)
        and TheInput:ControllerAttached()
        and "SELF"
        or nil
end

What happens is that the 'Shave Self' and 'Heal Self' strings only get used when a controller is used. This can be fixed by removing the 'and TheInput:ControllerAttached()' line:

ACTIONS.SHAVE.strfn = function(act)
    return (act.target == nil or act.target == act.doer)
        and "SELF"
        or nil
end
ACTIONS.HEAL.strfn = function(act)
    return (act.target == nil or act.target == act.doer)
        and "SELF"
        or nil
end

And this allows the proper strings to be used:
unknown.png


Steps to Reproduce
Play as Wilson or Webber, then type c_spawn('razor') into the console. Attempt to use the razor on yourself and the action's name should be 'Shave' instead of 'Shave Self'.


User Feedback




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