-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Init Factorio 2.0 update * add credits * fix test module * I know luackeck, I know * Fixes * Fix bad event.player_index handling * Hotfixes * Remove all filter inserters * Migrate removed items * Deprecating spidertron control and landfill features * Small updates and DO preset
- Loading branch information
Showing
15 changed files
with
365 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 18 additions & 2 deletions
20
map_gen/maps/danger_ores/config/vanilla_allowed_entities.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,43 @@ | ||
return { | ||
-- pipes | ||
'pipe', | ||
'pipe-to-ground', | ||
-- belts | ||
'transport-belt', | ||
'fast-transport-belt', | ||
'express-transport-belt', | ||
-- undergrounds | ||
'underground-belt', | ||
'fast-underground-belt', | ||
'express-underground-belt', | ||
-- poles | ||
'small-electric-pole', | ||
'medium-electric-pole', | ||
'big-electric-pole', | ||
'substation', | ||
-- drills | ||
'electric-mining-drill', | ||
'electric-mining-drill-2', | ||
'electric-mining-drill-3', | ||
'burner-mining-drill', | ||
'pumpjack', | ||
-- vehicles | ||
'car', | ||
'tank', | ||
'spidertron', | ||
-- rails | ||
'straight-rail', | ||
'curved-rail', | ||
'curved-rail-a', | ||
'curved-rail-b', | ||
'half-diagonal-rail', | ||
'legacy-straight-rail', | ||
'legacy-curved-rail', | ||
'rail-signal', | ||
'rail-chain-signal', | ||
'train-stop', | ||
'locomotive', | ||
'cargo-wagon', | ||
'fluid-wagon', | ||
'artillery-wagon' | ||
} | ||
'artillery-wagon', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
-- This module prevents all but the normal quality drills from being built on top of resources | ||
local Event = require 'utils.event' | ||
|
||
local function on_built(event) | ||
local entity = event.entity | ||
if not (entity and entity.valid) then | ||
return | ||
end | ||
|
||
local e_type = entity.type | ||
if entity.name == 'entity-ghost' then | ||
e_type = entity.ghost_type | ||
end | ||
if e_type ~= 'mining-drill' then | ||
return | ||
end | ||
if entity.quality.level < 1 then | ||
return | ||
end | ||
|
||
local index = event.player_index | ||
local player = index and game.get_player(index) | ||
if player and player.valid then | ||
player.print('Only [quality=normal] drills can be built on top of resources!') | ||
end | ||
entity.destroy() | ||
end | ||
|
||
Event.add(defines.events.on_built_entity, on_built) | ||
Event.add(defines.events.on_robot_built_entity, on_built) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
-- This module replaces mining productivity research effects with robot cargo capacity effects | ||
local Event = require 'utils.event' | ||
|
||
local function starts_with(str, pattern) | ||
return str:sub(1, #pattern) == pattern | ||
end | ||
|
||
Event.add(defines.events.on_research_finished, function(event) | ||
local tech = event.research | ||
if not (tech and tech.valid) then | ||
return | ||
end | ||
|
||
if not starts_with(tech.name, 'mining-productivity') then | ||
return | ||
end | ||
|
||
local force = tech.force | ||
force.mining_drill_productivity_bonus = 0 | ||
force.worker_robots_storage_bonus = force.worker_robots_storage_bonus + 1 | ||
|
||
game.print(table.concat({ | ||
'[color=orange][Mining productivity][/color]', | ||
'➡', | ||
'[color=blue][Worker robots cargo size][/color]', | ||
'\nReplacing technology effects. New robots cargo capacity:', | ||
'[color=green][font=var]+'..force.worker_robots_storage_bonus..'[/font][/color]' | ||
}, '\t\t')) | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.