theme prefs should NOT be in fallback.

This commit is contained in:
AJ Kelly
2011-12-29 12:49:45 -06:00
parent cad748aebf
commit 6544d31dd9
5 changed files with 81 additions and 74 deletions
+39 -62
View File
@@ -108,62 +108,60 @@ function EvalUsesCheckpointsWithJudgments()
return (CurGameName() == "pump") and true or false
end
-- these need cleanup really.
local ComboThresholds = {
dance = { Hit = 2, Miss = 2, Fail = -1 },
pump = { Hit = 4, Miss = 4, Fail = 51 },
beat = { Hit = 1, Miss = 0, Fail = -1 },
kb7 = { Hit = 1, Miss = 0, Fail = -1 },
para = { Hit = 2, Miss = 0, Fail = -1 },
-------------------------------------------
default = { Hit = 2, Miss = 2, Fail = -1 }
}
function HitCombo()
local Combo = {
dance = 2,
pump = 4,
beat = 2,
kb7 = 2,
para = 2
}
return Combo[CurGameName()]
if ComboThresholds[CurGameName()] then
return ComboThresholds[CurGameName()].Hit
end
return ComboThresholds["default"].Hit
end
function MissCombo()
local Combo = {
dance = 2,
pump = 4,
beat = 0,
kb7 = 0,
para = 0
}
return Combo[CurGameName()]
if ComboThresholds[CurGameName()] then
return ComboThresholds[CurGameName()].Miss
end
return ComboThresholds["default"].Miss
end
-- FailCombo:
-- [en] The combo that causes game failure.
function FailCombo()
local Combo = {
dance = -1, -- ITG uses 30
pump = 51, -- Pump Pro uses 30, real Pump uses 51
beat = -1,
kb7 = -1,
para = -1
}
return Combo[CurGameName()]
-- ITG (dance) uses 30. Pump Pro uses 30, real Pump uses 51
if ComboThresholds[CurGameName()] then
return ComboThresholds[CurGameName()].Fail
end
return ComboThresholds["default"].Fail
end
local RoutineSkins = {
dance = { P1 = "midi-routine-p1", P2 = "midi-routine-p1" },
pump = { P1 = "cmd-routine-p1", P2 = "cmd-routine-p2" },
kb7 = { P1 = "default", P2 = "retrobar" },
-------------------------------------------------------------
default = { P1 = "default", P2 = "default" }
}
function RoutineSkinP1()
local Combo = {
dance = "midi-routine-p1",
pump = "cmd-routine-p1",
beat = "default",
kb7 = "default",
para = "default"
}
return Combo[CurGameName()]
if RoutineSkins[CurGameName()] then
return RoutineSkins[CurGameName()].P1
end
return RoutineSkins["Default"].P1
end
function RoutineSkinP2()
local Combo = {
dance = "midi-routine-p2",
pump = "cmd-routine-p2",
beat = "default",
kb7 = "retrobar",
para = "default"
}
return Combo[CurGameName()]
if RoutineSkins[CurGameName()] then
return RoutineSkins[CurGameName()].P2
end
return RoutineSkins["Default"].P2
end
-- todo: use tables for some of these -aj
@@ -175,27 +173,6 @@ function ShowHoldJudgments()
return not IsGame("pump")
end
local tNotePositions = {
-- StepMania 3.9/4.0
Normal = { -144, 144, },
-- ITG
Lower = { -125, 145, }
}
function GetTapPosition( sType )
bCategory = (sType == 'Standard') and 1 or 2
-- true: Normal
-- false: Lower
bPreference = ThemePrefs.Get("NotePosition") and "Normal" or "Lower"
tNotePos = tNotePositions[bPreference]
return tNotePos[bCategory]
end
function ComboUnderField()
--return ThemePrefs.Get("ComboUnderField")
return false
end
local CodeDetectorCodes = {
-- steps
PrevSteps1 = {
+4 -11
View File
@@ -24,7 +24,7 @@ ScreenHeight=480
# Allows you to pick all available game modes for your gametype: for example,
# inserting enough coins for 1p would let you choose between solo, single
# and double before each game
AutoSetStyle=ThemePrefs.Get("AutoSetStyle")
AutoSetStyle=false
# Default modifiers and noteskin.
DefaultModifiers="1x"
@@ -1019,15 +1019,8 @@ GradeTier02IsFullCombo=false
NumGradeTiersUsed=7
[Player]
# In The Groove
# ReceptorArrowsYStandard=-125
# ReceptorArrowsYReverse=145
# StepMania Alpha 4
# ~ ReceptorArrowsYStandard=-144
# ~ ReceptorArrowsYReverse=144
# SM5 uses a UserPreference for this.
ReceptorArrowsYStandard=GetTapPosition('Standard')
ReceptorArrowsYReverse=GetTapPosition('Reverse')
ReceptorArrowsYStandard=-144
ReceptorArrowsYReverse=144
ReceptorNoSinkScoreCutoff=4
JudgmentTransformCommand=%JudgmentTransformCommand
JudgmentOnCommand=
@@ -1044,7 +1037,7 @@ DrawDistanceBeforeTargetsPixels=SCREEN_HEIGHT
DrawDistanceAfterTargetsPixels=-128
TapJudgmentsUnderField=false
HoldJudgmentsUnderField=false
ComboUnderField=ComboUnderField()
ComboUnderField=false
PenalizeTapScoreNone=false
JudgeHoldNotesOnSameRowTogether=false
HoldCheckpoints=IsGame("pump")
+26
View File
@@ -0,0 +1,26 @@
-- StepMania 5 default theme | script ring 03 | Gameplay.lua
-- someone thought it'd be a good idea to put theme preferences into the fallback
-- when they should've been in default instead. there is no emoticon for how i feel
-- at this moment right now -freem
-- for example, not every theme wants to worry about custom receptor positions.
local tNotePositions = {
-- StepMania 3.9/4.0
Normal = { -144, 144, },
-- ITG
Lower = { -125, 145, }
}
function GetTapPosition( sType )
bCategory = (sType == 'Standard') and 1 or 2
-- true: Normal
-- false: Lower
bPreference = ThemePrefs.Get("NotePosition") and "Normal" or "Lower"
tNotePos = tNotePositions[bPreference]
return tNotePos[bCategory]
end
-- combo under field is another thing that doesn't always need to be custom
function ComboUnderField()
return ThemePrefs.Get("ComboUnderField")
end
+12 -1
View File
@@ -4,6 +4,7 @@ FallbackTheme=_fallback
[Common]
FirstAttractScreen=""
AutoSetStyle=ThemePrefs.Get("AutoSetStyle")
# 02 #
[LightsManager]
@@ -296,6 +297,16 @@ ShowBoard=GAMESTATE:GetCurrentGame():GetName() == "kb7"
[PlayerStageStats]
[Player]
# In The Groove
# ReceptorArrowsYStandard=-125
# ReceptorArrowsYReverse=145
# StepMania Alpha 4
# ~ ReceptorArrowsYStandard=-144
# ~ ReceptorArrowsYReverse=144
# SM5's default uses a UserPreference for this.
ReceptorArrowsYStandard=GetTapPosition('Standard')
ReceptorArrowsYReverse=GetTapPosition('Reverse')
ComboUnderField=ComboUnderField()
[PlayerOptions]
@@ -1251,7 +1262,7 @@ ItemsLongRowSharedX=SCREEN_CENTER_X
[ScreenOptionsSystemDirection]
LineNames="1,2,3,4,5,6,7,8,9,FlashyCombo,RollCombo,10,11,12,13,14,16,LF,17,18,19,20,21,22"
LineLF="lua,UserPrefLongFail()"
LineLF="lua,ThemePrefRow('LongFail')"
LineRollCombo="lua,ThemePrefRow('ComboOnRolls')"
LineFlashyCombo="lua,ThemePrefRow('FlashyCombo')"