Jessecar96 / SteamBot

Automated bot software for interacting with Steam Trade
http://scrap.tf
MIT License
1.34k stars 910 forks source link

Getting the bot's inventory #90

Closed Derongan closed 12 years ago

Derongan commented 12 years ago

This is probably a stupid question, but I can't manage to get the bot's inventory. How would I do this?

teliosdev commented 12 years ago

It should be Trade.myInventory, but someone ( cough @cwhelchel cough ) made that private. Someone should cough fix that.

cwhelchel commented 12 years ago

@redjazz96 Hmm... seems like you're trying to tell me something... not sure what though.

@Derongan brings up a point worth mentioning... Why doesn't the Bot itself have this inventory? Or rather, why does it have to go through a trade object?

cwhelchel commented 12 years ago

@Derongan When this is pulled in you can access the bot's inventory like this

Trade trade = new Trade(yada, yada, yada);

trade.MyInventory.GetItem(1234);
teliosdev commented 12 years ago

It's accessible through the Trade object because Trade is what sets up the inventory (through both the Steam Web API and the Trade API) as seen here. I agree, I think it should be accessible through the Bot object.

cwhelchel commented 12 years ago

@redjazz96 The pull request to expose this is ready.

I think we can address the other stuff separately and just get this in as a bug fix to get Derongan going.

Derongan commented 12 years ago

I changed the myinventory variable to public on my local copy, so Im not in dire need of a fix.