Ejemplo n.º 1
0
        /// <summary>
        /// Prepares the CVar system, generating default CVars.
        /// </summary>
        public static void Init(Outputter output)
        {
            system = new CVarSystem(output);

            // System CVars
            s_filepath = Register("s_filepath", FileHandler.BaseDirectory, CVarFlag.Textual | CVarFlag.ReadOnly); // The current system environment filepath (The directory of /data).
            // Game CVars
            g_fps = Register("g_fps", "40", CVarFlag.Numeric);                                                    // What tickrate to use for the general game tick.
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Prepares the CVar system, generating default CVars.
        /// </summary>
        public static void Init(Outputter output)
        {
            system = new CVarSystem(output);

            // System CVars
            s_filepath = Register("s_filepath", FileHandler.BaseDirectory, CVarFlag.Textual | CVarFlag.ReadOnly); // The current system environment filepath (The directory of /data).
            // Network CVars
            n_first = Register("n_first", "ipv4", CVarFlag.Textual);                                              // Whether to prefer IPv4 or IPv6.
            // Renderer CVars
            r_fullscreen   = Register("r_fullscreen", "false", CVarFlag.Boolean | CVarFlag.Delayed);              // Whether to use fullscreen mode.
            r_width        = Register("r_width", "800", CVarFlag.Numeric | CVarFlag.Delayed);                     // What width the window should be.
            r_height       = Register("r_height", "600", CVarFlag.Numeric | CVarFlag.Delayed);                    // What height the window should be.
            r_antialiasing = Register("r_antialiasing", "2", CVarFlag.Numeric | CVarFlag.Delayed);                // What AA mode to use (0 = none).
            // UI CVars
            u_mouse_sensitivity = Register("u_mouse_sensitivity", "1", CVarFlag.Numeric);                         // How sensitive the mouse is.
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Prepares the CVar system, generating default CVars.
        /// </summary>
        public void Init(Server tserver, Outputter output)
        {
            system = new CVarSystem(output);

            // System CVars
            s_filepath = Register("s_filepath", tserver.Files.BaseDirectory, CVarFlag.Textual | CVarFlag.ReadOnly, "The current system environment filepath (The directory of /data)."); // TODO: Scrap this! Tags!
            s_debug    = Register("s_debug", "true", CVarFlag.Boolean, "Whether to output debug information.");
            // Game CVars
            //g_timescale = Register("g_timescale", "1", CVarFlag.Numeric, "The current game time scaling value.");
            g_fps              = Register("g_fps", "30", CVarFlag.Numeric, "What framerate to use.");
            g_maxheight        = Register("g_maxheight", "5000", CVarFlag.Numeric, "What the highest possible Z coordinate should be (for building).");   // TODO: Also per-world?
            g_minheight        = Register("g_minheight", "-5000", CVarFlag.Numeric, "What the lowest possible Z coordinate should be (for building).");   // TODO: Also per-world?
            g_maxdist          = Register("g_maxdist", "100000000", CVarFlag.Numeric, "How far on the X or Y axis a player may travel from the origin."); // TODO: Also per-world?
            g_maxrenderdist    = Register("g_maxrenderdist", "6", CVarFlag.Numeric, "How high a client can set their render dist to.");
            g_maxlodrenderdist = Register("g_maxlodrenderdist", "20", CVarFlag.Numeric, "How high a client can set their LOD render dist to.");
            // Network CVars
            n_verifyip      = Register("n_verifyip", "true", CVarFlag.Boolean, "Whether to verify connecting users' IP addresses with the global server. Disabling this may help allow LAN connections.");
            n_chunkspertick = Register("n_chunkspertick", "2", CVarFlag.Numeric, "How many chunks can be sent in a single server tick, per player.");
            n_online        = Register("n_online", "true", CVarFlag.Boolean, "Whether the server with authorize connections against the global server. Disable this if you want to play singleplayer without a live internet connection.");
            // Text CVars
            t_translateurls = Register("t_translateurls", "true", CVarFlag.Boolean, "Whether to automatically translate URLs posted in chat.");
            t_blockurls     = Register("t_blockurls", "false", CVarFlag.Boolean, "Whether to block URLs as input to chat.");
            t_blockcolors   = Register("t_blockcolors", "false", CVarFlag.Boolean, "Whether to block colors as input to chat.");
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Prepares the CVar system, generating default CVars.
        /// </summary>
        public void Init(Server tserver, Outputter output)
        {
            system = new CVarSystem(output);

            // System CVars
            s_filepath = Register("s_filepath", tserver.Files.BaseDirectory, CVarFlag.Textual | CVarFlag.ReadOnly, "The current system environment filepath (The directory of /data)."); // TODO: Scrap this! Tags!
            s_debug = Register("s_debug", "true", CVarFlag.Boolean, "Whether to output debug information.");
            // Game CVars
            //g_timescale = Register("g_timescale", "1", CVarFlag.Numeric, "The current game time scaling value.");
            g_fps = Register("g_fps", "30", CVarFlag.Numeric, "What framerate to use.");
            g_maxheight = Register("g_maxheight", "5000", CVarFlag.Numeric, "What the highest possible Z coordinate should be (for building)."); // TODO: Also per-world?
            g_minheight = Register("g_minheight", "-5000", CVarFlag.Numeric, "What the lowest possible Z coordinate should be (for building)."); // TODO: Also per-world?
            g_maxdist = Register("g_maxdist", "50000", CVarFlag.Numeric, "How far on the X or Y axis a player may travel from the origin."); // TODO: Also per-world?
            g_renderblocks = Register("g_renderblocks", "false", CVarFlag.Boolean, "Whether to render blocks for mapping purposes."); // TODO: Also per-world?
            // Network CVars
            n_verifyip = Register("n_verifyip", "true", CVarFlag.Boolean, "Whether to verify connecting users' IP addresses with the global server. Disabling this may help allow LAN connections.");
            n_rendersides = Register("n_rendersides", "false", CVarFlag.Boolean, "Whether to render the side-on map view for the linked webpage."); // TODO: Also per-world?
            n_chunkspertick = Register("n_chunkspertick", "15", CVarFlag.Numeric, "How many chunks can be sent in a single server tick, per player.");
            n_online = Register("n_online", "true", CVarFlag.Boolean, "Whether the server with authorize connections against the global server. Disable this if you want to play singleplayer without a live internet connection.");
            // Text CVars
            t_translateurls = Register("t_translateurls", "true", CVarFlag.Boolean, "Whether to automatically translate URLs posted in chat.");
            t_blockurls = Register("t_blockurls", "false", CVarFlag.Boolean, "Whether to block URLs as input to chat.");
            t_blockcolors = Register("t_blockcolors", "false", CVarFlag.Boolean, "Whether to block colors as input to chat.");
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Prepares the CVar system, generating default CVars.
 /// </summary>
 public void Init(Server tserver, Outputter output)
 {
     system = new CVarSystem(output);
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Prepares the CVar system, generating default CVars.
        /// </summary>
        public void Init(Client tclient, Outputter output)
        {
            // TODO: Organize this mess!
            system = new CVarSystem(output);

            // System CVars
            s_filepath   = Register("s_filepath", tclient.Files.BaseDirectory, CVarFlag.Textual | CVarFlag.ReadOnly, "The current system environment filepath (The directory of /data)."); // TODO: Tag!
            s_glversion  = Register("s_glversion", "UNKNOWN", CVarFlag.Textual | CVarFlag.ReadOnly, "What version of OpenGL is in use.");
            s_glrenderer = Register("s_glrenderer", "UNKNOWN", CVarFlag.Textual | CVarFlag.ReadOnly, "What renderer for OpenGL is in use.");
            s_glvendor   = Register("s_glvendor", "UNKNOWN", CVarFlag.Textual | CVarFlag.ReadOnly, "What graphics card vendor made the device being used for rendering.");
            // Game CVars
            g_timescale   = Register("g_timescale", "1", CVarFlag.Numeric | CVarFlag.ServerControl, "The current game time scale value.");
            g_firstperson = Register("g_firstperson", "true", CVarFlag.Boolean, "Whether to be in FirstPerson view mode.");
            g_weathermode = Register("g_weathermode", "0", CVarFlag.Numeric | CVarFlag.ServerControl, "What weather mode is currently shown. 0 = none, 1 = rain, 2 = snow.");
            // Network CVars
            n_first          = Register("n_first", "ipv4", CVarFlag.Textual, "Whether to prefer IPv4 or IPv6.");
            n_debugmovement  = Register("n_debugmovement", "false", CVarFlag.Boolean, "Whether to debug movement networking.");
            n_ourvehiclelerp = Register("n_ourvehiclelerp", "0.1", CVarFlag.Numeric, "How strongly to lerp our own vehicle's movement.");
            n_online         = Register("n_online", "true", CVarFlag.Boolean, "Whether to only connect to servers with a valid login key. Disable this to play singleplayer without internet.");
            // Renderer CVars
            r_fullscreen         = Register("r_fullscreen", "false", CVarFlag.Boolean | CVarFlag.Delayed, "Whether to use fullscreen mode.");
            r_width              = Register("r_width", "1280", CVarFlag.Numeric | CVarFlag.Delayed, "What width the window should be.");
            r_height             = Register("r_height", "720", CVarFlag.Numeric | CVarFlag.Delayed, "What height the window should be.");
            r_vsync              = Register("r_vsync", "false", CVarFlag.Boolean, "Whether to use vertical synchronization mode.");
            r_lighting           = Register("r_lighting", "true", CVarFlag.Boolean, "Whether to enable 3D lighting (Otherwise, use FullBright).");
            r_brighttransp       = Register("r_brighttransp", "true", CVarFlag.Boolean, "Whether transparent objects should be 'bright' or 'normal'.");
            r_decals             = Register("r_decals", "true", CVarFlag.Boolean, "Whether to render decals at all.");
            r_renderwireframe    = Register("r_renderwireframe", "false", CVarFlag.Boolean, "Whether to render a wireframe.");
            r_fov                = Register("r_fov", "70", CVarFlag.Numeric, "What Field of Vision range value to use.");
            r_znear              = Register("r_znear", "0.1", CVarFlag.Numeric, "How close the near plane should be to the camera.");
            r_renderdist         = Register("r_renderdist", "3", CVarFlag.Numeric, "The maximum distance, in chunks, a chunk can be from you for it to render.");
            r_renderdist_2       = Register("r_renderdist_2", "1", CVarFlag.Numeric, "Base RenderDist + this = how far a LOD2 chunk can be from you.");
            r_renderdist_2h      = Register("r_renderdist_2h", "1", CVarFlag.Numeric, "Base RenderDist + this = how far (Height-wise) a LOD2 chunk can be from you.");
            r_renderdist_5       = Register("r_renderdist_5", "2", CVarFlag.Numeric, "Base RenderDist + this = how far a LOD5 chunk can be from you.");
            r_renderdist_5h      = Register("r_renderdist_5h", "2", CVarFlag.Numeric, "Base RenderDist + this = how far (Height-wise) a LOD5 chunk can be from you.");
            r_renderdist_6       = Register("r_renderdist_6", "6", CVarFlag.Numeric, "Base RenderDist + this = how far a LOD6 chunk can be from you.");
            r_renderdist_15      = Register("r_renderdist_15", "10", CVarFlag.Numeric, "Base RenderDist + this = how far a LOD15 chunk can be from you.");
            r_dof_strength       = Register("r_dof_strength", "4", CVarFlag.Numeric, "How strong the Depth Of Field effect should be.");
            r_maxfps             = Register("r_maxfps", "600", CVarFlag.Numeric | CVarFlag.Delayed, "What the FPS cap should be.");
            r_drawself           = Register("r_drawself", "true", CVarFlag.Boolean, "Whether the player entity should be visible.");
            r_firemode           = Register("r_firemode", "0", CVarFlag.Numeric, "What mode to display fire as (0 = simple, 1 = dense).");
            r_dynamicshadows     = Register("r_dynamicshadows", "true", CVarFlag.Boolean, "Whether dynamic objects should ever cast shadows.");
            r_ssao               = Register("r_ssao", "true", CVarFlag.Boolean, "Whether SSAO (Ambient Occlusion) should be used.");
            r_particles          = Register("r_particles", "true", CVarFlag.Boolean, "Whether to render any particle effects.");
            r_drawchunks         = Register("r_drawchunks", "true", CVarFlag.Boolean, "Whether to draw any chunks at all.");
            r_drawents           = Register("r_drawents", "true", CVarFlag.Boolean, "Whether to draw any entities at all.");
            r_lightmaxdistance   = Register("r_lightmaxdistance", "35", CVarFlag.Numeric, "How far away a light can be from the camera before it is disabled.");
            r_shadowquality      = Register("r_shadowquality", "1024", CVarFlag.Numeric, "What texture size to use for shadow maps.");
            r_shadowblur         = Register("r_shadowblur", "0.25", CVarFlag.Numeric, "What factor to use for shadow blurring. Smaller = blurrier.");
            r_shadowpace         = Register("r_shadowpace", "1", CVarFlag.Numeric, "How rapidly to rerender shadows, in frames.");
            r_shadows            = Register("r_shadows", "false", CVarFlag.Boolean, "Whether to render shadows at all.");
            r_cloudshadows       = Register("r_cloudshadows", "false", CVarFlag.Boolean, "Whether to display shadows from clouds.");
            r_good_graphics      = Register("r_good_graphics", "true", CVarFlag.Boolean | CVarFlag.Delayed, "Whether to use 'good' graphics."); // TODO: Callback to auto-set
            r_skybox             = Register("r_skybox", "default", CVarFlag.ServerControl | CVarFlag.Textual, "What skybox to use.");
            r_blocktexturelinear = Register("r_blocktexturelinear", "true", CVarFlag.Boolean | CVarFlag.Delayed, "Whether block textures are to use a linear blur or nearest-pixel mode.");
            r_blocktexturewidth  = Register("r_blocktexturewidth", "256", CVarFlag.Numeric | CVarFlag.Delayed, "What texture width (pixels) block textures should use.");
            r_toonify            = Register("r_toonify", "false", CVarFlag.Boolean, "Whether to use a 'toonify' post-processing effect.");
            r_transplighting     = Register("r_transplighting", "true", CVarFlag.Boolean, "Whether transparent objects should be lit properly (otherwise, fullbright).");
            r_transpshadows      = Register("r_transpshadows", "false", CVarFlag.Boolean, "Whether transparent objects should be lit using HD shadows (Requires r_shadows true).");
            r_3d_enable          = Register("r_3d_enable", "false", CVarFlag.Boolean, "Whether to use 3D side-by-side rendering mode.");
            r_fast               = Register("r_fast", "false", CVarFlag.Boolean, "Whether to use 'fast' rendering mode.");
            r_chunksatonce       = Register("r_chunksatonce", "10", CVarFlag.Numeric, "How many chunks can render at once.");
            r_chunkoverrender    = Register("r_chunkoverrender", "true", CVarFlag.Boolean, "Whether to render chunks more often for quality's sake, at risk of performance.");
            r_transpll           = Register("r_transpll", "false", CVarFlag.Boolean, "Whether to use GPU linked lists when rendering transparent objects.");
            r_noblockshapes      = Register("r_noblockshapes", "false", CVarFlag.Boolean, "Whether block shapes are disabled or not.");
            r_treeshadows        = Register("r_treeshadows", "true", CVarFlag.Boolean, "Whether trees cast shadows.");
            r_godrays            = Register("r_godrays", "true", CVarFlag.Boolean, "Whether to render GodRays (rays of light from the sun.");
            r_hdr                = Register("r_hdr", "true", CVarFlag.Boolean, "Whether to render with high dynamic range adjustments enabled.");
            r_clouds             = Register("r_clouds", "true", CVarFlag.Boolean, "Whether to render clouds."); // TODO: Inform the server of this to reduce bandwidth.
            r_motionblur         = Register("r_motionblur", "false", CVarFlag.Boolean, "Whether to blur the screen to better represent motion.");
            r_plants             = Register("r_plants", "true", CVarFlag.Boolean, "Whether to render small plants around the view.");
            r_exposure           = Register("r_exposure", "1.5", CVarFlag.Numeric, "What value to scale the lighting by.");
            r_grayscale          = Register("r_grayscale", "false", CVarFlag.Boolean, "Whether to grayscale the view.");
            r_vrscale            = Register("r_vrscale", "1", CVarFlag.Numeric, "What scale to put everything at in VR mode.");
            r_fog                = Register("r_fog", "false", CVarFlag.Boolean, "Whether render fog should be defaultly enabled at distance.");
            r_forward_normals    = Register("r_forward_normals", "true", CVarFlag.Boolean | CVarFlag.Delayed, "Whether forward mode rendering should calculate normal-map effects.");
            r_forward_lights     = Register("r_forward_lights", "true", CVarFlag.Boolean | CVarFlag.Delayed, "Whether forward mode rendering should calculate live lighting effects.");
            r_forward_shadows    = Register("r_forward_shadows", "false", CVarFlag.Boolean | CVarFlag.Delayed, "Whether forward mode rendering should calculate dynamic shadow effects.");
            r_block_mipmaps      = Register("r_block_mipmaps", "true", CVarFlag.Boolean | CVarFlag.Delayed, "Whether mipmaps should be enabled for block textures.");
            r_slodsmoothing      = Register("r_slodsmoothing", "false", CVarFlag.Boolean, "Whether to smooth out SLOD chunks.");
            // Audio CVars
            a_musicvolume     = Register("a_musicvolume", "0.5", CVarFlag.Numeric, "What volume the music should be.");
            a_musicpitch      = Register("a_musicpitch", "1", CVarFlag.Numeric, "What pitch the music should be.");
            a_globalvolume    = Register("a_globalvolume", "1", CVarFlag.Numeric, "What volume all sounds should be.");
            a_globalpitch     = Register("a_globalpitch", "1", CVarFlag.Numeric, "What pitch all sounds should be.");
            a_music           = Register("a_music", "music/epic/bcvoxalia_adventure", CVarFlag.Textual | CVarFlag.ServerControl, "What music should be played.");
            a_quietondeselect = Register("a_quietondeselect", "true", CVarFlag.Boolean, "Whether to quiet music when the window is deselected.");
            a_echovolume      = Register("a_echovolume", "0", CVarFlag.Numeric, "What volume to echo microphone pickup at, for audio testing purposes. Specify 0 to not listen to the microphone at all.");
            a_enforce         = Register("a_enforce", "true", CVarFlag.Boolean, "Whether to use the audio enforcement mode.");
            a_left            = Register("a_left", "true", CVarFlag.Boolean, "Whether to play left-channel audio (when audio enforce is enabled).");
            a_right           = Register("a_right", "true", CVarFlag.Boolean, "Whether to play right-channel audio (when audio enforce is enabled).");
            // UI CVars
            u_mouse_sensitivity     = Register("u_mouse_sensitivity", "1", CVarFlag.Numeric, "How sensitive the mouse is.");
            u_reticle               = Register("u_reticle", "1", CVarFlag.Textual, "What reticle to use.");
            u_reticlescale          = Register("u_reticlescale", "32", CVarFlag.Numeric, "How big the reticle should be.");
            u_showhud               = Register("u_showhud", "true", CVarFlag.Boolean, "Whether to render the HUD.");
            u_highlight_targetblock = Register("u_highlight_targetblock", "true", CVarFlag.Boolean, "Whether to highlight the targeted block.");
            u_highlight_placeblock  = Register("u_highlight_placeblock", "true", CVarFlag.Boolean, "Whether to highlight the targeted placement block.");
            u_debug           = Register("u_debug", "false", CVarFlag.Boolean, "Whether to display debug information on the HUD.");
            u_showmap         = Register("u_showmap", "false", CVarFlag.Boolean | CVarFlag.ServerControl, "Whether to display a map on the HUD.");
            u_showrangefinder = Register("u_showrangefinder", "false", CVarFlag.Boolean | CVarFlag.ServerControl, "Whether to display a range finder on the HUD.");
            u_showping        = Register("u_showping", "true", CVarFlag.Boolean, "Whether to display the current ping on the UI.");
            u_showcompass     = Register("u_showcompass", "false", CVarFlag.Boolean | CVarFlag.ServerControl, "Whether to display a compass on the HUD.");
            u_colortyping     = Register("u_colortyping", "false", CVarFlag.Boolean, "Whether to color the text currently being typed typed (chat, console, ...).");
            u_rate            = Register("u_rate", "3", CVarFlag.Numeric, "How many frames between UI updates.");
        }
 public UnturnedFreneticCVars(UnturnedFreneticOutputter output)
 {
     System = new CVarSystem(output);
 }
Ejemplo n.º 8
0
        /// <summary>
        /// Prepares the CVar system, generating default CVars.
        /// </summary>
        public void Init(Client tclient, Outputter output)
        {
            system = new CVarSystem(output);

            // System CVars
            s_filepath   = Register("s_filepath", tclient.Files.BaseDirectory, CVarFlag.Textual | CVarFlag.ReadOnly, "The current system environment filepath (The directory of /data)."); // TODO: Tag!
            s_glversion  = Register("s_glversion", "UNKNOWN", CVarFlag.Textual | CVarFlag.ReadOnly, "What version of OpenGL is in use.");
            s_glrenderer = Register("s_glrenderer", "UNKNOWN", CVarFlag.Textual | CVarFlag.ReadOnly, "What renderer for OpenGL is in use.");
            s_glvendor   = Register("s_glvendor", "UNKNOWN", CVarFlag.Textual | CVarFlag.ReadOnly, "What graphics card vendor made the device being used for rendering.");
            // Game CVars
            g_timescale   = Register("g_timescale", "1", CVarFlag.Numeric | CVarFlag.ServerControl, "The current game time scale value.");
            g_firstperson = Register("g_firstperson", "true", CVarFlag.Boolean, "Whether to be in FirstPerson view mode.");
            g_weathermode = Register("g_weathermode", "0", CVarFlag.Numeric | CVarFlag.ServerControl, "What weather mode is currently shown. 0 = none, 1 = rain, 2 = snow.");
            // Network CVars
            n_first                = Register("n_first", "ipv4", CVarFlag.Textual, "Whether to prefer IPv4 or IPv6.");
            n_debugmovement        = Register("n_debugmovement", "false", CVarFlag.Boolean, "Whether to debug movement networking.");
            n_movement_maxdistance = Register("n_movement_maxdistance", "20", CVarFlag.Numeric, "How far apart the client can move from the serverside player before snapping to the correct location.");
            n_movement_adjustment  = Register("n_movement_adjustment", "0.1", CVarFlag.Numeric, "How rapidly to adjust the player's position to better match the server. Smaller numbers yield quicker results.");
            n_movemode             = Register("n_movemode", "2", CVarFlag.Numeric, "Which movement mode to use. 1 = run-and-adjust, 2 = back-trace.");
            n_ourvehiclelerp       = Register("n_ourvehiclelerp", "0.1", CVarFlag.Numeric, "How strongly to lerp our own vehicle's movement.");
            n_online               = Register("n_online", "true", CVarFlag.Boolean, "Whether to only connect to servers with a valid login key. Disable this to play singleplayer without internet.");
            // Renderer CVars
            r_fullscreen         = Register("r_fullscreen", "false", CVarFlag.Boolean | CVarFlag.Delayed, "Whether to use fullscreen mode.");
            r_width              = Register("r_width", "1280", CVarFlag.Numeric | CVarFlag.Delayed, "What width the window should be.");
            r_height             = Register("r_height", "720", CVarFlag.Numeric | CVarFlag.Delayed, "What height the window should be.");
            r_vsync              = Register("r_vsync", "true", CVarFlag.Boolean, "Whether to use vertical synchronization mode.");
            r_lighting           = Register("r_lighting", "true", CVarFlag.Boolean, "Whether to enable 3D lighting (Otherwise, use FullBright).");
            r_renderwireframe    = Register("r_renderwireframe", "false", CVarFlag.Boolean, "Whether to render a wireframe.");
            r_fov                = Register("r_fov", "70", CVarFlag.Numeric, "What Field of Vision range value to use.");
            r_znear              = Register("r_znear", "0.1", CVarFlag.Numeric, "How close the near plane should be to the camera.");
            r_zfar               = Register("r_zfar", "3500", CVarFlag.Numeric, "How far the far plane should be from the camera.");
            r_dof_strength       = Register("r_dof_strength", "4", CVarFlag.Numeric, "How strong the Depth Of Field effect should be.");
            r_maxfps             = Register("r_maxfps", "60", CVarFlag.Numeric | CVarFlag.Delayed, "What the FPS cap should be.");
            r_lightmaxdistance   = Register("r_lightmaxdistance", "35", CVarFlag.Numeric, "How far away a light can be from the camera before it is disabled.");
            r_fallbacklighting   = Register("r_fallbacklighting", "true", CVarFlag.Boolean, "Whether to calculate fallback block lighting (Requires chunk reload).");
            r_shadowquality      = Register("r_shadowquality", "1024", CVarFlag.Numeric, "What texture size to use for shadow maps.");
            r_shadowblur         = Register("r_shadowblur", "0.25", CVarFlag.Numeric, "What factor to use for shadow blurring. Smaller = blurrier.");
            r_shadowpace         = Register("r_shadowpace", "1", CVarFlag.Numeric, "How rapidly to rerender shadows, in frames.");
            r_shadows            = Register("r_shadows", "false", CVarFlag.Boolean, "Whether to render shadows at all.");
            r_cloudshadows       = Register("r_cloudshadows", "false", CVarFlag.Boolean, "Whether to display shadows from clouds.");
            r_good_graphics      = Register("r_good_graphics", "true", CVarFlag.Boolean | CVarFlag.Delayed, "Whether to use 'good' graphics."); // TODO: Callback to auto-set
            r_skybox             = Register("r_skybox", "default", CVarFlag.ServerControl | CVarFlag.Textual, "What skybox to use.");
            r_blocktexturelinear = Register("r_blocktexturelinear", "true", CVarFlag.Boolean | CVarFlag.Delayed, "Whether block textures are to use a linear blur or nearest-pixel mode.");
            r_blocktexturewidth  = Register("r_blocktexturewidth", "256", CVarFlag.Numeric | CVarFlag.Delayed, "What texture width (pixels) block textures should use.");
            r_toonify            = Register("r_toonify", "false", CVarFlag.Boolean, "Whether to use a 'toonify' post-processing effect.");
            r_transplighting     = Register("r_transplighting", "true", CVarFlag.Boolean, "Whether transparent objects should be lit properly (otherwise, fullbright).");
            r_transpshadows      = Register("r_transpshadows", "false", CVarFlag.Boolean, "Whether transparent objects should be lit using HD shadows (Requires r_shadows true).");
            r_3d_enable          = Register("r_3d_enable", "false", CVarFlag.Boolean, "Whether to use 3D side-by-side rendering mode.");
            r_fast               = Register("r_fast", "false", CVarFlag.Boolean, "Whether to use 'fast' rendering mode.");
            r_chunksatonce       = Register("r_chunksatonce", "100", CVarFlag.Numeric, "How many chunks can render at once.");
            r_chunkoverrender    = Register("r_chunkoverrender", "true", CVarFlag.Boolean, "Whether to render chunks more often for quality's sake, at risk of performance.");
            r_transpll           = Register("r_transpll", "false", CVarFlag.Boolean, "Whether to use GPU linked lists when rendering transparent objects.");
            r_noblockshapes      = Register("r_noblockshapes", "false", CVarFlag.Boolean, "Whether block shapes are disabled or not.");
            r_treeshadows        = Register("r_treeshadows", "true", CVarFlag.Boolean, "Whether trees cast shadows.");
            r_godrays            = Register("r_godrays", "true", CVarFlag.Boolean, "Whether to render GodRays (rays of light from the sun."); // TODO: Validate?
            r_hdr                = Register("r_hdr", "true", CVarFlag.Boolean, "Whether to render with high dynamic range adjustments enabled.");
            r_chunkmarch         = Register("r_chunkmarch", "false", CVarFlag.Boolean, "Whether to use 'chunk marching' method to render chunks (if false, uses a generic loop).");
            r_clouds             = Register("r_clouds", "true", CVarFlag.Boolean, "Whether to render clouds."); // TODO: Inform the server of this to reduce bandwidth.
            r_motionblur         = Register("r_motionblur", "false", CVarFlag.Boolean, "Whether to blur the screen to better represent motion.");
            r_plants             = Register("r_plants", "true", CVarFlag.Boolean, "Whether to render small plants around the view.");
            // Audio CVars
            a_musicvolume     = Register("a_musicvolume", "0.5", CVarFlag.Numeric, "What volume the music should be.");
            a_musicpitch      = Register("a_musicpitch", "1", CVarFlag.Numeric, "What pitch the music should be.");
            a_globalvolume    = Register("a_globalvolume", "1", CVarFlag.Numeric, "What volume all sounds should be.");
            a_globalpitch     = Register("a_globalpitch", "1", CVarFlag.Numeric, "What pitch all sounds should be.");
            a_music           = Register("a_music", "music/epic/bcvoxalia_adventure", CVarFlag.Textual | CVarFlag.ServerControl, "What music should be played.");
            a_quietondeselect = Register("a_quietondeselect", "true", CVarFlag.Boolean, "Whether to quiet music when the window is deselected.");
            a_echovolume      = Register("a_echovolume", "0", CVarFlag.Numeric, "What volume to echo microphone pickup at, for audio testing purposes. Specify 0 to not listen to the microphone at all.");
            // UI CVars
            u_mouse_sensitivity     = Register("u_mouse_sensitivity", "1", CVarFlag.Numeric, "How sensitive the mouse is.");
            u_reticle               = Register("u_reticle", "1", CVarFlag.Textual, "What reticle to use.");
            u_reticlescale          = Register("u_reticlescale", "32", CVarFlag.Numeric, "How big the reticle should be.");
            u_showhud               = Register("u_showhud", "true", CVarFlag.Boolean, "Whether to render the HUD.");
            u_highlight_targetblock = Register("u_highlight_targetblock", "true", CVarFlag.Boolean, "Whether to highlight the targeted block.");
            u_highlight_placeblock  = Register("u_highlight_placeblock", "true", CVarFlag.Boolean, "Whether to highlight the targeted placement block.");
            u_debug           = Register("u_debug", "false", CVarFlag.Boolean, "Whether to display debug information on the HUD.");
            u_showmap         = Register("u_showmap", "false", CVarFlag.Boolean | CVarFlag.ServerControl, "Whether to display a map on the HUD.");
            u_showrangefinder = Register("u_showrangefinder", "false", CVarFlag.Boolean | CVarFlag.ServerControl, "Whether to display a range finder on the HUD.");
            u_showping        = Register("u_showping", "true", CVarFlag.Boolean, "Whether to display the current ping on the UI.");
            u_showcompass     = Register("u_showcompass", "false", CVarFlag.Boolean | CVarFlag.ServerControl, "Whether to display a compass on the HUD.");
            u_colortyping     = Register("u_colortyping", "false", CVarFlag.Boolean, "Whether to color the text currently being typed typed (chat, console, ...).");
        }
 public UnturnedFreneticCVars(UnturnedFreneticOutputter output)
 {
     System = new CVarSystem(output);
 }
Ejemplo n.º 10
0
        /// <summary>
        /// Prepares the CVar system, generating default CVars.
        /// </summary>
        public void Init(Client tclient, Outputter output)
        {
            system = new CVarSystem(output);

            // System CVars
            s_filepath = Register("s_filepath", tclient.Files.BaseDirectory, CVarFlag.Textual | CVarFlag.ReadOnly, "The current system environment filepath (The directory of /data)."); // TODO: Tag!
            s_glversion = Register("s_glversion", "UNKNOWN", CVarFlag.Textual | CVarFlag.ReadOnly, "What version of OpenGL is in use.");
            s_glrenderer = Register("s_glrenderer", "UNKNOWN", CVarFlag.Textual | CVarFlag.ReadOnly, "What renderer for OpenGL is in use.");
            s_glvendor = Register("s_glvendor", "UNKNOWN", CVarFlag.Textual | CVarFlag.ReadOnly, "What graphics card vendor made the device being used for rendering.");
            // Game CVars
            g_timescale = Register("g_timescale", "1", CVarFlag.Numeric | CVarFlag.ServerControl, "The current game time scale value.");
            g_firstperson = Register("g_firstperson", "true", CVarFlag.Boolean, "Whether to be in FirstPerson view mode.");
            g_weathermode = Register("g_weathermode", "0", CVarFlag.Numeric | CVarFlag.ServerControl, "What weather mode is currently shown. 0 = none, 1 = rain, 2 = snow.");
            // Network CVars
            n_first = Register("n_first", "ipv4", CVarFlag.Textual, "Whether to prefer IPv4 or IPv6.");
            n_debugmovement = Register("n_debugmovement", "false", CVarFlag.Boolean, "Whether to debug movement networking.");
            n_movement_maxdistance = Register("n_movement_maxdistance", "20", CVarFlag.Numeric, "How far apart the client can move from the serverside player before snapping to the correct location.");
            n_movement_adjustment = Register("n_movement_adjustment", "0.1", CVarFlag.Numeric, "How rapidly to adjust the player's position to better match the server. Smaller numbers yield quicker results.");
            n_movemode = Register("n_movemode", "2", CVarFlag.Numeric, "Which movement mode to use. 1 = run-and-adjust, 2 = back-trace.");
            n_ourvehiclelerp = Register("n_ourvehiclelerp", "0.1", CVarFlag.Numeric, "How strongly to lerp our own vehicle's movement.");
            n_online = Register("n_online", "true", CVarFlag.Boolean, "Whether to only connect to servers with a valid login key. Disable this to play singleplayer without internet.");
            // Renderer CVars
            r_fullscreen = Register("r_fullscreen", "false", CVarFlag.Boolean | CVarFlag.Delayed, "Whether to use fullscreen mode.");
            r_width = Register("r_width", "1280", CVarFlag.Numeric | CVarFlag.Delayed, "What width the window should be.");
            r_height = Register("r_height", "720", CVarFlag.Numeric | CVarFlag.Delayed, "What height the window should be.");
            r_vsync = Register("r_vsync", "true", CVarFlag.Boolean, "Whether to use vertical synchronization mode.");
            r_lighting = Register("r_lighting", "true", CVarFlag.Boolean, "Whether to enable 3D lighting (Otherwise, use FullBright).");
            r_renderwireframe = Register("r_renderwireframe", "false", CVarFlag.Boolean, "Whether to render a wireframe.");
            r_fov = Register("r_fov", "70", CVarFlag.Numeric, "What Field of Vision range value to use.");
            r_znear = Register("r_znear", "0.1", CVarFlag.Numeric, "How close the near plane should be to the camera.");
            r_zfar = Register("r_zfar", "3500", CVarFlag.Numeric, "How far the far plane should be from the camera.");
            r_dof_strength = Register("r_dof_strength", "4", CVarFlag.Numeric, "How strong the Depth Of Field effect should be.");
            r_maxfps = Register("r_maxfps", "60", CVarFlag.Numeric | CVarFlag.Delayed, "What the FPS cap should be.");
            r_lightmaxdistance = Register("r_lightmaxdistance", "35", CVarFlag.Numeric, "How far away a light can be from the camera before it is disabled.");
            r_fallbacklighting = Register("r_fallbacklighting", "true", CVarFlag.Boolean, "Whether to calculate fallback block lighting (Requires chunk reload).");
            r_shadowquality = Register("r_shadowquality", "1024", CVarFlag.Numeric, "What texture size to use for shadow maps.");
            r_shadowblur = Register("r_shadowblur", "0.25", CVarFlag.Numeric, "What factor to use for shadow blurring. Smaller = blurrier.");
            r_shadowpace = Register("r_shadowpace", "1", CVarFlag.Numeric, "How rapidly to rerender shadows, in frames.");
            r_shadows = Register("r_shadows", "false", CVarFlag.Boolean, "Whether to render shadows at all.");
            r_cloudshadows = Register("r_cloudshadows", "false", CVarFlag.Boolean, "Whether to display shadows from clouds.");
            r_good_graphics = Register("r_good_graphics", "true", CVarFlag.Boolean | CVarFlag.Delayed, "Whether to use 'good' graphics."); // TODO: Callback to auto-set
            r_skybox = Register("r_skybox", "default", CVarFlag.ServerControl | CVarFlag.Textual, "What skybox to use.");
            r_blocktexturelinear = Register("r_blocktexturelinear", "true", CVarFlag.Boolean | CVarFlag.Delayed, "Whether block textures are to use a linear blur or nearest-pixel mode.");
            r_blocktexturewidth = Register("r_blocktexturewidth", "256", CVarFlag.Numeric | CVarFlag.Delayed, "What texture width (pixels) block textures should use.");
            r_toonify = Register("r_toonify", "false", CVarFlag.Boolean, "Whether to use a 'toonify' post-processing effect.");
            r_transplighting = Register("r_transplighting", "true", CVarFlag.Boolean, "Whether transparent objects should be lit properly (otherwise, fullbright).");
            r_transpshadows = Register("r_transpshadows", "false", CVarFlag.Boolean, "Whether transparent objects should be lit using HD shadows (Requires r_shadows true).");
            r_3d_enable = Register("r_3d_enable", "false", CVarFlag.Boolean, "Whether to use 3D side-by-side rendering mode.");
            r_fast = Register("r_fast", "false", CVarFlag.Boolean, "Whether to use 'fast' rendering mode.");
            r_chunksatonce = Register("r_chunksatonce", "100", CVarFlag.Numeric, "How many chunks can render at once.");
            r_chunkoverrender = Register("r_chunkoverrender", "true", CVarFlag.Boolean, "Whether to render chunks more often for quality's sake, at risk of performance.");
            r_transpll = Register("r_transpll", "false", CVarFlag.Boolean, "Whether to use GPU linked lists when rendering transparent objects.");
            r_noblockshapes = Register("r_noblockshapes", "false", CVarFlag.Boolean, "Whether block shapes are disabled or not.");
            r_treeshadows = Register("r_treeshadows", "true", CVarFlag.Boolean, "Whether trees cast shadows.");
            r_godrays = Register("r_godrays", "true", CVarFlag.Boolean, "Whether to render GodRays (rays of light from the sun."); // TODO: Validate?
            r_hdr = Register("r_hdr", "true", CVarFlag.Boolean, "Whether to render with high dynamic range adjustments enabled.");
            r_chunkmarch = Register("r_chunkmarch", "false", CVarFlag.Boolean, "Whether to use 'chunk marching' method to render chunks (if false, uses a generic loop).");
            r_clouds = Register("r_clouds", "true", CVarFlag.Boolean, "Whether to render clouds."); // TODO: Inform the server of this to reduce bandwidth.
            r_motionblur = Register("r_motionblur", "false", CVarFlag.Boolean, "Whether to blur the screen to better represent motion.");
            r_plants = Register("r_plants", "true", CVarFlag.Boolean, "Whether to render small plants around the view.");
            // Audio CVars
            a_musicvolume = Register("a_musicvolume", "0.5", CVarFlag.Numeric, "What volume the music should be.");
            a_musicpitch = Register("a_musicpitch", "1", CVarFlag.Numeric, "What pitch the music should be.");
            a_globalvolume = Register("a_globalvolume", "1", CVarFlag.Numeric, "What volume all sounds should be.");
            a_globalpitch = Register("a_globalpitch", "1", CVarFlag.Numeric, "What pitch all sounds should be.");
            a_music = Register("a_music", "music/epic/bcvoxalia_adventure", CVarFlag.Textual | CVarFlag.ServerControl, "What music should be played.");
            a_quietondeselect = Register("a_quietondeselect", "true", CVarFlag.Boolean, "Whether to quiet music when the window is deselected.");
            a_echovolume = Register("a_echovolume", "0", CVarFlag.Numeric, "What volume to echo microphone pickup at, for audio testing purposes. Specify 0 to not listen to the microphone at all.");
            // UI CVars
            u_mouse_sensitivity = Register("u_mouse_sensitivity", "1", CVarFlag.Numeric, "How sensitive the mouse is.");
            u_reticle = Register("u_reticle", "1", CVarFlag.Textual, "What reticle to use.");
            u_reticlescale = Register("u_reticlescale", "32", CVarFlag.Numeric, "How big the reticle should be.");
            u_showhud = Register("u_showhud", "true", CVarFlag.Boolean, "Whether to render the HUD.");
            u_highlight_targetblock = Register("u_highlight_targetblock", "true", CVarFlag.Boolean, "Whether to highlight the targeted block.");
            u_highlight_placeblock = Register("u_highlight_placeblock", "true", CVarFlag.Boolean, "Whether to highlight the targeted placement block.");
            u_debug = Register("u_debug", "false", CVarFlag.Boolean, "Whether to display debug information on the HUD.");
            u_showmap = Register("u_showmap", "false", CVarFlag.Boolean | CVarFlag.ServerControl, "Whether to display a map on the HUD.");
            u_showrangefinder = Register("u_showrangefinder", "false", CVarFlag.Boolean | CVarFlag.ServerControl, "Whether to display a range finder on the HUD.");
            u_showping = Register("u_showping", "true", CVarFlag.Boolean, "Whether to display the current ping on the UI.");
            u_showcompass = Register("u_showcompass", "false", CVarFlag.Boolean | CVarFlag.ServerControl, "Whether to display a compass on the HUD.");
            u_colortyping = Register("u_colortyping", "false", CVarFlag.Boolean, "Whether to color the text currently being typed typed (chat, console, ...).");
        }