horrendous stuff
This commit is contained in:
@@ -10,11 +10,13 @@ supported but exist anyways.)
|
||||
_____________________________________________________________________________
|
||||
|
||||
================================================================================
|
||||
sm-ssc v1.2.1 | 20110???
|
||||
sm-ssc v1.2.1 | 2011011?
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
20110112
|
||||
--------
|
||||
* [SpecialScoring] MIGS scoring, improved SN and SN2 scoring. [FSX]
|
||||
* [RageFile] Added ReadBytes() Lua binding. [FSX]
|
||||
* [NetworkSyncManager] Added CloseConnection() Lua binding. [freem]
|
||||
* [ScreenTextEntry] Added Load(TextEntrySettings) Lua binding. [freem]
|
||||
TextEntrySettings is implemented similar to the Attributes in BitmapText.
|
||||
|
||||
@@ -25,17 +25,23 @@ end;
|
||||
--DDR SuperNOVA(-esque) scoring
|
||||
-----------------------------------------------------------
|
||||
r['DDR SuperNOVA'] = function(params, pss)
|
||||
local dp = pss:GetPossibleDancePoints();
|
||||
if dp == 0 then pss:SetScore(0) return nil end
|
||||
pss:SetScore(math.round((pss:GetActualDancePoints()/dp)*1000000));
|
||||
local multLookup = { ['TapNoteScore_W1'] = 1, ['TapNoteScore_W2'] = 1, ['TapNoteScore_W3'] = 0.5 };
|
||||
setmetatable(multLookup, ZeroIfNotFound);
|
||||
local radarValues = GAMESTATE:GetCurrentSteps(params.Player):GetRadarValues(params.Player);
|
||||
local totalItems = radarValues:GetValue('RadarCategory_TapsAndHolds') + radarValues:GetValue('RadarCategory_Holds') + radarValues:GetValue('RadarCategory_Rolls');
|
||||
local buildScore = (10000000 / totalItems * multLookup[params.TapNoteScore]) + (10000000 / totalItems * (params.HoldNoteScore == 'HoldNoteScore_Held' and 1 or 0));
|
||||
pss:SetScore(pss:GetScore() + math.round(buildScore));
|
||||
end;
|
||||
-----------------------------------------------------------
|
||||
--DDR SuperNOVA 2(-esque) scoring
|
||||
-----------------------------------------------------------
|
||||
r['DDR SuperNOVA 2'] = function(params, pss)
|
||||
local dp = pss:GetPossibleDancePoints();
|
||||
if dp == 0 then pss:SetScore(0) return nil end
|
||||
pss:SetScore(math.round((pss:GetActualDancePoints()/dp)*100000)*10);
|
||||
local multLookup = { ['TapNoteScore_W1'] = 1, ['TapNoteScore_W2'] = 1, ['TapNoteScore_W3'] = 0.5 };
|
||||
setmetatable(multLookup, ZeroIfNotFound);
|
||||
local radarValues = GAMESTATE:GetCurrentSteps(params.Player):GetRadarValues(params.Player);
|
||||
local totalItems = radarValues:GetValue('RadarCategory_TapsAndHolds') + radarValues:GetValue('RadarCategory_Holds') + radarValues:GetValue('RadarCategory_Rolls');
|
||||
local buildScore = (100000 / totalItems * multLookup[params.TapNoteScore] - ((params.TapNoteScore == 'TapNoteScore_W2' and (PREFSMAN:GetPreference("AllowW1") ~= 'AllowW1_Never' or not (GAMESTATE:IsCourseMode() and PREFSMAN:GetPreference("AllowW1") == 'AllowW1_CoursesOnly'))) and 10 or 0)) + (100000 / totalItems * (params.HoldNoteScore == 'HoldNoteScore_Held' and 1 or 0));
|
||||
pss:SetScore(pss:GetScore() + (math.round(buildScore) * 10));
|
||||
end;
|
||||
-----------------------------------------------------------
|
||||
--Radar Master (doesn't work in 1.2, disabled)
|
||||
|
||||
@@ -351,6 +351,14 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ReadBytes( T* p, lua_State *L )
|
||||
{
|
||||
RString string;
|
||||
p->Read( string, IArg(1) );
|
||||
lua_pushstring( L, string );
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int Seek( T* p, lua_State *L )
|
||||
{
|
||||
lua_pushinteger( L, p->Seek( IArg(1) ) );
|
||||
@@ -403,6 +411,7 @@ public:
|
||||
ADD_METHOD( Close );
|
||||
ADD_METHOD( Write );
|
||||
ADD_METHOD( Read );
|
||||
ADD_METHOD( ReadBytes );
|
||||
ADD_METHOD( Seek );
|
||||
ADD_METHOD( Tell );
|
||||
ADD_METHOD( GetLine );
|
||||
|
||||
Reference in New Issue
Block a user