1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-25 22:53:22 +00:00

Un-break the non-table setPaletteColour overload

This commit is contained in:
Lignum 2017-05-07 12:55:16 +02:00
parent 54273fc6e5
commit 70c2f50aa8
No known key found for this signature in database
GPG Key ID: 0889206F5A8A700D
3 changed files with 6 additions and 6 deletions

View File

@ -336,7 +336,7 @@ public Object[] callMethod( ILuaContext context, int method, Object[] args ) thr
case 19:
case 20:
{
// setColour/setColor
// setPaletteColour/setPaletteColor
if( !m_environment.isColour() )
{
// Make sure you can't circumvent greyscale terminals with this function.
@ -375,8 +375,8 @@ public Object[] callMethod( ILuaContext context, int method, Object[] args ) thr
case 21:
case 22:
{
// getColour/getColor
if (args.length < 1 || !(args[0] instanceof Double))
// getPaletteColour/getPaletteColor
if(args.length < 1 || !(args[0] instanceof Double))
{
throw new LuaException( "Expected number" );
}

View File

@ -229,7 +229,7 @@ public Object[] callMethod( IComputerAccess computer, ILuaContext context, int m
case 20:
case 21:
{
// setColour/setColor
// setPaletteColour/setPaletteColor
Terminal terminal = m_monitor.getTerminal().getTerminal();
boolean isColour = m_monitor.getTerminal().isColour();
@ -270,7 +270,7 @@ public Object[] callMethod( IComputerAccess computer, ILuaContext context, int m
case 22:
case 23:
{
// getColour/getColor
// getPaletteColour/getPaletteColor
Terminal terminal = m_monitor.getTerminal().getTerminal();
Palette palette = terminal.getPalette();

View File

@ -309,7 +309,7 @@ function create( parent, nX, nY, nWidth, nHeight, bStartVisible )
end
if bVisible then
return parent.setPaletteColour( colour, tPalette[ colour ] )
return parent.setPaletteColour( colour, table.unpack( tPalette[ colour ] ) )
end
end