Gizmos Car Keys - Zahnfeechen Patch deprecated


Tired of running to your car? Run no more! Bring your car to you! Click the car key on a car to link your keys to the car. When you need your car, pick up your keys and left click the spot you want your car to appear. Fix for 0.17 and Patch by Zahnfeechen

Content
5 years ago
0.17
5
Transportation

b Support for vehicle grids

5 years ago

Hi! There are several mods that add grids to vehicles. If you've placed equipment into these grids and you summon the car, the equipment won't be copied and gets removed. Could you fix that, please?

I think it might be enough to add this code to control.lua:

function copy_car(index,car)

    <snip>

    -- GET THIS CAR GRID
    local copy_this_grid = car.grid

    if copy_this_grid then
        local gridw = copy_this_grid.width
        local gridh = copy_this_grid.height
        for x=0, gridw do
            for y=0, gridh do
                local item = copy_this_grid.get({x,y})
                if item then
                    global.cars[index].grid.put{name=item.name, position={x,y}}
                end
            end
        end
    end
end
5 years ago

In case anybody's interested: here is another version of Gizmos Car Keys mod that fixes

  • items disappearing from the vehicle grid,
  • if you have just one key, you will end up with two keys if you summon a vehicle,
  • being able to summon a vehicle to a location that it can't drive on (e.g. cliffs, water, buildings).

New response