ColombianCam Posted April 22, 2019 Share Posted April 22, 2019 (edited) A long time ago I tried to get the werebeaver to have more actions such as, shaving beefalo and pitchforking but the problem is that they're not inside the action picker and rather in componentactions.lua local function RightClickPicker(inst, target) if target ~= nil and target ~= inst then for i, v in ipairs(BEAVER_DIET) do if target:HasTag("edible_"..v) then return inst.components.playeractionpicker:SortActionList({ ACTIONS.EAT }, target, nil) end end return (target:HasTag("HAMMER_workable") and inst.components.playeractionpicker:SortActionList({ ACTIONS.HAMMER }, target, nil)) or (target:HasTag("DIG_workable") and target:HasTag("sign") and inst.components.playeractionpicker:SortActionList({ ACTIONS.DIG }, target, nil)) or (target:HasTag("hat") and inst.components.playeractionpicker:SortActionList({ ACTIONS.PICKUP }, target, nil)) or (target:HasTag("groundtile") and inst.components.playeractionpicker:SortActionList({ ACTIONS.TERRAFORM }, target, nil)) or (target:HasTag("beefalo") and inst.components.playeractionpicker:SortActionList({ACTIONS.SHAVE)}, target, nil)) or nil here's the code for terraforming in componenactions.lua for terraform terraformer = function(inst, doer, pos, actions, right) if right and TheWorld.Map:CanTerraformAtPoint(pos:Get()) then table.insert(actions, ACTIONS.TERRAFORM) end end, shaver = function(inst, doer, target, actions) if target:HasTag("bearded") and not (doer.replica.rider ~= nil and doer.replica.rider:IsRiding()) then table.insert(actions, ACTIONS.SHAVE) end end, so um, can anyone help me please? In game what ends up happening is that the beaver has the option to shave but he doesn't complete the action, he sort of just stutters and as for the terraformer, he doesn't even bother to detect turfs. Edited April 22, 2019 by ColombianCam + info Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now