Added remaing modules

This commit is contained in:
Cooldude2606
2018-10-12 18:11:30 +01:00
parent 67deda9564
commit 481f1ee660
23 changed files with 675 additions and 406 deletions

View File

@@ -0,0 +1,15 @@
local warps = warps
local self = self
commands.add_command('make-warp', 'Make a warp point at your location', {
['name']={true,'string-inf'}
}, function(event,args)
if not game.player then return end
local position = game.player.position
local name = args.name
if game.player.gui.top[name] then player_return({'warp-system.name-used'},defines.textcolor.med) return commands.error end
if warps.warps[name] then player_return({'warp-system.name-used'},defines.textcolor.med) return commands.error end
if position.x^2 + position.y^2 < 100 then player_return({'warp-system.too-close'},defines.textcolor.med) return commands.error end
-- to do add a test for all warps
self.make_warp_point(position,game.player.surface,game.player.force,name)
end)

View File

@@ -0,0 +1,5 @@
return {
{'small-lamp',-3,-2},{'small-lamp',-3,2},{'small-lamp',3,-2},{'small-lamp',3,2},
{'small-lamp',-2,-3},{'small-lamp',2,-3},{'small-lamp',-2,3},{'small-lamp',2,3},
{'small-electric-pole',-3,-3},{'small-electric-pole',3,3},{'small-electric-pole',-3,3},{'small-electric-pole',3,-3}
}

View File

@@ -0,0 +1,4 @@
return {
{-3,-2},{-3,-1},{-3,0},{-3,1},{-3,2},{3,-2},{3,-1},{3,0},{3,1},{3,2},
{-2,-3},{-1,-3},{0,-3},{1,-3},{2,-3},{-2,3},{-1,3},{0,3},{1,3},{2,3}
}