i am developing my own Mod about Power Poles. Honestly it is even in the Mod Portal called "Advanced Power Poles" and it is working so far.
So my question turns around how to efficiently write a code with less words and stuff. I have an entity.lua, where just copied the entities from the Orginal Entity in Base folder, and this works so far! https://drive.google.com/open?id=14h3T1 ... m2wlGUzVQD
Then i found another mod where entities are put together in compact way, and more less words then the original . it uses a class called util.merge.
so build my entity.lua up using the the same code and just changed a few things
https://drive.google.com/open?id=1K1akZ ... MH1KHNTqrg
Here i show a few lines of that code, that is normally longer.
Code: Select all
data:extend({
---------------------------
-- Small Electric Pole 1 --
---------------------------
util.merge{data.raw["electric-pole"]["small-electric-pole"],
{
name = "small-electric-pole",
minable = {mining_time = 0.1, result = "small-electric-pole"},
max_health = 50,
maximum_wire_distance = 7.5,
supply_area_distance = 2.5,
result_count = 1,
}
},
---------------------------
-- Small Electric Pole 2 --
---------------------------
util.merge{data.raw["electric-pole"]["small-electric-pole-2"],
{
name = "small-electric-pole-2",
minable = {mining_time = 0.1, result = "small-electric-pole-2"},
max_health = 50,
maximum_wire_distance = 16,
supply_area_distance = 1.5,
}
},
})
And when i try to load my mod with this compact version it shows me following error
https://drive.google.com/open?id=1yYT0C ... r62S0h7LYr
The only thing that has changed compared to the original code, where i get this, is that the other code starts with
Code: Select all
if settings.startup["ABC"].value == true then
Code: Select all
End
https://drive.google.com/open?id=1K1akZ ... MH1KHNTqrg
So, where is my problem loading the game and getting this error??? Please , i could make my mod using the long way, but i want to understand it and learn it the shortway
https://drive.google.com/open?id=1yYT0C ... r62S0h7LYr
Big THX