x, y = self._player_pos
old_vehicle = world.vehicles.current
-
+
item = self._level.item_at(x, y)
-
+
if item and item.item_type == "vehicle":
world.vehicles.current = item.item_data["vehicle"]
self._level.remove_item(item)
world.vehicles.current = "walking"
if old_vehicle != "walking":
- dropped_vehicle = create_new_item("vehicle", (x, y), vehicle=old_vehicle)
+ dropped_vehicle = create_new_item(
+ "vehicle", (x, y), vehicle=old_vehicle)
self._level.items.append(dropped_vehicle)
self._items.add(dropped_vehicle)