1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-12 10:20:28 +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 class TermAPI implements ILuaAPI
case 19: case 19:
case 20: case 20:
{ {
// setColour/setColor // setPaletteColour/setPaletteColor
if( !m_environment.isColour() ) if( !m_environment.isColour() )
{ {
// Make sure you can't circumvent greyscale terminals with this function. // Make sure you can't circumvent greyscale terminals with this function.
@ -375,8 +375,8 @@ public class TermAPI implements ILuaAPI
case 21: case 21:
case 22: case 22:
{ {
// getColour/getColor // getPaletteColour/getPaletteColor
if (args.length < 1 || !(args[0] instanceof Double)) if(args.length < 1 || !(args[0] instanceof Double))
{ {
throw new LuaException( "Expected number" ); throw new LuaException( "Expected number" );
} }

View File

@ -229,7 +229,7 @@ public class MonitorPeripheral implements IPeripheral
case 20: case 20:
case 21: case 21:
{ {
// setColour/setColor // setPaletteColour/setPaletteColor
Terminal terminal = m_monitor.getTerminal().getTerminal(); Terminal terminal = m_monitor.getTerminal().getTerminal();
boolean isColour = m_monitor.getTerminal().isColour(); boolean isColour = m_monitor.getTerminal().isColour();
@ -270,7 +270,7 @@ public class MonitorPeripheral implements IPeripheral
case 22: case 22:
case 23: case 23:
{ {
// getColour/getColor // getPaletteColour/getPaletteColor
Terminal terminal = m_monitor.getTerminal().getTerminal(); Terminal terminal = m_monitor.getTerminal().getTerminal();
Palette palette = terminal.getPalette(); Palette palette = terminal.getPalette();

View File

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