nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::LocalConnection Class Referencefinal

#include <local_connection.h>

Inheritance diagram for nanommo::LocalConnection:
nanommo::Link

Public Member Functions

 LocalConnection (const Content &content, std::string name)
void Poll () override
 Takes in what's arrived, without waiting.
void Send (const protocol::Input &input) override
bool connected () const override
const protocol::World & world () const override
const std::deque< protocol::Chat > & chat () const override
 The newest lines said in the world, oldest first.
int64_t whole () const override
const std::optional< protocol::Move > & move () const override
 Where the world's instance told us to go, once it hands its players over.
const protocol::Inventory & inventory () const override
 What we carry and wear, as the world last sent it.
const protocol::Quests & quests () const override
const protocol::Guild & guild () const override
 Our guild, with no name for none.
const protocol::Trade & trade () const override
 Our trade, with nobody in it for none.
const protocol::Duel & duel () const override
 Our duel, the same.
std::vector< protocol::Event > TakeEvents () override
std::optional< protocol::GuildInvite > TakeInvite () override
 The guild that asked us to join since the last time, once.

Detailed Description

A world of the client's own, without a server: the world's library, run in the client at the server's tick, for one player, in the first land. Nothing is saved, and there's nobody else.

Definition at line 25 of file local_connection.h.

Constructor & Destructor Documentation

◆ LocalConnection()

nanommo::LocalConnection::LocalConnection ( const Content & content,
std::string name )

Definition at line 40 of file local_connection.cc.

Member Function Documentation

◆ chat()

const std::deque< protocol::Chat > & nanommo::LocalConnection::chat ( ) const
inlineoverridevirtual

The newest lines said in the world, oldest first.

Implements nanommo::Link.

Definition at line 33 of file local_connection.h.

◆ connected()

bool nanommo::LocalConnection::connected ( ) const
inlineoverridevirtual

Implements nanommo::Link.

Definition at line 31 of file local_connection.h.

◆ duel()

const protocol::Duel & nanommo::LocalConnection::duel ( ) const
inlineoverridevirtual

Our duel, the same.

Implements nanommo::Link.

Definition at line 40 of file local_connection.h.

◆ guild()

const protocol::Guild & nanommo::LocalConnection::guild ( ) const
inlineoverridevirtual

Our guild, with no name for none.

Implements nanommo::Link.

Definition at line 38 of file local_connection.h.

◆ inventory()

const protocol::Inventory & nanommo::LocalConnection::inventory ( ) const
inlineoverridevirtual

What we carry and wear, as the world last sent it.

Implements nanommo::Link.

Definition at line 36 of file local_connection.h.

◆ move()

const std::optional< protocol::Move > & nanommo::LocalConnection::move ( ) const
inlineoverridevirtual

Where the world's instance told us to go, once it hands its players over.

Implements nanommo::Link.

Definition at line 35 of file local_connection.h.

◆ Poll()

void nanommo::LocalConnection::Poll ( )
overridevirtual

Takes in what's arrived, without waiting.

Implements nanommo::Link.

Definition at line 56 of file local_connection.cc.

◆ quests()

const protocol::Quests & nanommo::LocalConnection::quests ( ) const
inlineoverridevirtual

Implements nanommo::Link.

Definition at line 37 of file local_connection.h.

◆ Send()

void nanommo::LocalConnection::Send ( const protocol::Input & input)
overridevirtual

Implements nanommo::Link.

Definition at line 68 of file local_connection.cc.

◆ TakeEvents()

std::vector< protocol::Event > nanommo::LocalConnection::TakeEvents ( )
overridevirtual

What happened near us since the last time, oldest first, which it hands over, as each event comes once.

Implements nanommo::Link.

Definition at line 123 of file local_connection.cc.

◆ TakeInvite()

std::optional< protocol::GuildInvite > nanommo::LocalConnection::TakeInvite ( )
overridevirtual

The guild that asked us to join since the last time, once.

Implements nanommo::Link.

Definition at line 127 of file local_connection.cc.

◆ trade()

const protocol::Trade & nanommo::LocalConnection::trade ( ) const
inlineoverridevirtual

Our trade, with nobody in it for none.

Implements nanommo::Link.

Definition at line 39 of file local_connection.h.

◆ whole()

int64_t nanommo::LocalConnection::whole ( ) const
inlineoverridevirtual

The newest world that's come whole, by when it was sent, for the server to leave out what hasn't changed since.

Implements nanommo::Link.

Definition at line 34 of file local_connection.h.

◆ world()

const protocol::World & nanommo::LocalConnection::world ( ) const
inlineoverridevirtual

Implements nanommo::Link.

Definition at line 32 of file local_connection.h.


The documentation for this class was generated from the following files: