mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-03 07:03:00 +00:00
Fix peripheral.getMethods returning {}
I don't even know how this snuck past. Closes #346
This commit is contained in:
@@ -364,20 +364,17 @@ public class PeripheralAPI implements ILuaAPI, IAPIEnvironment.IPeripheralChange
|
||||
case 2:
|
||||
{
|
||||
// getMethods
|
||||
String[] methods = null;
|
||||
ComputerSide side = ComputerSide.valueOfInsensitive( getString( args, 0 ) );
|
||||
if( side != null )
|
||||
{
|
||||
synchronized( m_peripherals )
|
||||
{
|
||||
PeripheralWrapper p = m_peripherals[side.ordinal()];
|
||||
if( p != null )
|
||||
{
|
||||
methods = p.getMethods();
|
||||
}
|
||||
if( p != null ) return new Object[] { p.getMethods() };
|
||||
}
|
||||
}
|
||||
return methods != null ? new Object[] { new HashMap<>() } : null;
|
||||
|
||||
return null;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user