<commit_before>#include "entity_system.h"
#include "connection.h"
#include "cmapclient.h"
#include "enumerate.h"
#include "itemdb.h"
#include "config.h"
#include <entt.hpp>
#include "components/basic_info.h"
#include "components/client.h"
#include "components/computed_values.h"
#include "components/damage.h"
#include "components/destination.h"
#include "components/faction.h"
#include "components/character_graphics.h"
#include "components/guild.h"
#include "components/hotbar.h"
#include "components/inventory.h"
#include "components/item.h"
#include "components/level.h"
#include "components/life.h"
#include "components/lua.h"
#include "components/magic.h"
#include "components/mob.h"
#include "components/npc.h"
#include "components/owner.h"
#include "components/player_spawn.h"
#include "components/position.h"
#include "components/spawner.h"
#include "components/skills.h"
#include "components/stamina.h"
#include "components/stats.h"
#include "components/status_effects.h"
#include "components/target.h"
#include "components/wishlist.h"
#include "components/warpgate.h"

#include "chat/normal_chat.h"
#include "chat/whisper_chat.h"
#include "chat/shout_chat.h"
#include "map/change_map.h"
#include "mouse/mouse_cmd.h"
#include "combat/combat.h"

#include "random.h"

#include "srv_remove_object.h"
#include "srv_switch_server.h"
#include "srv_teleport_reply.h"

#include <algorithm>
#include <cmath>

void update_command(EntitySystem& entitySystem, RoseCommon::Entity entity) {
    if (!entitySystem.has_component<Component::ComputedValues>(entity)) {
        return;
    }
    using RoseCommon::Command;
    auto& computed = entitySystem.get_component<Component::ComputedValues>(entity);
    if (entitySystem.has_component<Component::Destination>(entity)) {
        computed.command = Command::MOVE;
    } else if (entitySystem.has_component<Component::Target>(entity)) {// && entitySystem.has_component<Component::Damage>(entity)) {
        computed.command = Command::ATTACK;
    } else {
        computed.command = Command::STOP;
    }
}

void destroy_lua(RoseCommon::Registry& registry, RoseCommon::Entity entity) {
    {<commit_msg>Update entity_system.cpp<commit_after>#include "entity_system.h"
#include "connection.h"
#include "cmapclient.h"
#include "enumerate.h"
#include "itemdb.h"
#include "config.h"
#include <entt.hpp>
#include "components/basic_info.h"
#include "components/client.h"
#include "components/computed_values.h"
#include "components/damage.h"
#include "components/destination.h"
#include "components/faction.h"
#include "components/character_graphics.h"
#include "components/guild.h"
#include "components/hotbar.h"
#include "components/inventory.h"
#include "components/item.h"
#include "components/level.h"
#include "components/life.h"
#include "components/lua.h"
#include "components/magic.h"
#include "components/mob.h"
#include "components/npc.h"
#include "components/owner.h"
#include "components/player_spawn.h"
#include "components/position.h"
#include "components/spawner.h"
#include "components/skills.h"
#include "components/stamina.h"
#include "components/stats.h"
#include "components/status_effects.h"
#include "components/target.h"
#include "components/wishlist.h"
#include "components/warpgate.h"

#include "chat/normal_chat.h"
#include "chat/whisper_chat.h"
#include "chat/shout_chat.h"
#include "map/change_map.h"
#include "mouse/mouse_cmd.h"
#include "combat/combat.h"

#include "random.h"

#include "srv_remove_object.h"
#include "srv_switch_server.h"
#include "srv_teleport_reply.h"

#include <algorithm>
#include <cmath>

void update_command(EntitySystem& entitySystem, RoseCommon::Entity entity) {
    if (!entitySystem.has_component<Component::ComputedValues>(entity)) {
        return;
    }
    using RoseCommon::Command;
    auto& computed = entitySystem.get_component<Component::ComputedValues>(entity);
    if (entitySystem.has_component<Component::Destination>(entity)) {
        computed.command = Command::MOVE;
    } else if (entitySystem.has_component<Component::Target>(entity) && entitySystem.has_component<Component::Damage>(entity)) {
        computed.command = Command::ATTACK;
    } else {
        computed.command = Command::STOP;
    }
}

void destroy_lua(RoseCommon::Registry& registry, RoseCommon::Entity entity) {
    {
{'fraction_non_alphanumeric': 0.14767441860465116, 'fraction_numerical': 0.0, 'mean_word_length': 6.050819672131148, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6249051', 'n_tokens_mistral': 1434, 'n_tokens_neox': 1439, 'n_words': 251}