{"id":"khanpython/prop-spill","name":"prop-spill","scope":"khanpython","platform":"roblox","description":"Outdated, do not use","version":"2.0.0","latest":"2.0.0","versions":["1.0.0-rc.1","1.0.0","2.0.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"howmanysmall/janitor":{"version":"^1.15.6","alias":"janitor"},"evaera/promise":{"version":"^4.0.0","alias":"promise"}},"integrity":"8cc678a9f898dafd3745ab1bc6a385157d68fd6285ae39ee534c670aadcc90df","likes":0,"downloads":0,"install":"forest install khanpython/prop-spill","url":"https://forest.dev/p/roblox/khanpython/prop-spill","files":"https://api.forest.dev/ai/package/roblox/khanpython/prop-spill/files","readme":"<div align=\"center\">\r\n\t<h1>Dispense Prop</h1>\r\n    <p>A promise-based system for physically dispensing and attracting in-game props.</p>\r\n</div>\r\n\r\n\r\n\r\n## Features\r\n\r\n- Spawn a customizable number of props from a specified origin.\r\n- Automatic Cleanup: Optional auto-destroy timer to remove all props after a specific time.\r\n- Option to 'attract' the props towards the target object.\r\n- Initial dispense-behavior is physics driven, while the attract uses CFraming.\r\n- Hooks for spawn, claim, and completion.\r\n- Promise-based.\r\n\r\n\r\n---\r\n\r\n## Installation via wally\r\n\r\n1. Ensure you have the [Wally package manager](https://github.com/UpliftGames/wally) installed on your system.\r\n2. Add the following line to your `wally.toml` file under the `[dependencies]` section:\r\n   ```toml\r\n   dispense-prop = \"khanpython/dispense-prop@1.0.0\"\r\n   ```\r\n3. Run the Wally install command to download and integrate the package:\r\n    ```bash\r\n    wally install\r\n    ```\r\n4. The package will be placed in your Packages folder. Use the following code snippet to require it in your project:\r\n    ```lua\r\n    local DispenseProp = require(path-to-package)\r\n    ```\r\n\r\n---\r\n\r\n## Usage\r\n\r\n\r\n#### Parameters\r\n- `Amount` (number): Number of props to spawn. Must be an integer ≥ 1.\r\n- `Origin` (Vector3): The starting position for the props.\r\n- `TargetObject` (Model | BasePart): The object towards which props will be attracted.\r\n- `PropInstance` (Model): A pre-configured model to use for each prop.\r\n- `CollisionGroup` (string?): The collision group for the props.\r\n- `AutoDestroyTime` (number?): Time in seconds before all props are destroyed automatically.\r\n- `AttractDistance` (number?): The maximum distance for props to be attracted to the target.\r\n- `OnDispense` (function?): Callback invoked when a prop is spawned. Receives the prop instance as an argument.\r\n- `OnPropClaim` (function?): Callback invoked when a prop is claimed.\r\n- `OnAllClaimed` (function?): Callback invoked when all props are claimed.\r\n\r\n#### Returns\r\nA Promise that resolves soon as the props are instantiated.\r\n\r\n#### Example Usage\r\n```lua\r\nlocal DispenseProp = require(script.DispenseProp)\r\n\r\nDispenseProp({\r\n    Amount = 10,\r\n    Origin = Vector3.new(0, 10, 0),\r\n    TargetObject = workspace.Target,\r\n    PropInstance = workspace.PropTemplate,\r\n    CollisionGroup = \"Props\",\r\n    AutoDestroyTime = 30,\r\n    AttractDistance = 50,\r\n    OnDispense = function(prop)\r\n        print(\"Prop dispensed:\", prop.Name)\r\n\r\n        -- You will need to apply your own dispense logic\r\n        prop.PrimaryPart:ApplyImpulse(Vector3.new(0, 10, 0))\r\n    end,\r\n    OnPropClaim = function()\r\n        print(\"A prop has been claimed!\")\r\n    end,\r\n    OnAllClaimed = function()\r\n        print(\"All props have been claimed!\")\r\n    end,\r\n}):await()\r\n","readmeTruncated":false}