Closed XVs32 closed 9 months ago
Final decision:
- Use
port
api to find the equipment currently loaded on a ship- Use
api_get_member/ship3/api_slot_data
to find equipment currently unuse
_Originally posted by @XVs32 in https://github.com/XVs32/kcauto_custom/issues/85#issuecomment-1902114110_
The reload process will be:
2.Unload all equipment on a ship if she doesn't match any equipment on the list
Unload everything if any of the following hits:
Next step is loading equipment on a ship, the following need to be done:
Normal equipment load is done.... The issue is reinforcement slot has a different list for equipment, and every ship has different capability to load different equipment.....
I wonder if the port
or ship
api does show what reinforce equipment a ship can load...
Edit: There is, api_mst_equip_exslot:補強スロットに装備可能なカテゴリ
shows what カテゴリ a ship can use in reinforce slot,
This api only sends on kancolle start up, but this is static data afterall, so it should... be fine
The flow of generating available reinforce equipment list should be:
api_stype
(艦種ID) and api_ctype
(艦型ID) <= Ship
has the dataapi_mst_equip_exslot_ship
to get the special available equipment listapi_slot_data
to find the category of each special available equipmentLet't sort this out...
The api_id
is the production id (non-repetitive)
The api_ship_id
is the ship id (repetitive)
from this api call, api_id = local_api_id, and api_ship_id = api_id
I don't know why Minyoung made api_id = api_ship_id
, maybe some other api use api_id
as ship id(repetitive)
But whatever, I will stick with the definition above and rewrite Ship
class
Ship
class should now include all the info provided from api_start2/getData
and port
Today's progress:
todo:
There are three ways to find the "name_id" and "production_id" conversion list:
I decided to use the data from "Perform a sortie",
Data from api_get_member/slot_item
contains what I need.
Every time kcauto reads api, it also remove all apis currently queued up,
Which means if api A
and api B
arrive at the same time,
you cannot read api A
first, then come back later for api B
, because B
gets removed after the first read attempted.
The solution is simple, tell the api update function that you want to read both 'A' and 'B', instead of calling the update function twice.
The loading function looks good now, need more test to be sure though.
Since this function does not conflict with other functions,
I will merge it to develop
first for the coming event.
What
How
Result
Reference