Jump to content

Recommended Posts

Hey guys I am trying to alternate options with the werebeaver, make his LMB pick while pressing down a key, instead of gnawing; This line of code used to be working but now it broke, I am not sure if they updated it, I have also tried inserting GLOBAL.Theinput but it does not work either.... Is there some way around this?

local function GetBeaverAction(inst, target)
    for i, v in ipairs(BEAVER_LMB_ACTIONS) do
        if target:HasTag(v.."_workable") and TheInput:IsKeyDown(KEY_CTRL) then
            return not target:HasTag("sign") and ACTIONS[v]
end			
			if TUNING.BEAVER_PICKUP_RENEWABLE_RESOURCES == 1 and (target:HasTag("molebait") or target.prefab == "dug_berrybush" or target.prefab == "dug_berrybush2" or 
			target.prefab == "dug_sapling" or target.prefab == "dug_grass" or target.prefab == "twigs" or target.prefab == "reeds" or 
			target.prefab == "log" or target.prefab == "acorn" or target.prefab == "pinecone" or target.prefab == "twiggy_nut" or target.prefab == "dug_grass"
			or target.prefab == "cutgrass"
				or target.prefab == "dug_marsh_bush"  or target.prefab == "dug_berrybush_juicy" or target.prefab == "lucy" 
				or target.prefab == "livinglog" )
				then return ACTIONS.PICKUP
				end
			if target:HasTag("pickable") and TUNING.BEAVER_HARVEST_RENEWABLE_RESOURCES == 1 then
               return ACTIONS.PICK
			   end
if  target.prefab == "wormhole" then
        return ACTIONS.TELEPORT	
			or nil
        end
    end


    if target:HasTag("walkingplank") and target:HasTag("interactable") then
        return (inst:HasTag("on_walkable_plank") and ACTIONS.ABANDON_SHIP) or
                (target:HasTag("plank_extended") and ACTIONS.MOUNT_PLANK) or
                ACTIONS.EXTEND_PLANK
    end

 

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