diff --git a/web/calculator.html b/web/calculator.html
index 35d07f5..543c07e 100644
--- a/web/calculator.html
+++ b/web/calculator.html
@@ -115,9 +115,9 @@
-
Скриншоты отчётаМожно выбрать несколько фотографий. Они будут загружены на img.nyan404.ru.
@@ -264,7 +264,7 @@
if (['mode', 'raw', 'resources'].includes(key)) return;
setField(target, key, value);
});
- if (fields.resources) setField(target, 'resources', fields.resources.map(item => `${item[0]}; ${item[1]}`).join('\n'));
+ if (fields.resources) setField(target, 'resources', fields.resources.map(item => `+${item[1]} ${item[0]}`).join('\n'));
(fields.extra_kittens || []).forEach(item => addExtraKitten({name: item[0], id: item[1], independence: item[2]}));
updateStatusRules();
bulkStatus.textContent = data.status === 'complete'
@@ -315,8 +315,9 @@
['escort_id', 'kitten_id', 'character_id', 'inspections'].forEach(key => { if (data[key] !== undefined && data[key] !== '') data[key] = Number(data[key]); });
if (mode === 'inspection') {
data.resources = (data.resources || '').split('\n').map(line => line.trim()).filter(Boolean).map(line => {
- const [name, amount] = line.split(';').map(item => item.trim());
- return [name, Number(amount)];
+ const match = line.match(/^\+\s*(\d+)\s+(.+)$/);
+ if (!match) throw new Error('Ресурс укажите так: +2 вьюнок.');
+ return [match[2].trim(), Number(match[1])];
});
}
if (mode === 'coaching') {