[Pogamut-list] Own A* (originally posted by jakub.gemrot)

jakub.gemrot pogamut-forum at diana.ms.mff.cuni.cz
Wed May 12 21:19:23 CEST 2010


Re: Re: Own A* (originally posted by jakub.gemrot)

Author: jakub.gemrot

Ok, so the cheats are enabled, good.

These strings are known to work:

getAct().act(new AddInventory().setType("XWeapons.FlakCannonPickup"));
getAct().act(new AddInventory().setType("XWeapons.FlakAmmoPickup"));

As you can see, we're using only the "name" of the item. Actualy, ItemType is serializing a lot of stuff into one string:
Here is a code of ItemType.toString()

       public String toString() {
		return "ItemType[name = " + name + ", category = " + category + ", group = " + group + "]";
	}

What you seek is that 'name' property.

Try:
new AddInventory().setType(municionItemType.getName())

If that is not working, try to log, what the 'getName()' is returing to you (post it here please).
Alternatively, you may see the source code of the ItemType and obtain these names manually.

Cheers!

Jimmy

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=164&post_reply=1#form>





More information about the Pogamut-list mailing list