export const CHUNK_SIZE = 16;
export const REGION_CHUNKS = 4;
export const SPRITE_SIZE_PX = 16;
export const PIVOT_FROM_BOTTOM_PX = 8;
export const VISIBLE_CHUNK_RADIUS = 1;

export const DEFAULT_CHUNK_LOADER = Object.freeze({
	simulationRadiusChunks: 1,
	regionLoadRadius: 1
});

export const CHUNK_RUNTIME_STATE = Object.freeze({
	dormant: "dormant",
	simulating: "simulating"
});

export const REGION_RUNTIME_STATE = Object.freeze({
	unloaded: "unloaded",
	resident: "resident"
});

export const WORLD_YEAR_OFFSET = 1200;

export const DEFAULT_WORLD_SETTINGS = Object.freeze({
	walkTilesPerSecond: 2,
	simulationTickHz: 20,
	shopPriceLerpDurationMs: 60 * 60 * 1000,
	groundItemDespawnDurationMs: 10 * 60 * 1000,
	regionUnloadGracePeriodMs: 30 * 1000,
	defaultGroundTypeId: 1,
	characterDeletionDelayMs: 24 * 60 * 60 * 1000,
	nightDarkness: 0.72,
	chatMaxCharacters: 100,
	bloomThreshold: 0.35,
	bloomSoftKnee: 0.3,
	bloomIntensity: 1.35,
	bloomBlurSize: 3,
	bloomSaturation: 1.15,
	bloomColorPreserve: 0.35,
	bloomDilate: 2,
	bloomScales: 2,
	bloomHalfRes: 1,
	pigeonTakeoffTilesPerSec: 3,
	pigeonCruiseTilesPerSec: 8,
	pigeonLandingTilesPerSec: 3,
	pigeonPhaseTiles: 5
});

export const GAIT = Object.freeze({
	walk: "walk",
	run: "run"
});

export const SEX = Object.freeze({
	male: "male",
	female: "female"
});

export const MessageType = Object.freeze({
	hello: "HELLO",
	session: "SESSION",
	error: "ERROR",
	characterList: "CHARACTER_LIST",
	createCharacter: "CREATE_CHARACTER",
	selectCharacter: "SELECT_CHARACTER",
	scheduleDeleteCharacter: "SCHEDULE_DELETE_CHARACTER",
	cancelDeleteCharacter: "CANCEL_DELETE_CHARACTER",
	leaveWorld: "LEAVE_WORLD",
	forceLogout: "FORCE_LOGOUT",
	enterWorld: "ENTER_WORLD",
	moveTo: "MOVE_TO",
	setGait: "SET_GAIT",
	chunkSnapshot: "CHUNK_SNAPSHOT",
	chunkDelta: "CHUNK_DELTA",
	unsubscribeChunk: "UNSUBSCRIBE_CHUNK",
	entitySpawn: "ENTITY_SPAWN",
	entityMove: "ENTITY_MOVE",
	entityDespawn: "ENTITY_DESPAWN",
	worldStatus: "WORLD_STATUS",
	editorLoadChunk: "EDITOR_LOAD_CHUNK",
	editorChunk: "EDITOR_CHUNK",
	editorSaveChunk: "EDITOR_SAVE_CHUNK",
	editorSaveSettings: "EDITOR_SAVE_SETTINGS",
	editorLoadSettings: "EDITOR_LOAD_SETTINGS",
	editorSettings: "EDITOR_SETTINGS",
	editorApplyRevision: "EDITOR_APPLY_REVISION",
	editorRevisionApplied: "EDITOR_REVISION_APPLIED",
	friendRequest: "FRIEND_REQUEST",
	friendAccept: "FRIEND_ACCEPT",
	friendDecline: "FRIEND_DECLINE",
	friendRemove: "FRIEND_REMOVE",
	friends: "FRIENDS",
	chatSay: "CHAT_SAY",
	chatBubble: "CHAT_BUBBLE",
	dropItem: "DROP_ITEM",
	pickupItem: "PICKUP_ITEM",
	equipItem: "EQUIP_ITEM",
	unequipItem: "UNEQUIP_ITEM",
	inventory: "INVENTORY",
	groundItemAppear: "GROUND_ITEM_APPEAR",
	groundItemDespawn: "GROUND_ITEM_DESPAWN",
	entityAppearance: "ENTITY_APPEARANCE",
	openBank: "OPEN_BANK",
	bankSnapshot: "BANK_SNAPSHOT",
	bankDeposit: "BANK_DEPOSIT",
	bankWithdraw: "BANK_WITHDRAW",
	getBlankCheques: "GET_BLANK_CHEQUES",
	returnBlankCheques: "RETURN_BLANK_CHEQUES",
	writeCheque: "WRITE_CHEQUE",
	redeemCheque: "REDEEM_CHEQUE",
	claimInheritance: "CLAIM_INHERITANCE",
	attack: "ATTACK",
	cancelAttack: "CANCEL_ATTACK",
	interact: "INTERACT",
	combatSwing: "COMBAT_SWING",
	combatHit: "COMBAT_HIT",
	combatMiss: "COMBAT_MISS",
	combatBlock: "COMBAT_BLOCK",
	follow: "FOLLOW",
	cancelFollow: "CANCEL_FOLLOW",
	sendPigeon: "SEND_PIGEON",
	pigeonDispatched: "PIGEON_DISPATCHED",
	pigeonDelivered: "PIGEON_DELIVERED",
	searchCharacter: "SEARCH_CHARACTER",
	characterSearchResult: "CHARACTER_SEARCH_RESULT",
	writeLetter: "WRITE_LETTER",
	editLetter: "EDIT_LETTER",
	openLetter: "OPEN_LETTER",
	skills: "SKILLS",
	eatItem: "EAT_ITEM",
	startCraft: "START_CRAFT",
	cancelCraft: "CANCEL_CRAFT",
	craftResult: "CRAFT_RESULT"
});

