2025-06-28 11:24:06 +03:00
|
|
|
package world
|
|
|
|
|
|
|
|
import (
|
|
|
|
"code.haedhutner.dev/mvv/LastMUD/internal/ecs"
|
|
|
|
"code.haedhutner.dev/mvv/LastMUD/internal/game/data"
|
|
|
|
)
|
|
|
|
|
2025-06-30 08:40:15 +03:00
|
|
|
func CreateAccount(world *ecs.World, username string, encryptedPassword []byte) ecs.Entity {
|
2025-06-28 11:24:06 +03:00
|
|
|
account := ecs.NewEntity()
|
|
|
|
|
|
|
|
ecs.SetComponent(world, account, data.NameComponent{Name: username})
|
|
|
|
ecs.SetComponent(world, account, data.PasswordComponent{EncryptedPassword: encryptedPassword})
|
|
|
|
|
|
|
|
return account
|
|
|
|
}
|