interface case, acrylic ui, swap to make, lint

This commit is contained in:
Reid 2023-08-15 20:18:59 -07:00
parent f5584a9b0c
commit a5bc77030a
24 changed files with 353 additions and 92 deletions

View file

@ -1,3 +1,4 @@
import Make from "@rbxts/make"
import { World, useEvent } from "@rbxts/matter"
import { Model, PlayerCharacter } from "ReplicatedStorage/ecs/components"
@ -15,19 +16,22 @@ function playersRagdollOnDeath(world: World): void {
for (const [_] of useEvent(playerCharacter.humanoid, "Died")) {
model.model.GetDescendants().forEach((v, _) => {
if (v.IsA("Motor6D")) {
const attachment0 = new Instance("Attachment")
const attachment1 = new Instance("Attachment")
attachment0.CFrame = v.C0
attachment1.CFrame = v.C1
attachment0.Parent = v.Part0
attachment1.Parent = v.Part1
const attachment0 = Make("Attachment", {
CFrame: v.C0,
Parent: v.Part0
})
const attachment1 = Make("Attachment", {
CFrame: v.C1,
Parent: v.Part1
})
const ballSocketConstraint = new Instance("BallSocketConstraint")
ballSocketConstraint.Attachment0 = attachment0
ballSocketConstraint.Attachment1 = attachment1
ballSocketConstraint.LimitsEnabled = true
ballSocketConstraint.TwistLimitsEnabled = true
ballSocketConstraint.Parent = v.Parent
Make("BallSocketConstraint", {
Attachment0: attachment0,
Attachment1: attachment1,
LimitsEnabled: true,
TwistLimitsEnabled: true,
Parent: v.Parent
})
v.Destroy()
}

View file

@ -1,7 +1,7 @@
import { useEvent, World } from "@rbxts/matter"
import { Players } from "@rbxts/services"
import * as Components from "ReplicatedStorage/ecs/components"
import { serverState } from "ReplicatedStorage/ecs/state"
import { ServerState } from "ReplicatedStorage/ecs/state"
import { getEvent } from "ReplicatedStorage/remotes"
type ComponentName = keyof typeof Components
@ -21,7 +21,7 @@ const replicatedComponents: ReadonlySet<ComponentConstructor> = REPLICATED_COMPO
getEvent("EcsReplication")
function replication(world: World, server: serverState): void {
function replication(world: World, server: ServerState): void {
const replicationEvent = getEvent("EcsReplication")
let payload: Map<string, Map<ComponentName, { data?: Components.GooplerComponent }>> | undefined