Skip to content

Commit fa113b2

Browse files
author
dashodanger
committed
Remove sliders
1 parent 77f18bf commit fa113b2

32 files changed

+779
-3468
lines changed

games/doom/levels.lua

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ end
108108
function DOOM.get_levels()
109109
local MAP_LEN_TAB = { few=4, episode=11, game=32 }
110110

111-
if OB_CONFIG.length == "game" and PARAM.float_full_game_length then
112-
MAP_LEN_TAB["game"] = PARAM.float_full_game_length
113-
end
114-
115111
local MAP_NUM = MAP_LEN_TAB[OB_CONFIG.length] or 1
116112

117113
local EP_NUM = 1
@@ -212,7 +208,7 @@ function DOOM.get_levels()
212208
-- prebuilt levels
213209
local pb_name = LEV.name
214210

215-
if PARAM.bool_prebuilt_levels == 1 then
211+
if PARAM.prebuilt_levels == "yes" then
216212
LEV.prebuilt = GAME.PREBUILT_LEVELS[LEV.name]
217213
end
218214

@@ -284,15 +280,11 @@ function DOOM.get_levels()
284280

285281
local special_mode = {}
286282

287-
if PARAM.float_streets_mode and rand.odds(PARAM.float_streets_mode) then
283+
if PARAM.streets_mode and rand.odds(tonumber(PARAM.streets_mode)) then
288284
table.add_unique(special_mode, "streets")
289285
end
290286

291-
if PARAM.float_linear_mode and rand.odds(PARAM.float_linear_mode) then
292-
table.add_unique(special_mode, "linear")
293-
end
294-
295-
if PARAM.float_nature_mode and rand.odds(PARAM.float_nature_mode) then
287+
if PARAM.nature_mode and rand.odds(tonumber(PARAM.nature_mode)) then
296288
table.add_unique(special_mode, "nature")
297289
end
298290

games/doom/x_doom1.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4301,7 +4301,7 @@ function ULTDOOM.get_levels()
43014301
end
43024302

43034303
-- prebuilt levels
4304-
if PARAM.bool_prebuilt_levels == 1 then
4304+
if PARAM.prebuilt_levels == "yes" then
43054305
LEV.prebuilt = GAME.PREBUILT_LEVELS[LEV.name]
43064306
end
43074307

@@ -4372,18 +4372,18 @@ function ULTDOOM.get_levels()
43724372

43734373
-- handling for street mode
43744374
-- actual handling for urban percentages are done
4375-
if PARAM.float_streets_mode then
4375+
if PARAM.streets_mode then
43764376
if not LEV.is_procedural_gotcha or not LEV.prebuilt then
4377-
if rand.odds(PARAM.float_streets_mode) then
4377+
if rand.odds(tonumber(PARAM.streets_mode)) then
43784378
LEV.has_streets = true
43794379
end
43804380
end
43814381
end
43824382

43834383
if not LEV.prebuilt then
43844384
-- nature mode
4385-
if PARAM.float_nature_mode then
4386-
if rand.odds(PARAM.float_nature_mode) then
4385+
if PARAM.nature_mode then
4386+
if rand.odds(tonumber(PARAM.nature_mode)) then
43874387
if LEV.has_streets then
43884388
if rand.odds(50) then
43894389
LEV.has_streets = false

games/heretic/levels.lua

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ function HERETIC.get_levels()
191191
LEV.secret_exit = GAME.SECRET_EXITS[LEV.name]
192192

193193
-- prebuilt levels
194-
if PARAM.bool_prebuilt_levels == 1 then
194+
if PARAM.prebuilt_levels == "yes" then
195195
LEV.prebuilt = GAME.PREBUILT_LEVELS[LEV.name]
196196
end
197197

@@ -261,15 +261,11 @@ function HERETIC.get_levels()
261261

262262
local special_mode = {}
263263

264-
if PARAM.float_streets_mode and rand.odds(PARAM.float_streets_mode) then
264+
if PARAM.streets_mode and rand.odds(tonumber(PARAM.streets_mode)) then
265265
table.add_unique(special_mode, "streets")
266266
end
267267

268-
if PARAM.float_linear_mode and rand.odds(PARAM.float_linear_mode) then
269-
table.add_unique(special_mode, "linear")
270-
end
271-
272-
if PARAM.float_nature_mode and rand.odds(PARAM.float_nature_mode) then
268+
if PARAM.nature_mode and rand.odds(tonumber(PARAM.nature_mode)) then
273269
table.add_unique(special_mode, "nature")
274270
end
275271

modules/alt_shape_grammars.lua

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,44 +46,32 @@ OB_MODULES["alt_shape_grammars"] =
4646
{
4747

4848
{
49-
name = "float_grammar_backhalls",
49+
name = "grammar_backhalls",
5050
label = _("The Backhalls"),
51-
valuator = "slider",
52-
units = _("% Chance Per Level"),
53-
min = 0,
54-
max = 100,
55-
increment = 1,
56-
default = 0,
51+
choices = LEVEL_PERCENTAGE_CHOICES,
52+
default = "0",
5753
tooltip = _("Sets chance of levels using the Backhalls shape grammar."),
5854
longtip = _("The true Linear Mode."),
5955
priority = 103,
6056
randomize_group = "architecture",
6157
},
6258

6359
{
64-
name = "float_grammar_boxes_of_death",
60+
name = "grammar_boxes_of_death",
6561
label = _("Boxes of Death"),
66-
valuator = "slider",
67-
units = _("% Chance Per Level"),
68-
min = 0,
69-
max = 100,
70-
increment = 1,
71-
default = 0,
62+
choices = LEVEL_PERCENTAGE_CHOICES,
63+
default = "0",
7264
tooltip = _("Sets chance of levels using the Boxes of Death shape grammar."),
7365
longtip = _("It's like that movie Cube, but with .5 less dimensions (if you're a contrarian)."),
7466
priority = 102,
7567
randomize_group = "architecture",
7668
},
7769

7870
{
79-
name = "float_grammar_oblige_745",
71+
name = "grammar_oblige_745",
8072
label = _("The OG"),
81-
valuator = "slider",
82-
units = _("% Chance Per Level"),
83-
min = 0,
84-
max = 100,
85-
increment = 1,
86-
default = 0,
73+
choices = LEVEL_PERCENTAGE_CHOICES,
74+
default = "0",
8775
tooltip = _("Sets chance of levels using the OG shape grammar."),
8876
longtip = _("These are the shapes from Oblige 7.45, one of the earliest examples of the shape grammar system."),
8977
priority = 100,

0 commit comments

Comments
 (0)