1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-10-06 21:07:25 +03:00

Allow for same-size core upgrades (#6558)

This commit is contained in:
Matthew (or Maya) Peng 2022-02-05 14:58:36 -08:00 committed by GitHub
parent c877c3416e
commit 6a053f2f45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,7 +116,7 @@ public class CoreBlock extends StorageBlock{
@Override
public boolean canReplace(Block other){
//coreblocks can upgrade smaller cores
return super.canReplace(other) || (other instanceof CoreBlock && size > other.size);
return super.canReplace(other) || (other instanceof CoreBlock && size >= other.size && other != this);
}
@Override