parse_axes("-x 4 z 3 5",name)==returnVector3.new(0,0,3),Vector3.new(-4,0,-5)
parse_axes("x -10 y 14 true",name)==returnVector3.new(0,14,0),Vector3.new(-10,-14,0)
parse_axes("x -10 y 14 r",name)==returnVector3.new(0,14,0),Vector3.new(-10,-14,0)
parse_axes("x -10 y 14 rev",name)==returnVector3.new(0,14,0),Vector3.new(-10,-14,0)
-- Assuming player is facing +Z (north)
parse_axes("front 4 y 2 r",name)==returnVector3.new(0,2,4),Vector3.new(0,-2,0)
parse_axes("right 4 y 2 r",name)==returnVector3.new(0,2,0),Vector3.new(-4,-2,0)
]]--
--- Parses an absolute axis name to a Vector3 instance.
-- @example
-- local v3instance = parse_abs_axis_name("-x")
-- -- v3instance will now be equal to Vector3.new(-1, 0, 0)
-- @param axis_name string The axis name to parse.
-- @returns bool,Vector3|string A bool success value, followed by the resulting Vector3 instance (if succeeded) or an error message string (if failed).
localfunctionparse_abs_axis_name(axis_name)
iftype(axis_name)~="string"then
returnfalse,"Error: Expected axis_name to be of type string, but found value of type '"..type(axis_name).."' instead."
-- Parses a relative axis name (e.g. "front", "back", etc) to an absolute
-- Vector3 instance.
-- @param axis_name string The axis name to parse.
-- @param player_name PlayerDir The directional information that the parsing should be relative to.
-- @returns bool,Vector3|string A bool success value, followed by the resulting Vector3 instance (if succeeded) or an error message string (if failed).
-- @param facing_dir PlayerDir The direction the player is facing. Returned from wea.player_dir(name).
-- @returns Vector3,Vector3 A Vector3 pair generated from parsing out the input token list representing the delta change that can be applied to a defined pos1, pos2 region.