{"id":"scytheric/tritium","name":"tritium","scope":"scytheric","platform":"roblox","description":"A collection of Fusion addons and utilities made by Scythe (dz_Scy)","version":"0.1.9","latest":"0.1.9","versions":["0.1.0","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"elttob/fusion":{"version":"^0.2.0","alias":"fusion"}},"integrity":"4e70fdc0f0c420b2135d1d21b3c78aa70643079d7cc07f99c59e3ae27769852d","likes":0,"downloads":0,"install":"forest install scytheric/tritium","url":"https://forest.dev/p/roblox/scytheric/tritium","files":"https://api.forest.dev/ai/package/roblox/scytheric/tritium/files","readme":"# Tritium\r\nA collection of [Fusion](https://elttob.uk/Fusion/0.2/) addons and utilities made by Scythe (dz_Scy).\r\nSome utility functions were pulled from boatbomber's [PluginEssentials](https://github.com/boatbomber/PluginEssentials/tree/main).\r\n\r\n### DISCLAIMER - If you probe thru the source code, this is for you:\r\nI completely forgot that Fusion 0.2 was published to Wally so please excuse my weird way of locating the Fusion library.\r\nThis will be fixed shortly soon. :\\)\r\n\r\n### Install with Wally:\r\n`tritium = \"scytheric/tritium@0.1.3\"`\r\n\r\n\r\n### No documentation :\\(\r\nDocumentation WIP! Please refer to the code examples below to get an idea of how to use the addons/utility.\r\n\r\n## State Objects\r\n\r\n### ArrayValue\r\n```Lua\r\n-- Assume Tritium is required here.\r\n\r\nlocal array = ArrayValue { \"Apple\", \"Orange\", \"Cherry\" }\r\n\r\nprint(array:get())\r\n-- { \"Apple\", \"Orange\", \"Cherry\" }\r\n\r\n-- Arg #1 `value`: `any`\r\narray:insert(\"Pear\")\r\n\r\nprint(array:get())\r\n-- { \"Apple\", \"Orange\", \"Cherry\", \"Pear\" }\r\n\r\narray:remove(3)\r\n\r\nprint(array:get())\r\n-- { \"Apple\", \"Orange\", \"Pear\" }\r\n\r\n-- Helper method, removes element by its value.\r\narray:removeByValue(\"Apple\")\r\n\r\nprint(array:get())\r\n-- { \"Orange\", \"Pear\" }\r\n```\r\n\r\n### TableValue\r\nNote: For all dictionary/mixed tables/\"arrays\" containing spaces, use TableValue.\r\n```Lua\r\n-- Assume Tritium is required here.\r\n\r\nlocal tbl = TableValue {\r\n\tCurrency = {\r\n\t\tCash = 100\r\n\t},\r\n\r\n\tName = \"John\"\r\n}\r\n\r\nprint(tbl:get())\r\n-- { Currency = { Cash = 100 }, Name = \"John\" }\r\n\r\n-- Arg #1 `Key`: `any`\r\n-- Arg #2 `Value`: `any`\r\n-- Arg #3 `deepAssignment`: `boolean?`\r\n-- Arg #4 `delimiter`: `string?`\r\n-- Arg #5 `ignoreNumericIndices`: `boolean?`\r\ntbl:assign(\"Name\", \"John Doe\")\r\n\r\nprint(tbl:get())\r\n-- { Currency = { Cash = 100 }, Name = \"John Doe\" }\r\n\r\n-- To deep-assign values, you must pass true for the third argument.\r\n-- Arg #4 `delimiter` is optional, \"/\" by default.\r\n-- Arg #5 `ignoreNumericIndices` will ignore numeric indices when parsing the table with the path string, false by default.\r\n--         ^-- If true, all indices are treated as strings (no type conversion will occur where possible.)\r\ntbl:assign(\"Currency/Cash\", 5000, true)\r\n\r\nprint(tbl:get())\r\n-- { Currency = { Cash = 5000 }, Name = \"John Doe\" }\r\n```","readmeTruncated":false}