hkzorman / advanced_npc

Advanced NPC for Minetest, using mobs_redo API
Other
17 stars 5 forks source link

Fix code debugger #62

Open BrunoMine opened 5 years ago

BrunoMine commented 5 years ago

You need to reduce tons of messages in the debugger. You can add a control for development or just remove permanently.

BrunoMine commented 4 years ago

Example:

[advanced_npc] INFO: walk_to_pos Found path (2 nodes) from (1533,31,1139) to: (1535,31,1139)
[Server]: No obj found
[Server]: Interrupted process: {
    program_name = "sunos:interagir_mobilia",
    instruction_queue = {
        {
            name = "advanced_npc:interrupt",
            args = {
                new_program = "advanced_npc:walk_to_pos",
                interrupt_options = {

                },
                new_args = {
                    walkable = {
                        "sunos:carpete_palha",
                        "sunos:carpete_palha_nodrop",
                        "sunos:torch_nodrop",
                        "sunos:torch_ceiling_nodrop",
                        "sunos:torch_wall_nodrop"
                    },
                    optimize_one_node_distance = false,
                    end_pos = {
                        place_type = "sunos_alvo_mobilia",
                        use_access_node = true
                    }
                }
            }
        },
        {
            name = "sunos:rotate_to_pos",
            args = {
                pos = {
                    y = 29,
                    x = 1519,
                    z = 1122
                }
            }
        },
        {
            name = "sunos:set_animation",
            args = {
                start_frame = 1,
                end_frame = 60,
                check_pos = {
                    y = 29,
                    x = 1519,
                    z = 1122
                },
                mesh = "sunos_movimento_bancada.b3d",
                frame_speed = 25
            }
        },
        {
            name = "advanced_npc:wait",
            args = {
                time = 1
            }
        },
        {
            name = "sunos:set_animation",
            args = {
                start_frame = 20,
                end_frame = 60,
                check_pos = {
                    y = 29,
                    x = 1519,
                    z = 1122
                },
                mesh = "sunos_movimento_bancada.b3d",
                frame_speed = 25
            }
        },
        {
            name = "sunos:add_efeito_interacao_mobilia",
            args = {
                m = {
                    som = {
                        gain = 0.9,
                        name = "sunos_batidas_bancada",
                        alcance = 7
                    },
                    anim = {
                        pre_act_time = 1,
                        act_frame_speed = 25,
                        pos_act_frame_speed = 20,
                        pre_act_frame_speed = 25,
                        act_frame_end = 60,
                        pre_act_frame_start = 1,
                        name = "sunos_movimento_bancada.b3d",
                        pos_act_frame_end = 160,
                        pre_act_frame_end = 60,
                        pos_act_frame_start = 55,
                        pos_act_time = 1.7,
                        act_frame_start = 20
                    },
                    time = 8,
                    particulas = {
                        textura = "sunos_poeirinha.png",
                        tipo = "simples"
                    }
                },
                check_pos = {
                    y = 29,
                    x = 1519,
                    z = 1122
                },
                pos = {
                    y = 29,
                    x = 1519,
                    z = 1122
                }
            }
        },
        {
            name = "advanced_npc:wait",
            args = {
                time = 8
            }
        },
        {
            name = "sunos:set_animation",
            args = {
                start_frame = 55,
                end_frame = 160,
                check_pos = {
                    y = 29,
                    x = 1519,
                    z = 1122
                },
                pos_reset_time = 1.7,
                pos_reset = true,
                mesh = "sunos_movimento_bancada.b3d",
                frame_speed = 20
            }
        },
        {
            name = "sunos:mark_place_used",
            args = {
                value = "false",
                pos = {
                    y = 29,
                    x = 1519,
                    z = 1122
                }
            }
        }
    },
    state = "running",
    arguments = {
        place_names = {
            "bau_primario",
            "compostagem_1",
            "compostagem_2",
            "tear_1",
            "tear_2",
            "bancada_de_trabalho_1",
            "bancada_de_trabalho_2",
            "kit_culinario_1",
            "kit_culinario_2",
            "caixa_de_musica_1",
            "caixa_de_musica_2"
        }
    },
    state_process_id = 1567338443,
    execution_context = {
        instr_timer = 0,
        data = {

        },
        instr_interval = 1
    },
    current_instruction = {
        entry = {
            name = "advanced_npc:interrupt",
            args = {
                new_program = "advanced_npc:walk_to_pos",
                interrupt_options = {

                },
                new_args = {
                    walkable = {
                        "sunos:carpete_palha",
                        "sunos:carpete_palha_nodrop",
                        "sunos:torch_nodrop",
                        "sunos:torch_ceiling_nodrop",
                        "sunos:torch_wall_nodrop"
                    },
                    optimize_one_node_distance = false,
                    end_pos = {
                        place_type = "sunos_alvo_mobilia",
                        use_access_node = true
                    }
                }
            }
        },
        state = "executing",
        pos = {
            y = 31.5,
            x = 1518,
            z = 1122
        }
    },
    interrupted_process = {
        program_name = "sunos:interagir_mobilia",
        instruction_queue = {

        },
        state = "paused",
        arguments = {
            place_names = {
                "bau_primario",
                "compostagem_1",
                "compostagem_2",
                "tear_1",
                "tear_2",
                "bancada_de_trabalho_1",
                "bancada_de_trabalho_2",
                "kit_culinario_1",
                "kit_culinario_2",
                "caixa_de_musica_1",
                "caixa_de_musica_2"
            }
        },
        state_process_id = 1567338393,
        execution_context = {
            instr_timer = 0.27000001072884,
            data = {

            },
            instr_interval = 1
        },
        current_instruction = {
            entry = {
                name = "advanced_npc:set_instruction_interval",
                args = {
                    interval = 1
                }
            },
            state = "executing",
            pos = {
                y = 31.5,
                x = 1518,
                z = 1122
            }
        },
        interrupted_process = {
            program_name = "sunos:interagir_mobilia",
            instruction_queue = {

            },
            state = "paused",
            arguments = {
                place_names = {
                    "bau_primario",
                    "compostagem_1",
                    "compostagem_2",
                    "tear_1",
                    "tear_2",
                    "bancada_de_trabalho_1",
                    "bancada_de_trabalho_2",
                    "kit_culinario_1",
                    "kit_culinario_2",
                    "caixa_de_musica_1",
                    "caixa_de_musica_2"
                }
            },
            state_process_id = 1567338343,
            execution_context = {
                instr_timer = 0.27000001072884,
                data = {

                },
                instr_interval = 1
            },
            current_instruction = {
                entry = {
                    name = "advanced_npc:set_instruction_interval",
                    args = {
                        interval = 1
                    }
                },
                state = "executing",
                pos = {
                    y = 28.5,
                    x = 1518,
                    z = 1123
                }
            },
            interrupted_process = {
                program_name = "sunos:interagir_mobilia",
                instruction_queue = {

                },
                state = "paused",
                arguments = {
                    place_names = {
                        "bau_primario",
                        "compostagem_1",
                        "compostagem_2",
                        "tear_1",
                        "tear_2",
                        "bancada_de_trabalho_1",
                        "bancada_de_trabalho_2",
                        "kit_culinario_1",
                        "kit_culinario_2",
                        "caixa_de_musica_1",
                        "caixa_de_musica_2"
                    }
                },
                state_process_id = 1567338293,
                execution_context = {
                    instr_timer = 0.27000001072884,
                    data = {

                    },
                    instr_interval = 1
                },
                current_instruction = {
                    entry = {
                        name = "advanced_npc:set_instruction_interval",
                        args = {
                            interval = 1
                        }
                    },
                    state = "executing",
                    pos = {
                        y = 28.5,
                        x = 1518,
                        z = 1123
                    }
                },
                interrupt_options = {
                    allow_punch = true,
                    allow_rightclick = true,
                    allow_schedule = true
                },
                is_state_process = true
            },
            interrupt_options = {
                allow_punch = true,
                allow_rightclick = true,
                allow_schedule = true
            },
            is_state_process = true
        },
        interrupt_options = {
            allow_punch = true,
            allow_rightclick = true,
            allow_schedule = true
        },
        is_state_process = true
    },
    interrupt_options = {
        allow_punch = true,
        allow_rightclick = true,
        allow_schedule = true
    },
    is_state_process = true
}