forked from Cryz/battle_royale_sim
		
	
		
			
				
	
	
		
			116 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			116 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| import os as _os
 | |
| from utils import logs as _logs
 | |
| 
 | |
| _MISSING_LOCAL_SETTINGS= """
 | |
| =============== ERROR ===============
 | |
| 
 | |
|   Missing local configurations:
 | |
|   create: local_settings.py
 | |
|   with these settings:
 | |
| 
 | |
|   TOKEN= '<this_is_your_token_id>' # created using https://t.me/BotFather
 | |
|   BOT_PATH= '/path/of/your/repo/directory' # used for upstart command
 | |
|   LOG_PATH= '/path/where/you/place/logs' # used to save daily logs
 | |
|   BOT_EXEC_CMD= 'python /path/of/your/repo/directory/bot.py' # the command you use to launch the bot instance
 | |
|   SUPER_USERS= [<chat_id>] # this is the superuser, allowed to use special commands (upstart and logs)
 | |
| 
 | |
| =====================================
 | |
| """
 | |
| 
 | |
| 
 | |
| try:
 | |
|   from local_settings import TOKEN as _token
 | |
|   TOKEN= _token
 | |
| except: _logs.log_debug(_MISSING_LOCAL_SETTINGS)
 | |
| try:
 | |
|   from local_settings import BOT_PATH as _bot_path
 | |
|   BOT_PATH= _os.path.expanduser(_bot_path)
 | |
| except: BOT_PATH= ''
 | |
| try:
 | |
|   from local_settings import LOG_PATH as _log_path
 | |
|   LOG_PATH= _os.path.expanduser(_log_path)
 | |
| except: LOG_PATH= '/tmp'
 | |
| try:
 | |
|   from local_settings import BOT_EXEC_CMD as _bot_exec_cmd
 | |
|   BOT_EXEC_CMD= _bot_exec_cmd
 | |
| except: BOT_EXEC_CMD= None
 | |
| try:
 | |
|   from local_settings import SUPER_USERS as _superusers
 | |
|   SUPER_USERS= _superusers
 | |
| except: SUPER_USERS= []
 | |
| 
 | |
| 
 | |
| START_MSG= """Benvenuto nel crudele mondo di Battle Royal Simulator,
 | |
| La tua avventura e quella dei tuoi compagni inizia qui.
 | |
| Questo Bot simula Hunger Games,
 | |
| Tu e i tuoi compagni, sarete catapultati in questo mondo,
 | |
| ma solo 1 di voi riuscira' a salvarsi.
 | |
| Uccidi o sarai tu ad essere ucciso
 | |
| """
 | |
| 
 | |
| WIP_MSG= "Ehi, mio padre mi sta ancora finendo di creare, abbi pazienza, che fretta hai di entrare in questo mondo per morire?"
 | |
| 
 | |
| RANDOM_NAMES = [
 | |
|     "Aeliana", "Thorne", "Kael", "Seraphine", "Jaxon", "Lyra", "Darius", "Elowen",
 | |
|     "Zander", "Nyssa", "Orion", "Vesper", "Kieran", "Isolde", "Riven", "Calista",
 | |
|     "Draven", "Mira", "Zephyr", "Selene", "Ashen", "Talia", "Finnian", "Aria",
 | |
|     "Kaelan", "Liora", "Soren", "Elara", "Thalia", "Jett", "Cressida", "Lucian",
 | |
|     "Freya", "Ronan", "Niamh", "Kellan", "Zara", "Dorian", "Amara", "Jace",
 | |
|     "Elysia", "Caius", "Sable", "Alaric", "Veda", "Quinn", "Thorne", "Lirael",
 | |
|     "Rhea", "Kade", "Isadora", "Ash", "Nyx", "Cassian", "Elowen", "Tamsin",
 | |
|     "Rylan", "Faye", "Jorah", "Sienna", "Kieran", "Astra", "Zane", "Lyric",
 | |
|     "Dax", "Ember", "Orion", "Selah", "Juno", "Kaia", "Thorne", "Vespera",
 | |
|     "Riven", "Caden", "Liora", "Soren", "Elara", "Talia", "Jett", "Freya",
 | |
|     "Ronan", "Niamh", "Kellan", "Zara", "Dorian", "Amara", "Jace", "Elysia",
 | |
|     "Caius", "Sable", "Alaric", "Veda", "Quinn", "Thorne", "Lirael", "Rhea",
 | |
|     "Kade", "Isadora", "Ash", "Nyx",
 | |
| ]
 | |
| 
 | |
| COLORS_NAMES= [
 | |
|     "Yellow", "Grey", "Violet", "Black", "Lime", "Ruby", "Avocado", "Crystal",
 | |
|     "Pink", "Maize", "Coral", "Jade", "Platinum", "Emerald", "Carmine", "Nickel",
 | |
|     "Chocolate", "Slate", "Turquoise", "Silver", "Teal", "Jet", "Ivory", "Cobalt",
 | |
|     "Vermillion", "Aero", "Orange", "Rhythm", "Amber", "Olive", "Sepia", "Cyan",
 | |
|     "Green", "Ochre", "Denim", "Erin", "Fuchsia", "Aqua", "Iceberg", "Blue",
 | |
|     "Canary", "Red", "Mint", "Scarlet", "Coffee", "Indigo", "Mystic", "Rose",
 | |
|     "Pearl", "Pumpkin", "Navy", "Ultramarine", "Sapphire", "Desert", "Cherry",
 | |
|     "Tulip",
 | |
| ]
 | |
| 
 | |
| 
 | |
| MAP_UTF8_FIELD= '🟩'
 | |
| MAP_UTF8_MOUNTAIN= '⛰️'
 | |
| MAP_UTF8_PLAYER_MALE= '👨'
 | |
| MAP_UTF8_PLAYER_FEMALE= '👧🏻'
 | |
| MAP_UTF8_PLAYER_NONBINARY= '⚧️'
 | |
| MAP_UTF8_DEATH_PLAYER= '💀'
 | |
| MAP_UTF8_ITEM= '📦'
 | |
| 
 | |
| MAP_UTF8_LEGEND= f"""*Legenda*:
 | |
| - *{MAP_UTF8_FIELD}*: Cella *libera* per muoversi
 | |
| - *{MAP_UTF8_MOUNTAIN}*: Bordo della mappa, *non raggiungibile*
 | |
| - *{MAP_UTF8_PLAYER_MALE}*: Posizione di un *giocatore Maschio*
 | |
| - *{MAP_UTF8_PLAYER_FEMALE}*: Posizione di una *giocatorice Femmina*
 | |
| - *{MAP_UTF8_PLAYER_NONBINARY}*: Posizione di un *giocatore non binario*
 | |
| - *{MAP_UTF8_DEATH_PLAYER}*: Posizione di un *giocatore morto*
 | |
| - *{MAP_UTF8_ITEM}*: Posizione di un *oggetto* (non ancora implementato)
 | |
| """
 | |
| 
 | |
| MAP_IMAGE_FIELD= (0, 255, 0) # green
 | |
| MAP_IMAGE_MOUNTAIN= (0, 0, 0) # black
 | |
| MAP_IMAGE_PLAYER_MALE= (0, 0, 255) # blue
 | |
| MAP_IMAGE_PLAYER_FEMALE= (255, 0, 0) # red
 | |
| MAP_IMAGE_PLAYER_NONBINARY= (255, 255, 0) # yellow
 | |
| MAP_IMAGE_DEATH_PLAYER= (160, 160, 160) # grey
 | |
| MAP_IMAGE_ITEM= (255, 255, 255) # white
 | |
| 
 | |
| MAP_IMAGE_LEGEND= r"""*Legenda*:
 | |
| - *Verde*: Cella *libera* per muoversi
 | |
| - *Nero*: Bordo della mappa, *non raggiungibile*
 | |
| - *Blue*: Posizione di un *giocatore Maschio*
 | |
| - *Rosso*: Posizione di una *giocatorice Femmina*
 | |
| - *Giallo*: Posizione di un *giocatore non binario*
 | |
| - *Grigio*: Posizione di un *giocatore morto*
 | |
| - *Bianco*: Posizione di un *oggetto* (non ancora implementato)
 | |
| """
 | 
