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:
parent
9aa8d416aa
commit
93ac258ee7
|
@ -10,6 +10,7 @@ import appeng.block.AEBaseBlock;
|
|||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.render.blocks.RendererSecurity;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.tile.misc.TileSecurity;
|
||||
import appeng.util.Platform;
|
||||
|
@ -39,8 +40,16 @@ public class BlockSecurity extends AEBaseBlock
|
|||
if ( tg != null )
|
||||
{
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
if ( tg.isPowered() )
|
||||
{
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SECURITY );
|
||||
}
|
||||
else
|
||||
p.sendChatToPlayer( PlayerMessages.MachineNotPowered.get() );
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -132,8 +132,8 @@ public class ItemRepo
|
|||
|
||||
if ( SortBy == SortOrder.AMOUNT )
|
||||
Collections.sort( view, ItemSorters.ConfigBased_SortBySize );
|
||||
else if ( SortBy == SortOrder.MOD )
|
||||
Collections.sort( view, ItemSorters.ConfigBased_SortByMod );
|
||||
// else if ( SortBy == SortOrder.MOD )
|
||||
// Collections.sort( view, ItemSorters.ConfigBased_SortByMod );
|
||||
else
|
||||
Collections.sort( view, ItemSorters.ConfigBased_SortByName );
|
||||
|
||||
|
|
|
@ -115,6 +115,10 @@ public class SecurityInventory implements IMEInventoryHandler<IAEItemStack>
|
|||
IBiometricCard tbc = (IBiometricCard) input.getItem();
|
||||
String newUser = tbc.getUsername( input.getItemStack() );
|
||||
|
||||
int PlayerID = AEApi.instance().registries().players().getID( newUser );
|
||||
if ( securityTile.getOwner() == PlayerID )
|
||||
return false;
|
||||
|
||||
for (IAEItemStack ais : storedItems)
|
||||
{
|
||||
if ( ais.isMeaninful() )
|
||||
|
|
|
@ -270,4 +270,9 @@ public class TileSecurity extends AENetworkTile implements IStorageMonitorable,
|
|||
return securityKey;
|
||||
}
|
||||
|
||||
public boolean isPowered()
|
||||
{
|
||||
return gridProxy.isActive();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue