1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-11 13:39:14 +02:00

mirror_terrain update

This commit is contained in:
MewMew 2019-03-13 17:51:49 +01:00
parent bc15efc87d
commit f7977f079e
2 changed files with 28 additions and 23 deletions

View File

@ -13,26 +13,26 @@ local direction_translation = {
}
local cliff_orientation_translation = {
["west_to_east"] = "east_to_west",
["north_to_south"] = "south_to_north",
["east_to_west"] = "west_to_east",
["south_to_north"] = "north_to_south",
["west_to_north"] = "east_to_south",
["north_to_east"] = "south_to_west",
["east_to_south"] = "west_to_north",
["south_to_west"] = "north_to_east",
["west_to_south"] = "east_to_north",
["north_to_west"] = "south_to_east",
["east_to_north"] = "west_to_south",
["south_to_east"] = "north_to_west",
["west_to_none"] = "none_to_east",
["none_to_east"] = "west_to_none",
["north_to_none"] = "none_to_south",
["none_to_south"] = "north_to_none",
["east_to_none"] = "none_to_west",
["none_to_west"] = "east_to_none",
["south_to_none"] = "none_to_north",
["none_to_north"] = "south_to_none"
["west-to-east"] = "east-to-west",
["north-to-south"] = "south-to-north",
["east-to-west"] = "west-to-east",
["south-to-north"] = "north-to-south",
["west-to-north"] = "east-to-south",
["north-to-east"] = "south-to-west",
["east-to-south"] = "west-to-north",
["south-to-west"] = "north-to-east",
["west-to-south"] = "east-to-north",
["north-to-west"] = "south-to-east",
["east-to-north"] = "west-to-south",
["south-to-east"] = "north-to-west",
["west-to-none"] = "east-to-none",
["none-to-east"] = "none-to-west",
["north-to-none"] = "south-to-none",
["none-to-south"] = "none-to-north",
["east-to-none"] = "west-to-none",
["none-to-west"] = "none-to-east",
["south-to-none"] = "north-to-none",
["none-to-north"] = "none-to-south"
}
local function get_chunk_position(position)
@ -50,7 +50,7 @@ end
local function process_entity(surface, entity)
local new_pos = {x = entity.position.x * -1, y = entity.position.y * -1}
if entity.type == "cliff" then
if entity.type == "cliff" then
surface.create_entity({name = entity.name, position = new_pos, cliff_orientation = cliff_orientation_translation[entity.cliff_orientation]})
return
end

View File

@ -36,7 +36,7 @@ local function teleport_effects(surface, position)
position = {x = position.x, y = position.y + y},
})
end
if math.random(1,64) == 1 then surface.create_entity({name = "explosion", position = {x = position.x + (3 - (math.random(1,60) * 0.1)), y = position.y + (3 - (math.random(1,60) * 0.1))}}) end
if math.random(1,40) == 1 then surface.create_entity({name = "explosion", position = {x = position.x + (3 - (math.random(1,60) * 0.1)), y = position.y + (3 - (math.random(1,60) * 0.1))}}) end
if math.random(1,32) == 1 then surface.create_entity({name = "blood-explosion-huge", position = position}) end
if math.random(1,16) == 1 then surface.create_entity({name = "blood-explosion-big", position = position}) end
if math.random(1,8) == 1 then surface.create_entity({name = "blood-explosion-small", position = position}) end
@ -189,7 +189,12 @@ local function on_gui_click(event)
if not game.players[name].character then return end
if player.character.driving then return end
if game.tick - global.team_teleport_delay[player.name] < 0 then
player.print("You are not capable of handling another teleport yet.")
local recovery_time = math.ceil(math.abs(game.tick - global.team_teleport_delay[player.name]) / 3600)
if recovery_time == 1 then
player.print("You need one more minute to recover from the last teleport.")
else
player.print("You are not capable of handling another teleport yet, you need " .. tostring(recovery_time) .. " more minutes to recover.")
end
return
end
global.team_teleport_delay[player.name] = game.tick + 900