# garrus2142/slashers architecture

> Architecture diagram of the GitHub repository garrus2142/slashers, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/garrus2142/slashers
- Repository: https://github.com/garrus2142/slashers

## Overview

##### Main Components Structure

a) Gamemode Core Layer
- Core systems: rounds, class system, language system, and notifications
- Configuration and initialization flow

b) Modules Layer
- Gameplay Modules (antiafk, breakdoors, chasemode, stamina)
- UI Modules (f1menu, scoreboard, entityindicator)
- Player Mechanics (observer, shop, soundscape)
- /Round Control (votemap, workshop, goal)

c) Entities Layer
- Entities into categories:
- Weapons (TFA base weapons, custom weapons)
- Effects (muzzle flashes, impacts, tracers)
- Game Objects (generators, jerrycans, traps)

##### Component Relationships

- Dependencies between modules
- Inheritance relationships (especially for weapons and entities)

##### Detailed Elements

- Core gamemode hooks and lifecycle
- Player class system (survivors vs killers)
- Round management system
- Objective system (generators, radio, escape)
- Weapon and ability systems

##### Technical Details

Emphasize:
- Networking architecture for player states
- Entity replication system
- Sound and effect management
- -specific configurations
- Language system implementation

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core["Gamemode Core"]
        Init["init.lua"]:::server
        CLInit["cl_init.lua"]:::client
        Shared["shared.lua"]:::shared
        
        subgraph RoundSystem["Round System"]
            RoundsSV["sv_rounds.lua"]:::server
            RoundsCL["cl_rounds.lua"]:::client
            RoundsSH["sh_rounds.lua"]:::shared
        end
        
        subgraph ClassSystem["Class System"]
            ClassSV["sv_class.lua"]:::server
            ClassCL["cl_class.lua"]:::client
            ClassSH["sh_class.lua"]:::shared
        end
        
        subgraph LangSystem["Language System"]
            LangSV["sv_lang.lua"]:::server
            LangCL["cl_lang.lua"]:::client
            Languages["languages/"]:::shared
        end
        
        subgraph NotifSystem["Notification System"]
            NotifSV["sv_notification.lua"]:::server
            NotifCL["cl_notification.lua"]:::client
        end
    end
    
    subgraph Modules["Gameplay Modules"]
        subgraph GameplayCore["Core Gameplay"]
            AntiAFK["Anti-AFK"]:::module
            BreakDoors["Break Doors"]:::module
            ChaseMode["Chase Mode"]:::module
            Stamina["Stamina"]:::module
        end
        
        subgraph UI["User Interface"]
            F1Menu["F1 Menu"]:::ui
            Scoreboard["Scoreboard"]:::ui
            EntityIndicator["Entity Indicator"]:::ui
        end
        
        subgraph PlayerMech["Player Mechanics"]
            Observer["Observer"]:::module
            Shop["Shop System"]:::module
            Soundscape["Soundscape"]:::module
        end
        
        subgraph MapControl["Map Control"]
            VoteMap["Vote Map"]:::module
            Workshop["Workshop"]:::module
            Maps["Maps"]:::module
        end
    end
    
    subgraph Entities["Entity Systems"]
        subgraph GameObjects["Game Objects"]
            Generator["Generator"]:::entity
            Jerrican["Jerrican"]:::entity
            Radio["Radio"]:::entity
            BearTrap["Bear Trap"]:::entity
        end
        
        subgraph Weapons["Weapons"]
            TFAGun["TFA Gun Base"]:::weapon
            TFAKnife["TFA Knife Base"]:::weapon
            TFAMelee["TFA Melee Base"]:::weapon
        end
        
        subgraph Effects["Effects"]
            MuzzleFlash["Muzzle Flash"]:::effect
            BulletImpact["Bullet Impact"]:::effect
            Shell["Shell Effects"]:::effect
        end
    end
    
    %% Connections
    Init --> RoundsSV
    Init --> ClassSV
    Init --> LangSV
    Init --> NotifSV
    CLInit --> RoundsCL
    CLInit --> ClassCL
    CLInit --> LangCL
    CLInit --> NotifCL
    Shared --> RoundsSH
    Shared --> ClassSH
    
    %% Click events
    click Init "https://github.com/Garrus2142/Slashers/blob/master/gamemode/init.lua"
    click CLInit "https://github.com/Garrus2142/Slashers/blob/master/gamemode/cl_init.lua"
    click Shared "https://github.com/Garrus2142/Slashers/blob/master/gamemode/shared.lua"
    click RoundsSV "https://github.com/Garrus2142/Slashers/blob/master/gamemode/core/rounds/sv_rounds.lua"
    click RoundsCL "https://github.com/Garrus2142/Slashers/blob/master/gamemode/core/rounds/cl_rounds.lua"
    click RoundsSH "https://github.com/Garrus2142/Slashers/blob/master/gamemode/core/rounds/sh_rounds.lua"
    click ClassSV "https://github.com/Garrus2142/Slashers/blob/master/gamemode/core/class/sv_class.lua"
    click ClassCL "https://github.com/Garrus2142/Slashers/blob/master/gamemode/core/class/cl_class.lua"
    click ClassSH "https://github.com/Garrus2142/Slashers/blob/master/gamemode/core/class/sh_class.lua"
    click LangSV "https://github.com/Garrus2142/Slashers/blob/master/gamemode/core/lang/sv_lang.lua"
    click LangCL "https://github.com/Garrus2142/Slashers/blob/master/gamemode/core/lang/cl_lang.lua"
    click Languages "https://github.com/Garrus2142/Slashers/tree/master/gamemode/languages/"
    click NotifSV "https://github.com/Garrus2142/Slashers/blob/master/gamemode/core/notification/sv_notification.lua"
    click NotifCL "https://github.com/Garrus2142/Slashers/blob/master/gamemode/core/notification/cl_notification.lua"
    click AntiAFK "https://github.com/Garrus2142/Slashers/tree/master/gamemode/modules/antiafk/"
    click BreakDoors "https://github.com/Garrus2142/Slashers/tree/master/gamemode/modules/breakdoors/"
    click ChaseMode "https://github.com/Garrus2142/Slashers/tree/master/gamemode/modules/chasemode/"
    click Stamina "https://github.com/Garrus2142/Slashers/tree/master/gamemode/modules/stamina/"
    click F1Menu "https://github.com/Garrus2142/Slashers/tree/master/gamemode/modules/f1menu/"
    click Scoreboard "https://github.com/Garrus2142/Slashers/tree/master/gamemode/modules/scoreboard/"
    click EntityIndicator "https://github.com/Garrus2142/Slashers/tree/master/gamemode/modules/entityindicator/"
    click Observer "https://github.com/Garrus2142/Slashers/tree/master/gamemode/modules/observer/"
    click Shop "https://github.com/Garrus2142/Slashers/tree/master/gamemode/modules/shop/"
    click Soundscape "https://github.com/Garrus2142/Slashers/tree/master/gamemode/modules/soundscape/"
    click VoteMap "https://github.com/Garrus2142/Slashers/tree/master/gamemode/modules/votemap/"
    click Workshop "https://github.com/Garrus2142/Slashers/tree/master/gamemode/modules/workshop/"
    click Maps "https://github.com/Garrus2142/Slashers/tree/master/gamemode/maps/"
    click Generator "https://github.com/Garrus2142/Slashers/tree/master/entities/entities/sls_generator/"
    click Jerrican "https://github.com/Garrus2142/Slashers/tree/master/entities/entities/sls_jerrican/"
    click Radio "https://github.com/Garrus2142/Slashers/tree/master/entities/entities/sls_radio/"
    click BearTrap "https://github.com/Garrus2142/Slashers/tree/master/entities/entities/beartrap/"
    click TFAGun "https://github.com/Garrus2142/Slashers/tree/master/entities/weapons/tfa_gun_base/"
    click TFAKnife "https://github.com/Garrus2142/Slashers/tree/master/entities/weapons/tfa_knife_base/"
    click TFAMelee "https://github.com/Garrus2142/Slashers/tree/master/entities/weapons/tfa_nmrimelee_base/"
    click MuzzleFlash "https://github.com/Garrus2142/Slashers/tree/master/entities/effects/tfa_muzzleflash_generic/"
    click BulletImpact "https://github.com/Garrus2142/Slashers/tree/master/entities/effects/tfa_bullet_impact/"
    click Shell "https://github.com/Garrus2142/Slashers/tree/master/entities/effects/tfa_shell/"
    
    %% Styles
    classDef server fill:#ff6b6b
    classDef client fill:#4ecdc4
    classDef shared fill:#95a5a6
    classDef module fill:#f39c12
    classDef ui fill:#3498db
    classDef entity fill:#2ecc71
    classDef weapon fill:#e74c3c
    classDef effect fill:#9b59b6
```
