Hierarchy

  • default

Implements

Constructors

Methods

  • If this human is not the given player, the message won't be sent.

    Parameters

    Returns default

  • If this human is the given player, the message won't be sent.

    Parameters

    Returns default

  • Cuts the message history down to the correct bounds (preferring the more recent messages)

    Parameters

    • isLocalPlayer: boolean

    Returns boolean

  • Sends a message, and adds it to the message history.

    Parameters

    • message: default | default

      The message to send.

    • Rest ...args: TranslationArg[]

      Arguments to interpolate the message with.

      Note: After sending a message, the message source, type, and human (if any) are reset.

    Returns boolean

  • Signal that the message was sent to everyone

    Parameters

    • sentToAll: boolean = false

    Returns default

  • Sets the sources of the next message. Removes any existing sources.

    Includes Source.All by default, and NOT Source.Game

    Parameters

    • noGameSource: true
    • Rest ...sources: (undefined | false | Source)[]

    Returns default

  • Sets the sources of the next message. Removes any existing sources.

    Includes Source.All and Source.Game by default

    Parameters

    • Rest ...sources: (undefined | false | Source)[]

    Returns default

  • Parameters

    • id: `Input:${string}` | `Health:${string}` | `Creature:${string}` | `Doodad:${string}` | `TileEvent:${string}` | `EquipSlot:${string}` | `Item:${string}` | `Action:${string}` | `Corpse:${string}` | `Skill:${string}` | `Milestone:${string}` | `Stat:${string}` | `Dialog:${string}` | `Challenge:${string}` | `Book:${string}` | `Terrain:${string}` | `HelpArticle:${string}` | `ActionSlotItemMethod:${string}` | `ActionSort:${string}` | `AiType:${string}` | `AutoSave:${string}` | `BadTemperature:${string}` | `Bindable:${string}` | `BindableType:${string}` | `Biome:${string}` | `BleedLevel:${string}` | `ChangelogChangeType:${string}` | `CharacterSort:${string}` | `CombatDangerLevel:${string}` | `CombatStrength:${string}` | `Command:${string}` | `CraftEfficacy:${string}` | `DamageType:${string}` | `Direction:${string}` | `DisplayLevel:${string}` | `DoodadExtra:${string}` | `DoodadGroup:${string}` | `DrawnMapTheme:${string}` | `DurabilityLevel:${string}` | `EquipEffect:${string}` | `ExhaustionLevel:${string}` | `FerocityLevel:${string}` | `FireStage:${string}` | `FontStyle:${string}` | `GameEndMessage:${string}` | `GameMode:${string}` | `Growth:${string}` | `GrowthFungus:${string}` | `HealthAccuracy:${string}` | `HighscoreSort:${string}` | `HumanName:${string}` | `InspectType:${string}` | `InterruptChoice:${string}` | `InventorySort:${string}` | `IslandModifier:${string}` | `IslandName:${string}` | `IslandNameBiomeDescriptor:${string}` | `IslandNameBiomeNoun:${string}` | `IslandNameModifierDescriptor:${string}` | `IslandNameOverrunWithCreatureDescriptor:${string}` | `ItemExtra:${string}` | `ItemGroup:${string}` | `JoinServerRetryReason:${string}` | `Level:${string}` | `LighthouseName:${string}` | `Loading:${string}` | `Macro:${string}` | `MagicalPropertyType:${string}` | `MapQuality:${string}` | `MenuBarButton:${string}` | `Message:${string}` | `MessagesDefaultFilter:${string}` | `MessagesTimestampMode:${string}` | `MilestoneModifierGroup:${string}` | `MilestoneSort:${string}` | `Misc:${string}` | `ModLoadError:${string}` | `ModLoadFailureReason:${string}` | `ModProvide:${string}` | `ModSort:${string}` | `ModType:${string}` | `MultiplayerCompatibility:${string}` | `MultiplayerDisconnectReason:${string}` | `MusicPlaylist:${string}` | `Note:${string}` | `Npc:${string}` | `Number:${string}` | `PartOfDay:${string}` | `Prompt:${string}` | `QuadrantComponent:${string}` | `QuadrantComponentContextMenuAction:${string}` | `Quality:${string}` | `Quest:${string}` | `QuestRequirement:${string}` | `RecipeLevel:${string}` | `Region:${string}` | `Riddle:${string}` | `SaveImportErrorReason:${string}` | `SaveSlotSort:${string}` | `SkillsSort:${string}` | `Source:${string}` | `StatusEffect:${string}` | `SteamInputKeyboardPosition:${string}` | `TeamMemberResponsibility:${string}` | `TemperatureType:${string}` | `TooltipVisibilityOption:${string}` | `Ui:${string}` | `UiQuadrant:${string}` | `UnableToJoinReason:${string}` | `UnlockedRecipesStrategy:${string}` | `UsableActionType:${string}` | `Website:${string}` | `WeightStatus:${string}` | `WorldLayer:${string}`
    • dictionary: default
    • entry: number
    • Optional upgrader: ITranslationUpgrader

    Returns default

  • Runs a callback with the message manager of every player. For sending messages, equivalent to the following:

    players.map(player => callback(player.messages)).some(sent => sent)
    

    Example usage:

    MessageManager.toAll(message => message.source(Source.Wellbeing)
    .type(MessageType.Bad)
    .send(Message.EveryoneHasBecomeInfected, reason));

    Note: When this is called from a client, it actually only displays the message to the client and syncs that with the server. When called from the server, it is sent to every client.

    Parameters

    Returns boolean

Generated using TypeDoc