loadout_seller

Small loadout in charge of dealing with a user trying to equip a saved loadout First it will reserve all items that can be bought, and save the name of all items that cannot be bought If the list of items that cannot be bought is empty, the transaction will be automaticly accepted and the loadout will be equipped on the user If it's not empty, it will warn the user and give him the list of non-buyable items. The user can chose to proceed with the buy, and he is equipped with what was already be bought, or he can chose to refuse, and then the items are put back in the vendors
Vars | |
available_points | How many points can be used when equipping the loadout |
---|---|
buying_choices_left | The buying bitfield this marine used to equip the loadout |
faction | The faction of the seller. |
item_list | Assoc list of items in visible slots. |
unavailable_items | How many items were not available |
unique_items_list | Items that were taken from essential kits, used to check for duplicates |
Procs | |
do_equip_loadout | Will equip the mob with the items that were bought previously |
prepare_to_equip_loadout | Will save all the bought items in item_list, and keep the record of unavailable_items |
sell_rest_of_essential_kit | If one item from essential kit was bought, we sell the rest and put in on the ground |
try_to_equip_loadout | Buy all items of the loadout from vendors. If some items could not be bought, we warned the user and ask him if he wants to continue. If the user still want to proceed, we equip the user with the loadout Else we sell everything back to vendors |
Var Details
available_points

How many points can be used when equipping the loadout
buying_choices_left

The buying bitfield this marine used to equip the loadout
faction

The faction of the seller.
item_list

Assoc list of items in visible slots.
unavailable_items

How many items were not available
unique_items_list

Items that were taken from essential kits, used to check for duplicates
Proc Details
do_equip_loadout
Will equip the mob with the items that were bought previously
prepare_to_equip_loadout
Will save all the bought items in item_list, and keep the record of unavailable_items
sell_rest_of_essential_kit
If one item from essential kit was bought, we sell the rest and put in on the ground
try_to_equip_loadout
Buy all items of the loadout from vendors. If some items could not be bought, we warned the user and ask him if he wants to continue. If the user still want to proceed, we equip the user with the loadout Else we sell everything back to vendors