46 lines
2.3 KiB
C#
46 lines
2.3 KiB
C#
namespace Server.Networking.Messages;
|
|
|
|
/// <summary>
|
|
/// OpCodes for Void Scavengers game - extends base OpCodes
|
|
/// </summary>
|
|
public static class GameOpCodes
|
|
{
|
|
// ===== Lobby/Matchmaking (400-419) =====
|
|
public const int LOBBY_JOIN = 400;
|
|
public const int LOBBY_JOIN_RESULT = 401;
|
|
public const int LOBBY_STATE = 402; // Periodic update of lobby players
|
|
public const int LOBBY_READY = 403;
|
|
public const int LOBBY_COUNTDOWN = 404; // Game starting in X seconds
|
|
public const int LOBBY_LEAVE = 405;
|
|
|
|
// ===== Game State (420-449) =====
|
|
public const int GAME_START = 420; // Server -> Client: Round begins
|
|
public const int GAME_STATE = 421; // Server -> Client: Full world snapshot
|
|
public const int GAME_TICK = 422; // Server -> Client: Delta update
|
|
public const int GAME_END = 423; // Server -> Client: Round over
|
|
public const int GAME_STATS = 424; // Server -> Client: End-of-round stats
|
|
|
|
// ===== Player Input (450-469) =====
|
|
public const int INPUT_MOVE = 450; // Client -> Server: Movement input
|
|
public const int INPUT_ACTION = 451; // Client -> Server: Use/Interact/Pickup
|
|
public const int INPUT_SHOOT = 452; // Client -> Server: Fire weapon
|
|
public const int INPUT_DROP = 453; // Client -> Server: Drop item
|
|
public const int INPUT_CRAFT = 454; // Client -> Server: Craft request
|
|
|
|
// ===== World Events (470-499) =====
|
|
public const int EVENT_SPAWN = 470; // Entity spawned
|
|
public const int EVENT_DESPAWN = 471; // Entity removed
|
|
public const int EVENT_DAMAGE = 472; // Damage dealt
|
|
public const int EVENT_DEATH = 473; // Player/entity died
|
|
public const int EVENT_PICKUP = 474; // Item picked up
|
|
public const int EVENT_PROJECTILE = 475; // Projectile created
|
|
public const int EVENT_EXPLOSION = 476; // Area effect
|
|
public const int EVENT_CRAFT_COMPLETE = 477; // Crafting finished
|
|
public const int EVENT_EXTRACT = 478; // Player extracted with loot
|
|
|
|
// ===== Chat/Social (500-509) =====
|
|
public const int CHAT_SEND = 500;
|
|
public const int CHAT_RECEIVE = 501;
|
|
public const int CHAT_PROXIMITY = 502; // Location-based chat
|
|
}
|