mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-12 10:04:40 +02:00
Updates/april fools 2024 (#1408)
* Update april_fools_2024 * Fix oil deadlock * Fix luacheck
This commit is contained in:
parent
3baad63727
commit
7a083cabd9
@ -9,7 +9,17 @@
|
||||
|
||||
local ScenarioInfo = require 'features.gui.info'
|
||||
ScenarioInfo.set_map_name('Double Trouble')
|
||||
ScenarioInfo.set_map_description('You are Pinguins in Antarctica and Miners underground!')
|
||||
ScenarioInfo.set_map_description([[
|
||||
[font=default-bold]Welcome to [color=blue]Double[/color] [color=red]Trouble[/color]![/font]
|
||||
|
||||
You have crash landed on a winter and adverse planet. There's nothing visible, just... Threats. You take refuge underground to build a new empire, but something goes wrong again...
|
||||
In fact... Nothing seems to be going right.
|
||||
|
||||
Have fun in this new adventure. Build the infrastructure underground to return to the surface and escape this planet. Use support pylons to protect the market and avoid collapses underground. Build tunnels to move resources to the surface faster, resist adversities, and achieve victory!
|
||||
|
||||
Good luck, have fun.
|
||||
The [color=red]RedMew[/color] team
|
||||
]])
|
||||
ScenarioInfo.set_map_extra_info('Watch out for Icebergs!')
|
||||
|
||||
--- Config
|
||||
@ -77,6 +87,7 @@ local function on_init()
|
||||
for _, resource in pairs({'iron-ore', 'copper-ore', 'stone', 'coal', 'uranium-ore', 'crude-oil'}) do
|
||||
islands_mgs.autoplace_controls[resource] = { frequency = 1, richness = 1, size = 0 }
|
||||
end
|
||||
islands_mgs.autoplace_controls['crude-oil'] = { frequency = 1, richness = 2, size = 1.2 }
|
||||
local islands = game.create_surface('islands', islands_mgs)
|
||||
islands.request_to_generate_chunks(spawn, 5)
|
||||
islands.force_generate_chunk_requests()
|
||||
@ -109,7 +120,6 @@ local function on_init()
|
||||
|
||||
game.forces.player.set_spawn_position(spawn, 'islands')
|
||||
game.forces.player.manual_mining_speed_modifier = _DEBUG and 20 or 1.2
|
||||
game.difficulty_settings.technology_price_multiplier = game.difficulty_settings.technology_price_multiplier * 2
|
||||
end
|
||||
|
||||
local function on_player_created(event)
|
||||
@ -118,7 +128,9 @@ local function on_player_created(event)
|
||||
return
|
||||
end
|
||||
|
||||
player.teleport({0,0}, 'islands')
|
||||
local islands = game.surfaces['islands']
|
||||
local pos = islands.find_non_colliding_position('character', {0,0}, 20, 1)
|
||||
player.teleport(pos, 'islands')
|
||||
end
|
||||
|
||||
Event.on_init(on_init)
|
||||
@ -281,7 +293,7 @@ Command.add(
|
||||
{
|
||||
description = [[Prints all features's current levels]],
|
||||
arguments = {},
|
||||
required_rank = Ranks.admin,
|
||||
required_rank = Ranks.auto_trusted,
|
||||
allowed_by_server = true
|
||||
},
|
||||
function(_, player)
|
||||
|
@ -4,7 +4,7 @@
|
||||
local Global = require 'utils.global'
|
||||
local math = require 'utils.math'
|
||||
|
||||
local SPAWN_INTERVAL = 60 * 60 -- 60sec
|
||||
local SPAWN_INTERVAL = 60 * 60 * 3 -- 3min
|
||||
local UNIT_COUNT = 1 -- Number of units spawned per enemy listed in each ENEMY_GROUP
|
||||
|
||||
local _global = {
|
||||
|
@ -4,7 +4,7 @@
|
||||
local Global = require 'utils.global'
|
||||
|
||||
local BASE_TARGETS = 1 -- how many targets per level
|
||||
local BUILD_INTERVAL = 60 * 5 -- 5sec
|
||||
local BUILD_INTERVAL = 60 * 25 -- 25sec
|
||||
local CHANGE_TARGET_INTERVAL = _DEBUG and 60 * 1 or 60 * 100 -- 100sec
|
||||
|
||||
local _global = {
|
||||
|
@ -4,7 +4,7 @@
|
||||
local Global = require 'utils.global'
|
||||
local math = require 'utils.math'
|
||||
|
||||
local SPAWN_INTERVAL = _DEBUG and 60 * 1 or 60 * 60 * 8 -- 8 mins
|
||||
local SPAWN_INTERVAL = _DEBUG and (60 * 1) or (60 * 60 * 20) -- 20 mins
|
||||
local UNIT_COUNT = 10 -- Balance Number of units spawned per enemy listed in each ENEMY_GROUP
|
||||
local METEOR_COUNT = 1 -- meteors per spawn interval
|
||||
local METEOR_SIZE = 7 -- radius, Balance
|
||||
@ -56,6 +56,9 @@ local function drop_meteors()
|
||||
if #game.connected_players > 0 then
|
||||
player = game.connected_players[math.random(1, #game.connected_players)]
|
||||
surface = player.surface
|
||||
if surface.name ~= 'islands' then
|
||||
return
|
||||
end
|
||||
else
|
||||
return -- no connected players
|
||||
end
|
||||
|
@ -34,7 +34,7 @@ local function on_built_entity(event)
|
||||
-- Normal construction
|
||||
return
|
||||
else
|
||||
entity.destructible = false
|
||||
entity.destructible = true
|
||||
entity.minable = false
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user