1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-20 03:29:26 +02:00

Updates/april fools 2024 (#1408)

* Update april_fools_2024

* Fix oil deadlock

* Fix luacheck
This commit is contained in:
RedRafe 2024-04-02 03:35:12 +02:00 committed by GitHub
parent 3baad63727
commit 7a083cabd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 23 additions and 8 deletions

View File

@ -9,7 +9,17 @@
local ScenarioInfo = require 'features.gui.info' local ScenarioInfo = require 'features.gui.info'
ScenarioInfo.set_map_name('Double Trouble') 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!') ScenarioInfo.set_map_extra_info('Watch out for Icebergs!')
--- Config --- Config
@ -77,6 +87,7 @@ local function on_init()
for _, resource in pairs({'iron-ore', 'copper-ore', 'stone', 'coal', 'uranium-ore', 'crude-oil'}) do 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 } islands_mgs.autoplace_controls[resource] = { frequency = 1, richness = 1, size = 0 }
end end
islands_mgs.autoplace_controls['crude-oil'] = { frequency = 1, richness = 2, size = 1.2 }
local islands = game.create_surface('islands', islands_mgs) local islands = game.create_surface('islands', islands_mgs)
islands.request_to_generate_chunks(spawn, 5) islands.request_to_generate_chunks(spawn, 5)
islands.force_generate_chunk_requests() islands.force_generate_chunk_requests()
@ -109,7 +120,6 @@ local function on_init()
game.forces.player.set_spawn_position(spawn, 'islands') game.forces.player.set_spawn_position(spawn, 'islands')
game.forces.player.manual_mining_speed_modifier = _DEBUG and 20 or 1.2 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 end
local function on_player_created(event) local function on_player_created(event)
@ -118,7 +128,9 @@ local function on_player_created(event)
return return
end 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 end
Event.on_init(on_init) Event.on_init(on_init)
@ -281,7 +293,7 @@ Command.add(
{ {
description = [[Prints all features's current levels]], description = [[Prints all features's current levels]],
arguments = {}, arguments = {},
required_rank = Ranks.admin, required_rank = Ranks.auto_trusted,
allowed_by_server = true allowed_by_server = true
}, },
function(_, player) function(_, player)

View File

@ -4,7 +4,7 @@
local Global = require 'utils.global' local Global = require 'utils.global'
local math = require 'utils.math' 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 UNIT_COUNT = 1 -- Number of units spawned per enemy listed in each ENEMY_GROUP
local _global = { local _global = {

View File

@ -4,7 +4,7 @@
local Global = require 'utils.global' local Global = require 'utils.global'
local BASE_TARGETS = 1 -- how many targets per level 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 CHANGE_TARGET_INTERVAL = _DEBUG and 60 * 1 or 60 * 100 -- 100sec
local _global = { local _global = {

View File

@ -4,7 +4,7 @@
local Global = require 'utils.global' local Global = require 'utils.global'
local math = require 'utils.math' 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 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_COUNT = 1 -- meteors per spawn interval
local METEOR_SIZE = 7 -- radius, Balance local METEOR_SIZE = 7 -- radius, Balance
@ -56,6 +56,9 @@ local function drop_meteors()
if #game.connected_players > 0 then if #game.connected_players > 0 then
player = game.connected_players[math.random(1, #game.connected_players)] player = game.connected_players[math.random(1, #game.connected_players)]
surface = player.surface surface = player.surface
if surface.name ~= 'islands' then
return
end
else else
return -- no connected players return -- no connected players
end end

View File

@ -34,7 +34,7 @@ local function on_built_entity(event)
-- Normal construction -- Normal construction
return return
else else
entity.destructible = false entity.destructible = true
entity.minable = false entity.minable = false
end end
end end