Skip to content

Commit 04e0f01

Browse files
committed
fix(interface): put npc related code in correct places
1 parent aece7cd commit 04e0f01

File tree

3 files changed

+33
-358
lines changed

3 files changed

+33
-358
lines changed

source/interface.py

-351
This file was deleted.

source/interface/display.py

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import os
22
import platform
33
from colorama import Fore, Style
4+
import time
5+
import queries.query as query
46

57
# Clean the terminal screen
68
def clear_screen():
@@ -38,4 +40,25 @@ def list_options(options: list) -> None:
3840
def list_characters(characters: list) -> None:
3941
print("\nPersonagens disponíveis:")
4042
for idx, character in enumerate(characters, start=1):
41-
print(f"\n {idx}. {character[1]} - {character[2]}")
43+
print(f"\n {idx}. {character[1]} - {character[2]}")
44+
45+
46+
def display_npc_info(npc_nome, npc_tipo, conn):
47+
descricao = query.get_civilian_info(conn, npc_nome)
48+
print(Fore.CYAN + "\n--- Ficha do Personagem ---" + Style.RESET_ALL)
49+
print(Fore.GREEN + f"Nome: {descricao['nome']}" + Style.RESET_ALL)
50+
print(Fore.GREEN + f"Descrição: {descricao['descricao']}" + Style.RESET_ALL)
51+
print(Fore.MAGENTA + "\n.." + Style.RESET_ALL)
52+
time.sleep(1)
53+
54+
if npc_tipo == "Quester":
55+
get_quest(npc_nome)
56+
input("Pressione Enter para continuar...")
57+
else:
58+
print(Fore.RED + f"{npc_nome} não tem nada a dizer." + Style.RESET_ALL)
59+
print(Fore.MAGENTA + "Pressione 0 para voltar ao menu." + Style.RESET_ALL)
60+
input()
61+
62+
def get_quest(npc_nome):
63+
print(f"Você recebeu uma missão de {npc_nome}.")
64+
# Adicione mais lógica conforme necessário

0 commit comments

Comments
 (0)