Security Term now displays a message when there is no power.
Removed "No Message" Sorting. You can no longer insert a biometric card for the Admin.
This commit is contained in:
@@ -10,6 +10,7 @@ import appeng.block.AEBaseBlock;
|
|||||||
import appeng.client.render.BaseBlockRender;
|
import appeng.client.render.BaseBlockRender;
|
||||||
import appeng.client.render.blocks.RendererSecurity;
|
import appeng.client.render.blocks.RendererSecurity;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
|
import appeng.core.localization.PlayerMessages;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
import appeng.tile.misc.TileSecurity;
|
import appeng.tile.misc.TileSecurity;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
@@ -39,8 +40,16 @@ public class BlockSecurity extends AEBaseBlock
|
|||||||
if ( tg != null )
|
if ( tg != null )
|
||||||
{
|
{
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SECURITY );
|
{
|
||||||
|
if ( tg.isPowered() )
|
||||||
|
{
|
||||||
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SECURITY );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
p.sendChatToPlayer( PlayerMessages.MachineNotPowered.get() );
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,8 +132,8 @@ public class ItemRepo
|
|||||||
|
|
||||||
if ( SortBy == SortOrder.AMOUNT )
|
if ( SortBy == SortOrder.AMOUNT )
|
||||||
Collections.sort( view, ItemSorters.ConfigBased_SortBySize );
|
Collections.sort( view, ItemSorters.ConfigBased_SortBySize );
|
||||||
else if ( SortBy == SortOrder.MOD )
|
// else if ( SortBy == SortOrder.MOD )
|
||||||
Collections.sort( view, ItemSorters.ConfigBased_SortByMod );
|
// Collections.sort( view, ItemSorters.ConfigBased_SortByMod );
|
||||||
else
|
else
|
||||||
Collections.sort( view, ItemSorters.ConfigBased_SortByName );
|
Collections.sort( view, ItemSorters.ConfigBased_SortByName );
|
||||||
|
|
||||||
|
|||||||
@@ -115,6 +115,10 @@ public class SecurityInventory implements IMEInventoryHandler<IAEItemStack>
|
|||||||
IBiometricCard tbc = (IBiometricCard) input.getItem();
|
IBiometricCard tbc = (IBiometricCard) input.getItem();
|
||||||
String newUser = tbc.getUsername( input.getItemStack() );
|
String newUser = tbc.getUsername( input.getItemStack() );
|
||||||
|
|
||||||
|
int PlayerID = AEApi.instance().registries().players().getID( newUser );
|
||||||
|
if ( securityTile.getOwner() == PlayerID )
|
||||||
|
return false;
|
||||||
|
|
||||||
for (IAEItemStack ais : storedItems)
|
for (IAEItemStack ais : storedItems)
|
||||||
{
|
{
|
||||||
if ( ais.isMeaninful() )
|
if ( ais.isMeaninful() )
|
||||||
|
|||||||
@@ -270,4 +270,9 @@ public class TileSecurity extends AENetworkTile implements IStorageMonitorable,
|
|||||||
return securityKey;
|
return securityKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isPowered()
|
||||||
|
{
|
||||||
|
return gridProxy.isActive();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user