I have tried to search and google to the best of my abillites but I could not find a mod for this. Is anyone here able to make a small mod just to minimize turrets to 1x1? No other changes just the size?
Would be super appreciated!
Request minimize turret mod
Re: Request minimize turret mod
Code: Select all
for _, turret in pairs({{"ammo-turret", "gun-turret"}, {"electric-turret", "laser-turret"}}) do
local t = data.raw[turret[1]][turret[2]]
t.collision_box = {{-.45, -.45}, {.45, .45}}
t.selection_box = {{-.5, -.5}, {.5, .5}}
for _, img in pairs({"folded_animation", "preparing_animation", "prepared_animation", "attacking_animation", "folding_animation", "base_picture"}) do
if t[img] then
for _, layer in pairs(t[img].layers) do
layer.scale = .5
layer.shift[2] = layer.shift[2]/2
end
end
end
end
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Re: Request minimize turret mod
prg wrote:if you don't mind the hovering shadows.Code: Select all
for _, turret in pairs({{"ammo-turret", "gun-turret"}, {"electric-turret", "laser-turret"}}) do local t = data.raw[turret[1]][turret[2]] t.collision_box = {{-.45, -.45}, {.45, .45}} t.selection_box = {{-.5, -.5}, {.5, .5}} for _, img in pairs({"folded_animation", "preparing_animation", "prepared_animation", "attacking_animation", "folding_animation", "base_picture"}) do if t[img] then for _, layer in pairs(t[img].layers) do layer.scale = .5 layer.shift[2] = layer.shift[2]/2 end end end end
Well that doesnt matter, tho what do I do with this?
Re: Request minimize turret mod
Throw it into a data-updates.lua alongside a valid info.json in the proper directory structure.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Re: Request minimize turret mod
Ok, I tried my best without luck, could you or someone have a look at it?
- Attachments
-
- Turret-Minimize_0.1.0.zip
- (978 Bytes) Downloaded 46 times
Re: Request minimize turret mod
It works with a properly named data-updates.lua (instead of data-update.lua)
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Re: Request minimize turret mod
Oh such a small mistake. Thanks for the help prg!