1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-30 23:17:53 +02:00

+ 4 new unique rooms for labyrinth

This commit is contained in:
MewMew 2018-09-26 19:25:10 +02:00
parent 5501054905
commit 9630aee65a
3 changed files with 3776 additions and 5 deletions

View File

@ -146,7 +146,7 @@ local room_enemy_weights = {
{"allied_entities", 4},
{"allied_entities_mixed", 2}
}
local unique_room_raffle = {"flamethrower_cross", "railway_roundabout"}
local unique_room_raffle = {"forgotten_place_1", "flamethrower_cross", "railway_roundabout", "big_worm_crossing", "deadly_crossing"}
for _, t in pairs (room_enemy_weights) do
for x = 1, t[2], 1 do
@ -221,13 +221,16 @@ local function grow_cell(chunk_position, surface)
local enemies = room_enemies[math_random(1,#room_enemies)]
local unique_room = true
if global.labyrinth_size > 16 and math_random(1,50) == 1 then
if global.labyrinth_size > 10 and math_random(1,50) == 1 then
layout = nil
enemies = nil
unique_room = unique_room_raffle[math_random(1,#unique_room_raffle)]
else
unique_room = false
end
end
--layout = nil
--enemies = nil
--unique_room = "deadly_crossing"
if layout == "quad_rocks" then
while not entities_to_place.rocks[1] do
@ -560,7 +563,7 @@ end
local biter_fragmentation = {
{"medium-biter","small-biter",3,5},
{"medium-biter","small-biter",2,3},
{"big-biter","medium-biter",2,2},
{"behemoth-biter","big-biter",2,2}
}
@ -803,7 +806,7 @@ local function on_built_entity(event)
}
local i = surface.find_entities_filtered{area = a, name = inserters}
if #i > 1 then
if math.random(1,12) == 1 then
if math.random(1,11) == 1 then
break
else
for _, x in pairs (i) do

File diff suppressed because it is too large Load Diff

41
maps/spaghettorio.lua Normal file
View File

@ -0,0 +1,41 @@
--spaghettorio-- mewmew made this -- inspired by redlabel
require "maps.labyrinth_map_intro"
local simplex_noise = require 'utils.simplex_noise'
simplex_noise = simplex_noise.d2
local event = require 'utils.event'
local function on_chunk_generated(event)
local surface = game.surfaces[1]
if event.surface.name ~= surface then return end
end
function cheat_mode()
local cheat_mode_enabed = false
if cheat_mode_enabed == true then
local surface = game.surfaces["labyrinth"]
game.player.cheat_mode=true
game.players[1].insert({name="power-armor-mk2"})
game.players[1].insert({name="fusion-reactor-equipment", count=4})
game.players[1].insert({name="personal-laser-defense-equipment", count=8})
game.players[1].insert({name="rocket-launcher"})
game.players[1].insert({name="explosive-rocket", count=200})
game.speed = 2
surface.daytime = 1
surface.freeze_daytime = 1
game.player.force.research_all_technologies()
game.forces["enemy"].evolution_factor = 0.2
local chart = 200
local surface = game.surfaces["labyrinth"]
game.forces["player"].chart(surface, {lefttop = {x = chart*-1, y = chart*-1}, rightbottom = {x = chart, y = chart}})
end
end
event.add(defines.events.on_robot_built_entity, on_robot_built_entity)
event.add(defines.events.on_entity_damaged, on_entity_damaged)
event.add(defines.events.on_built_entity, on_built_entity)
event.add(defines.events.on_entity_died, on_entity_died)
event.add(defines.events.on_player_mined_entity, on_player_mined_entity)
event.add(defines.events.on_chunk_generated, on_chunk_generated)
event.add(defines.events.on_player_joined_game, on_player_joined_game)