Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pawn ai #8

Merged
merged 6 commits into from
Jan 4, 2024
Merged

pawn ai #8

merged 6 commits into from
Jan 4, 2024

Conversation

lain-dono
Copy link
Member

  • Добавил примитивный AI
  • Добавил механики для Дома, Поля, Рынка

В большей степени это просто примеры, чтоб оно двигалось и работало.

@lain-dono lain-dono requested a review from komunre January 3, 2024 00:09
src/character/inventory.rs Show resolved Hide resolved
src/character/movement.rs Outdated Show resolved Hide resolved
let delta = goal.translation - transform.translation;
let distance = delta.length();

trace!("Distance to {:?}: {}", std::any::type_name::<T>(), distance);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не имеет обозначения кто вызывает этот трейс, и из-за этого в процессе дебага будет довольно бесполезен.

src/character/movement.rs Outdated Show resolved Hide resolved
}

if action.is_cancelled() {
debug!("Movement to {:?} is cancelled", std::any::type_name::<T>());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавь идентификацию процесса поиска.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мб я просто удалю весь трейс, раз он выглядит ненужным?

ctrl.is_sleeping = true;
}

trace!("Sleeping...");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Идентификацию актора

ctrl.color = SLEEP_COLOR;

if fatigue.current <= sleep.until {
debug!("Woke up well-rested!");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Идентификацию актора

}

if action.is_cancelled() {
debug!("Sleep was interrupted. Still tired.");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Идентификацию актора

if action.is_executing() {
inventory.money += inventory.items as u32;
inventory.items = 0.0;
debug!("Sold! Money: {}", inventory.money);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Идентификацию транзакции

}

if action.is_cancelled() {
debug!("Selling was interrupted. Still need to work.");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Идентификацию транзакции и актора

@lain-dono lain-dono merged commit e22b75c into main Jan 4, 2024
2 of 3 checks passed
@lain-dono lain-dono deleted the pawn_ai branch January 4, 2024 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants