diff --git a/default.project.json b/default.project.json index 0d2b792..48c01fe 100644 --- a/default.project.json +++ b/default.project.json @@ -43,6 +43,10 @@ "$path": "out/src/StarterPlayer/StarterCharacterScripts" } }, + "StarterPack": { + "$className": "StarterPack", + "$path": "out/src/StarterPack" + }, "Workspace": { "$className": "Workspace", "$properties": { diff --git a/readme.md b/readme.md index d693a2a..91d8499 100644 --- a/readme.md +++ b/readme.md @@ -16,5 +16,6 @@ Ui theming is based on Catppucin Mocha. You can find the colors [here](https://g # Todo * __Work on next:__ Better null checking for the clientState.character (can cause errors atm) * __Work on next:__ Add guns +* Unscuff [`./src/ServerScriptService/ecs/systems/server/toolHandler.ts`](./src/ServerScriptService/ecs/systems/server/toolHandler.ts) * Add tests * Add the bound tags in [`./src/ReplicatedStorage/ecs/boundTags.ts`](./src/ReplicatedStorage/ecs/boundTags.ts) \ No newline at end of file diff --git a/src/ReplicatedStorage/ecs/systems/client/toolHandler.ts b/src/ReplicatedStorage/ecs/systems/client/toolHandler.ts index 8f8bac2..10c97e4 100644 --- a/src/ReplicatedStorage/ecs/systems/client/toolHandler.ts +++ b/src/ReplicatedStorage/ecs/systems/client/toolHandler.ts @@ -11,7 +11,9 @@ function toolHandler(world: World): void { for (const [_] of useEvent(character.equippedTool, "Activated")) { print(Players.LocalPlayer.GetMouse()) - activateToolEvent.FireServer(Players.LocalPlayer.GetMouse().Hit.Position) + activateToolEvent.FireServer( + Players.LocalPlayer.GetMouse().Hit.Position + ) } } } diff --git a/src/ServerScriptService/ecs/systems/server/toolHandler.ts b/src/ServerScriptService/ecs/systems/server/toolHandler.ts index 33704f1..b5f55e5 100644 --- a/src/ServerScriptService/ecs/systems/server/toolHandler.ts +++ b/src/ServerScriptService/ecs/systems/server/toolHandler.ts @@ -21,7 +21,7 @@ function toolHandler(world: World, state: ServerState): void { // We don't want a bunch of if statements... // example tool - spawns a part at cursor pos - if (character.equippedTool.Name === "example tool") { + if (character.equippedTool.Name === "Example Tool") { Make("Part", { Position: hitPos, Anchored: false, diff --git a/src/StarterPack/Example Tool.rbxmx b/src/StarterPack/Example Tool.rbxmx new file mode 100644 index 0000000..aa69cd7 --- /dev/null +++ b/src/StarterPack/Example Tool.rbxmx @@ -0,0 +1,158 @@ + + true + null + nil + + + + true + true + + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 1 + + 0 + false + + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 1 + + yuZpQdnvvUBOTYh1jqZ2cA== + + 0 + 0 + 0 + + 0 + Example Tool + false + null + true + 1 + -1 + + + + + + + + false + + -0.5 + 0.5 + 0 + 0 + -0.5 + 0.5 + 0 + 0 + + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 1 + + true + true + true + true + Default + 0 + 4288914085 + + false + + true + -0.5 + 0.5 + 0 + 0 + -0.5 + 0.5 + 0 + 0 + false + false + 256 + + Handle + + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 1 + + 0 + -0.5 + 0.5 + 0 + 0 + 0 + + 0 + 0 + 0 + + -1 + + -0.5 + 0.5 + 0 + 0 + 0 + + 0 + 0 + 0 + + 1 + 1 + + 1 + 1 + 1 + + + + + + + + \ No newline at end of file