1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-30 04:30:58 +02:00

creation of adam 2

This commit is contained in:
grilledham 2018-05-26 00:31:29 +01:00
parent bbca8c3102
commit 81000b0257
4 changed files with 3282 additions and 8 deletions

View File

@ -23,6 +23,7 @@ require 'band'
require 'tasklist' require 'tasklist'
require 'blueprint_helper' require 'blueprint_helper'
require 'score' require 'score'
require 'popup'
local Event = require 'utils.event' local Event = require 'utils.event'
@ -55,7 +56,42 @@ for _, w in pairs(hodor_messages) do
message_weight_sum = message_weight_sum + w[2] message_weight_sum = message_weight_sum + w[2]
end end
function hodor(event) global.naughty_words_enabled = true
global.naughty_words = {
['ass'] = true,
['bugger'] = true,
['crikey'] = true,
['darn'] = true,
['dam'] = true,
['damn'] = true,
['dang'] = true,
['dagnabit'] = true,
['dagnabbit'] = true,
['drat'] = true,
['feck'] = true,
['frack'] = true,
['frick'] = true,
['gee'] = true,
['geez'] = true,
['git'] = true,
['god'] = true,
['golly'] = true,
['gosh'] = true,
['heavens'] = true,
['heck'] = true,
['hell'] = true,
['holy'] = true,
['jerk'] = true,
['jesus'] = true,
['petes'] = true,
["pete's"] = true,
['poo'] = true,
['willy'] = true,
['wee'] = true,
['yikes'] = true
}
local function hodor(event)
local message = event.message:lower() local message = event.message:lower()
if message:match('hodor') then if message:match('hodor') then
local index = math.random(1, message_weight_sum) local index = math.random(1, message_weight_sum)
@ -64,14 +100,28 @@ function hodor(event)
message_weight_sum = message_weight_sum + m[2] message_weight_sum = message_weight_sum + m[2]
if message_weight_sum >= index then if message_weight_sum >= index then
game.print('Hodor: ' .. m[1]) game.print('Hodor: ' .. m[1])
break
end
end
end
local player = game.players[event.player_index]
if not player or not player.valid then
return return
end end
end
end
if message:match('discord') then if message:match('discord') then
if game.player then player.print('Did you ask about our discord server?')
game.player.print('Did you ask about our discord server?') player.print('You can find it here: redmew/discord')
game.player.print('You can find it here: redmew/discord') end
if global.naughty_words_enabled then
local naughty_words = global.naughty_words
for word in message:gmatch('%S+') do
if naughty_words[word] then
game.print(player.name .. ' this is a Christian Factorio server, no swearing please!')
break
end
end end
end end
end end

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,10 @@
local b = require "map_gen.shared.builders"
local pic = require "map_gen.data.presets.creation_of_adam2"
pic = b.decompress(pic)
local shape = b.picture(pic)
--map = b.change_map_gen_collision_tile(map, "water-tile", "grass-1")
return shape

View File

@ -8,7 +8,7 @@ in this file and your run_*type*_module(event) function will be called.
local b = require 'map_gen.shared.builders' local b = require 'map_gen.shared.builders'
local shape = nil local shape = nil
local regen_decoratives = false local regen_decoratives = true
local tiles_per_tick = 32 local tiles_per_tick = 32
--combined-- --combined--
@ -29,6 +29,7 @@ local tiles_per_tick = 32
--shape = require "map_gen.presets.mobius_strip" --shape = require "map_gen.presets.mobius_strip"
--shape = require "map_gen.presets.antfarm" --shape = require "map_gen.presets.antfarm"
--shape = require "map_gen.presets.creation_of_adam" --shape = require "map_gen.presets.creation_of_adam"
shape = require "map_gen.presets.creation_of_adam2"
--shape = require "map_gen.presets.manhattan" --shape = require "map_gen.presets.manhattan"
--shape = require "map_gen.presets.mona_lisa" --shape = require "map_gen.presets.mona_lisa"
--shape = require "map_gen.presets.connected_dots" --shape = require "map_gen.presets.connected_dots"
@ -122,6 +123,6 @@ if #terrain_modules > 0 then
end end
if shape then if shape then
require('map_gen.shared.generate')({shape = shape, regen_decoratives = regen_decoratives, tiles_per_tick = tiles_per_tick}) --require('map_gen.shared.generate')({shape = shape, regen_decoratives = regen_decoratives, tiles_per_tick = tiles_per_tick})
--require ("map_gen.shared.generate_not_threaded")({shape = shape, regen_decoratives = regen_decoratives}) require ("map_gen.shared.generate_not_threaded")({shape = shape, regen_decoratives = regen_decoratives})
end end