1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-10 02:13:04 +00:00

Get rid of setPaletteColour table overload

This commit is contained in:
Lignum
2017-05-07 15:04:09 +02:00
parent 941d47908f
commit c10e1ba78c
3 changed files with 6 additions and 76 deletions

View File

@@ -232,14 +232,6 @@ public class MonitorPeripheral implements IPeripheral
// setPaletteColour/setPaletteColor
Terminal terminal = m_monitor.getTerminal().getTerminal();
if(args.length >= 1 && args[0] instanceof HashMap )
{
@SuppressWarnings( { "unchecked" } ) // There isn't really a nice way around this :(
HashMap<Object, Object> colourTbl = (HashMap<Object, Object>)args[0];
dan200.computercraft.core.apis.TermAPI.setColour( terminal, colourTbl );
return null;
}
if(args.length == 2 && args[0] instanceof Double && args[1] instanceof Double)
{
int colour = 15 - dan200.computercraft.core.apis.TermAPI.parseColour( args, true );
@@ -259,7 +251,7 @@ public class MonitorPeripheral implements IPeripheral
return null;
}
throw new LuaException( "Expected table or number, number, number, number" );
throw new LuaException( "Expected number, number or number, number, number, number" );
}
case 22:
case 23: