DMV - Directional Movement Vehicles


Vehicles move like players! - W for North - A for West - S for South - D for East And so much more!

Content
5 months ago
1.1
957
Transportation

g Intentional: why does this modify every placeable item in game?

1 year, 10 months ago

i've noticed that every placeable item, even those added by other mods, is listed as being modified by DMV - Directional Movement Vehicles.

i'm curious, why does it do that?

5 months ago

Great question, it's probably lines like this where I use a loop to inspect every "simple entity" and only inject code into some of them:

-- Fix alien biomes rocks not having any dying explosion like vanilla ones
for _, simple_entity in pairs(data.raw["simple-entity"]) do
if string.match(simple_entity.name, "rock%-big%-") then
simple_entity.dying_trigger_effect = data.raw["simple-entity"]["rock-big"].dying_trigger_effect
elseif string.match(simple_entity.name, "rock%-huge%-") then
simple_entity.dying_trigger_effect = data.raw["simple-entity"]["rock-huge"].dying_trigger_effect
elseif string.match(simple_entity.name, "sand%-rock%-big%-") then
simple_entity.dying_trigger_effect = data.raw["simple-entity"]["sand-rock-big"].dying_trigger_effect
end
end

New response