Fixed #3362
This commit is contained in:
@@ -295,7 +295,6 @@ public class UnitTypes implements ContentList{
|
|||||||
backColor = Pal.heal;
|
backColor = Pal.heal;
|
||||||
frontColor = Color.white;
|
frontColor = Color.white;
|
||||||
}};
|
}};
|
||||||
shootSound = Sounds.pew;
|
|
||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ public class Unloader extends Block{
|
|||||||
other.items.remove(item, 1);
|
other.items.remove(item, 1);
|
||||||
}
|
}
|
||||||
other.itemTaken(item);
|
other.itemTaken(item);
|
||||||
|
}else if(sortItem == null){
|
||||||
|
other.items.failTake();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -224,6 +224,18 @@ public class ItemModule extends BlockModule{
|
|||||||
takeRotation = item.id + 1;
|
takeRotation = item.id + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void failTake(){
|
||||||
|
for(int i = 1; i < items.length; i++){
|
||||||
|
int index = (i + takeRotation);
|
||||||
|
if(index >= items.length) index -= items.length;
|
||||||
|
if(items[index] > 0){
|
||||||
|
takeRotation += i;
|
||||||
|
takeRotation %= items.length;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public int get(int id){
|
public int get(int id){
|
||||||
return items[id];
|
return items[id];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=a6f488d6f741b98d123113ceb26439032be0719e
|
archash=f7fcd4a78e01b1ad41e1bc57c25a78d12c51ec54
|
||||||
|
|||||||
Reference in New Issue
Block a user