From 9c31443354919cdce7e6a26008cec0574a21ff94 Mon Sep 17 00:00:00 2001 From: reidlab Date: Sat, 19 Aug 2023 21:44:19 -0700 Subject: [PATCH 1/2] add some rojo stuff --- default.project.json | 4 + .../ecs/systems/client/toolHandler.ts | 4 +- .../ecs/systems/server/toolHandler.ts | 2 +- src/StarterPack/Example Tool.rbxmx | 158 ++++++++++++++++++ 4 files changed, 166 insertions(+), 2 deletions(-) create mode 100644 src/StarterPack/Example Tool.rbxmx 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/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 From df7450e45d6f48b55297c1a3a7cd4c66fe6c7338 Mon Sep 17 00:00:00 2001 From: reidlab Date: Sat, 19 Aug 2023 22:11:10 -0700 Subject: [PATCH 2/2] update readme --- readme.md | 1 + 1 file changed, 1 insertion(+) 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