remove github, add logger

This commit is contained in:
Reid 2023-08-10 03:43:05 -07:00
parent eee1861752
commit add6db3bb6
12 changed files with 99 additions and 116 deletions

View file

@ -1,6 +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 { getEvent } from "ReplicatedStorage/remotes"
type ComponentName = keyof typeof Components
@ -20,7 +21,7 @@ const replicatedComponents: ReadonlySet<ComponentConstructor> = REPLICATED_COMPO
getEvent("EcsReplication")
function replication(world: World): void {
function replication(world: World, server: serverState): void {
const replicationEvent = getEvent("EcsReplication")
let payload: Map<string, Map<ComponentName, { data?: Components.GooplerComponent }>> | undefined
@ -43,7 +44,7 @@ function replication(world: World): void {
}
}
print("Sending initial payload to", player)
server.logger.Debug("Sending initial payload to {@player}", player)
replicationEvent.FireClient(player, payload)
}