forked from noxious/server
Reverted .env.example, updated init script
This commit is contained in:
parent
2de2bec705
commit
9d72995225
@ -3,7 +3,7 @@ ENV=development
|
||||
HOST="0.0.0.0"
|
||||
PORT=4000
|
||||
JWT_SECRET="secret"
|
||||
CLIENT_URL="http://192.168.2.34:5173"
|
||||
CLIENT_URL="http://192.168.3.4:5173"
|
||||
|
||||
# Database configuration
|
||||
REDIS_URL="redis://@127.0.0.1:6379/4"
|
||||
|
@ -15,6 +15,9 @@ import CharacterTypeRepository from '#repositories/characterTypeRepository'
|
||||
import CharacterHairRepository from '#repositories/characterHairRepository'
|
||||
import ZoneRepository from '#repositories/zoneRepository'
|
||||
|
||||
// @TODO : Replace this with seeding
|
||||
// https://mikro-orm.io/docs/seeding
|
||||
|
||||
export default class InitCommand {
|
||||
constructor(private readonly io: Server) {}
|
||||
|
||||
@ -95,6 +98,9 @@ export default class InitCommand {
|
||||
await idleLeftUpAction.save()
|
||||
|
||||
const walkRightDownAction = new SpriteAction()
|
||||
|
||||
walkRightDownAction.action('test').sprites(['data:image/png;base64,...']) // Base64 sprite data array
|
||||
|
||||
walkRightDownAction.action = 'walk_right_down'
|
||||
walkRightDownAction.sprites = ['data:image/png;base64,...'] // Base64 sprite data array
|
||||
walkRightDownAction.originX = 0
|
||||
@ -220,7 +226,7 @@ export default class InitCommand {
|
||||
character.user = user
|
||||
character.name = 'root'
|
||||
character.role = 'gm'
|
||||
character.zone = await ZoneRepository.getFirst() ?? undefined
|
||||
character.zone = await ZoneRepository.getFirst()
|
||||
character.characterType = await CharacterTypeRepository.getFirst() ?? undefined
|
||||
character.characterHair = await CharacterHairRepository.getFirst() ?? undefined
|
||||
await character.save()
|
||||
|
Loading…
x
Reference in New Issue
Block a user