Make players assume ownership of networks when they place security stations onto unsecured ones (#4714)
* Fixes #4712: When a security station is placed onto an unsecured network, the placer assumes ownership of the entire network. Otherwise the contiguous network would not necessarily reconnect in the same way when the chunk is reloaded due to differing player-ids throughout the network. In addition, changes to the node's owner were not being persisted due to the host never being marked as dirty. * Fix formatting
This commit is contained in:
@@ -167,7 +167,6 @@ public class AENetworkProxy implements IGridBlock {
|
||||
* short cut!
|
||||
*
|
||||
* @return grid of node
|
||||
*
|
||||
* @throws GridAccessException of node or grid is null
|
||||
*/
|
||||
public IGrid getGrid() throws GridAccessException {
|
||||
@@ -280,6 +279,11 @@ public class AENetworkProxy implements IGridBlock {
|
||||
|
||||
@Override
|
||||
public void onGridNotification(final GridNotification notification) {
|
||||
if (notification == GridNotification.OWNER_CHANGED) {
|
||||
gp.saveChanges();
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.gp instanceof CablePart) {
|
||||
((CablePart) this.gp).markForUpdate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user