Drop Item to Equipped Slot/Lift worn item off

Thoughts on the further development of Haven & Hearth? Feel free to opine!

Drop Item to Equipped Slot/Lift worn item off

Postby Killface » Thu Apr 08, 2010 5:39 am

I'm really lazy, and the new moderators seem to need something productive to do, so merge this if its old i guess, but:

I would like to be able to pick an item up and drop it on a full equipment slot, and have the old item replace the new on cursor.
Seems like a realistic request, amirite?





YOYOYO SHOUTOUT TO SABINATI WUT WUT
GREAT MODERATOR OR GREATEST MODERATOR?
Jackard wrote:kvc has eleven secret herbs and spices
User avatar
Killface
 
Posts: 259
Joined: Mon Oct 05, 2009 5:27 am

Re: Drop Item to Equipped Slot/Lift worn item off

Postby sabinati » Thu Apr 08, 2010 5:40 am

agreed 100%
User avatar
sabinati
 
Posts: 15513
Joined: Mon Jul 13, 2009 4:25 am
Location: View active topics

Re: Drop Item to Equipped Slot/Lift worn item off

Postby loftar » Thu Apr 08, 2010 5:49 am

That'd be nice, but it's actually programmatically trickier than it might at first seem.

Part of the equipment "protocol" is checking whether all prerequisites for equipping an item are satisfied, which includes checking that the slot(s) the item might need is free. If there is already an item equipped there, the check will, therefore, fail. Thus, in order to equip an item in an occupied slot, the occupying item needs to be unequipped first.

I could, theoretically, unequip the current item, the try and equip the new item, and then, if that fails, reequip the old item, but the downsides to that option are that 1) the old item would still suffer the effects on unequipping (such as a torch being put out) and 2) it is unclear how to handle the old item refusing to reequip (such as would be the case with bloated leeches).
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9051
Joined: Fri Apr 03, 2009 7:05 am

Re: Drop Item to Equipped Slot/Lift worn item off

Postby sabinati » Thu Apr 08, 2010 6:00 am

could you make the old item go to a free space in inventory, and failing that, drop on the ground?
User avatar
sabinati
 
Posts: 15513
Joined: Mon Jul 13, 2009 4:25 am
Location: View active topics

Re: Drop Item to Equipped Slot/Lift worn item off

Postby Swordmage » Thu Apr 08, 2010 6:36 am

sabinati wrote:could you make the old item go to a free space in inventory, and failing that, drop on the ground?

Drop that nice shiny new hi-Q axe that is being swapped for a fishing pole (while sitting in a boat)?
User avatar
Swordmage
 
Posts: 124
Joined: Fri Mar 26, 2010 3:48 am

Re: Drop Item to Equipped Slot/Lift worn item off

Postby Lothaudus » Thu Apr 08, 2010 12:05 pm

loftar wrote:I could, theoretically, unequip the current item, the try and equip the new item, and then, if that fails, reequip the old item, but the downsides to that option are that 1) the old item would still suffer the effects on unequipping (such as a torch being put out) and 2) it is unclear how to handle the old item refusing to reequip (such as would be the case with bloated leeches).

If an item is on the cursor and you click an inventory slot, call the check to see if that item can be equipped but pass a flag to that function so that it ignores the "is the slot free" check.

If that is successful (so the item CAN be equipped), then item A is unequipped (and placed in some kind of temp program storage), item B is equipped and then item A is put on the cursor.

Issue: What if you're equipping a two-handed item (pickaxe) and have both hands already equipped (an axe and saw)? Well...

sabinati wrote:could you make the old item go to a free space in inventory, and failing that...

... refuse to do the swap.
Barry Fletcher Norwin
Lawspeaker of Crossroads - Leader of Codexia - Keeper of the Cheese
http://www.rpgcodex.net
User avatar
Lothaudus
 
Posts: 641
Joined: Fri Oct 23, 2009 12:32 pm
Location: Adelaide, Australia

Re: Drop Item to Equipped Slot/Lift worn item off

Postby sabinati » Thu Apr 08, 2010 1:34 pm

Lothaudus wrote:
sabinati wrote:could you make the old item go to a free space in inventory, and failing that...

... refuse to do the swap.


yeah that's probably better
User avatar
sabinati
 
Posts: 15513
Joined: Mon Jul 13, 2009 4:25 am
Location: View active topics


Return to Critique & Ideas

Who is online

Users browsing this forum: Claude [Bot], Google [Bot] and 2 guests