diff --git a/CHANGELOG.md b/CHANGELOG.md index a814303..a3226b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ ### Added - **A `FULL` rung on the VOXEL row**, directly after `OFF`. One choice that - puts the whole mode in its intended state -- the 50-degree camera, the + puts the whole mode in its intended state -- the 35-degree camera, the miniature blur at maximum, the horizon flat, the view fitted, and battles on the map -- rather than making a player assemble it from four rows. @@ -29,9 +29,9 @@ with nothing on screen saying a keypress had done it. `FULL` stays on the OPTIONS row, where a preset that changes other rows belongs. - A press FROM `FULL` goes to `75`. `FULL` is already the 50-degree camera, + A press FROM `FULL` goes to `50`. `FULL` is already the 35-degree camera, so stepping to the rung of that name would look like the key had done - nothing. + nothing. Matched by angle, so it follows `FULL` if that is ever retuned. - **The mode's four options are one block in the menu.** The engine splices a pipeline row in beside TILT and lands a mod's own rows at the end of the diff --git a/lib/VoxelState.lua b/lib/VoxelState.lua index ca85fac..efad2ec 100644 --- a/lib/VoxelState.lua +++ b/lib/VoxelState.lua @@ -29,10 +29,10 @@ local Voxel = {} -- it rather than assembling it from four rows. It sits directly after OFF -- because that is the order those two get used in. -- --- Its ANGLE is 50 degrees, the same as the rung of that name. The duplicate +-- Its ANGLE is 35 degrees, the same as the rung of that name. The duplicate -- in the table is deliberate: the ladder is a list of what each rung LOOKS -- like, and two rungs may look the same while meaning different things. -Voxel.ANGLES_DEG = { 0, 50, 15, 35, 50, 75 } +Voxel.ANGLES_DEG = { 0, 35, 15, 35, 50, 75 } Voxel.ANGLE_LABELS = { "OFF", "FULL", "15", "35", "50", "75" } Voxel.MAX_LEVEL = #Voxel.ANGLES_DEG - 1 @@ -56,9 +56,10 @@ Voxel.HOTKEY_ORDER = { 0, 2, 3, 4, 5 } -- OFF, 15, 35, 50, 75 -- The rung a press moves to from `level`. -- -- A level that is not on the key's path -- FULL, reached from the menu -- --- steps on from whichever rung shows the SAME camera it does. FULL is 50 --- degrees, so a press from it goes to 75 rather than back to 50, and the key --- never appears to do nothing. +-- steps on from whichever rung shows the SAME camera it does. FULL is 35 +-- degrees, so a press from it goes to 50 rather than back to 35, and the key +-- never appears to do nothing. Matched by ANGLE rather than by a hardcoded +-- rung, so retuning FULL moves the key's answer with it. function Voxel.nextHotkeyLevel(level) level = level or Voxel.level local order = Voxel.HOTKEY_ORDER diff --git a/tests/dramatic_shape_test.lua b/tests/dramatic_shape_test.lua index a685495..397e779 100644 --- a/tests/dramatic_shape_test.lua +++ b/tests/dramatic_shape_test.lua @@ -840,12 +840,15 @@ end T.eq(table.concat(walk, ","), "15,35,50,75,OFF,15", "3 walks OFF -> 15 -> 35 -> 50 -> 75 and wraps, never touching FULL") --- FULL is 50 degrees, so a press from it goes ON to 75 rather than back to --- the rung that shows the same camera -- the key never appears to do nothing +-- FULL is 35 degrees, so a press from it goes ON to 50 rather than back to +-- the rung that shows the same camera -- the key never appears to do nothing. +-- Matched by angle, so this follows FULL if it is ever retuned. +T.eq(VoxelState.ANGLES_DEG[VoxelState.FULL_LEVEL + 1], 35, + "FULL is the 35-degree camera") Pipelines.setLevel("voxel", VoxelState.FULL_LEVEL) Game.keypressed(keyGame, "3") -T.eq(Pipelines.levelLabel("voxel"), "75", - "a press from FULL goes to 75, since FULL already IS the 50 camera") +T.eq(Pipelines.levelLabel("voxel"), "50", + "a press from FULL goes to 50, since FULL already IS the 35 camera") Pipelines.setLevel("voxel", 0) Game.keypressed(keyGame, "3")