This project adheres to Semantic Versioning (semver).
It is recommended to keep the client up-to-date with latest versions to avoid possible breakage with each update to the game's protocol.
This release includes some important fixes to run on the latest protocol.
Profile
:noSkill
version of profile stats introduced by Transformice v1.691- Add
luadev
andfashionsquad
in Role enum
BREAKING
Client
: Switched to native fetch API forClient.fetchIP
in favour of less dependencies. Requires Node 18 or higher.- Export
Connection
class. - Export
TFMConnectionError
class. AddedTFMConnectionError.isThis(payload: any)
static method to narrow error types.
const castedConnErr: any = new TFMConnectionError("bulle") as any
if (TFMConnectionError.isThis(castedConnErr)) {
// castedConnErr in this scope is narrowed from `any` into `TFMConnectionError`
console.log(castedConnErr.serverType); // prints "bulle"
}
Client
: Removed no-oplanguageChange
eventProfile
:Profile.role
is now aRole
type enum rather than just a number.
- Fixed
Profile
packed parsing offsets.
This release includes some important fixes to run on the latest protocol.
Client
: New eventroomPassworded
is emitted when a room being attempted to enter needs a password.
BREAKING
Client:
Eventdisconnect
will also be emitted when a connection error occurs. It will also include an optionalerr
parameter, which will benull
when the disconnection is client-triggered. (#4, @Cassolette)
- Cheeseformice endpoint is dead. Replaced it with a working link and now
Client.fetchIP
works again. Client.loadLua
actually works. It previously did not include the script buffer in its outgoing packets.- Support server updates to room joining.
Client.enterRoom
works again.BulleIdentifier.roomPassworded
(5,39) is no longer server-bound packet and is replaced by having the password in theBulleIdentifier.room
(5,38) packet.
This release includes some important fixes to run on the latest protocol.
RoomPlayer
: New properties,cheeses
andrespawnId
.
- Fixes: player list parsing was broken due to wrong offsets. (#5, @entibo)
RoomPlayer
: Negative scores were not registered correctly.
Docs site has been re-published, check it out here.
- Default connection settings endpoint wasn't working. Switched to using Cheeseformice's endpoint.
- Supports alternative IP fetching strategy using client options.
Maintenance of the module has moved to Cheeseformice. The package is renamed to @cheeseformice/transformice.js
.
- Supports accounts with Bot role.
Client
supports optionpassword
to set the default login room.- ByteArray can work natively with Node
Buffer
, with support forreadBufBytes
andwriteBufBytes
. - ByteArray supports
.toString("printable")
for debugging, as a convenience to callingjsesc
. - Added
bulleConnect
event triggered on bulle connection. Note that thebulleConnect
event was never part ofconnect
and is newly added. - Add
Channel
aliases forgetPlayers
,join
andleave
. - Add client intents to ClientOptions. For now, this only contains
friendList
which is enabled by default. - Supports a maintained
Client.friends
list when the intentfriendList
is not disabled. - Added
tribulleConnect
event triggered on tribulle connection packet. This is equivalent toready
prior to this.
BREAKING
Dropped support for authentication keys login. You must use a approved bot account now.BREAKING
Targets minimally ES6 CommonJS now.BREAKING
Changed all the typing forenums
to use TypeScript enums instead of plain JS objects. Renamed several enum type names.BREAKING
SeparatedbulleConnectionError
from the regularconnectionError
event.BREAKING
RenamedChatCommunity
toTribulleCommunity
.BREAKING
WhisperMessage.sentTo
changed from a string toTribullePlayer
.Friend
,Member
now inherits fromTribullePlayer
. This allows direct matching to be done without .toLowerCase(), e.g.
client.on("whisper", (message) => {
const toSelf = message.client.name === message.sentTo.name;
});
BREAKING
Client.channels
changed from an array to aMap
for performance gain when modifying the channels list.BREAKING
The event signatures forfriendList
,friendAdd
,friendRemove
,friendConnect
,friendDisconnect
,channelWho
,channelJoin
,channelLeave
have changed to pass specificFriend
andClient
objects respectively.- Exposed
Identifier
andIdentifierSplit
for those who wish to manipulate raw packets. - Exposed
Client
main and bulle connections. This is useful for debugging server connections. ready
event waits for the friend list to be populated before emitting (only forfriendList
intent users). UsetribulleConnect
event for the prior definition ofready
.
- Login now works with Transformice protocol to date.
- Removed an accidental delay when the bulle server connection failed.
- Fixes: Sometimes
connectionError
event does not fire when the server shuts down.
This is the initial beta version by SuspiciousLookingOwl.