Update bot.js
Transport fix
This commit is contained in:
parent
ea591019a3
commit
6cf08af3a9
9
bot.js
9
bot.js
@ -1245,6 +1245,7 @@ const resourceTransportation = async () => {
|
|||||||
for (const enterprise of enterprises) {
|
for (const enterprise of enterprises) {
|
||||||
const {
|
const {
|
||||||
id,
|
id,
|
||||||
|
name,
|
||||||
resourceType,
|
resourceType,
|
||||||
currentResources,
|
currentResources,
|
||||||
playerId
|
playerId
|
||||||
@ -1258,7 +1259,7 @@ const resourceTransportation = async () => {
|
|||||||
|
|
||||||
if (trucks.length === 0) {
|
if (trucks.length === 0) {
|
||||||
console.log(
|
console.log(
|
||||||
`Предприятие ${id}: нет доступных грузовиков для транспортировки.`
|
`[${id}] ${name}: нет доступных грузовиков для транспортировки.`
|
||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1270,7 +1271,7 @@ const resourceTransportation = async () => {
|
|||||||
|
|
||||||
if (!warehouse) {
|
if (!warehouse) {
|
||||||
console.log(
|
console.log(
|
||||||
`Предприятие ${id}: у игрока ${playerId} нет универсального склада.`
|
`[${id}] ${name}: у игрока ${playerId} нет универсального склада.`
|
||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1308,11 +1309,11 @@ const resourceTransportation = async () => {
|
|||||||
|
|
||||||
if (totalTransported === 0) {
|
if (totalTransported === 0) {
|
||||||
console.log(
|
console.log(
|
||||||
`Предприятие ${id}: склад заполнен, транспортировка невозможна.`
|
`[${id}] ${name}: склад заполнен, транспортировка невозможна.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log(`Предприятие ${id}: нет ресурсов для транспортировки.`);
|
console.log(`[${id}] ${name}: нет ресурсов для транспортировки.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user