From 46581d11e142b905e8bbfc25c169141156363fbf Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Sat, 30 May 2020 16:49:40 -0700 Subject: [PATCH] Renamed item pickup and drop functions to more closely match other item functions pickup -> groundToCursor drop -> cursorToGround --- .../com/riiablo/engine/client/CursorMovementSystem.java | 2 +- core/src/com/riiablo/engine/server/ItemInteractor.java | 2 +- core/src/com/riiablo/engine/server/ItemManager.java | 8 ++++---- core/src/com/riiablo/save/CharData.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/src/com/riiablo/engine/client/CursorMovementSystem.java b/core/src/com/riiablo/engine/client/CursorMovementSystem.java index be7633df..3906b3b9 100644 --- a/core/src/com/riiablo/engine/client/CursorMovementSystem.java +++ b/core/src/com/riiablo/engine/client/CursorMovementSystem.java @@ -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 { diff --git a/core/src/com/riiablo/engine/server/ItemInteractor.java b/core/src/com/riiablo/engine/server/ItemInteractor.java index 49133542..aa4bfc0c 100644 --- a/core/src/com/riiablo/engine/server/ItemInteractor.java +++ b/core/src/com/riiablo/engine/server/ItemInteractor.java @@ -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); } } diff --git a/core/src/com/riiablo/engine/server/ItemManager.java b/core/src/com/riiablo/engine/server/ItemManager.java index c24731ba..40b75db0 100644 --- a/core/src/com/riiablo/engine/server/ItemManager.java +++ b/core/src/com/riiablo/engine/server/ItemManager.java @@ -16,13 +16,13 @@ public class ItemManager extends PassiveSystem { protected ComponentMapper mPlayer; protected ComponentMapper 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) { diff --git a/core/src/com/riiablo/save/CharData.java b/core/src/com/riiablo/save/CharData.java index af07e008..e4a3c4ac 100644 --- a/core/src/com/riiablo/save/CharData.java +++ b/core/src/com/riiablo/save/CharData.java @@ -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(); }