jpcsupplies / Economy_mod

Basic Economy System for Space Engineers
13 stars 12 forks source link

ENH: Request Price List #63

Closed jpcsupplies closed 8 years ago

jpcsupplies commented 8 years ago

We are now at the point where we need to be thinking how to structure the logic for players to "Request a Price List" eg /pricelist or /sell prices or /buy prices or /value all or /value buy or /value sell or /value pricelist etc

This logic has to be flexible enough that it is able to pull out both NPC market pricing, and offer/request pricing in any other markets/trader offers later on.

jpcsupplies commented 8 years ago

how about a command that takes the same parameters as the LCDs but displays the result in a mission screen box? Will need to show available stock however..

midspace commented 8 years ago

Can do.

jpcsupplies commented 8 years ago

That mission window bug is holding this one up.. hmm wonder why they didnt fix it yet.

midspace commented 8 years ago

More to the point, what changed to break it? I tried to look at it last week, but it looks like they're rearranged the code. I'm assuming the changes resulted in the breakage, but I'm also assuming the changes are to support an editable dialog.

midspace commented 8 years ago

the command /pricelist was put in prior to release. https://github.com/jpcsupplies/Economy_mod/releases/tag/1.7A

jpcsupplies commented 8 years ago

associated file was missing in git version - had to comment it out as it was throwing doesnt exist in current context errors if (split[0].Equals("/pricelist", StringComparison.InvariantCultureIgnoreCase)) { // TODO: add optional parameters.

            // doesnt exist yet MessageMarketPriceList.SendMessage();
        }

mind you it was 3am at the time and i was starting to see things..

midspace commented 8 years ago

Ah, file is there. just forgot to sync into .csproj file.

jpcsupplies commented 8 years ago

ya i figured but the pink flying elephants got in the way of the screen before i could check the folder

midspace commented 8 years ago

Damn those pink :elephant:

jpcsupplies commented 8 years ago

Ok, so all we need now is the uuuhm... "tools" "ore" "ingot" and "component" parameters.. and this one is totally done too..

I suppose when we get player trade region registration done we need a trade zone name parameter too or something that works over antennas, but we can worry about that part later.

Well that and keen fixing the mission box scroll bar.

jpcsupplies commented 8 years ago

Had a crack at adding the above parameters, but weird stuff kept happening in the warnings window, and adding a proto to the message sub failed entirely so i reverted the lot.

Left a quick comment listing the parameters tho. Was just going to use a simple split.length to see if any parameters were used, and ignore them if it wasn't something we expected. Seemed overkill for a regex where we only expect a single string.

midspace commented 8 years ago

I considered adding groupings to the price list. The formatting supports it now. 2015-12-27_00001

jpcsupplies commented 8 years ago

ok looks like i just need to update the help/documentation and thats our milestone nailed. Great work.