By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now!I've only tested it with the inventory, I'll try equipped items in a sec.Is it just the inventory or does this also happen for equiped items and such?
Did you end up fixing the inventory opening that i told you about a while back? It wouldn't hover the ribbon to get to the inventory component, but if you hover it yourself it opens the inventory fineIs it just the inventory or does this also happen for equiped items and such?
No, it's likely the same issue.Did you end up fixing the inventory opening that i told you about a while back? It wouldn't hover the ribbon to get to the inventory component, but if you hover it yourself it opens the inventory fine
My bad, yeah, it's the same issue for equipped items (tested with Ring of Duelling).
I've added explicit inventory opening for next update due to this bug xD@Cloud Please find this and fix this as it is the only bug in Alpha Fighter.
THE ONLY BUG.
Trying to alch something with the equipment tab open for 9 hours is not good.
You the manMy bad, yeah, it's the same issue for equipped items (tested with Ring of Duelling).
I tried hovering over the ribbon, like @Aidden said, and then it seemed to be able to open the equipment tab by itself.
I've added explicit inventory opening for next update due to this bug xD
/**
* Interacts with a SpriteItem. Only works if item is in inventory or
* equipped.
*
* @param item The item to interact with
* @param action The action to interact
* @return Returns true if interaction was successful
*/
public static boolean item(SpriteItem item, String action) {
if (item != null && item.isValid()) {
Openable tab;
SpriteItem.Origin origin = item.getOrigin();
if (origin.equals(SpriteItem.Origin.INVENTORY)) {
tab = InterfaceWindows.getInventory();
} else if (origin.equals(SpriteItem.Origin.EQUIPMENT)) {
tab = InterfaceWindows.getEquipment();
} else {
return false;
}
if (tab.isOpen()) {
return item.interact(action);
} else {
if (tab.open()) {
final Openable t = tab;
Execution.delayUntil(t::isOpen, Random.nextInt(1500, 3000));
}
}
}
return false;
}
The ribbons always visible afaik. But it doesn't know to hover the icon on the ribbon that then gives you access to the inventory buttonUnder what conditions is the ribbon visible? Can someone loan me an account that has that?
I borrowed an account and it wasn't there, hence why I was asking.The ribbons always visible afaik. But it doesn't know to hover the icon on the ribbon that then gives you access to the inventory button
DM me on slack and i'll show youI borrowed an account and it wasn't there, hence why I was asking.
That name though, wouldn't interact have been a better choice? xDFor anyone who want.
Code:/** * Interacts with a SpriteItem. Only works if item is in inventory or * equipped. * * @param item The item to interact with * @param action The action to interact * @return Returns true if interaction was successful */ public static boolean item(SpriteItem item, String action) { if (item != null && item.isValid()) { Openable tab; SpriteItem.Origin origin = item.getOrigin(); if (origin.equals(SpriteItem.Origin.INVENTORY)) { tab = InterfaceWindows.getInventory(); } else if (origin.equals(SpriteItem.Origin.EQUIPMENT)) { tab = InterfaceWindows.getEquipment(); } else { return false; } if (tab.isOpen()) { return item.interact(action); } else { if (tab.open()) { final Openable t = tab; Execution.delayUntil(t::isOpen, Random.nextInt(1500, 3000)); } } } return false; }
The class name is Interact...That name though, wouldn't interact have been a better choice? xD
Strange, normally you'd name the class a noun, not a verb... Like Interaction or something Just nitpicking, but I thought conventions was one of your pet peeves too?The class name is Interact...
Are we really going to talk about this?Strange, normally you'd name the class a noun, not a verb... Like Interaction or something Just nitpicking, but I thought conventions was one of your pet peeves too?
I'm assuming he's done this because then he can have different interact methods for different types of object in one class, rather than creating an Item class, and Npc class etc with separate interact methods (hence the method being called item). It's a bit backwards, but saves making multiple classes just to have one method in them.Strange, normally you'd name the class a noun, not a verb... Like Interaction or something Just nitpicking, but I thought conventions was one of your pet peeves too?
We use essential cookies to make this site work, and optional cookies to enhance your experience.