Renamed item pickup and drop functions to more closely match other item functions

pickup -> groundToCursor
drop -> cursorToGround
This commit is contained in:
Collin Smith 2020-05-30 16:49:40 -07:00
parent 24d0a07cea
commit 46581d11e1
4 changed files with 8 additions and 8 deletions

View File

@ -102,7 +102,7 @@ public class CursorMovementSystem extends BaseSystem {
Vector2 position = mPosition.get(src).position;
iso.toTile(tmpVec2.set(position));
Riiablo.charData.dropCursor();
Riiablo.charData.cursorToGround();
if (socket == null) {
factory.createItem(cursor, tmpVec2);
} else {

View File

@ -11,7 +11,7 @@ public class ItemInteractor extends PassiveSystem implements Interactable.Intera
@Override
public void interact(int src, int entity) {
items.pickupToCursor(src, entity);
items.groundToCursor(src, entity);
world.delete(entity);
}
}

View File

@ -16,13 +16,13 @@ public class ItemManager extends PassiveSystem {
protected ComponentMapper<Player> mPlayer;
protected ComponentMapper<Item> mItem;
public void pickupToCursor(int entityId, int dst) {
public void groundToCursor(int entityId, int dst) {
com.riiablo.item.Item item = mItem.get(dst).item;
mPlayer.get(entityId).data.pickupToCursor(item);
mPlayer.get(entityId).data.groundToCursor(item);
}
public void dropCursor(int entityId) {
mPlayer.get(entityId).data.dropCursor();
public void cursorToGround(int entityId) {
mPlayer.get(entityId).data.cursorToGround();
}
public void storeToCursor(int entityId, int i) {

View File

@ -380,11 +380,11 @@ public class CharData implements ItemData.UpdateListener, Pool.Poolable {
return itemData;
}
public void pickupToCursor(Item item) {
public void groundToCursor(Item item) {
itemData.pickup(item);
}
public void dropCursor() {
public void cursorToGround() {
itemData.drop();
}