Skip to content

Commit b647e00

Browse files
committed
Added new game Configs
1 parent c4b4924 commit b647e00

1 file changed

Lines changed: 40 additions & 2 deletions

File tree

‎Torch.Server/ViewModels/SessionSettingsViewModel.cs‎

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
using System.Collections.Generic;
1+
using MahApps.Metro.Controls;
2+
using System.Collections.Generic;
23
using System.ComponentModel;
34
using VRage.Game;
45
using VRage.Library.Utils;
6+
using VRageRender.Utils;
7+
using static Sandbox.Game.Multiplayer.MyPlayerCollection;
8+
using static VRage.Dedicated.RemoteAPI.MyDedicatedController;
59

610
namespace Torch.Server.ViewModels
711
{
@@ -538,7 +542,41 @@ public class SessionSettingsViewModel : ViewModel
538542
// This setting is not found in vanilla dedicated server GUI
539543
[Torch.Views.Display(Description = "Enables experimental mode.", Name = "Experimental Mode", GroupName = "Experimental")]
540544
public bool ExperimentalMode { get => _settings.ExperimentalMode; set => SetValue(ref _settings.ExperimentalMode, value); }
541-
545+
546+
547+
[Torch.Views.Display(Description = "Enable radiation hazards. Requires Airtightness.", Name = "Enable Radiation", GroupName = "Environment")]
548+
public bool EnableRadiation { get => _settings.EnableRadiation; set => SetValue(ref _settings.EnableRadiation, value); }
549+
550+
[Torch.Views.Display(Description = "A multiplier for the amount of radiation gained in space from sun exposure. Requires Airtightness and Radiation.", Name = "Solar Radiation Intensity", GroupName = "Environment")]
551+
public float SolarRadioationIntensity { get => _settings.SolarRadiationIntensity; set => SetValue(ref _settings.SolarRadiationIntensity, value); }
552+
553+
554+
[Torch.Views.Display(Description = "Enables reseting forageable items.", Name = "Reset forageable items", GroupName = "Trash Removal")]
555+
public bool ResetForageableItems { get => _settings.ResetForageableItems; set => SetValue(ref _settings.ResetForageableItems, value); }
556+
557+
558+
[Torch.Views.Display(Description = "Defines time in minutes after which forageable items are reset.", Name = "Reset forageable items time (min)", GroupName = "Trash Removal")]
559+
public int ResetForageableItemsTimeM { get => _settings.ResetForageableItemsTimeM; set => SetValue(ref _settings.ResetForageableItemsTimeM, value); }
560+
561+
562+
[Torch.Views.Display(Description = "Defines minimum distance from player for forageable items to reset.", Name = "Reset forageable items distance (m)", GroupName = "Trash Removal")]
563+
public int ResetForageableItemsDistance { get => _settings.ResetForageableItemsDistance; set => SetValue(ref _settings.ResetForageableItemsDistance, value); }
564+
565+
566+
[Torch.Views.Display(Description = "This value impacts how quickly the player becomes hungry, as well as how quickly food production occurs.", Name = "Food Consumption Rate", GroupName = "Environment")]
567+
public float FoodCunsumptionRate { get => _settings.FoodConsumptionRate; set => SetValue(ref _settings.FoodConsumptionRate, value); }
568+
569+
570+
[Torch.Views.Display(Description = "Enable buffs and enhancements which player characters earn over time. These benefits are lost if the player respawns.", Name = "Enable Survival Buffs", GroupName = "Environment")]
571+
public bool EnableSurvivalBuffs { get => _settings.EnableSurvivalBuffs; set => SetValue(ref _settings.EnableSurvivalBuffs, value); }
572+
573+
574+
[Torch.Views.Display(Description = "Upon respawning, all players will have their health, oxygen, gas tank levels, and other stats set to critically low levels.", Name = "Enable Reduced Stats", GroupName = "Environment")]
575+
public bool EnableReducedStatsOnRespawn { get => _settings.EnableReducedStatsOnRespawn; set => SetValue(ref _settings.EnableReducedStatsOnRespawn, value); }
576+
577+
578+
579+
542580

543581

544582
public SessionSettingsViewModel(MyObjectBuilder_SessionSettings settings)

0 commit comments

Comments
 (0)