R-Type
Networked shoot'em up built on Aegis2D
Loading...
Searching...
No Matches
rtype::RoomRules Struct Reference

How a room plays, chosen at its creation (CreateRoom, RFC section 3.6). More...

#include </__w/project-rtype/project-rtype/protocol/include/rtype/rooms.hpp>

Public Member Functions

bool operator== (const RoomRules &) const =default
 Field-by-field equality.
 

Public Attributes

std::uint8_t lives = 3
 Lives of each player, 1 to max_room_lives.
 
std::uint8_t difficulty = static_cast<std::uint8_t>(Difficulty::Normal)
 A Difficulty value.
 
std::string waves
 Name of the waves file to play, among those the server offers, without its .json; empty for the server's own.
 
std::uint8_t friendly_fire = 0
 1 if the players' missiles hit the other players, 0 if not.
 

Detailed Description

How a room plays, chosen at its creation (CreateRoom, RFC section 3.6).

The values are as received: the server checks them (SessionTable::create_room()).

Member Function Documentation

◆ operator==()

bool rtype::RoomRules::operator== ( const RoomRules &  ) const
default

Field-by-field equality.

Returns
true if every field is equal.

Member Data Documentation

◆ difficulty

std::uint8_t rtype::RoomRules::difficulty = static_cast<std::uint8_t>(Difficulty::Normal)

A Difficulty value.

◆ friendly_fire

std::uint8_t rtype::RoomRules::friendly_fire = 0

1 if the players' missiles hit the other players, 0 if not.

◆ lives

std::uint8_t rtype::RoomRules::lives = 3

Lives of each player, 1 to max_room_lives.

◆ waves

std::string rtype::RoomRules::waves

Name of the waves file to play, among those the server offers, without its .json; empty for the server's own.


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