Skip to content

Commit

Permalink
Convert Spawn Configs from enums into sliders
Browse files Browse the repository at this point in the history
  • Loading branch information
UndeadZeratul committed Aug 16, 2024
1 parent 93ec922 commit 840b985
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
6 changes: 6 additions & 0 deletions LANGUAGE
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ MENU_BACKPACKSALLOWED = "Allowed in Ammo Boxes and/or Backpacks: ";
MENU_SPAWNRATE = "Spawn Rate: ";
MENU_PERSISTENCY = "Persistent Spawns: ";

// Menu Option Values
MENU_ENABLED = "Enabled";
MENU_DISABLED = "Disabled";
MENU_REPLACEALL = "Replace All";
MENU_WITHALL = "With All";

// Menu Command Text
MENU_RESETPERSISTENCY = "Reset Persistence Options";
HANDCHARGE_RESETALLOPTIONS = "Reset all options for Handcharge.";
Expand Down
21 changes: 3 additions & 18 deletions MENUDEF
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
// Spawn Bias (for items that do replace)
OptionValue "SpawnBias" {
-1, "Disabled"
0, "Replace All"
2, "1 in 3"
4, "1 in 5"
9, "1 in 10"
14, "1 in 15"
19, "1 in 20"
24, "1 in 25"
49, "1 in 50"
99, "1 in 100"
149, "1 in 150"
199, "1 in 200"
}

OptionMenu "HandChargeMenu" {

Title "$HANDCHARGE_MENU"
Expand All @@ -38,6 +22,7 @@ AddOptionMenu "HDAddonMenu"
Submenu "$HANDCHARGE_MENU", "HandChargeMenu"
}


OptionMenu "handchargeSpawning" {
Title "$MENU_HANDCHARGE_TITLE"

Expand All @@ -48,10 +33,10 @@ OptionMenu "handchargeSpawning" {

StaticText "$MENU_SPAWNOPTIONS", "green"
StaticText "$MENU_HANDCHARGE_CHAINSAW_SPAWNTEXT", "White"
Option "$MENU_SPAWNRATE", "handcharge_chainsaw_spawn_bias", "SpawnBias"
ScaleSlider "$MENU_SPAWNRATE", "handcharge_chainsaw_spawn_bias", -1, 999, 1, "$MENU_REPLACEALL", "$MENU_DISABLED"
SafeCommand "$MENU_RESETOPTIONS", "resetcvar handcharge_chainsaw_spawn_bias"
StaticText "$MENU_HANDCHARGE_SHOTGUN_SPAWNTEXT", "White"
Option "$MENU_SPAWNRATE", "handcharge_shotgun_spawn_bias", "SpawnBias"
ScaleSlider "$MENU_SPAWNRATE", "handcharge_shotgun_spawn_bias", -1, 999, 1, "$MENU_REPLACEALL", "$MENU_DISABLED"
SafeCommand "$MENU_RESETOPTIONS", "resetcvar handcharge_shotgun_spawn_bias"
StaticText ""

Expand Down

0 comments on commit 840b985

Please sign in to comment.