{"id":"teamhydrogen/hydrogen","name":"hydrogen","scope":"teamhydrogen","platform":"roblox","description":"Mirrored from the Wally registry.","version":"0.5.1","latest":"0.5.1","versions":["0.2.4","0.2.5","0.2.6","0.2.7","0.2.8","0.3.0","0.3.1","0.3.2","0.3.3","0.3.4","0.3.5","0.3.6","0.4.0","0.4.1","0.4.2","0.5.0","0.5.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":["License identified from the packaged LICENSE file; the manifest declared none."],"licenseVerified":true,"dependencies":{},"integrity":"d803b609e3eb2c49e7265d134245f26a07e2ecf91c4e501b82f245027fc9810d","likes":0,"downloads":0,"install":"forest install teamhydrogen/hydrogen","url":"https://forest.dev/p/roblox/teamhydrogen/hydrogen","files":"https://api.forest.dev/ai/package/roblox/teamhydrogen/hydrogen/files","readme":"# Hydrogen\r\n\r\n## A Framework for Roblox designed to handle things that you would rather not.\r\n\r\n---\r\n\r\n## WARNING: Hey There! Please note that Hydrogen is NOT finished and contains MANY issues and no official documentation\r\n\r\n## These will come with due time after the project has been battle-tested, however feel free to use Hydrogen if you figure it out!\r\n\r\n## Install\r\n\r\n### With wally\r\n\r\n```toml\r\n\thydrogen = \"teamhydrogen/hydrogen@0.3.3\"\r\n```\r\n\r\n### With pesde\r\n\r\n```sh\r\npesde add teamhydrogen/hydrogen\r\npesde install\r\n```\r\n\r\n### In File\r\n\r\npesde.toml:\r\n\r\n```toml\r\n[dependencies]\r\nhydrogen = { name = \"teamhydrogen/hydrogen\", version = \"^0.3.3\"}\r\n```\r\n\r\n## Usage:\r\n\r\nThese documents will be very brief as it is just a readme\r\n\r\n```lua\r\nHydrogen.Start(Config: {\r\n\tModuleDirectory: any,\r\n\tModuleSuffix: string?,\r\n\tRunLifecycles: boolean? | { \"PlayerAdded\" | \"PlayerRemoving\" | \"CharacterAdded\" | \"Heartbeat\" | \"RenderStepped\" }?,\r\n})\r\n```\r\n\r\nModuleDirectory: Where your modules are stored on Server and Client\r\nModuleSuffix: What your modules end in, Defaults to \"Handler\"\r\nRunLifecycles: True for all, select what you can use automatically as a function without needing extra connections\r\n\r\nThis will load your modules and other Hydrogen aspects like lifecycles and sound, Players will need to be sorted yourself.\r\n\r\n## Lifecycles\r\n\r\nLifecycles set in Hydrogen.Start can be ran with the following\r\n\r\n```lua\r\nlocal Module = {}\r\n\r\nfunction Module.CONNECTION(Args)\r\nend\r\n\r\nreturn Module\r\n```\r\n\r\nFor example:\r\n\r\n```lua\r\nlocal Module = {}\r\n\r\nfunction Module.PlayerAdded(Player: Player)\r\nend\r\n\r\nreturn Module\r\n```\r\n\r\nThis will run every time a player is added\r\n\r\n## PlayerHandler\r\n\r\nThis handles player data and saving, being a wrapper for [ProfileStore](https://devforum.roblox.com/t/profilestore-save-your-player-data-easy-datastore-module/3190543) allowing you to set, get and even handle custom functions when data is updated\r\n\r\nThis will go more in-depth in the real documentation, however for a README I want to keep it short.\r\n\r\nThe basics are that you set data with\r\n\r\n```lua\r\nPlayerHandler:SetPlayerData(Player, {DATA})\r\n```\r\n\r\nData is a table with a key and what you want to set the key to\r\n\r\n```lua\r\nPlayerHandler:SetPlayerData(Player, {Coins = 300}) -- Sets coins to 300\r\n```\r\n\r\nNote: You can also run :Await() at the end of SetPlayerData to return the new data that has been set.\r\n\r\nYou get data with\r\n\r\n```lua\r\nPlayerHandler:GetPlayerData(Player):Await() -- Returns a future, use Await to just get the data in a variable.\r\n```\r\n\r\n## SoundHandler\r\n\r\nPlays sounds on Server and/or Client, tries to make sounds completely handled by Client.\r\n","readmeBorrowedFrom":{"version":"0.3.3","source":"wally"},"readmeTruncated":false}