diff --git a/src/playermat/Playmat.ttslua b/src/playermat/Playmat.ttslua index eb02f89a..27d5f525 100644 --- a/src/playermat/Playmat.ttslua +++ b/src/playermat/Playmat.ttslua @@ -1,5 +1,5 @@ -- set true to enable debug logging and show Physics.cast() -local DEBUG = true +local DEBUG = false -- we use this to turn off collision handling until onLoad() is complete local COLLISION_ENABLED = false @@ -655,11 +655,6 @@ end -- @param matchTypes Boolean. Whether snap points should only snap for the matching card types. function setLimitSnapsByType(params) local matchTypes = params.matchTypes - if matchTypes then - log("Set true") - else - log("Set false") - end local snaps = self.getSnapPoints() for i, snap in ipairs(snaps) do local snapPos = snap.position @@ -691,7 +686,12 @@ function setLimitSnapsByType(params) self.setSnapPoints(snaps) end -function inArea(point, bounds) +-- Simple method to check if the given point is in a specified area. Local use only, +-- @param point Vector. Point to check, only x and z values are relevant +-- @param bounds Table. Defined area to see if the point is within. See MAIN_PLAY_AREA for sample +-- bounds definition. +-- @return Boolean. True if the point is in the area defined by bounds +local function inArea(point, bounds) return (point.x < bounds.upperLeft.x and point.x > bounds.lowerRight.x and point.z < bounds.upperLeft.z diff --git a/src/playermat/PlaymatApi.ttslua b/src/playermat/PlaymatApi.ttslua index b1197809..d3421ffb 100644 --- a/src/playermat/PlaymatApi.ttslua +++ b/src/playermat/PlaymatApi.ttslua @@ -11,7 +11,8 @@ do -- matchTypes is true, the main card slot snap points will only snap assets, while the -- investigator area point will only snap Investigators. If matchTypes is false, snap points will -- be reset to snap all cards. - -- @param matchTypes Boolean. Whether snap points should only snap for the matching card types. + -- @param matchCardTypes Boolean. Whether snap points should only snap for the matching card + -- types. -- @param matColor String for one of the active player colors - White, Orange, Green, Red. Also -- accepts "All" as a special value which will apply the setting to all four mats. PlaymatApi.setLimitSnapsByType = function(matchCardTypes, matColor)