1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-14 10:13:13 +02:00

Added random turkey message every 10min

This commit is contained in:
Zahir Khan 2019-11-27 20:26:37 -05:00 committed by GitHub
parent 0041dc9340
commit 97be613e3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,8 @@ local b = require "map_gen.shared.builders"
local pic = require "map_gen.data.presets.turkey" local pic = require "map_gen.data.presets.turkey"
local RS = require 'map_gen.shared.redmew_surface' local RS = require 'map_gen.shared.redmew_surface'
local MGSP = require 'resources.map_gen_settings' local MGSP = require 'resources.map_gen_settings'
local Event = require 'utils.event'
local turkey_message_random = require 'resources.turkey_messages'
RS.set_map_gen_settings( RS.set_map_gen_settings(
{ {
@ -9,6 +11,16 @@ RS.set_map_gen_settings(
} }
) )
Event.add(
defines.events.on_tick,
function(event)
if event.tick % 60*600 == 0 then
local message = turkey_message_random[math.random(#turkey_message_random)]
game.print(message)
end
end
)
pic = b.decompress(pic) pic = b.decompress(pic)
local shape = b.picture(pic) local shape = b.picture(pic)