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:
parent
54273fc6e5
commit
70c2f50aa8
@ -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" );
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user