<commit_before>'use strict';

function DynamicContentManager() {

    this.entity_added = function(entity, world) {

    };

    this.entity_changed = function(entity, world) {

    };

    ///////

    this.load_schedule_content = function() {
        // Go through each dynamic world.
        for (var relative_id in this.dynamic_worlds) {
            if (this.dynamic_worlds.hasOwnProperty(relative_id)) {

                var dynamic_world = this.dynamic_worlds[relative_id];

                if (!dynamic_world.dynamic_content_loaded) {
                    dynamic_world.load_dynamic_content();
                }


                l('Fetching schedule entities from world');
                l(dynamic_world);
                var schedule_entities = this.get_all_schedule_viewable_entities_from_world(dynamic_world);

                for (var e = 0; e < schedule_entities.length; e++) {
                    this.add_entity_to_world_month_views(schedule_entities[e], dynamic_world);
                    this.add_entity_to_world_month_views(schedule_entities[e], MANAGER_WORLD.world_home);
                }
            }
        }
    };

    this.add_entity_to_world_month_views = function(entity, world) {
        if (world.month_view_walls.length > 0) {
            for (var mv = 0; mv < world.month_view_walls.length; mv++) {
                l('Adding entity to month view walls:');
                l(entity);
                world.month_view_walls.add_viewable_entity(entity);
            }
        }
    };

    this.get_all_schedule_viewable_entities_from_world = function(world) {
        var all_schedule_viewable_entities = [];<commit_msg>client side dynamic content managment 03<commit_after>'use strict';

function DynamicContentManager() {

    this.entity_added = function(entity, world) {

    };

    this.entity_changed = function(entity, world) {

    };

    ///////

    this.load_schedule_content = function() {
        // Go through each dynamic world.
        for (var relative_id in this.dynamic_worlds) {
            if (this.dynamic_worlds.hasOwnProperty(relative_id)) {

                var dynamic_world = this.dynamic_worlds[relative_id];

                if (!dynamic_world.dynamic_content_loaded) {
                    dynamic_world.load_dynamic_content();
                }


                l('Fetching schedule entities from world');
                l(dynamic_world);
                var schedule_entities = this.get_all_schedule_viewable_entities_from_world(dynamic_world);

                for (var e = 0; e < schedule_entities.length; e++) {
                    this.add_entity_to_world_month_views(schedule_entities[e], dynamic_world);
                    this.add_entity_to_world_month_views(schedule_entities[e], MANAGER_WORLD.world_home);
                }
            }
        }
    };

    this.add_entity_to_world_month_views = function(entity, world) {
        if (world.month_view_walls.length > 0) {
            for (var mv = 0; mv < world.month_view_walls.length; mv++) {
                l('Adding entity to month view walls:');
                l(entity);
                world.month_view_walls[mv].add_viewable_entity(entity);
            }
        }
    };

    this.get_all_schedule_viewable_entities_from_world = function(world) {
        var all_schedule_viewable_entities = [];
{'fraction_non_alphanumeric': 0.095952023988006, 'fraction_numerical': 0.0023988005997001498, 'mean_word_length': 2.1294559099437147, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '1697029', 'n_tokens_mistral': 993, 'n_tokens_neox': 932, 'n_words': 155}