From de8315bf726581ba8d5f1965817535ad016f10ae Mon Sep 17 00:00:00 2001 From: grilledham Date: Sat, 9 Jun 2018 11:43:37 +0100 Subject: [PATCH 01/10] added global.lua --- utils/global.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 utils/global.lua diff --git a/utils/global.lua b/utils/global.lua new file mode 100644 index 00000000..dca9497b --- /dev/null +++ b/utils/global.lua @@ -0,0 +1,24 @@ +local Event = require 'utils.event' +local Token = require 'utils.global_token' + +Global = {} + +local data = {} + +function Global.register(tbl, callback) + local token = Token.register_global(tbl) + table.insert(data, {tbl = tbl, callback = callback, token = token}) +end + +Event.on_load( + function() + for _, d in ipairs(data) do + local tbl = Token.get_global(d.token) + d.callback(tbl) + end + + data = nil + end +) + +return Global From 62e8e2f58e78f620437bed51218f258bf13ca48e Mon Sep 17 00:00:00 2001 From: grilledham Date: Thu, 14 Jun 2018 13:32:00 +0100 Subject: [PATCH 02/10] tag_group refactor --- config.lua | 2 +- control.lua | 5 +- resources/band_roles.lua | 201 -------------------------------------- resources/tag_groups.lua | 53 ++++++++++ band.lua => tag_group.lua | 196 ++++++++++++++++++++++++------------- 5 files changed, 182 insertions(+), 275 deletions(-) delete mode 100644 resources/band_roles.lua create mode 100644 resources/tag_groups.lua rename band.lua => tag_group.lua (74%) diff --git a/config.lua b/config.lua index 52935178..a4429ba9 100644 --- a/config.lua +++ b/config.lua @@ -1,4 +1,4 @@ -_DEBUG = false +_DEBUG = true global.scenario = {} global.spys = {"valansch", "air20"} diff --git a/control.lua b/control.lua index 0e1dadc5..2d857231 100644 --- a/control.lua +++ b/control.lua @@ -19,7 +19,7 @@ require 'bot' require 'info' require 'player_list' require 'poll' -require 'band' +require 'tag_group' require 'tasklist' require 'blueprint_helper' require 'paint' @@ -137,7 +137,6 @@ end Event.add(defines.events.on_player_created, player_joined) Event.add(defines.events.on_console_chat, hodor) - Event.add( defines.events.on_player_joined_game, function(event) @@ -154,6 +153,6 @@ Event.add( local gui = player.gui gui.top.style = 'slot_table_spacing_horizontal_flow' - gui.left.style = 'slot_table_spacing_vertical_flow' + gui.left.style = 'slot_table_spacing_vertical_flow' end ) diff --git a/resources/band_roles.lua b/resources/band_roles.lua deleted file mode 100644 index 198858e8..00000000 --- a/resources/band_roles.lua +++ /dev/null @@ -1,201 +0,0 @@ --- A part of band.lua --- Feel free to edit. - -return { - ['Trooper'] = { - paths = {'item/tank'}, - tooltips = { - 'Incoming!!!', - "If the facts don't fit the theory, change the facts.", - 'I suppose it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail.', - "There's a fine line between genius and insanity. I have erased this line." - }, - verbs = { - 'strengthened' - } - }, - ['Mining'] = { - paths = { - 'item/iron-axe', - 'item/steel-axe', - 'item/iron-ore', - 'item/copper-ore' - }, - tooltips = { - 'Mine or not to mine', - 'The nation behaves well if it treats the natural resources as assets which\n it must turn over to the next generation increased, and not impaired, in value.' - }, - verbs = { - 'enriched' - -- "smelted" - } - }, - ['Smelting'] = { - paths = { - 'item/stone-furnace', - 'item/steel-furnace' - }, - tooltips = { - 'Mirrors are ice which do not melt: what melts are those who admire themselves in them.', - "It's as certain that as long as fossil fuels are the cheapest energy, we will just keep burning them." - }, - verbs = { - 'fused' - } - }, - ['Production'] = { - paths = { - 'item/assembling-machine-1', - 'item/assembling-machine-2', - 'item/assembling-machine-3' - }, - tooltips = { - "When every physical and mental resources is focused, one's power to solve a problem multiplies tremendously.", - 'The production of too many useful things results in too many useless people. ', - 'Everything must be made as simple as possible. But not simpler.' - }, - verbs = { - 'enhanced' - } - }, - ['Science'] = { - paths = { - 'item/science-pack-1', - 'item/science-pack-2', - 'item/science-pack-3', - 'item/military-science-pack', - 'item/production-science-pack', - 'item/high-tech-science-pack', - 'item/space-science-pack' - }, - tooltips = { - 'Science without religion is lame, religion without science is blind', - 'If we knew what it was we were doing, it would not be called research, would it?', - 'Somewhere, something incredible is waiting to be known.', - "I'm sure the universe is full of intelligent life. It's just been too intelligent to come here." - }, - verbs = { - 'advanced' - } - }, - ['Wizard'] = { - paths = { - 'item/arithmetic-combinator', - 'item/green-wire', - 'item/red-wire', - 'item/decider-combinator' - }, - tooltips = { - "Without mathematics, there's nothing you can do. Everything around you is mathematics. Everything around you is numbers.", - 'Pure mathematics is, in its way, the poetry of logical ideas.', - 'God used beautiful mathematics in creating the world.', - 'The numbers may be said to rule the whole world of quantity, and the four rules of arithmetic may be regarded as the complete equipment of the mathematician.', - 'But if the technological Singularity can happen, it will.' - --"One day it will have a mind of it´s own!." - }, - verbs = { - 'combinated', - 'equaled' - } - }, - ['Trains'] = { - paths = { - 'item/locomotive', - 'entity/curved-rail', - 'item/cargo-wagon', - 'item/fluid-wagon', - 'item/rail-signal', - 'item/rail' - }, - tooltips = { - 'Ch, ch, choooo!', - 'The only way of catching a train I have ever discovered is to miss the train before. ', - "If a trainstation is where the train stops, what's a workstation...?" - }, - verbs = { - 'expanded', - 'derailed' - } - }, - ['Oil'] = { - paths = { - 'item/pumpjack', - 'item/storage-tank', - 'item/oil-refinery', - 'item/chemical-plant', - 'fluid/crude-oil' - }, - tooltips = { - "We're running out of oil!", - 'Black gold', - "Naturally occurring, yellow-to-black liquid found in geological formations beneath the Earth's surface, which is commonly refined into various types of fuels.", - 'Components of petroleum are separated using a technique called fractional distillation.', - 'The petroleum industry generally classifies crude oil by the geographic location it is produced in (e.g. West Texas Intermediate, Brent, or Oman), its API gravity (an oil industry measure of density), and its sulfur content.' - }, - verbs = { - 'lubricated', - 'sulfured' - } - }, - ['Powah!'] = { - paths = {'item/steam-engine', 'item/nuclear-reactor', 'item/solar-panel'}, - tooltips = { - 'I ve Got The power!', - 'Power Overwhelming!!!111', - 'Its Over 9000!!!', - 'If you want to find the secrets of the universe, think in terms of energy, frequency and vibration.' - }, - verbs = { - 'amplified', - 'teslaed', - 'electrified' - } - }, - ['Spaceman'] = { - paths = {'item/rocket-silo', 'item/rocket-fuel'}, - tooltips = { - "That's one small step for a man, one giant leap for mankind.", - "The sky is the limit only for those who aren't afraid to fly!", - 'Apocalyptic explosions, dead reactors, terrorists, mass murder, death-slugs, and now a blindness plague. This is a terrible planet. We should not have come here.', - 'A still more glorious dawn awaits. Not a sunrise, but a galaxy rise. A morning filled with 400 billion suns. The rising of the milky way', - 'The Universe is under no obligation to make sense to you.' - }, - verbs = { - 'warped' - } - }, - ['Cat'] = { - paths = {'item/raw-fish'}, - tooltips = { - '=^.^=', - 'Meow', - "In a cat's eye, all things belong to cats.", - "Cats don't like change without their consent.", - 'Heard melodies are sweet, but those unheard, are sweeter' - }, - verbs = { - 'mewed', - 'purred', - 'miaowed' - } - }, - ['Dog'] = { - paths = { - 'entity/small-biter', - 'entity/medium-biter', - 'entity/big-biter', - 'entity/behemoth-biter' - }, - tooltips = { - 'Not a cat', - 'Friend', - "It's not the size of the dog in the fight, it's the size of the fight in the dog.", - 'When what you want is a relationship, and not a person, get a dog', - 'A dog has one aim in life... to bestow his heart.' - }, - verbs = { - 'woofed', - 'howled' - } - } -} diff --git a/resources/tag_groups.lua b/resources/tag_groups.lua new file mode 100644 index 00000000..527a9bf0 --- /dev/null +++ b/resources/tag_groups.lua @@ -0,0 +1,53 @@ +-- A part of band.lua +-- Feel free to edit. + +return { + ['Trooper'] = { + path = 'item/tank', + verb = 'strengthened' + }, + ['Mining'] = { + path = 'item/electric-mining-drill', + verb = 'enriched' + }, + ['Smelting'] = { + path = 'item/stone-furnace', + verb = 'fused' + }, + ['Production'] = { + path = 'item/assembling-machine-2', + verb = 'enhanced' + }, + ['Science'] = { + path = 'item/science-pack-3', + verb = 'advanced' + }, + ['Wizard'] = { + path = 'item/green-wire', + verb = 'combinated' + }, + ['Trains'] = { + path = 'item/locomotive', + verb = 'derailed' + }, + ['Oil'] = { + path = 'fluid/crude-oil', + verb = 'lubricated' + }, + ['Powah!'] = { + path = 'item/steam-engine', + verb = 'electrified' + }, + ['Spaceman'] = { + path = 'item/rocket-silo', + verb = 'warped' + }, + ['Cat'] = { + path = 'item/raw-fish', + verb = 'mewed' + }, + ['Dog'] = { + path = 'entity/medium-biter', + verb = 'woofed' + } +} diff --git a/band.lua b/tag_group.lua similarity index 74% rename from band.lua rename to tag_group.lua index 79742f22..23f77e10 100644 --- a/band.lua +++ b/tag_group.lua @@ -1,29 +1,29 @@ local Event = require 'utils.event' local Gui = require 'utils.gui' -local Token = require 'utils.global_token' +local Global = require 'utils.global' local UserGroups = require 'user_groups' -local band_roles = require 'resources.band_roles' -local band_roles_token = Token.register_global(band_roles) +local deafult_verb = 'expanded' +local tag_groups = require 'resources.tag_groups' local player_tags = {} -local player_tags_token = Token.register_global(player_tags) -Event.on_load( - function() - band_roles = Token.get_global(band_roles_token) - player_tags = Token.get_global(player_tags_token) +Global.register( + {tag_groups = tag_groups, player_tags = player_tags}, + function(data) + tag_groups = data.tag_groups + player_tags = data.player_tags end ) -local function change_player_tag(player, band_name) +local function change_player_tag(player, tag_name) local old_tag = player.tag - if band_name == '' and old_tag == '' then + if tag_name == '' and old_tag == '' then return false end - local tag_name = '[' .. band_name .. ']' - if old_tag == tag_name then + local tag = '[' .. tag_name .. ']' + if old_tag == tag then return false end @@ -34,35 +34,29 @@ local function change_player_tag(player, band_name) end end - if band_name == '' then + if tag_name == '' then player.tag = '' return true end - local band = band_roles[band_name] + local band = tag_groups[tag_name] if not band then return false end - local players = player_tags[tag_name] + local players = player_tags[tag] if not players then players = {} - player_tags[tag_name] = players + player_tags[tag] = players end players[player.index] = true - player.tag = tag_name + player.tag = tag - local verbs = band.verbs - local verb - if verbs then - verb = verbs[math.random(#verbs)] - else - verb = 'expanded' - end + local verb = band.verb or deafult_verb - game.print(tag_name .. ' squad has `' .. verb .. '` with ' .. player.name) + game.print(tag .. ' squad has `' .. verb .. '` with ' .. player.name) return true end @@ -94,19 +88,19 @@ end local main_button_name = Gui.uid_name() local main_frame_name = Gui.uid_name() +local main_frame_content_name = Gui.uid_name() local band_button_name = Gui.uid_name() local band_label_name = Gui.uid_name() local clear_button_name = Gui.uid_name() local create_tag_button_name = Gui.uid_name() -local delete_tag_button_name = Gui.uid_name() +local edit_tag_button_name = Gui.uid_name() local create_tag_frame_name = Gui.uid_name() local create_tag_choose_icon_name = Gui.uid_name() local create_tag_icon_type_name = Gui.uid_name() -local close_create_tag_name = Gui.uid_name() local confirm_create_tag_name = Gui.uid_name() - -local main_frame_content_name = Gui.uid_name() +local delete_tag_name = Gui.uid_name() +local close_create_tag_name = Gui.uid_name() local function player_joined(event) local player = game.players[event.player_index] @@ -124,13 +118,13 @@ end local function draw_main_frame_content(parent) local player = parent.gui.player - for band_name, band_data in pairs(band_roles) do - local tag_name = '[' .. band_name .. ']' - local players = player_tags[tag_name] + for tag_name, band_data in pairs(tag_groups) do + local tag = '[' .. tag_name .. ']' + local players = player_tags[tag] local size = get_size(players) - local path = band_data.paths[math.random(#band_data.paths)] - local tooltip = band_data.tooltips[math.random(#band_data.tooltips)] + local path = band_data.path + local tooltip = tag_name local row = parent.add {type = 'flow', direction = 'horizontal'} row.style.top_padding = 0 @@ -138,12 +132,12 @@ local function draw_main_frame_content(parent) if player.admin then local delete_button = - row.add {type = 'sprite-button', name = delete_tag_button_name, sprite = 'utility/remove'} - delete_button.tooltip = 'Delete tag group' + row.add {type = 'sprite-button', name = edit_tag_button_name, sprite = 'utility/rename_icon_normal'} + delete_button.tooltip = 'Edit tag group' delete_button.style.top_padding = 0 delete_button.style.bottom_padding = 0 delete_button.style.maximal_height = 32 - Gui.set_data(delete_button, band_name) + Gui.set_data(delete_button, tag_name) end local button = row.add {type = 'sprite-button', name = band_button_name, sprite = path} @@ -151,12 +145,12 @@ local function draw_main_frame_content(parent) button.style.top_padding = 0 button.style.bottom_padding = 0 button.style.maximal_height = 32 - Gui.set_data(button, band_name) + Gui.set_data(button, tag_name) - local role_label = row.add {type = 'label', name = band_label_name, caption = band_name .. size} + local role_label = row.add {type = 'label', name = band_label_name, caption = tag_name .. size} role_label.style.top_padding = 4 role_label.style.minimal_width = 120 - Gui.set_data(role_label, {band_name = band_name, path = path}) + Gui.set_data(role_label, {tag_name = tag_name, path = path}) local list = row.add {type = 'flow', direction = 'horizontal'} @@ -253,20 +247,49 @@ local choices = { 'recipe' } -local function draw_create_tag_frame(event) - local center = event.player.gui.center +local function draw_create_tag_frame(event, tag_data) + local name + local verb + local path + local spirte_type + local frame_caption + local confirm_caption + if tag_data then + name = tag_data.name + verb = tag_data.verb + path = tag_data.path - if center[create_tag_frame_name] then - return + if path and path ~= '' then + spirte_type, path = path:match('([^/]+)/([^/]+)') + else + spirte_type = choices[1] + path = nil + end + + frame_caption = 'Edit Tag' + confirm_caption = 'Edit' + else + name = '' + verb = 'expanded' + spirte_type = choices[1] + frame_caption = 'Create A New Tag' + confirm_caption = 'Create' end - local frame = - center.add {type = 'frame', name = create_tag_frame_name, caption = 'Create A New Tag', direction = 'vertical'} + local center = event.player.gui.center + + local frame = center[create_tag_frame_name] + if frame then + Gui.remove_data_recursivly(frame) + frame.destroy() + end + + frame = center.add {type = 'frame', name = create_tag_frame_name, caption = frame_caption, direction = 'vertical'} local main_table = frame.add {type = 'table', column_count = 2} main_table.add {type = 'label', caption = 'Name'} - local name_field = main_table.add {type = 'textfield'} + local name_field = main_table.add {type = 'textfield', text = name} Gui.set_data(name_field, frame) main_table.add {type = 'label', caption = 'Icon'} @@ -274,16 +297,16 @@ local function draw_create_tag_frame(event) local selection_flow = icons_flow.add {type = 'flow'} local focus - for i, value in ipairs(choices) do + for _, value in ipairs(choices) do local radio = selection_flow.add({type = 'flow'}).add { type = 'radiobutton', name = create_tag_icon_type_name, caption = value, - state = i == 1 + state = value == spirte_type } - if i == 1 then + if value == spirte_type then focus = radio end @@ -294,20 +317,29 @@ local function draw_create_tag_frame(event) icons_flow.add { type = 'choose-elem-button', name = create_tag_choose_icon_name, - elem_type = choices[1] + elem_type = spirte_type } + + if path then + choose.elem_value = path + end + Gui.set_data(choose, frame) main_table.add {type = 'label', caption = 'Verb'} - local verb_field = main_table.add {type = 'textfield', text = 'expanded'} + local verb_field = main_table.add {type = 'textfield', text = verb} Gui.set_data(verb_field, frame) - local flow = frame.add {type = 'flow', direction = 'horizontal'} + local bottom_flow = frame.add {type = 'flow', direction = 'horizontal'} - local close_button = flow.add {type = 'button', name = close_create_tag_name, caption = 'Close'} - Gui.set_data(close_button, frame) + local left_flow = bottom_flow.add{type = 'flow', direction = 'horizontal'} + left_flow.style.align = 'left' - local confirm_button = flow.add {type = 'button', name = confirm_create_tag_name, caption = 'Confirm'} + local right_flow = bottom_flow.add{type = 'flow', direction = 'horizontal'} + right_flow.style.horizontally_stretchable = true + right_flow.style.align = 'right' + + local confirm_button = left_flow.add {type = 'button', name = confirm_create_tag_name, caption = confirm_caption} Gui.set_data(confirm_button, frame) Gui.set_data( @@ -317,10 +349,18 @@ local function draw_create_tag_frame(event) choose = choose, icons_flow = icons_flow, name = name_field, - verb = verb_field + verb = verb_field, + tag_data = tag_data } ) + if tag_data then + left_flow.add {type = 'button', name = delete_tag_name, caption = 'Delete'} + end + + local close_button = right_flow.add {type = 'button', name = close_create_tag_name, caption = 'Close'} + Gui.set_data(close_button, frame) + event.player.opened = frame end @@ -353,12 +393,12 @@ Gui.on_click( end ) -Gui.on_click( - delete_tag_button_name, +--[[ Gui.on_click( + edit_tag_button_name, function(event) local tag_name = Gui.get_data(event.element) - if not band_roles[tag_name] then + if not tag_groups[tag_name] then event.player.print("Sorry, Tag name '" .. tag_name .. "' not found.") return end @@ -375,12 +415,28 @@ Gui.on_click( end end - band_roles[tag_name] = nil + tag_groups[tag_name] = nil redraw_main_frame() game.print(event.player.name .. ' has deleted the ' .. tag_name .. ' tag group') end +) ]] +Gui.on_click( + edit_tag_button_name, + function(event) + local tag_name = Gui.get_data(event.element) + + local tag_data = tag_groups[tag_name] + if not tag_data then + event.player.print("Sorry, Tag name '" .. tag_name .. "' not found.") + return + end + + tag_data.name = tag_name + + draw_create_tag_frame(event, tag_data) + end ) Gui.on_click( @@ -435,7 +491,7 @@ Gui.on_click( return end - if band_roles[name] then + if tag_groups[name] then player.print('Sorry, tag ' .. data.name .. ' is already in use.') return end @@ -445,30 +501,30 @@ Gui.on_click( local path if not sprite or sprite == '' then - path = 'utility/pump_cannot_connect_icon' + path = nil elseif type == 'signal' then path = 'virtual-signal/' .. data.choose.elem_value.name else path = type .. '/' .. data.choose.elem_value end - if not frame.gui.is_valid_sprite_path(path) then + if path and not frame.gui.is_valid_sprite_path(path) then player.print('Sorry, ' .. path .. ' is not a valid sprite') return end local verb = data.verb.text if verb == '' then - verb = 'expanded' + verb = deafult_verb end local band_role = { - paths = {path}, - verbs = {verb}, - tooltips = {name} + path = path, + verb = verb, + tooltip = name } - band_roles[name] = band_role + tag_groups[name] = band_role redraw_main_frame() @@ -530,7 +586,7 @@ local function tag_command(cmd) end local tag_name = string.sub(cmd.parameter, params[1]:len() + 2) - local tag = band_roles[tag_name] + local tag = tag_groups[tag_name] if tag == nil then player_print("Tag '" .. tag_name .. "' does not exist. Create the tag first by clicking Tag -> Create Tag.") From 1f4b76fe4fa909199f708557acbcf5349f92f506 Mon Sep 17 00:00:00 2001 From: grilledham Date: Thu, 14 Jun 2018 16:56:36 +0100 Subject: [PATCH 03/10] naughty words off by default --- control.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control.lua b/control.lua index 0e1dadc5..3408c49c 100644 --- a/control.lua +++ b/control.lua @@ -57,7 +57,7 @@ for _, w in pairs(hodor_messages) do message_weight_sum = message_weight_sum + w[2] end -global.naughty_words_enabled = true +global.naughty_words_enabled = false global.naughty_words = { ['ass'] = true, ['bugger'] = true, From 89988cbad4a5400e416e63532aa80ccd7a20ad82 Mon Sep 17 00:00:00 2001 From: grilledham Date: Thu, 14 Jun 2018 16:56:48 +0100 Subject: [PATCH 04/10] updated regulars list --- resources/regulars.lua | 50 ++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/resources/regulars.lua b/resources/regulars.lua index f227bf8b..42453941 100644 --- a/resources/regulars.lua +++ b/resources/regulars.lua @@ -8,13 +8,10 @@ return { ['utidi'] = true, ['jokerofthez'] = true, ['saltlands'] = true, - ['maniah'] = true, ['cool'] = true, ['boail'] = true, ['hunter117x'] = true, ['tonytroll'] = true, - ['highinfiberoptics'] = true, - ['atoms'] = true, ['adlmr'] = true, ['rayijin'] = true, ['sephir'] = true, @@ -50,7 +47,6 @@ return { ['gizan'] = true, ['slastraf'] = true, ['zacman0510'] = true, - ['theorangeangle'] = true, ['williambellwisdo'] = true, ['extraxyz'] = true, ['markupolioncz'] = true, @@ -71,7 +67,6 @@ return { ['cydes'] = true, ['ccaspanello'] = true, ['wickvitaminc'] = true, - ['newcott'] = true, ['craigrood'] = true, ['lillepallt'] = true, ['skykittena'] = true, @@ -79,14 +74,12 @@ return { ['claude47'] = true, ['mrsjaakbraak'] = true, ['heretek'] = true, - ['factorian12321'] = true, ['steponitnicejob'] = true, ['cchpucky'] = true, ['rulerofdabacon'] = true, ['tcp'] = true, ['marucan'] = true, ['twltriston'] = true, - ['bemm'] = true, ['lordxleasy'] = true, ['judaires'] = true, ['flowild'] = true, @@ -104,13 +97,11 @@ return { ['starlite'] = true, ['ducktaperules'] = true, ['tvardero'] = true, - ['thethane'] = true, ['lejnel'] = true, ['griffinonetwo'] = true, ['stat0x00'] = true, ['gynox'] = true, ['miniman10000'] = true, - ['aliiien0110'] = true, ['gespenstdermaschine'] = true, ['brathahn'] = true, ['leadhades27'] = true, @@ -127,11 +118,9 @@ return { ['collin08'] = true, ['cybernoise'] = true, ['sholvo'] = true, - ['nexarius'] = true, ['jinnjuice'] = true, ['corlin'] = true, ['xeoxius'] = true, - ['altech'] = true, ['dq_shell'] = true, ['terz42'] = true, ['fullfruntall'] = true, @@ -147,7 +136,6 @@ return { ['bobbje'] = true, ['snerktk'] = true, ['aplavins'] = true, - ['gotze'] = true, ['rikkert'] = true, ['fire3231'] = true, ['roghurricane'] = true, @@ -167,14 +155,12 @@ return { ['chunhung'] = true, ['apolomir'] = true, ['grandstore256'] = true, - ['zehir'] = true, ['shaun_das_schaf'] = true, ['crisbk'] = true, ['kev007'] = true, ['sonopard'] = true, ['li7ro'] = true, ['rascher'] = true, - ['sangria_louie'] = true, ['toledini'] = true, ['moo_cowman'] = true, ['lord_kill'] = true, @@ -216,7 +202,6 @@ return { ['ansible32'] = true, ['binzerle'] = true, ['davoud'] = true, - ['copperbotte'] = true, ['eaglesight'] = true, ['fremiamagus'] = true, ['struppi'] = true, @@ -224,7 +209,6 @@ return { ['xalpha1989'] = true, ['jono777'] = true, ['toof_kitty'] = true, - ['nekobaron'] = true, ['empirebuilder1'] = true, ['delta124'] = true, ['lupigaming'] = true, @@ -233,7 +217,6 @@ return { ['teondar'] = true, ['harmlessbeltbot'] = true, ['noodletrains'] = true, - ['cmdrrat'] = true, ['lunastarwarp'] = true, ['brikir'] = true, ['bobucles'] = true, @@ -248,29 +231,24 @@ return { ['bissi'] = true, ['paul1998'] = true, ['timmypwn'] = true, - ['pogomand'] = true, ['stig219'] = true, ['leviculus'] = true, ['tommy17'] = true, ['virusgamesplay'] = true, ['ajdiller88'] = true, ['rlidwka'] = true, - ['simonflapse'] = true, ['kidflash'] = true, ['the_squid'] = true, ['dimava'] = true, - ['ralp'] = true, ['damian0816'] = true, ['chukles'] = true, ['frissi'] = true, ['df1229'] = true, ['actitishypoleucos'] = true, - ['angus100'] = true, ['morgan3rd'] = true, ['kyte'] = true, ['olexn'] = true, ['acolyteofcthulu'] = true, - ['mariocraft2001'] = true, ['krul'] = true, ['b4x'] = true, ['firebunnie'] = true, @@ -298,7 +276,6 @@ return { ['the_ledgendary'] = true, ['capitansky'] = true, ['barnaba'] = true, - ['drlloyd1337'] = true, ['twinotter'] = true, ['zaen'] = true, ['jbev2'] = true, @@ -316,5 +293,30 @@ return { ['Drlloyd1337'] = true, ['rhobes'] = true, ['cpenguinred'] = true, - ['SimonFlapse'] = true + ['SimonFlapse'] = true, + ['Newcott'] = true, + ['NekoBaron'] = true, + ['adidas'] = true, + ['Ralp'] = true, + ['Nexarius'] = true, + ['HighInFiberOptics'] = true, + ['hackguy'] = true, + ['Altech'] = true, + ['Atoms'] = true, + ['_Joe_'] = true, + ['Aliiien0110'] = true, + ['Angus100'] = true, + ['Bemm'] = true, + ['Factorian12321'] = true, + ['franc_ist'] = true, + ['Mariocraft2001'] = true, + ['PogomanD'] = true, + ['Copperbotte'] = true, + ['CmdrRat'] = true, + ['Sangria_louie'] = true, + ['TheOrangeAngle'] = true, + ['Maniah'] = true, + ['Gotze'] = true, + ['Zehir'] = true, + ['TheThane'] = true } From dbed6044c2e68067f0ad3851ee072cdb83adb97d Mon Sep 17 00:00:00 2001 From: grilledham Date: Thu, 14 Jun 2018 23:31:05 +0100 Subject: [PATCH 05/10] updates --- tag_group.lua | 289 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 194 insertions(+), 95 deletions(-) diff --git a/tag_group.lua b/tag_group.lua index 23f77e10..fa680dc1 100644 --- a/tag_group.lua +++ b/tag_group.lua @@ -7,16 +7,26 @@ local deafult_verb = 'expanded' local tag_groups = require 'resources.tag_groups' local player_tags = {} +local no_notify_players = {} Global.register( - {tag_groups = tag_groups, player_tags = player_tags}, + {tag_groups = tag_groups, player_tags = player_tags, no_notify_players = no_notify_players}, function(data) tag_groups = data.tag_groups player_tags = data.player_tags + no_notify_players = no_notify_players end ) -local function change_player_tag(player, tag_name) +local function notify_players(message) + for _, p in ipairs(game.connected_players) do + if p.valid and not no_notify_players[p.index] then + p.print(message) + end + end +end + +local function change_player_tag(player, tag_name, silent) local old_tag = player.tag if tag_name == '' and old_tag == '' then return false @@ -36,11 +46,14 @@ local function change_player_tag(player, tag_name) if tag_name == '' then player.tag = '' + if not silent then + notify_players(player.name .. ' has left the ' .. old_tag .. ' squad') + end return true end - local band = tag_groups[tag_name] - if not band then + local tag_data = tag_groups[tag_name] + if not tag_data then return false end @@ -54,10 +67,11 @@ local function change_player_tag(player, tag_name) player.tag = tag - local verb = band.verb or deafult_verb - - game.print(tag .. ' squad has `' .. verb .. '` with ' .. player.name) + local verb = tag_data.verb or deafult_verb + if not silent then + notify_players(tag .. ' squad has `' .. verb .. '` with ' .. player.name) + end return true end @@ -89,11 +103,12 @@ end local main_button_name = Gui.uid_name() local main_frame_name = Gui.uid_name() local main_frame_content_name = Gui.uid_name() -local band_button_name = Gui.uid_name() -local band_label_name = Gui.uid_name() +local tag_button_name = Gui.uid_name() +local tag_label_name = Gui.uid_name() local clear_button_name = Gui.uid_name() local create_tag_button_name = Gui.uid_name() local edit_tag_button_name = Gui.uid_name() +local notify_checkbox_name = Gui.uid_name() local create_tag_frame_name = Gui.uid_name() local create_tag_choose_icon_name = Gui.uid_name() @@ -117,40 +132,48 @@ end local function draw_main_frame_content(parent) local player = parent.gui.player + local grid = parent.add {type = 'table', column_count = 1} + grid.style.vertical_spacing = 0 - for tag_name, band_data in pairs(tag_groups) do + for tag_name, tag_data in pairs(tag_groups) do local tag = '[' .. tag_name .. ']' local players = player_tags[tag] local size = get_size(players) - local path = band_data.path - local tooltip = tag_name + local path = tag_data.path - local row = parent.add {type = 'flow', direction = 'horizontal'} - row.style.top_padding = 0 - row.style.bottom_padding = 0 + local row = grid.add {type = 'table', column_count = 4} + row.style.horizontal_spacing = 0 - if player.admin then - local delete_button = - row.add {type = 'sprite-button', name = edit_tag_button_name, sprite = 'utility/rename_icon_normal'} - delete_button.tooltip = 'Edit tag group' - delete_button.style.top_padding = 0 - delete_button.style.bottom_padding = 0 - delete_button.style.maximal_height = 32 - Gui.set_data(delete_button, tag_name) + if player.admin or UserGroups.is_regular(player.name) then + local edit_button = + row.add { + type = 'sprite-button', + name = edit_tag_button_name, + sprite = 'utility/rename_icon_normal', + tooltip = 'Edit tag group' + } + edit_button.style.top_padding = 0 + edit_button.style.bottom_padding = 0 + edit_button.style.maximal_height = 32 + Gui.set_data(edit_button, tag_name) end - local button = row.add {type = 'sprite-button', name = band_button_name, sprite = path} - button.tooltip = tooltip - button.style.top_padding = 0 - button.style.bottom_padding = 0 - button.style.maximal_height = 32 - Gui.set_data(button, tag_name) + local tag_button = + row.add { + type = 'sprite-button', + name = tag_button_name, + sprite = path, + tooltip = tag_name + } - local role_label = row.add {type = 'label', name = band_label_name, caption = tag_name .. size} - role_label.style.top_padding = 4 - role_label.style.minimal_width = 120 - Gui.set_data(role_label, {tag_name = tag_name, path = path}) + tag_button.style.maximal_height = 32 + Gui.set_data(tag_button, tag_name) + + local tag_label = row.add {type = 'label', name = tag_label_name, caption = tag_name .. size} + tag_label.style.left_padding = 4 + tag_label.style.minimal_width = 120 + Gui.set_data(tag_label, {tag_name = tag_name, path = path}) local list = row.add {type = 'flow', direction = 'horizontal'} @@ -191,17 +214,34 @@ local function draw_main_frame(player) draw_main_frame_content(scroll_pane) - local flow = main_frame.add {type = 'flow'} - flow.add {type = 'button', name = main_button_name, caption = 'Close'} - flow.add {type = 'button', name = clear_button_name, caption = 'Clear Tag'} + main_frame.add { + type = 'checkbox', + name = notify_checkbox_name, + caption = 'Notify me when tag groups change.', + state = not no_notify_players[player.index], + tooltip = '' + } + + local bottom_flow = main_frame.add {type = 'flow', direction = 'horizontal'} + + local left_flow = bottom_flow.add {type = 'flow', direction = 'horizontal'} + left_flow.style.align = 'left' + left_flow.style.horizontally_stretchable = true + + left_flow.add {type = 'button', name = main_button_name, caption = 'Close'} + + local right_flow = bottom_flow.add {type = 'flow', direction = 'horizontal'} + right_flow.style.align = 'right' + + right_flow.add {type = 'button', name = clear_button_name, caption = 'Clear Tag'} if player.admin or UserGroups.is_regular(player.name) then - flow.add {type = 'button', name = create_tag_button_name, caption = 'Create Tag'} + right_flow.add {type = 'button', name = create_tag_button_name, caption = 'Create Tag'} end end local function redraw_main_frame() - for _, p in ipairs(game.connected_players) do + for _, p in pairs(game.players) do local main_frame = p.gui.left[main_frame_name] if main_frame and main_frame.valid then local content = main_frame[main_frame_content_name] @@ -209,7 +249,9 @@ local function redraw_main_frame() Gui.remove_data_recursivly(content) content.clear() - draw_main_frame_content(content) + if p.connected then + draw_main_frame_content(content) + end end end end @@ -217,7 +259,7 @@ end local function redraw_main_button(player, path) local main_button = player.gui.top[main_button_name] - if path == '' then + if path == '' or path == nil then main_button.sprite = 'utility/pump_cannot_connect_icon' main_button.caption = 'tag' else @@ -261,6 +303,10 @@ local function draw_create_tag_frame(event, tag_data) if path and path ~= '' then spirte_type, path = path:match('([^/]+)/([^/]+)') + if spirte_type == 'virtual-signal' then + spirte_type = 'signal' + path = {type = 'virtual', name = path} + end else spirte_type = choices[1] path = nil @@ -276,7 +322,8 @@ local function draw_create_tag_frame(event, tag_data) confirm_caption = 'Create' end - local center = event.player.gui.center + local player = event.player + local center = player.gui.center local frame = center[create_tag_frame_name] if frame then @@ -332,47 +379,46 @@ local function draw_create_tag_frame(event, tag_data) local bottom_flow = frame.add {type = 'flow', direction = 'horizontal'} - local left_flow = bottom_flow.add{type = 'flow', direction = 'horizontal'} + local left_flow = bottom_flow.add {type = 'flow', direction = 'horizontal'} left_flow.style.align = 'left' + left_flow.style.horizontally_stretchable = true - local right_flow = bottom_flow.add{type = 'flow', direction = 'horizontal'} - right_flow.style.horizontally_stretchable = true - right_flow.style.align = 'right' - - local confirm_button = left_flow.add {type = 'button', name = confirm_create_tag_name, caption = confirm_caption} - Gui.set_data(confirm_button, frame) - - Gui.set_data( - frame, - { - focus = focus, - choose = choose, - icons_flow = icons_flow, - name = name_field, - verb = verb_field, - tag_data = tag_data - } - ) - - if tag_data then - left_flow.add {type = 'button', name = delete_tag_name, caption = 'Delete'} - end - - local close_button = right_flow.add {type = 'button', name = close_create_tag_name, caption = 'Close'} + local close_button = left_flow.add {type = 'button', name = close_create_tag_name, caption = 'Close'} Gui.set_data(close_button, frame) - event.player.opened = frame + local right_flow = bottom_flow.add {type = 'flow', direction = 'horizontal'} + right_flow.style.align = 'right' + + if tag_data then + local delete_button = right_flow.add {type = 'button', name = delete_tag_name, caption = 'Delete'} + Gui.set_data(delete_button, frame) + end + + local confirm_button = right_flow.add {type = 'button', name = confirm_create_tag_name, caption = confirm_caption} + Gui.set_data(confirm_button, frame) + + local data = { + focus = focus, + choose = choose, + icons_flow = icons_flow, + name = name_field, + verb = verb_field, + tag_data = tag_data + } + Gui.set_data(frame, data) + + player.opened = frame end Gui.on_click(main_button_name, toggle) Gui.on_click( - band_button_name, + tag_button_name, function(event) - local tag = Gui.get_data(event.element) + local tag_name = Gui.get_data(event.element) local path = event.element.sprite - if change_player_tag(event.player, tag) then + if change_player_tag(event.player, tag_name) then redraw_main_frame() redraw_main_button(event.player, path) end @@ -380,23 +426,29 @@ Gui.on_click( ) Gui.on_click( - band_label_name, + tag_label_name, function(event) local data = Gui.get_data(event.element) - local tag = data.band_name + local tag_name = data.tag_name local path = data.path - if change_player_tag(event.player, tag) then + if change_player_tag(event.player, tag_name) then redraw_main_frame() redraw_main_button(event.player, path) end end ) ---[[ Gui.on_click( - edit_tag_button_name, +Gui.on_click( + delete_tag_name, function(event) - local tag_name = Gui.get_data(event.element) + local frame = Gui.get_data(event.element) + local data = Gui.get_data(frame) + local tag_data = data.tag_data + local tag_name = tag_data.name + + Gui.remove_data_recursivly(frame) + frame.destroy() if not tag_groups[tag_name] then event.player.print("Sorry, Tag name '" .. tag_name .. "' not found.") @@ -406,7 +458,7 @@ Gui.on_click( local tag = '[' .. tag_name .. ']' for _, player in pairs(game.players) do - if player.tag == tag then + if player.valid and player.tag == tag then change_player_tag(player, '') if player.connected then @@ -419,9 +471,10 @@ Gui.on_click( redraw_main_frame() - game.print(event.player.name .. ' has deleted the ' .. tag_name .. ' tag group') + notify_players(event.player.name .. ' has deleted the ' .. tag_name .. ' tag group') end -) ]] +) + Gui.on_click( edit_tag_button_name, function(event) @@ -439,6 +492,23 @@ Gui.on_click( end ) +Gui.on_click( + notify_checkbox_name, + function(event) + local player_index = event.player_index + local checkbox = event.element + + local new_state + if checkbox.state then + new_state = nil + else + new_state = true + end + + no_notify_players[player_index] = new_state + end +) + Gui.on_click( clear_button_name, function(event) @@ -483,16 +553,17 @@ Gui.on_click( local player = event.player local frame = Gui.get_data(event.element) local data = Gui.get_data(frame) + local old_tag_data = data.tag_data - local name = data.name.text + local tag_name = data.name.text - if name == '' then + if tag_name == '' then player.print('Sorry, the tag needs a name') return end - if tag_groups[name] then - player.print('Sorry, tag ' .. data.name .. ' is already in use.') + if not old_tag_data and tag_groups[tag_name] then + player.print('Sorry, tag ' .. tag_name .. ' is already in use.') return end @@ -518,20 +589,48 @@ Gui.on_click( verb = deafult_verb end - local band_role = { - path = path, - verb = verb, - tooltip = name - } - - tag_groups[name] = band_role - - redraw_main_frame() - Gui.remove_data_recursivly(frame) frame.destroy() - game.print(player.name .. ' has made a new tag group called ' .. name) + local tag_data = { + path = path, + verb = verb + } + tag_groups[tag_name] = tag_data + + local message + if old_tag_data then + local old_name = old_tag_data.name + if old_name == tag_name and old_tag_data.path == path and old_tag_data.verb == verb then + return + end + + if old_name ~= tag_name then + message = player.name .. ' has edited the ' .. tag_name .. ' (formerly ' .. old_name .. ') tag group' + + local old_tag = '[' .. old_name .. ']' + + for _, p in pairs(game.players) do + if p.valid and p.tag == old_tag then + change_player_tag(p, tag_name, true) + + if p.connected then + redraw_main_button(player, '') + end + end + end + + tag_groups[old_name] = nil + else + message = player.name .. ' has edited the ' .. tag_name .. ' tag group' + end + else + message = player.name .. ' has made a new tag group called ' .. tag_name + end + + redraw_main_frame() + + notify_players(message) end ) @@ -600,4 +699,4 @@ local function tag_command(cmd) end end -commands.add_command('tag', ' Sets a players tag. (Admins only)', tag_command) +commands.add_command('tag', " Sets a player's tag. (Admins only)", tag_command) From cc3fefdeb9234a0e25a032a9dce39335b7759c5d Mon Sep 17 00:00:00 2001 From: grilledham Date: Thu, 14 Jun 2018 23:39:00 +0100 Subject: [PATCH 06/10] fixed tooltip --- tag_group.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tag_group.lua b/tag_group.lua index fa680dc1..281c0340 100644 --- a/tag_group.lua +++ b/tag_group.lua @@ -219,7 +219,7 @@ local function draw_main_frame(player) name = notify_checkbox_name, caption = 'Notify me when tag groups change.', state = not no_notify_players[player.index], - tooltip = '' + tooltip = 'Receive a message when a player enters or leaves a tag group or when a tag group is created, edited or deleted' } local bottom_flow = main_frame.add {type = 'flow', direction = 'horizontal'} From 48215169c1570119c7bf1fd4f174d6dd0c4d5fc2 Mon Sep 17 00:00:00 2001 From: grilledham Date: Thu, 14 Jun 2018 23:39:25 +0100 Subject: [PATCH 07/10] fixed tooltip --- tag_group.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tag_group.lua b/tag_group.lua index 281c0340..2f6673cd 100644 --- a/tag_group.lua +++ b/tag_group.lua @@ -219,7 +219,7 @@ local function draw_main_frame(player) name = notify_checkbox_name, caption = 'Notify me when tag groups change.', state = not no_notify_players[player.index], - tooltip = 'Receive a message when a player enters or leaves a tag group or when a tag group is created, edited or deleted' + tooltip = 'Receive a message when a player enters or leaves a tag group or when a tag group is created, edited or deleted.' } local bottom_flow = main_frame.add {type = 'flow', direction = 'horizontal'} From 60e9020724ec1f66a066423a7323523ed92ad323 Mon Sep 17 00:00:00 2001 From: grilledham Date: Fri, 15 Jun 2018 11:35:21 +0100 Subject: [PATCH 08/10] fixed bug --- tag_group.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tag_group.lua b/tag_group.lua index 2f6673cd..9ef2339e 100644 --- a/tag_group.lua +++ b/tag_group.lua @@ -14,7 +14,7 @@ Global.register( function(data) tag_groups = data.tag_groups player_tags = data.player_tags - no_notify_players = no_notify_players + no_notify_players = data.no_notify_players end ) From 40669a0c2a6fbcfe5c56fd5d9c28d5c0bd1d9ab8 Mon Sep 17 00:00:00 2001 From: grilledham Date: Sat, 16 Jun 2018 12:57:11 +0100 Subject: [PATCH 09/10] bermuda triangle --- fish_market.lua | 4 +- map_gen/data/.source_images/ammo-icon.png | Bin 0 -> 656 bytes map_gen/data/.source_images/danger-icon.png | Bin 0 -> 577 bytes .../data/.source_images/destroyed-icon.png | Bin 0 -> 649 bytes .../electricity-icon-unplugged.png | Bin 0 -> 583 bytes .../data/.source_images/electricity-icon.png | Bin 0 -> 581 bytes map_gen/data/.source_images/fluid-icon.png | Bin 0 -> 588 bytes map_gen/data/.source_images/fuel-icon.png | Bin 0 -> 654 bytes .../no-building-material-icon.png | Bin 0 -> 606 bytes .../.source_images/no-storage-space-icon.png | Bin 0 -> 655 bytes .../not-enough-construction-robots-icon.png | Bin 0 -> 597 bytes .../not-enough-repair-packs-icon.png | Bin 0 -> 588 bytes map_gen/data/.source_images/recharge-icon.png | Bin 0 -> 638 bytes .../too-far-from-roboport-icon.png | Bin 0 -> 690 bytes map_gen/data/presets/ammo-icon.lua | 71 +++++ map_gen/data/presets/danger-icon.lua | 71 +++++ map_gen/data/presets/destroyed-icon.lua | 71 +++++ .../presets/electricity-icon-unplugged.lua | 71 +++++ map_gen/data/presets/electricity-icon.lua | 71 +++++ map_gen/data/presets/fluid-icon.lua | 71 +++++ map_gen/data/presets/fuel-icon.lua | 71 +++++ .../presets/no-building-material-icon.lua | 71 +++++ .../data/presets/no-storage-space-icon.lua | 71 +++++ .../not-enough-construction-robots-icon.lua | 71 +++++ .../presets/not-enough-repair-packs-icon.lua | 71 +++++ map_gen/data/presets/recharge-icon.lua | 71 +++++ .../presets/too-far-from-roboport-icon.lua | 71 +++++ map_gen/presets/bermuda_triangle.lua | 286 ++++++++++++++++++ map_gen/shared/builders.lua | 32 ++ map_gen/shared/generate.lua | 2 +- map_gen/shared/generate_not_threaded.lua | 2 +- map_layout.lua | 5 +- resources/market_items.lua | 35 ++- 33 files changed, 1269 insertions(+), 20 deletions(-) create mode 100644 map_gen/data/.source_images/ammo-icon.png create mode 100644 map_gen/data/.source_images/danger-icon.png create mode 100644 map_gen/data/.source_images/destroyed-icon.png create mode 100644 map_gen/data/.source_images/electricity-icon-unplugged.png create mode 100644 map_gen/data/.source_images/electricity-icon.png create mode 100644 map_gen/data/.source_images/fluid-icon.png create mode 100644 map_gen/data/.source_images/fuel-icon.png create mode 100644 map_gen/data/.source_images/no-building-material-icon.png create mode 100644 map_gen/data/.source_images/no-storage-space-icon.png create mode 100644 map_gen/data/.source_images/not-enough-construction-robots-icon.png create mode 100644 map_gen/data/.source_images/not-enough-repair-packs-icon.png create mode 100644 map_gen/data/.source_images/recharge-icon.png create mode 100644 map_gen/data/.source_images/too-far-from-roboport-icon.png create mode 100644 map_gen/data/presets/ammo-icon.lua create mode 100644 map_gen/data/presets/danger-icon.lua create mode 100644 map_gen/data/presets/destroyed-icon.lua create mode 100644 map_gen/data/presets/electricity-icon-unplugged.lua create mode 100644 map_gen/data/presets/electricity-icon.lua create mode 100644 map_gen/data/presets/fluid-icon.lua create mode 100644 map_gen/data/presets/fuel-icon.lua create mode 100644 map_gen/data/presets/no-building-material-icon.lua create mode 100644 map_gen/data/presets/no-storage-space-icon.lua create mode 100644 map_gen/data/presets/not-enough-construction-robots-icon.lua create mode 100644 map_gen/data/presets/not-enough-repair-packs-icon.lua create mode 100644 map_gen/data/presets/recharge-icon.lua create mode 100644 map_gen/data/presets/too-far-from-roboport-icon.lua create mode 100644 map_gen/presets/bermuda_triangle.lua diff --git a/fish_market.lua b/fish_market.lua index 1af3b175..a3c82cb5 100644 --- a/fish_market.lua +++ b/fish_market.lua @@ -145,14 +145,14 @@ local function pre_player_mined_item(event) end local entity_drop_amount = { - ['small-biter'] = {low = -62, high = 1}, + --[[['small-biter'] = {low = -62, high = 1}, ['small-spitter'] = {low = -62, high = 1}, ['medium-biter'] = {low = -14, high = 1}, ['medium-spitter'] = {low = -14, high = 1}, ['big-biter'] = {low = -2, high = 1}, ['big-spitter'] = {low = -2, high = 1}, ['behemoth-biter'] = {low = 1, high = 1}, - ['behemoth-spitter'] = {low = 1, high = 1}, + ['behemoth-spitter'] = {low = 1, high = 1}, ]] ['biter-spawner'] = {low = 5, high = 15}, ['spitter-spawner'] = {low = 5, high = 15}, ['small-worm-turret'] = {low = 2, high = 8}, diff --git a/map_gen/data/.source_images/ammo-icon.png b/map_gen/data/.source_images/ammo-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..894690a39df5a877a202e529a32963c8227d6f71 GIT binary patch literal 656 zcmV;B0&o3^P)00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00IC>L_t(&L+#Z;j+{UY1<;mem27g9-2Ze5 z!mpwxU?`xVA>l2e8T;Gijx;l`$K!E`Un3fK;p!p1>vQjj_Qg3iA#`OfO$c3_N`^nqIh$DVS#H_HiVt$g4i?Xu*n9>LRx|c`{rLLo{#Bh4vBP<- zj+r67DH6x=PM!EKAM5H8BN7MkNF6gdxe@Inc%g!UCDKEB%~@Z;Ks94;G}^LziF8h` zr!-ow+K|Odq;qmTrJm9ojaF=(C7P4#DfN_w^qR18mS{q#P@VmK+7a5xvRR@Dq2kXU zhxzM6BzLhXCzlW^-v6{I%@W-hkmcK@G&`+fk|KOXoM literal 0 HcmV?d00001 diff --git a/map_gen/data/.source_images/danger-icon.png b/map_gen/data/.source_images/danger-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..63bcf6fb0d305750b185ad0cc280b622fefa7b06 GIT binary patch literal 577 zcmV-H0>1r;P)00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00FT{L_t(&L+#j0a)U4s1wdE%0J;BZ^RYWA zlCfZf1c(Z~!Vo?ewKt3&d&G8Y!z`GZ5FX*+Nqdn}N8J<#lvavK)vj zSzbXwJ^O*Up8Z<3>)8*)_3T%%x|Ws+!CG4K?5(9`La>&WBumYst-1>!ckUNX{5T_A3zE|ND>7l@mw`$O16{Kx2%xCf0>k{&b$;vO{q z@VOto6M}y9e)6F=?GHZnwr%?k&VBvU^#hJ}{eYvL`0x1Z^vmVHyWKtjo8k^<;9bKF P00000NkvXXu0mjfKVJTv literal 0 HcmV?d00001 diff --git a/map_gen/data/.source_images/destroyed-icon.png b/map_gen/data/.source_images/destroyed-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a79fe30b280f65def2d739b0a6f09a23cf109874 GIT binary patch literal 649 zcmV;40(Sk0P)00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00H?)L_t(&L+#aDZsRZv1<(LpK=;4e8NoRT z+&EIGhiwJ$!TglurRa}oZu2AFc3wKY`T9h=lVur( zI#`rpsE18?=9*ZMXRetwpO~&B{E6u{b_587iN(m&k`5CK5C{{iB3eT-K%j;TRf54FcNoQGp j5iAtGiqkKb9=F?nzg!lvI6;>1s;*b3=DjSL74G){)!Z!pk#?_L`iUdT1k0gQ7S`0VrE{6US4X6f{C7i zo{`~4h0LiyQ@4A%IEG|6zdavW)NCNY>Tv)6B~I1t!J8Zx@Cxw#J+9M#@o|~-we!|j zxeF^?9t+K}S!`=@T+h(Z;<%cG)HLJEXLwJ~T;0QWqA}Ws|3sst4$sld$~QfSV^wqb z4h6RA%s*%O^bL>*b(wQQaqAKw!OJrD5T{^o$!Yf|k@oGvN>ZDrWi1f7Xfb2{{>$1m z2VCA8)LAe7%P((m(XK&W&+sEF{|pUQuf|J4!n;4M?r;+o)L#W<2=>nXak8gO@wD-+ zyPfe#i(1aAs_hcqf5e4zHfNia(42%7EoWJrWjXx}LJpk~&W|PCn>lY8dLm;uY!=A`sy1wSP_$QFQGe literal 0 HcmV?d00001 diff --git a/map_gen/data/.source_images/electricity-icon.png b/map_gen/data/.source_images/electricity-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b2268e17fd17f26e9031ca48f91fb90742edc7d9 GIT binary patch literal 581 zcmV-L0=oT)P)00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00Fg0L_t(&L+#T+a-%R11yEPz0J;BZGl_Yr zu}4TWv;Z;1Te+m)U(Ldg+wHcCuY!w9uyVom`0QJ7Jvhr&2#w69b#h~}W0UBZ?6^dF zG`0&cFchnW85@Va!i){VQY#rAfsIx&d^+oFqT*b3*-Fb}Yo6jn%6cRcT>sXLg* zJ5hQhFL$E!FrKZGE4ZE`aSU(P$<2|NBe6HH)yd6~s1Vwfr z4HN_z2r#gc;k8U}rR9Z-O;p60+e*s|7h7owGL)d`g^L755hfB8{c@V4Yms<@qF+vX z(AXxMpyPK&lRF1A4w*RJjmPn4SeYT%?;2$p2`nJ_fue@=S*0-%@ zdgU+2X?@$;rnhjG*0E~QwD}JQ7xZ6zfS;Fjf56$U{{ff(6Hgpmiq&tojK|{-b@WXW TuN4lt00000NkvXXu0mjfRHFW8 literal 0 HcmV?d00001 diff --git a/map_gen/data/.source_images/fluid-icon.png b/map_gen/data/.source_images/fluid-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..477efce1d51de9f750f7f9ef63120526964707b3 GIT binary patch literal 588 zcmV-S0<-;zP)00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00F#7L_t(&L+#Yjl7cW01VI1)r|&3euka9^ zkN}~Ie$vg(X5)j8+pSwaGfEd?@fin~VC4nJ{j={oI(lZ)6`Hzb&5yM9$&Mds?T`fn z0==5Oxg{F*5 zDd~(%{D6VJfItz^jLb->=>rBbIk}9?Yf5RIzKl#rC?>WDs;<+Qkx59z#5#F^_7akX z571OX@-w|9Bu7dkr4^bA39r#rNO+_a{95`73BRRf6C+|`n;5a=d@EBjGMgCjkHb1< zeWSaAL32*38Mi`HHRJv$w`1;%gLcfFs9nvqw;x=4`^o))v)vCk+x7p2CJL8g_1mq+ af>sVkwLO0000!lvI6;>1s;*b3=DjSL74G){)!Z!pk#?_L`iUdT1k0gQ7S`0VrE{6US4X6f{C7i zo{`~4h0LiyQ~!CoIEG|6zrAvMQ?r7A%f&zc{pTlNv=(WSk_y;(>g$ozDjB&+=UXhjn(ctUOY3SM832*>6r5rzYa!iff>A)Llq1}-B!Eh z$eju8y`ds;%B6zM=ZSK?ep;qex3r-LyVTuQO{)tp#Ck6DmR*1R`))?Lp`9Iv@A@Ot zk1u?0`r}!^mVFHJJ_Uj8XT-G59lO5IqI8MlT37YwkAgY%WK{AineTfRJXDyOa&!J) z2D?qi?w-r-+EuFRetl1){+hz;e;ZsYjVA4yzC-SN1MBaNFJd25y2J6(EfUu=4CzMbX{T1>B+n?J%xM=_AgZ!7H jH=PZ>yuSMK^G|j|OOxx*jxJaMOfC$bu6{1-oD!M00004XF*Lt006O% z3;baP00009a7bBm000id000id0mpBsWB>pF8FWQhbW?9;ba!ELWdLwtX>N2bZe?^J zG%heMGBNQWX_Wu~0ozGLK~!i%?bJ(hgD?;UK;Qq;i3{2;uozoEKvdB?Yu-GGMe?}a zhV{4L=t4Yv!Qc`+Ibl3L@7*FXGA|7Xjm%49a%1wwuS5srff+1}#_KXz7>cK5vo;Rz z%4Tg49#zQl2)wAA{d0Ls6%{A)kOqp*;uQ@Pox&5EsXLzgo2fgP%R5neBsce?_ZaT% zO7#I;xC0mL&27I(PaORsy(?E`urP6y!NPvrlflBoQ3eY;amkw5V(NFoc#@vH&7)no zVZoq*q6LHQ)UTN}P_$;&m+pjd6%|_~deIsXDr7kz)P>4`P!$ycp?3NLLRC}*gc>Oe z2qlac3=+lxp%$6~LThFT<2AE@P&G9P?DjQjuOUs?BuYK$4(U$dF=co zUczP}%Oz}nC!5V$6&2a6eIZ!FW-Tq*tZfo0VY7jv5;jxjg)G0;{Rn(y=AWf3e=w}F zxjxsvIeke_ip-rWCjIE0IO<35o8zujPaJindgiPv)e}cuseW>BL6`r4r)$6d>HdJT sUH=0v{YO0g4|;KS5gvWJHF`Y$0Wy#{;g0~;lmGw#07*qoM6N<$g45IdO8@`> literal 0 HcmV?d00001 diff --git a/map_gen/data/.source_images/no-storage-space-icon.png b/map_gen/data/.source_images/no-storage-space-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..495e39f1780ed1e7505fecd9e8517e095bc8a980 GIT binary patch literal 655 zcmV;A0&x9_P)00004XF*Lt006O% z3;baP00009a7bBm000id000id0mpBsWB>pF8FWQhbW?9;ba!ELWdLwtX>N2bZe?^J zG%heMGBNQWX_Wu~0t`t+K~!i%?bF?|s~`*p(7yjmpW_b887=;RiqaX^RsE7cxajBg z>ejzG>94T$gu+j-az?p-_FbZ*XEt4-saw|Eq_t0W+@!Tb7A#<(H?}Kapet4@W~?9f zs$sGRHmYR!an?D+5zn&AA&z*EMNV+gQ*3d9gC1dp(;Rm{_g}$@cXIPZ9C{}=U&p!k zaOb5QeFGOZ;DXlN)_@C|a#b^~X~#XyxTX=8H0H7v+_0{sr$oB$V$RM?OR00$v^o9$ zl1f){aOSI;K6g!<)9+lWUdE|&YD*9BJ)uz6JW#uYBQwgCJNXECGL@Ddrs{nhh>z5=)?mCqB*rQoHVBvL_xGPrBL~Rf$}lV$S4O<5REp%L^P7lsU6^e zjPghtM4Pk*(MXz6u4Ou-Jdy^{CapmUuWzD{2d1yKP5K@>#m^li|%Nox=V zQ2_%%6hxb}uFDK+7K8S--T5nINiP;G6m$-78BJG8RN9AD~#kz;h26 z7?@HiV4$l9h|4UFq_B#~kSDv+$R9zm#iIqP)00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00G5GL_t(&L+#Yja)Tfc1KPS1z-AlJcji%=kzYTdd_To-kUKVpZAtXjLb_H2o1|KSBZ|v8&`=A$O8iu zM&orcI^*!JFtu@bR}IY(cu^(g%X!W&R$R+lcCq3@9@4;~t9V5Ni!R{_&8$10`+KnQ zOm6PP($l!ME341p&aSLJfeSOn%jA~H9nEbCgDuj_;|3OOk>1CS5{Z87%^2@s z!4~NrY|I$f(%vH7gN+&EDyjhrd!-wug+&r^dI1WRls}4xsVNYp6r)o^Gf_PJGIc{V zVsvU~*3(}n8>SYfwu==j1Z!y4(A>p}B~mpsYiNGD{)m|>Wg?Z78(0*kmNT!XziKHq zZK$I8#c(fM5(aZ-A5QD(r%W1H^v6-jW*}(VgR@)l^fw1L^e;ZZ&)a%F;A+nYT00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00F#7L_t(&L+#ViZsRZv1i<|NPq(f!C{i#| zB}%px!1Gd^$z3rI_qg5G^c5I<1Sbc^>vL~lyg0`eSX!A&%j~Vmja63Hu4ZD3a8xJZ6}YIA@a3G7qT*U^$DytJIZXi%#se!;OTHDA3#?8dW>1!qy z7&j9eq^yTzVBAA;gr**nfpHJXG&P-s1LID@IXXHC2gaR*6BP854~+ZC_mb`>9~h^o zXeXDVA}~%-(M~Q!MPQtzrG-S6mcTem%fGA-P!t#sP*i6(OG|;JEG-olv$RxM&C*h0 zD@#k2)hsP9^a6 a$KxBc7h%-TW4(d^000000004XF*Lt006O% z3;baP00009a7bBm000id000id0mpBsWB>pF8FWQhbW?9;ba!ELWdLwtX>N2bZe?^J zG%heMGBNQWX_Wu~0sBcrK~!i%?bAz=;~)?PK;Qq;-5x2KfJVrL(9aRdWz~BnyzuMs zxUHXz(HHUXjKx>*8q1*DzRigLgjjKd&$O8iu?#Al^6mG@S!qo1= zyLxEeffsdBzMSW5;>5MQWfLbZf9-9Y~j%T1g}>dB(HyNwe$n@ybPq`Zj} z{}~T(sE6iOuDltHaVt!1%$~R2oC{DGw&$&@JU`%S&kwlTcmI$7y?$o!RXqLi81Z`j Y0+5h&rAq6p)Bpeg07*qoM6N<$g2L_}mjD0& literal 0 HcmV?d00001 diff --git a/map_gen/data/.source_images/too-far-from-roboport-icon.png b/map_gen/data/.source_images/too-far-from-roboport-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..01a923c06c6bf100f955bf05dc10fedd4b1184bd GIT binary patch literal 690 zcmV;j0!{siP)00004XF*Lt006O% z3;baP00009a7bBm000id000id0mpBsWB>pF8FWQhbW?9;ba!ELWdLwtX>N2bZe?^J zG%heMGBNQWX_Wu~0xwBKK~!i%?a|S)q#z7M(f$M5U{GJzbNNke>Pc z{H*NXAHKf`hZ{7$1y}FUTOaq9kXRX)1_-T;OJn5L#En%%*TjuyNUw(L+Ay;ePHV%= zI=HI`lZ)V}9!#!)i~2GDE^aYs1PEo6-o-5$r3MVV{u{U=qg47ou?Q{l8#p2JmB=Bf z&lm81fRI6>gv7&m+@W1U!lC^nUM`6OEmIHS&8b-Z4Bk9Lx<7v}UTeU>(8!H=>K?pt zAKtkWFWrPkoJz~9hx0r4;034N^-l8&%*Xn@N~@wirS4?x-mA1u)o0b6hOK+_uKj?7 zZ-@32tTbq3l$xLPVO0+3UB^C$cIlu*#f0xYTUV@z#6>JCA+bj?U?N6tHnzveogyA1Hyhhy 0 and y > 0 +end + +square = b.rotate(square, degrees(-45)) +square = b.scale(square, 5 / 12, 1) + +local map = b.translate(square, 0, -10) + +local sea = b.translate(map, 0, -6) +sea = b.change_tile(sea, true, 'water') +sea = b.fish(sea, 0.075) + +map = b.any {map, sea} + +local icons = { + b.picture(require 'map_gen.data.presets.ammo-icon'), + b.picture(require 'map_gen.data.presets.danger-icon'), + b.picture(require 'map_gen.data.presets.destroyed-icon'), + b.picture(require 'map_gen.data.presets.electricity-icon'), + b.picture(require 'map_gen.data.presets.electricity-icon-unplugged'), + b.picture(require 'map_gen.data.presets.fluid-icon'), + b.picture(require 'map_gen.data.presets.fuel-icon'), + b.picture(require 'map_gen.data.presets.no-building-material-icon'), + b.picture(require 'map_gen.data.presets.no-storage-space-icon'), + b.picture(require 'map_gen.data.presets.not-enough-construction-robots-icon'), + b.picture(require 'map_gen.data.presets.not-enough-repair-packs-icon'), + b.picture(require 'map_gen.data.presets.recharge-icon'), + b.picture(require 'map_gen.data.presets.too-far-from-roboport-icon') +} +local icons_count = #icons + +local value = b.manhattan_value + +local function non_transform(shape) + return shape +end + +local function uranium_transform(shape) + return b.scale(shape, 0.5) +end + +local function oil_transform(shape) + shape = b.scale(shape, 0.5) + return b.throttle_world_xy(shape, 1, 4, 1, 4) +end + +local function empty_transform() + return b.empty_shape +end + +local ores = { + {transform = non_transform, resource = 'iron-ore', value = value(500, 0.1), weight = 16}, + {transform = non_transform, resource = 'copper-ore', value = value(400, 0.1), weight = 10}, + {transform = non_transform, resource = 'stone', value = value(250, 0.1), weight = 3}, + {transform = non_transform, resource = 'coal', value = value(400, 0.1), weight = 5}, + {transform = uranium_transform, resource = 'uranium-ore', value = value(200, 0.1), weight = 3}, + {transform = oil_transform, resource = 'crude-oil', value = value(100000, 50), weight = 6}, + {transform = empty_transform, weight = 100} +} + +local random = Random.new(seed1, seed2) + +local total_weights = {} +local t = 0 +for _, v in ipairs(ores) do + t = t + v.weight + table.insert(total_weights, t) +end + +local p_cols = 50 +local p_rows = 50 +local pattern = {} + +for _ = 1, p_rows do + local row = {} + table.insert(pattern, row) + for _ = 1, p_cols do + local shape = icons[random:next_int(1, icons_count)] + + local i = random:next_int(1, t) + local index = table.binary_search(total_weights, i) + if (index < 0) then + index = bit32.bnot(index) + end + + local ore_data = ores[index] + shape = ore_data.transform(shape) + local ore = b.resource(shape, ore_data.resource, ore_data.value) + + table.insert(row, ore) + end +end + +local ore_shape = b.project_pattern(pattern, 96, 1.1, 50, 50) +ore_shape = b.scale(ore_shape, 0.2) + +local start_ore = icons[2] +local start_iron = b.resource(start_ore, 'iron-ore', value(600, 0)) +local start_copper = b.resource(start_ore, 'copper-ore', value(600, 0)) +local start_coal = b.resource(start_ore, 'coal', value(1300, 0)) +local start_stone = b.resource(start_ore, 'stone', value(900, 0)) + +start_ore = b.segment_pattern({start_coal, start_stone, start_copper, start_iron}) +start_ore = b.translate(start_ore, 0, 64) + +ore_shape = b.choose(b.rectangle(224, 224), start_ore, ore_shape) + +local item_pool = { + {name = 'firearm-magazine', count = 200, weight = 1250}, + {name = 'land-mine', count = 100, weight = 250}, + {name = 'shotgun-shell', count = 200, weight = 1250}, + {name = 'piercing-rounds-magazine', count = 200, weight = 833.3333}, + {name = 'science-pack-1', count = 200, weight = 100}, + {name = 'science-pack-2', count = 200, weight = 100}, + {name = 'grenade', count = 100, weight = 500}, + {name = 'defender-capsule', count = 50, weight = 500}, + {name = 'railgun-dart', count = 100, weight = 500}, + {name = 'piercing-shotgun-shell', count = 200, weight = 312.5}, + {name = 'steel-axe', count = 5, weight = 166.6667}, + {name = 'submachine-gun', count = 1, weight = 166.6667}, + {name = 'shotgun', count = 1, weight = 166.6667}, + {name = 'uranium-rounds-magazine', count = 200, weight = 166.6667}, + {name = 'cannon-shell', count = 100, weight = 166.6667}, + {name = 'rocket', count = 100, weight = 166.6667}, + {name = 'distractor-capsule', count = 25, weight = 166.6667}, + {name = 'railgun', count = 1, weight = 100}, + {name = 'flamethrower-ammo', count = 50, weight = 100}, + {name = 'military-science-pack', count = 200, weight = 100}, + {name = 'science-pack-3', count = 200, weight = 100}, + {name = 'explosive-rocket', count = 100, weight = 100}, + {name = 'explosive-cannon-shell', count = 100, weight = 100}, + {name = 'cluster-grenade', count = 100, weight = 100}, + {name = 'poison-capsule', count = 100, weight = 100}, + {name = 'slowdown-capsule', count = 100, weight = 100}, + {name = 'construction-robot', count = 50, weight = 100}, + {name = 'solar-panel-equipment', count = 5, weight = 833.3333}, + {name = 'artillery-targeting-remote', count = 1, weight = 50}, + {name = 'tank-flamethrower', count = 1, weight = 33.3333}, + {name = 'explosive-uranium-cannon-shell', count = 100, weight = 33.3333}, + {name = 'destroyer-capsule', count = 10, weight = 33.3333}, + {name = 'artillery-shell', count = 10, weight = 25}, + {name = 'battery-equipment', count = 5, weight = 25}, + {name = 'night-vision-equipment', count = 2, weight = 25}, + {name = 'exoskeleton-equipment', count = 2, weight = 166.6667}, + {name = 'rocket-launcher', count = 1, weight = 14.2857}, + {name = 'combat-shotgun', count = 1, weight = 10}, + {name = 'flamethrower', count = 1, weight = 10}, + {name = 'tank-cannon', count = 1, weight = 10}, + {name = 'modular-armor', count = 1, weight = 100}, + {name = 'belt-immunity-equipment', count = 1, weight = 10}, + {name = 'personal-roboport-equipment', count = 1, weight = 100}, + {name = 'energy-shield-equipment', count = 2, weight = 100}, + {name = 'personal-laser-defense-equipment', count = 2, weight = 100}, + {name = 'battery-mk2-equipment', count = 1, weight = 40}, + {name = 'tank-machine-gun', count = 1, weight = 3.3333}, + {name = 'power-armor', count = 1, weight = 33.3333}, + {name = 'fusion-reactor-equipment', count = 1, weight = 33.3333}, + {name = 'production-science-pack', count = 200, weight = 100}, + {name = 'high-tech-science-pack', count = 200, weight = 100}, + {name = 'artillery-turret', count = 1, weight = 2.5}, + {name = 'artillery-wagon-cannon', count = 1, weight = 1}, + {name = 'atomic-bomb', count = 1, weight = 1}, + {name = 'space-science-pack', count = 200, weight = 10} +} + +local total_weights = {} +local t = 0 +for _, v in ipairs(item_pool) do + t = t + v.weight + table.insert(total_weights, t) +end + +local callback = + Token.register( + function(entity, data) + local count = math.random(3, 8) + for _ = 1, count do + local i = math.random() ^ data * t + + local index = table.binary_search(total_weights, i) + if (index < 0) then + index = bit32.bnot(index) + end + + local loot = item_pool[index] + + entity.insert(loot) + end + end +) + +local loot_power = 500 +local function loot(x, y) + if math.random(4096) ~= 1 then + return nil + end + + local d = math.sqrt(x * x + y * y) + local name + if d < 600 then + name = 'car' + else + if math.random(5) == 1 then + name = 'tank' + else + name = 'car' + end + end + + -- neutral stops the biters attacking them. + local entity = {name = name, force = 'neutral', callback = callback, data = loot_power / d} + + return entity +end + +local worm_names = {'small-worm-turret', 'medium-worm-turret', 'big-worm-turret'} +local spawner_names = {'biter-spawner', 'spitter-spawner'} +local factor = 8 / (1024 * 32) +local max_chance = 1 / 8 + +local scale_factor = 32 +local sf = 1 / scale_factor +local m = 1.125 / 1000 +local function enemy(x, y, world) + local d = math.sqrt(world.x * world.x + world.y * world.y) + + if d < 300 then + return nil + end + + local threshold = 1 - d * m + threshold = math.max(threshold, -0.125) + + x, y = x * sf, y * sf + if Perlin.noise(x, y, perlin_seed) > threshold then + if math.random(8) == 1 then + local lvl + if d < 400 then + lvl = 1 + elseif d < 650 then + lvl = 2 + else + lvl = 3 + end + + local chance = math.min(max_chance, d * factor) + + if math.random() < chance then + local worm_id + if d > 1000 then + local power = 1000 / d + worm_id = math.ceil((math.random() ^ power) * lvl) + else + worm_id = math.random(lvl) + end + + return {name = worm_names[worm_id]} + end + else + local chance = math.min(max_chance, d * factor) + if math.random() < chance then + local spawner_id = math.random(2) + return {name = spawner_names[spawner_id]} + end + end + end +end + +map = b.apply_entity(map, ore_shape) +map = b.apply_entity(map, loot) +map = b.apply_entity(map, enemy) + +map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1') + +return map diff --git a/map_gen/shared/builders.lua b/map_gen/shared/builders.lua index fc5a1223..3423b236 100644 --- a/map_gen/shared/builders.lua +++ b/map_gen/shared/builders.lua @@ -483,6 +483,38 @@ function Builders.project(shape, size, r) end end +function Builders.project_pattern(pattern, size, r, columns, rows) + local ln_r = math.log(r) + local r2 = 1 / (r - 1) + local a = 1 / size + local half_size = size / 2 + + return function(x, y, world) + local offset = 0.5 * size + local sn = math.ceil(y + offset) + + local n = math.ceil(math.log((r - 1) * sn * a + 1) / ln_r - 1) + local rn = r ^ n + local rn2 = 1 / rn + local c = size * rn + + local sn_upper = size * (r ^ (n + 1) - 1) * r2 + x = x * rn2 + y = (y - (sn_upper - 0.5 * c) + offset) * rn2 + + local row_i = n % rows + 1 + local row = pattern[row_i] + + local x2 = ((x + half_size) % size) - half_size + local col_pos = math.floor(x / size + 0.5) + local col_i = col_pos % columns + 1 + + local shape = row[col_i] + + return shape(x2, y, world) + end +end + function Builders.project_overlap(shape, size, r) local ln_r = math.log(r) local r2 = 1 / (r - 1) diff --git a/map_gen/shared/generate.lua b/map_gen/shared/generate.lua index 8a0ff7e2..3d94300b 100644 --- a/map_gen/shared/generate.lua +++ b/map_gen/shared/generate.lua @@ -86,7 +86,7 @@ local function do_place_entities(data) local entity = surface.create_entity(e) if entity and e.callback then local callback = Token.get(e.callback) - callback(entity) + callback(entity, e.data) end end end diff --git a/map_gen/shared/generate_not_threaded.lua b/map_gen/shared/generate_not_threaded.lua index 8948e356..63d2a583 100644 --- a/map_gen/shared/generate_not_threaded.lua +++ b/map_gen/shared/generate_not_threaded.lua @@ -90,7 +90,7 @@ local function do_place_entities(data) local entity = surface.create_entity(e) if entity and e.callback then local callback = Token.get(e.callback) - callback(entity) + callback(entity, e.data) end end end diff --git a/map_layout.lua b/map_layout.lua index e24ed223..fe87ea4a 100644 --- a/map_layout.lua +++ b/map_layout.lua @@ -65,6 +65,7 @@ local tiles_per_tick = 32 --shape = require "map_gen.presets.square_spiral" --shape = require "map_gen.presets.beach" --shape = require "map_gen.presets.factory" +shape = require "map_gen.presets.bermuda_triangle" --shape = require "map_gen.presets.test" --shapes-- @@ -133,6 +134,6 @@ if shape then ['nauvis'] = shape, } - require('map_gen.shared.generate')({surfaces = surfaces, regen_decoratives = regen_decoratives, tiles_per_tick = tiles_per_tick}) - --require ("map_gen.shared.generate_not_threaded")({surfaces = surfaces, regen_decoratives = regen_decoratives}) + --require('map_gen.shared.generate')({surfaces = surfaces, regen_decoratives = regen_decoratives, tiles_per_tick = tiles_per_tick}) + require ("map_gen.shared.generate_not_threaded")({surfaces = surfaces, regen_decoratives = regen_decoratives}) end diff --git a/resources/market_items.lua b/resources/market_items.lua index 445c153c..c504e957 100644 --- a/resources/market_items.lua +++ b/resources/market_items.lua @@ -19,17 +19,17 @@ return { {price = {{'raw-fish', 75}}, offer = {type = 'give-item', item = 'tank-flamethrower'}}, {price = {{'raw-fish', 2500}}, offer = {type = 'give-item', item = 'artillery-wagon-cannon'}}, {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'firearm-magazine'}}, - {price = {{'raw-fish', 3}}, offer = {type = 'give-item', item = 'piercing-rounds-magazine'}}, - {price = {{'raw-fish', 15}}, offer = {type = 'give-item', item = 'uranium-rounds-magazine'}}, + {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'piercing-rounds-magazine'}}, + {price = {{'raw-fish', 20}}, offer = {type = 'give-item', item = 'uranium-rounds-magazine'}}, {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'shotgun-shell'}}, - {price = {{'raw-fish', 8}}, offer = {type = 'give-item', item = 'piercing-shotgun-shell'}}, + {price = {{'raw-fish', 10}}, offer = {type = 'give-item', item = 'piercing-shotgun-shell'}}, {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'railgun-dart'}}, {price = {{'raw-fish', 25}}, offer = {type = 'give-item', item = 'flamethrower-ammo'}}, {price = {{'raw-fish', 15}}, offer = {type = 'give-item', item = 'rocket'}}, {price = {{'raw-fish', 25}}, offer = {type = 'give-item', item = 'explosive-rocket'}}, {price = {{'raw-fish', 2500}}, offer = {type = 'give-item', item = 'atomic-bomb'}}, - {price = {{'raw-fish', 15}}, offer = {type = 'give-item', item = 'cannon-shell'}}, - {price = {{'raw-fish', 25}}, offer = {type = 'give-item', item = 'explosive-cannon-shell'}}, + {price = {{'raw-fish', 20}}, offer = {type = 'give-item', item = 'cannon-shell'}}, + {price = {{'raw-fish', 30}}, offer = {type = 'give-item', item = 'explosive-cannon-shell'}}, {price = {{'raw-fish', 75}}, offer = {type = 'give-item', item = 'explosive-uranium-cannon-shell'}}, {price = {{'raw-fish', 100}}, offer = {type = 'give-item', item = 'artillery-shell'}}, {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'land-mine'}}, @@ -38,14 +38,14 @@ return { {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'defender-capsule'}}, --{price = {{'raw-fish', 15}}, offer = {type = 'give-item', item = 'distractor-capsule'}}, Removed so we dont have 51 items and they are useless anyways {price = {{'raw-fish', 75}}, offer = {type = 'give-item', item = 'destroyer-capsule'}}, - {price = {{'raw-fish', 25}}, offer = {type = 'give-item', item = 'poison-capsule'}}, - {price = {{'raw-fish', 25}}, offer = {type = 'give-item', item = 'slowdown-capsule'}}, + {price = {{'raw-fish', 35}}, offer = {type = 'give-item', item = 'poison-capsule'}}, + {price = {{'raw-fish', 35}}, offer = {type = 'give-item', item = 'slowdown-capsule'}}, {price = {{'raw-fish', 50}}, offer = {type = 'give-item', item = 'artillery-targeting-remote'}}, {price = {{'raw-fish', 1000}}, offer = {type = 'give-item', item = 'artillery-turret'}}, - {price = {{'raw-fish', 250}}, offer = {type = 'give-item', item = 'modular-armor'}}, - {price = {{'raw-fish', 750}}, offer = {type = 'give-item', item = 'power-armor'}}, - {price = {{'raw-fish', 30}}, offer = {type = 'give-item', item = 'solar-panel-equipment'}}, - {price = {{'raw-fish', 750}}, offer = {type = 'give-item', item = 'fusion-reactor-equipment'}}, + {price = {{'raw-fish', 350}}, offer = {type = 'give-item', item = 'modular-armor'}}, + {price = {{'raw-fish', 875}}, offer = {type = 'give-item', item = 'power-armor'}}, + {price = {{'raw-fish', 40}}, offer = {type = 'give-item', item = 'solar-panel-equipment'}}, + {price = {{'raw-fish', 875}}, offer = {type = 'give-item', item = 'fusion-reactor-equipment'}}, {price = {{'raw-fish', 100}}, offer = {type = 'give-item', item = 'battery-equipment'}}, {price = {{'raw-fish', 625}}, offer = {type = 'give-item', item = 'battery-mk2-equipment'}}, {price = {{'raw-fish', 250}}, offer = {type = 'give-item', item = 'belt-immunity-equipment'}}, @@ -53,7 +53,14 @@ return { {price = {{'raw-fish', 150}}, offer = {type = 'give-item', item = 'exoskeleton-equipment'}}, {price = {{'raw-fish', 250}}, offer = {type = 'give-item', item = 'personal-roboport-equipment'}}, {price = {{'raw-fish', 25}}, offer = {type = 'give-item', item = 'construction-robot'}}, - {price = {{'raw-fish', 250}}, offer = {type = 'give-item', item = 'energy-shield-equipment'}}, - {price = {{'raw-fish', 250}}, offer = {type = 'give-item', item = 'personal-laser-defense-equipment'}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'refined-hazard-concrete'}} + {price = {{'raw-fish', 350}}, offer = {type = 'give-item', item = 'energy-shield-equipment'}}, + {price = {{'raw-fish', 350}}, offer = {type = 'give-item', item = 'personal-laser-defense-equipment'}}, + {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'refined-hazard-concrete'}}, + + {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'science-pack-1'}}, + {price = {{'raw-fish', 10}}, offer = {type = 'give-item', item = 'science-pack-2'}}, + {price = {{'raw-fish', 15}}, offer = {type = 'give-item', item = 'science-pack-3'}}, + {price = {{'raw-fish', 15}}, offer = {type = 'give-item', item = 'military-science-pack'}}, + {price = {{'raw-fish', 20}}, offer = {type = 'give-item', item = 'production-science-pack'}}, + {price = {{'raw-fish', 25}}, offer = {type = 'give-item', item = 'high-tech-science-pack'}}, } From ca06079b4d1951e6a224721ea8d52b1f54aa5871 Mon Sep 17 00:00:00 2001 From: grilledham Date: Sat, 16 Jun 2018 17:38:10 +0100 Subject: [PATCH 10/10] tidy up --- config.lua | 2 +- ...uda_triangle.lua => triangle_of_death.lua} | 0 map_layout.lua | 6 +- resources/market_items.lua | 4 +- resources/regulars.lua | 646 +++++++++--------- 5 files changed, 331 insertions(+), 327 deletions(-) rename map_gen/presets/{bermuda_triangle.lua => triangle_of_death.lua} (100%) diff --git a/config.lua b/config.lua index a4429ba9..52935178 100644 --- a/config.lua +++ b/config.lua @@ -1,4 +1,4 @@ -_DEBUG = true +_DEBUG = false global.scenario = {} global.spys = {"valansch", "air20"} diff --git a/map_gen/presets/bermuda_triangle.lua b/map_gen/presets/triangle_of_death.lua similarity index 100% rename from map_gen/presets/bermuda_triangle.lua rename to map_gen/presets/triangle_of_death.lua diff --git a/map_layout.lua b/map_layout.lua index fe87ea4a..84085e46 100644 --- a/map_layout.lua +++ b/map_layout.lua @@ -65,7 +65,7 @@ local tiles_per_tick = 32 --shape = require "map_gen.presets.square_spiral" --shape = require "map_gen.presets.beach" --shape = require "map_gen.presets.factory" -shape = require "map_gen.presets.bermuda_triangle" +--shape = require "map_gen.presets.triangle_of_death" --shape = require "map_gen.presets.test" --shapes-- @@ -134,6 +134,6 @@ if shape then ['nauvis'] = shape, } - --require('map_gen.shared.generate')({surfaces = surfaces, regen_decoratives = regen_decoratives, tiles_per_tick = tiles_per_tick}) - require ("map_gen.shared.generate_not_threaded")({surfaces = surfaces, regen_decoratives = regen_decoratives}) + require('map_gen.shared.generate')({surfaces = surfaces, regen_decoratives = regen_decoratives, tiles_per_tick = tiles_per_tick}) + --require ("map_gen.shared.generate_not_threaded")({surfaces = surfaces, regen_decoratives = regen_decoratives}) end diff --git a/resources/market_items.lua b/resources/market_items.lua index c504e957..269842c1 100644 --- a/resources/market_items.lua +++ b/resources/market_items.lua @@ -57,10 +57,10 @@ return { {price = {{'raw-fish', 350}}, offer = {type = 'give-item', item = 'personal-laser-defense-equipment'}}, {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'refined-hazard-concrete'}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'science-pack-1'}}, + --[[ {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'science-pack-1'}}, {price = {{'raw-fish', 10}}, offer = {type = 'give-item', item = 'science-pack-2'}}, {price = {{'raw-fish', 15}}, offer = {type = 'give-item', item = 'science-pack-3'}}, {price = {{'raw-fish', 15}}, offer = {type = 'give-item', item = 'military-science-pack'}}, {price = {{'raw-fish', 20}}, offer = {type = 'give-item', item = 'production-science-pack'}}, - {price = {{'raw-fish', 25}}, offer = {type = 'give-item', item = 'high-tech-science-pack'}}, + {price = {{'raw-fish', 25}}, offer = {type = 'give-item', item = 'high-tech-science-pack'}}, ]] } diff --git a/resources/regulars.lua b/resources/regulars.lua index 42453941..077a7eee 100644 --- a/resources/regulars.lua +++ b/resources/regulars.lua @@ -1,322 +1,326 @@ return { - ['helpower2'] = true, - ['rorror'] = true, - ['medival3'] = true, - ['dpoba'] = true, - ['cheeselicker'] = true, - ['cpaca0'] = true, - ['utidi'] = true, - ['jokerofthez'] = true, - ['saltlands'] = true, - ['cool'] = true, - ['boail'] = true, - ['hunter117x'] = true, - ['tonytroll'] = true, - ['adlmr'] = true, - ['rayijin'] = true, - ['sephir'] = true, - ['inator1192'] = true, - ['tezwo'] = true, - ['neumond'] = true, - ['bhenoa'] = true, - ['jbc363'] = true, - ['kaig3n'] = true, - ['factorioio'] = true, - ['bawz'] = true, - ['crazystephen'] = true, - ['eithel'] = true, - ['coyote101'] = true, - ['jedifan'] = true, - ['xsidd'] = true, - ['maxthespunkymunk'] = true, - ['tarpon907'] = true, - ['bighamster'] = true, - ['sir'] = true, - ['arnietom'] = true, - ['animal'] = true, - ['banakeg'] = true, - ['philip017'] = true, - ['ninjrkillr'] = true, - ['marckhardt'] = true, - ['brainclot'] = true, - ['blzz'] = true, - ['watchinghawk'] = true, - ['farcear'] = true, - ['selen'] = true, - ['trekie4747'] = true, - ['gizan'] = true, - ['slastraf'] = true, - ['zacman0510'] = true, - ['williambellwisdo'] = true, - ['extraxyz'] = true, - ['markupolioncz'] = true, - ['bjhunter'] = true, - ['ztx'] = true, - ['bigglesthepirate'] = true, - ['g-h-o-s-t'] = true, - ['wekkka'] = true, - ['beelzemon'] = true, - ['rododendro'] = true, - ['mrkoss'] = true, - ['koretego'] = true, - ['cogito123'] = true, - ['palulukan'] = true, - ['radianraze'] = true, - ['kostrahb'] = true, - ['mafisch3'] = true, - ['cydes'] = true, - ['ccaspanello'] = true, - ['wickvitaminc'] = true, - ['craigrood'] = true, - ['lillepallt'] = true, - ['skykittena'] = true, - ['rico2403'] = true, - ['claude47'] = true, - ['mrsjaakbraak'] = true, - ['heretek'] = true, - ['steponitnicejob'] = true, - ['cchpucky'] = true, - ['rulerofdabacon'] = true, - ['tcp'] = true, - ['marucan'] = true, - ['twltriston'] = true, - ['lordxleasy'] = true, - ['judaires'] = true, - ['flowild'] = true, - ['aalexx'] = true, - ['zila'] = true, - ['pyroguy'] = true, - ['tickterd'] = true, - ['trevoqr'] = true, - ['pietloke'] = true, - ['bloodydevil'] = true, - ['mike-_-'] = true, - ['asddsa76'] = true, - ['tomymy'] = true, - ['geckozila'] = true, - ['starlite'] = true, - ['ducktaperules'] = true, - ['tvardero'] = true, - ['lejnel'] = true, - ['griffinonetwo'] = true, - ['stat0x00'] = true, - ['gynox'] = true, - ['miniman10000'] = true, - ['gespenstdermaschine'] = true, - ['brathahn'] = true, - ['leadhades27'] = true, - ['sl'] = true, - ['phountix'] = true, - ['yago2003'] = true, - ['saneman'] = true, - ['mesohorknee'] = true, - ['brl_chacal'] = true, - ['spechok'] = true, - ['everlord'] = true, - ['chessindustries'] = true, - ['petebra11'] = true, - ['collin08'] = true, - ['cybernoise'] = true, - ['sholvo'] = true, - ['jinnjuice'] = true, - ['corlin'] = true, - ['xeoxius'] = true, - ['dq_shell'] = true, - ['terz42'] = true, - ['fullfruntall'] = true, - ['heaser'] = true, - ['terradus'] = true, - ['wesoly1234'] = true, - ['sholax'] = true, - ['thadius856'] = true, - ['oliveawesomesauz'] = true, - ['rafaelvalim'] = true, - ['terarink'] = true, - ['ruslan_kc'] = true, - ['bobbje'] = true, - ['snerktk'] = true, - ['aplavins'] = true, - ['rikkert'] = true, - ['fire3231'] = true, - ['roghurricane'] = true, - ['ballbuster'] = true, - ['shimmshamm'] = true, - ['procrastinator_diedz'] = true, - ['legionmammal978'] = true, - ['merssedes'] = true, - ['passepartout911'] = true, - ['arizon'] = true, - ['settdigger'] = true, - ['m_m0'] = true, - ['spatbee'] = true, - ['forge36'] = true, - ['fynko'] = true, - ['i-make-robots'] = true, - ['chunhung'] = true, - ['apolomir'] = true, - ['grandstore256'] = true, - ['shaun_das_schaf'] = true, - ['crisbk'] = true, - ['kev007'] = true, - ['sonopard'] = true, - ['li7ro'] = true, - ['rascher'] = true, - ['toledini'] = true, - ['moo_cowman'] = true, - ['lord_kill'] = true, - ['mithril_ryder'] = true, - ['grahamm'] = true, - ['luk4kasz'] = true, - ['joe32'] = true, - ['assemblystorm'] = true, - ['adobewallhacks'] = true, - ['bufferoverflow'] = true, - ['mcschnee'] = true, - ['pirion'] = true, - ['xanting'] = true, - ['exp11235'] = true, - ['sharpshot2566'] = true, - ['coogan'] = true, - ['hazelnuthead'] = true, - ['pilypas'] = true, - ['zoigo'] = true, - ['ground_walker'] = true, - ['alvinmj'] = true, - ['spacecat-chan'] = true, - ['iexyi'] = true, - ['argetlam_elda'] = true, - ['swampd0nkey'] = true, - ['furancebob'] = true, - ['fish'] = true, - ['sovietdefender'] = true, - ['xaddr'] = true, - ['fana13'] = true, - ['vonlam999'] = true, - ['warnotte'] = true, - ['beriev'] = true, - ['zijkhal'] = true, - ['samy_the_samy'] = true, - ['bazul'] = true, - ['rickeyhb'] = true, - ['tigrium'] = true, - ['ansible32'] = true, - ['binzerle'] = true, - ['davoud'] = true, - ['eaglesight'] = true, - ['fremiamagus'] = true, - ['struppi'] = true, - ['xatev'] = true, - ['xalpha1989'] = true, - ['jono777'] = true, - ['toof_kitty'] = true, - ['empirebuilder1'] = true, - ['delta124'] = true, - ['lupigaming'] = true, - ['sergeant_steve'] = true, - ['wd_steve2'] = true, - ['teondar'] = true, - ['harmlessbeltbot'] = true, - ['noodletrains'] = true, - ['lunastarwarp'] = true, - ['brikir'] = true, - ['bobucles'] = true, - ['vincentmonster'] = true, - ['kingdud'] = true, - ['theelvengamer'] = true, - ['fuzz_pucker'] = true, - ['dichromium'] = true, - ['tuttifrectte'] = true, - ['xdihe'] = true, - ['circit'] = true, - ['bissi'] = true, - ['paul1998'] = true, - ['timmypwn'] = true, - ['stig219'] = true, - ['leviculus'] = true, - ['tommy17'] = true, - ['virusgamesplay'] = true, - ['ajdiller88'] = true, - ['rlidwka'] = true, - ['kidflash'] = true, - ['the_squid'] = true, - ['dimava'] = true, - ['damian0816'] = true, - ['chukles'] = true, - ['frissi'] = true, - ['df1229'] = true, - ['actitishypoleucos'] = true, - ['morgan3rd'] = true, - ['kyte'] = true, - ['olexn'] = true, - ['acolyteofcthulu'] = true, - ['krul'] = true, - ['b4x'] = true, - ['firebunnie'] = true, - ['derdu'] = true, - ['nibu'] = true, - ['artman40'] = true, - ['junhinhow'] = true, - ['ireasonless1'] = true, - ['grufe'] = true, - ['patton1918'] = true, - ['redlabel'] = true, - ['crusher_sut'] = true, - ['leon55'] = true, - ['thelaughingcheese'] = true, - ['maximuskylus'] = true, - ['nbituk'] = true, - ['mh'] = true, - ['vintageaura'] = true, - ['wurzeltroll42'] = true, - ['esperiom'] = true, - ['standaardstefan'] = true, - ['mauerstein10'] = true, - ['vengefulpm'] = true, - ['skilledspacepolice'] = true, - ['the_ledgendary'] = true, - ['capitansky'] = true, - ['barnaba'] = true, - ['twinotter'] = true, - ['zaen'] = true, - ['jbev2'] = true, - ['wadiyatalkinabeet'] = true, - ['builder101'] = true, - ['brftjx'] = true, - ['baronting'] = true, - ['Haribo112'] = true, - ['ZjosH'] = true, - ['NbITUK'] = true, - ['heardofsnails'] = true, - ['JinNJuice'] = true, - ['VERBUGA'] = true, - ['dmaonk'] = true, - ['Drlloyd1337'] = true, - ['rhobes'] = true, - ['cpenguinred'] = true, - ['SimonFlapse'] = true, - ['Newcott'] = true, - ['NekoBaron'] = true, - ['adidas'] = true, - ['Ralp'] = true, - ['Nexarius'] = true, - ['HighInFiberOptics'] = true, - ['hackguy'] = true, - ['Altech'] = true, - ['Atoms'] = true, - ['_Joe_'] = true, - ['Aliiien0110'] = true, - ['Angus100'] = true, - ['Bemm'] = true, - ['Factorian12321'] = true, - ['franc_ist'] = true, - ['Mariocraft2001'] = true, - ['PogomanD'] = true, - ['Copperbotte'] = true, - ['CmdrRat'] = true, - ['Sangria_louie'] = true, - ['TheOrangeAngle'] = true, - ['Maniah'] = true, - ['Gotze'] = true, - ['Zehir'] = true, - ['TheThane'] = true -} + Aliiien0110 = true, + Altech = true, + Angus100 = true, + Animal = true, + Atoms = true, + Bazul = true, + Bemm = true, + Chunhung = true, + CmdrRat = true, + Copperbotte = true, + Drlloyd1337 = true, + Factorian12321 = true, + Fire3231 = true, + Gizan = true, + Gotze = true, + Haribo112 = true, + HighInFiberOptics = true, + JinNJuice = true, + Kyte = true, + Maniah = true, + Mariocraft2001 = true, + Namelesshunter = true, + NbITUK = true, + NekoBaron = true, + Newcott = true, + Nexarius = true, + PogomanD = true, + Ralp = true, + Redcrafter100 = true, + Ruslan_kc = true, + Sangria_louie = true, + Sholvo = true, + SimonFlapse = true, + TheElvenGamer = true, + TheOrangeAngle = true, + TheThane = true, + Tommy17 = true, + VERBUGA = true, + Zehir = true, + ZjosH = true, + _Joe_ = true, + aalexx = true, + acolyteofcthulu = true, + actitishypoleucos = true, + adidas = true, + adlmr = true, + adobewallhacks = true, + ajdiller88 = true, + alvinmj = true, + ansible32 = true, + aplavins = true, + apolomir = true, + argetlam_elda = true, + arizon = true, + arnietom = true, + artman40 = true, + asddsa76 = true, + assemblystorm = true, + b4x = true, + ballbuster = true, + banakeg = true, + barnaba = true, + baronting = true, + bawz = true, + beelzemon = true, + beriev = true, + bhenoa = true, + bigglesthepirate = true, + bighamster = true, + binzerle = true, + bissi = true, + bjhunter = true, + bloodydevil = true, + blzz = true, + boail = true, + bobbje = true, + bobucles = true, + brainclot = true, + brathahn = true, + brftjx = true, + brikir = true, + brl_chacal = true, + bufferoverflow = true, + builder101 = true, + capitansky = true, + ccaspanello = true, + cchpucky = true, + cheeselicker = true, + chessindustries = true, + chukles = true, + circit = true, + claude47 = true, + cogito123 = true, + collin08 = true, + coogan = true, + cool = true, + corlin = true, + coyote101 = true, + cpaca0 = true, + cpenguinred = true, + craigrood = true, + crazystephen = true, + crisbk = true, + crusher_sut = true, + cybernoise = true, + cydes = true, + damian0816 = true, + davoud = true, + delta124 = true, + derdu = true, + df1229 = true, + dichromium = true, + dimava = true, + dmaonk = true, + dpoba = true, + dq_shell = true, + ducktaperules = true, + eaglesight = true, + eithel = true, + empirebuilder1 = true, + esperiom = true, + everlord = true, + exp11235 = true, + extraxyz = true, + factorioio = true, + fana13 = true, + farcear = true, + firebunnie = true, + fish = true, + flowild = true, + forge36 = true, + franc_ist = true, + fremiamagus = true, + frissi = true, + fullfruntall = true, + furancebob = true, + fuzz_pucker = true, + fynko = true, + ["g-h-o-s-t"] = true, + geckozila = true, + gespenstdermaschine = true, + grahamm = true, + grandstore256 = true, + griffinonetwo = true, + ground_walker = true, + grufe = true, + gynox = true, + hackguy = true, + harmlessbeltbot = true, + hazelnuthead = true, + heardofsnails = true, + heaser = true, + helpower2 = true, + heretek = true, + hunter117x = true, + ["i-make-robots"] = true, + iexyi = true, + inator1192 = true, + ireasonless1 = true, + jbc363 = true, + jbev2 = true, + jedifan = true, + jinnjuice = true, + joe32 = true, + jokerofthez = true, + jono777 = true, + judaires = true, + junhinhow = true, + kaig3n = true, + kev007 = true, + kevinma = true, + kidflash = true, + kingdud = true, + koretego = true, + kostrahb = true, + krul = true, + leadhades27 = true, + legionmammal978 = true, + lejnel = true, + leon55 = true, + leviculus = true, + li7ro = true, + lillepallt = true, + lord_kill = true, + lordxleasy = true, + luk4kasz = true, + lunastarwarp = true, + lupigaming = true, + m_m0 = true, + mafisch3 = true, + marckhardt = true, + markupolioncz = true, + marucan = true, + mauerstein10 = true, + maximuskylus = true, + maxthespunkymunk = true, + mcschnee = true, + medival3 = true, + merssedes = true, + mesohorknee = true, + mh = true, + ["mike-_-"] = true, + miniman10000 = true, + mithril_ryder = true, + moo_cowman = true, + morgan3rd = true, + mrkoss = true, + mrsjaakbraak = true, + nbituk = true, + neumond = true, + nibu = true, + ninjrkillr = true, + noodletrains = true, + olexn = true, + oliveawesomesauz = true, + palulukan = true, + passepartout911 = true, + patton1918 = true, + paul1998 = true, + petebra11 = true, + pfg = true, + philip017 = true, + phountix = true, + pietloke = true, + pilypas = true, + pirion = true, + procrastinator_diedz = true, + pyroguy = true, + radianraze = true, + rafaelvalim = true, + rascher = true, + rayijin = true, + redlabel = true, + rhobes = true, + rickeyhb = true, + rico2403 = true, + rikkert = true, + rlidwka = true, + rododendro = true, + roghurricane = true, + rorror = true, + rulerofdabacon = true, + saltlands = true, + samy_the_samy = true, + saneman = true, + selen = true, + sephir = true, + sergeant_steve = true, + settdigger = true, + sharpshot2566 = true, + shaun_das_schaf = true, + shimmshamm = true, + sholax = true, + sir = true, + skilledspacepolice = true, + skykittena = true, + sl = true, + slastraf = true, + snerktk = true, + sonopard = true, + sovietdefender = true, + ["spacecat-chan"] = true, + spatbee = true, + spechok = true, + standaardstefan = true, + starlite = true, + stat0x00 = true, + steponitnicejob = true, + stig219 = true, + struppi = true, + swampd0nkey = true, + tarpon907 = true, + tcp = true, + teondar = true, + terarink = true, + terradus = true, + terz42 = true, + tezwo = true, + thadius856 = true, + the_ledgendary = true, + the_squid = true, + thelaughingcheese = true, + tickterd = true, + tigrium = true, + timmypwn = true, + toledini = true, + tomymy = true, + tonytroll = true, + toof_kitty = true, + trekie4747 = true, + trevoqr = true, + tuttifrectte = true, + tvardero = true, + twinotter = true, + twltriston = true, + utidi = true, + vengefulpm = true, + vincentmonster = true, + vintageaura = true, + virusgamesplay = true, + vonlam999 = true, + wadiyatalkinabeet = true, + warnotte = true, + watchinghawk = true, + wd_steve2 = true, + wekkka = true, + wesoly1234 = true, + wickvitaminc = true, + williambellwisdo = true, + wurzeltroll42 = true, + xaddr = true, + xalpha1989 = true, + xanting = true, + xatev = true, + xdihe = true, + xeoxius = true, + xsidd = true, + yago2003 = true, + zacman0510 = true, + zaen = true, + zijkhal = true, + zila = true, + zoigo = true, + ztx = true + } \ No newline at end of file