Closed icylogic closed 9 years ago
Are you sure?
https://github.com/yuyuvn/KanColleViewer/blob/v3.8.2r556/Grabacr07.KanColleWrapper/Logger.cs#L83-85
I downloaded and tried in ver.3.8.2r556 and it logs in MaterialsLog.csv on resupply (kcsapi_charge).
So kcsapi_charge
and kcsapi_destroyship
work, while kcsapi_material
isn't (?), I guess it supposed to be called on ship construction, but
https://github.com/yuyuvn/KanColleViewer/blob/master/Grabacr07.KanColleWrapper/Logger.cs#L187
while I get source.Length == 8, so maybe this should be changed.
Also, we can subscribe to createitem
.
Or not subscribe to any of these and subscribe to port
instead, while tracking resource changes in Logger, that way it will log every time you go to the homeport and when resources had changed.
@gakada
Thanks for your quick response.
Today I've resupplied 24 times. And there are only 3 material logs which immediately occurred as I destroyed ships.
Is it possible that the new type of material ("改修", equipment improving) enlarge the materials list, so the length changes to 8? I've not check it yet. At least these usages of magic number is not a good style.
I agree that we could simply subscribe to port, since almost all events happen with changes of materials in fact.
I can't reproduce it, every time I scrap or resupply it appears in the file and in Log Viewer.
port
(with 改修 logging).I've just tested that pr, it works for me, thanks!
It seems that in these lines, material logger subcribes 3 events: api_get_member_material, api_req_hokyu_charge and api_req_kousyou_destroyship https://github.com/yuyuvn/KanColleViewer/blob/master/Grabacr07.KanColleWrapper/Logger.cs#L83-85 But in ver.3.8.2r556, it only take logs at ship destruction.
In addition, the counter of "resupply times" works properly