Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
MockServer Class Reference

#include <mock_server.h>

+ Inheritance diagram for MockServer:
+ Collaboration diagram for MockServer:

Public Member Functions

 MockServer (const std::string &path_world="fakepath")
 
void createScripting ()
 
void start ()=delete
 
void stop ()=delete
 
- Public Member Functions inherited from Server
 Server (const std::string &path_world, const SubgameSpec &gamespec, bool simple_singleplayer_mode, Address bind_addr, bool dedicated, ChatInterface *iface=nullptr, std::string *shutdown_errmsg=nullptr)
 
 ~Server ()
 
 DISABLE_CLASS_COPY (Server)
 
void start ()
 
void stop ()
 
void step ()
 
void AsyncRunStep (float dtime, bool initial_step=false)
 
void Receive (float min_time)
 Receive and process all incoming packets.
 
void yieldToOtherThreads (float dtime)
 
PlayerSAOStageTwoClientInit (session_t peer_id)
 
void handleCommand (NetworkPacket *pkt)
 
void handleCommand_Null (NetworkPacket *pkt)
 
void handleCommand_Deprecated (NetworkPacket *pkt)
 
void handleCommand_Init (NetworkPacket *pkt)
 
void handleCommand_Init2 (NetworkPacket *pkt)
 
void handleCommand_ModChannelJoin (NetworkPacket *pkt)
 
void handleCommand_ModChannelLeave (NetworkPacket *pkt)
 
void handleCommand_ModChannelMsg (NetworkPacket *pkt)
 
void handleCommand_RequestMedia (NetworkPacket *pkt)
 
void handleCommand_ClientReady (NetworkPacket *pkt)
 
void handleCommand_GotBlocks (NetworkPacket *pkt)
 
void handleCommand_PlayerPos (NetworkPacket *pkt)
 
void handleCommand_DeletedBlocks (NetworkPacket *pkt)
 
void handleCommand_InventoryAction (NetworkPacket *pkt)
 
void handleCommand_ChatMessage (NetworkPacket *pkt)
 
void handleCommand_Damage (NetworkPacket *pkt)
 
void handleCommand_PlayerItem (NetworkPacket *pkt)
 
void handleCommand_Interact (NetworkPacket *pkt)
 
void handleCommand_RemovedSounds (NetworkPacket *pkt)
 
void handleCommand_NodeMetaFields (NetworkPacket *pkt)
 
void handleCommand_InventoryFields (NetworkPacket *pkt)
 
void handleCommand_FirstSrp (NetworkPacket *pkt)
 
void handleCommand_SrpBytesA (NetworkPacket *pkt)
 
void handleCommand_SrpBytesM (NetworkPacket *pkt)
 
void handleCommand_HaveMedia (NetworkPacket *pkt)
 
void handleCommand_UpdateClientInfo (NetworkPacket *pkt)
 
void ProcessData (NetworkPacket *pkt)
 
void Send (NetworkPacket *pkt)
 
void Send (session_t peer_id, NetworkPacket *pkt)
 
void process_PlayerPos (RemotePlayer *player, PlayerSAO *playersao, NetworkPacket *pkt)
 
void setTimeOfDay (u32 time)
 
void onMapEditEvent (const MapEditEvent &event)
 
std::string getStatusString ()
 
double getUptime () const
 
bool isShutdownRequested () const
 
void requestShutdown (const std::string &msg, bool reconnect, float delay=0.0f)
 
s32 playSound (ServerPlayingSound &params, bool ephemeral=false)
 
void stopSound (s32 handle)
 
void fadeSound (s32 handle, float step, float gain)
 
std::set< std::string > getPlayerEffectivePrivs (const std::string &name)
 
bool checkPriv (const std::string &name, const std::string &priv)
 
void reportPrivsModified (const std::string &name="")
 
void reportInventoryFormspecModified (const std::string &name)
 
void reportFormspecPrependModified (const std::string &name)
 
void setIpBanned (const std::string &ip, const std::string &name)
 
void unsetIpBanned (const std::string &ip_or_name)
 
std::string getBanDescription (const std::string &ip_or_name)
 
bool denyIfBanned (session_t peer_id)
 
void notifyPlayer (const char *name, const std::wstring &msg)
 
void notifyPlayers (const std::wstring &msg)
 
void spawnParticle (const std::string &playername, const ParticleParameters &p)
 
u32 addParticleSpawner (const ParticleSpawnerParameters &p, ServerActiveObject *attached, const std::string &playername)
 
void deleteParticleSpawner (const std::string &playername, u32 id)
 
bool dynamicAddMedia (const DynamicMediaArgs &args)
 
ServerInventoryManagergetInventoryMgr () const
 
void sendDetachedInventory (Inventory *inventory, const std::string &name, session_t peer_id)
 
ServerScriptinggetScriptIface ()
 
bool rollbackRevertActions (const std::list< RollbackAction > &actions, std::list< std::string > *log)
 
virtual IItemDefManagergetItemDefManager ()
 
virtual const NodeDefManagergetNodeDefManager ()
 
virtual ICraftDefManagergetCraftDefManager ()
 
virtual u16 allocateUnknownNodeId (const std::string &name)
 
IRollbackManagergetRollbackManager ()
 
virtual EmergeManagergetEmergeManager ()
 
virtual ModStorageDatabasegetModStorageDatabase ()
 
IWritableItemDefManagergetWritableItemDefManager ()
 
NodeDefManagergetWritableNodeDefManager ()
 
IWritableCraftDefManagergetWritableCraftDefManager ()
 
virtual const std::vector< ModSpec > & getMods () const
 
virtual const ModSpecgetModSpec (const std::string &modname) const
 
virtual const SubgameSpecgetGameSpec () const
 
virtual std::string getWorldPath () const
 
virtual std::string getModDataPath () const
 
virtual ModIPCStoregetModIPCStore ()
 
bool isSingleplayer () const
 
void setStepSettings (StepSettings spdata)
 
StepSettings getStepSettings ()
 
void setAsyncFatalError (const std::string &error)
 
void setAsyncFatalError (const LuaError &e)
 
void addShutdownError (const ModError &e)
 
bool showFormspec (const char *name, const std::string &formspec, const std::string &formname)
 
MapgetMap ()
 
ServerEnvironmentgetEnv ()
 
v3f findSpawnPos ()
 
u32 hudAdd (RemotePlayer *player, HudElement *element)
 
bool hudRemove (RemotePlayer *player, u32 id)
 
bool hudChange (RemotePlayer *player, u32 id, HudElementStat stat, void *value)
 
bool hudSetFlags (RemotePlayer *player, u32 flags, u32 mask)
 
bool hudSetHotbarItemcount (RemotePlayer *player, s32 hotbar_itemcount)
 
void hudSetHotbarImage (RemotePlayer *player, const std::string &name)
 
void hudSetHotbarSelectedImage (RemotePlayer *player, const std::string &name)
 
Address getPeerAddress (session_t peer_id)
 
void setLocalPlayerAnimations (RemotePlayer *player, v2f animation_frames[4], f32 frame_speed)
 
void setPlayerEyeOffset (RemotePlayer *player, v3f first, v3f third, v3f third_front)
 
void setSky (RemotePlayer *player, const SkyboxParams &params)
 
void setSun (RemotePlayer *player, const SunParams &params)
 
void setMoon (RemotePlayer *player, const MoonParams &params)
 
void setStars (RemotePlayer *player, const StarParams &params)
 
void setClouds (RemotePlayer *player, const CloudParams &params)
 
void overrideDayNightRatio (RemotePlayer *player, bool do_override, float brightness)
 
void setLighting (RemotePlayer *player, const Lighting &lighting)
 
void peerAdded (con::IPeer *peer)
 
void deletingPeer (con::IPeer *peer, bool timeout)
 
void DenySudoAccess (session_t peer_id)
 
void DenyAccess (session_t peer_id, AccessDeniedCode reason, std::string_view custom_reason="", bool reconnect=false)
 
void kickAllPlayers (AccessDeniedCode reason, const std::string &str_reason, bool reconnect)
 
void acceptAuth (session_t peer_id, bool forSudoMode)
 
void DisconnectPeer (session_t peer_id)
 
bool getClientConInfo (session_t peer_id, con::rtt_stat_type type, float *retval)
 
bool getClientInfo (session_t peer_id, ClientInfo &ret)
 
const ClientDynamicInfogetClientDynamicInfo (session_t peer_id)
 
void printToConsoleOnly (const std::string &text)
 
void HandlePlayerHPChange (PlayerSAO *sao, const PlayerHPChangeReason &reason)
 
void SendPlayerHP (PlayerSAO *sao, bool effect)
 
void SendPlayerBreath (PlayerSAO *sao)
 
void SendInventory (RemotePlayer *player, bool incremental)
 
void SendMovePlayer (PlayerSAO *sao)
 
void SendMovePlayerRel (session_t peer_id, const v3f &added_pos)
 
void SendPlayerSpeed (session_t peer_id, const v3f &added_vel)
 
void SendPlayerFov (session_t peer_id)
 
void SendMinimapModes (session_t peer_id, std::vector< MinimapMode > &modes, size_t wanted_mode)
 
void sendDetachedInventories (session_t peer_id, bool incremental)
 
bool joinModChannel (const std::string &channel)
 
bool leaveModChannel (const std::string &channel)
 
bool sendModChannelMessage (const std::string &channel, const std::string &message)
 
ModChannelgetModChannel (const std::string &channel)
 
bool SendBlock (session_t peer_id, const v3s16 &blockpos)
 
TranslationsgetTranslationLanguage (const std::string &lang_code)
 
std::unordered_map< std::string, std::string > getMediaList ()
 
- Public Member Functions inherited from con::PeerHandler
 PeerHandler ()=default
 
virtual ~PeerHandler ()=default
 
- Public Member Functions inherited from IGameDef
IItemDefManageridef ()
 
const NodeDefManagerndef ()
 
ICraftDefManagercdef ()
 
IRollbackManagerrollback ()
 

Private Member Functions

void SendChatMessage (session_t peer_id, const ChatMessage &message)
 

Additional Inherited Members

- Static Public Member Functions inherited from Server
static std::string getBuiltinLuaPath ()
 
static ModStorageDatabaseopenModStorageDatabase (const std::string &world_path)
 
static ModStorageDatabaseopenModStorageDatabase (const std::string &backend, const std::string &world_path, const Settings &world_mt)
 
static bool migrateModStorageDatabase (const GameParams &game_params, const Settings &cmd_args)
 
static u16 getProtocolVersionMin ()
 
static u16 getProtocolVersionMax ()
 
- Public Attributes inherited from Server
std::vector< std::pair< std::string, std::string > > m_async_init_files
 
std::vector< std::pair< std::string, std::string > > m_mapgen_init_files
 
std::unique_ptr< PackedValuem_lua_globals_data
 
Address m_bind_addr
 
- Protected Attributes inherited from Server
std::unique_ptr< ServerScriptingm_script
 
std::unique_ptr< ServerModManagerm_modmgr
 

Constructor & Destructor Documentation

◆ MockServer()

MockServer::MockServer ( const std::string & path_world = "fakepath")
inline

Member Function Documentation

◆ createScripting()

void MockServer::createScripting ( )
inline

◆ SendChatMessage()

void MockServer::SendChatMessage ( session_t peer_id,
const ChatMessage & message )
inlineprivatevirtual

Reimplemented from Server.

◆ start()

void MockServer::start ( )
delete

◆ stop()

void MockServer::stop ( )
delete

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