def _validate_hide_sprite(self, name, value): value = expression.Not(value) try: value = value.reduce() except: pass self.create_register(name, value) return None
def _validate_hide_sprite(self, name, value): self.create_register(name, expression.Not(value).reduce())
def p_logical_not(self, t): "expression : LOGICAL_NOT expression" t[0] = expression.Not(expression.Boolean(t[2]), t.lineno(1))
'enhanced_tunnels' : {'var': 0x41, 'start': 0, 'size': 8}, 'level_crossing_status' : {'var': 0x42, 'start': 0, 'size': 8}, 'build_date' : {'var': 0x43, 'start': 0, 'size': 32}, 'town_zone' : {'var': 0x44, 'start': 0, 'size': 8}, 'random_bits' : {'var': 0x5F, 'start': 8, 'size': 2}, } # Tramtypes have no 60+x variables # # Towns are not a true feature, but accessible via the parent scope of e.g. industries, stations # varact2vars_towns = { 'is_city' : {'var': 0x40, 'start': 0, 'size': 1}, 'cities_enabled' : {'var': 0x40, 'start': 1, 'size': 1, 'value_function': lambda var, info: expression.Not(var, var.pos)}, 'population' : {'var': 0x82, 'start': 0, 'size': 16}, 'has_church' : {'var': 0x92, 'start': 1, 'size': 1}, 'has_stadium' : {'var': 0x92, 'start': 2, 'size': 1}, 'town_zone_0_radius_square' : {'var': 0x94, 'start': 0, 'size': 16}, 'town_zone_1_radius_square' : {'var': 0x96, 'start': 0, 'size': 16}, 'town_zone_2_radius_square' : {'var': 0x98, 'start': 0, 'size': 16}, 'town_zone_3_radius_square' : {'var': 0x9A, 'start': 0, 'size': 16}, 'town_zone_4_radius_square' : {'var': 0x9C, 'start': 0, 'size': 16}, 'num_houses' : {'var': 0xB6, 'start': 0, 'size': 16}, 'percent_transported_passengers' : {'var': 0xCA, 'start': 0, 'size': 8, 'value_function': value_mul_div(101, 256)}, 'percent_transported_mail' : {'var': 0xCB, 'start': 0, 'size': 8, 'value_function': value_mul_div(101, 256)}, } varact2vars[0x00] = varact2vars_trains