Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local car_gridw, car_gridh = string.match(settings.startup["VehicleGrid-car"].value, "(%d+)x(%d+)")
- log("VehicleGrid-car = "..tostring(settings.startup["VehicleGrid-car"].value).." "..tostring(car_gridw)..", "..tostring(car_gridh))
- local tank_gridw, tank_gridh = string.match(settings.startup["VehicleGrid-tank"].value, "(%d+)x(%d+)")
- log("VehicleGrid-tank = "..tostring(settings.startup["VehicleGrid-tank"].value).." "..tostring(tank_gridw)..", "..tostring(tank_gridh))
- local loco_gridw, loco_gridh = string.match(settings.startup["VehicleGrid-loco"].value, "(%d+)x(%d+)")
- log("VehicleGrid-loco = "..tostring(settings.startup["VehicleGrid-loco"].value).." "..tostring(loco_gridw)..", "..tostring(loco_gridh))
- local wagon_gridw, wagon_gridh = string.match(settings.startup["VehicleGrid-wagon"].value, "(%d+)x(%d+)")
- log("VehicleGrid-wagon = "..tostring(settings.startup["VehicleGrid-wagon"].value).." "..tostring(wagon_gridw)..", "..tostring(wagon_gridh))
- local art_wagon_gridw, art_wagon_gridh = string.match(settings.startup["VehicleGrid-artillery-wagon"].value, "(%d+)x(%d+)")
- log("VehicleGrid-artillery-wagon = "..tostring(settings.startup["VehicleGrid-artillery-wagon"].value).." "..tostring(art_wagon_gridw)..", "..tostring(art_wagon_gridh))
- data:extend(
- {
- {
- type = "equipment-grid",
- name = "car-equipment-grid",
- width = car_gridw or 8,
- height = car_gridh or 8,
- equipment_categories = {"armor", "universal-equipment", "vehicle-equipment", "vehicle-motor"}
- },
- {
- type = "equipment-grid",
- name = "tank-equipment-grid",
- width = tank_gridw or 12,
- height = tank_gridh or 10,
- equipment_categories = {"armor", "universal-equipment", "vehicle-equipment", "vehicle-motor"}
- },
- {
- type = "equipment-grid",
- name = "loco-equipment-grid",
- width = loco_gridw or 10,
- height = loco_gridh or 8,
- equipment_categories = {"armor", "universal-equipment", "vehicle-equipment", "vehicle-motor"}
- },
- {
- type = "equipment-grid",
- name = "wagon-equipment-grid",
- width = wagon_gridw or 10,
- height = wagon_gridh or 6,
- equipment_categories = {"armor", "universal-equipment", "vehicle-equipment"}
- },
- {
- type = "equipment-grid",
- name = "artillery-wagon-equipment-grid",
- width = art_wagon_gridw or 10,
- height = art_wagon_gridh or 8,
- equipment_categories = {"armor", "universal-equipment", "vehicle-equipment"}
- },
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement