├── README.md ├── base ├── data-updates.lua ├── data.lua ├── info.json ├── migrations │ ├── 1.1.0.json │ ├── 1.2.0 stack inserter rename.json │ ├── 2.0.0-biter-egg.json │ ├── 2.0.0-internal.json │ ├── 2.0.0-internal2.json │ ├── 2.0.0-internal3.json │ ├── 2.0.0.json │ ├── 2.0.0.lua │ └── migrations.txt └── prototypes │ ├── achievements.lua │ ├── ambient-sounds.lua │ ├── autoplace-controls.lua │ ├── categories │ ├── ammo-category.lua │ ├── equipment-category.lua │ ├── fuel-category.lua │ ├── module-category.lua │ ├── quality.lua │ ├── recipe-category.lua │ └── resource-category.lua │ ├── collision-layers.lua │ ├── custom-inputs.lua │ ├── damage-type.lua │ ├── decorative │ ├── decorative-trigger-effects.lua │ └── decoratives.lua │ ├── demo.lua │ ├── entity │ ├── artillery-cannon-muzzle-flash-shifting.lua │ ├── assemblerpipes.lua │ ├── atomic-bomb.lua │ ├── beacon-animations.lua │ ├── beams.lua │ ├── biter-ai-settings.lua │ ├── biter-animations.lua │ ├── biter-die-effects.lua │ ├── cargo-hatch.lua │ ├── cargo-pod-catalogue.lua │ ├── character-animations.lua │ ├── circuit-network.lua │ ├── combinator-pictures.lua │ ├── crash-site.lua │ ├── enemies.lua │ ├── enemy-autoplace-utils.lua │ ├── enemy-constants.lua │ ├── enemy-projectiles.lua │ ├── entities.lua │ ├── entity-util.lua │ ├── explosion-animations.lua │ ├── explosions.lua │ ├── factorio-logo.lua │ ├── fire.lua │ ├── flying-robots.lua │ ├── giga-cargo-hatch.lua │ ├── hit-effects.lua │ ├── laser-sounds.lua │ ├── mining-drill.lua │ ├── movement-triggers.lua │ ├── pipecovers.lua │ ├── projectiles.lua │ ├── pump-connector.lua │ ├── rail-pictures.lua │ ├── remnants.lua │ ├── resources.lua │ ├── rocket-projectile-pictures.lua │ ├── smoke-animations.lua │ ├── smoke.lua │ ├── sounds.lua │ ├── spawner-animation.lua │ ├── spidertron-animations.lua │ ├── spidertron-light-positions.lua │ ├── spitter-animations.lua │ ├── trains.lua │ ├── transport-belts.lua │ ├── trees.lua │ ├── turrets.lua │ └── worm-animations.lua │ ├── equipment-grid.lua │ ├── equipment.lua │ ├── factoriopedia-simulations.lua │ ├── factoriopedia-util.lua │ ├── fire-util.lua │ ├── fluid.lua │ ├── impact-deliver-category.lua │ ├── item-groups.lua │ ├── item-tints.lua │ ├── item.lua │ ├── item_sounds.lua │ ├── map-gen-presets.lua │ ├── map-settings.lua │ ├── noise-expressions.lua │ ├── particle-animations.lua │ ├── particles.lua │ ├── planet │ ├── planet-map-gen.lua │ ├── planet.lua │ ├── procession-audio-catalogue-types.lua │ ├── procession-graphic-catalogue-types.lua │ ├── procession-style.lua │ ├── procession.lua │ └── surface-property.lua │ ├── pollution.lua │ ├── recipe.lua │ ├── shortcuts.lua │ ├── signal.lua │ ├── technology.lua │ ├── tile │ ├── tile-collision-masks.lua │ ├── tile-graphics.lua │ ├── tile-pollution-values.lua │ ├── tile-sounds.lua │ ├── tile-trigger-effects.lua │ └── tiles.lua │ ├── tips-and-tricks-simulations.lua │ ├── tips-and-tricks.lua │ ├── trigger-target-types.lua │ ├── tutorials.lua │ └── utility-sprites.lua ├── changelog.txt ├── core ├── backers.json ├── data.lua ├── info.json ├── lualib │ ├── autoplace_utils.lua │ ├── bonus-gui-ordering.lua │ ├── circuit-connector-generated-definitions.lua │ ├── circuit-connector-sprites.lua │ ├── collision-mask-defaults.lua │ ├── collision-mask-util.lua │ ├── crash-site.lua │ ├── data-duplicate-checker.lua │ ├── dataloader.lua │ ├── event_handler.lua │ ├── kill-score.lua │ ├── math2d.lua │ ├── math3d.lua │ ├── meld.lua │ ├── mod-gui.lua │ ├── production-score.lua │ ├── resource-autoplace.lua │ ├── silo-script.lua │ ├── sound-util.lua │ ├── space-finish-script.lua │ ├── story.lua │ ├── surface-render-parameter-effects.lua │ └── util.lua └── prototypes │ ├── burner-usage.lua │ ├── cursors.lua │ ├── editor-controller.lua │ ├── fonts.lua │ ├── god-controller.lua │ ├── noise-functions.lua │ ├── noise-programs.lua │ ├── parameters.lua │ ├── remote-controller.lua │ ├── spectator-controller.lua │ ├── style.lua │ ├── unknown.lua │ ├── utility-constants.lua │ ├── utility-sounds.lua │ └── utility-sprites.lua ├── credits.txt ├── elevated-rails ├── data.lua ├── info.json └── prototypes │ ├── base-data-updates.lua │ ├── entity │ ├── elevated-rail-pictures.lua │ ├── elevated-rails.lua │ ├── explosions.lua │ └── remnants.lua │ ├── item │ └── elevated-rails.lua │ ├── particles.lua │ ├── recipe │ └── elevated-rails.lua │ ├── sloped-trains-updates.lua │ ├── technology │ └── elevated-rails.lua │ ├── tips-and-tricks-simulations.lua │ └── tips-and-tricks.lua ├── map-gen-settings.example.json ├── map-settings.example.json ├── quality ├── data-updates.lua ├── data.lua ├── info.json └── prototypes │ ├── base-data-updates.lua │ ├── entity │ ├── entity.lua │ ├── explosions.lua │ ├── recycler-pictures.lua │ └── remnants.lua │ ├── item.lua │ ├── module-category.lua │ ├── quality.lua │ ├── recipe.lua │ ├── recycling.lua │ ├── signal.lua │ ├── technology.lua │ ├── tips-and-tricks-simulations.lua │ └── tips-and-tricks.lua ├── server-settings.example.json ├── server-whitelist.example.json └── space-age ├── base-data-updates.lua ├── data-updates.lua ├── data.lua ├── info.json ├── migrations ├── aquilo-tilesets.json ├── biolab.json ├── internal.json ├── jelly-yum-rename.json ├── shattered-planet.json └── tungsten-belt-rename.json └── prototypes ├── achievements.lua ├── active-triggers.lua ├── ambient-sounds.lua ├── autoplace-controls.lua ├── burner-usage.lua ├── categories ├── ammo-category.lua ├── fuel-category.lua ├── recipe-category.lua └── resource-category.lua ├── decorative ├── decoratives-aquilo.lua ├── decoratives-fulgora.lua ├── decoratives-gleba.lua ├── decoratives-vulcanus.lua └── decoratives.lua ├── entity ├── agricultural-tower-crane.lua ├── asteroid-collector-pictures.lua ├── asteroid.lua ├── base-frozen-graphics.lua ├── beams.lua ├── big-mining-drill.lua ├── biochamber-pictures.lua ├── cargo-hatch.lua ├── cargo-pod-catalogue.lua ├── circuit-network.lua ├── crusher-pictures.lua ├── cryogenic-plant-pictures.lua ├── electromagnetic-plant-pictures.lua ├── enemies.lua ├── entities.lua ├── explosion-animations.lua ├── explosions.lua ├── flying-robots.lua ├── foundry-pictures.lua ├── fusion-system-pictures.lua ├── giga-cargo-hatch.lua ├── gleba-ai-settings.lua ├── gleba-enemy-animations.lua ├── lightning-collector-graphics.lua ├── lightning-rod-graphics.lua ├── mech-armor-animations.lua ├── plants.lua ├── projectiles.lua ├── railgun-turret-pictures.lua ├── remnants.lua ├── resources.lua ├── smoke.lua ├── sounds.lua ├── space-enemy-autoplace-utils.lua ├── space-platform-hub-cockpit.lua ├── transport-belts.lua ├── trees.lua └── turrets.lua ├── equipment-grid.lua ├── equipment.lua ├── factoriopedia-simulations.lua ├── fluid.lua ├── item-effects.lua ├── item-groups.lua ├── item.lua ├── item_sounds.lua ├── particle-animations.lua ├── particles.lua ├── planet ├── asteroid-spawn-definitions.lua ├── general │ ├── general-functions.lua │ ├── general-variables.lua │ ├── planet-to-platform.lua │ ├── planet-to-platform │ │ ├── audio-events.lua │ │ ├── cloud-layers.lua │ │ ├── pod-layers-a.lua │ │ ├── pod-layers-b.lua │ │ ├── pod-layers-i.lua │ │ ├── rocket-layers.lua │ │ └── space-layers.lua │ ├── platform-to-planet.lua │ └── platform-to-planet │ │ ├── audio-events.lua │ │ ├── cloud-layers.lua │ │ ├── pod-layers-a.lua │ │ ├── pod-layers-b.lua │ │ ├── pod-layers-i.lua │ │ └── space-layers.lua ├── planet-aquilo-map-gen.lua ├── planet-fulgora-map-gen.lua ├── planet-gleba-map-gen.lua ├── planet-map-gen.lua ├── planet-vulcanus-map-gen.lua ├── planet.lua ├── procession-catalogue-aquilo.lua ├── procession-catalogue-fulgora.lua ├── procession-catalogue-gleba.lua ├── procession-catalogue-vulcanus.lua ├── procession-common.lua └── procession.lua ├── recipe.lua ├── spores.lua ├── surface.lua ├── technology.lua ├── tile ├── platform-tile-animations.lua ├── tile-pollution-values.lua ├── tile-sounds.lua ├── tile-trigger-effects.lua ├── tiles-aquilo.lua ├── tiles-fulgora.lua ├── tiles-gleba.lua ├── tiles-vulcanus.lua └── tiles.lua ├── tips-and-tricks-simulations.lua ├── tips-and-tricks.lua ├── utility-sounds.lua └── utility-sprites.lua /README.md: -------------------------------------------------------------------------------- 1 | # Factorio Data 2 | Tracks changes of the Lua prototype definitions in Factorio in between releases. 3 | 4 | This repo has been made publicly available to help mod authors. 5 | Its purpose is to allow the public to track changes to the Factorio **Lua prototype definitions**. 6 | 7 | See https://github.com/wube/factorio-data/releases for past versions. 8 | Compare versions using git on the command line, or by using magic github comparison urls, 9 | eg: https://github.com/wube/factorio-data/compare/0.18.43...1.1.57 10 | 11 | ## Some Potential Use Cases of Data 12 | 13 | * Online references, cheat sheets, and calculators. 14 | * It can be used to automate mod updates when new versions are released. 15 | * You may link directly to specific library code and entity definitions when discussing such matters on the forums, GitHub issues for mods, Discord etc. 16 | * Browse diffs between the versions, seeing the implementation of prototype changes we mention in the changelog. 17 | 18 | This repo debuted in [FFF-240](https://www.factorio.com/blog/post/fff-240). 19 | 20 | ## Pull Requests Will Be Rejected 21 | The contents of this repository are automatically generated. It is pointless to make a pull request as it will not be merged. GitHub doesn't allow for deactivating the Pull requests feature. 22 | 23 | If you wish to report a bug, please do so [on our forums](https://forums.factorio.com/viewforum.php?f=7). Thank you! 24 | -------------------------------------------------------------------------------- /base/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "base", 3 | "version": "2.0.56", 4 | "title": "Base Mod", 5 | "author": "Wube Software", 6 | "contact": "dev@factorio.com", 7 | "homepage": "https://www.factorio.com", 8 | "dependencies": [] 9 | } 10 | -------------------------------------------------------------------------------- /base/migrations/1.1.0.json: -------------------------------------------------------------------------------- 1 | { 2 | "technology": 3 | [ 4 | [ "laser-turret-speed-1", "laser-shooting-speed-1" ], 5 | [ "laser-turret-speed-2", "laser-shooting-speed-2" ], 6 | [ "laser-turret-speed-3", "laser-shooting-speed-3" ], 7 | [ "laser-turret-speed-4", "laser-shooting-speed-4" ], 8 | [ "laser-turret-speed-5", "laser-shooting-speed-5" ], 9 | [ "laser-turret-speed-6", "laser-shooting-speed-6" ], 10 | [ "laser-turret-speed-7", "laser-shooting-speed-7" ], 11 | [ "turrets", "gun-turret" ], 12 | [ "laser-turrets", "laser-turret" ], 13 | [ "combat-robotics", "defender" ], 14 | [ "combat-robotics-2", "distractor" ], 15 | [ "combat-robotics-3", "destroyer" ], 16 | [ "gates", "gate" ], 17 | [ "stone-walls", "stone-wall" ], 18 | [ "tanks", "tank" ] 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /base/migrations/1.2.0 stack inserter rename.json: -------------------------------------------------------------------------------- 1 | { 2 | "item": 3 | [ 4 | [ "stack-inserter", "bulk-inserter" ], 5 | [ "bulk-inserter", "stack-inserter" ] 6 | ], 7 | "entity": 8 | [ 9 | [ "stack-inserter", "bulk-inserter" ], 10 | [ "bulk-inserter", "stack-inserter" ] 11 | ], 12 | "recipe": 13 | [ 14 | [ "stack-inserter", "bulk-inserter" ], 15 | [ "bulk-inserter", "stack-inserter" ] 16 | ], 17 | "technology": 18 | [ 19 | [ "stack-inserter", "bulk-inserter" ], 20 | [ "bulk-inserter", "stack-inserter" ] 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /base/migrations/2.0.0-biter-egg.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipe": [ 3 | ["biter-eggs", "biter-egg"] 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /base/migrations/2.0.0-internal.json: -------------------------------------------------------------------------------- 1 | { 2 | "entity": 3 | [ 4 | [ "new-straight-rail-remnants", "straight-rail-remnants" ], 5 | [ "kink-rail-remnants", "half-diagonal-rail-remnants" ], 6 | [ "curve-a-rail-remnants", "curved-rail-a-remnants" ], 7 | [ "curve-b-rail-remnants", "curved-rail-b-remnants" ], 8 | [ "drop-pod", "cargo-pod" ], 9 | [ "drop-pod-container", "cargo-pod-container" ], 10 | [ "effectivity-module-recycling", "efficiency-module-recycling" ], 11 | [ "effectivity-module-2-recycling", "efficiency-module-2-recycling" ], 12 | [ "effectivity-module-3-recycling", "efficiency-module-3-recycling" ] 13 | ], 14 | "virtual-signal": 15 | [ 16 | [ "signal-any-item", "signal-item-parameter"], 17 | [ "signal-any-fuel", "signal-fuel-parameter"], 18 | [ "signal-any-fluid", "signal-fluid-parameter"], 19 | [ "signal-any-signal", "signal-signal-parameter"] 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /base/migrations/2.0.0-internal2.json: -------------------------------------------------------------------------------- 1 | { 2 | "item": [ 3 | ["rts-tool", "spidertron-remote"] 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /base/migrations/2.0.0-internal3.json: -------------------------------------------------------------------------------- 1 | { 2 | "item": 3 | [ 4 | [ "used-up-uranium-fuel-cell", "depleted-uranium-fuel-cell" ] 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /base/migrations/2.0.0.json: -------------------------------------------------------------------------------- 1 | { 2 | "item": 3 | [ 4 | ["empty-barrel", "barrel"], 5 | ["filter-inserter", "fast-inserter"], 6 | ["stack-filter-inserter", "bulk-inserter"], 7 | ["fusion-reactor-equipment", "fission-reactor-equipment"], 8 | ["logistic-chest-passive-provider", "passive-provider-chest"], 9 | ["logistic-chest-active-provider", "active-provider-chest"], 10 | ["logistic-chest-storage", "storage-chest"], 11 | ["logistic-chest-buffer", "buffer-chest"], 12 | ["logistic-chest-requester", "requester-chest"], 13 | ["effectivity-module", "efficiency-module"], 14 | ["effectivity-module-2", "efficiency-module-2"], 15 | ["effectivity-module-3", "efficiency-module-3"] 16 | ], 17 | "equipment": 18 | [ 19 | ["fusion-reactor-equipment", "fission-reactor-equipment"] 20 | ], 21 | "recipe": 22 | [ 23 | ["empty-barrel", "barrel"], 24 | ["empty-barrel-recycling", "barrel-recycling"], 25 | ["fill-water-barrel", "water-barrel"], 26 | ["fill-crude-oil-barrel", "crude-oil-barrel"], 27 | ["fill-petroleum-gas-barrel", "petroleum-gas-barrel"], 28 | ["fill-light-oil-barrel", "light-oil-barrel"], 29 | ["fill-heavy-oil-barrel", "heavy-oil-barrel"], 30 | ["fill-lubricant-barrel", "lubricant-barrel"], 31 | ["fill-sulfuric-acid-barrel", "sulfuric-acid-barrel"], 32 | ["fill-fluoroketone-hot-barrel", "fluoroketone-hot-barrel"], 33 | ["fill-fluoroketone-cold-barrel", "fluoroketone-cold-barrel"], 34 | ["logistic-chest-passive-provider", "passive-provider-chest"], 35 | ["logistic-chest-active-provider", "active-provider-chest"], 36 | ["logistic-chest-storage", "storage-chest"], 37 | ["logistic-chest-buffer", "buffer-chest"], 38 | ["logistic-chest-requester", "requester-chest"], 39 | ["effectivity-module", "efficiency-module"], 40 | ["effectivity-module-2", "efficiency-module-2"], 41 | ["effectivity-module-3", "efficiency-module-3"] 42 | ], 43 | "entity": 44 | [ 45 | ["filter-inserter", "fast-inserter"], 46 | ["stack-filter-inserter", "bulk-inserter"], 47 | ["logistic-chest-passive-provider", "passive-provider-chest"], 48 | ["logistic-chest-active-provider", "active-provider-chest"], 49 | ["logistic-chest-storage", "storage-chest"], 50 | ["logistic-chest-buffer", "buffer-chest"], 51 | ["logistic-chest-requester", "requester-chest"], 52 | ["straight-rail-remnants", "legacy-straight-rail-remnants"], 53 | ["curved-rail-remnants", "legacy-curved-rail-remnants"], 54 | ["rock-huge", "huge-rock"], 55 | ["rock-big", "big-rock"], 56 | ["rock-medium", "medium-rock"], 57 | ["sand-rock-big", "big-sand-rock"] 58 | ], 59 | "technology": 60 | [ 61 | ["energy-weapons-damage-1", "laser-weapons-damage-1"], 62 | ["energy-weapons-damage-2", "laser-weapons-damage-2"], 63 | ["energy-weapons-damage-3", "laser-weapons-damage-3"], 64 | ["energy-weapons-damage-4", "laser-weapons-damage-4"], 65 | ["energy-weapons-damage-5", "laser-weapons-damage-5"], 66 | ["energy-weapons-damage-6", "laser-weapons-damage-6"], 67 | ["energy-weapons-damage-7", "laser-weapons-damage-7"], 68 | ["advanced-electronics", "advanced-circuit"], 69 | ["advanced-electronics-2", "processing-unit"], 70 | ["optics", "lamp"], 71 | ["effectivity-module", "efficiency-module"], 72 | ["effectivity-module-2", "efficiency-module-2"], 73 | ["effectivity-module-3", "efficiency-module-3"] 74 | ], 75 | "decorative": 76 | [ 77 | ["puberty-decal", "cracked-mud-decal"], 78 | ["sand-rock-medium", "medium-sand-rock"], 79 | ["sand-rock-small", "small-sand-rock"], 80 | ["rock-tiny", "tiny-rock"], 81 | ["rock-small", "small-rock"], 82 | ["rock-medium", "medium-rock"] 83 | ] 84 | } 85 | -------------------------------------------------------------------------------- /base/migrations/2.0.0.lua: -------------------------------------------------------------------------------- 1 | -- This is to migrate the technology unlocks, the new trigger unlocks and new prerequisites 2 | 3 | local function is_any_successor_researched(technology) 4 | if technology then 5 | for k, technology in pairs(technology.successors) do 6 | if technology.researched then 7 | return true 8 | end 9 | end 10 | end 11 | return false 12 | end 13 | 14 | local function set_researched_safe(technology) 15 | if technology then 16 | technology.researched = true 17 | end 18 | end 19 | 20 | local migrate_force = function(force) 21 | local technologies = force.technologies 22 | 23 | -- trigger technologies; these are critical, so we want to migrate them 24 | if is_any_successor_researched(technologies["automation-science-pack"]) then 25 | set_researched_safe(technologies["automation-science-pack"]) 26 | set_researched_safe(technologies["electronics"]) 27 | set_researched_safe(technologies["steam-power"]) 28 | end 29 | if is_any_successor_researched(technologies["uranium-mining"]) then 30 | set_researched_safe(technologies["uranium-mining"]) 31 | end 32 | if is_any_successor_researched(technologies["oil-gathering"]) then 33 | set_researched_safe(technologies["oil-gathering"]) 34 | end 35 | end 36 | 37 | for k, force in pairs(game.forces) do 38 | migrate_force(force) 39 | end 40 | -------------------------------------------------------------------------------- /base/migrations/migrations.txt: -------------------------------------------------------------------------------- 1 | 1.1.0.json 2 | 1.2.0 stack inserter rename.json 3 | 2.0.0.json 4 | 2.0.0.lua 5 | 2.0.0-internal.json 6 | 2.0.0-internal2.json 7 | 2.0.0-internal3.json 8 | 2.0.0-jelly-yum-rename.json 9 | 2.0.0-biter-egg.json 10 | -------------------------------------------------------------------------------- /base/prototypes/autoplace-controls.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "autoplace-control", 5 | name = "iron-ore", 6 | localised_name = {"", "[entity=iron-ore] ", {"entity-name.iron-ore"}}, 7 | richness = true, 8 | order = "a-a", 9 | category = "resource" 10 | }, 11 | { 12 | type = "autoplace-control", 13 | name = "copper-ore", 14 | localised_name = {"", "[entity=copper-ore] ", {"entity-name.copper-ore"}}, 15 | richness = true, 16 | order = "a-b", 17 | category = "resource" 18 | }, 19 | { 20 | type = "autoplace-control", 21 | name = "stone", 22 | localised_name = {"", "[entity=stone] ", {"entity-name.stone"}}, 23 | richness = true, 24 | order = "a-c", 25 | category = "resource" 26 | }, 27 | { 28 | type = "autoplace-control", 29 | name = "coal", 30 | localised_name = {"", "[entity=coal] ", {"entity-name.coal"}}, 31 | richness = true, 32 | order = "a-d", 33 | category = "resource" 34 | }, 35 | { 36 | type = "autoplace-control", 37 | name = "crude-oil", 38 | localised_name = {"", "[entity=crude-oil] ", {"entity-name.crude-oil"}}, 39 | richness = true, 40 | order = "a-e", 41 | category = "resource" 42 | }, 43 | { 44 | type = "autoplace-control", 45 | name = "uranium-ore", 46 | localised_name = {"", "[entity=uranium-ore] ", {"entity-name.uranium-ore"}}, 47 | richness = true, 48 | order = "a-f", 49 | category = "resource" 50 | }, 51 | { 52 | type = "autoplace-control", 53 | name = "water", 54 | localised_description = {"size.only-starting-area"}, 55 | order = "c-a", 56 | category = "terrain" 57 | }, 58 | { 59 | type = "autoplace-control", 60 | name = "trees", 61 | order = "c-x", 62 | category = "terrain" 63 | }, 64 | { 65 | type = "autoplace-control", 66 | name = "rocks", 67 | order = "c-y", 68 | category = "terrain" 69 | }, 70 | { 71 | type = "autoplace-control", 72 | name = "starting_area_moisture", 73 | order = "c-z", 74 | category = "terrain" 75 | }, 76 | { 77 | type = "autoplace-control", 78 | name = "nauvis_cliff", 79 | order = "c-z", 80 | category = "cliff" 81 | }, 82 | { 83 | type = "autoplace-control", 84 | name = "enemy-base", 85 | order = "c-z", 86 | category = "enemy", 87 | related_to_fight_achievements = true 88 | } 89 | } 90 | ) 91 | -------------------------------------------------------------------------------- /base/prototypes/categories/ammo-category.lua: -------------------------------------------------------------------------------- 1 | require ("bonus-gui-ordering") 2 | 3 | data:extend( 4 | { 5 | { 6 | type = "ammo-category", 7 | name = "bullet", 8 | icon = "__base__/graphics/icons/ammo-category/bullet.png", 9 | subgroup = "ammo-category" 10 | }, 11 | { 12 | type = "ammo-category", 13 | name = "rocket", 14 | icon = "__base__/graphics/icons/ammo-category/rocket.png", 15 | subgroup = "ammo-category" 16 | }, 17 | { 18 | type = "ammo-category", 19 | name = "laser", 20 | icon = "__base__/graphics/icons/ammo-category/laser.png", 21 | subgroup = "ammo-category" 22 | }, 23 | { 24 | type = "ammo-category", 25 | name = "electric", 26 | icon = "__base__/graphics/icons/ammo-category/electric.png", 27 | subgroup = "ammo-category" 28 | }, 29 | { 30 | type = "ammo-category", 31 | name = "flamethrower", 32 | icon = "__base__/graphics/icons/ammo-category/flamethrower.png", 33 | subgroup = "ammo-category" 34 | }, 35 | { 36 | type = "ammo-category", 37 | name = "shotgun-shell", 38 | icon = "__base__/graphics/icons/ammo-category/shotgun-shell.png", 39 | subgroup = "ammo-category" 40 | }, 41 | { 42 | type = "ammo-category", 43 | name = "capsule", 44 | icon = "__base__/graphics/icons/ammo-category/capsule.png", 45 | subgroup = "ammo-category", 46 | hidden = true 47 | }, 48 | { 49 | type = "ammo-category", 50 | name = "grenade", 51 | icon = "__base__/graphics/icons/ammo-category/grenade.png", 52 | subgroup = "ammo-category" 53 | }, 54 | { 55 | type = "ammo-category", 56 | name = "melee", 57 | hidden = true 58 | }, 59 | { 60 | type = "ammo-category", 61 | name = "biological", 62 | hidden = true 63 | }, 64 | { 65 | type = "ammo-category", 66 | name = "cannon-shell", 67 | icon = "__base__/graphics/icons/ammo-category/cannon-shell.png", 68 | subgroup = "ammo-category" 69 | }, 70 | { 71 | type = "ammo-category", 72 | name = "artillery-shell", 73 | icon = "__base__/graphics/icons/ammo-category/artillery-shell.png", 74 | subgroup = "ammo-category" 75 | }, 76 | { 77 | type = "ammo-category", 78 | name = "beam", 79 | icon = "__base__/graphics/icons/ammo-category/beam.png", 80 | subgroup = "ammo-category" 81 | }, 82 | { 83 | type = "ammo-category", 84 | name = "landmine", 85 | icon = "__base__/graphics/icons/ammo-category/land-mine.png", 86 | subgroup = "ammo-category" 87 | } 88 | } 89 | ) 90 | 91 | for k,v in pairs(data.raw["ammo-category"]) do 92 | if not v.bonus_gui_order then 93 | v.bonus_gui_order = bonus_gui_ordering[k] 94 | end 95 | end 96 | -------------------------------------------------------------------------------- /base/prototypes/categories/equipment-category.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "equipment-category", 5 | name = "armor" 6 | } 7 | } 8 | ) 9 | -------------------------------------------------------------------------------- /base/prototypes/categories/fuel-category.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "fuel-category", 5 | name = "chemical" 6 | }, 7 | { 8 | type = "fuel-category", 9 | name = "nuclear" 10 | } 11 | } 12 | ) 13 | -------------------------------------------------------------------------------- /base/prototypes/categories/module-category.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "module-category", 5 | name = "productivity" 6 | }, 7 | { 8 | type = "module-category", 9 | name = "speed" 10 | }, 11 | { 12 | type = "module-category", 13 | name = "efficiency" 14 | } 15 | } 16 | ) 17 | -------------------------------------------------------------------------------- /base/prototypes/categories/quality.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "quality", 5 | name = "normal", 6 | level = 0, 7 | color = {r = 255 * 0.7, g = 255 * 0.7, b = 255 * 0.7}, 8 | order = "a", 9 | next_probability = 0.1, 10 | subgroup = "qualities", 11 | hidden = true, --hidden in the base game, to not confuse by its existence in the selection gui 12 | icon = "__base__/graphics/icons/quality-normal.png", 13 | draw_sprite_by_default = false 14 | } 15 | } 16 | ) 17 | -------------------------------------------------------------------------------- /base/prototypes/categories/recipe-category.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "recipe-category", 5 | name = "crafting" 6 | }, 7 | { 8 | type = "recipe-category", 9 | name = "advanced-crafting" 10 | }, 11 | { 12 | type = "recipe-category", 13 | name = "smelting" 14 | }, 15 | { 16 | type = "recipe-category", 17 | name = "chemistry" 18 | }, 19 | { 20 | type = "recipe-category", 21 | name = "crafting-with-fluid" 22 | }, 23 | { 24 | type = "recipe-category", 25 | name = "oil-processing" 26 | }, 27 | { 28 | type = "recipe-category", 29 | name = "rocket-building" 30 | }, 31 | { 32 | type = "recipe-category", 33 | name = "centrifuging" 34 | }, 35 | { 36 | type = "recipe-category", 37 | name = "basic-crafting" 38 | }, 39 | { 40 | type = "recipe-category", 41 | name = "recycling" -- According to the game engine, removing this is illegal :) 42 | }, 43 | { 44 | type = "recipe-category", 45 | name = "recycling-or-hand-crafting" 46 | } 47 | }) 48 | -------------------------------------------------------------------------------- /base/prototypes/categories/resource-category.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "resource-category", 5 | name = "basic-solid" 6 | }, 7 | { 8 | type = "resource-category", 9 | name = "basic-fluid" 10 | }, 11 | } 12 | ) 13 | -------------------------------------------------------------------------------- /base/prototypes/collision-layers.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | -- TODO boskid: temporary list for compatibility, it would be nice to rework that list from scratch 4 | { type = "collision-layer", order = "01", name = "ground_tile" }, 5 | { type = "collision-layer", order = "02", name = "water_tile" }, 6 | { type = "collision-layer", order = "03", name = "resource" }, 7 | { type = "collision-layer", order = "04", name = "doodad" }, 8 | { type = "collision-layer", order = "05", name = "floor" }, 9 | { type = "collision-layer", order = "06", name = "rail" }, 10 | { type = "collision-layer", order = "07", name = "transport_belt" }, 11 | { type = "collision-layer", order = "08", name = "item" }, 12 | { type = "collision-layer", order = "09", name = "ghost" }, 13 | { type = "collision-layer", order = "10", name = "object" }, 14 | { type = "collision-layer", order = "11", name = "player" }, 15 | { type = "collision-layer", order = "12", name = "car" }, 16 | { type = "collision-layer", order = "13", name = "train" }, 17 | { type = "collision-layer", order = "14", name = "elevated_rail" }, 18 | { type = "collision-layer", order = "15", name = "elevated_train" }, 19 | { type = "collision-layer", order = "16", name = "empty_space" }, 20 | { type = "collision-layer", order = "17", name = "lava_tile" }, 21 | { type = "collision-layer", order = "18", name = "meltable" }, 22 | { type = "collision-layer", order = "19", name = "rail_support" }, 23 | { type = "collision-layer", order = "20", name = "trigger_target" }, -- for collision masks that collide with nothing, but still need to be targetable by trigger events 24 | { type = "collision-layer", order = "21", name = "cliff" }, -- certain object-layer decoratives should collide with cliffs 25 | 26 | { type = "collision-layer", name = "is_lower_object" }, 27 | { type = "collision-layer", name = "is_object" }, 28 | { type = "collision-layer", name = "out_of_map" } 29 | }) 30 | -------------------------------------------------------------------------------- /base/prototypes/custom-inputs.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "custom-input", 5 | name = "give-blueprint", 6 | key_sequence = "ALT + B", 7 | consuming = "game-only", 8 | item_to_spawn = "blueprint", 9 | action = "spawn-item" 10 | }, 11 | { 12 | type = "custom-input", 13 | name = "give-blueprint-book", 14 | key_sequence = "", 15 | consuming = "game-only", 16 | item_to_spawn = "blueprint-book", 17 | action = "spawn-item" 18 | }, 19 | { 20 | type = "custom-input", 21 | name = "give-deconstruction-planner", 22 | key_sequence = "ALT + D", 23 | consuming = "game-only", 24 | item_to_spawn = "deconstruction-planner", 25 | action = "spawn-item" 26 | }, 27 | { 28 | type = "custom-input", 29 | name = "give-upgrade-planner", 30 | key_sequence = "ALT + U", 31 | consuming = "game-only", 32 | item_to_spawn = "upgrade-planner", 33 | action = "spawn-item" 34 | }, 35 | { 36 | type = "custom-input", 37 | name = "toggle-personal-roboport", 38 | key_sequence = "ALT + F", 39 | consuming = "game-only", 40 | action = "toggle-personal-roboport" 41 | }, 42 | { 43 | type = "custom-input", 44 | name = "toggle-personal-logistic-requests", 45 | key_sequence = "ALT + L", 46 | consuming = "game-only", 47 | action = "toggle-personal-logistic-requests" 48 | }, 49 | { 50 | type = "custom-input", 51 | name = "toggle-equipment-movement-bonus", 52 | key_sequence = "ALT + E", 53 | consuming = "game-only", 54 | action = "toggle-equipment-movement-bonus" 55 | }, 56 | { 57 | type = "custom-input", 58 | name = "give-copper-wire", 59 | key_sequence = "ALT + C", 60 | consuming = "game-only", 61 | item_to_spawn = "copper-wire", 62 | action = "spawn-item" 63 | }, 64 | { 65 | type = "custom-input", 66 | name = "give-red-wire", 67 | key_sequence = "ALT + R", 68 | consuming = "game-only", 69 | item_to_spawn = "red-wire", 70 | action = "spawn-item" 71 | }, 72 | { 73 | type = "custom-input", 74 | name = "give-green-wire", 75 | key_sequence = "ALT + G", 76 | consuming = "game-only", 77 | item_to_spawn = "green-wire", 78 | action = "spawn-item" 79 | }, 80 | { 81 | type = "custom-input", 82 | name = "give-spidertron-remote", 83 | key_sequence = "ALT + A", 84 | controller_key_sequence = "controller-lefttrigger + controller-y", 85 | block_modifiers = true, 86 | consuming = "game-only", 87 | item_to_spawn = "spidertron-remote", 88 | action = "spawn-item" 89 | }, 90 | { 91 | type = "custom-input", 92 | name = "give-discharge-defense-remote", 93 | key_sequence = "ALT + Y", 94 | consuming = "game-only", 95 | item_to_spawn = "discharge-defense-remote", 96 | action = "spawn-item" 97 | }, 98 | { 99 | type = "custom-input", 100 | name = "give-artillery-targeting-remote", 101 | key_sequence = "ALT + T", 102 | consuming = "game-only", 103 | item_to_spawn = "artillery-targeting-remote", 104 | action = "spawn-item" 105 | } 106 | }) 107 | -------------------------------------------------------------------------------- /base/prototypes/damage-type.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "damage-type", 5 | name = "physical" 6 | }, 7 | { 8 | type = "damage-type", 9 | name = "impact" 10 | }, 11 | { 12 | type = "damage-type", 13 | name = "poison" 14 | }, 15 | { 16 | type = "damage-type", 17 | name = "explosion" 18 | }, 19 | { 20 | type = "damage-type", 21 | name = "fire" 22 | }, 23 | { 24 | type = "damage-type", 25 | name = "laser" 26 | }, 27 | { 28 | type = "damage-type", 29 | name = "acid" 30 | }, 31 | { 32 | type = "damage-type", 33 | name = "electric" 34 | } 35 | } 36 | ) 37 | -------------------------------------------------------------------------------- /base/prototypes/demo.lua: -------------------------------------------------------------------------------- 1 | -- Prototypes specific to demo 2 | -- Do not delete this file, it's required to make the base game CRC different between demo and retail. 3 | -------------------------------------------------------------------------------- /base/prototypes/entity/assemblerpipes.lua: -------------------------------------------------------------------------------- 1 | function assembler2pipepictures() 2 | return 3 | { 4 | north = 5 | { 6 | filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-N.png", 7 | priority = "extra-high", 8 | width = 71, 9 | height = 38, 10 | shift = util.by_pixel(2.25, 13.5), 11 | scale = 0.5 12 | }, 13 | east = 14 | { 15 | filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-E.png", 16 | priority = "extra-high", 17 | width = 42, 18 | height = 76, 19 | shift = util.by_pixel(-24.5, 1), 20 | scale = 0.5 21 | }, 22 | south = 23 | { 24 | filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-S.png", 25 | priority = "extra-high", 26 | width = 88, 27 | height = 61, 28 | shift = util.by_pixel(0, -31.25), 29 | scale = 0.5 30 | }, 31 | west = 32 | { 33 | filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-W.png", 34 | priority = "extra-high", 35 | width = 39, 36 | height = 73, 37 | shift = util.by_pixel(25.75, 1.25), 38 | scale = 0.5 39 | } 40 | } 41 | end 42 | 43 | function assembler3pipepictures() 44 | return 45 | { 46 | north = 47 | { 48 | filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-N.png", 49 | priority = "extra-high", 50 | width = 71, 51 | height = 38, 52 | shift = util.by_pixel(2.25, 13.5), 53 | scale = 0.5 54 | }, 55 | east = 56 | { 57 | filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-E.png", 58 | priority = "extra-high", 59 | width = 42, 60 | height = 76, 61 | shift = util.by_pixel(-24.5, 1), 62 | scale = 0.5 63 | }, 64 | south = 65 | { 66 | filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-S.png", 67 | priority = "extra-high", 68 | width = 88, 69 | height = 61, 70 | shift = util.by_pixel(0, -31.25), 71 | scale = 0.5 72 | }, 73 | west = 74 | { 75 | filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-W.png", 76 | priority = "extra-high", 77 | width = 39, 78 | height = 73, 79 | shift = util.by_pixel(25.75, 1.25), 80 | scale = 0.5 81 | } 82 | } 83 | end 84 | -------------------------------------------------------------------------------- /base/prototypes/entity/biter-ai-settings.lua: -------------------------------------------------------------------------------- 1 | return { destroy_when_commands_fail = true, allow_try_return_to_spawner = true } 2 | -------------------------------------------------------------------------------- /base/prototypes/entity/cargo-hatch.lua: -------------------------------------------------------------------------------- 1 | local sounds = require("__base__.prototypes.entity.sounds") 2 | 3 | local function placeholder_shared_bay_hatch_animation() 4 | return 5 | { 6 | layers = 7 | { 8 | util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/shared-bay-hatch", 9 | { 10 | priority = "high", 11 | frame_count = 21, 12 | animation_speed = 0.5, 13 | scale = 0.5, 14 | shift = util.by_pixel(11, 16), 15 | run_mode = "forward-then-backward" 16 | }), 17 | util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/shared-bay-hatch-shadow", 18 | { 19 | priority = "high", 20 | frame_count = 21, 21 | scale = 0.5, 22 | shift = util.by_pixel(11, 16), 23 | run_mode = "forward-then-backward", 24 | draw_as_shadow = true, 25 | }), 26 | util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/shared-bay-hatch-emission", 27 | { 28 | priority = "high", 29 | frame_count = 3, 30 | scale = 0.5, 31 | shift = util.by_pixel(11, 16), 32 | run_mode = "forward-then-backward", 33 | draw_as_glow = true, 34 | blend_mode = "additive", 35 | frame_sequence = {1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3} 36 | }), 37 | } 38 | } 39 | end 40 | 41 | local function bay_pod_shadow_offset() 42 | return {1, 1.3} 43 | end 44 | local function hub_pod_shadow_offset() 45 | return {2, 2.5} 46 | end 47 | 48 | function hub_cargo_hatch_in(hatch_offset) 49 | return 50 | { 51 | hatch_graphics = placeholder_shared_bay_hatch_animation(), 52 | offset = hatch_offset, 53 | pod_shadow_offset = hub_pod_shadow_offset(); 54 | cargo_unit_entity_to_spawn = "", 55 | receiving_cargo_units = {"cargo-pod"} 56 | } 57 | end 58 | 59 | function hub_cargo_hatch_out(hatch_offset) 60 | return 61 | { 62 | hatch_graphics = placeholder_shared_bay_hatch_animation(), 63 | offset = hatch_offset, 64 | pod_shadow_offset = hub_pod_shadow_offset(); 65 | cargo_unit_entity_to_spawn = "cargo-pod", 66 | receiving_cargo_units = {} 67 | } 68 | end 69 | 70 | function planet_upper_hatch(hatch_offset, slice_offset, travel_offset, sky_slice_offset, hatch_illumination_index) 71 | return 72 | { 73 | hatch_graphics = nil, 74 | offset = hatch_offset, 75 | slice_height = slice_offset or 1, 76 | sky_slice_height = sky_slice_offset or -1, 77 | travel_height = travel_offset or 1, 78 | pod_shadow_offset = hub_pod_shadow_offset(); 79 | illumination_graphic_index = hatch_illumination_index, 80 | cargo_unit_entity_to_spawn = "", 81 | receiving_cargo_units = {"cargo-pod"} 82 | } 83 | end 84 | 85 | function silo_cargo_hatch(hatch_offset) 86 | return 87 | { 88 | hatch_graphics = nil, 89 | offset = hatch_offset, 90 | pod_shadow_offset = {0, 0}; --flush with ground 91 | cargo_unit_entity_to_spawn = "", --silo defines the lift pod 92 | receiving_cargo_units = {} 93 | } 94 | end 95 | -------------------------------------------------------------------------------- /base/prototypes/entity/enemy-autoplace-utils.lua: -------------------------------------------------------------------------------- 1 | local control_name = "enemy-base" 2 | 3 | local function enemy_autoplace(params) 4 | return 5 | { 6 | control = params.control or control_name, 7 | order = params.order or "b[enemy]-misc", 8 | force = "enemy", 9 | probability_expression = params.probability_expression, 10 | richness_expression = 1 11 | } 12 | end 13 | 14 | local function enemy_spawner_autoplace(probability_expression) 15 | return enemy_autoplace{ 16 | probability_expression = probability_expression, 17 | order = "b[enemy]-a[spawner]" 18 | } 19 | end 20 | 21 | local function enemy_worm_autoplace(probability_expression) 22 | return enemy_autoplace{ 23 | probability_expression = "(" .. probability_expression .. ") * (1 - no_enemies_mode)", 24 | order = "b[enemy]-b[worm]", 25 | } 26 | end 27 | 28 | return 29 | { 30 | control_name = control_name, 31 | enemy_autoplace = enemy_autoplace, 32 | enemy_spawner_autoplace = enemy_spawner_autoplace, 33 | enemy_worm_autoplace = enemy_worm_autoplace 34 | } 35 | -------------------------------------------------------------------------------- /base/prototypes/entity/giga-cargo-hatch.lua: -------------------------------------------------------------------------------- 1 | local sounds = require ("__base__.prototypes.entity.sounds") 2 | 3 | local function placeholder_planet_upper_hatch_animation_back() 4 | return 5 | { 6 | layers = 7 | { 8 | util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/planet-upper-hatch-back", 9 | { 10 | scale = 0.5, 11 | shift = {0, -0.5}, 12 | run_mode = "forward", 13 | frame_count = 20 14 | }), 15 | util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/shared-upper-hatch-shadow", 16 | { 17 | scale = 0.5, 18 | shift = {4,-0.5}, --util.by_pixel(128, 0) 19 | run_mode = "forward", 20 | draw_as_shadow = true, 21 | frame_count = 20 22 | }), 23 | util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/shared-upper-back-hatch-emission", 24 | { 25 | scale = 0.5, 26 | shift = {0, -0.5}, 27 | run_mode = "forward", 28 | draw_as_glow = true, 29 | blend_mode = "additive", 30 | frame_count = 20 31 | }), 32 | util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/planet-upper-front-hatch-emission", 33 | { 34 | scale = 0.5, 35 | shift = {0, -0.5}, 36 | run_mode = "forward", 37 | draw_as_glow = true, 38 | blend_mode = "additive", 39 | frame_count = 3, 40 | frame_sequence = {1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3} 41 | }) 42 | } 43 | } 44 | end 45 | 46 | local function placeholder_planet_upper_hatch_animation_front() 47 | return 48 | { 49 | layers = 50 | { 51 | util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/planet-upper-hatch-front", 52 | { 53 | scale = 0.5, 54 | shift = {0, -0.5}, 55 | run_mode = "forward", 56 | frame_count = 20 57 | }) 58 | } 59 | } 60 | end 61 | 62 | function planet_upper_giga_hatch(covered) 63 | return 64 | { 65 | hatch_graphics_back = placeholder_planet_upper_hatch_animation_back(), 66 | hatch_render_layer_back = "above-inserters", 67 | hatch_graphics_front = placeholder_planet_upper_hatch_animation_front(), 68 | hatch_render_layer_front = "above-inserters", 69 | covered_hatches = covered, 70 | opening_sound = sounds.upper_giga_hatch_opening_sound, 71 | closing_sound = sounds.upper_giga_hatch_closing_sound, 72 | } 73 | end 74 | 75 | function platform_upper_giga_hatch(covered) 76 | return 77 | { 78 | hatch_graphics_back = placeholder_platform_upper_hatch_animation_back(), 79 | hatch_render_layer_back = "above-inserters", 80 | hatch_graphics_front = placeholder_platform_upper_hatch_animation_front(), 81 | hatch_render_layer_front = "above-inserters", 82 | covered_hatches = covered, 83 | opening_sound = sounds.upper_giga_hatch_opening_sound, 84 | closing_sound = sounds.upper_giga_hatch_closing_sound, 85 | } 86 | end 87 | 88 | function platform_lower_giga_hatch(covered) 89 | return 90 | { 91 | hatch_graphics_back = placeholder_lower_upper_hatch_animation_back(), 92 | hatch_render_layer_back = "cargo-hatch", 93 | hatch_graphics_front = placeholder_lower_upper_hatch_animation_front(), 94 | hatch_render_layer_front = "cargo-hatch", 95 | covered_hatches = covered, 96 | opening_sound = sounds.lower_giga_hatch_opening_sound, 97 | closing_sound = sounds.lower_giga_hatch_closing_sound, 98 | } 99 | end 100 | -------------------------------------------------------------------------------- /base/prototypes/entity/laser-sounds.lua: -------------------------------------------------------------------------------- 1 | function make_laser_sounds() return sound_variations("__base__/sound/fight/laser", 3) end 2 | -------------------------------------------------------------------------------- /base/prototypes/entity/pipecovers.lua: -------------------------------------------------------------------------------- 1 | pipecoverspictures = function() 2 | return 3 | { 4 | north = 5 | { 6 | layers = 7 | { 8 | { 9 | filename = "__base__/graphics/entity/pipe-covers/pipe-cover-north.png", 10 | priority = "extra-high", 11 | width = 128, 12 | height = 128, 13 | scale = 0.5 14 | }, 15 | { 16 | filename = "__base__/graphics/entity/pipe-covers/pipe-cover-north-shadow.png", 17 | priority = "extra-high", 18 | width = 128, 19 | height = 128, 20 | scale = 0.5, 21 | draw_as_shadow = true 22 | } 23 | } 24 | }, 25 | east = 26 | { 27 | layers = 28 | { 29 | { 30 | filename = "__base__/graphics/entity/pipe-covers/pipe-cover-east.png", 31 | priority = "extra-high", 32 | width = 128, 33 | height = 128, 34 | scale = 0.5 35 | }, 36 | { 37 | filename = "__base__/graphics/entity/pipe-covers/pipe-cover-east-shadow.png", 38 | priority = "extra-high", 39 | width = 128, 40 | height = 128, 41 | scale = 0.5, 42 | draw_as_shadow = true 43 | } 44 | } 45 | }, 46 | south = 47 | { 48 | layers = 49 | { 50 | { 51 | filename = "__base__/graphics/entity/pipe-covers/pipe-cover-south.png", 52 | priority = "extra-high", 53 | width = 128, 54 | height = 128, 55 | scale = 0.5 56 | }, 57 | { 58 | filename = "__base__/graphics/entity/pipe-covers/pipe-cover-south-shadow.png", 59 | priority = "extra-high", 60 | width = 128, 61 | height = 128, 62 | scale = 0.5, 63 | draw_as_shadow = true 64 | } 65 | } 66 | }, 67 | west = 68 | { 69 | layers = 70 | { 71 | { 72 | filename = "__base__/graphics/entity/pipe-covers/pipe-cover-west.png", 73 | priority = "extra-high", 74 | width = 128, 75 | height = 128, 76 | scale = 0.5 77 | }, 78 | { 79 | filename = "__base__/graphics/entity/pipe-covers/pipe-cover-west-shadow.png", 80 | priority = "extra-high", 81 | width = 128, 82 | height = 128, 83 | scale = 0.5, 84 | draw_as_shadow = true 85 | } 86 | } 87 | } 88 | } 89 | end 90 | -------------------------------------------------------------------------------- /base/prototypes/entity/rocket-projectile-pictures.lua: -------------------------------------------------------------------------------- 1 | return { 2 | animation = function(tip_tint) 3 | return { 4 | layers = { 5 | util.sprite_load("__base__/graphics/entity/rocket/rocket", { 6 | scale = 0.5, 7 | repeat_count = 8, 8 | frame_count = 1, 9 | rotate_shift = true, 10 | priority = "high" 11 | }), 12 | util.sprite_load("__base__/graphics/entity/rocket/rocket-tinted-tip", { 13 | scale = 0.5, 14 | repeat_count = 8, 15 | frame_count = 1, 16 | rotate_shift = true, 17 | priority = "high", 18 | tint = tip_tint 19 | }), 20 | util.sprite_load("__base__/graphics/entity/rocket/rocket-lights", { 21 | blend_mode = "additive", 22 | draw_as_glow = true, 23 | scale = 0.5, 24 | frame_count = 8, 25 | rotate_shift = true, 26 | priority = "high", 27 | }), 28 | } 29 | } 30 | end, 31 | shadow = util.sprite_load("__base__/graphics/entity/rocket/rocket", { 32 | draw_as_shadow = true, 33 | scale = 0.5, 34 | frame_count = 1, 35 | rotate_shift = true, 36 | priority = "high" 37 | }), 38 | smoke = 39 | { 40 | { 41 | name = "smoke-fast", 42 | deviation = {0.15, 0.15}, 43 | frequency = 1, 44 | position = {0, 1}, 45 | starting_frame = 3, 46 | starting_frame_deviation = 5 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /base/prototypes/entity/smoke-animations.lua: -------------------------------------------------------------------------------- 1 | local smoke_animations = {} 2 | 3 | smoke_animations.trivial_smoke_fast = function(opts) 4 | local opts = opts or {} 5 | return 6 | { 7 | filename = "__base__/graphics/entity/smoke-fast/smoke-fast.png", 8 | priority = "high", 9 | width = 50, 10 | height = 50, 11 | frame_count = 16, 12 | animation_speed = opts.animation_speed or (16 / 60), 13 | scale = opts.scale, 14 | tint = opts.tint 15 | } 16 | end 17 | 18 | smoke_animations.trivial_smoke_animation = function(opts) 19 | local opts = opts or {} 20 | return 21 | { 22 | filename = "__base__/graphics/entity/smoke-fast/smoke-fast.png", 23 | priority = "high", 24 | width = 50, 25 | height = 50, 26 | frame_count = 16, 27 | animation_speed = opts.animation_speed or (16 / 60), 28 | scale = opts.scale, 29 | tint = opts.tint 30 | } 31 | end 32 | 33 | smoke_animations.trivial_nuke_smoke = function(opts) 34 | local opts = opts or {} 35 | local result = smoke_animations.trivial_smoke_animation(opts) 36 | 37 | result.duration = opts.duration or 600 38 | result.fade_in_duration = opts.fade_in_duration or 0 39 | result.fade_away_duration = opts.fade_away_duration or ((opts.duration or 600) - (opts.fade_in_duration or 0)) 40 | result.spread_duration = opts.spread_duration or 600 41 | result.start_scale = opts.start_scale or 0.20 42 | result.end_scale = opts.end_scale or 1.0 43 | return result; 44 | end 45 | 46 | smoke_animations.trivial_smoke = function(opts) 47 | return 48 | { 49 | type = "trivial-smoke", 50 | name = opts.name, 51 | duration = opts.duration or 600, 52 | fade_in_duration = opts.fade_in_duration or 0, 53 | fade_away_duration = opts.fade_away_duration or ((opts.duration or 600) - (opts.fade_in_duration or 0)), 54 | spread_duration = opts.spread_duration or 600, 55 | start_scale = opts.start_scale or 0.20, 56 | end_scale = opts.end_scale or 1.0, 57 | color = opts.color, 58 | cyclic = true, 59 | affected_by_wind = (opts.affected_by_wind == nil and true) or opts.affected_by_wind, 60 | render_layer = opts.render_layer, 61 | movement_slow_down_factor = opts.movement_slow_down_factor, 62 | animation = 63 | { 64 | width = 152, 65 | height = 120, 66 | line_length = 5, 67 | frame_count = 60, 68 | shift = {-0.53125, -0.4375}, 69 | priority = "high", 70 | animation_speed = 0.25, 71 | filename = "__base__/graphics/entity/smoke/smoke.png", 72 | flags = { "smoke" } 73 | } 74 | } 75 | end 76 | 77 | smoke_animations.trivial_fire_smoke = function(opts) 78 | return 79 | { 80 | type = "trivial-smoke", 81 | name = opts.name, 82 | duration = opts.duration or 600, 83 | fade_in_duration = opts.fade_in_duration or 0, 84 | fade_away_duration = opts.fade_away_duration or 600, 85 | spread_duration = opts.spread_duration or 600, 86 | start_scale = opts.start_scale or 0.20, 87 | end_scale = opts.end_scale or 1.0, 88 | color = opts.color, 89 | cyclic = true, 90 | affected_by_wind = (opts.affected_by_wind == nil and true) or opts.affected_by_wind, 91 | animation = opts.animation or 92 | { 93 | width = 152, 94 | height = 120, 95 | line_length = 5, 96 | frame_count = 60, 97 | shift = {-0.53125, -0.4375}, 98 | priority = "high", 99 | flags = { "smoke" }, 100 | animation_speed = 0.25, 101 | filename = "__base__/graphics/entity/smoke/smoke.png" 102 | }, 103 | glow_animation = opts.glow_animation, 104 | glow_fade_away_duration = opts.glow_fade_away_duration, 105 | vertical_speed_slowdown = opts.vertical_speed_slowdown 106 | } 107 | end 108 | 109 | return smoke_animations 110 | -------------------------------------------------------------------------------- /base/prototypes/entity/spawner-animation.lua: -------------------------------------------------------------------------------- 1 | 2 | 3 | function spawner_idle_animation(variation, tint, captured) 4 | return 5 | { 6 | layers = 7 | { 8 | util.sprite_load("__base__/graphics/entity/spawner/spawner-idle", 9 | { 10 | frame_count = 7, 11 | scale = 0.5, 12 | animation_speed = 0.18, 13 | run_mode = "forward-then-backward", 14 | y = variation * 376 * 2, 15 | allow_forced_downscale = true, 16 | surface = "nauvis", 17 | usage = "enemy" 18 | } 19 | ), 20 | util.sprite_load("__base__/graphics/entity/spawner/spawner-idle-mask", 21 | { 22 | frame_count = 7, 23 | scale = 0.5, 24 | animation_speed = 0.18, 25 | run_mode = "forward-then-backward", 26 | tint = tint, 27 | flags = { "mask" }, 28 | y = variation * 230 * 2, 29 | allow_forced_downscale = true, 30 | surface = "nauvis", 31 | usage = "enemy" 32 | } 33 | ), 34 | util.sprite_load("__base__/graphics/entity/spawner/spawner-idle-shadow", 35 | { 36 | frame_count = 7, 37 | scale = 0.5, 38 | animation_speed = 0.18, 39 | run_mode = "forward-then-backward", 40 | draw_as_shadow = true, 41 | y = variation * 358 * 2, 42 | allow_forced_downscale = true, 43 | surface = "nauvis", 44 | usage = "enemy" 45 | } 46 | ) 47 | } 48 | } 49 | end 50 | 51 | function spawner_die_animation(variation, tint) 52 | return 53 | { 54 | layers = 55 | { 56 | util.sprite_load("__base__/graphics/entity/spawner/spawner-death-v" .. tostring(variation+1), 57 | { 58 | frame_count = 18, 59 | direction_count = 1, 60 | scale = 0.5, 61 | flags = {"corpse-decay"}, 62 | allow_forced_downscale = true, 63 | surface = "nauvis", 64 | usage = "enemy" 65 | } 66 | ), 67 | util.sprite_load("__base__/graphics/entity/spawner/spawner-death-mask-v" .. tostring(variation+1), 68 | { 69 | frame_count = 18, 70 | direction_count = 1, 71 | scale = 0.5, 72 | tint = tint, 73 | flags = {"corpse-decay"}, 74 | allow_forced_downscale = true, 75 | surface = "nauvis", 76 | usage = "enemy" 77 | 78 | } 79 | ), 80 | util.sprite_load("__base__/graphics/entity/spawner/spawner-death-shadow-v" .. tostring(variation+1), 81 | { 82 | draw_as_shadow = true, 83 | frame_count = 18, 84 | direction_count = 1, 85 | scale = 0.5, 86 | allow_forced_downscale = true, 87 | surface = "nauvis", 88 | usage = "enemy" 89 | } 90 | ), 91 | } 92 | } 93 | end 94 | 95 | function spawner_decay_animation(variation, tint) 96 | return 97 | { 98 | layers = 99 | { 100 | util.sprite_load("__base__/graphics/entity/spawner/spawner-decay-v" .. tostring(variation+1), 101 | { 102 | frame_count = 24, 103 | direction_count = 1, 104 | scale = 0.5, 105 | flags = {"corpse-decay"}, 106 | allow_forced_downscale = true, 107 | surface = "nauvis", 108 | usage = "corpse-decay" 109 | } 110 | ), 111 | util.sprite_load("__base__/graphics/entity/spawner/spawner-decay-mask-v" .. tostring(variation+1), 112 | { 113 | frame_count = 24, 114 | direction_count = 1, 115 | scale = 0.5, 116 | tint = tint, 117 | flags = {"corpse-decay"}, 118 | allow_forced_downscale = true, 119 | surface = "nauvis", 120 | usage = "corpse-decay" 121 | } 122 | ), 123 | util.sprite_load("__base__/graphics/entity/spawner/spawner-decay-shadow-v" .. tostring(variation+1), 124 | { 125 | draw_as_shadow = true, 126 | frame_count = 24, 127 | direction_count = 1, 128 | scale = 0.5, 129 | allow_forced_downscale = true, 130 | surface = "nauvis", 131 | usage = "corpse-decay" 132 | } 133 | ), 134 | } 135 | } 136 | end 137 | -------------------------------------------------------------------------------- /base/prototypes/equipment-grid.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "equipment-grid", 5 | name = "small-equipment-grid", 6 | width = 5, 7 | height = 5, 8 | equipment_categories = {"armor"} 9 | }, 10 | { 11 | type = "equipment-grid", 12 | name = "medium-equipment-grid", 13 | width = 6, 14 | height = 8, 15 | equipment_categories = {"armor"} 16 | }, 17 | { 18 | type = "equipment-grid", 19 | name = "large-equipment-grid", 20 | width = 10, 21 | height = 10, 22 | equipment_categories = {"armor"} 23 | }, 24 | { 25 | type = "equipment-grid", 26 | name = "spidertron-equipment-grid", 27 | width = 10, 28 | height = 6, 29 | equipment_categories = {"armor"} 30 | } 31 | } 32 | ) 33 | -------------------------------------------------------------------------------- /base/prototypes/factoriopedia-util.lua: -------------------------------------------------------------------------------- 1 | make_resource = function(name) 2 | return 3 | [[ 4 | game.simulation.camera_position = {0, -0.5} 5 | 6 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-2.5, -2.5}, amount = 50} 7 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-1.5, -2.5}, amount = 100} 8 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-0.5, -2.5}, amount = 500} 9 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {1.5, -2.5}, amount = 150} 10 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {0.5, -2.5}, amount = 200} 11 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {2.5, -2.5}, amount = 50} 12 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-4.5, -0.5}, amount = 50} 13 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-3.5, -1.5}, amount = 50} 14 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-3.5, -0.5}, amount = 150} 15 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-2.5, -1.5}, amount = 150} 16 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-2.5, -0.5}, amount = 650} 17 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-0.5, -0.5}, amount = 1000} 18 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-1.5, -0.5}, amount = 850} 19 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-0.5, -1.5}, amount = 800} 20 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-1.5, -1.5}, amount = 650} 21 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {1.5, -1.5}, amount = 450} 22 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {1.5, -0.5}, amount = 1000} 23 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {0.5, -0.5}, amount = 1050} 24 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {0.5, -1.5}, amount = 850} 25 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {3.5, -1.5}, amount = 50} 26 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {3.5, -0.5}, amount = 250} 27 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {2.5, -1.5}, amount = 250} 28 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {2.5, -0.5}, amount = 500} 29 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {4.5, -0.5}, amount = 50} 30 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-2.5, 1.5}, amount = 50} 31 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-3.5, 0.5}, amount = 50} 32 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-2.5, 0.5}, amount = 200} 33 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-1.5, 1.5}, amount = 150} 34 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-0.5, 1.5}, amount = 550} 35 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-0.5, 0.5}, amount = 850} 36 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-1.5, 0.5}, amount = 700} 37 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {1.5, 1.5}, amount = 250} 38 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {0.5, 1.5}, amount = 300} 39 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {1.5, 0.5}, amount = 550} 40 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {0.5, 0.5}, amount = 1000} 41 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {3.5, 1.5}, amount = 50} 42 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {2.5, 1.5}, amount = 150} 43 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {3.5, 0.5}, amount = 150} 44 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {2.5, 0.5}, amount = 300} 45 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {4.5, 0.5}, amount = 50} 46 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {-0.5, 2.5}, amount = 50} 47 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {1.5, 2.5}, amount = 50} 48 | game.surfaces[1].create_entity{name = "]]..name..[[", position = {2.5, 2.5}, amount = 50} 49 | ]] 50 | end 51 | -------------------------------------------------------------------------------- /base/prototypes/fluid.lua: -------------------------------------------------------------------------------- 1 | function create_fluid_parameter(number) 2 | data:extend( 3 | { 4 | { 5 | type = "fluid", 6 | name = "parameter-" .. number, 7 | subgroup = "parameters", 8 | localised_name = {"parameter-x", tostring(number)}, 9 | parameter = true, 10 | auto_barrel = false, 11 | default_temperature = 25, 12 | base_color = {1, 1, 0}, 13 | flow_color = {1, 1, 0}, 14 | icon = "__base__/graphics/icons/parameter/parameter-" .. number .. ".png", 15 | order = "a" 16 | } 17 | }) 18 | end 19 | 20 | for n = 0, 9 do 21 | create_fluid_parameter(n) 22 | end 23 | 24 | data:extend( 25 | { 26 | { 27 | type = "fluid", 28 | name = "water", 29 | subgroup = "fluid", 30 | default_temperature = 15, 31 | max_temperature = 100, 32 | heat_capacity = "2kJ", 33 | base_color = {0, 0.34, 0.6}, 34 | flow_color = {0.7, 0.7, 0.7}, 35 | icon = "__base__/graphics/icons/fluid/water.png", 36 | order = "a[fluid]-a[water]-a[water]" 37 | }, 38 | { 39 | type = "fluid", 40 | name = "steam", 41 | subgroup = "fluid", 42 | default_temperature = 15, 43 | max_temperature = 5000, 44 | heat_capacity = "0.2kJ", 45 | icon = "__base__/graphics/icons/fluid/steam.png", 46 | base_color = {0.5, 0.5, 0.5}, 47 | flow_color = {1.0, 1.0, 1.0}, 48 | order = "a[fluid]-a[water]-b[steam]", 49 | gas_temperature = 15, 50 | auto_barrel = false 51 | }, 52 | { 53 | type = "fluid", 54 | name = "sulfuric-acid", 55 | subgroup = "fluid", 56 | default_temperature = 25, 57 | base_color = {0.75, 0.65, 0.1}, 58 | flow_color = {0.7, 1, 0.1}, 59 | icon = "__base__/graphics/icons/fluid/sulfuric-acid.png", 60 | order = "a[fluid]-b[oil]-f[sulfuric-acid]" 61 | }, 62 | { 63 | type = "fluid", 64 | name = "crude-oil", 65 | subgroup = "fluid", 66 | default_temperature = 25, 67 | base_color = {0, 0, 0}, 68 | flow_color = {0.5, 0.5, 0.5}, 69 | icon = "__base__/graphics/icons/fluid/crude-oil.png", 70 | order = "a[fluid]-b[oil]-a[crude-oil]" 71 | }, 72 | 73 | { 74 | type = "fluid", 75 | name = "heavy-oil", 76 | subgroup = "fluid", 77 | default_temperature = 25, 78 | base_color = {0.5, 0.13, 0}, 79 | flow_color = {0.85, 0.6, 0.3}, 80 | icon = "__base__/graphics/icons/fluid/heavy-oil.png", 81 | order = "a[fluid]-b[oil]-d[heavy-oil]" 82 | }, 83 | 84 | { 85 | type = "fluid", 86 | name = "light-oil", 87 | subgroup = "fluid", 88 | default_temperature = 25, 89 | base_color = {0.57, 0.33, 0}, 90 | flow_color = {1, 0.73, 0.07}, 91 | icon = "__base__/graphics/icons/fluid/light-oil.png", 92 | order = "a[fluid]-b[oil]-c[light-oil]" 93 | }, 94 | 95 | { 96 | type = "fluid", 97 | name = "petroleum-gas", 98 | subgroup = "fluid", 99 | default_temperature = 25, 100 | base_color = {0.3, 0.1, 0.3}, 101 | flow_color = {0.8, 0.8, 0.8}, 102 | icon = "__base__/graphics/icons/fluid/petroleum-gas.png", 103 | order = "a[fluid]-b[oil]-b[petroleum-gas]" 104 | }, 105 | 106 | { 107 | type = "fluid", 108 | name = "lubricant", 109 | subgroup = "fluid", 110 | default_temperature = 25, 111 | base_color = {0.15, 0.32, 0.03}, 112 | flow_color = {0.43, 0.75, 0.31}, 113 | icon = "__base__/graphics/icons/fluid/lubricant.png", 114 | order = "a[fluid]-b[oil]-e[lubricant]" 115 | } 116 | }) 117 | -------------------------------------------------------------------------------- /base/prototypes/impact-deliver-category.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "impact-category", 5 | name = "default" 6 | }, 7 | { 8 | type = "impact-category", 9 | name = "wood" 10 | }, 11 | { 12 | type = "impact-category", 13 | name = "tree" 14 | }, 15 | { 16 | type = "impact-category", 17 | name = "metal" 18 | }, 19 | { 20 | type = "impact-category", 21 | name = "metal-large" 22 | }, 23 | { 24 | type = "impact-category", 25 | name = "organic" 26 | }, 27 | { 28 | type = "impact-category", 29 | name = "glass" 30 | }, 31 | { 32 | type = "impact-category", 33 | name = "stone" 34 | }, 35 | { 36 | type = "deliver-category", 37 | name = "bullet" 38 | }, 39 | { 40 | type = "deliver-category", 41 | name = "vehicle" 42 | } 43 | }) 44 | -------------------------------------------------------------------------------- /base/prototypes/item-tints.lua: -------------------------------------------------------------------------------- 1 | item_tints = 2 | { 3 | iron_rust = { 1.0, 0.95, 0.9, 1.0 }, 4 | plastic = { 0.92, 0.92, 0.97, 1.0 }, 5 | bluish_concrete = { 0.92, 0.92, 0.97, 1.0 }, 6 | bluish_science = { 0.92, 0.97, 0.97, 1.0 }, 7 | organic_green = { 0.92, 0.97, 0.92, 1.0 }, 8 | yellowing_coal = { 0.85, 0.85, 0.70, 1.0 }, --strong tint for very dark black items 9 | ice_blue = { 0.9, 1.0, 1.0, 1.0 } 10 | } 11 | return item_tints 12 | -------------------------------------------------------------------------------- /base/prototypes/noise-expressions.lua: -------------------------------------------------------------------------------- 1 | data:extend{ 2 | { 3 | type = "noise-expression", 4 | name = "enemy_base_intensity", 5 | -- biter placement stops increasing in "intensity" after 75 chunks (2400 tiles) 6 | expression = "clamp(distance, 0, 2400) / 325" 7 | }, 8 | { 9 | type = "noise-expression", 10 | name = "enemy_base_radius", 11 | expression = "sqrt(var('control:enemy-base:size')) * (15 + 4 * enemy_base_intensity)" 12 | }, 13 | { 14 | type = "noise-expression", 15 | name = "enemy_base_frequency", 16 | -- bases_per_km2 = 10 + 3 * enemy_base_intensity 17 | expression = "(0.00001 + 0.000003 * enemy_base_intensity) * var('control:enemy-base:frequency')" 18 | }, 19 | { 20 | type = "noise-expression", 21 | name = "enemy_base_probability", 22 | expression = "spot_noise{x = x,\z 23 | y = y,\z 24 | density_expression = spot_quantity_expression * max(0, enemy_base_frequency),\z 25 | spot_quantity_expression = spot_quantity_expression,\z 26 | spot_radius_expression = spot_radius_expression,\z 27 | spot_favorability_expression = 1,\z 28 | seed0 = map_seed,\z 29 | seed1 = 123,\z 30 | region_size = 512,\z 31 | candidate_point_count = 100,\z 32 | hard_region_target_quantity = 0,\z 33 | basement_value = -1000,\z 34 | maximum_spot_basement_radius = 128} + \z 35 | (blob(1/8, 1) + blob(1/24, 1) + blob(1/64, 2) - 0.5) * spot_radius_expression / 150 * \z 36 | (0.1 + 0.9 * clamp(distance / 3000, 0, 1)) - 0.3 + min(0, 20 / starting_area_radius * distance - 20)", 37 | local_expressions = 38 | { 39 | spot_radius_expression = "max(0, enemy_base_radius)", 40 | spot_quantity_expression = "pi/90 * spot_radius_expression ^ 3" 41 | }, 42 | local_functions = 43 | { 44 | blob = 45 | { 46 | parameters = {"input_scale", "output_scale"}, 47 | expression = "basis_noise{x = x, y = y, seed0 = map_seed, seed1 = 123, input_scale = input_scale, output_scale = output_scale}" 48 | } 49 | } 50 | }, 51 | { 52 | type = "noise-function", 53 | name = "enemy_autoplace_base", 54 | parameters = {"distance_factor", "seed"}, 55 | expression = "random_penalty{x = x + seed,\z 56 | y = y,\z 57 | source = min(enemy_base_probability * max(0, 1 + 0.002 * distance_factor * (-312 * distance_factor - starting_area_radius + distance)),\z 58 | 0.25 + distance_factor * 0.05),\z 59 | amplitude = 0.1}" 60 | }, 61 | { 62 | type = "noise-function", 63 | name = "expression_in_range_base", 64 | parameters = {"aux_from", "moisture_from", "aux_to", "moisture_to"}, 65 | expression = "expression_in_range(20, 1, aux, moisture, aux_from, moisture_from, aux_to, moisture_to)" 66 | }, 67 | { 68 | type = "noise-function", 69 | name = "water_base", 70 | parameters = {"max_elevation", "influence"}, 71 | expression = "if(max_elevation >= elevation, influence * min(max_elevation - elevation, 1), -inf)" 72 | }, 73 | { 74 | type = "noise-expression", 75 | name = "rock_noise", 76 | expression = "multioctave_noise{x = x,\z 77 | y = y,\z 78 | seed0 = map_seed,\z 79 | seed1 = 137,\z 80 | octaves = 4,\z 81 | persistence = 0.9,\z 82 | input_scale = 0.15 * var('control:rocks:frequency'),\z 83 | output_scale = 1} + 0.25 + 0.75 * (slider_rescale(control:rocks:size, 1.5) - 1)" 84 | }, 85 | { 86 | type = "noise-expression", 87 | name = "rock_density", 88 | expression = "rock_noise - max(0, 1.1 - distance / 32)" 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /base/prototypes/planet/planet-map-gen.lua: -------------------------------------------------------------------------------- 1 | local planet_map_gen = {} 2 | 3 | planet_map_gen.nauvis = function() 4 | return 5 | { 6 | aux_climate_control = true, 7 | moisture_climate_control = true, 8 | property_expression_names = 9 | { -- Warning: anything set here overrides any selections made in the map setup screen so the options do nothing. 10 | --cliff_elevation = "cliff_elevation_nauvis", 11 | --cliffiness = "cliffiness_nauvis", 12 | --elevation = "elevation_island" 13 | }, 14 | cliff_settings = 15 | { 16 | name = "cliff", 17 | control = "nauvis_cliff", 18 | cliff_smoothing = 0 19 | }, 20 | autoplace_controls = 21 | { 22 | ["iron-ore"] = {}, 23 | ["copper-ore"] = {}, 24 | ["stone"] = {}, 25 | ["coal"] = {}, 26 | ["uranium-ore"] = {}, 27 | ["crude-oil"] = {}, 28 | ["water"] = {}, 29 | ["trees"] = {}, 30 | ["enemy-base"] = {}, 31 | ["rocks"] = {}, 32 | ["starting_area_moisture"] = {}, 33 | ["nauvis_cliff"] = {} 34 | }, 35 | autoplace_settings = 36 | { 37 | ["tile"] = 38 | { 39 | settings = 40 | { 41 | ["grass-1"] = {}, 42 | ["grass-2"] = {}, 43 | ["grass-3"] = {}, 44 | ["grass-4"] = {}, 45 | ["dry-dirt"] = {}, 46 | ["dirt-1"] = {}, 47 | ["dirt-2"] = {}, 48 | ["dirt-3"] = {}, 49 | ["dirt-4"] = {}, 50 | ["dirt-5"] = {}, 51 | ["dirt-6"] = {}, 52 | ["dirt-7"] = {}, 53 | ["sand-1"] = {}, 54 | ["sand-2"] = {}, 55 | ["sand-3"] = {}, 56 | ["red-desert-0"] = {}, 57 | ["red-desert-1"] = {}, 58 | ["red-desert-2"] = {}, 59 | ["red-desert-3"] = {}, 60 | ["water"] = {}, 61 | ["deepwater"] = {} 62 | } 63 | }, 64 | ["decorative"] = 65 | { 66 | settings = 67 | { 68 | ["brown-hairy-grass"] = {}, 69 | ["green-hairy-grass"] = {}, 70 | ["brown-carpet-grass"] = {}, 71 | ["green-carpet-grass"] = {}, 72 | ["green-small-grass"] = {}, 73 | ["green-asterisk"] = {}, 74 | ["brown-asterisk-mini"] = {}, 75 | ["green-asterisk-mini"] = {}, 76 | ["brown-asterisk"] = {}, 77 | ["red-asterisk"] = {}, 78 | ["dark-mud-decal"] = {}, 79 | ["light-mud-decal"] = {}, 80 | ["cracked-mud-decal"] = {}, 81 | ["red-desert-decal"] = {}, 82 | ["sand-decal"] = {}, 83 | ["sand-dune-decal"] = {}, 84 | ["green-pita"] = {}, 85 | ["red-pita"] = {}, 86 | ["green-croton"] = {}, 87 | ["red-croton"] = {}, 88 | ["green-pita-mini"] = {}, 89 | ["brown-fluff"] = {}, 90 | ["brown-fluff-dry"] = {}, 91 | ["green-desert-bush"] = {}, 92 | ["red-desert-bush"] = {}, 93 | ["white-desert-bush"] = {}, 94 | ["garballo-mini-dry"] = {}, 95 | ["garballo"] = {}, 96 | ["green-bush-mini"] = {}, 97 | ["medium-rock"] = {}, 98 | ["small-rock"] = {}, 99 | ["tiny-rock"] = {}, 100 | ["medium-sand-rock"] = {}, 101 | ["small-sand-rock"] = {} 102 | } 103 | }, 104 | ["entity"] = 105 | { 106 | settings = 107 | { 108 | ["iron-ore"] = {}, 109 | ["copper-ore"] = {}, 110 | ["stone"] = {}, 111 | ["coal"] = {}, 112 | ["crude-oil"] = {}, 113 | ["uranium-ore"] = {}, 114 | ["fish"] = {}, 115 | ["big-sand-rock"] = {}, 116 | ["huge-rock"] = {}, 117 | ["big-rock"] = {}, 118 | } 119 | } 120 | } 121 | } 122 | end 123 | 124 | return planet_map_gen 125 | -------------------------------------------------------------------------------- /base/prototypes/planet/planet.lua: -------------------------------------------------------------------------------- 1 | local planet_map_gen = require("prototypes/planet/planet-map-gen") 2 | local effects = require("__core__/lualib/surface-render-parameter-effects") 3 | local procession_graphic_catalogue_types = require("__base__/prototypes/planet/procession-graphic-catalogue-types") 4 | 5 | data:extend( 6 | { 7 | { 8 | type = "planet", 9 | name = "nauvis", 10 | icon = "__base__/graphics/icons/nauvis.png", 11 | starmap_icon = "__base__/graphics/icons/starmap-planet-nauvis.png", 12 | starmap_icon_size = 512, 13 | gravity_pull = 10, 14 | distance = 15, 15 | orientation = 0.275, 16 | magnitude = 1, 17 | order = "a[nauvis]", 18 | --subgroup = "planets", subgroup planets doesn't exist in base, so do we hide this somehow? 19 | map_seed_offset = 0, 20 | map_gen_settings = planet_map_gen.nauvis(), 21 | pollutant_type = "pollution", 22 | solar_power_in_space = 300, 23 | planet_procession_set = 24 | { 25 | arrival = {"default-b"}, 26 | departure = {"default-rocket-a"} 27 | }, 28 | surface_properties = 29 | { 30 | ["day-night-cycle"] = 7 * minute 31 | }, 32 | surface_render_parameters = 33 | { 34 | clouds = effects.default_clouds_effect_properties() 35 | }, 36 | persistent_ambient_sounds = 37 | { 38 | base_ambience = { filename = "__base__/sound/world/world_base_wind.ogg", volume = 0.3 }, 39 | wind = { filename = "__base__/sound/wind/wind.ogg", volume = 0.8 }, 40 | crossfade = 41 | { 42 | order = { "wind", "base_ambience" }, 43 | curve_type = "cosine", 44 | from = { control = 0.35, volume_percentage = 0.0 }, 45 | to = { control = 2, volume_percentage = 100.0 } 46 | } 47 | }, 48 | procession_graphic_catalogue = 49 | { 50 | { 51 | index = procession_graphic_catalogue_types.planet_hatch_emission_in_1, 52 | sprite = util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/planet-lower-hatch-pod-emission-A", 53 | { 54 | priority = "medium", 55 | draw_as_glow = true, 56 | blend_mode = "additive", 57 | scale = 0.5, 58 | shift = util.by_pixel(-16, 96) --32 x ({0.5, -3.5} + {0, 0.5}) 59 | }) 60 | }, 61 | { 62 | index = procession_graphic_catalogue_types.planet_hatch_emission_in_2, 63 | sprite = util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/planet-lower-hatch-pod-emission-B", 64 | { 65 | priority = "medium", 66 | draw_as_glow = true, 67 | blend_mode = "additive", 68 | scale = 0.5, 69 | shift = util.by_pixel(-64, 96) --32 x ({2, -3.5} + {0, 0.5}) 70 | }) 71 | }, 72 | { 73 | index = procession_graphic_catalogue_types.planet_hatch_emission_in_3, 74 | sprite = util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/planet-lower-hatch-pod-emission-C", 75 | { 76 | priority = "medium", 77 | draw_as_glow = true, 78 | blend_mode = "additive", 79 | scale = 0.5, 80 | shift = util.by_pixel(-40, 64) --32 x ({1.25, -2.5} + {0, 0.5}) 81 | }) 82 | } 83 | } 84 | } 85 | }) 86 | -------------------------------------------------------------------------------- /base/prototypes/planet/procession-audio-catalogue-types.lua: -------------------------------------------------------------------------------- 1 | local procession_audio_catalogue_types = {} 2 | procession_audio_catalogue_types.pod_reentry_flames = 100 3 | procession_audio_catalogue_types.pod_wings = 101 4 | procession_audio_catalogue_types.pod_ground_land = 102 5 | procession_audio_catalogue_types.pod_thruster_burst_1 = 201 6 | procession_audio_catalogue_types.pod_thruster_burst_2 = 202 7 | procession_audio_catalogue_types.pod_thruster_burst_3 = 203 8 | procession_audio_catalogue_types.pod_thruster_burst_4 = 204 9 | procession_audio_catalogue_types.rocket_claws_open = 300 10 | return procession_audio_catalogue_types 11 | -------------------------------------------------------------------------------- /base/prototypes/planet/procession-style.lua: -------------------------------------------------------------------------------- 1 | local procession_style = {} 2 | procession_style.default = 0 3 | procession_style.pod_left = 1 4 | procession_style.pod_right = 2 5 | procession_style.rocket_left = 3 6 | procession_style.rocket_right = 4 7 | procession_style.platform_to_debug = 42 8 | procession_style.pod_left_generic = 10 9 | procession_style.pod_right_generic = 11 10 | return procession_style 11 | -------------------------------------------------------------------------------- /base/prototypes/planet/surface-property.lua: -------------------------------------------------------------------------------- 1 | data:extend{ 2 | { 3 | type = "surface-property", 4 | name = "gravity", 5 | default_value = 10 6 | }, 7 | { 8 | type = "surface-property", 9 | name = "pressure", 10 | default_value = 1000 11 | }, 12 | { 13 | type = "surface-property", 14 | name = "magnetic-field", 15 | default_value = 90 16 | }, 17 | { 18 | type = "surface-property", 19 | name = "solar-power", 20 | default_value = 100 21 | }, 22 | { 23 | type = "surface-property", 24 | name = "day-night-cycle", 25 | is_time = true, 26 | default_value = 300 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /base/prototypes/pollution.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "airborne-pollutant", 5 | name = "pollution", 6 | chart_color = {r = 140, g = 0, b = 0, a = 149}, 7 | icon = 8 | { 9 | filename = "__core__/graphics/icons/mip/side-map-menu-buttons.png", 10 | priority = "high", 11 | size = 64, 12 | mipmap_count = 2, 13 | y = 3 * 64, 14 | flags = {"gui-icon"} 15 | }, 16 | affects_evolution = true, 17 | affects_water_tint = true, 18 | } 19 | }) 20 | -------------------------------------------------------------------------------- /base/prototypes/tile/tile-collision-masks.lua: -------------------------------------------------------------------------------- 1 | local tile_collision_masks = {} 2 | 3 | tile_collision_masks.out_of_map = function() 4 | return 5 | {layers={ 6 | ground_tile=true, 7 | water_tile=true, 8 | resource=true, 9 | floor=true, 10 | item=true, 11 | object=true, 12 | player=true, 13 | doodad=true, 14 | out_of_map=true 15 | }} 16 | end 17 | 18 | tile_collision_masks.water = function() 19 | return 20 | {layers={ 21 | water_tile=true, 22 | resource=true, 23 | item=true, 24 | player=true, 25 | doodad=true, 26 | floor=true 27 | }} 28 | end 29 | 30 | tile_collision_masks.ammoniacal_ocean = function() 31 | return 32 | {layers={ 33 | water_tile=true, 34 | --resource=true, 35 | item=true, 36 | player=true, 37 | doodad=true, 38 | floor=true 39 | }} 40 | end 41 | 42 | tile_collision_masks.shallow_water = function() 43 | return 44 | {layers={ 45 | -- Character collides only with player-layer and train-layer, 46 | -- this can have any tile collision masks it doesn't matter for being walkable by character but not buildable. 47 | -- Having water-tile prevents placing paths, ground-tile prevents placing landfill. 48 | -- Not sure what other side effects could different combinations of tile masks cause. 49 | water_tile=true, 50 | --item=true, -- allow egg items in water 51 | resource=true, 52 | --object=true, 53 | floor=true 54 | --doodad=true 55 | }} 56 | end 57 | 58 | tile_collision_masks.ground = function() 59 | return 60 | {layers={ 61 | ground_tile=true 62 | }} 63 | end 64 | 65 | tile_collision_masks.lava = function() 66 | return 67 | {layers={ 68 | water_tile=true, 69 | item=true, 70 | resource=true, 71 | player=true, 72 | doodad=true, 73 | --object=true, 74 | lava_tile=true, 75 | rail=true -- to prevent rail supports from being buildable on lava, guarded by TEST(RailSupportOverTilesAssumptions) 76 | }} 77 | end 78 | 79 | tile_collision_masks.oil_ocean_shallow = function() 80 | return 81 | {layers={ -- allow only player, vehicles, and elevated rail pillars. No other structures, rail, belts, etc. 82 | water_tile=true, 83 | resource=true 84 | }} 85 | end 86 | 87 | tile_collision_masks.oil_ocean_deep = function() 88 | return 89 | {layers={ 90 | -- Same as above but with rail-support-layer. 91 | water_tile=true, 92 | resource=true, 93 | rail_support=true 94 | }} 95 | end 96 | 97 | tile_collision_masks.meltable_tile = function() 98 | return 99 | {layers={ 100 | ground_tile=true, 101 | meltable=true 102 | }} 103 | end 104 | 105 | return tile_collision_masks 106 | -------------------------------------------------------------------------------- /base/prototypes/tile/tile-pollution-values.lua: -------------------------------------------------------------------------------- 1 | return 2 | { 3 | out_of_map = { pollution = 0.0001 }, 4 | water = { pollution = 0.000025 }, 5 | grass = { pollution = 0.000018 }, 6 | dirt = { pollution = 0.000018 }, 7 | sand = { pollution = 0.000015 }, 8 | red_desert = { pollution = 0.000015 } 9 | } 10 | -------------------------------------------------------------------------------- /base/prototypes/trigger-target-types.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | -- "common" is internal target type (doesn't need to be defined, the game creates it) 4 | -- { 5 | -- type = "trigger-target-type", 6 | -- name = "common" 7 | -- }, 8 | 9 | { 10 | type = "trigger-target-type", 11 | name = "ground-unit" 12 | }, 13 | { 14 | type = "trigger-target-type", 15 | name = "flying-robot" 16 | } 17 | }) 18 | -------------------------------------------------------------------------------- /base/prototypes/tutorials.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "tutorial", 5 | name = "trains-stations", 6 | scenario = "trains-stations" 7 | }, 8 | { 9 | type = "tutorial", 10 | name = "trains-basic-signals", 11 | scenario = "trains-basic-signals" 12 | }, 13 | { 14 | type = "tutorial", 15 | name = "trains-advanced-signals", 16 | scenario = "trains-advanced-signals" 17 | }, 18 | { 19 | type = "tutorial", 20 | name = "stack-transfers", 21 | scenario = "stack-transfers" 22 | }, 23 | { 24 | type = "tutorial", 25 | name = "entity-transfers", 26 | scenario = "entity-transfers" 27 | } 28 | }) 29 | -------------------------------------------------------------------------------- /base/prototypes/utility-sprites.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "sprite", 5 | name = "tooltip-category-steam", 6 | filename = "__base__/graphics/icons/tooltips/tooltip-category-steam.png", 7 | priority = "extra-high-no-scale", 8 | width = 40, 9 | height = 40, 10 | flags = {"gui-icon"}, 11 | mipmap_count = 2, 12 | scale = 0.5 13 | }, 14 | { 15 | type = "sprite", 16 | name = "tooltip-category-water", 17 | filename = "__base__/graphics/icons/tooltips/tooltip-category-water.png", 18 | priority = "extra-high-no-scale", 19 | width = 40, 20 | height = 40, 21 | flags = {"gui-icon"}, 22 | mipmap_count = 2, 23 | scale = 0.5 24 | }, 25 | { 26 | type = "sprite", 27 | name = "tooltip-category-chemical", 28 | filename = "__base__/graphics/icons/tooltips/tooltip-category-chemical.png", 29 | priority = "extra-high-no-scale", 30 | width = 40, 31 | height = 40, 32 | flags = {"gui-icon"}, 33 | mipmap_count = 2, 34 | scale = 0.5 35 | }, 36 | { 37 | type = "sprite", 38 | name = "tooltip-category-nuclear", 39 | filename = "__base__/graphics/icons/tooltips/tooltip-category-nuclear.png", 40 | priority = "extra-high-no-scale", 41 | width = 40, 42 | height = 40, 43 | flags = {"gui-icon"}, 44 | mipmap_count = 2, 45 | scale = 0.5 46 | }, 47 | { 48 | type = "sprite", 49 | name = "tooltip-category-fuel", 50 | filename = "__base__/graphics/icons/tooltips/tooltip-category-water.png", 51 | priority = "extra-high-no-scale", 52 | width = 40, 53 | height = 40, 54 | flags = {"gui-icon"}, 55 | mipmap_count = 2, 56 | scale = 0.5 57 | } 58 | }) 59 | -------------------------------------------------------------------------------- /core/data.lua: -------------------------------------------------------------------------------- 1 | require("prototypes.fonts") 2 | require("prototypes.style") 3 | require("prototypes.utility-constants") 4 | require("prototypes.utility-sounds") 5 | require("prototypes.utility-sprites") 6 | require("prototypes.god-controller") 7 | require("prototypes.editor-controller") 8 | require("prototypes.spectator-controller") 9 | require("prototypes.remote-controller") 10 | require("prototypes.noise-functions") 11 | require("prototypes.noise-programs") 12 | require("prototypes.cursors") 13 | require("prototypes.unknown") 14 | require("prototypes.parameters") 15 | require("prototypes.burner-usage") 16 | -------------------------------------------------------------------------------- /core/info.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "name": "core", 4 | "title": "Core Factorio Data", 5 | "author": "Wube Software", 6 | "contact": "dev@factorio.com", 7 | "homepage": "https://www.factorio.com", 8 | "dependencies": [] 9 | } 10 | -------------------------------------------------------------------------------- /core/lualib/autoplace_utils.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | -- Add a list of autoplace peaks based on rectangles to the table ret. 4 | -- Rectangles is a table of rectangle specifications: 5 | -- {{max_temp, max_water}, {min_temp, min_water}, influence} 6 | -- temperatures range from 35 to -25 (°C), water from 0 to 1. 7 | -- the peak resulting from each rectangle has a preset influence 8 | -- within the rectangle and goes to zero after 5°C or 0.1 water level outside 9 | -- of the rectangle. 10 | -- Influence is optional and has default value of default_influence or 1. 11 | function M.peaks(rectangles, ret, default_influence) 12 | if rectangles == nil or #rectangles == 0 then 13 | return 14 | end 15 | 16 | for i, rect in ipairs(rectangles) do 17 | local temp_center = (rect[2][1] + rect[1][1]) / 2 18 | local temp_range = math.abs(rect[2][1] - rect[1][1]) / 2 19 | local water_top = math.max(rect[1][2], rect[2][2]) 20 | local water_center = (rect[2][2] + rect[1][2]) / 2 21 | local water_range = math.abs(rect[2][2] - rect[1][2]) / 2 22 | 23 | local influence = rect[3] or default_influence or 1 24 | 25 | ret[#ret + 1] = 26 | { 27 | influence = influence, 28 | richness_influence = 0, 29 | min_influence = 0, 30 | temperature_optimal = temp_center, 31 | temperature_range = temp_range, 32 | temperature_max_range = temp_range + 5, 33 | water_optimal = water_center, 34 | water_range = water_range, 35 | water_max_range = water_range + 0.1 36 | } 37 | end 38 | 39 | return ret 40 | end 41 | 42 | return M 43 | -------------------------------------------------------------------------------- /core/lualib/bonus-gui-ordering.lua: -------------------------------------------------------------------------------- 1 | bonus_gui_ordering = 2 | { 3 | ["character"] = "a", 4 | ["inserter"] = "b", 5 | ["stack_inserter"] = "c1", 6 | ["bulk_inserter"] = "c2", 7 | ["mining_productivity"] = "d", 8 | ["follower_robots"] = "e", 9 | ["train_braking_force"] = "f", 10 | ["research_speed"] = "g", 11 | ["beacon_distribution"] = "gg", 12 | ["worker_robots"] = "h", 13 | ["turret_attack"] = "i", 14 | ["laser"] = "j", 15 | ["artillery_range"] = "k", 16 | ["bullet"] = "l", 17 | ["flamethrower"] = "m", 18 | ["artillery-shell"] = "o", 19 | ["shotgun-shell"] = "p", 20 | ["cannon-shell"] = "q", 21 | ["beam"] = "r", 22 | ["grenade"] = "s", 23 | ["landmine"] = "t", 24 | ["rocket"] = "u", 25 | ["electric"] = "v", 26 | ["capsule"] = "x", 27 | ["melee"] = "y", 28 | ["biological"] = "z" 29 | } 30 | -------------------------------------------------------------------------------- /core/lualib/dataloader.lua: -------------------------------------------------------------------------------- 1 | local data_duplicate_checker = require("data-duplicate-checker") 2 | 3 | -- all the prototypes will be collected here 4 | data = {} 5 | -- raw data 6 | data.raw = {} 7 | -- this will be overwritten in the c++ based on whether we are in demo or not 8 | -- careful: using this flag to change the number prototypes that are created will make saves not load between demo/retail 9 | data.is_demo = false 10 | local table_string = "table" 11 | 12 | function data.extend(self, otherdata) 13 | -- if somebody calls data.extend{protoarray}, shift the arg over, so data.extend and data:extend are equivalent 14 | if self ~= data and otherdata == nil then 15 | otherdata = self 16 | end 17 | if type(otherdata) ~= table_string or #otherdata == 0 then 18 | error("Invalid prototype array " .. serpent.block(otherdata, {maxlevel= 1})) 19 | end 20 | 21 | for _, e in ipairs(otherdata) do 22 | 23 | if not e.type then 24 | error("Missing type in the following prototype definition " .. serpent.block(e)) 25 | end 26 | 27 | if not e.name then 28 | error("Missing name in the following prototype definition " .. serpent.block(e)) 29 | end 30 | 31 | local t = data.raw[e.type] 32 | if t == nil then 33 | t = {} 34 | data.raw[e.type] = t 35 | end 36 | 37 | data_duplicate_checker.check_for_duplicates(t, e) 38 | data_duplicate_checker.check_for_overwrites(t, e) 39 | t[e.name] = e 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /core/lualib/event_handler.lua: -------------------------------------------------------------------------------- 1 | 2 | local libraries = {} 3 | 4 | local setup_ran = false 5 | 6 | local register_remote_interfaces = function() 7 | --Sometimes, in special cases, on_init and on_load can be run at the same time. Only register events once in this case. 8 | if setup_ran then return end 9 | setup_ran = true 10 | 11 | for lib_name, lib in pairs (libraries) do 12 | if lib.add_remote_interface then 13 | lib.add_remote_interface() 14 | end 15 | 16 | if lib.add_commands then 17 | lib.add_commands() 18 | end 19 | end 20 | end 21 | 22 | local register_events = function() 23 | local all_events = {} 24 | local on_nth_tick = {} 25 | 26 | for lib_name, lib in pairs (libraries) do 27 | 28 | if lib.events then 29 | for k, handler in pairs (lib.events) do 30 | all_events[k] = all_events[k] or {} 31 | all_events[k][lib_name] = handler 32 | end 33 | end 34 | 35 | if lib.on_nth_tick then 36 | for n, handler in pairs (lib.on_nth_tick) do 37 | on_nth_tick[n] = on_nth_tick[n] or {} 38 | on_nth_tick[n][lib_name] = handler 39 | end 40 | end 41 | 42 | end 43 | 44 | for event, handlers in pairs (all_events) do 45 | local action = function(event) 46 | for k, handler in pairs (handlers) do 47 | handler(event) 48 | end 49 | end 50 | script.on_event(event, action) 51 | end 52 | 53 | for n, handlers in pairs (on_nth_tick) do 54 | local action = function(event) 55 | for k, handler in pairs (handlers) do 56 | handler(event) 57 | end 58 | end 59 | script.on_nth_tick(n, action) 60 | end 61 | 62 | end 63 | 64 | script.on_init(function() 65 | register_remote_interfaces() 66 | register_events() 67 | for k, lib in pairs (libraries) do 68 | if lib.on_init then 69 | lib.on_init() 70 | end 71 | end 72 | end) 73 | 74 | script.on_load(function() 75 | register_remote_interfaces() 76 | register_events() 77 | for k, lib in pairs (libraries) do 78 | if lib.on_load then 79 | lib.on_load() 80 | end 81 | end 82 | end) 83 | 84 | script.on_configuration_changed(function(data) 85 | for k, lib in pairs (libraries) do 86 | if lib.on_configuration_changed then 87 | lib.on_configuration_changed(data) 88 | end 89 | end 90 | end) 91 | 92 | local handler = {} 93 | 94 | handler.add_lib = function(lib) 95 | for k, current in pairs (libraries) do 96 | if current == lib then 97 | error("Trying to register same lib twice") 98 | end 99 | end 100 | table.insert(libraries, lib) 101 | end 102 | 103 | handler.add_libraries = function(libs) 104 | for k, lib in pairs (libs) do 105 | handler.add_lib(lib) 106 | end 107 | end 108 | 109 | return handler -------------------------------------------------------------------------------- /core/lualib/kill-score.lua: -------------------------------------------------------------------------------- 1 | local production_score = require("production-score") 2 | 3 | local default_prices = function() 4 | return 5 | { 6 | ["character"] = 2500, 7 | 8 | ["small-biter"] = 250, 9 | ["medium-biter"] = 1250, 10 | ["big-biter"] = 3500, 11 | ["behemoth-biter"] = 8000, 12 | 13 | ["small-spitter"] = 350, 14 | ["medium-spitter"] = 1400, 15 | ["big-spitter"] = 4000, 16 | ["behemoth-spitter"] = 10000, 17 | 18 | ["small-worm-turret"] = 500, 19 | ["medium-worm-turret"] = 1500, 20 | ["big-worm-turret"] = 4500, 21 | 22 | ["biter-spawner"] = 1000, 23 | ["spitter-spawner"] = 1500 24 | } 25 | end 26 | 27 | local get_total_kill_counts = function(kill_statistics) 28 | local produced = kill_statistics.input_counts 29 | local consumed = kill_statistics.output_counts 30 | for name, value in pairs (consumed) do 31 | if produced[name] then 32 | produced[name] = produced[name] - value 33 | else 34 | produced[name] = -value 35 | end 36 | end 37 | return produced 38 | end 39 | 40 | local get_entity_price = function(entity, item_prices) 41 | local price = math.huge 42 | local items_to_place_this = entity.items_to_place_this 43 | if not items_to_place_this then return end 44 | for name, item in pairs (items_to_place_this) do 45 | local item_price = item_prices[item.name] 46 | if item_price then 47 | item_price = item_price * item.count 48 | if item_price < price then 49 | price = item_price 50 | end 51 | end 52 | end 53 | if price == math.huge then return end 54 | return price 55 | end 56 | 57 | local kill_score = {} 58 | 59 | kill_score.generate_entity_prices = function(param) 60 | local param = param or {} 61 | local prices = param.prices or default_prices() 62 | local item_prices = param.item_prices or production_score.generate_price_list() 63 | local entities = prototypes.entity 64 | for name, entity in pairs (entities) do 65 | prices[name] = prices[name] or get_entity_price(entity, item_prices) 66 | end 67 | return prices 68 | end 69 | 70 | kill_score.get_kill_scores = function(price_list) 71 | local price_list = price_list or kill_score.generate_entity_prices() 72 | local scores = {} 73 | for k, force in pairs (game.forces) do 74 | local score = 0 75 | for name, value in pairs (get_total_kill_counts(force.kill_count_statistics)) do 76 | local price = price_list[name] 77 | if price then 78 | score = score + (price * value) 79 | end 80 | end 81 | scores[force.name] = math.floor(score) 82 | end 83 | return scores 84 | end 85 | 86 | kill_score.get_default_prices = function() 87 | return default_prices() 88 | end 89 | 90 | return kill_score -------------------------------------------------------------------------------- /core/lualib/meld.lua: -------------------------------------------------------------------------------- 1 | local util = require("util") 2 | local meld = {} 3 | 4 | meld.control_marker = {} -- empty but unique table used as a marker 5 | meld.control_handlers = {} 6 | 7 | meld.delete = function() 8 | return { marker = meld.control_marker, op = "delete"} 9 | end 10 | meld.control_handlers.delete = function(target, k, v) 11 | target[k] = nil 12 | end 13 | 14 | meld.overwrite = function(new) 15 | return { marker = meld.control_marker, op = "overwrite", data = new } 16 | end 17 | meld.control_handlers.overwrite = function(target, k, v) 18 | target[k] = util.copy(v.data) 19 | end 20 | 21 | meld.invoke = function(fct) 22 | return { marker = meld.control_marker, op = "invoke", fct = fct } 23 | end 24 | meld.control_handlers.invoke = function(target, k, v) 25 | target[k] = v.fct(target[k]) 26 | end 27 | 28 | meld.append = function(data) 29 | return { marker = meld.control_marker, op = "append", data = data } 30 | end 31 | meld.control_handlers.append = function(target, k, v) 32 | for _, to_append in pairs(v.data) do 33 | table.insert(target[k], util.copy(to_append)) 34 | end 35 | end 36 | 37 | -- recursive table merge but it reuses target table (does not deepcopy it). When target is not to be reused or more than 38 | -- 2 tables are to be merged, consider using util.merge. When there is conflict of 2 values, a value from the source will 39 | -- win overwriting the existing value. There are also control structures available for extra operations that would not 40 | -- be possible under normal merge rules 41 | meld.meld = function(target, source) 42 | for k,v in pairs(source) do 43 | if type(v) ~= "table" then 44 | target[k] = v 45 | elseif v.marker == meld.control_marker then 46 | meld.control_handlers[v.op](target, k, v) 47 | elseif target[k] and type(target[k]) == "table" then 48 | meld.meld(target[k], v) 49 | else 50 | target[k] = util.copy(v) 51 | end 52 | end 53 | return target 54 | end 55 | 56 | meld.__call = function(self, target, source) 57 | return meld.meld(target, source) 58 | end 59 | setmetatable(meld, meld) 60 | 61 | return meld 62 | -------------------------------------------------------------------------------- /core/lualib/mod-gui.lua: -------------------------------------------------------------------------------- 1 | local mod_gui = {} 2 | mod_gui.button_style = "mod_gui_button" 3 | mod_gui.frame_style = "non_draggable_frame" 4 | 5 | --[[ 6 | 7 | Hello script explorer, if you are looking to upgrade your mod to use the mod gui, its pretty simple. 8 | 9 | Typically you will have something like: 10 | player.gui.left.add{...} 11 | 12 | All you will need to do, is change it to: 13 | mod_gui.get_frame_flow(player).add{...} 14 | 15 | And for buttons its just the same: 16 | mod_gui.get_button_flow(player).add{...} 17 | 18 | It should be as simple as find and replace. 19 | 20 | Any other questions please feel free to ask on the modding help forum. 21 | 22 | ]] 23 | 24 | function mod_gui.get_button_flow(player) 25 | local gui = player.gui.top 26 | 27 | --legacy... 28 | if gui.mod_gui_button_flow then 29 | return gui.mod_gui_button_flow 30 | end 31 | 32 | local frame = gui.mod_gui_top_frame or gui.add{type = "frame", name = "mod_gui_top_frame", direction = "horizontal", style = "slot_window_frame"} 33 | return frame.mod_gui_inner_frame or frame.add{type = "frame", name = "mod_gui_inner_frame", style = "mod_gui_inside_deep_frame"} 34 | end 35 | 36 | function mod_gui.get_frame_flow(player) 37 | local gui = player.gui.left 38 | return gui.mod_gui_frame_flow or gui.add{type = "flow", name = "mod_gui_frame_flow", direction = "horizontal", style = "mod_gui_spacing_horizontal_flow"} 39 | end 40 | 41 | return mod_gui 42 | -------------------------------------------------------------------------------- /core/lualib/silo-script.lua: -------------------------------------------------------------------------------- 1 | local mod_gui = require("mod-gui") 2 | 3 | local script_data = 4 | { 5 | finished = {}, 6 | removed_old_gui = true, 7 | no_victory = false 8 | } 9 | 10 | local remove_old_frame = function(player) 11 | local gui = mod_gui.get_frame_flow(player) 12 | local frame = gui.silo_gui_frame 13 | if frame then frame.destroy() end 14 | end 15 | 16 | local remove_old_button = function(player) 17 | local button_flow = mod_gui.get_button_flow(player) 18 | local button = button_flow.silo_gui_sprite_button 19 | if button then button.destroy() end 20 | end 21 | 22 | local remove_old_gui = function() 23 | for k, player in pairs (game.players) do 24 | remove_old_frame(player) 25 | remove_old_button(player) 26 | end 27 | end 28 | 29 | local on_rocket_launched = function(event) 30 | if script_data.no_victory then return end 31 | 32 | local rocket = event.rocket 33 | if not (rocket and rocket.valid) then return end 34 | 35 | local force = rocket.force 36 | 37 | script_data.finished = script_data.finished or {} 38 | if script_data.finished[force.name] then 39 | return 40 | end 41 | 42 | script_data.finished[force.name] = true 43 | 44 | game.reset_game_state() 45 | game.set_game_state 46 | { 47 | game_finished = true, 48 | player_won = true, 49 | can_continue = true, 50 | victorious_force = force 51 | } 52 | 53 | end 54 | 55 | local add_remote_interface = function() 56 | if not remote.interfaces["silo_script"] then 57 | remote.add_interface("silo_script", 58 | { 59 | set_no_victory = function(bool) 60 | script_data.no_victory = bool 61 | end, 62 | get_no_victory = function() 63 | return script_data.no_victory 64 | end, 65 | }) 66 | end 67 | end 68 | add_remote_interface() 69 | 70 | local silo_script = {} 71 | 72 | silo_script.events = 73 | { 74 | [defines.events.on_rocket_launched] = on_rocket_launched 75 | } 76 | 77 | silo_script.on_configuration_changed = function() 78 | if not script_data.removed_old_gui then 79 | script_data.removed_old_gui = true 80 | script_data.tracked_items = nil 81 | remove_old_gui() 82 | log("Remove the old silo script GUI") 83 | end 84 | script_data.finished = script_data.finished or {} 85 | 86 | script_data.no_victory = storage.no_victory 87 | storage.no_victory = nil 88 | end 89 | 90 | silo_script.on_init = function() 91 | storage.silo_script = storage.silo_script or script_data 92 | end 93 | 94 | silo_script.on_load = function() 95 | script_data = storage.silo_script or script_data 96 | end 97 | 98 | silo_script.get_events = function() 99 | --legacy 100 | return silo_script.events 101 | end 102 | 103 | silo_script.add_remote_interface = function() 104 | --legacy 105 | add_remote_interface() 106 | end 107 | 108 | silo_script.add_commands = function() 109 | --legacy 110 | end 111 | 112 | return silo_script 113 | -------------------------------------------------------------------------------- /core/lualib/sound-util.lua: -------------------------------------------------------------------------------- 1 | function sound_variations(filename_string, variations, volume_parameter, modifiers_parameter) 2 | local result = {} 3 | for i = 1,variations do 4 | result[i] = { filename = filename_string .. "-" .. i .. ".ogg", volume = volume_parameter or 0.5 } 5 | if modifiers_parameter then 6 | result[i].modifiers = modifiers_parameter 7 | end 8 | end 9 | return result 10 | end 11 | 12 | function sound_variations_with_volume_variations(filename_string, variations, min_volume, max_volume, modifiers_parameter) 13 | local result = {} 14 | for i = 1,variations do 15 | result[i] = 16 | { 17 | filename = filename_string .. "-" .. i .. ".ogg", 18 | min_volume = min_volume or 0.5, 19 | max_volume = max_volume or 0.5 20 | } 21 | if modifiers_parameter then 22 | result[i].modifiers = modifiers_parameter 23 | end 24 | end 25 | return result 26 | end 27 | 28 | function make_sound_variations(parameters) 29 | local result = {} 30 | for i = 1, parameters.number_of_variations do 31 | result[i] = 32 | { 33 | filename = parameters.filename .. "-" .. i .. ".ogg", 34 | modifiers = parameters.modifiers, 35 | } 36 | 37 | if (parameters.volume) then 38 | result[i].volume = parameters.volume 39 | else 40 | result[i].min_volume = parameters.min_volume or 0.5 41 | result[i].max_volume = parameters.max_volume or 0.5 42 | end 43 | 44 | if (parameters.speed) then 45 | result[i].speed = parameters.speed 46 | else 47 | result[i].min_speed = parameters.min_speed or 1.0 48 | result[i].max_speed = parameters.max_speed or 1.0 49 | end 50 | end 51 | return result 52 | end 53 | 54 | function volume_multiplier(type_parameter, volume_multiplier_parameter) 55 | return { type = type_parameter, volume_multiplier = volume_multiplier_parameter } 56 | end 57 | 58 | function default_tile_sounds_advanced_volume_control() 59 | return 60 | { 61 | fades = 62 | { 63 | fade_in = 64 | { 65 | curve_type = "cosine", 66 | from = {control = 0.3, volume_percentage = 0.0}, 67 | to = {control = 0.6, volume_percentage = 100.0}, 68 | } 69 | } 70 | } 71 | end 72 | -------------------------------------------------------------------------------- /core/lualib/space-finish-script.lua: -------------------------------------------------------------------------------- 1 | local script_data = 2 | { 3 | finished = {}, 4 | victory_location = "solar-system-edge", 5 | no_victory = false 6 | } 7 | 8 | local on_space_platform_changed_state = function(event) 9 | if script_data.no_victory then return end 10 | 11 | if not script_data.victory_location then return end 12 | 13 | local platform = event.platform 14 | if not (platform and platform.valid) then return end 15 | 16 | local last_visited_location = platform.last_visited_space_location 17 | if not last_visited_location then return end 18 | if last_visited_location.name ~= script_data.victory_location then return end 19 | 20 | local force = platform.force 21 | if script_data.finished[force.name] then return end 22 | script_data.finished[force.name] = true 23 | 24 | game.reset_game_state() 25 | game.enable_galaxy_of_fame_button = true 26 | game.set_game_state 27 | { 28 | game_finished = true, 29 | player_won = true, 30 | can_continue = true, 31 | victorious_force = force 32 | } 33 | end 34 | 35 | remote.add_interface("space_finish_script", 36 | { 37 | set_victory_location = function(location) 38 | script_data.victory_location = location 39 | end, 40 | set_no_victory = function(bool) 41 | script_data.no_victory = bool 42 | end, 43 | get_no_victory = function() 44 | return script_data.no_victory 45 | end, 46 | }) 47 | 48 | local space_finish_script = {} 49 | 50 | space_finish_script.events = 51 | { 52 | [defines.events.on_space_platform_changed_state] = on_space_platform_changed_state 53 | } 54 | 55 | space_finish_script.on_configuration_changed = function() 56 | storage.space_finish_script = storage.space_finish_script or script_data 57 | 58 | if script_data.finished["player"] then 59 | game.enable_galaxy_of_fame_button = true 60 | end 61 | end 62 | 63 | space_finish_script.on_init = function() 64 | storage.space_finish_script = storage.space_finish_script or script_data 65 | end 66 | 67 | space_finish_script.on_load = function() 68 | script_data = storage.space_finish_script or script_data 69 | end 70 | 71 | return space_finish_script 72 | -------------------------------------------------------------------------------- /core/lualib/surface-render-parameter-effects.lua: -------------------------------------------------------------------------------- 1 | local effects = {} 2 | 3 | effects.default_clouds_effect_properties = 4 | function() 5 | return 6 | { 7 | shape_noise_texture = 8 | { 9 | filename = "__core__/graphics/clouds-noise.png", 10 | size = 2048 11 | }, 12 | detail_noise_texture = 13 | { 14 | filename = "__core__/graphics/clouds-detail-noise.png", 15 | size = 2048 16 | }, 17 | 18 | warp_sample_1 = { scale = 0.8 / 16 }, 19 | warp_sample_2 = { scale = 3.75 * 0.8 / 32, wind_speed_factor = 0 }, 20 | warped_shape_sample = { scale = 2 * 0.18 / 32 }, 21 | additional_density_sample = { scale = 1.5 * 0.18 / 32, wind_speed_factor = 1.77 }, 22 | detail_sample_1 = { scale = 1.709 / 32, wind_speed_factor = 0.2 / 1.709 }, 23 | detail_sample_2 = { scale = 2.179 / 32, wind_speed_factor = 0.2 / 2.179 }, 24 | 25 | scale = 1, 26 | movement_speed_multiplier = 0.75, 27 | opacity = 0.25, 28 | shape_warp_strength = 0.06, 29 | shape_warp_weight = 0.4, 30 | detail_sample_morph_duration = 256, 31 | } 32 | end 33 | 34 | effects.default_fog_effect_properties = 35 | function() 36 | return 37 | { 38 | shape_noise_texture = 39 | { 40 | filename = "__core__/graphics/clouds-noise.png", 41 | size = 2048 42 | }, 43 | detail_noise_texture = 44 | { 45 | filename = "__core__/graphics/clouds-detail-noise.png", 46 | size = 2048 47 | }, 48 | color1 = {1.0, 0.8706, 0.302}, 49 | color2 = {1.0, 0.8706, 0.2902}, 50 | tick_factor = 0.000005, 51 | } 52 | end 53 | 54 | return effects 55 | -------------------------------------------------------------------------------- /core/prototypes/burner-usage.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "burner-usage", 5 | name = "fuel", 6 | empty_slot_sprite = 7 | { 8 | filename = "__core__/graphics/icons/mip/empty-fuel-slot.png", 9 | priority = "extra-high-no-scale", 10 | size = 64, 11 | mipmap_count = 2, 12 | flags = {"gui-icon"}, 13 | }, 14 | empty_slot_caption = {"gui.fuel"}, 15 | empty_slot_description = {"gui.fuel-description"}, 16 | 17 | icon = 18 | { 19 | filename = "__core__/graphics/icons/alerts/fuel-icon-red.png", 20 | priority = "extra-high-no-scale", 21 | width = 64, 22 | height = 64, 23 | flags = {"icon"} 24 | }, 25 | no_fuel_status = {"entity-status.no-fuel"}, 26 | 27 | accepted_fuel_key = "description.accepted-fuel", 28 | burned_in_key = "burned-in", -- factoriopedia 29 | } 30 | }) 31 | -------------------------------------------------------------------------------- /core/prototypes/cursors.lua: -------------------------------------------------------------------------------- 1 | data:extend({ 2 | 3 | { 4 | type = "mouse-cursor", 5 | name = "selection-tool-cursor", 6 | filename = "__core__/graphics/cross-select-x32.png", 7 | hot_pixel_x = 16, 8 | hot_pixel_y = 16 9 | }, 10 | --{ 11 | -- type = "mouse-cursor", 12 | -- name = "system-crosshair", 13 | -- system_cursor = "crosshair", -- one of "arrow", "i-beam", "crosshair", "wait-arrow", "size-all", "no", "hand" 14 | --} 15 | 16 | }) 17 | -------------------------------------------------------------------------------- /core/prototypes/editor-controller.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "editor-controller", 5 | name = "default", 6 | 7 | inventory_size = 110, 8 | gun_inventory_size = 3, 9 | item_pickup_distance = 1, 10 | loot_pickup_distance = 0, 11 | movement_speed = 0.5, 12 | mining_speed = 6, 13 | enable_flash_light = true, 14 | adjust_speed_based_off_zoom = true, 15 | render_as_day = true, 16 | instant_blueprint_building = true, 17 | instant_deconstruction = true, 18 | instant_upgrading = true, 19 | instant_rail_planner = true, 20 | show_status_icons = true, 21 | show_hidden_entities = true, 22 | show_entity_tags = true, 23 | show_entity_health_bars = true, 24 | show_additional_entity_info_gui = true, 25 | generate_neighbor_chunks = true, 26 | fill_built_entity_energy_buffers = true, 27 | show_character_tab_in_controller_gui = false, 28 | show_infinity_filters_in_controller_gui = false, 29 | placed_corpses_never_expire = true, 30 | ignore_tile_conditions = true 31 | } 32 | }) 33 | -------------------------------------------------------------------------------- /core/prototypes/fonts.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "font", 5 | name = "default", 6 | from = "default", 7 | size = 14 8 | }, 9 | { 10 | type = "font", 11 | name = "locale-pick", 12 | from = "locale-pick", 13 | size = 14 14 | }, 15 | { 16 | type = "font", 17 | name = "default-semibold", 18 | from = "default-semibold", 19 | size = 14 20 | }, 21 | { 22 | type = "font", 23 | name = "default-bold", 24 | from = "default-bold", 25 | size = 14 26 | }, 27 | { 28 | type = "font", 29 | name = "default-dialog-button", 30 | from = "default-bold", 31 | size = 18 32 | }, 33 | { 34 | type = "font", 35 | name = "default-listbox", 36 | from = "default", 37 | size = 14 38 | }, 39 | { 40 | type = "font", 41 | name = "default-dropdown", 42 | from = "default-semibold", 43 | size = 14 44 | }, 45 | { 46 | type = "font", 47 | name = "default-game", 48 | from = "default", 49 | size = 18, 50 | border = true, 51 | border_color = {} 52 | }, 53 | { 54 | type = "font", 55 | name = "scenario-message-dialog", 56 | from = "default", 57 | size = 16 58 | }, 59 | { 60 | type = "font", 61 | name = "default-large", 62 | from = "default", 63 | size = 18 64 | }, 65 | { 66 | type = "font", 67 | name = "default-large-semibold", 68 | from = "default-semibold", 69 | size = 18 70 | }, 71 | { 72 | type = "font", 73 | name = "default-large-bold", 74 | from = "default-bold", 75 | size = 18 76 | }, 77 | { 78 | type = "font", 79 | name = "default-small", 80 | from = "default", 81 | size = 12 82 | }, 83 | { 84 | type = "font", 85 | name = "default-small-semibold", 86 | from = "default-semibold", 87 | size = 12 88 | }, 89 | { 90 | type = "font", 91 | name = "default-small-bold", 92 | from = "default-bold", 93 | size = 12 94 | }, 95 | -- NEW 96 | { 97 | type = "font", 98 | name = "heading-1", 99 | from = "default-bold", 100 | size = 18, -- will translate 7 modules (ceil(18 * 1.4 / 4)) 101 | }, 102 | { 103 | type = "font", 104 | name = "heading-2", 105 | from = "default-bold", 106 | size = 15, -- will translate 6 modules 107 | }, 108 | { 109 | type = "font", 110 | name = "var", 111 | from = "default-bold", 112 | size = 14, 113 | border = false 114 | }, 115 | { 116 | type = "font", 117 | name = "compi", 118 | from = "default", 119 | size = 20 120 | }, 121 | { 122 | type = "font", 123 | name = "count-font", 124 | from = "default-bold", 125 | size = 13, 126 | border = true, 127 | border_color = {} 128 | }, 129 | { 130 | type = "font", 131 | name = "technology-slot-level-font", 132 | from = "default-bold", 133 | size = 11, -- 4 modules 134 | border = false 135 | }, 136 | { 137 | type = "font", 138 | name = "default-tiny-bold", 139 | from = "default-bold", 140 | size = 10 141 | } 142 | } 143 | ) 144 | -------------------------------------------------------------------------------- /core/prototypes/god-controller.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "god-controller", 5 | name = "default", 6 | 7 | crafting_categories = {"crafting"}, 8 | mining_categories = {"basic-solid"}, 9 | inventory_size = 80, 10 | item_pickup_distance = 1, 11 | loot_pickup_distance = 2, 12 | movement_speed = 0.5, 13 | mining_speed = 1 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /core/prototypes/parameters.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "recipe-category", 5 | name = "parameters" 6 | } 7 | }) 8 | -------------------------------------------------------------------------------- /core/prototypes/remote-controller.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "remote-controller", 5 | name = "default", 6 | movement_speed = 1 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /core/prototypes/spectator-controller.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "spectator-controller", 5 | name = "default", 6 | movement_speed = 0.5 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /core/prototypes/unknown.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "virtual-signal", 5 | name = "signal-unknown", 6 | icon = "__core__/graphics/icons/unknown.png", 7 | hidden = true 8 | }, 9 | { 10 | type = "entity-ghost", 11 | name = "entity-unknown", 12 | icon = "__core__/graphics/icons/unknown.png", 13 | hidden = true 14 | }, 15 | { 16 | type = "item", 17 | name = "item-unknown", 18 | icon = "__core__/graphics/icons/unknown.png", 19 | hidden = true, 20 | stack_size = 1 21 | }, 22 | { 23 | type = "recipe", 24 | name = "recipe-unknown", 25 | icon = "__core__/graphics/icons/unknown.png", 26 | icon_size = 64, 27 | hidden = true, 28 | ingredients = {}, 29 | results = {} 30 | }, 31 | { 32 | type = "quality", 33 | name = "quality-unknown", 34 | level = 0, -- so it is at the end internally 35 | color = {1, 1, 1}, 36 | order = "z", 37 | icons = 38 | {{ 39 | icon = "__core__/graphics/icons/unknown.png", 40 | scale = 0.5 41 | }}, 42 | hidden = true 43 | }, 44 | { 45 | type = "fluid", 46 | name = "fluid-unknown", 47 | icon = "__core__/graphics/icons/unknown.png", 48 | base_color = {}, 49 | flow_color = {}, 50 | hidden = true, 51 | default_temperature = 0, 52 | max_temperature = 0, 53 | auto_barrel = false 54 | }, 55 | { 56 | name = "tile-unknown", 57 | type = "tile", 58 | order = "z-a", 59 | hidden = true, 60 | collision_mask = {layers={}}, 61 | layer_group = "zero", 62 | layer = 0, 63 | variants = 64 | { 65 | main = 66 | { 67 | { 68 | picture = "__core__/graphics/icons/unknown.png", 69 | count = 1, 70 | size = 1, 71 | scale = 0.5 72 | } 73 | }, 74 | empty_transitions = true 75 | }, 76 | map_color = {r=0, g=0, b=0} 77 | }, 78 | { 79 | type = "space-location", 80 | name = "space-location-unknown", 81 | hidden = true, 82 | distance = 0, 83 | orientation = 0, 84 | icon = "__core__/graphics/icons/unknown.png", 85 | }, 86 | { 87 | type = "asteroid-chunk", 88 | name = "asteroid-chunk-unknown", 89 | hidden = true, 90 | icon = "__core__/graphics/icons/unknown.png", 91 | } 92 | }) 93 | -------------------------------------------------------------------------------- /credits.txt: -------------------------------------------------------------------------------- 1 | Albert Bertolín Soler / glex - Art director 2 | Aleš Navrátil / Zopa - Graphic designer 3 | Ben Buckton / Abregado - Level designer 4 | Bětka Pospíšilová - Office & Administration manager 5 | Caleb Heuer / Raiguard - Programmer 6 | Claude Metz / Therenas - Documentation developer & writer 7 | Dan Andrus / StrangePan - Programmer 8 | Dan Stevens / TOGoS - Programmer 9 | Daniel James Taylor - Composer & sound designer 10 | David Hrusa - Programmer 11 | Denis Koshman / Harkonnen - Programmer 12 | Dominik Franěk - Programmer 13 | Dominik Schmaderer - 3D artist 14 | Earendel - Concept artist 15 | Erik Wellmann / Bilka - Wiki admin 16 | Ernestas Norvaišas / Einis - 3D artist 17 | Fearghall Thomas - 3D artist 18 | Gavin Thomas Endicott - Trailer voiceover 19 | Ian Macbeth - Sound designer 20 | Jan Kadlec - Programmer 21 | Jarosław Kolmaga - 3D artist 22 | Jerzy Górski - 3D artist 23 | Jiří Šebele - Programmer 24 | Jitka Říhová - Office & Administration manager 25 | Jurek Höefer - 3D artist 26 | Karel Petr / Pard - Programmer 27 | Katya - QA Tester 28 | Kuba Marek / Blue Cube - Programmer 29 | Lubomír Grund - Programmer 30 | Lucas Leme - 3D artist 31 | Martin Hanzík / HanziQ - Operations Developer 32 | Michaela Woodhouse - Office & Administration manager 33 | Michal Kovařík / kovarex - Founder, Technology director 34 | Michal Pavelčík / Posila - Programmer 35 | Ondřej Adamec / Donion - Programmer 36 | Ondřej Majerech / Oxyd - Programmer 37 | Ondrej Sekerák / Genhis - Programmer 38 | Pavel Vlášek - 3D artist 39 | Petr Kratochvíl - Programmer 40 | Robert Asaftei / Twinsen - Programmer 41 | Robert Eding / Rseding91 - Programmer 42 | Roman Dubrovka / c4rt - Programmer 43 | Sanqui - Operations Developer 44 | Scott Woodhouse / Klonan - Press, Community & Support manager 45 | Shane Kilduff - 3D artist 46 | Sławomir Fraś / boskid - QA tester 47 | Tobias Knöschke / Tobias1595 - Programmer 48 | Tom Mason / wheybags - Programmer 49 | Tomáš Kozelek / slpwnd - Managing director 50 | Václav Benč / V453000 - Technical artist 51 | Valerii Kuznietsov / Soliery - Sound designer 52 | Viktor Kopp - Programmer 53 | Vinzenz Sinapius - Operations Developer 54 | Zsolt Szabó - 3D artist 55 | 56 | Base game music: 57 | Daniel James Taylor - Composer, Producer 58 | 59 | Space age music - Soundsgate: 60 | Petr Wajsar - Composer 61 | Alexandr Smutny - Producer 62 | 63 | Big thanks to our source access community members who contributed code to the game. 64 | 65 | One very big thank you goes to the whole Factorio community, namely on the Factorio forums, on Steam, and on Reddit. 66 | - They have been testing experimental versions and found many bugs. 67 | - They created some great mods for the game. 68 | - They have been helping out to the people new to the game. 69 | - They have provided us with ideas, suggestions and feedback. 70 | - They have translated the game to many languages. 71 | -------------------------------------------------------------------------------- /elevated-rails/data.lua: -------------------------------------------------------------------------------- 1 | require("__elevated-rails__.prototypes.item.elevated-rails") 2 | require("__elevated-rails__.prototypes.technology.elevated-rails") 3 | require("__elevated-rails__.prototypes.tips-and-tricks") 4 | require("__elevated-rails__.prototypes.entity.elevated-rails") 5 | require("__elevated-rails__.prototypes.recipe.elevated-rails") 6 | require("__elevated-rails__.prototypes.base-data-updates") 7 | require("__elevated-rails__.prototypes.entity.remnants") 8 | require("__elevated-rails__.prototypes.entity.explosions") 9 | require("__elevated-rails__.prototypes.particles") 10 | require("__elevated-rails__.menu-simulations.menu-simulations") -------------------------------------------------------------------------------- /elevated-rails/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "elevated-rails", 3 | "version": "2.0.56", 4 | "title": "Elevated Rails", 5 | "author": "Wube Software", 6 | "contact": "dev@factorio.com", 7 | "homepage": "https://www.factorio.com", 8 | "dependencies": ["base >= 2.0.0"], 9 | "rail_bridges_required": true, 10 | "factorio_version": "2.0" 11 | } 12 | -------------------------------------------------------------------------------- /elevated-rails/prototypes/base-data-updates.lua: -------------------------------------------------------------------------------- 1 | local meld = require("__core__.lualib.meld") 2 | 3 | local rail_planner_with_elevated_rails_update = 4 | { 5 | rails = meld.append({ 6 | "rail-ramp", 7 | "elevated-straight-rail", 8 | "elevated-curved-rail-a", 9 | "elevated-curved-rail-b", 10 | "elevated-half-diagonal-rail" 11 | }), 12 | support = "rail-support" 13 | } 14 | 15 | for _, prototype in pairs(data.raw["rail-planner"]) do 16 | meld(prototype, rail_planner_with_elevated_rails_update) 17 | end 18 | 19 | require("__elevated-rails__.prototypes.sloped-trains-updates").apply_all_base() 20 | -------------------------------------------------------------------------------- /elevated-rails/prototypes/item/elevated-rails.lua: -------------------------------------------------------------------------------- 1 | local item_sounds = require("__base__.prototypes.entity.sounds") 2 | local item_sounds = require("__base__.prototypes.item_sounds") 3 | 4 | data:extend( 5 | { 6 | { 7 | type = "rail-planner", 8 | name = "rail-ramp", 9 | icon = "__elevated-rails__/graphics/icons/rail-ramp.png", 10 | subgroup = "train-transport", 11 | order = "a[rail]-b[rail-ramp]", 12 | inventory_move_sound = item_sounds.train_inventory_move, 13 | pick_sound = item_sounds.train_inventory_pickup, 14 | drop_sound = item_sounds.train_inventory_move, 15 | place_result = "rail-ramp", 16 | rails = 17 | { 18 | "straight-rail", 19 | "curved-rail-a", 20 | "curved-rail-b", 21 | "half-diagonal-rail" 22 | }, 23 | stack_size = 10 24 | }, 25 | { 26 | type = "item", 27 | name = "rail-support", 28 | icon = "__elevated-rails__/graphics/icons/rail-support.png", -- TODO (@GFX) 29 | subgroup = "train-transport", 30 | order = "a[rail]-c[rail-support]", 31 | inventory_move_sound = item_sounds.train_inventory_move, 32 | pick_sound = item_sounds.train_inventory_pickup, 33 | drop_sound = item_sounds.train_inventory_move, 34 | place_result = "rail-support", 35 | stack_size = 20, 36 | weight = 200*kg 37 | } 38 | } 39 | ) 40 | -------------------------------------------------------------------------------- /elevated-rails/prototypes/recipe/elevated-rails.lua: -------------------------------------------------------------------------------- 1 | data:extend 2 | ( 3 | { 4 | { 5 | type = "recipe", 6 | name = "rail-support", 7 | enabled = false, 8 | ingredients = 9 | { 10 | {type = "item", name = "refined-concrete", amount = 20}, 11 | {type = "item", name = "steel-plate", amount = 10} 12 | }, 13 | results = {{type="item", name="rail-support", amount=1}} 14 | }, 15 | { 16 | type = "recipe", 17 | name = "rail-ramp", 18 | enabled = false, 19 | ingredients = 20 | { 21 | {type = "item", name = "refined-concrete", amount = 100}, 22 | {type = "item", name = "rail", amount = 8}, 23 | {type = "item", name = "steel-plate", amount = 10} 24 | }, 25 | results = {{type="item", name="rail-ramp", amount=1}} 26 | } 27 | }) -------------------------------------------------------------------------------- /elevated-rails/prototypes/technology/elevated-rails.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "technology", 5 | name = "elevated-rail", 6 | icon = "__elevated-rails__/graphics/technology/elevated-rail.png", 7 | icon_size = 256, 8 | effects = 9 | { 10 | { 11 | type = "unlock-recipe", 12 | recipe = "rail-support" 13 | }, 14 | { 15 | type = "unlock-recipe", 16 | recipe = "rail-ramp" 17 | }, 18 | { 19 | type = "rail-planner-allow-elevated-rails", 20 | modifier = true 21 | }, 22 | }, 23 | prerequisites = { "concrete", "production-science-pack" }, 24 | unit = 25 | { 26 | count = 100, 27 | ingredients = 28 | { 29 | { "automation-science-pack", 1 }, 30 | { "logistic-science-pack", 1 }, 31 | { "chemical-science-pack", 1 }, 32 | { "production-science-pack", 1 } 33 | }, 34 | time = 30 35 | } 36 | }, 37 | } 38 | ) 39 | -------------------------------------------------------------------------------- /elevated-rails/prototypes/tips-and-tricks-simulations.lua: -------------------------------------------------------------------------------- 1 | local simulations = {} 2 | 3 | simulations.elevated_rails = 4 | { 5 | init = 6 | [[ 7 | require("__core__/lualib/story") 8 | player = game.simulation.create_test_player{name = "Nico-Sallach"} 9 | player.teleport{-2, -2} 10 | game.simulation.camera_player = player 11 | game.simulation.camera_position = {0, 0} 12 | game.simulation.camera_zoom = 1 13 | storage.character = player.character 14 | 15 | game.surfaces[1].build_checkerboard{{-24, -13}, {22, 13}} 16 | 17 | for y = -13, 12 do 18 | game.surfaces[1].set_tiles{{name = "grass-4", position = {6, y}}} 19 | for x = 7, 21 do 20 | game.surfaces[1].set_tiles{{name = "water", position = {x, y}}} 21 | end 22 | end 23 | 24 | for y = -16, 12, 4 do 25 | game.surfaces[1].create_entity{name = "cliff", position = {5 ,y}, cliff_orientation = "north-to-south"} 26 | end 27 | 28 | game.surfaces[1].create_entities_from_blueprint_string 29 | { 30 | string = "0eNqVlNFqxCAQRf9lnl3oaEyiv1KWkt2VrZCYEN3SEPLvNQmUQufBeRJ15giX46xw619umn1IYFfw9zFEsO8rRP8MXb+fpWVyYMEnN4CA0A37bu58D5sAHx7uGyxuVwEuJJ+8O/uPzfIRXsPNzbngtzOm3Pv8TJcDIWAaY+4aw/5UJl2MgCUvuG3iH0UyKSREMSGKglRMiKYgmglpKEjNhBgK0nCDJZNtuRQyWlNMUfrE6Cziw8/ufl5WBBTfyqmqnFqutcJyarnm0pRTud4j6SxyzUfSWuS6j6S3yLVfkuIi139JmovcDyDpiA0XkyPO8/eY0PbPQBfw5eZ4lMsWq1bpuq4rrZuc5Q/Ot/dt", 31 | position = {-10,0} 32 | } 33 | 34 | local story_table = 35 | { 36 | { 37 | { 38 | name = "start", 39 | init = function() game.forces.player.chart(game.surfaces[1], {{-22, -13}, {22, 13}}) end, 40 | condition = story_elapsed_check(1) 41 | }, 42 | { condition = function() return game.simulation.move_cursor({position = {-16.5, 3}}) end }, 43 | { 44 | init = function() 45 | player.cursor_stack.set_stack{name = "rail", count = 50} 46 | player.insert{name = "rail-ramp", count = 1} 47 | player.insert{name = "rail-support", count = 1} 48 | end, 49 | condition = story_elapsed_check(0.5), 50 | action = function() game.simulation.activate_rail_planner() end 51 | }, 52 | { 53 | condition = function() return game.simulation.move_cursor({position = {1, 3}}) end, 54 | action = function() game.simulation.control_press{control = "toggle-rail-layer", notify = true} end 55 | }, 56 | { 57 | condition = story_elapsed_check(0.5), 58 | action = function() player.raw_build_from_cursor() end 59 | }, 60 | { condition = story_elapsed_check(1) }, 61 | { condition = function() return game.simulation.move_cursor({position = {1, 0}}) end }, 62 | { 63 | condition = function() return game.simulation.move_cursor({position = {14, 0}}) end, 64 | action = function() player.raw_build_from_cursor() end 65 | }, 66 | { 67 | condition = story_elapsed_check(1), 68 | action = function() 69 | game.simulation.deactivate_rail_planner() 70 | player.character.clear_items_inside() 71 | end 72 | }, 73 | { 74 | condition = story_elapsed_check(3), 75 | action = function() 76 | local rails = game.surfaces[1].find_entities() 77 | for _, rail in pairs(rails) do 78 | if rail.name == "elevated-straight-rail" or rail.name == "rail-ramp" or rail.name == "rail-support" then 79 | rail.destroy() 80 | end 81 | end 82 | story_jump_to(storage.story, "start") 83 | end 84 | } 85 | } 86 | } 87 | tip_story_init(story_table) 88 | ]] 89 | } 90 | 91 | return simulations 92 | -------------------------------------------------------------------------------- /elevated-rails/prototypes/tips-and-tricks.lua: -------------------------------------------------------------------------------- 1 | local simulations = require("__elevated-rails__/prototypes/tips-and-tricks-simulations") 2 | 3 | data:extend( 4 | { 5 | { 6 | type = "tips-and-tricks-item", 7 | name = "elevated-rails", 8 | tag = "[item=rail-ramp]", 9 | category = "trains", 10 | order = "c", 11 | indent = 1, 12 | trigger = 13 | { 14 | type = "sequence", 15 | triggers = 16 | { 17 | { 18 | type = "research", 19 | technology = "elevated-rail" 20 | }, 21 | { 22 | type = "or", 23 | triggers = 24 | { 25 | { 26 | type = "craft-item", 27 | item = "rail-ramp", 28 | event_type = "crafting-finished" 29 | }, 30 | { 31 | type = "time-elapsed", 32 | ticks = 30 * minute 33 | } 34 | } 35 | }, 36 | { 37 | type = "time-since-last-tip-activation", 38 | ticks = 15 * minute 39 | } 40 | } 41 | }, 42 | skip_trigger = 43 | { 44 | type = "toggle-rail-layer", 45 | count = 5 46 | }, 47 | simulation = simulations.elevated_rails 48 | } 49 | }) 50 | -------------------------------------------------------------------------------- /map-gen-settings.example.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment_width+height": "Width and height of map, in tiles; 0 means infinite", 3 | "width": 0, 4 | "height": 0, 5 | 6 | "_starting_area_comment": "Multiplier for 'biter free zone radius'", 7 | "starting_area": 1, 8 | 9 | "peaceful_mode": false, 10 | "autoplace_controls": 11 | { 12 | "coal": {"frequency": 1, "size": 1, "richness": 1}, 13 | "stone": {"frequency": 1, "size": 1, "richness": 1}, 14 | "copper-ore": {"frequency": 1, "size": 1,"richness": 1}, 15 | "iron-ore": {"frequency": 1, "size": 1, "richness": 1}, 16 | "uranium-ore": {"frequency": 1, "size": 1, "richness": 1}, 17 | "crude-oil": {"frequency": 1, "size": 1, "richness": 1}, 18 | "water": {"frequency": 1, "size": 1}, 19 | "trees": {"frequency": 1, "size": 1}, 20 | "enemy-base": {"frequency": 1, "size": 1} 21 | }, 22 | 23 | "cliff_settings": 24 | { 25 | "_name_comment": "Name of the cliff prototype", 26 | "name": "cliff", 27 | 28 | "_cliff_elevation_0_comment": "Elevation of first row of cliffs", 29 | "cliff_elevation_0": 10, 30 | 31 | "_cliff_elevation_interval_comment": 32 | [ 33 | "Elevation difference between successive rows of cliffs.", 34 | "This is inversely proportional to 'frequency' in the map generation GUI. Specifically, when set from the GUI the value is 40 / frequency." 35 | ], 36 | "cliff_elevation_interval": 40, 37 | 38 | "_richness_comment": "Called 'cliff continuity' in the map generator GUI. 0 will result in no cliffs, 10 will make all cliff rows completely solid", 39 | "richness": 1 40 | }, 41 | 42 | "_property_expression_names_comment": 43 | [ 44 | "Overrides for property value generators (map type)", 45 | "Leave 'elevation' blank to get 'normal' terrain.", 46 | "Use 'elevation': 'elevation_island' to get an island.", 47 | "Moisture and terrain type are also controlled via this.", 48 | "'control:moisture:frequency' is the inverse of the 'moisture scale' in the map generator GUI.", 49 | "'control:moisture:bias' is the 'moisture bias' in the map generator GUI.", 50 | "'control:aux:frequency' is the inverse of the 'terrain type scale' in the map generator GUI.", 51 | "'control:aux:bias' is the 'terrain type bias' in the map generator GUI." 52 | ], 53 | "property_expression_names": 54 | { 55 | "control:moisture:frequency": "1", 56 | "control:moisture:bias": "0", 57 | "control:aux:frequency": "1", 58 | "control:aux:bias": "0" 59 | }, 60 | 61 | "starting_points": 62 | [ 63 | { "x": 0, "y": 0} 64 | ], 65 | 66 | "_seed_comment": "Use null for a random seed, number for a specific seed.", 67 | "seed": null 68 | } 69 | -------------------------------------------------------------------------------- /quality/data-updates.lua: -------------------------------------------------------------------------------- 1 | local recycling = require("prototypes.recycling") 2 | 3 | -- Generating the recycle (reverse) recipes 4 | for name, recipe in pairs(data.raw.recipe) do 5 | recycling.generate_recycling_recipe(recipe) 6 | end 7 | 8 | local generate_self_recycling_recipe = function(item) 9 | if item.auto_recycle == false then return end 10 | if item.parameter then return end 11 | 12 | if not data.raw.recipe[item.name .. "-recycling"] then 13 | if not string.find(item.name, "-barrel") then 14 | recycling.generate_self_recycling_recipe(item) 15 | end 16 | end 17 | end 18 | 19 | for type_name in pairs(defines.prototypes.item) do 20 | if data.raw[type_name] then 21 | for k, item in pairs(data.raw[type_name]) do 22 | generate_self_recycling_recipe(item) 23 | end 24 | end 25 | end 26 | 27 | data.raw.quality.normal.hidden = false 28 | -------------------------------------------------------------------------------- /quality/data.lua: -------------------------------------------------------------------------------- 1 | require("prototypes.base-data-updates") 2 | require("prototypes.item") 3 | require("prototypes.module-category") 4 | require("prototypes.quality") 5 | require("prototypes.recipe") 6 | require("prototypes.signal") 7 | require("prototypes.technology") 8 | require("prototypes.tips-and-tricks") 9 | require("prototypes.entity.entity") 10 | require("prototypes.entity.remnants") 11 | require("prototypes.entity.explosions") 12 | -------------------------------------------------------------------------------- /quality/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "quality", 3 | "version": "2.0.56", 4 | "title": "Quality", 5 | "author": "Wube Software", 6 | "contact": "dev@factorio.com", 7 | "homepage": "https://www.factorio.com", 8 | "dependencies": ["base >= 2.0.0"], 9 | "quality_required": true, 10 | "factorio_version": "2.0" 11 | } 12 | -------------------------------------------------------------------------------- /quality/prototypes/base-data-updates.lua: -------------------------------------------------------------------------------- 1 | data.raw.quality.normal.next = "uncommon" 2 | data.raw.recipe["heavy-oil-cracking"].allow_quality = false 3 | data.raw.recipe["light-oil-cracking"].allow_quality = false 4 | data.raw.recipe["lubricant"].allow_quality = false 5 | data.raw.recipe["basic-oil-processing"].allow_quality = false 6 | data.raw.recipe["advanced-oil-processing"].allow_quality = false 7 | data.raw["mining-drill"]["pumpjack"].allowed_effects = {"consumption", "speed", "productivity", "pollution"} 8 | data.raw.technology["modules"].icon = "__quality__/graphics/technology/module.png" 9 | data.raw.technology["modules"].icon_size = 256 10 | -------------------------------------------------------------------------------- /quality/prototypes/entity/entity.lua: -------------------------------------------------------------------------------- 1 | local sounds = require("__base__.prototypes.entity.sounds") 2 | 3 | data:extend{ 4 | { 5 | type = "furnace", 6 | name = "recycler", 7 | icon = "__quality__/graphics/icons/recycler.png", 8 | flags = {"placeable-neutral", "placeable-player", "player-creation"}, 9 | fast_transfer_modules_into_module_slots_only = true, 10 | minable = {mining_time = 0.2, result = "recycler"}, 11 | circuit_wire_max_distance = furnace_circuit_wire_max_distance, 12 | circuit_connector = circuit_connector_definitions["recycler"], 13 | circuit_connector_flipped = circuit_connector_definitions["recycler-flipped"], 14 | max_health = 300, 15 | fast_replaceable_group = "recycler", 16 | vector_to_place_result = {-0.5, -2.3}, 17 | dying_explosion = "recycler-explosion", 18 | corpse = "recycler-remnants", 19 | impact_category = "metal", 20 | working_sound = 21 | { 22 | sound = {filename = "__quality__/sound/recycler/recycler-loop.ogg", volume = 0.7}, 23 | sound_accents = 24 | { 25 | {sound = {variations = sound_variations("__quality__/sound/recycler/recycler-jaw-move", 5, 0.45), audible_distance_modifier = 0.2}, frame = 14}, 26 | {sound = {variations = sound_variations("__quality__/sound/recycler/recycler-vox", 5, 0.2), audible_distance_modifier = 0.3}, frame = 20}, 27 | {sound = {variations = sound_variations("__quality__/sound/recycler/recycler-mechanic", 3, 0.3), audible_distance_modifier = 0.3}, frame = 45}, 28 | {sound = {variations = sound_variations("__quality__/sound/recycler/recycler-jaw-move", 5, 0.45), audible_distance_modifier = 0.2}, frame = 60}, 29 | {sound = {variations = sound_variations("__quality__/sound/recycler/recycler-trash", 5, 0.6), audible_distance_modifier = 0.3}, frame = 61}, 30 | {sound = {variations = sound_variations("__quality__/sound/recycler/recycler-jaw-shut", 6, 0.3), audible_distance_modifier = 0.6}, frame = 63}, 31 | }, 32 | max_sounds_per_prototype = 2, 33 | fade_in_ticks = 4, 34 | fade_out_ticks = 20 35 | }, 36 | open_sound = sounds.metal_large_open, 37 | close_sound = sounds.metal_large_close, 38 | resistances = 39 | { 40 | { 41 | type = "fire", 42 | percent = 80 43 | } 44 | }, 45 | collision_box = {{-0.7, -1.7}, {0.7, 1.7}}, 46 | selection_box = {{-0.9, -1.85}, {0.9, 1.85}}, 47 | crafting_categories = {"recycling", "recycling-or-hand-crafting"}, 48 | result_inventory_size = 12, 49 | energy_usage = "180kW", 50 | crafting_speed = 0.5, 51 | source_inventory_size = 1, 52 | custom_input_slot_tooltip_key = "recycler-input-slot-tooltip", 53 | energy_source = 54 | { 55 | type = "electric", 56 | usage_priority = "secondary-input", 57 | emissions_per_minute = { pollution = 2 } 58 | }, 59 | module_slots = 4, 60 | icon_draw_specification = {shift = {0, -0.55}}, 61 | icons_positioning = 62 | { 63 | {inventory_index = defines.inventory.furnace_modules, shift = {0, 0.2}} 64 | }, 65 | allowed_effects = {"consumption", "speed", "pollution", "quality"}, 66 | perceived_performance = {maximum = 4}, 67 | graphics_set = require("__quality__.prototypes.entity.recycler-pictures").graphics_set, 68 | graphics_set_flipped = require("__quality__.prototypes.entity.recycler-pictures").graphics_set_flipped, 69 | cant_insert_at_source_message_key = "inventory-restriction.cant-be-recycled" 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /quality/prototypes/entity/explosions.lua: -------------------------------------------------------------------------------- 1 | local explosion_animations = require("__base__.prototypes.entity.explosion-animations") 2 | local sounds = require("__base__.prototypes.entity.sounds") 3 | 4 | local explosions = 5 | { 6 | { 7 | type = "explosion", 8 | name = "recycler-explosion", 9 | icon = "__quality__/graphics/icons/recycler.png", 10 | flags = {"not-on-map"}, 11 | hidden = true, 12 | subgroup = "smelting-machine-explosions", 13 | order = "e[recycler]", 14 | height = 0, 15 | animations = explosion_animations.medium_explosion(), 16 | smoke = "smoke-fast", 17 | smoke_count = 2, 18 | smoke_slow_down_factor = 1, 19 | sound = sounds.medium_explosion, 20 | created_effect = 21 | { 22 | type = "direct", 23 | action_delivery = 24 | { 25 | type = "instant", 26 | target_effects = 27 | { 28 | { 29 | type = "create-particle", 30 | repeat_count = 17, 31 | particle_name = "assembling-machine-3-metal-particle-big", 32 | offset_deviation = { { -0.6875, -0.6875 }, { 0.6875, 0.6875 } }, 33 | initial_height = 0.1, 34 | initial_height_deviation = 0.49, 35 | initial_vertical_speed = 0.08, 36 | initial_vertical_speed_deviation = 0.05, 37 | speed_from_center = 0.03, 38 | speed_from_center_deviation = 0.05 39 | }, 40 | { 41 | type = "create-particle", 42 | repeat_count = 21, 43 | particle_name = "assembling-machine-3-metal-particle-medium", 44 | offset_deviation = { { -0.8789, -0.8945 }, { 0.8789, 0.8945 } }, 45 | initial_height = 0.2, 46 | initial_height_deviation = 0.5, 47 | initial_vertical_speed = 0.098, 48 | initial_vertical_speed_deviation = 0.05, 49 | speed_from_center = 0.05, 50 | speed_from_center_deviation = 0.05 51 | }, 52 | { 53 | type = "create-particle", 54 | repeat_count = 26, 55 | particle_name = "assembling-machine-3-metal-particle-small", 56 | offset_deviation = { { -0.8945, -0.3906 }, { 0.8945, 0.3906 } }, 57 | initial_height = 0.1, 58 | initial_height_deviation = 0.5, 59 | initial_vertical_speed = 0.075, 60 | initial_vertical_speed_deviation = 0.05, 61 | speed_from_center = 0.04, 62 | speed_from_center_deviation = 0.05 63 | }, 64 | { 65 | type = "create-particle", 66 | repeat_count = 7, 67 | particle_name = "cable-and-electronics-particle-small-medium", 68 | offset_deviation = { { -0.5, -0.5 }, { 0.5, 0.5 } }, 69 | initial_height = 0.3, 70 | initial_height_deviation = 0.5, 71 | initial_vertical_speed = 0.092, 72 | initial_vertical_speed_deviation = 0.05, 73 | speed_from_center = 0.05, 74 | speed_from_center_deviation = 0.05 75 | }, 76 | { 77 | type = "create-particle", 78 | repeat_count = 25, 79 | particle_name = "assembling-machine-mechanical-component-particle-medium", 80 | offset_deviation = { { -0.5, -0.5 }, { 0.5, 0.5 } }, 81 | initial_height = 0.4, 82 | initial_height_deviation = 0.5, 83 | initial_vertical_speed = 0.069, 84 | initial_vertical_speed_deviation = 0.05, 85 | speed_from_center = 0.05, 86 | speed_from_center_deviation = 0.05 87 | } 88 | } 89 | } 90 | } 91 | }, 92 | } 93 | data:extend(explosions) -------------------------------------------------------------------------------- /quality/prototypes/entity/remnants.lua: -------------------------------------------------------------------------------- 1 | require ("util") 2 | 3 | function make_rotated_animation_variations_from_sheet(variation_count, sheet) --makes remnants work with more than 1 variation 4 | local result = {} 5 | 6 | local function set_y_offset(variation, i) 7 | local frame_count = variation.frame_count or 1 8 | local line_length = variation.line_length or frame_count 9 | if (line_length < 1) then 10 | line_length = frame_count 11 | end 12 | 13 | local height_in_frames = math.floor((frame_count * variation.direction_count + line_length - 1) / line_length) 14 | -- if (height_in_frames ~= 1) then 15 | -- log("maybe broken sheet: h=" .. height_in_frames .. ", vc=" .. variation_count .. ", " .. variation.filename) 16 | -- end 17 | variation.y = variation.height * (i - 1) * height_in_frames 18 | end 19 | 20 | for i = 1,variation_count do 21 | local variation = util.table.deepcopy(sheet) 22 | 23 | if variation.layers then 24 | for _, layer in pairs(variation.layers) do 25 | set_y_offset(layer, i) 26 | end 27 | else 28 | set_y_offset(variation, i) 29 | end 30 | 31 | table.insert(result, variation) 32 | end 33 | return result 34 | end 35 | 36 | local remnants = 37 | { 38 | { 39 | type = "corpse", 40 | name = "recycler-remnants", 41 | icon = "__quality__/graphics/icons/recycler.png", 42 | flags = {"placeable-neutral", "not-on-map"}, 43 | hidden_in_factoriopedia = true, 44 | subgroup = "smelting-machine-remnants", 45 | order = "e[recycler]", 46 | selection_box = {{-1, -2}, {1, 2}}, 47 | tile_width = 2, 48 | tile_height = 4, 49 | selectable_in_game = false, 50 | time_before_removed = 60 * 60 * 15, -- 15 minutes 51 | expires = false, 52 | final_render_layer = "remnants", 53 | remove_on_tile_placement = false, 54 | animation = make_rotated_animation_variations_from_sheet (2, 55 | { 56 | filename = "__quality__/graphics/entity/recycler/recycler-remnants.png", 57 | line_length = 4, 58 | width = 384, 59 | height = 384, 60 | direction_count = 4, 61 | shift = util.by_pixel(0, 0), 62 | scale = 0.5 63 | }) 64 | } 65 | } 66 | 67 | for k, remnant in pairs (remnants) do 68 | if not remnant.localised_name then 69 | local name = remnant.name 70 | if name:find("%-remnants") then 71 | remnant.localised_name = {"remnant-name", {"entity-name."..name:gsub("%-remnants", "")}} 72 | end 73 | end 74 | end 75 | 76 | data:extend(remnants) -------------------------------------------------------------------------------- /quality/prototypes/item.lua: -------------------------------------------------------------------------------- 1 | local item_sounds = require("__base__.prototypes.item_sounds") 2 | 3 | data:extend 4 | ({ 5 | { 6 | type = "module", 7 | name = "quality-module", 8 | localised_description = { "item-description.quality-module" }, 9 | icon = "__quality__/graphics/icons/quality-module.png", 10 | subgroup = "module", 11 | color_hint = { text = "Q" }, 12 | category = "quality", 13 | tier = 1, 14 | order = "d[quality]-a[quality-module-1]", 15 | inventory_move_sound = item_sounds.module_inventory_move, 16 | pick_sound = item_sounds.module_inventory_pickup, 17 | drop_sound = item_sounds.module_inventory_move, 18 | stack_size = 50, 19 | weight = 20 * kg, 20 | effect = { quality = 0.1, speed = -0.05 } 21 | }, 22 | { 23 | type = "module", 24 | name = "quality-module-2", 25 | localised_description = { "item-description.quality-module" }, 26 | icon = "__quality__/graphics/icons/quality-module-2.png", 27 | subgroup = "module", 28 | color_hint = { text = "Q" }, 29 | category = "quality", 30 | tier = 2, 31 | order = "d[quality]-b[quality-module-2]", 32 | inventory_move_sound = item_sounds.module_inventory_move, 33 | pick_sound = item_sounds.module_inventory_pickup, 34 | drop_sound = item_sounds.module_inventory_move, 35 | stack_size = 50, 36 | weight = 20 * kg, 37 | effect = { quality = 0.2, speed = -0.05 } 38 | }, 39 | { 40 | type = "module", 41 | name = "quality-module-3", 42 | localised_description = { "item-description.quality-module" }, 43 | icon = "__quality__/graphics/icons/quality-module-3.png", 44 | subgroup = "module", 45 | color_hint = { text = "Q" }, 46 | category = "quality", 47 | tier = 3, 48 | order = "d[quality]-c[quality-module-3]", 49 | inventory_move_sound = item_sounds.module_inventory_move, 50 | pick_sound = item_sounds.module_inventory_pickup, 51 | drop_sound = item_sounds.module_inventory_move, 52 | stack_size = 50, 53 | weight = 20 * kg, 54 | effect = { quality = 0.25, speed = -0.05 } 55 | }, 56 | { 57 | type = "item", 58 | name = "recycler", 59 | icon = "__quality__/graphics/icons/recycler.png", 60 | subgroup = "smelting-machine", 61 | order = "d[recycler]", 62 | inventory_move_sound = item_sounds.metal_large_inventory_move, 63 | pick_sound = item_sounds.metal_large_inventory_pickup, 64 | drop_sound = item_sounds.metal_large_inventory_move, 65 | place_result = "recycler", 66 | stack_size = 20, 67 | weight = 100 * kg, 68 | }, 69 | }) -------------------------------------------------------------------------------- /quality/prototypes/module-category.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "module-category", 5 | name = "quality" 6 | } 7 | } 8 | ) 9 | -------------------------------------------------------------------------------- /quality/prototypes/quality.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "quality", 5 | name = "uncommon", 6 | level = 1, 7 | color = {43, 165, 61}, 8 | order = "b", 9 | next = "rare", 10 | next_probability = 0.1, 11 | subgroup = "qualities", 12 | icon = "__quality__/graphics/icons/quality-uncommon.png", 13 | beacon_power_usage_multiplier = 5/6, 14 | mining_drill_resource_drain_multiplier = 5/6, 15 | science_pack_drain_multiplier = 99/100, 16 | }, 17 | { 18 | type = "quality", 19 | name = "rare", 20 | level = 2, 21 | color = {25, 104, 178}, 22 | order = "c", 23 | next = "epic", 24 | next_probability = 0.1, 25 | subgroup = "qualities", 26 | icon = "__quality__/graphics/icons/quality-rare.png", 27 | beacon_power_usage_multiplier = 4/6, 28 | mining_drill_resource_drain_multiplier = 4/6, 29 | science_pack_drain_multiplier = 98/100, 30 | }, 31 | { 32 | type = "quality", 33 | name = "epic", 34 | level = 3, 35 | color = {137, 0, 178}, 36 | order = "d", 37 | next = "legendary", 38 | next_probability = 0.1, 39 | subgroup = "qualities", 40 | icon = "__quality__/graphics/icons/quality-epic.png", 41 | beacon_power_usage_multiplier = 3/6, 42 | mining_drill_resource_drain_multiplier = 3/6, 43 | science_pack_drain_multiplier = 97/100, 44 | }, 45 | { 46 | type = "quality", 47 | name = "legendary", 48 | level = 5, 49 | color = {178, 104, 0}, 50 | order = "e", 51 | subgroup = "qualities", 52 | icon = "__quality__/graphics/icons/quality-legendary.png", 53 | beacon_power_usage_multiplier = 1/6, 54 | mining_drill_resource_drain_multiplier = 1/6, 55 | science_pack_drain_multiplier = 95/100, 56 | } 57 | } 58 | ) 59 | -------------------------------------------------------------------------------- /quality/prototypes/recipe.lua: -------------------------------------------------------------------------------- 1 | data:extend 2 | ({ 3 | { 4 | type = "recipe", 5 | name = "quality-module", 6 | enabled = false, 7 | ingredients = 8 | { 9 | {type = "item", name = "electronic-circuit", amount = 5}, 10 | {type = "item", name = "advanced-circuit", amount = 5}, 11 | }, 12 | energy_required = 15, 13 | results = {{type="item", name="quality-module", amount=1}} 14 | }, 15 | { 16 | type = "recipe", 17 | name = "quality-module-2", 18 | enabled = false, 19 | ingredients = 20 | { 21 | {type = "item", name = "quality-module", amount = 4}, 22 | {type = "item", name = "advanced-circuit", amount = 5}, 23 | {type = "item", name = "processing-unit", amount = 5}, 24 | }, 25 | energy_required = 30, 26 | results = {{type="item", name="quality-module-2", amount=1}} 27 | }, 28 | { 29 | type = "recipe", 30 | name = "quality-module-3", 31 | enabled = false, 32 | ingredients = 33 | { 34 | {type = "item", name = "quality-module-2", amount = 4}, 35 | {type = "item", name = "advanced-circuit", amount = 5}, 36 | {type = "item", name = "processing-unit", amount = 5} 37 | }, 38 | energy_required = 60, 39 | results = {{type="item", name="quality-module-3", amount=1}} 40 | }, 41 | { 42 | type = "recipe", 43 | name = "recycler", 44 | ingredients = 45 | { 46 | {type = "item", name = "processing-unit", amount = 6}, 47 | {type = "item", name = "steel-plate", amount = 20}, 48 | {type = "item", name = "iron-gear-wheel", amount = 40}, 49 | {type = "item", name = "concrete", amount = 20} 50 | }, 51 | results = {{type="item", name="recycler", amount=1}}, 52 | energy_required = 3, 53 | enabled = false 54 | } 55 | }) 56 | -------------------------------------------------------------------------------- /quality/prototypes/signal.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "virtual-signal", 5 | name = "signal-any-quality", 6 | icon = "__core__/graphics/icons/any-quality.png", 7 | subgroup = "qualities", 8 | order = "z" 9 | } 10 | } 11 | ) 12 | -------------------------------------------------------------------------------- /quality/prototypes/tips-and-tricks.lua: -------------------------------------------------------------------------------- 1 | local simulations = require("__quality__/prototypes/tips-and-tricks-simulations") 2 | 3 | data:extend( 4 | { 5 | { 6 | type = "tips-and-tricks-item-category", 7 | name = "quality", 8 | order = "j-[quality]" 9 | }, 10 | { 11 | type = "tips-and-tricks-item", 12 | name = "quality", 13 | category = "quality", 14 | order = "a", 15 | is_title = true, 16 | trigger = 17 | { 18 | type = "unlock-recipe", 19 | recipe = "quality-module" 20 | }, 21 | skip_trigger = 22 | { 23 | type = "build-entity", 24 | quality = "uncommon", 25 | count = 10 26 | }, 27 | simulation = simulations.quality 28 | }, 29 | { 30 | type = "tips-and-tricks-item", 31 | name = "quality-factoriopedia", 32 | tag = "[technology=legendary-quality]", 33 | category = "quality", 34 | order = "b", 35 | indent = 1, 36 | trigger = 37 | { 38 | type = "time-since-last-tip-activation", 39 | ticks = 30 * minute 40 | }, 41 | skip_trigger = 42 | { 43 | type = "sequence", 44 | triggers = 45 | { 46 | { 47 | type = "dependencies-met", 48 | }, 49 | { 50 | type = "time-elapsed", 51 | ticks = 180 * minute 52 | } 53 | } 54 | }, 55 | dependencies = {"quality"}, 56 | simulation = simulations.quality_factoriopedia 57 | }, 58 | { 59 | type = "tips-and-tricks-item", 60 | name = "quality-modules", 61 | tag = "[item=quality-module]", 62 | category = "quality", 63 | order = "c", 64 | indent = 1, 65 | skip_trigger = 66 | { 67 | type = "module-transfer", 68 | module = "quality-module", 69 | count = 12 70 | }, 71 | dependencies = { "quality" }, 72 | simulation = simulations.quality_modules 73 | }, 74 | { 75 | type = "tips-and-tricks-item", 76 | name = "quality-probabilities", 77 | tag = "[item=quality-module][item=quality-module-3]", 78 | category = "quality", 79 | order = "d", 80 | indent = 1, 81 | trigger = 82 | { 83 | type = "time-since-last-tip-activation", 84 | ticks = 30 * minute 85 | }, 86 | skip_trigger = 87 | { 88 | type = "sequence", 89 | triggers = 90 | { 91 | { 92 | type = "dependencies-met", 93 | }, 94 | { 95 | type = "time-elapsed", 96 | ticks = 180 * minute 97 | } 98 | } 99 | }, 100 | dependencies = { "quality-modules" }, 101 | simulation = simulations.quality_probabilities 102 | } 103 | }) 104 | -------------------------------------------------------------------------------- /server-settings.example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Name of the game as it will appear in the game listing", 3 | "description": "Description of the game that will appear in the listing", 4 | "tags": [ "game", "tags" ], 5 | 6 | "_comment_max_players": "Maximum number of players allowed, admins can join even a full server. 0 means unlimited.", 7 | "max_players": 0, 8 | 9 | "_comment_visibility": [ 10 | "public: Game will be published on the official Factorio matching server", 11 | "lan: Game will be broadcast on LAN" 12 | ], 13 | "visibility": { 14 | "public": true, 15 | "lan": true 16 | }, 17 | 18 | "_comment_credentials": "Your factorio.com login credentials. Required for games with visibility public", 19 | "username": "", 20 | "password": "", 21 | 22 | "_comment_token": "Authentication token. May be used instead of 'password' above.", 23 | "token": "", 24 | 25 | "game_password": "", 26 | 27 | "_comment_require_user_verification": "When set to true, the server will only allow clients that have a valid Factorio.com account", 28 | "require_user_verification": true, 29 | 30 | "_comment_max_upload_in_kilobytes_per_second": "optional, default value is 0. 0 means unlimited.", 31 | "max_upload_in_kilobytes_per_second": 0, 32 | 33 | "_comment_max_upload_slots": "optional, default value is 5. 0 means unlimited.", 34 | "max_upload_slots": 5, 35 | 36 | "_comment_minimum_latency_in_ticks": "optional one tick is 16ms in default speed, default value is 0. 0 means no minimum.", 37 | "minimum_latency_in_ticks": 0, 38 | 39 | "_comment_max_heartbeats_per_second": "Network tick rate. Maximum rate game updates packets are sent at before bundling them together. Minimum value is 6, maximum value is 240.", 40 | "max_heartbeats_per_second": 60, 41 | 42 | "_comment_ignore_player_limit_for_returning_players": "Players that played on this map already can join even when the max player limit was reached.", 43 | "ignore_player_limit_for_returning_players": false, 44 | 45 | "_comment_allow_commands": "possible values are, true, false and admins-only", 46 | "allow_commands": "admins-only", 47 | 48 | "_comment_autosave_interval": "Autosave interval in minutes", 49 | "autosave_interval": 10, 50 | 51 | "_comment_autosave_slots": "server autosave slots, it is cycled through when the server autosaves.", 52 | "autosave_slots": 5, 53 | 54 | "_comment_afk_autokick_interval": "How many minutes until someone is kicked when doing nothing, 0 for never.", 55 | "afk_autokick_interval": 0, 56 | 57 | "_comment_auto_pause": "Whether should the server be paused when no players are present.", 58 | "auto_pause": true, 59 | 60 | "_comment_auto_pause_when_players_connect": "Whether should the server be paused when someone is connecting to the server.", 61 | "auto_pause_when_players_connect": false, 62 | 63 | "only_admins_can_pause_the_game": true, 64 | 65 | "_comment_autosave_only_on_server": "Whether autosaves should be saved only on server or also on all connected clients. Default is true.", 66 | "autosave_only_on_server": true, 67 | 68 | "_comment_non_blocking_saving": "Highly experimental feature, enable only at your own risk of losing your saves. On UNIX systems, server will fork itself to create an autosave. Autosaving on connected Windows clients will be disabled regardless of autosave_only_on_server option.", 69 | "non_blocking_saving": false, 70 | 71 | "_comment_segment_sizes": "Long network messages are split into segments that are sent over multiple ticks. Their size depends on the number of peers currently connected. Increasing the segment size will increase upload bandwidth requirement for the server and download bandwidth requirement for clients. This setting only affects server outbound messages. Changing these settings can have a negative impact on connection stability for some clients.", 72 | "minimum_segment_size": 25, 73 | "minimum_segment_size_peer_count": 20, 74 | "maximum_segment_size": 100, 75 | "maximum_segment_size_peer_count": 10 76 | } 77 | -------------------------------------------------------------------------------- /server-whitelist.example.json: -------------------------------------------------------------------------------- 1 | [ 2 | "Rseding91", 3 | "Oxyd" 4 | ] 5 | -------------------------------------------------------------------------------- /space-age/data-updates.lua: -------------------------------------------------------------------------------- 1 | -- Define default icons for space connections. 2 | for name, prototype in pairs(data.raw["space-connection"]) do 3 | local from = data.raw["space-location"][prototype.from] or data.raw["planet"][prototype.from] 4 | local to = data.raw["space-location"][prototype.to] or data.raw["planet"][prototype.to] 5 | if (not prototype.icon) and (not prototype.icons) and from and from.icon and to and to.icon then 6 | prototype.icons = 7 | { 8 | {icon = "__space-age__/graphics/icons/planet-route.png"}, 9 | {icon = from.icon, icon_size = from.icon_size or 64, scale = 0.333 * (64 / (from.icon_size or 64)), shift = {-6, -6}}, 10 | {icon = to.icon, icon_size = to.icon_size or 64, scale = 0.333 * (64 / (to.icon_size or 64)), shift = {6, 6}} 11 | } 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /space-age/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "space-age", 3 | "version": "2.0.56", 4 | "title": "Space Age", 5 | "author": "Wube Software", 6 | "contact": "dev@factorio.com", 7 | "homepage": "https://www.factorio.com", 8 | "dependencies": ["base >= 2.0.0", "elevated-rails >= 2.0.0", "quality >= 2.0.0"], 9 | "quality_required": true, 10 | "space_travel_required": true, 11 | "spoiling_required": true, 12 | "freezing_required": true, 13 | "segmented_units_required": true, 14 | "expansion_shaders_required": true, 15 | "factorio_version": "2.0" 16 | } 17 | -------------------------------------------------------------------------------- /space-age/migrations/aquilo-tilesets.json: -------------------------------------------------------------------------------- 1 | { 2 | "tile": 3 | [ 4 | ["snow", "snow-flat"], 5 | ["snow-2", "snow-crests"] 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /space-age/migrations/biolab.json: -------------------------------------------------------------------------------- 1 | { 2 | "item": 3 | [ 4 | ["biter-lab", "biolab"] 5 | ], 6 | "recipe": 7 | [ 8 | ["biter-lab", "biolab"], 9 | ["biter-lab-recycling", "biolab-recycling"] 10 | ], 11 | "technology": 12 | [ 13 | ["biter-lab", "biolab"] 14 | ], 15 | "entity": 16 | [ 17 | ["biter-lab", "biolab"] 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /space-age/migrations/jelly-yum-rename.json: -------------------------------------------------------------------------------- 1 | { 2 | "item": 3 | [ 4 | ["jelly-yum", "bioflux"] 5 | ], 6 | "recipe": 7 | [ 8 | ["jelly-yum", "bioflux"], 9 | ["nutrients-from-jelly-yum", "nutrients-from-bioflux"] 10 | ] 11 | } -------------------------------------------------------------------------------- /space-age/migrations/shattered-planet.json: -------------------------------------------------------------------------------- 1 | { 2 | "space-location": 3 | [ 4 | ["interstellar", "shattered-planet"] 5 | ], 6 | "item": 7 | [ 8 | ["interstellar-science-pack", "promethium-science-pack"], 9 | ["interstellar-asteroid-chunk", "promethium-asteroid-chunk"] 10 | ], 11 | "recipe": 12 | [ 13 | ["interstellar-science-pack", "promethium-science-pack"] 14 | ], 15 | "technology": 16 | [ 17 | ["interstellar-science-pack", "promethium-science-pack"] 18 | ], 19 | "asteroid-chunk": 20 | [ 21 | ["interstellar-asteroid-chunk", "promethium-asteroid-chunk"] 22 | ], 23 | "entity": 24 | [ 25 | ["small-interstellar-asteroid", "small-promethium-asteroid"], 26 | ["medium-interstellar-asteroid", "medium-promethium-asteroid"], 27 | ["big-interstellar-asteroid", "big-promethium-asteroid"], 28 | ["huge-interstellar-asteroid", "huge-promethium-asteroid"] 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /space-age/migrations/tungsten-belt-rename.json: -------------------------------------------------------------------------------- 1 | { 2 | "entity": 3 | [ 4 | ["tungsten-loader", "turbo-loader"], 5 | ["tungsten-splitter", "turbo-splitter"], 6 | ["tungsten-transport-belt", "turbo-transport-belt"], 7 | ["tungsten-underground-belt", "turbo-underground-belt"] 8 | ], 9 | "item": 10 | [ 11 | ["tungsten-loader", "turbo-loader"], 12 | ["tungsten-splitter", "turbo-splitter"], 13 | ["tungsten-transport-belt", "turbo-transport-belt"], 14 | ["tungsten-underground-belt", "turbo-underground-belt"] 15 | ], 16 | "recipe": 17 | [ 18 | ["tungsten-loader", "turbo-loader"], 19 | ["tungsten-splitter", "turbo-splitter"], 20 | ["tungsten-transport-belt", "turbo-transport-belt"], 21 | ["tungsten-underground-belt", "turbo-underground-belt"] 22 | ], 23 | "technology": 24 | [ 25 | ["tungsten-transport-belt", "turbo-transport-belt"] 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /space-age/prototypes/active-triggers.lua: -------------------------------------------------------------------------------- 1 | local function make_tesla_chain_lightning_chain(name, beam_name, max_jumps, jump_range, fork_chance, fork_chance_per_quality, beam_duration) 2 | return { 3 | name = name, 4 | type = "chain-active-trigger", 5 | max_jumps = max_jumps, 6 | max_range_per_jump = jump_range, 7 | jump_delay_ticks = 6, 8 | fork_chance = fork_chance, 9 | fork_chance_increase_per_quality_level = fork_chance_per_quality, 10 | action = 11 | { 12 | type = "direct", 13 | action_delivery = 14 | { 15 | type = "beam", 16 | beam = beam_name, 17 | max_length = jump_range + 0.5, 18 | duration = beam_duration, 19 | add_to_shooter = false, 20 | destroy_with_source_or_target = false, 21 | source_offset = {0, 0}, -- should match beam's target_offset 22 | }, 23 | }, 24 | } 25 | end 26 | 27 | data:extend( 28 | { 29 | make_tesla_chain_lightning_chain("chain-tesla-turret-chain", "chain-tesla-turret-beam-bounce", 10, 12, 0.05, 0.05, 30), 30 | make_tesla_chain_lightning_chain("chain-tesla-gun-chain", "chain-tesla-gun-beam-bounce", 12, 12, 0.3, 0.05, 30), 31 | }) 32 | -------------------------------------------------------------------------------- /space-age/prototypes/autoplace-controls.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "autoplace-control", 5 | name = "vulcanus_coal", 6 | localised_name = {"", "[entity=coal] ", {"entity-name.coal"}}, 7 | richness = true, 8 | order = "b-a", 9 | category = "resource" 10 | }, 11 | { 12 | type = "autoplace-control", 13 | name = "tungsten_ore", 14 | localised_name = {"", "[entity=tungsten-ore] ", {"entity-name.tungsten-ore"}}, 15 | richness = true, 16 | order = "b-d", 17 | category = "resource" 18 | }, 19 | { 20 | type = "autoplace-control", 21 | name = "calcite", 22 | localised_name = {"", "[entity=calcite] ", {"entity-name.calcite"}}, 23 | richness = true, 24 | order = "b-c", 25 | category = "resource" 26 | }, 27 | { 28 | type = "autoplace-control", 29 | name = "sulfuric_acid_geyser", 30 | localised_name = {"", "[entity=sulfuric-acid-geyser] ", {"entity-name.sulfuric-acid-geyser"}}, 31 | richness = true, 32 | order = "b-c", 33 | category = "resource" 34 | }, 35 | { 36 | type = "autoplace-control", 37 | name = "gleba_stone", 38 | localised_name = {"", "[entity=stone] ", {"entity-name.stone"}}, 39 | richness = true, 40 | order = "c-a", 41 | category = "resource" 42 | }, 43 | { 44 | type = "autoplace-control", 45 | name = "scrap", 46 | localised_name = {"", "[entity=scrap] ", {"entity-name.scrap"}}, 47 | richness = true, 48 | order = "d-a", 49 | category = "resource" 50 | }, 51 | { 52 | type = "autoplace-control", 53 | name = "aquilo_crude_oil", 54 | localised_name = {"", "[entity=crude-oil] ", {"entity-name.crude-oil"}}, 55 | richness = true, 56 | order = "e-a", 57 | category = "resource" 58 | }, 59 | { 60 | type = "autoplace-control", 61 | name = "fluorine_vent", 62 | localised_name = {"", "[entity=fluorine-vent] ", {"entity-name.fluorine-vent"}}, 63 | richness = true, 64 | order = "e-c", 65 | category = "resource" 66 | }, 67 | { 68 | type = "autoplace-control", 69 | name = "lithium_brine", 70 | localised_name = {"", "[entity=lithium-brine] ", {"entity-name.lithium-brine"}}, 71 | richness = true, 72 | order = "e-b", 73 | category = "resource" 74 | }, 75 | { 76 | type = "autoplace-control", 77 | name = "gleba_cliff", 78 | order = "c-z-b", 79 | category = "cliff" 80 | }, 81 | { 82 | type = "autoplace-control", 83 | name = "fulgora_cliff", 84 | order = "c-z-c", 85 | category = "cliff" 86 | }, 87 | { 88 | type = "autoplace-control", 89 | name = "vulcanus_volcanism", 90 | order = "c-z-a", 91 | category = "terrain", 92 | can_be_disabled = false 93 | }, 94 | { 95 | type = "autoplace-control", 96 | name = "gleba_water", 97 | order = "c-z-b", 98 | category = "terrain", 99 | can_be_disabled = false 100 | }, 101 | { 102 | type = "autoplace-control", 103 | name = "gleba_plants", 104 | order = "c-z-c", 105 | category = "terrain", 106 | can_be_disabled = false 107 | }, 108 | { 109 | type = "autoplace-control", 110 | name = "fulgora_islands", 111 | order = "c-z-d", 112 | category = "terrain", 113 | can_be_disabled = false 114 | }, 115 | { 116 | type = "autoplace-control", 117 | name = "gleba_enemy_base", 118 | richness = false, 119 | order = "z", 120 | category = "enemy", 121 | can_be_disabled = false, 122 | related_to_fight_achievements = true 123 | } 124 | } 125 | ) 126 | 127 | data.raw["autoplace-control"]["enemy-base"].can_be_disabled = false 128 | -------------------------------------------------------------------------------- /space-age/prototypes/burner-usage.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "burner-usage", 5 | name = "food", 6 | empty_slot_sprite = 7 | { 8 | filename = "__core__/graphics/icons/mip/empty-food-slot.png", 9 | priority = "extra-high-no-scale", 10 | size = 64, 11 | mipmap_count = 2, 12 | flags = {"gui-icon"}, 13 | }, 14 | empty_slot_caption = {"gui.food"}, 15 | empty_slot_description = {"gui.food-description"}, 16 | 17 | icon = 18 | { 19 | filename = "__core__/graphics/icons/alerts/food-icon-red.png", 20 | priority = "extra-high-no-scale", 21 | width = 64, 22 | height = 64, 23 | flags = {"icon"} 24 | }, 25 | no_fuel_status = {"entity-status.no-food"}, 26 | 27 | accepted_fuel_key = "description.accepted-food", 28 | burned_in_key = "digested-by", -- factoriopedia 29 | }, 30 | { 31 | type = "burner-usage", 32 | name = "nutrients", 33 | empty_slot_sprite = 34 | { 35 | filename = "__core__/graphics/icons/mip/empty-nutrients-slot.png", 36 | priority = "extra-high-no-scale", 37 | size = 64, 38 | mipmap_count = 2, 39 | flags = {"gui-icon"}, 40 | }, 41 | empty_slot_caption = {"gui.nutrients"}, 42 | empty_slot_description = {"gui.nutrients-description"}, 43 | 44 | icon = 45 | { 46 | filename = "__core__/graphics/icons/alerts/nutrients-icon-red.png", 47 | priority = "extra-high-no-scale", 48 | width = 64, 49 | height = 64, 50 | flags = {"icon"} 51 | }, 52 | no_fuel_status = {"entity-status.no-nutrients"}, 53 | 54 | accepted_fuel_key = "description.accepted-nutrients", 55 | burned_in_key = "eaten-by", -- factoriopedia 56 | } 57 | }) 58 | -------------------------------------------------------------------------------- /space-age/prototypes/categories/ammo-category.lua: -------------------------------------------------------------------------------- 1 | require ("bonus-gui-ordering") 2 | 3 | data:extend( 4 | { 5 | { 6 | type = "ammo-category", 7 | name = "railgun", 8 | icon = "__space-age__/graphics/icons/ammo-category/railgun.png", 9 | subgroup = "ammo-category" 10 | }, 11 | { 12 | type = "ammo-category", 13 | name = "tesla", 14 | icon = "__space-age__/graphics/icons/ammo-category/tesla.png", 15 | subgroup = "ammo-category" 16 | }, 17 | { 18 | type = "ammo-category", 19 | name = "seismic", 20 | hidden = true 21 | } 22 | } 23 | ) 24 | 25 | for k,v in pairs(data.raw["ammo-category"]) do 26 | if not v.bonus_gui_order then 27 | v.bonus_gui_order = bonus_gui_ordering[k] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /space-age/prototypes/categories/fuel-category.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "fuel-category", 5 | name = "food", 6 | fuel_value_type = {"description.food-energy-value"}, 7 | }, 8 | { 9 | type = "fuel-category", 10 | name = "nutrients", 11 | fuel_value_type = {"description.nutrients-energy-value"}, 12 | }, 13 | { 14 | type = "fuel-category", 15 | name = "fusion" 16 | } 17 | } 18 | ) 19 | -------------------------------------------------------------------------------- /space-age/prototypes/categories/recipe-category.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "recipe-category", 5 | name = "chemistry-or-cryogenics" 6 | }, 7 | { 8 | type = "recipe-category", 9 | name = "pressing" 10 | }, 11 | { 12 | type = "recipe-category", 13 | name = "crushing" 14 | }, 15 | { 16 | type = "recipe-category", 17 | name = "crafting-with-fluid-or-metallurgy" 18 | }, 19 | { 20 | type = "recipe-category", 21 | name = "metallurgy-or-assembling" 22 | }, 23 | { 24 | type = "recipe-category", 25 | name = "metallurgy" 26 | }, 27 | { 28 | type = "recipe-category", 29 | name = "organic" 30 | }, 31 | { 32 | type = "recipe-category", 33 | name = "organic-or-hand-crafting" 34 | }, 35 | { 36 | type = "recipe-category", 37 | name = "organic-or-assembling" 38 | }, 39 | { 40 | type = "recipe-category", 41 | name = "organic-or-chemistry" 42 | }, 43 | { 44 | type = "recipe-category", 45 | name = "captive-spawner-process" 46 | }, 47 | { 48 | type = "recipe-category", 49 | name = "electronics-or-assembling" 50 | }, 51 | { 52 | type = "recipe-category", 53 | name = "electronics" 54 | }, 55 | { 56 | type = "recipe-category", 57 | name = "electronics-with-fluid" 58 | }, 59 | { 60 | type = "recipe-category", 61 | name = "electromagnetics" 62 | }, 63 | { 64 | type = "recipe-category", 65 | name = "cryogenics-or-assembling" 66 | }, 67 | { 68 | type = "recipe-category", 69 | name = "cryogenics" 70 | } 71 | }) 72 | -------------------------------------------------------------------------------- /space-age/prototypes/categories/resource-category.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "resource-category", 5 | name = "hard-solid" 6 | } 7 | }) 8 | -------------------------------------------------------------------------------- /space-age/prototypes/entity/cargo-hatch.lua: -------------------------------------------------------------------------------- 1 | local sounds = require("__space-age__.prototypes.entity.sounds") 2 | 3 | local function hub_pod_shadow_offset() 4 | return {2, 2.5} 5 | end 6 | local function bay_pod_shadow_offset() 7 | return {1, 1.3} 8 | end 9 | 10 | local function placeholder_shared_bay_hatch_animation() 11 | return 12 | { 13 | layers = 14 | { 15 | util.sprite_load("__space-age__/graphics/entity/cargo-hubs/hatches/shared-bay-hatch", 16 | { 17 | priority = "high", 18 | frame_count = 21, 19 | animation_speed = 0.5, 20 | scale = 0.5, 21 | shift = util.by_pixel(11, 16), 22 | run_mode = "forward-then-backward" 23 | }), 24 | util.sprite_load("__space-age__/graphics/entity/cargo-hubs/hatches/shared-bay-hatch-shadow", 25 | { 26 | priority = "high", 27 | frame_count = 21, 28 | scale = 0.5, 29 | shift = util.by_pixel(11, 16), 30 | run_mode = "forward-then-backward", 31 | draw_as_shadow = true, 32 | }), 33 | util.sprite_load("__space-age__/graphics/entity/cargo-hubs/hatches/shared-bay-hatch-emission", 34 | { 35 | priority = "high", 36 | frame_count = 3, 37 | scale = 0.5, 38 | shift = util.by_pixel(11, 16), 39 | run_mode = "forward-then-backward", 40 | draw_as_glow = true, 41 | blend_mode = "additive", 42 | frame_sequence = {1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3} 43 | }), 44 | } 45 | } 46 | end 47 | 48 | function shared_bay_hatch(hatch_offset, hatch_illumination_index) 49 | return 50 | { 51 | hatch_graphics = placeholder_shared_bay_hatch_animation(), 52 | offset = hatch_offset, 53 | slice_height = 0.5, 54 | sky_slice_height = -0.5, 55 | travel_height = 3, 56 | pod_shadow_offset = hub_pod_shadow_offset(); 57 | illumination_graphic_index = hatch_illumination_index, 58 | cargo_unit_entity_to_spawn = "cargo-pod", 59 | receiving_cargo_units = {"cargo-pod"}, 60 | opening_sound = sounds.cargo_bay_hatch_opening_sound, 61 | closing_sound = sounds.cargo_bay_hatch_closing_sound, 62 | } 63 | end 64 | 65 | function platform_upper_hatch(hatch_offset, slice_offset, travel_offset, sky_slice_offset, hatch_illumination_index) 66 | return 67 | { 68 | hatch_graphics = nil, 69 | offset = hatch_offset, 70 | slice_height = slice_offset or 1, 71 | sky_slice_height = sky_slice_offset or -1, 72 | travel_height = travel_offset or 1, 73 | pod_shadow_offset = bay_pod_shadow_offset(); 74 | illumination_graphic_index = hatch_illumination_index, 75 | cargo_unit_entity_to_spawn = "", 76 | receiving_cargo_units = {"cargo-pod"} 77 | } 78 | end 79 | 80 | function platform_lower_hatch(hatch_offset, slice_offset, travel_offset, sky_slice_offset, hatch_illumination_index) 81 | return 82 | { 83 | hatch_graphics = nil, 84 | offset = hatch_offset, 85 | slice_height = slice_offset or 1, 86 | sky_slice_height = sky_slice_offset or -1, 87 | travel_height = travel_offset or 1, 88 | pod_shadow_offset = bay_pod_shadow_offset(); 89 | illumination_graphic_index = hatch_illumination_index, 90 | cargo_unit_entity_to_spawn = "cargo-pod", 91 | receiving_cargo_units = {} 92 | } 93 | end 94 | -------------------------------------------------------------------------------- /space-age/prototypes/entity/crusher-pictures.lua: -------------------------------------------------------------------------------- 1 | function crusher_integration_patch_horizontal() 2 | return util.sprite_load("__space-age__/graphics/entity/crusher/crusher-horizontal-integration", 3 | { 4 | scale = 0.5, 5 | shift = {0,0} 6 | }) 7 | end 8 | 9 | function crusher_integration_patch_vertical() 10 | return util.sprite_load("__space-age__/graphics/entity/crusher/crusher-vertical-integration", 11 | { 12 | scale = 0.5, 13 | shift = util.by_pixel( 0.0, 8), 14 | }) 15 | end 16 | 17 | function crusher_animation_horizontal_main() 18 | return util.sprite_load("__space-age__/graphics/entity/crusher/crusher-horizontal", 19 | { 20 | animation_speed = 0.5, 21 | frame_count = 48, 22 | scale = 0.5, 23 | shift = {0,0} 24 | }) 25 | end 26 | 27 | function crusher_animation_horizontal_shadow() 28 | return util.sprite_load("__space-age__/graphics/entity/crusher/crusher-horizontal-shadow", 29 | { 30 | animation_speed = 0.5, 31 | repeat_count = 48, 32 | scale = 0.5, 33 | draw_as_shadow = true, 34 | shift = {0,0} 35 | }) 36 | end 37 | 38 | function crusher_animation_vertical_main() 39 | return util.sprite_load("__space-age__/graphics/entity/crusher/crusher-vertical", 40 | { 41 | animation_speed = 0.5, 42 | frame_count = 48, 43 | scale = 0.5, 44 | shift = util.by_pixel( 0.0, 8), 45 | }) 46 | end 47 | 48 | function crusher_animation_vertical_shadow() 49 | return util.sprite_load("__space-age__/graphics/entity/crusher/crusher-vertical-shadow", 50 | { 51 | animation_speed = 0.5, 52 | repeat_count = 48, 53 | scale = 0.5, 54 | draw_as_shadow = true, 55 | shift = util.by_pixel( 0.0, 8), 56 | }) 57 | end 58 | 59 | function crusher_working_visualisations_horizontal() 60 | return util.sprite_load("__space-age__/graphics/entity/crusher/crusher-horizontal-light", 61 | { 62 | animation_speed = 0.5, 63 | repeat_count = 48, 64 | scale = 0.5, 65 | blend_mode = "additive", 66 | draw_as_glow = true, 67 | shift = {0,0} 68 | }) 69 | end 70 | 71 | function crusher_working_visualisations_vertical() 72 | return util.sprite_load("__space-age__/graphics/entity/crusher/crusher-vertical-light", 73 | { 74 | animation_speed = 0.5, 75 | repeat_count = 48, 76 | scale = 0.5, 77 | blend_mode = "additive", 78 | draw_as_glow = true, 79 | shift = util.by_pixel( 0.0, 8), 80 | }) 81 | end 82 | 83 | return { 84 | integration_patch_render_layer = "floor", 85 | integration_patch = { 86 | north = crusher_integration_patch_vertical(), 87 | east = crusher_integration_patch_horizontal(), 88 | south = crusher_integration_patch_vertical(), 89 | west = crusher_integration_patch_horizontal() 90 | }, 91 | animation = { 92 | north = 93 | { 94 | layers = { 95 | crusher_animation_vertical_main(), 96 | crusher_animation_vertical_shadow() 97 | } 98 | }, 99 | east = 100 | { 101 | layers = { 102 | crusher_animation_horizontal_main(), 103 | crusher_animation_horizontal_shadow() 104 | } 105 | }, 106 | south = 107 | { 108 | layers = { 109 | crusher_animation_vertical_main(), 110 | crusher_animation_vertical_shadow() 111 | } 112 | }, 113 | west = 114 | { 115 | layers = { 116 | crusher_animation_horizontal_main(), 117 | crusher_animation_horizontal_shadow() 118 | } 119 | } 120 | }, 121 | working_visualisations = { 122 | { 123 | fadeout = true, 124 | north_animation = crusher_working_visualisations_vertical(), 125 | east_animation = crusher_working_visualisations_horizontal(), 126 | south_animation = crusher_working_visualisations_vertical(), 127 | west_animation = crusher_working_visualisations_horizontal() 128 | } 129 | } 130 | } -------------------------------------------------------------------------------- /space-age/prototypes/entity/giga-cargo-hatch.lua: -------------------------------------------------------------------------------- 1 | local sounds = require ("__base__.prototypes.entity.sounds") 2 | 3 | local function placeholder_platform_upper_hatch_animation_back() 4 | return 5 | { 6 | layers = 7 | { 8 | util.sprite_load("__space-age__/graphics/entity/cargo-hubs/hatches/platform-upper-hatch-back", 9 | { 10 | scale = 0.5, 11 | shift = {0, -0.5}, 12 | run_mode = "forward", 13 | frame_count = 20 14 | }), 15 | util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/shared-upper-hatch-shadow", 16 | { 17 | scale = 0.5, 18 | shift = {4,-0.5}, --util.by_pixel(128, 0) 19 | run_mode = "forward", 20 | draw_as_shadow = true, 21 | frame_count = 20 22 | }), 23 | util.sprite_load("__base__/graphics/entity/cargo-hubs/hatches/shared-upper-back-hatch-emission", 24 | { 25 | scale = 0.5, 26 | shift = {0, -0.5}, 27 | run_mode = "forward", 28 | draw_as_glow = true, 29 | blend_mode = "additive", 30 | frame_count = 20 31 | }), 32 | util.sprite_load("__space-age__/graphics/entity/cargo-hubs/hatches/platform-upper-front-hatch-emission", 33 | { 34 | scale = 0.5, 35 | shift = {0, -0.5}, 36 | run_mode = "forward", 37 | draw_as_glow = true, 38 | blend_mode = "additive", 39 | frame_count = 3, 40 | frame_sequence = {1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3} 41 | }) 42 | } 43 | 44 | } 45 | end 46 | local function placeholder_platform_upper_hatch_animation_front() 47 | return 48 | { 49 | layers = 50 | { 51 | util.sprite_load("__space-age__/graphics/entity/cargo-hubs/hatches/platform-upper-hatch-front", 52 | { 53 | scale = 0.5, 54 | shift = {0, -0.5}, 55 | run_mode = "forward", 56 | frame_count = 20 57 | }), 58 | } 59 | } 60 | end 61 | 62 | local function placeholder_lower_upper_hatch_animation_back() 63 | return 64 | { 65 | layers = 66 | { 67 | util.sprite_load("__space-age__/graphics/entity/cargo-hubs/hatches/platform-lower-hatch-front-r", 68 | { 69 | scale = 0.5, 70 | shift = {0, -1}, 71 | run_mode = "forward", 72 | frame_count = 20 73 | }), 74 | util.sprite_load("__space-age__/graphics/entity/cargo-hubs/hatches/platform-lower-hatch-emission", 75 | { 76 | scale = 0.5, 77 | shift = {0, -1}, 78 | run_mode = "forward", 79 | draw_as_glow = true, 80 | blend_mode = "additive", 81 | frame_count = 3, 82 | frame_sequence = {1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3} 83 | }) 84 | } 85 | } 86 | end 87 | local function placeholder_lower_upper_hatch_animation_front() 88 | return 89 | { 90 | layers = 91 | { 92 | util.sprite_load("__space-age__/graphics/entity/cargo-hubs/hatches/platform-lower-hatch-front", 93 | { 94 | scale = 0.5, 95 | shift = {0, -1}, 96 | run_mode = "forward", 97 | frame_count = 20 98 | }) 99 | } 100 | } 101 | end 102 | 103 | function platform_upper_giga_hatch(covered) 104 | return 105 | { 106 | hatch_graphics_back = placeholder_platform_upper_hatch_animation_back(), 107 | hatch_render_layer_back = "above-inserters", 108 | hatch_graphics_front = placeholder_platform_upper_hatch_animation_front(), 109 | hatch_render_layer_front = "above-inserters", 110 | covered_hatches = covered, 111 | opening_sound = sounds.upper_giga_hatch_opening_sound, 112 | closing_sound = sounds.upper_giga_hatch_closing_sound, 113 | } 114 | end 115 | 116 | function platform_lower_giga_hatch(covered) 117 | return 118 | { 119 | hatch_graphics_back = placeholder_lower_upper_hatch_animation_back(), 120 | hatch_render_layer_back = "cargo-hatch", 121 | hatch_graphics_front = placeholder_lower_upper_hatch_animation_front(), 122 | hatch_render_layer_front = "cargo-hatch", 123 | covered_hatches = covered, 124 | opening_sound = sounds.lower_giga_hatch_opening_sound, 125 | closing_sound = sounds.lower_giga_hatch_closing_sound, 126 | } 127 | end 128 | -------------------------------------------------------------------------------- /space-age/prototypes/entity/gleba-ai-settings.lua: -------------------------------------------------------------------------------- 1 | return { destroy_when_commands_fail = true, allow_try_return_to_spawner = true } 2 | -------------------------------------------------------------------------------- /space-age/prototypes/entity/lightning-collector-graphics.lua: -------------------------------------------------------------------------------- 1 | require ("util") 2 | 3 | local function lightning_collector_picture(repeat_count) 4 | return 5 | { 6 | layers = 7 | { 8 | util.sprite_load("__space-age__/graphics/entity/lightning-collector/lightning-collector", 9 | { 10 | priority = "high", 11 | scale = 0.5, 12 | repeat_count = repeat_count 13 | }), 14 | util.sprite_load("__space-age__/graphics/entity/lightning-collector/lightning-collector-shadow", 15 | { 16 | priority = "high", 17 | draw_as_shadow = true, 18 | scale = 0.5, 19 | repeat_count = repeat_count 20 | }) 21 | } 22 | } 23 | end 24 | 25 | local function lightning_collector_charge() 26 | return 27 | { 28 | layers = 29 | { 30 | util.sprite_load("__space-age__/graphics/entity/lightning-collector/lightning-collector-charge", 31 | { 32 | priority = "high", 33 | blend_mode = "additive", 34 | scale = 0.5, 35 | frame_count = 19, 36 | draw_as_glow = true, 37 | }) 38 | } 39 | } 40 | end 41 | 42 | local function lightning_collector_discharge() 43 | return 44 | { 45 | layers = 46 | { 47 | util.sprite_load("__space-age__/graphics/entity/lightning-collector/lightning-collector-discharge", 48 | { 49 | priority = "high", 50 | blend_mode = "additive", 51 | scale = 0.5, 52 | frame_count = 24, 53 | draw_as_glow = true, 54 | }) 55 | } 56 | } 57 | end 58 | 59 | return 60 | { 61 | picture = lightning_collector_picture(), 62 | charge_animation = lightning_collector_charge(), 63 | charge_animation_is_looped = false, 64 | charge_cooldown = 30, 65 | discharge_animation = lightning_collector_discharge(), 66 | discharge_cooldown = 60 67 | --todo: charge light 68 | --todo: discharge light 69 | } 70 | -------------------------------------------------------------------------------- /space-age/prototypes/entity/lightning-rod-graphics.lua: -------------------------------------------------------------------------------- 1 | require ("util") 2 | 3 | local function lightning_rod_picture(repeat_count) 4 | return 5 | { 6 | layers = 7 | { 8 | util.sprite_load("__space-age__/graphics/entity/lightning-rod/lightning-rod", 9 | { 10 | priority = "high", 11 | scale = 0.5, 12 | repeat_count = repeat_count 13 | }), 14 | util.sprite_load("__space-age__/graphics/entity/lightning-rod/lightning-rod-shadow", 15 | { 16 | priority = "high", 17 | draw_as_shadow = true, 18 | scale = 0.5, 19 | repeat_count = repeat_count 20 | }) 21 | } 22 | } 23 | end 24 | 25 | local function lightning_rod_charge() 26 | return 27 | { 28 | layers = 29 | { 30 | util.sprite_load("__space-age__/graphics/entity/lightning-rod/lightning-rod-charge", 31 | { 32 | priority = "high", 33 | blend_mode = "additive", 34 | scale = 0.5, 35 | frame_count = 24, 36 | draw_as_glow = true, 37 | }) 38 | } 39 | } 40 | end 41 | 42 | local function lightning_rod_discharge() 43 | return 44 | { 45 | layers = 46 | { 47 | util.sprite_load("__space-age__/graphics/entity/lightning-rod/lightning-rod-discharge", 48 | { 49 | priority = "high", 50 | blend_mode = "additive", 51 | scale = 0.5, 52 | frame_count = 24, 53 | draw_as_glow = true, 54 | }) 55 | } 56 | } 57 | end 58 | 59 | return 60 | { 61 | picture = lightning_rod_picture(), 62 | charge_animation = lightning_rod_charge(), 63 | charge_animation_is_looped = false, 64 | charge_cooldown = 30, 65 | discharge_animation = lightning_rod_discharge(), 66 | discharge_cooldown = 60 67 | --todo: charge light 68 | --todo: discharge light 69 | } 70 | -------------------------------------------------------------------------------- /space-age/prototypes/entity/mech-armor-animations.lua: -------------------------------------------------------------------------------- 1 | local idle_sequence = 2 | { 3 | 1, 2, 3, 4, 4, 3, 2, 1, 1, 2, 4 | 3, 4, 4, 3, 2, 1, 1, 2, 3, 4, 5 | 5, 6, 7, 8, 9,10,11,12,13,14, 6 | 15,16,17,18,19,20,21,22 7 | } 8 | 9 | local function mech_anim(name, table, light) 10 | 11 | table.scale = table.scale or 0.5 12 | local mask_table = {} 13 | local light_table = {} 14 | local shadow_table = {} 15 | 16 | for k,v in pairs(table) do 17 | light_table[k] = v 18 | mask_table[k] = v 19 | shadow_table[k] = v 20 | end 21 | mask_table.apply_runtime_tint = true 22 | shadow_table.draw_as_shadow = true 23 | local base_path = "__space-age__/graphics/entity/mech-armor/" 24 | local anim = 25 | { 26 | layers = { 27 | util.sprite_load(base_path .. name, table), 28 | util.sprite_load(base_path .. name .. "-mask", mask_table), 29 | util.sprite_load(base_path .. name .. "-shadow", shadow_table), 30 | } 31 | } 32 | 33 | light = light or false 34 | if light then 35 | light_table.blend_mode = "additive" 36 | light_table.draw_as_light = true 37 | anim.layers[4] = util.sprite_load(base_path .. name .. "-light", light_table) 38 | end 39 | 40 | return anim 41 | end 42 | 43 | local idle_anim = mech_anim("mech-idle", 44 | { 45 | frame_count = 22, 46 | animation_speed = 0.16, 47 | frame_sequence = idle_sequence, 48 | direction_count = 8, 49 | usage = "player", 50 | }) 51 | 52 | local run_anim = mech_anim("mech-run", 53 | { 54 | frame_count = 22, 55 | direction_count = 40, 56 | animation_speed = 0.37, 57 | usage = "player", 58 | }) 59 | 60 | local mining_anim = mech_anim("mech-mining", 61 | { 62 | frame_count = 27, 63 | animation_speed = 0.45, 64 | direction_count = 8, 65 | usage = "player", 66 | }) 67 | 68 | local take_off = mech_anim("mech-uplift", 69 | { 70 | frame_count = 16, 71 | animation_speed = 0.6, 72 | direction_count = 8, 73 | usage = "player", 74 | }, true) 75 | 76 | local landing = mech_anim("mech-descend", 77 | { 78 | frame_count = 16, 79 | animation_speed = 0.6, 80 | direction_count = 8, 81 | usage = "player", 82 | }, true) 83 | 84 | local idle_air = mech_anim("mech-idle-air", 85 | { 86 | frame_count = 5, 87 | animation_speed = 0.2, 88 | --frame_sequence = idle_air_sequence, 89 | direction_count = 8, 90 | usage = "player", 91 | }, true) 92 | 93 | local corpse = mech_anim("mech-corpse", 94 | { 95 | frame_count = 2, 96 | animation_speed = 1, 97 | usage = "player", 98 | }, false) 99 | 100 | table.insert(data.raw.character.character.animations, 101 | { 102 | armors = {"mech-armor"}, 103 | idle_with_gun = idle_anim, 104 | mining_with_tool = mining_anim, 105 | mining_with_tool_particles_animation_positions = {10, 25}, 106 | running_with_gun = run_anim, 107 | idle_with_gun_in_air = idle_air, 108 | take_off = take_off, 109 | landing = landing, 110 | smoke_cycles_per_tick = 0.25, 111 | extra_smoke_cycles_per_tile = 1.5, 112 | smoke_in_air = 113 | { 114 | { 115 | name = "mech-armor-smoke", 116 | deviation = {0.2, 0.2}, 117 | frequency = 5, 118 | position = {0.25, 1.0}, 119 | has_8_directions = true, 120 | north_position = {0, 1.0 + 0.15}, 121 | north_east_position = {-0.5303, 0.8838}, 122 | east_position = {-0.9, 0.75}, 123 | south_east_position = {-0.8838 + 0.5, -0.5303 + 0.5}, 124 | south_position = {0, 1.0 - 0.5}, 125 | south_west_position = {0.5303, -0.8838 + 0.5}, 126 | west_position = {1, 0.75}, 127 | north_west_position = {0.8838 - 0.5, 0.5303 + 0.5}, 128 | starting_frame = 0, 129 | starting_frame_deviation = 60, 130 | starting_vertical_speed = -0.1, 131 | starting_vertical_speed_deviation = 0.04, 132 | height = 1 133 | } 134 | } 135 | }) 136 | 137 | table.insert(data.raw['character-corpse']['character-corpse'].pictures, corpse) 138 | data.raw['character-corpse']['character-corpse'].armor_picture_mapping["mech-armor"] = #data.raw['character-corpse']['character-corpse'].pictures 139 | -------------------------------------------------------------------------------- /space-age/prototypes/entity/projectiles.lua: -------------------------------------------------------------------------------- 1 | local explosion_animations = require("__base__.prototypes.entity.explosion-animations") 2 | 3 | data:extend( 4 | { 5 | 6 | { 7 | type = "projectile", 8 | name = "capture-robot-rocket", 9 | flags = {"not-on-map"}, 10 | hidden = true, 11 | acceleration = 0.005, 12 | action = 13 | { 14 | type = "direct", 15 | action_delivery = 16 | { 17 | type = "instant", 18 | target_effects = 19 | { 20 | type = "create-entity", 21 | show_in_tooltip = true, 22 | entity_name = "capture-robot", 23 | offsets = {{0, 0}} 24 | } 25 | } 26 | }, 27 | --light = {intensity = 0.5, size = 4}, 28 | enable_drawing_with_mask = true, 29 | animation = 30 | { 31 | layers = 32 | { 33 | util.sprite_load("__space-age__/graphics/entity/capture-robot-rocket/capture-robot", 34 | { 35 | direction_count = 32, 36 | scale = 0.5, 37 | priority = "high" 38 | }), 39 | util.sprite_load("__space-age__/graphics/entity/capture-robot-rocket/capture-robot-mask", 40 | { 41 | direction_count = 32, 42 | scale = 0.5, 43 | priority = "high", 44 | apply_runtime_tint = true 45 | }), 46 | util.sprite_load("__space-age__/graphics/entity/capture-robot-rocket/capture-robot-shadow", 47 | { 48 | direction_count = 32, 49 | scale = 0.5, 50 | priority = "high", 51 | draw_as_shadow = true 52 | }), 53 | } 54 | }, 55 | rotatable = false, 56 | smoke = 57 | { 58 | { 59 | name = "smoke-train-stop", 60 | deviation = {0.15, 0.15}, 61 | frequency = 1, 62 | position = {0, 0.5}, 63 | starting_frame = 3, 64 | starting_frame_deviation = 5, 65 | height = 2, 66 | starting_vertical_speed = -0.1, 67 | starting_vertical_speed_deviation = 0.05 68 | } 69 | } 70 | } 71 | } 72 | ) 73 | -------------------------------------------------------------------------------- /space-age/prototypes/entity/space-enemy-autoplace-utils.lua: -------------------------------------------------------------------------------- 1 | local base_enemy_autoplace = require ("__base__.prototypes.entity.enemy-autoplace-utils") 2 | 3 | local function gleba_spawner_autoplace(probability_expression, order) 4 | return base_enemy_autoplace.enemy_autoplace{ 5 | control = "gleba_enemy_base", 6 | probability_expression = probability_expression, 7 | order = order or "b[enemy]-c[spawner]", 8 | } 9 | end 10 | 11 | return 12 | { 13 | gleba_spawner_autoplace = gleba_spawner_autoplace, 14 | } 15 | -------------------------------------------------------------------------------- /space-age/prototypes/equipment-grid.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "equipment-grid", 5 | name = "huge-equipment-grid", 6 | width = 10, 7 | height = 12, 8 | equipment_categories = {"armor"} 9 | } 10 | } 11 | ) 12 | -------------------------------------------------------------------------------- /space-age/prototypes/equipment.lua: -------------------------------------------------------------------------------- 1 | 2 | data:extend( 3 | { 4 | { 5 | type = "inventory-bonus-equipment", 6 | name = "toolbelt-equipment", 7 | sprite = 8 | { 9 | filename = "__space-age__/graphics/equipment/toolbelt-equipment.png", 10 | width = 192, 11 | height = 64, 12 | priority = "medium", 13 | scale = 0.5 14 | }, 15 | shape = 16 | { 17 | width = 3, 18 | height = 1, 19 | type = "full" 20 | }, 21 | categories = {"armor"}, 22 | inventory_size_bonus = 10 23 | }, 24 | { 25 | type = "battery-equipment", 26 | name = "battery-mk3-equipment", 27 | sprite = 28 | { 29 | filename = "__space-age__/graphics/equipment/battery-mk3-equipment.png", 30 | width = 64, 31 | height = 144, 32 | priority = "medium", 33 | scale = 0.5 34 | }, 35 | shape = 36 | { 37 | width = 1, 38 | height = 2, 39 | type = "full" 40 | }, 41 | energy_source = 42 | { 43 | type = "electric", 44 | buffer_capacity = "250MJ", 45 | usage_priority = "tertiary" 46 | }, 47 | categories = {"armor"} 48 | }, 49 | { 50 | type = "generator-equipment", 51 | name = "fusion-reactor-equipment", 52 | sprite = 53 | { 54 | filename = "__space-age__/graphics/equipment/fusion-reactor-equipment.png", 55 | width = 256, 56 | height = 256, 57 | priority = "medium", 58 | scale = 0.5 59 | }, 60 | shape = 61 | { 62 | width = 4, 63 | height = 4, 64 | type = "full" 65 | --[[ Can also be defined as manual (a set of points which fall within the width/height - can't be empty) 66 | type = "manual", 67 | points = {{0, 0}, {1, 0}, {2, 0}, {3, 0}, 68 | {0, 1}, {3, 1}, 69 | {0, 2}, {3, 2}, 70 | {0, 3}, {1, 3}, {2, 3}, {3, 3},} 71 | ]]-- 72 | }, 73 | energy_source = 74 | { 75 | type = "electric", 76 | usage_priority = "primary-output" 77 | }, 78 | power = "2500kW", 79 | categories = {"armor"} 80 | }, 81 | } 82 | ) 83 | -------------------------------------------------------------------------------- /space-age/prototypes/item-groups.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "item-subgroup", 5 | name = "vulcanus-processes", 6 | group = "intermediate-products", 7 | order = "k" 8 | }, 9 | { 10 | type = "item-subgroup", 11 | name = "fulgora-processes", 12 | group = "intermediate-products", 13 | order = "l" 14 | }, 15 | { 16 | type = "item-subgroup", 17 | name = "agriculture-processes", 18 | group = "intermediate-products", 19 | order = "m" 20 | }, 21 | { 22 | type = "item-subgroup", 23 | name = "agriculture-products", 24 | group = "intermediate-products", 25 | order = "n" 26 | }, 27 | { 28 | type = "item-subgroup", 29 | name = "nauvis-agriculture", 30 | group = "intermediate-products", 31 | order = "o" 32 | }, 33 | { 34 | type = "item-subgroup", 35 | name = "aquilo-processes", 36 | group = "intermediate-products", 37 | order = "p" 38 | }, 39 | -------------------------------------------------------------------------- LOGISTICS 40 | 41 | -------------------------------------------------------------------------- PRODUCTION 42 | { 43 | type = "item-subgroup", 44 | name = "agriculture", 45 | group = "production", 46 | order = "da" 47 | }, 48 | { 49 | type = "item-subgroup", 50 | name = "environmental-protection", 51 | group = "production", 52 | order = "f" 53 | }, 54 | -------------------------------------------------------------------------- SPACE 55 | { 56 | type = "item-group", 57 | name = "space", 58 | order = "d", 59 | icon = "__space-age__/graphics/item-group/space.png", 60 | icon_size = 128, 61 | }, 62 | { 63 | type = "item-subgroup", 64 | name = "space-interactors", 65 | group = "space", 66 | order = "a" 67 | }, 68 | { 69 | type = "item-subgroup", 70 | name = "space-platform", 71 | group = "space", 72 | order = "a" 73 | }, 74 | { 75 | type = "item-subgroup", 76 | name = "space-rocket", 77 | group = "space", 78 | order = "b" 79 | }, 80 | { 81 | type = "item-subgroup", 82 | name = "space-environment", 83 | group = "space", 84 | order = "f" 85 | }, 86 | { 87 | type = "item-subgroup", 88 | name = "space-material", 89 | group = "space", 90 | order = "g" 91 | }, 92 | { 93 | type = "item-subgroup", 94 | name = "space-crushing", 95 | group = "space", 96 | order = "h" 97 | }, 98 | { 99 | type = "item-subgroup", 100 | name = "space-processing", 101 | group = "space", 102 | order = "i" 103 | }, 104 | { 105 | type = "item-subgroup", 106 | name = "planets", 107 | group = "space", 108 | order = "j" 109 | }, 110 | { 111 | type = "item-subgroup", 112 | name = "planet-connections", 113 | group = "space", 114 | order = "k" 115 | }, 116 | -------------------------------------------------------------------------- REMNANTS 117 | { 118 | type = "item-subgroup", 119 | name = "agriculture-remnants", 120 | group = "environment", 121 | order = "dja" 122 | }, 123 | { 124 | type = "item-subgroup", 125 | name = "environmental-protection-remnants", 126 | group = "environment", 127 | order = "dkb" 128 | }, 129 | { 130 | type = "item-subgroup", 131 | name = "space-platform-remnants", 132 | group = "environment", 133 | order = "eb" 134 | }, 135 | -------------------------------------------------------------------------- EXPLOSIONS 136 | { 137 | type = "item-subgroup", 138 | name = "agriculture-explosions", 139 | group = "effects", 140 | order = "bca" 141 | }, 142 | { 143 | type = "item-subgroup", 144 | name = "environmental-protection-explosions", 145 | group = "effects", 146 | order = "bdb" 147 | }, 148 | { 149 | type = "item-subgroup", 150 | name = "space-platform-explosions", 151 | group = "effects", 152 | order = "c" 153 | }, 154 | } 155 | ) 156 | -------------------------------------------------------------------------------- /space-age/prototypes/item_sounds.lua: -------------------------------------------------------------------------------- 1 | local function item_sound(filename, volume) 2 | return 3 | { 4 | filename = "__space-age__/sound/item/"..filename, 5 | volume = volume, 6 | aggregation = {max_count = 1, remove = true}, 7 | } 8 | end 9 | 10 | local space_age_item_sounds = 11 | { 12 | ice_inventory_move = item_sound("ice-inventory-move.ogg", 0.4), 13 | ice_inventory_pickup = item_sound("ice-inventory-pickup.ogg", 0.4), 14 | rocket_inventory_move = item_sound("thruster-inventory-move.ogg", 0.6), 15 | rocket_inventory_pickup = item_sound("thruster-inventory-pickup.ogg", 0.6), 16 | agriculture_inventory_move = item_sound("agriculture-inventory-move.ogg", 0.5), 17 | agriculture_inventory_pickup = item_sound("agriculture-inventory-pickup.ogg", 0.5), 18 | rock_inventory_move = item_sound("rock-inventory-move.ogg", 0.45), 19 | rock_inventory_pickup = item_sound("rock-inventory-pickup.ogg", 0.45), 20 | } 21 | 22 | return space_age_item_sounds 23 | -------------------------------------------------------------------------------- /space-age/prototypes/planet/general/general-functions.lua: -------------------------------------------------------------------------------- 1 | local pvariables = require("__space-age__/prototypes/planet/general/general-variables") 2 | 3 | local general_functions = {} 4 | general_functions.make_rocket_part = function(name, graphicid, layer, animated, frameslist) 5 | return 6 | { 7 | type = "single-graphic", 8 | name = name, 9 | render_layer = layer, 10 | relative_to = "pod", 11 | rotates_with_pod = false, 12 | shift_rotates_with_pod = false, 13 | is_passenger_only = true, 14 | clip_with_hatches = false, 15 | animation_driven_by_curve = animated, 16 | start_time = pvariables.impostor_start_tick, 17 | graphic = { type = "pod-catalogue", catalogue_id = graphicid }, 18 | frames = frameslist 19 | } 20 | end 21 | 22 | general_functions.make_pod_overlay = function(name, graphicid, order, t_start, t_end, animated, frameslist) 23 | return 24 | { 25 | type = "single-graphic", 26 | name = name, 27 | render_layer = "air-object", 28 | secondary_draw_order = order, 29 | relative_to = "pod", 30 | rotates_with_pod = true, 31 | shift_rotates_with_pod = true, 32 | is_passenger_only = false, 33 | clip_with_hatches = true, 34 | animation_driven_by_curve = animated, 35 | start_time = t_start, 36 | end_time = t_end, 37 | graphic = { type = "pod-catalogue", catalogue_id = graphicid }, 38 | frames = frameslist 39 | } 40 | end 41 | 42 | 43 | general_functions.make_private_pod_overlay = function(name, graphicid, order, t_start, t_end, animated, frameslist) 44 | return 45 | { 46 | type = "single-graphic", 47 | name = name, 48 | render_layer = "air-object", 49 | secondary_draw_order = order, 50 | relative_to = "pod", 51 | rotates_with_pod = true, 52 | shift_rotates_with_pod = true, 53 | is_passenger_only = true, 54 | clip_with_hatches = true, 55 | animation_driven_by_curve = animated, 56 | start_time = t_start, 57 | end_time = t_end, 58 | graphic = { type = "pod-catalogue", catalogue_id = graphicid }, 59 | frames = frameslist 60 | } 61 | end 62 | 63 | general_functions.make_pod_animation = function(name, graphicid, t_start, t_end, frameslist) 64 | return 65 | { 66 | type = "pod-animation", 67 | name = name, 68 | start_time = t_start, 69 | end_time = t_end, 70 | graphic = { type = "pod-catalogue", catalogue_id = graphicid }, 71 | frames = frameslist 72 | } 73 | end 74 | 75 | general_functions.jet_burst = function(jet_start, jet_time, gfx_start, gfx_loop) 76 | return 77 | { 78 | general_functions.make_pod_overlay("podjet", gfx_start, -1, jet_start, jet_start+10, true, 79 | { 80 | { timestamp = jet_start, frame = 0 }, 81 | { timestamp = jet_start+10, frame = 9 } 82 | }), 83 | general_functions.make_pod_overlay("podjet", gfx_loop, -1, jet_start+10, jet_start+10+jet_time, false, {}), 84 | general_functions.make_pod_overlay("podjet", gfx_start, -1, jet_start+10+jet_time, jet_start+20+jet_time, true, 85 | { 86 | { timestamp = jet_start+10+jet_time, frame = 9 }, 87 | { timestamp = jet_start+20+jet_time, frame = 0 } 88 | }) 89 | } 90 | end 91 | 92 | general_functions.conc2 = function(t1,t2) 93 | local temp = {} 94 | for i=1,#t1 do 95 | temp[i] = util.table.deepcopy(t1[i]) 96 | end 97 | for i=1,#t2 do 98 | temp[#temp+1] = util.table.deepcopy(t2[i]) 99 | end 100 | return temp 101 | end 102 | general_functions.conc3 = function(t1,t2,t3) 103 | local temp = {} 104 | temp = general_functions.conc2(general_functions.conc2(t1,t2),t3) 105 | return temp 106 | end 107 | general_functions.conc4 = function(t1,t2,t3,t4) 108 | local temp = {} 109 | temp = general_functions.conc2(general_functions.conc2(t1,t2),general_functions.conc2(t3,t4)) 110 | return temp 111 | end 112 | 113 | return general_functions; 114 | -------------------------------------------------------------------------------- /space-age/prototypes/planet/general/general-variables.lua: -------------------------------------------------------------------------------- 1 | return 2 | { 3 | platform_to_planet_duration_a = 400, 4 | platform_to_planet_duration_b = 600, 5 | platform_to_planet_hatch_open = 180, 6 | 7 | impostor_start_tick = 400, 8 | rocket_separation_tick = 700, 9 | rocket_separation_end_tick = 700 + 100, 10 | flight_duration = 1200, 11 | solo_duration = 800, 12 | } 13 | -------------------------------------------------------------------------------- /space-age/prototypes/planet/general/planet-to-platform.lua: -------------------------------------------------------------------------------- 1 | local procession_style = require("__base__/prototypes/planet/procession-style") 2 | local procession_graphic_catalogue = require("__base__/prototypes/planet/procession-graphic-catalogue-types") 3 | 4 | local spaceLayers = require("__space-age__/prototypes/planet/general/planet-to-platform/space-layers") 5 | local cloudLayers = require("__space-age__/prototypes/planet/general/planet-to-platform/cloud-layers") 6 | local rocketLayers = require("__space-age__/prototypes/planet/general/planet-to-platform/rocket-layers") 7 | local podLayersA = require("__space-age__/prototypes/planet/general/planet-to-platform/pod-layers-a") 8 | local podLayersB = require("__space-age__/prototypes/planet/general/planet-to-platform/pod-layers-b") 9 | local podLayersI = require("__space-age__/prototypes/planet/general/planet-to-platform/pod-layers-i") 10 | 11 | local audio = require("__space-age__/prototypes/planet/general/planet-to-platform/audio-events") 12 | 13 | local pvariables = require("__space-age__/prototypes/planet/general/general-variables") 14 | local pfunctions = require("__space-age__/prototypes/planet/general/general-functions") 15 | 16 | data:extend( 17 | { 18 | { 19 | type = "procession", 20 | name = "planet-to-platform-a", 21 | usage = "departure", 22 | procession_style = procession_style.pod_right_generic, 23 | timeline = 24 | { 25 | duration = 1200, 26 | special_action_tick = pvariables.impostor_start_tick-1, 27 | draw_switch_tick = pvariables.impostor_start_tick, 28 | layers = pfunctions.conc4(spaceLayers.departure, podLayersA, cloudLayers, rocketLayers), 29 | audio_events = audio.a 30 | } 31 | }, 32 | { 33 | type = "procession", 34 | name = "planet-to-platform-b", 35 | usage = "arrival", 36 | procession_style = procession_style.pod_right_generic, 37 | timeline = 38 | { 39 | duration = 350, 40 | layers = pfunctions.conc2(spaceLayers.arrival, podLayersB), 41 | audio_events = audio.b 42 | } 43 | }, 44 | { 45 | type = "procession", 46 | name = "planet-to-platform-intermezzo", 47 | usage = "intermezzo", 48 | procession_style = procession_style.pod_right_generic, 49 | timeline = 50 | { 51 | duration = 100, 52 | intermezzo_min_duration = 10, 53 | intermezzo_max_duration = 35, 54 | layers = pfunctions.conc2(spaceLayers.intermezzo, podLayersI), 55 | audio_events = audio.i 56 | } 57 | } 58 | }) 59 | -------------------------------------------------------------------------------- /space-age/prototypes/planet/general/planet-to-platform/audio-events.lua: -------------------------------------------------------------------------------- 1 | local procession_audio_catalogue_types = require("__base__/prototypes/planet/procession-audio-catalogue-types") 2 | 3 | local playSound = function(time, sound) 4 | return 5 | { 6 | timestamp = time, 7 | type = "play-sound", 8 | usage = "both", 9 | audio = 10 | { 11 | type = "pod-catalogue", 12 | catalogue_id = sound 13 | } 14 | } 15 | end 16 | 17 | local to_platform_audio = {} 18 | to_platform_audio.a = 19 | { 20 | playSound(710, procession_audio_catalogue_types.rocket_claws_open), 21 | playSound(790, procession_audio_catalogue_types.pod_thruster_burst_2), 22 | playSound(920, procession_audio_catalogue_types.pod_thruster_burst_3), 23 | } 24 | 25 | to_platform_audio.i = 26 | {} 27 | 28 | to_platform_audio.b = 29 | { 30 | playSound(130, procession_audio_catalogue_types.pod_thruster_burst_1), 31 | playSound(200, procession_audio_catalogue_types.pod_thruster_burst_4), 32 | } 33 | return to_platform_audio 34 | -------------------------------------------------------------------------------- /space-age/prototypes/planet/general/planet-to-platform/pod-layers-i.lua: -------------------------------------------------------------------------------- 1 | local procession_style = require("__base__/prototypes/planet/procession-style") 2 | local procession_graphic_catalogue = require("__base__/prototypes/planet/procession-graphic-catalogue-types") 3 | 4 | local pod_layers = 5 | { 6 | { 7 | type = "pod-movement", 8 | frames = 9 | { 10 | { timestamp = 0 , tilt = 0.125, tilt_t = 0, offset = {0, 0} } 11 | } 12 | }, 13 | { 14 | type = "pod-distance-traveled", 15 | frames = 16 | { 17 | { timestamp = 0 , distance = 0.0 }, 18 | { timestamp = 50, distance = 512.0/20.0 }, 19 | } 20 | }, 21 | { 22 | type = "pod-opacity", 23 | lut = "__core__/graphics/color_luts/lut-day.png", 24 | frames = {{ timestamp = 0, cutscene_opacity = 1, outside_opacity = 0, lut_blend = 1, environment_volume = 0, environment_muffle_intensity = 1}} 25 | }, 26 | } 27 | return pod_layers 28 | -------------------------------------------------------------------------------- /space-age/prototypes/planet/general/planet-to-platform/space-layers.lua: -------------------------------------------------------------------------------- 1 | local procession_style = require("__base__/prototypes/planet/procession-style") 2 | local procession_graphic_catalogue = require("__base__/prototypes/planet/procession-graphic-catalogue-types") 3 | 4 | local cloud_wipe_tick = 550 5 | local rocket_separation_tick = 400 6 | local flight_duration = 1200 7 | local solo_duration = 800 8 | 9 | local space_bg_strength = { 0.6, 0.6 } 10 | local space_star_strength = { 0.8, 0.8 } 11 | 12 | local dpt_spd = 1.5 13 | local space_layers = {} 14 | space_layers.departure = 15 | { 16 | { --stars 17 | type = "cover-graphic", 18 | name = "space paralax stars", 19 | render_layer = "floor", 20 | secondary_draw_order = -20, 21 | 22 | texture_relative_to = "ground-origin", 23 | distance_traveled_strength = { 0.0, 0.0 }, 24 | pod_movement_strength = space_star_strength, 25 | reference_group = "procession-stars-bg", 26 | 27 | world_size = { 1024, 1024 }, 28 | graphic = { type = "location-catalogue", catalogue_id = procession_graphic_catalogue.planet_stars_background }, 29 | mask_graphic = { type = "location-catalogue", catalogue_id = procession_graphic_catalogue.planet_cloudscape_mask }, 30 | effect = 31 | { 32 | style = "horizontal-stripe", 33 | relative_to = "pod" 34 | }, 35 | frames = 36 | { 37 | { timestamp = 0, effect_scale_min = 1.4 }, 38 | { timestamp = 0, effect_scale_max = 1.7 }, 39 | { timestamp = 0, effect_shift = {0, 3} }, 40 | { timestamp = 650, effect_shift = {0, 0} }, 41 | { timestamp = 550, effect_shift_rate = 0 }, 42 | { timestamp = 650, effect_shift_rate = 1 }, 43 | 44 | { timestamp = cloud_wipe_tick, offset = {3, -10}, offset_t = {0, 8} }, 45 | { timestamp = flight_duration, offset = {0, 0}, offset_t = {-3, 3} }, 46 | --[[ 47 | [ 48 | { "timestamp": 0, "offset": { "x":3, "y":-10 }, "offset_t" : { "x":0, "y":6 }}, 49 | { "timestamp": 100, "offset": { "x":0, "y":0 }, "offset_t" : { "x":-3, "y":3 }} 50 | ] 51 | ]]-- 52 | { timestamp=rocket_separation_tick, offset_rate = 0, offset_rate_t = 0 }, 53 | { timestamp=flight_duration, offset_rate = 1.6, offset_rate_t = -0.6 }, 54 | --[[ 55 | [ 56 | { "timestamp": 500, "offset_rate": { "x":0 }, "offset_rate_t" : { "x":0 }}, 57 | { "timestamp": 998, "offset_rate": { "x":1.6 }, "offset_rate_t" : { "x":-0.6 }} 58 | ] 59 | ]]-- 60 | } 61 | } 62 | } 63 | 64 | local spd = 1.1 65 | space_layers.intermezzo = 66 | { 67 | { 68 | type = "cover-graphic", 69 | name = "space paralax stars", 70 | render_layer = "floor", 71 | secondary_draw_order = -20, 72 | 73 | texture_relative_to = "ground-origin", 74 | distance_traveled_strength = { 0.0, 0.0 }, 75 | pod_movement_strength = space_star_strength, 76 | reference_group = "procession-stars-bg", 77 | inherit_from = "procession-stars-bg", 78 | 79 | world_size = { 1024, 1024 }, 80 | graphic = { type = "location-catalogue", catalogue_id = procession_graphic_catalogue.planet_stars_background }, 81 | frames = 82 | { 83 | { timestamp = 0 , offset = { 0.0, 0.0 } }, 84 | { timestamp = 50, offset = { -0.4 * spd, 0.4 * spd} } 85 | } 86 | } 87 | } 88 | 89 | local arrival_space_fade_start = 50 90 | local arrival_space_fade_end = 150 91 | space_layers.arrival = 92 | { 93 | { -- space paralax stars 94 | type = "cover-graphic", 95 | name = "space paralax stars", 96 | render_layer = "floor", 97 | secondary_draw_order = -20, 98 | 99 | texture_relative_to = "spawn-origin", 100 | distance_traveled_strength = { 0.0, 0.0 }, 101 | pod_movement_strength = space_star_strength, 102 | inherit_from = "procession-stars-bg", 103 | 104 | world_size = { 1024, 1024 }, 105 | graphic = { type = "location-catalogue", catalogue_id = procession_graphic_catalogue.planet_stars_background }, 106 | frames = 107 | { 108 | { timestamp = arrival_space_fade_start , opacity = 1.00 }, 109 | { timestamp = arrival_space_fade_end , opacity = 0.00 }, 110 | } 111 | } 112 | } 113 | return space_layers 114 | -------------------------------------------------------------------------------- /space-age/prototypes/planet/general/platform-to-planet.lua: -------------------------------------------------------------------------------- 1 | local procession_style = require("__base__/prototypes/planet/procession-style") 2 | local procession_graphic_catalogue = require("__base__/prototypes/planet/procession-graphic-catalogue-types") 3 | 4 | local spaceLayers = require("__space-age__/prototypes/planet/general/platform-to-planet/space-layers") 5 | local cloudLayers = require("__space-age__/prototypes/planet/general/platform-to-planet/cloud-layers") 6 | local podLayersA = require("__space-age__/prototypes/planet/general/platform-to-planet/pod-layers-a") 7 | local podLayersB = require("__space-age__/prototypes/planet/general/platform-to-planet/pod-layers-b") 8 | local podLayersI = require("__space-age__/prototypes/planet/general/platform-to-planet/pod-layers-i") 9 | 10 | local audio = require("__space-age__/prototypes/planet/general/platform-to-planet/audio-events") 11 | 12 | local pvariables = require("__space-age__/prototypes/planet/general/general-variables") 13 | local pfunctions = require("__space-age__/prototypes/planet/general/general-functions") 14 | 15 | data:extend( 16 | { 17 | { 18 | type = "procession", 19 | name = "platform-to-planet-a", 20 | usage = "departure", 21 | procession_style = procession_style.pod_left_generic, 22 | timeline = 23 | { 24 | duration = pvariables.platform_to_planet_duration_a, 25 | draw_switch_tick = 170, 26 | layers = pfunctions.conc2(spaceLayers.departure, podLayersA), 27 | audio_events = audio.a 28 | } 29 | }, 30 | { 31 | type = "procession", 32 | name = "platform-to-planet-b", 33 | usage = "arrival", 34 | procession_style = procession_style.pod_left_generic, 35 | timeline = 36 | { 37 | duration = pvariables.platform_to_planet_duration_b, 38 | special_action_tick = pvariables.platform_to_planet_hatch_open, 39 | layers = pfunctions.conc4(spaceLayers.arrival, podLayersB.shared, podLayersB.hatch, cloudLayers), 40 | audio_events = pfunctions.conc2(audio.b_shared, audio.b_hatch) 41 | }, 42 | ground_timeline = 43 | { 44 | duration = pvariables.platform_to_planet_duration_b, 45 | layers = pfunctions.conc4(spaceLayers.arrival, podLayersB.shared, podLayersB.ground, cloudLayers), 46 | audio_events = pfunctions.conc2(audio.b_shared, audio.b_ground) 47 | } 48 | }, 49 | { 50 | type = "procession", 51 | name = "platform-to-planet-intermezzo", 52 | usage = "intermezzo", 53 | procession_style = procession_style.pod_left_generic, 54 | timeline = 55 | { 56 | duration = 100, 57 | intermezzo_min_duration = 10, 58 | intermezzo_max_duration = 35, 59 | layers = pfunctions.conc2(spaceLayers.intermezzo, podLayersI), 60 | audio_events = audio.i 61 | } 62 | } 63 | }) 64 | -------------------------------------------------------------------------------- /space-age/prototypes/planet/general/platform-to-planet/audio-events.lua: -------------------------------------------------------------------------------- 1 | local procession_audio_catalogue_types = require("__base__/prototypes/planet/procession-audio-catalogue-types") 2 | 3 | local playSound = function(time, sound) 4 | return 5 | { 6 | timestamp = time, 7 | type = "play-sound", 8 | usage = "both", 9 | audio = 10 | { 11 | type = "pod-catalogue", 12 | catalogue_id = sound 13 | } 14 | } 15 | end 16 | 17 | local to_planet_audio = {} 18 | to_planet_audio.a = 19 | { 20 | playSound(0, procession_audio_catalogue_types.pod_thruster_burst_2), 21 | playSound(107, procession_audio_catalogue_types.pod_wings), 22 | playSound(170, procession_audio_catalogue_types.pod_thruster_burst_1), 23 | playSound(320, procession_audio_catalogue_types.pod_thruster_burst_3), 24 | } 25 | 26 | to_planet_audio.i = 27 | {} 28 | 29 | to_planet_audio.b_shared = 30 | { 31 | playSound(20, procession_audio_catalogue_types.pod_thruster_burst_1), 32 | playSound(40, procession_audio_catalogue_types.pod_reentry_flames), 33 | playSound(220, procession_audio_catalogue_types.pod_thruster_burst_4), 34 | playSound(320, procession_audio_catalogue_types.pod_thruster_burst_3), 35 | playSound(430, procession_audio_catalogue_types.pod_thruster_burst_2), 36 | } 37 | to_planet_audio.b_hatch = 38 | { 39 | } 40 | to_planet_audio.b_ground = 41 | { 42 | --playSound(599, procession_audio_catalogue.pod_ground_land), 43 | } 44 | return to_planet_audio 45 | -------------------------------------------------------------------------------- /space-age/prototypes/planet/general/platform-to-planet/pod-layers-i.lua: -------------------------------------------------------------------------------- 1 | local procession_style = require("__base__/prototypes/planet/procession-style") 2 | local procession_graphic_catalogue = require("__base__/prototypes/planet/procession-graphic-catalogue-types") 3 | 4 | local pfunctions = require("__space-age__/prototypes/planet/general/general-functions") 5 | 6 | local pod_layers = 7 | { 8 | { 9 | type = "pod-movement", 10 | frames = 11 | { 12 | { timestamp = 0 , tilt = 0.08, offset = {0, 0} } 13 | } 14 | }, 15 | { 16 | type = "pod-distance-traveled", 17 | frames = 18 | { 19 | { timestamp = 0 , distance = 0.0 }, 20 | { timestamp = 50, distance = 512.0/20.0 }, 21 | } 22 | }, 23 | { 24 | type = "pod-opacity", 25 | lut = "__core__/graphics/color_luts/lut-day.png", 26 | frames = {{ timestamp = 0, cutscene_opacity = 1, outside_opacity = 0, lut_blend = 1, environment_volume = 0, environment_muffle_intensity = 1 }} 27 | }, 28 | pfunctions.make_pod_animation("a_opening", procession_graphic_catalogue.pod_anim_opening, 0, 0, 29 | { 30 | { timestamp=0, frame = 33 } 31 | }) 32 | } 33 | return pod_layers 34 | -------------------------------------------------------------------------------- /space-age/prototypes/planet/general/platform-to-planet/space-layers.lua: -------------------------------------------------------------------------------- 1 | local procession_style = require("__base__/prototypes/planet/procession-style") 2 | local procession_graphic_catalogue = require("__base__/prototypes/planet/procession-graphic-catalogue-types") 3 | 4 | local space_layers = {} 5 | space_layers.departure = 6 | { 7 | { 8 | type = "cover-graphic", 9 | name = "space paralax stars", 10 | render_layer = "floor", 11 | secondary_draw_order = -20, 12 | reference_group = "procession-stars-bg", 13 | texture_relative_to = "ground-origin", 14 | distance_traveled_strength = { 0.0, 0.0 }, 15 | pod_movement_strength = { 0.8, 0.8 }, 16 | world_size = { 1024, 1024 }, 17 | graphic = { type = "location-catalogue", catalogue_id = procession_graphic_catalogue.planet_stars_background }, 18 | frames = 19 | { 20 | { timestamp = 175 , opacity = 0.00 }, 21 | { timestamp = 350 , opacity = 1.00 }, 22 | } 23 | } 24 | } 25 | 26 | local intermezzo_rate = 0.4 27 | space_layers.intermezzo = 28 | { 29 | { 30 | type = "cover-graphic", 31 | name = "space paralax stars", 32 | render_layer = "floor", 33 | secondary_draw_order = -20, 34 | reference_group = "procession-stars-bg", 35 | inherit_from = "procession-stars-bg", 36 | texture_relative_to = "ground-origin", 37 | distance_traveled_strength = { 0.0, 0.0 }, 38 | pod_movement_strength = { 0.8, 0.8 }, 39 | world_size = { 1024, 1024 }, 40 | graphic = { type = "location-catalogue", catalogue_id = procession_graphic_catalogue.planet_stars_background }, 41 | frames = 42 | { 43 | { timestamp = 0 , offset = { 0.0, 0.0 } }, 44 | { timestamp = 50, offset = { 0.8 * 1.28 * intermezzo_rate, -0.8 * intermezzo_rate } } 45 | } 46 | } 47 | } 48 | 49 | space_layers.arrival = 50 | { 51 | { 52 | type = "cover-graphic", 53 | name = "space paralax stars", 54 | render_layer = "floor", 55 | secondary_draw_order = -20, 56 | 57 | texture_relative_to = "spawn-origin", 58 | distance_traveled_strength = { 0.0, 0.0 }, 59 | pod_movement_strength = { 0.8, 0.8 }, 60 | inherit_from = "procession-stars-bg", 61 | is_cloud_effect_advanced = true, 62 | end_time = 290, 63 | 64 | world_size = { 1024, 1024 }, 65 | graphic = { type = "location-catalogue", catalogue_id = procession_graphic_catalogue.planet_stars_background }, 66 | mask_graphic = { type = "location-catalogue", catalogue_id = procession_graphic_catalogue.planet_cloudscape_mask }, 67 | effect = 68 | { 69 | style = "horizontal-stripe", 70 | relative_to = "pod" 71 | }, 72 | frames = 73 | { 74 | { timestamp = 0, effect_scale_min = 1.3 }, 75 | { timestamp = 0, effect_scale_max = 1.7 }, 76 | { timestamp = 0, effect_shift = {0, 0} }, 77 | { timestamp = 400, effect_shift = {0, 3} }, 78 | { timestamp = 150, effect_shift_rate = 0 }, 79 | { timestamp = 300, effect_shift_rate = 1 }, 80 | } 81 | } 82 | } 83 | return space_layers 84 | -------------------------------------------------------------------------------- /space-age/prototypes/planet/procession-common.lua: -------------------------------------------------------------------------------- 1 | local procession_style = require("__base__/prototypes/planet/procession-style") 2 | local procession_graphic_catalogue = require("__base__/prototypes/planet/procession-graphic-catalogue-types") 3 | 4 | data:extend( 5 | { 6 | { 7 | type = "procession-layer-inheritance-group", 8 | name = "procession-stars-bg", 9 | intermezzo_application = { offset = true, rotation = false }, 10 | arrival_application = { offset = true, pod_offset = true, rotation = false } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /space-age/prototypes/spores.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "airborne-pollutant", 5 | name = "spores", 6 | chart_color = {r = 140, g = 140, b = 0, a = 149}, 7 | icon = 8 | { 9 | filename = "__core__/graphics/icons/mip/side-map-menu-buttons.png", 10 | priority = "high", 11 | size = 64, 12 | mipmap_count = 2, 13 | y = 3 * 64, 14 | flags = {"gui-icon"} 15 | }, 16 | affects_evolution = true, 17 | affects_water_tint = false, 18 | damages_trees = false, 19 | } 20 | }) 21 | -------------------------------------------------------------------------------- /space-age/prototypes/surface.lua: -------------------------------------------------------------------------------- 1 | data:extend( 2 | { 3 | { 4 | type = "surface", 5 | name = "space-platform", 6 | icon = "__space-age__/graphics/icons/space-platform-surface.png", 7 | subgroup = "planets", 8 | order = "a[space-platform]", 9 | surface_properties = 10 | { 11 | gravity = 0, 12 | pressure = 0, 13 | ["magnetic-field"] = 0, 14 | ["day-night-cycle"] = 0 15 | } 16 | } 17 | }) 18 | -------------------------------------------------------------------------------- /space-age/prototypes/tile/tile-pollution-values.lua: -------------------------------------------------------------------------------- 1 | local base_tile_pollution_values = require("__base__/prototypes/tile/tile-pollution-values") 2 | local space_age_tile_pollution_values = 3 | { 4 | lava = { pollution = 0.000030 }, 5 | vulcanus = { pollution = 0.000030 }, 6 | fulgora = { pollution = 0.000030 }, -- has pollution turned off completely 7 | gleba = { spores = 0.000010 }, 8 | gleba_water ={ spores = 0.000030 }, 9 | ice = { pollution = 0.000005 } 10 | } 11 | return util.merge{base_tile_pollution_values, space_age_tile_pollution_values} 12 | -------------------------------------------------------------------------------- /space-age/prototypes/utility-sounds.lua: -------------------------------------------------------------------------------- 1 | require("sound-util") 2 | 3 | data.raw["utility-sounds"]["default"].segment_dying_sound = 4 | { 5 | category = "enemy", 6 | variations = sound_variations("__space-age__/sound/enemies/demolisher/demolisher-death", 2, 1.0, volume_multiplier("main-menu", 0.5)), 7 | aggregation = {max_count = 1, remove = true, count_already_playing = true} 8 | } 9 | -------------------------------------------------------------------------------- /space-age/prototypes/utility-sprites.lua: -------------------------------------------------------------------------------- 1 | local space_platform_entity_build_animations = require("__space-age__/graphics/entity/space-platform-build-anim/entity-build-animations") 2 | 3 | data:extend( 4 | { 5 | { 6 | type = "sprite", 7 | name = "tooltip-category-thrust", 8 | filename = "__space-age__/graphics/icons/tooltips/tooltip-category-thrust.png", 9 | priority = "extra-high-no-scale", 10 | width = 40, 11 | height = 40, 12 | flags = {"gui-icon"}, 13 | mipmap_count = 2, 14 | scale = 0.5 15 | }, 16 | { 17 | type = "sprite", 18 | name = "tooltip-category-fusion", 19 | filename = "__space-age__/graphics/icons/tooltips/tooltip-category-fusion.png", 20 | priority = "extra-high-no-scale", 21 | width = 40, 22 | height = 40, 23 | flags = {"gui-icon"}, 24 | mipmap_count = 2, 25 | scale = 0.5 26 | }, 27 | { 28 | type = "sprite", 29 | name = "tooltip-category-food", 30 | filename = "__base__/graphics/icons/tooltips/tooltip-category-food.png", 31 | priority = "extra-high-no-scale", 32 | width = 40, 33 | height = 40, 34 | flags = {"gui-icon"}, 35 | mipmap_count = 2, 36 | scale = 0.5 37 | }, 38 | { 39 | type = "sprite", 40 | name = "tooltip-category-thruster-fuel", 41 | filename = "__base__/graphics/icons/tooltips/tooltip-category-water.png", 42 | priority = "extra-high-no-scale", 43 | width = 40, 44 | height = 40, 45 | flags = {"gui-icon"}, 46 | mipmap_count = 2, 47 | scale = 0.5 48 | }, 49 | { 50 | type = "sprite", 51 | name = "tooltip-category-thruster-oxidizer", 52 | filename = "__base__/graphics/icons/tooltips/tooltip-category-water.png", 53 | priority = "extra-high-no-scale", 54 | width = 40, 55 | height = 40, 56 | flags = {"gui-icon"}, 57 | mipmap_count = 2, 58 | scale = 0.5 59 | }, 60 | { 61 | type = "sprite", 62 | name = "tooltip-category-nutrients", 63 | filename = "__space-age__/graphics/icons/tooltips/tooltip-category-nutrients.png", 64 | priority = "extra-high-no-scale", 65 | width = 40, 66 | height = 40, 67 | flags = {"gui-icon"}, 68 | mipmap_count = 2, 69 | scale = 0.5 70 | }, 71 | { 72 | type = "sprite", 73 | name = "tooltip-category-fusion-plasma", 74 | filename = "__space-age__/graphics/icons/tooltips/tooltip-category-fusion-plasma.png", 75 | priority = "extra-high-no-scale", 76 | width = 40, 77 | height = 40, 78 | flags = {"gui-icon"}, 79 | mipmap_count = 2, 80 | scale = 0.5 81 | }, 82 | { 83 | type = "sprite", 84 | name = "tooltip-category-fluoroketone-hot", 85 | filename = "__space-age__/graphics/icons/tooltips/tooltip-category-fluoroketone-hot.png", 86 | priority = "extra-high-no-scale", 87 | width = 40, 88 | height = 40, 89 | flags = {"gui-icon"}, 90 | mipmap_count = 2, 91 | scale = 0.5 92 | }, 93 | { 94 | type = "sprite", 95 | name = "tooltip-category-fluoroketone-cold", 96 | filename = "__space-age__/graphics/icons/tooltips/tooltip-category-fluoroketone-cold.png", 97 | priority = "extra-high-no-scale", 98 | width = 40, 99 | height = 40, 100 | flags = {"gui-icon"}, 101 | mipmap_count = 2, 102 | scale = 0.5 103 | }, 104 | }) 105 | 106 | data.raw["utility-sprites"]["default"].platform_entity_build_animations = space_platform_entity_build_animations 107 | --------------------------------------------------------------------------------