1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-03-27 21:38:54 +02:00

biter_battles > removed "line" attacks; poll > more efficiency for on_tick

This commit is contained in:
MewMew 2018-12-27 18:38:13 +01:00
parent fcc11a9ff9
commit cdd5038060
6 changed files with 61 additions and 195 deletions

View File

@ -10,16 +10,19 @@ require "player_list"
require "poll"
require "score"
---- enable modules here ----
--require "maps.tools.map_pregen"
--require "maps.modules.hunger"
--require "maps.tools.cheat_mode"
require "maps.modules.dynamic_landfill"
--require "maps.modules.dynamic_landfill"
require "maps.modules.restrictive_fluid_mining"
require "maps.modules.fluids_are_explosive"
require "maps.modules.explosives_are_explosive"
--require "maps.modules.railgun_enhancer"
-----------------------------
---- enable maps here ----
--require "maps.biter_battles"
require "maps.biter_battles"
--require "maps.cave_miner"
--require "maps.deep_jungle"
--require "maps.lost_desert"
@ -29,7 +32,7 @@ require "maps.modules.explosives_are_explosive"
--require "maps.fish_defender"
--require "maps.crossing"
--require "maps.spooky_forest"
require "maps.atoll"
--require "maps.atoll"
--require "maps.tank_battles"
--require "maps.empty_map"
--require "maps.custom_start"

View File

@ -9,7 +9,7 @@ local food_names = {
["science-pack-2"] = "green science",
["military-science-pack"] = "military science",
["science-pack-3"] = "blue science",
["production-science-pack"] = "production science",
["production-science-pack"] ="production science",
["high-tech-science-pack"] = "high tech science",
["space-science-pack"] = "space science"
}
@ -19,7 +19,7 @@ local food_values = {
["science-pack-2"] = 0.00000292,
["military-science-pack"] = 0.00001950,
["science-pack-3"] = 0.00003792,
["production-science-pack"] = 0.00008000,
["production-science-pack"] =0.00008000,
["high-tech-science-pack"] = 0.00021000,
["space-science-pack"] = 0.00042000
}
@ -890,8 +890,9 @@ local function biter_attack_silo(team, requested_amount, mode)
local biters_selected_for_attack = {}
if not mode then
local modes = {"spread", "ball", "line"}
mode = modes[math_random(1,3)]
--local modes = {"spread", "ball", "line"}
local modes = {"spread", "ball"}
mode = modes[math_random(1, #modes)]
end
if mode == "spread" then
@ -925,6 +926,7 @@ local function biter_attack_silo(team, requested_amount, mode)
end
end
--[[
if mode == "line" then
local valid_biters = get_valid_biters(requested_amount, y_modifier, 0, 150*y_modifier, 500)
if #valid_biters < requested_amount then
@ -960,6 +962,7 @@ local function biter_attack_silo(team, requested_amount, mode)
game.players[1].print(#biters_selected_for_attack .. " going for a line attack, table start = " .. array_start)
end
end
]]
if mode == "ball" then
local height = 0

View File

@ -1,3 +1,6 @@
0.36
removed "line" attacks
0.35
the laser turret now gets nerfed properly

View File

@ -2,8 +2,13 @@
local event = require 'utils.event'
require "maps.fish_defender_map_intro"
require "maps.fish_defender_kaboomsticks"
require "maps.modules.railgun_enhancer"
require "maps.modules.dynamic_landfill"
require "maps.modules.restrictive_fluid_mining"
require "maps.modules.fluids_are_explosive"
require "maps.modules.explosives_are_explosive"
local map_functions = require "maps.tools.map_functions"
local math_random = math.random
local insert = table.insert
@ -877,10 +882,12 @@ local function on_entity_died(event)
end
if event.entity.name == "medium-biter" then
event.entity.surface.create_entity({name = "explosion", position = event.entity.position})
event.entity.surface.create_entity({name = "explosion", position = event.entity.position})
local damage = 25
if global.endgame_modifier then damage = 25 + math.ceil((global.endgame_modifier * 0.025), 0) end
if damage > 75 then damage = 75 end
if global.endgame_modifier then
damage = 25 + math.ceil((global.endgame_modifier * 0.025), 0)
end
if damage > 250 then damage = 250 end
local radius = 1
if global.wave_count > 1500 then radius = 2 end
damage_entities_in_radius(event.entity.position, radius, damage)
@ -891,7 +898,7 @@ local function on_entity_died(event)
event.entity.surface.create_entity({name = "uranium-cannon-shell-explosion", position = event.entity.position})
local damage = 35
if global.endgame_modifier then damage = 35 + math.ceil((global.endgame_modifier * 0.05), 0) end
if damage > 150 then damage = 150 end
if damage > 350 then damage = 350 end
local radius = 2
if global.wave_count > 1500 then radius = 3 end
damage_entities_in_radius(event.entity.position, radius, damage)
@ -902,7 +909,11 @@ local function on_entity_died(event)
local surface = event.entity.surface
if math_random(1, 32) ~= 1 then
for i = 1, math_random(1, 2), 1 do
if math_random(1, 2) == 1 then
local p = surface.find_non_colliding_position("big-biter", event.entity.position, 3, 0.5)
if p then surface.create_entity {name = "big-biter", position = p} end
end
for i = 1, math_random(1, 3), 1 do
local p = surface.find_non_colliding_position("medium-biter", event.entity.position, 3, 0.5)
if p then surface.create_entity {name = "medium-biter", position = p} end
end
@ -1023,16 +1034,16 @@ local function on_player_joined_game(event)
--game.forces["player"].technologies["gun-turret-damage-7"].enabled = false
--game.forces["player"].technologies["laser-turret-speed-6"].enabled = false
--game.forces["player"].technologies["laser-turret-speed-7"].enabled = false
--game.forces["player"].technologies["atomic-bomb"].enabled = false
game.forces["player"].technologies["atomic-bomb"].enabled = false
game.forces.player.set_ammo_damage_modifier("shotgun-shell", 1)
--game.forces.player.set_turret_attack_modifier("flamethrower-turret", -0.5)
global.entity_limits = {
["gun-turret"] = {placed = 1, limit = 1, str = "gun turret", slot_price = 75},
["laser-turret"] = {placed = 0, limit = 1, str = "laser turret", slot_price = 300},
["gun-turret"] = {placed = 1, limit = 1, str = "gun turret", slot_price = 100},
["laser-turret"] = {placed = 0, limit = 1, str = "laser turret", slot_price = 350},
["artillery-turret"] = {placed = 0, limit = 1, str = "artillery turret", slot_price = 500},
["flamethrower-turret"] = {placed = 0, limit = 0, str = "flamethrower turret", slot_price = 15000},
["flamethrower-turret"] = {placed = 0, limit = 0, str = "flamethrower turret", slot_price = 35000},
["land-mine"] = {placed = 0, limit = 1, str = "mine", slot_price = 1}
}
@ -1098,7 +1109,7 @@ local function on_chunk_generated(event)
if left_top.x <= -196 then
local search_area = {{left_top.x - 32, left_top.y - 32}, {left_top.x + 32, left_top.y + 32}}
if surface.count_tiles_filtered({name = "water", area = search_area}) == 0 and math_random(1, 48) == 1 then
if surface.count_tiles_filtered({name = "water", area = search_area}) == 0 and math_random(1, 64) == 1 then
map_functions.draw_noise_tile_circle({x = left_top.x + math_random(1,30), y = left_top.y + math_random(1,30)}, "water", surface, math_random(6, 12))
end

View File

@ -1,155 +0,0 @@
--This will add a new game mechanic so that containers with explosives actually go boom when they get damaged.
--Made by MewMew
local event = require 'utils.event'
local damage_per_explosive = 100
local empty_tile_damage_decay = 100
local out_of_map_tile_health = 150000
local circle_coordinates = {
[1] = {{x = 0, y = 0}},
[2] = {{x = -1, y = -1},{x = 1, y = -1},{x = 0, y = -1},{x = -1, y = 0},{x = -1, y = 1},{x = 0, y = 1},{x = 1, y = 1},{x = 1, y = 0}},
[3] = {{x = -2, y = -1},{x = -1, y = -2},{x = 1, y = -2},{x = 0, y = -2},{x = 2, y = -1},{x = -2, y = 1},{x = -2, y = 0},{x = 2, y = 1},{x = 2, y = 0},{x = -1, y = 2},{x = 1, y = 2},{x = 0, y = 2}},
[4] = {{x = -1, y = -3},{x = 1, y = -3},{x = 0, y = -3},{x = -3, y = -1},{x = -2, y = -2},{x = 3, y = -1},{x = 2, y = -2},{x = -3, y = 0},{x = -3, y = 1},{x = 3, y = 1},{x = 3, y = 0},{x = -2, y = 2},{x = -1, y = 3},{x = 0, y = 3},{x = 1, y = 3},{x = 2, y = 2}},
[5] = {{x = -3, y = -3},{x = -2, y = -3},{x = -1, y = -4},{x = -2, y = -4},{x = 1, y = -4},{x = 0, y = -4},{x = 2, y = -3},{x = 3, y = -3},{x = 2, y = -4},{x = -3, y = -2},{x = -4, y = -1},{x = -4, y = -2},{x = 3, y = -2},{x = 4, y = -1},{x = 4, y = -2},{x = -4, y = 1},{x = -4, y = 0},{x = 4, y = 1},{x = 4, y = 0},{x = -3, y = 3},{x = -3, y = 2},{x = -4, y = 2},{x = -2, y = 3},{x = 2, y = 3},{x = 3, y = 3},{x = 3, y = 2},{x = 4, y = 2},{x = -2, y = 4},{x = -1, y = 4},{x = 0, y = 4},{x = 1, y = 4},{x = 2, y = 4}},
[6] = {{x = -1, y = -5},{x = -2, y = -5},{x = 1, y = -5},{x = 0, y = -5},{x = 2, y = -5},{x = -3, y = -4},{x = -4, y = -3},{x = 3, y = -4},{x = 4, y = -3},{x = -5, y = -1},{x = -5, y = -2},{x = 5, y = -1},{x = 5, y = -2},{x = -5, y = 1},{x = -5, y = 0},{x = 5, y = 1},{x = 5, y = 0},{x = -5, y = 2},{x = -4, y = 3},{x = 4, y = 3},{x = 5, y = 2},{x = -3, y = 4},{x = -2, y = 5},{x = -1, y = 5},{x = 0, y = 5},{x = 1, y = 5},{x = 3, y = 4},{x = 2, y = 5}},
[7] = {{x = -4, y = -5},{x = -3, y = -5},{x = -2, y = -6},{x = -1, y = -6},{x = 0, y = -6},{x = 1, y = -6},{x = 3, y = -5},{x = 2, y = -6},{x = 4, y = -5},{x = -5, y = -4},{x = -5, y = -3},{x = -4, y = -4},{x = 4, y = -4},{x = 5, y = -4},{x = 5, y = -3},{x = -6, y = -1},{x = -6, y = -2},{x = 6, y = -1},{x = 6, y = -2},{x = -6, y = 1},{x = -6, y = 0},{x = 6, y = 1},{x = 6, y = 0},{x = -5, y = 3},{x = -6, y = 2},{x = 5, y = 3},{x = 6, y = 2},{x = -5, y = 4},{x = -4, y = 4},{x = -4, y = 5},{x = -3, y = 5},{x = 3, y = 5},{x = 4, y = 4},{x = 5, y = 4},{x = 4, y = 5},{x = -1, y = 6},{x = -2, y = 6},{x = 1, y = 6},{x = 0, y = 6},{x = 2, y = 6}},
[8] = {{x = -1, y = -7},{x = -2, y = -7},{x = 1, y = -7},{x = 0, y = -7},{x = 2, y = -7},{x = -5, y = -5},{x = -4, y = -6},{x = -3, y = -6},{x = 3, y = -6},{x = 4, y = -6},{x = 5, y = -5},{x = -6, y = -3},{x = -6, y = -4},{x = 6, y = -4},{x = 6, y = -3},{x = -7, y = -1},{x = -7, y = -2},{x = 7, y = -1},{x = 7, y = -2},{x = -7, y = 1},{x = -7, y = 0},{x = 7, y = 1},{x = 7, y = 0},{x = -7, y = 2},{x = -6, y = 3},{x = 6, y = 3},{x = 7, y = 2},{x = -5, y = 5},{x = -6, y = 4},{x = 5, y = 5},{x = 6, y = 4},{x = -3, y = 6},{x = -4, y = 6},{x = -2, y = 7},{x = -1, y = 7},{x = 0, y = 7},{x = 1, y = 7},{x = 3, y = 6},{x = 2, y = 7},{x = 4, y = 6}},
[9] = {{x = -4, y = -7},{x = -3, y = -7},{x = -2, y = -8},{x = -1, y = -8},{x = 0, y = -8},{x = 1, y = -8},{x = 3, y = -7},{x = 2, y = -8},{x = 4, y = -7},{x = -5, y = -6},{x = -6, y = -6},{x = -6, y = -5},{x = 5, y = -6},{x = 6, y = -5},{x = 6, y = -6},{x = -7, y = -4},{x = -7, y = -3},{x = 7, y = -4},{x = 7, y = -3},{x = -8, y = -2},{x = -8, y = -1},{x = 8, y = -1},{x = 8, y = -2},{x = -8, y = 0},{x = -8, y = 1},{x = 8, y = 1},{x = 8, y = 0},{x = -7, y = 3},{x = -8, y = 2},{x = 7, y = 3},{x = 8, y = 2},{x = -7, y = 4},{x = -6, y = 5},{x = 6, y = 5},{x = 7, y = 4},{x = -5, y = 6},{x = -6, y = 6},{x = -4, y = 7},{x = -3, y = 7},{x = 3, y = 7},{x = 5, y = 6},{x = 4, y = 7},{x = 6, y = 6},{x = -2, y = 8},{x = -1, y = 8},{x = 0, y = 8},{x = 1, y = 8},{x = 2, y = 8}},
[10] = {{x = -3, y = -9},{x = -1, y = -9},{x = -2, y = -9},{x = 1, y = -9},{x = 0, y = -9},{x = 3, y = -9},{x = 2, y = -9},{x = -5, y = -7},{x = -6, y = -7},{x = -5, y = -8},{x = -4, y = -8},{x = -3, y = -8},{x = 3, y = -8},{x = 5, y = -7},{x = 5, y = -8},{x = 4, y = -8},{x = 6, y = -7},{x = -7, y = -5},{x = -7, y = -6},{x = -8, y = -5},{x = 7, y = -5},{x = 7, y = -6},{x = 8, y = -5},{x = -9, y = -3},{x = -8, y = -4},{x = -8, y = -3},{x = 8, y = -4},{x = 8, y = -3},{x = 9, y = -3},{x = -9, y = -1},{x = -9, y = -2},{x = 9, y = -1},{x = 9, y = -2},{x = -9, y = 1},{x = -9, y = 0},{x = 9, y = 1},{x = 9, y = 0},{x = -9, y = 3},{x = -9, y = 2},{x = -8, y = 3},{x = 8, y = 3},{x = 9, y = 3},{x = 9, y = 2},{x = -7, y = 5},{x = -8, y = 5},{x = -8, y = 4},{x = 7, y = 5},{x = 8, y = 5},{x = 8, y = 4},{x = -7, y = 6},{x = -6, y = 7},{x = -5, y = 7},{x = 5, y = 7},{x = 7, y = 6},{x = 6, y = 7},{x = -5, y = 8},{x = -4, y = 8},{x = -3, y = 8},{x = -3, y = 9},{x = -2, y = 9},{x = -1, y = 9},{x = 0, y = 9},{x = 1, y = 9},{x = 3, y = 8},{x = 2, y = 9},{x = 3, y = 9},{x = 5, y = 8},{x = 4, y = 8}},
[11] = {{x = -5, y = -9},{x = -4, y = -9},{x = -3, y = -10},{x = -1, y = -10},{x = -2, y = -10},{x = 1, y = -10},{x = 0, y = -10},{x = 3, y = -10},{x = 2, y = -10},{x = 5, y = -9},{x = 4, y = -9},{x = -7, y = -7},{x = -6, y = -8},{x = 7, y = -7},{x = 6, y = -8},{x = -9, y = -5},{x = -8, y = -6},{x = 9, y = -5},{x = 8, y = -6},{x = -9, y = -4},{x = -10, y = -3},{x = 9, y = -4},{x = 10, y = -3},{x = -10, y = -2},{x = -10, y = -1},{x = 10, y = -1},{x = 10, y = -2},{x = -10, y = 0},{x = -10, y = 1},{x = 10, y = 1},{x = 10, y = 0},{x = -10, y = 2},{x = -10, y = 3},{x = 10, y = 3},{x = 10, y = 2},{x = -9, y = 4},{x = -9, y = 5},{x = 9, y = 5},{x = 9, y = 4},{x = -8, y = 6},{x = -7, y = 7},{x = 7, y = 7},{x = 8, y = 6},{x = -6, y = 8},{x = -5, y = 9},{x = -4, y = 9},{x = 4, y = 9},{x = 5, y = 9},{x = 6, y = 8},{x = -3, y = 10},{x = -2, y = 10},{x = -1, y = 10},{x = 0, y = 10},{x = 1, y = 10},{x = 2, y = 10},{x = 3, y = 10}},
[12] = {{x = -3, y = -11},{x = -2, y = -11},{x = -1, y = -11},{x = 0, y = -11},{x = 1, y = -11},{x = 2, y = -11},{x = 3, y = -11},{x = -7, y = -9},{x = -6, y = -9},{x = -5, y = -10},{x = -4, y = -10},{x = 5, y = -10},{x = 4, y = -10},{x = 7, y = -9},{x = 6, y = -9},{x = -9, y = -7},{x = -7, y = -8},{x = -8, y = -8},{x = -8, y = -7},{x = 7, y = -8},{x = 8, y = -7},{x = 8, y = -8},{x = 9, y = -7},{x = -9, y = -6},{x = -10, y = -5},{x = 9, y = -6},{x = 10, y = -5},{x = -11, y = -3},{x = -10, y = -4},{x = 10, y = -4},{x = 11, y = -3},{x = -11, y = -2},{x = -11, y = -1},{x = 11, y = -1},{x = 11, y = -2},{x = -11, y = 0},{x = -11, y = 1},{x = 11, y = 1},{x = 11, y = 0},{x = -11, y = 2},{x = -11, y = 3},{x = 11, y = 3},{x = 11, y = 2},{x = -10, y = 5},{x = -10, y = 4},{x = 10, y = 5},{x = 10, y = 4},{x = -9, y = 7},{x = -9, y = 6},{x = -8, y = 7},{x = 8, y = 7},{x = 9, y = 7},{x = 9, y = 6},{x = -8, y = 8},{x = -7, y = 8},{x = -7, y = 9},{x = -6, y = 9},{x = 7, y = 8},{x = 7, y = 9},{x = 6, y = 9},{x = 8, y = 8},{x = -5, y = 10},{x = -4, y = 10},{x = -3, y = 11},{x = -2, y = 11},{x = -1, y = 11},{x = 0, y = 11},{x = 1, y = 11},{x = 2, y = 11},{x = 3, y = 11},{x = 4, y = 10},{x = 5, y = 10}},
[13] = {{x = -5, y = -11},{x = -4, y = -11},{x = -3, y = -12},{x = -1, y = -12},{x = -2, y = -12},{x = 1, y = -12},{x = 0, y = -12},{x = 3, y = -12},{x = 2, y = -12},{x = 4, y = -11},{x = 5, y = -11},{x = -8, y = -9},{x = -7, y = -10},{x = -6, y = -10},{x = 6, y = -10},{x = 7, y = -10},{x = 8, y = -9},{x = -10, y = -7},{x = -9, y = -8},{x = 9, y = -8},{x = 10, y = -7},{x = -11, y = -5},{x = -10, y = -6},{x = 10, y = -6},{x = 11, y = -5},{x = -11, y = -4},{x = -12, y = -3},{x = 11, y = -4},{x = 12, y = -3},{x = -12, y = -1},{x = -12, y = -2},{x = 12, y = -1},{x = 12, y = -2},{x = -12, y = 1},{x = -12, y = 0},{x = 12, y = 1},{x = 12, y = 0},{x = -12, y = 3},{x = -12, y = 2},{x = 12, y = 3},{x = 12, y = 2},{x = -11, y = 5},{x = -11, y = 4},{x = 11, y = 4},{x = 11, y = 5},{x = -10, y = 7},{x = -10, y = 6},{x = 10, y = 6},{x = 10, y = 7},{x = -9, y = 8},{x = -8, y = 9},{x = 9, y = 8},{x = 8, y = 9},{x = -7, y = 10},{x = -5, y = 11},{x = -6, y = 10},{x = -4, y = 11},{x = 5, y = 11},{x = 4, y = 11},{x = 7, y = 10},{x = 6, y = 10},{x = -3, y = 12},{x = -2, y = 12},{x = -1, y = 12},{x = 0, y = 12},{x = 1, y = 12},{x = 2, y = 12},{x = 3, y = 12}},
[14] = {{x = -3, y = -13},{x = -1, y = -13},{x = -2, y = -13},{x = 1, y = -13},{x = 0, y = -13},{x = 3, y = -13},{x = 2, y = -13},{x = -7, y = -11},{x = -6, y = -11},{x = -5, y = -12},{x = -6, y = -12},{x = -4, y = -12},{x = 5, y = -12},{x = 4, y = -12},{x = 7, y = -11},{x = 6, y = -11},{x = 6, y = -12},{x = -10, y = -9},{x = -9, y = -9},{x = -9, y = -10},{x = -8, y = -10},{x = 9, y = -9},{x = 9, y = -10},{x = 8, y = -10},{x = 10, y = -9},{x = -11, y = -7},{x = -10, y = -8},{x = 11, y = -7},{x = 10, y = -8},{x = -11, y = -6},{x = -12, y = -6},{x = -12, y = -5},{x = 11, y = -6},{x = 12, y = -6},{x = 12, y = -5},{x = -13, y = -3},{x = -12, y = -4},{x = 12, y = -4},{x = 13, y = -3},{x = -13, y = -2},{x = -13, y = -1},{x = 13, y = -1},{x = 13, y = -2},{x = -13, y = 0},{x = -13, y = 1},{x = 13, y = 1},{x = 13, y = 0},{x = -13, y = 2},{x = -13, y = 3},{x = 13, y = 3},{x = 13, y = 2},{x = -12, y = 5},{x = -12, y = 4},{x = 12, y = 5},{x = 12, y = 4},{x = -11, y = 6},{x = -11, y = 7},{x = -12, y = 6},{x = 11, y = 7},{x = 11, y = 6},{x = 12, y = 6},{x = -10, y = 8},{x = -10, y = 9},{x = -9, y = 9},{x = 9, y = 9},{x = 10, y = 9},{x = 10, y = 8},{x = -9, y = 10},{x = -8, y = 10},{x = -7, y = 11},{x = -6, y = 11},{x = 7, y = 11},{x = 6, y = 11},{x = 8, y = 10},{x = 9, y = 10},{x = -6, y = 12},{x = -5, y = 12},{x = -4, y = 12},{x = -3, y = 13},{x = -2, y = 13},{x = -1, y = 13},{x = 0, y = 13},{x = 1, y = 13},{x = 2, y = 13},{x = 3, y = 13},{x = 5, y = 12},{x = 4, y = 12},{x = 6, y = 12}},
[15] = {{x = -5, y = -13},{x = -6, y = -13},{x = -4, y = -13},{x = -3, y = -14},{x = -1, y = -14},{x = -2, y = -14},{x = 1, y = -14},{x = 0, y = -14},{x = 3, y = -14},{x = 2, y = -14},{x = 5, y = -13},{x = 4, y = -13},{x = 6, y = -13},{x = -9, y = -11},{x = -8, y = -11},{x = -8, y = -12},{x = -7, y = -12},{x = 7, y = -12},{x = 8, y = -12},{x = 8, y = -11},{x = 9, y = -11},{x = -11, y = -9},{x = -10, y = -10},{x = 10, y = -10},{x = 11, y = -9},{x = -12, y = -7},{x = -11, y = -8},{x = -12, y = -8},{x = 11, y = -8},{x = 12, y = -8},{x = 12, y = -7},{x = -13, y = -5},{x = -13, y = -6},{x = 13, y = -5},{x = 13, y = -6},{x = -13, y = -4},{x = -14, y = -3},{x = 13, y = -4},{x = 14, y = -3},{x = -14, y = -2},{x = -14, y = -1},{x = 14, y = -1},{x = 14, y = -2},{x = -14, y = 0},{x = -14, y = 1},{x = 14, y = 1},{x = 14, y = 0},{x = -14, y = 2},{x = -14, y = 3},{x = 14, y = 3},{x = 14, y = 2},{x = -13, y = 4},{x = -13, y = 5},{x = 13, y = 5},{x = 13, y = 4},{x = -13, y = 6},{x = -12, y = 7},{x = 12, y = 7},{x = 13, y = 6},{x = -11, y = 9},{x = -11, y = 8},{x = -12, y = 8},{x = 11, y = 8},{x = 11, y = 9},{x = 12, y = 8},{x = -9, y = 11},{x = -10, y = 10},{x = -8, y = 11},{x = 9, y = 11},{x = 8, y = 11},{x = 10, y = 10},{x = -7, y = 12},{x = -8, y = 12},{x = -6, y = 13},{x = -5, y = 13},{x = -4, y = 13},{x = 5, y = 13},{x = 4, y = 13},{x = 7, y = 12},{x = 6, y = 13},{x = 8, y = 12},{x = -3, y = 14},{x = -2, y = 14},{x = -1, y = 14},{x = 0, y = 14},{x = 1, y = 14},{x = 2, y = 14},{x = 3, y = 14}},
[16] = {{x = -3, y = -15},{x = -1, y = -15},{x = -2, y = -15},{x = 1, y = -15},{x = 0, y = -15},{x = 3, y = -15},{x = 2, y = -15},{x = -7, y = -13},{x = -8, y = -13},{x = -5, y = -14},{x = -6, y = -14},{x = -4, y = -14},{x = 5, y = -14},{x = 4, y = -14},{x = 7, y = -13},{x = 6, y = -14},{x = 8, y = -13},{x = -9, y = -12},{x = -10, y = -11},{x = 9, y = -12},{x = 10, y = -11},{x = -11, y = -10},{x = -12, y = -9},{x = 11, y = -10},{x = 12, y = -9},{x = -13, y = -7},{x = -13, y = -8},{x = 13, y = -7},{x = 13, y = -8},{x = -14, y = -6},{x = -14, y = -5},{x = 14, y = -5},{x = 14, y = -6},{x = -15, y = -3},{x = -14, y = -4},{x = 15, y = -3},{x = 14, y = -4},{x = -15, y = -2},{x = -15, y = -1},{x = 15, y = -1},{x = 15, y = -2},{x = -15, y = 0},{x = -15, y = 1},{x = 15, y = 1},{x = 15, y = 0},{x = -15, y = 2},{x = -15, y = 3},{x = 15, y = 3},{x = 15, y = 2},{x = -14, y = 5},{x = -14, y = 4},{x = 14, y = 5},{x = 14, y = 4},{x = -13, y = 7},{x = -14, y = 6},{x = 13, y = 7},{x = 14, y = 6},{x = -13, y = 8},{x = -12, y = 9},{x = 12, y = 9},{x = 13, y = 8},{x = -11, y = 10},{x = -10, y = 11},{x = 10, y = 11},{x = 11, y = 10},{x = -9, y = 12},{x = -8, y = 13},{x = -7, y = 13},{x = 7, y = 13},{x = 8, y = 13},{x = 9, y = 12},{x = -6, y = 14},{x = -5, y = 14},{x = -4, y = 14},{x = -3, y = 15},{x = -2, y = 15},{x = -1, y = 15},{x = 0, y = 15},{x = 1, y = 15},{x = 2, y = 15},{x = 3, y = 15},{x = 4, y = 14},{x = 5, y = 14},{x = 6, y = 14}},
[17] = {{x = -5, y = -15},{x = -6, y = -15},{x = -3, y = -16},{x = -4, y = -16},{x = -4, y = -15},{x = -1, y = -16},{x = -2, y = -16},{x = 1, y = -16},{x = 0, y = -16},{x = 3, y = -16},{x = 2, y = -16},{x = 5, y = -15},{x = 4, y = -15},{x = 4, y = -16},{x = 6, y = -15},{x = -9, y = -13},{x = -10, y = -13},{x = -8, y = -14},{x = -7, y = -14},{x = 7, y = -14},{x = 9, y = -13},{x = 8, y = -14},{x = 10, y = -13},{x = -11, y = -12},{x = -11, y = -11},{x = -12, y = -11},{x = -10, y = -12},{x = 11, y = -11},{x = 11, y = -12},{x = 10, y = -12},{x = 12, y = -11},{x = -13, y = -10},{x = -13, y = -9},{x = -12, y = -10},{x = 13, y = -9},{x = 13, y = -10},{x = 12, y = -10},{x = -14, y = -7},{x = -14, y = -8},{x = 14, y = -7},{x = 14, y = -8},{x = -15, y = -6},{x = -15, y = -5},{x = 15, y = -5},{x = 15, y = -6},{x = -15, y = -4},{x = -16, y = -4},{x = -16, y = -3},{x = 15, y = -4},{x = 16, y = -3},{x = 16, y = -4},{x = -16, y = -2},{x = -16, y = -1},{x = 16, y = -1},{x = 16, y = -2},{x = -16, y = 0},{x = -16, y = 1},{x = 16, y = 1},{x = 16, y = 0},{x = -16, y = 2},{x = -16, y = 3},{x = 16, y = 3},{x = 16, y = 2},{x = -16, y = 4},{x = -15, y = 4},{x = -15, y = 5},{x = 15, y = 5},{x = 15, y = 4},{x = 16, y = 4},{x = -15, y = 6},{x = -14, y = 7},{x = 14, y = 7},{x = 15, y = 6},{x = -13, y = 9},{x = -14, y = 8},{x = 13, y = 9},{x = 14, y = 8},{x = -13, y = 10},{x = -12, y = 10},{x = -12, y = 11},{x = -11, y = 11},{x = 11, y = 11},{x = 12, y = 11},{x = 12, y = 10},{x = 13, y = 10},{x = -11, y = 12},{x = -10, y = 12},{x = -10, y = 13},{x = -9, y = 13},{x = 9, y = 13},{x = 10, y = 13},{x = 10, y = 12},{x = 11, y = 12},{x = -8, y = 14},{x = -7, y = 14},{x = -6, y = 15},{x = -5, y = 15},{x = -4, y = 15},{x = 4, y = 15},{x = 5, y = 15},{x = 7, y = 14},{x = 6, y = 15},{x = 8, y = 14},{x = -4, y = 16},{x = -3, y = 16},{x = -2, y = 16},{x = -1, y = 16},{x = 0, y = 16},{x = 1, y = 16},{x = 2, y = 16},{x = 3, y = 16},{x = 4, y = 16}},
[18] = {{x = -3, y = -17},{x = -4, y = -17},{x = -1, y = -17},{x = -2, y = -17},{x = 1, y = -17},{x = 0, y = -17},{x = 3, y = -17},{x = 2, y = -17},{x = 4, y = -17},{x = -9, y = -15},{x = -8, y = -15},{x = -7, y = -15},{x = -7, y = -16},{x = -6, y = -16},{x = -5, y = -16},{x = 5, y = -16},{x = 7, y = -15},{x = 7, y = -16},{x = 6, y = -16},{x = 9, y = -15},{x = 8, y = -15},{x = -11, y = -13},{x = -10, y = -14},{x = -9, y = -14},{x = 9, y = -14},{x = 11, y = -13},{x = 10, y = -14},{x = -13, y = -11},{x = -12, y = -12},{x = 13, y = -11},{x = 12, y = -12},{x = -15, y = -9},{x = -14, y = -10},{x = -14, y = -9},{x = 14, y = -10},{x = 14, y = -9},{x = 15, y = -9},{x = -15, y = -8},{x = -15, y = -7},{x = -16, y = -7},{x = 15, y = -8},{x = 15, y = -7},{x = 16, y = -7},{x = -16, y = -6},{x = -16, y = -5},{x = 16, y = -5},{x = 16, y = -6},{x = -17, y = -3},{x = -17, y = -4},{x = 17, y = -3},{x = 17, y = -4},{x = -17, y = -1},{x = -17, y = -2},{x = 17, y = -1},{x = 17, y = -2},{x = -17, y = 1},{x = -17, y = 0},{x = 17, y = 1},{x = 17, y = 0},{x = -17, y = 3},{x = -17, y = 2},{x = 17, y = 3},{x = 17, y = 2},{x = -17, y = 4},{x = -16, y = 5},{x = 16, y = 5},{x = 17, y = 4},{x = -15, y = 7},{x = -16, y = 7},{x = -16, y = 6},{x = 15, y = 7},{x = 16, y = 7},{x = 16, y = 6},{x = -15, y = 9},{x = -15, y = 8},{x = -14, y = 9},{x = 14, y = 9},{x = 15, y = 9},{x = 15, y = 8},{x = -14, y = 10},{x = -13, y = 11},{x = 13, y = 11},{x = 14, y = 10},{x = -12, y = 12},{x = -11, y = 13},{x = 11, y = 13},{x = 12, y = 12},{x = -10, y = 14},{x = -9, y = 14},{x = -9, y = 15},{x = -8, y = 15},{x = -7, y = 15},{x = 7, y = 15},{x = 9, y = 14},{x = 9, y = 15},{x = 8, y = 15},{x = 10, y = 14},{x = -7, y = 16},{x = -6, y = 16},{x = -5, y = 16},{x = -4, y = 17},{x = -3, y = 17},{x = -2, y = 17},{x = -1, y = 17},{x = 0, y = 17},{x = 1, y = 17},{x = 2, y = 17},{x = 3, y = 17},{x = 4, y = 17},{x = 5, y = 16},{x = 6, y = 16},{x = 7, y = 16}},
[19] = {{x = -7, y = -17},{x = -6, y = -17},{x = -5, y = -17},{x = -3, y = -18},{x = -4, y = -18},{x = -1, y = -18},{x = -2, y = -18},{x = 1, y = -18},{x = 0, y = -18},{x = 3, y = -18},{x = 2, y = -18},{x = 5, y = -17},{x = 4, y = -18},{x = 7, y = -17},{x = 6, y = -17},{x = -10, y = -15},{x = -9, y = -16},{x = -8, y = -16},{x = 9, y = -16},{x = 8, y = -16},{x = 10, y = -15},{x = -13, y = -13},{x = -11, y = -14},{x = -12, y = -14},{x = -12, y = -13},{x = 11, y = -14},{x = 13, y = -13},{x = 12, y = -13},{x = 12, y = -14},{x = -13, y = -12},{x = -14, y = -12},{x = -14, y = -11},{x = 13, y = -12},{x = 14, y = -11},{x = 14, y = -12},{x = -15, y = -10},{x = -16, y = -9},{x = 15, y = -10},{x = 16, y = -9},{x = -17, y = -7},{x = -16, y = -8},{x = 16, y = -8},{x = 17, y = -7},{x = -17, y = -5},{x = -17, y = -6},{x = 17, y = -6},{x = 17, y = -5},{x = -18, y = -3},{x = -18, y = -4},{x = 18, y = -4},{x = 18, y = -3},{x = -18, y = -1},{x = -18, y = -2},{x = 18, y = -2},{x = 18, y = -1},{x = -18, y = 1},{x = -18, y = 0},{x = 18, y = 0},{x = 18, y = 1},{x = -18, y = 3},{x = -18, y = 2},{x = 18, y = 2},{x = 18, y = 3},{x = -17, y = 5},{x = -18, y = 4},{x = 17, y = 5},{x = 18, y = 4},{x = -17, y = 7},{x = -17, y = 6},{x = 17, y = 7},{x = 17, y = 6},{x = -16, y = 9},{x = -16, y = 8},{x = 16, y = 9},{x = 16, y = 8},{x = -15, y = 10},{x = -14, y = 11},{x = 14, y = 11},{x = 15, y = 10},{x = -14, y = 12},{x = -13, y = 12},{x = -13, y = 13},{x = -12, y = 13},{x = 12, y = 13},{x = 13, y = 13},{x = 13, y = 12},{x = 14, y = 12},{x = -12, y = 14},{x = -11, y = 14},{x = -10, y = 15},{x = 10, y = 15},{x = 11, y = 14},{x = 12, y = 14},{x = -9, y = 16},{x = -7, y = 17},{x = -8, y = 16},{x = -5, y = 17},{x = -6, y = 17},{x = 5, y = 17},{x = 7, y = 17},{x = 6, y = 17},{x = 8, y = 16},{x = 9, y = 16},{x = -3, y = 18},{x = -4, y = 18},{x = -1, y = 18},{x = -2, y = 18},{x = 1, y = 18},{x = 0, y = 18},{x = 3, y = 18},{x = 2, y = 18},{x = 4, y = 18}},
[20] = {{x = -3, y = -19},{x = -4, y = -19},{x = -1, y = -19},{x = -2, y = -19},{x = 1, y = -19},{x = 0, y = -19},{x = 3, y = -19},{x = 2, y = -19},{x = 4, y = -19},{x = -9, y = -17},{x = -7, y = -18},{x = -8, y = -17},{x = -5, y = -18},{x = -6, y = -18},{x = 5, y = -18},{x = 7, y = -18},{x = 6, y = -18},{x = 9, y = -17},{x = 8, y = -17},{x = -11, y = -16},{x = -11, y = -15},{x = -12, y = -15},{x = -10, y = -16},{x = 11, y = -15},{x = 11, y = -16},{x = 10, y = -16},{x = 12, y = -15},{x = -13, y = -14},{x = -14, y = -13},{x = 13, y = -14},{x = 14, y = -13},{x = -15, y = -12},{x = -15, y = -11},{x = -16, y = -11},{x = 15, y = -11},{x = 15, y = -12},{x = 16, y = -11},{x = -17, y = -9},{x = -16, y = -10},{x = 16, y = -10},{x = 17, y = -9},{x = -17, y = -8},{x = -18, y = -7},{x = 17, y = -8},{x = 18, y = -7},{x = -18, y = -6},{x = -18, y = -5},{x = 18, y = -5},{x = 18, y = -6},{x = -19, y = -4},{x = -19, y = -3},{x = 19, y = -3},{x = 19, y = -4},{x = -19, y = -2},{x = -19, y = -1},{x = 19, y = -1},{x = 19, y = -2},{x = -19, y = 0},{x = -19, y = 1},{x = 19, y = 1},{x = 19, y = 0},{x = -19, y = 2},{x = -19, y = 3},{x = 19, y = 3},{x = 19, y = 2},{x = -19, y = 4},{x = -18, y = 5},{x = 18, y = 5},{x = 19, y = 4},{x = -18, y = 7},{x = -18, y = 6},{x = 18, y = 7},{x = 18, y = 6},{x = -17, y = 9},{x = -17, y = 8},{x = 17, y = 9},{x = 17, y = 8},{x = -16, y = 10},{x = -16, y = 11},{x = -15, y = 11},{x = 15, y = 11},{x = 16, y = 11},{x = 16, y = 10},{x = -15, y = 12},{x = -14, y = 13},{x = 14, y = 13},{x = 15, y = 12},{x = -13, y = 14},{x = -12, y = 15},{x = -11, y = 15},{x = 11, y = 15},{x = 12, y = 15},{x = 13, y = 14},{x = -11, y = 16},{x = -10, y = 16},{x = -9, y = 17},{x = -8, y = 17},{x = 9, y = 17},{x = 8, y = 17},{x = 10, y = 16},{x = 11, y = 16},{x = -7, y = 18},{x = -5, y = 18},{x = -6, y = 18},{x = -4, y = 19},{x = -3, y = 19},{x = -2, y = 19},{x = -1, y = 19},{x = 0, y = 19},{x = 1, y = 19},{x = 2, y = 19},{x = 3, y = 19},{x = 4, y = 19},{x = 5, y = 18},{x = 7, y = 18},{x = 6, y = 18}},
[21] = {{x = -7, y = -19},{x = -5, y = -19},{x = -6, y = -19},{x = -3, y = -20},{x = -4, y = -20},{x = -1, y = -20},{x = -2, y = -20},{x = 1, y = -20},{x = 0, y = -20},{x = 3, y = -20},{x = 2, y = -20},{x = 5, y = -19},{x = 4, y = -20},{x = 7, y = -19},{x = 6, y = -19},{x = -11, y = -17},{x = -10, y = -17},{x = -9, y = -18},{x = -8, y = -18},{x = 9, y = -18},{x = 8, y = -18},{x = 10, y = -17},{x = 11, y = -17},{x = -13, y = -15},{x = -14, y = -15},{x = -12, y = -16},{x = 13, y = -15},{x = 12, y = -16},{x = 14, y = -15},{x = -15, y = -14},{x = -15, y = -13},{x = -14, y = -14},{x = 15, y = -13},{x = 15, y = -14},{x = 14, y = -14},{x = -17, y = -11},{x = -16, y = -12},{x = 16, y = -12},{x = 17, y = -11},{x = -17, y = -10},{x = -18, y = -9},{x = 17, y = -10},{x = 18, y = -9},{x = -19, y = -7},{x = -18, y = -8},{x = 18, y = -8},{x = 19, y = -7},{x = -19, y = -6},{x = -19, y = -5},{x = 19, y = -6},{x = 19, y = -5},{x = -20, y = -4},{x = -20, y = -3},{x = 20, y = -3},{x = 20, y = -4},{x = -20, y = -2},{x = -20, y = -1},{x = 20, y = -1},{x = 20, y = -2},{x = -20, y = 0},{x = -20, y = 1},{x = 20, y = 1},{x = 20, y = 0},{x = -20, y = 2},{x = -20, y = 3},{x = 20, y = 3},{x = 20, y = 2},{x = -20, y = 4},{x = -19, y = 5},{x = 19, y = 5},{x = 20, y = 4},{x = -19, y = 7},{x = -19, y = 6},{x = 19, y = 7},{x = 19, y = 6},{x = -18, y = 9},{x = -18, y = 8},{x = 18, y = 9},{x = 18, y = 8},{x = -17, y = 11},{x = -17, y = 10},{x = 17, y = 11},{x = 17, y = 10},{x = -16, y = 12},{x = -15, y = 13},{x = 15, y = 13},{x = 16, y = 12},{x = -15, y = 14},{x = -14, y = 14},{x = -14, y = 15},{x = -13, y = 15},{x = 13, y = 15},{x = 14, y = 15},{x = 14, y = 14},{x = 15, y = 14},{x = -12, y = 16},{x = -11, y = 17},{x = -10, y = 17},{x = 11, y = 17},{x = 10, y = 17},{x = 12, y = 16},{x = -9, y = 18},{x = -8, y = 18},{x = -7, y = 19},{x = -5, y = 19},{x = -6, y = 19},{x = 5, y = 19},{x = 6, y = 19},{x = 7, y = 19},{x = 9, y = 18},{x = 8, y = 18},{x = -4, y = 20},{x = -3, y = 20},{x = -2, y = 20},{x = -1, y = 20},{x = 0, y = 20},{x = 1, y = 20},{x = 2, y = 20},{x = 3, y = 20},{x = 4, y = 20}},
[22] = {{x = -3, y = -21},{x = -4, y = -21},{x = -1, y = -21},{x = -2, y = -21},{x = 1, y = -21},{x = 0, y = -21},{x = 3, y = -21},{x = 2, y = -21},{x = 4, y = -21},{x = -10, y = -19},{x = -9, y = -19},{x = -8, y = -19},{x = -7, y = -20},{x = -5, y = -20},{x = -6, y = -20},{x = 5, y = -20},{x = 7, y = -20},{x = 6, y = -20},{x = 9, y = -19},{x = 8, y = -19},{x = 10, y = -19},{x = -13, y = -17},{x = -12, y = -17},{x = -11, y = -18},{x = -10, y = -18},{x = 11, y = -18},{x = 10, y = -18},{x = 13, y = -17},{x = 12, y = -17},{x = -15, y = -15},{x = -13, y = -16},{x = -14, y = -16},{x = 13, y = -16},{x = 15, y = -15},{x = 14, y = -16},{x = -17, y = -13},{x = -16, y = -14},{x = -16, y = -13},{x = 17, y = -13},{x = 16, y = -13},{x = 16, y = -14},{x = -17, y = -12},{x = -18, y = -11},{x = 17, y = -12},{x = 18, y = -11},{x = -19, y = -10},{x = -19, y = -9},{x = -18, y = -10},{x = 18, y = -10},{x = 19, y = -10},{x = 19, y = -9},{x = -19, y = -8},{x = -20, y = -7},{x = 19, y = -8},{x = 20, y = -7},{x = -20, y = -6},{x = -20, y = -5},{x = 20, y = -6},{x = 20, y = -5},{x = -21, y = -4},{x = -21, y = -3},{x = 21, y = -3},{x = 21, y = -4},{x = -21, y = -2},{x = -21, y = -1},{x = 21, y = -1},{x = 21, y = -2},{x = -21, y = 0},{x = -21, y = 1},{x = 21, y = 1},{x = 21, y = 0},{x = -21, y = 2},{x = -21, y = 3},{x = 21, y = 3},{x = 21, y = 2},{x = -21, y = 4},{x = -20, y = 5},{x = 20, y = 5},{x = 21, y = 4},{x = -20, y = 7},{x = -20, y = 6},{x = 20, y = 7},{x = 20, y = 6},{x = -19, y = 9},{x = -19, y = 8},{x = 19, y = 9},{x = 19, y = 8},{x = -19, y = 10},{x = -18, y = 11},{x = -18, y = 10},{x = 18, y = 11},{x = 18, y = 10},{x = 19, y = 10},{x = -17, y = 13},{x = -17, y = 12},{x = -16, y = 13},{x = 16, y = 13},{x = 17, y = 13},{x = 17, y = 12},{x = -16, y = 14},{x = -15, y = 15},{x = 15, y = 15},{x = 16, y = 14},{x = -14, y = 16},{x = -13, y = 16},{x = -13, y = 17},{x = -12, y = 17},{x = 13, y = 16},{x = 13, y = 17},{x = 12, y = 17},{x = 14, y = 16},{x = -11, y = 18},{x = -10, y = 18},{x = -10, y = 19},{x = -9, y = 19},{x = -8, y = 19},{x = 9, y = 19},{x = 8, y = 19},{x = 11, y = 18},{x = 10, y = 18},{x = 10, y = 19},{x = -7, y = 20},{x = -6, y = 20},{x = -5, y = 20},{x = -3, y = 21},{x = -4, y = 21},{x = -1, y = 21},{x = -2, y = 21},{x = 1, y = 21},{x = 0, y = 21},{x = 3, y = 21},{x = 2, y = 21},{x = 4, y = 21},{x = 5, y = 20},{x = 7, y = 20},{x = 6, y = 20}},
[23] = {{x = -8, y = -21},{x = -7, y = -21},{x = -6, y = -21},{x = -5, y = -21},{x = -3, y = -22},{x = -4, y = -22},{x = -1, y = -22},{x = -2, y = -22},{x = 1, y = -22},{x = 0, y = -22},{x = 3, y = -22},{x = 2, y = -22},{x = 5, y = -21},{x = 4, y = -22},{x = 7, y = -21},{x = 6, y = -21},{x = 8, y = -21},{x = -12, y = -19},{x = -11, y = -19},{x = -10, y = -20},{x = -9, y = -20},{x = -8, y = -20},{x = 9, y = -20},{x = 8, y = -20},{x = 11, y = -19},{x = 10, y = -20},{x = 12, y = -19},{x = -14, y = -17},{x = -13, y = -18},{x = -12, y = -18},{x = 13, y = -18},{x = 12, y = -18},{x = 14, y = -17},{x = -15, y = -16},{x = -16, y = -15},{x = 15, y = -16},{x = 16, y = -15},{x = -17, y = -14},{x = -18, y = -13},{x = 17, y = -14},{x = 18, y = -13},{x = -19, y = -12},{x = -19, y = -11},{x = -18, y = -12},{x = 18, y = -12},{x = 19, y = -12},{x = 19, y = -11},{x = -20, y = -10},{x = -20, y = -9},{x = 20, y = -10},{x = 20, y = -9},{x = -21, y = -8},{x = -21, y = -7},{x = -20, y = -8},{x = 20, y = -8},{x = 21, y = -8},{x = 21, y = -7},{x = -21, y = -6},{x = -21, y = -5},{x = 21, y = -6},{x = 21, y = -5},{x = -22, y = -4},{x = -22, y = -3},{x = 22, y = -3},{x = 22, y = -4},{x = -22, y = -2},{x = -22, y = -1},{x = 22, y = -1},{x = 22, y = -2},{x = -22, y = 0},{x = -22, y = 1},{x = 22, y = 1},{x = 22, y = 0},{x = -22, y = 2},{x = -22, y = 3},{x = 22, y = 3},{x = 22, y = 2},{x = -22, y = 4},{x = -21, y = 5},{x = 21, y = 5},{x = 22, y = 4},{x = -21, y = 7},{x = -21, y = 6},{x = 21, y = 7},{x = 21, y = 6},{x = -21, y = 8},{x = -20, y = 9},{x = -20, y = 8},{x = 20, y = 8},{x = 20, y = 9},{x = 21, y = 8},{x = -19, y = 11},{x = -20, y = 10},{x = 19, y = 11},{x = 20, y = 10},{x = -19, y = 12},{x = -18, y = 13},{x = -18, y = 12},{x = 18, y = 13},{x = 18, y = 12},{x = 19, y = 12},{x = -17, y = 14},{x = -16, y = 15},{x = 16, y = 15},{x = 17, y = 14},{x = -15, y = 16},{x = -14, y = 17},{x = 14, y = 17},{x = 15, y = 16},{x = -13, y = 18},{x = -12, y = 18},{x = -12, y = 19},{x = -11, y = 19},{x = 11, y = 19},{x = 13, y = 18},{x = 12, y = 18},{x = 12, y = 19},{x = -10, y = 20},{x = -9, y = 20},{x = -8, y = 20},{x = -8, y = 21},{x = -7, y = 21},{x = -6, y = 21},{x = -5, y = 21},{x = 5, y = 21},{x = 7, y = 21},{x = 6, y = 21},{x = 8, y = 20},{x = 9, y = 20},{x = 8, y = 21},{x = 10, y = 20},{x = -4, y = 22},{x = -3, y = 22},{x = -2, y = 22},{x = -1, y = 22},{x = 0, y = 22},{x = 1, y = 22},{x = 2, y = 22},{x = 3, y = 22},{x = 4, y = 22}}
}
local function process_explosion_tile(pos, explosion_index, current_radius)
local surface = game.surfaces[global.explosion_schedule[explosion_index].surface]
local target_entities = surface.find_entities_filtered({area={{pos.x - 0.5, pos.y - 0.5},{pos.x + 0.499, pos.y + 0.499}}})
local explosion_animation = "explosion"
local tile = surface.get_tile(pos)
if tile.name == "out-of-map" then
if global.explosion_schedule[explosion_index].damage_remaining >= out_of_map_tile_health then
explosion_animation = "big-explosion"
surface.set_tiles({{name = "dirt-5", position = pos}}, true)
end
global.explosion_schedule[explosion_index].damage_remaining = global.explosion_schedule[explosion_index].damage_remaining - out_of_map_tile_health
else
local decay_explosion = true
for _, entity in pairs(target_entities) do
if entity.health then
decay_explosion = false
end
end
if decay_explosion then global.explosion_schedule[explosion_index].damage_remaining = global.explosion_schedule[explosion_index].damage_remaining - empty_tile_damage_decay end
end
for _, entity in pairs(target_entities) do
if entity.health then
if entity.health < global.explosion_schedule[explosion_index].damage_remaining then
explosion_animation = "big-explosion"
if entity.health > 500 then explosion_animation = "big-artillery-explosion" end
global.explosion_schedule[explosion_index].damage_remaining = global.explosion_schedule[explosion_index].damage_remaining - entity.health
if entity.name ~= "market" then entity.damage(999999, "player", "explosion") end
else
entity.damage(global.explosion_schedule[explosion_index].damage_remaining, "player", "explosion")
global.explosion_schedule[explosion_index].damage_remaining = global.explosion_schedule[explosion_index].damage_remaining - entity.health
end
end
end
if global.explosion_schedule[explosion_index].damage_remaining > 5000 and current_radius < 2 then
if math.random(1,2) == 1 then
explosion_animation = "big-explosion"
else
explosion_animation = "big-artillery-explosion"
end
end
surface.create_entity({name = explosion_animation, position = pos})
if global.explosion_schedule[explosion_index].damage_remaining <= 0 then return false end
return true
end
local function create_explosion_schedule(entity)
local inventory = defines.inventory.chest
if entity.type == "car" then inventory = defines.inventory.car_trunk end
local i = entity.get_inventory(inventory)
local explosives_amount = i.get_item_count("explosives")
if explosives_amount < 1 then return end
local center_position = entity.position
if not global.explosion_schedule then global.explosion_schedule = {} end
global.explosion_schedule[#global.explosion_schedule + 1] = {}
global.explosion_schedule[#global.explosion_schedule].surface = entity.surface.name
global.explosion_schedule[#global.explosion_schedule].damage_remaining = damage_per_explosive * explosives_amount
for current_radius = 1, 23, 1 do
global.explosion_schedule[#global.explosion_schedule][current_radius] = {}
global.explosion_schedule[#global.explosion_schedule][current_radius].trigger_tick = game.tick + (current_radius * 8)
local circle_coords = circle_coordinates[current_radius]
for index, tile_position in pairs(circle_coords) do
local pos = {x = center_position.x + tile_position.x, y = center_position.y + tile_position.y}
global.explosion_schedule[#global.explosion_schedule][current_radius][index] = {x = pos.x, y = pos.y}
end
end
entity.die("player")
end
local function on_entity_damaged(event)
local entity = event.entity
if entity.type == "container" or entity.type == "logistic-container" then
if math.random(1,3) == 1 or entity.health <= 0 then create_explosion_schedule(event.entity) return end
end
if entity.type == "cargo-wagon" or entity.type == "car" then
if entity.health <= 0 then create_explosion_schedule(entity) return end
if entity.health < 150 and math.random(1,3) == 1 then create_explosion_schedule(entity) return end
end
end
local function on_tick(event)
if global.explosion_schedule then
local tick = game.tick
local explosion_schedule_is_alive = false
for explosion_index = 1, #global.explosion_schedule, 1 do
if #global.explosion_schedule[explosion_index] > 0 then
explosion_schedule_is_alive = true
local surface = game.surfaces[global.explosion_schedule[explosion_index].surface]
for radius = 1, #global.explosion_schedule[explosion_index], 1 do
if global.explosion_schedule[explosion_index][radius].trigger_tick == tick then
for tile_index = 1, #global.explosion_schedule[explosion_index][radius], 1 do
local continue_explosion = process_explosion_tile(global.explosion_schedule[explosion_index][radius][tile_index], explosion_index, radius)
if not continue_explosion then
global.explosion_schedule[explosion_index] = {}
break
end
end
if radius == #global.explosion_schedule[explosion_index] then global.explosion_schedule[explosion_index] = {} end
break
end
end
end
end
if not explosion_schedule_is_alive then global.explosion_schedule = nil end
end
end
event.add(defines.events.on_entity_damaged, on_entity_damaged)
event.add(defines.events.on_tick, on_tick)

View File

@ -81,9 +81,8 @@ local function poll_show(player)
local poll_panel_button_table = frame.poll_panel_button_table
poll_panel_button_table.add { type = "button", caption = "New Poll", name = "new_poll_assembler_button" }
global.poll_panel_creation_time[player.index] = game.tick
if not global.poll_panel_creation_times then global.poll_panel_creation_times = {} end
global.poll_panel_creation_times[player.index] = {player_index = player.index, tick = 5940}
local str = "Hide (" .. global.poll_duration_in_seconds
str = str .. ")"
@ -205,7 +204,6 @@ function poll_sync_for_new_joining_player(event)
if not global.poll_voted then global.poll_voted = {} end
if not global.autoshow_polls_for_player then global.autoshow_polls_for_player = {} end
if not global.poll_duration_in_seconds then global.poll_duration_in_seconds = 99 end
if not global.poll_panel_creation_time then global.poll_panel_creation_time = {} end
if not global.score_total_polls_created then global.score_total_polls_created = 0 end
local player = game.players[event.player_index]
@ -295,26 +293,29 @@ local function on_gui_click(event)
end
local function on_tick()
if game.tick % 60 == 0 then
for _, player in pairs(game.connected_players) do
if global.poll_panel_creation_time[player.index] then
local frame = player.gui.left["poll-panel"]
if frame then
local y = (game.tick - global.poll_panel_creation_time[player.index]) / 60
local y = global.poll_duration_in_seconds - y
y = math.round(y, 0)
if y <= 0 then
frame.destroy()
global.poll_panel_creation_time[player.index] = nil
else
y = "Hide (" .. y
y = y .. ")"
frame.poll_panel_button_table.poll_hide_button.caption = y
end
end
if not global.poll_panel_creation_times then return end
if #global.poll_panel_creation_times == 0 then
global.poll_panel_creation_times = nil
return
end
if game.tick % 60 ~= 0 then return end
for _, creation_time in pairs(global.poll_panel_creation_times) do
local player = game.players[creation_time.player_index]
local frame = player.gui.left["poll-panel"]
if frame then
global.poll_panel_creation_times[player.index].tick = global.poll_panel_creation_times[player.index].tick - 60
if global.poll_panel_creation_times[player.index].tick <= 0 then
frame.destroy()
global.poll_panel_creation_times[player.index] = nil
else
local str = "Hide (" .. math.ceil(global.poll_panel_creation_times[player.index].tick / 60)
str = str .. ")"
frame.poll_panel_button_table.poll_hide_button.caption = str
end
end
end
end
end
Event.add(defines.events.on_tick, on_tick)