Don't Starve Revision History Viewer

Comparing Six Feet Under (Rev 86935) to All's Well That Maxwell (Rev 88237)

components/playeractionpicker.lua

300301302303304305306307308309310311312313314315316317318319320
end end local position = TheInput:GetWorldPosition() if (target and target:IsValid() and target.Transform and (target:HasTag("player") or TheSim:GetLightAtPoint(target.Transform:GetWorldPosition()) > TUNING.DARK_CUTOFF)) or TheSim:GetLightAtPoint(position.x,position.y,position.z) > TUNING.DARK_CUTOFF then local acts = self:GetClickActions(target, position) if acts and #acts > 0 then action = acts[1] end end if (target and target:IsValid() and target.Transform and (target:HasTag("player") or TheSim:GetLightAtPoint(target.Transform:GetWorldPosition()) > TUNING.DARK_CUTOFF)) or TheSim:GetLightAtPoint(position.x,position.y,position.z) > TUNING.DARK_CUTOFF then local acts = self:GetRightClickActions(target, position) if acts[1] and (not action or acts[1].action ~= action.action) then second_action = acts[1] end end return action, second_action
300301302303304305306307308309310311312313314315316317318319320321322323324325
end end local target_in_light = target and target:IsValid() and target.Transform and TheSim:GetLightAtPoint(target.Transform:GetWorldPosition()) > TUNING.DARK_CUTOFF local position = TheInput:GetWorldPosition() if ((target and target:IsValid() and target.Transform) and (target:HasTag("player") or target_in_light) ) or (not target and TheSim:GetLightAtPoint(position.x,position.y,position.z) > TUNING.DARK_CUTOFF) then do local acts = self:GetClickActions(target, position) if acts and #acts > 0 then action = acts[1] end end do local acts = self:GetRightClickActions(target, position) if acts[1] and (not action or acts[1].action ~= action.action) then second_action = acts[1] end end end return action, second_action