Trenched version 1.0
  • authors

    JoJoe Stinky 42

  • downloads
    voxlap .vxl 2.42 MiB
    Download
    pyspades .txt 1.24 KiB
    Download
  • tags

    Water damage 🌊

  • text file
    AREA = (351, 426, 198, 299)
    PAD = 23
    WIDTH = 20
    BLUE_RECT = (AREA[0] + PAD, AREA[1] + PAD, AREA[0] + PAD + WIDTH, AREA[3] - PAD)
    GREEN_RECT = (AREA[2] - PAD - WIDTH, AREA[1] + PAD, AREA[2] - PAD, AREA[3] - PAD)
    HALF_X = AREA[0] + (AREA[2] - AREA[0]) / 2
    HALF_Y = AREA[1] + (AREA[3] - AREA[1]) / 2
    GOAL = (8, 32, 40)
     
    name = 'Trenched'
    version = '1.0'
    author = 'jojoe'
    area = AREA
    ball = (HALF_X, HALF_Y, 40)
    
    extensions = {
    	#'water_damage' : 1,
    	'boundary_damage' : {
    		'left' : 144,
    		'top' : 144,
    		'right' : 369,
    		'bottom' : 369,
    		'damage' : 30
    	}
    }
    
    def get_spawn_location(connection):
        if connection.team is connection.protocol.blue_team:
            return connection.protocol.get_random_location(True, BLUE_RECT)
        elif connection.team is connection.protocol.green_team:
            return connection.protocol.get_random_location(True, GREEN_RECT)
     
    from pyspades.constants import *
    from pyspades.server import ServerConnection
    
    def get_entity_location(team, entity_id):
        if entity_id == GREEN_FLAG:
            return (337, 234, 54)
        if entity_id == BLUE_FLAG:
            return (177, 234, 54)
        if entity_id == GREEN_BASE:
            return (337, 261, 54)
        if entity_id == BLUE_BASE:
            return (177, 261, 54)