diff --git a/CHANGELOG.md b/CHANGELOG.md index f7ae6ea..af9545f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,21 @@ The latest stable release is available at +## v0.7.2 - Unreleased (coming soon) + +### Added +* New gravel styles - Iron, Copper and Coal Gravel (placed using raw iron, copper and coal ores) +* New _Traffic bollard_ decorative item (unlocked via _Plastics_ technology) +* Landscaping technology now allows placement of decorative rock entities +* Better handling for when third party mods that affect Dectorio are added or removed + +### Bugfixes +* Added some additional locale strings to fix issues with Creative Mode mod + ## v0.7.1 - 2017-10-21 ### Bugfixes -* Fixed migration error for existing saves without Alien Biomes +* Fixed migration error for existing saves without Alien Biomes mod ## v0.7.0 - 2017-10-20 diff --git a/config.lua b/config.lua index fcd166e..72b844c 100644 --- a/config.lua +++ b/config.lua @@ -92,6 +92,7 @@ DECT.ENABLED = { ["gravel"] = settings.startup["dectorio-flooring"].value, ["painted-concrete"] = settings.startup["dectorio-painted-concrete"].value, ["signs"] = settings.startup["dectorio-signs"].value, + ["decoratives"] = settings.startup["dectorio-decoratives"].value, } DECT.CONFIG.SETTINGS = { diff --git a/control.lua b/control.lua index 2b29da9..f7bb89b 100644 --- a/control.lua +++ b/control.lua @@ -163,6 +163,44 @@ local function on_configuration_changed(data) incompability_detected() end end + + -- Check if Alien Biomes was added + if data.mod_changes ~= nil and data.mod_changes["alien-biomes"] ~= nil and data.mod_changes["alien-biomes"].old_version == nil then + if DECT.ENABLED["landscaping"] then + for _,force in pairs(game.forces) do + local tech = force.technologies + local rec = force.recipes + if tech["dect-landscaping"].researched and rec["dect-alien-biomes-grass-red"] then + local alien_biomes = { + "grass-red","grass-orange","grass-yellow","grass-yellow-fade","grass-dry","grass-medium","grass","grass-blue-fade","grass-blue","grass-purple-fade","grass-purple", + "dirt-red","dirt-brown","dirt-tan","dirt","dirt-dull","dirt-grey","dirt-red-dark","dirt-brown-dark","dirt-tan-dark","dirt-dark","dirt-dull-dark","dirt-grey-dark", + "sand-red","sand-orange","sand-gold","sand","sand-dull","sand-grey","sand-red-dark","sand-orange-dark","sand-gold-dark","sand-dark","sand-dull-dark","sand-grey-dark", + "snow","volcanic-cool","volcanic-medium","volcanic-hot" + } + for _, tile in pairs(alien_biomes) do + rec["dect-alien-biomes-"..tile].enabled = true + end + notification({"dect-notify-supportedmod-added", {"dect-notify-dectorio"}, "Alien Biomes"}) + end + end + end + end + + -- Check if Alien Biomes was removed + if data.mod_changes ~= nil and data.mod_changes["alien-biomes"] ~= nil and data.mod_changes["alien-biomes"].new_version == nil then + if DECT.ENABLED["landscaping"] then + for _,force in pairs(game.forces) do + local tech = force.technologies + local rec = force.recipes + if tech["dect-landscaping"].researched then + for _, tile in pairs(DECT.CONFIG.BASE_TILES) do + rec["dect-base-"..tile].enabled = true + end + notification({"dect-notify-supportedmod-removed", {"dect-notify-dectorio"}, "Alien Biomes"}) + end + end + end + end end local function on_built_entity(event) diff --git a/data.lua b/data.lua index e8f78f3..1b713de 100644 --- a/data.lua +++ b/data.lua @@ -27,18 +27,21 @@ DECT = require("config") require("prototypes.entity.lamp") require("prototypes.entity.signs") require("prototypes.entity.walls") +require("prototypes.entity.decoratives") require("prototypes.item.flooring") require("prototypes.item.lamp") require("prototypes.item.landscaping") require("prototypes.item.signs") require("prototypes.item.walls") +require("prototypes.item.decoratives") require("prototypes.recipe.flooring") require("prototypes.recipe.lamp") require("prototypes.recipe.landscaping") require("prototypes.recipe.signs") require("prototypes.recipe.walls") +require("prototypes.recipe.decoratives") require("prototypes.tile.tiles") @@ -47,5 +50,6 @@ require("prototypes.technology.lamp") require("prototypes.technology.landscaping") require("prototypes.technology.signs") require("prototypes.technology.walls") +require("prototypes.technology.decoratives") require("prototypes.signal.signals") \ No newline at end of file diff --git a/graphics/decoratives/traffic-bollard/traffic-bollard.png b/graphics/decoratives/traffic-bollard/traffic-bollard.png new file mode 100644 index 0000000..c309e15 Binary files /dev/null and b/graphics/decoratives/traffic-bollard/traffic-bollard.png differ diff --git a/graphics/icons/traffic-bollard.png b/graphics/icons/traffic-bollard.png new file mode 100644 index 0000000..bba1830 Binary files /dev/null and b/graphics/icons/traffic-bollard.png differ diff --git a/graphics/terrain/coal/gravel/coal-inner-corner.png b/graphics/terrain/coal/gravel/coal-inner-corner.png new file mode 100644 index 0000000..e9475db Binary files /dev/null and b/graphics/terrain/coal/gravel/coal-inner-corner.png differ diff --git a/graphics/terrain/coal/gravel/coal-o.png b/graphics/terrain/coal/gravel/coal-o.png new file mode 100644 index 0000000..fde7acf Binary files /dev/null and b/graphics/terrain/coal/gravel/coal-o.png differ diff --git a/graphics/terrain/coal/gravel/coal-outer-corner.png b/graphics/terrain/coal/gravel/coal-outer-corner.png new file mode 100644 index 0000000..cd8f9fa Binary files /dev/null and b/graphics/terrain/coal/gravel/coal-outer-corner.png differ diff --git a/graphics/terrain/coal/gravel/coal-side.png b/graphics/terrain/coal/gravel/coal-side.png new file mode 100644 index 0000000..1f45dad Binary files /dev/null and b/graphics/terrain/coal/gravel/coal-side.png differ diff --git a/graphics/terrain/coal/gravel/coal-u.png b/graphics/terrain/coal/gravel/coal-u.png new file mode 100644 index 0000000..b0aab46 Binary files /dev/null and b/graphics/terrain/coal/gravel/coal-u.png differ diff --git a/graphics/terrain/coal/gravel/coal1.png b/graphics/terrain/coal/gravel/coal1.png new file mode 100644 index 0000000..a664c48 Binary files /dev/null and b/graphics/terrain/coal/gravel/coal1.png differ diff --git a/graphics/terrain/coal/gravel/coal2.png b/graphics/terrain/coal/gravel/coal2.png new file mode 100644 index 0000000..5b05e16 Binary files /dev/null and b/graphics/terrain/coal/gravel/coal2.png differ diff --git a/graphics/terrain/coal/gravel/coal4.png b/graphics/terrain/coal/gravel/coal4.png new file mode 100644 index 0000000..a949e1f Binary files /dev/null and b/graphics/terrain/coal/gravel/coal4.png differ diff --git a/graphics/terrain/copper/gravel/copper-inner-corner.png b/graphics/terrain/copper/gravel/copper-inner-corner.png new file mode 100644 index 0000000..e2e8233 Binary files /dev/null and b/graphics/terrain/copper/gravel/copper-inner-corner.png differ diff --git a/graphics/terrain/copper/gravel/copper-o.png b/graphics/terrain/copper/gravel/copper-o.png new file mode 100644 index 0000000..267c16d Binary files /dev/null and b/graphics/terrain/copper/gravel/copper-o.png differ diff --git a/graphics/terrain/copper/gravel/copper-outer-corner.png b/graphics/terrain/copper/gravel/copper-outer-corner.png new file mode 100644 index 0000000..a8a441c Binary files /dev/null and b/graphics/terrain/copper/gravel/copper-outer-corner.png differ diff --git a/graphics/terrain/copper/gravel/copper-side.png b/graphics/terrain/copper/gravel/copper-side.png new file mode 100644 index 0000000..ef65e27 Binary files /dev/null and b/graphics/terrain/copper/gravel/copper-side.png differ diff --git a/graphics/terrain/copper/gravel/copper-u.png b/graphics/terrain/copper/gravel/copper-u.png new file mode 100644 index 0000000..b7d7ad2 Binary files /dev/null and b/graphics/terrain/copper/gravel/copper-u.png differ diff --git a/graphics/terrain/copper/gravel/copper1.png b/graphics/terrain/copper/gravel/copper1.png new file mode 100644 index 0000000..7247f89 Binary files /dev/null and b/graphics/terrain/copper/gravel/copper1.png differ diff --git a/graphics/terrain/copper/gravel/copper2.png b/graphics/terrain/copper/gravel/copper2.png new file mode 100644 index 0000000..9619c64 Binary files /dev/null and b/graphics/terrain/copper/gravel/copper2.png differ diff --git a/graphics/terrain/copper/gravel/copper4.png b/graphics/terrain/copper/gravel/copper4.png new file mode 100644 index 0000000..9520a1f Binary files /dev/null and b/graphics/terrain/copper/gravel/copper4.png differ diff --git a/graphics/terrain/iron/gravel/iron-inner-corner.png b/graphics/terrain/iron/gravel/iron-inner-corner.png new file mode 100644 index 0000000..b056fb8 Binary files /dev/null and b/graphics/terrain/iron/gravel/iron-inner-corner.png differ diff --git a/graphics/terrain/iron/gravel/iron-o.png b/graphics/terrain/iron/gravel/iron-o.png new file mode 100644 index 0000000..d823bc4 Binary files /dev/null and b/graphics/terrain/iron/gravel/iron-o.png differ diff --git a/graphics/terrain/iron/gravel/iron-outer-corner.png b/graphics/terrain/iron/gravel/iron-outer-corner.png new file mode 100644 index 0000000..35664c2 Binary files /dev/null and b/graphics/terrain/iron/gravel/iron-outer-corner.png differ diff --git a/graphics/terrain/iron/gravel/iron-side.png b/graphics/terrain/iron/gravel/iron-side.png new file mode 100644 index 0000000..f58fb5a Binary files /dev/null and b/graphics/terrain/iron/gravel/iron-side.png differ diff --git a/graphics/terrain/iron/gravel/iron-u.png b/graphics/terrain/iron/gravel/iron-u.png new file mode 100644 index 0000000..8dff236 Binary files /dev/null and b/graphics/terrain/iron/gravel/iron-u.png differ diff --git a/graphics/terrain/iron/gravel/iron1.png b/graphics/terrain/iron/gravel/iron1.png new file mode 100644 index 0000000..0b1dc65 Binary files /dev/null and b/graphics/terrain/iron/gravel/iron1.png differ diff --git a/graphics/terrain/iron/gravel/iron2.png b/graphics/terrain/iron/gravel/iron2.png new file mode 100644 index 0000000..b713c95 Binary files /dev/null and b/graphics/terrain/iron/gravel/iron2.png differ diff --git a/graphics/terrain/iron/gravel/iron4.png b/graphics/terrain/iron/gravel/iron4.png new file mode 100644 index 0000000..41e0cd8 Binary files /dev/null and b/graphics/terrain/iron/gravel/iron4.png differ diff --git a/info.json b/info.json index 611ebc4..c762062 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "Dectorio", - "version": "0.7.1", + "version": "0.7.2", "title": "Dectorio", "author": "PantherX", "contact": "", diff --git a/locale/de/de.cfg b/locale/de/de.cfg index 7a384de..3a611cb 100644 --- a/locale/de/de.cfg +++ b/locale/de/de.cfg @@ -46,13 +46,21 @@ dect-small-lamp-glow=Glühende Lampe [tile-name] hazard-concrete-left=Beton mit Gefahrenmarkierung +hazard-concrete-right=Beton mit Gefahrenmarkierung dect-paint-emergency-left=Beton mit Notfallmarkierung +dect-paint-emergency-right=Beton mit Notfallmarkierung dect-paint-radiation-left=Beton mit Strahlungswarnung +dect-paint-radiation-right=Beton mit Strahlungswarnung dect-paint-safety-left=Beton mit Sicherheitsmarkierung +dect-paint-safety-right=Beton mit Sicherheitsmarkierung dect-paint-caution-left=Beton mit Warnungsmarkierung +dect-paint-caution-right=Beton mit Warnungsmarkierung dect-paint-danger-left=Beton mit Gefahrenmarkierung +dect-paint-danger-right=Beton mit Gefahrenmarkierung dect-paint-defect-left=Beton mit Beschädigung +dect-paint-defect-right=Beton mit Beschädigung dect-paint-operations-left=Beton mit Betriebsmarkierung +dect-paint-operations-right=Beton mit Betriebsmarkierung dect-wood-floor=Holzboden dect-gravel=Kies diff --git a/locale/en/en.cfg b/locale/en/en.cfg index 8d184a8..0f2f992 100644 --- a/locale/en/en.cfg +++ b/locale/en/en.cfg @@ -43,18 +43,30 @@ dect-hazard-gate=Hazard gate dect-sign-wood=Wooden sign dect-sign-steel=Steel sign dect-small-lamp-glow=Glowing lamp +dect-traffic-bollard=Traffic bollard [tile-name] hazard-concrete-left=Hazard concrete +hazard-concrete-right=Hazard concrete dect-paint-emergency-left=Emergency concrete +dect-paint-emergency-right=Emergency concrete dect-paint-radiation-left=Radiation hazard concrete +dect-paint-radiation-right=Radiation hazard concrete dect-paint-safety-left=Safety concrete +dect-paint-safety-right=Safety concrete dect-paint-caution-left=Caution concrete +dect-paint-caution-right=Caution concrete dect-paint-danger-left=Danger concrete +dect-paint-danger-right=Danger concrete dect-paint-defect-left=Defect concrete +dect-paint-defect-right=Defect concrete dect-paint-operations-left=Operations concrete +dect-paint-operations-right=Operations concrete dect-wood-floor=Wooden floorboards dect-gravel=Gravel +dect-iron-gravel=Iron Gravel +dect-copper-gravel=Copper Gravel +dect-coal-gravel=Coal Gravel [technology-name] dect-landscaping=Landscaping diff --git a/locale/en/notifications.cfg b/locale/en/notifications.cfg index fe312f6..7795b1c 100644 --- a/locale/en/notifications.cfg +++ b/locale/en/notifications.cfg @@ -5,4 +5,6 @@ dect-notify-incompatible=[__1__] Warning: An incompatible mod has been detected! dect-notify-reason-signals=[__1__] Reason: '__2__' overwrites signal data. It is recommended to disable '__2__'. dect-notify-reason-tech=[__1__] Reason: '__2__' duplicates technology that is already in Dectorio. It is recommended to disable '__2__'. dect-notify-reason-disable=[__1__] Reason: '__2__' disables functionality that is added by Dectorio. It is recommended to disable '__2__'. -dect-notify-modportal=[__1__] Refer to the mod portal for further details. \ No newline at end of file +dect-notify-modportal=[__1__] Refer to the mod portal for further details. +dect-notify-supportedmod-added=[__1__] Added support for __2__ mod. +dect-notify-supportedmod-removed=[__1__] Removed support for __2__ mod. \ No newline at end of file diff --git a/locale/en/settings.cfg b/locale/en/settings.cfg index a0c4852..2eded8e 100644 --- a/locale/en/settings.cfg +++ b/locale/en/settings.cfg @@ -5,6 +5,7 @@ dectorio-landscaping=Enable Landscaping dectorio-flooring=Enable Floorings dectorio-painted-concrete=Enable Painted Concrete dectorio-signs=Enable Signs +dectorio-decoratives=Enable Decoratives dectorio-vanilla-hazard-concrete-style=Use default Factorio Hazard concrete style dectorio-landscaping-blueprintable=Landscaping items are blueprintable dectorio-decorative-removal-probability=Decoration removal probability @@ -19,6 +20,7 @@ dectorio-landscaping=Enables the ability to craft sand, dirt, grass, red desert dectorio-flooring=Enables the ability to craft flooring types including wooden floorboards and gravel dectorio-painted-concrete=Enables painted concrete styles that replace the base Hazard concrete dectorio-signs=Enables the ability to place signs +dectorio-decoratives=Enables the ability to craft decorative items for your factory dectorio-vanilla-hazard-concrete-style=When enabled, Painted Hazard concrete will look like the default Factorio Hazard concrete when placed (requires Painted Concrete to be enabled) dectorio-landscaping-blueprintable=When enabled, blueprints will include landscaping features as tiles dectorio-decorative-removal-probability=The probability that decorations, such as bushes and grasses, are removed when flooring tiles are placed (1 = 100% are removed (default), 0.5 = 50%, 0 = none are removed) diff --git a/locale/pl/pl.cfg b/locale/pl/pl.cfg index eef6e92..df2ad4f 100755 --- a/locale/pl/pl.cfg +++ b/locale/pl/pl.cfg @@ -46,13 +46,21 @@ dect-small-lamp-glow=Świecąca lampa [tile-name] hazard-concrete-left=Beton z pasami ostrzegawczymi +hazard-concrete-right=Beton z pasami ostrzegawczymi dect-paint-emergency-left=Beton z przekazem awaryjnym +dect-paint-emergency-right=Beton z przekazem awaryjnym dect-paint-radiation-left=Beton z przekazem o promieniowaniu +dect-paint-radiation-right=Beton z przekazem o promieniowaniu dect-paint-safety-left=Beton z zabezpieczeniem +dect-paint-safety-right=Beton z zabezpieczeniem dect-paint-caution-left=Betn z przekazem ostrzegawczym +dect-paint-caution-right=Betn z przekazem ostrzegawczym dect-paint-danger-left=Beton z przekazem o niebezpieczeństwie +dect-paint-danger-right=Beton z przekazem o niebezpieczeństwie dect-paint-defect-left=Uszkodzony beton +dect-paint-defect-right=Uszkodzony beton dect-paint-operations-left=Beton operacyjny +dect-paint-operations-right=Beton operacyjny dect-wood-floor=Drewniane podłoże dect-gravel=Żwir diff --git a/migrations/0.7.1.lua b/migrations/0.7.1.lua deleted file mode 100644 index 1ee15b4..0000000 --- a/migrations/0.7.1.lua +++ /dev/null @@ -1,22 +0,0 @@ -for index, force in pairs(game.forces) do - - force.reset_recipes() - force.reset_technologies() - - local tech = force.technologies - local rec = force.recipes - - if settings.startup["dectorio-landscaping"].value then - if tech["dect-landscaping"].researched and rec["dect-alien-biomes-grass-red"] then - alien_biomes = { - "grass-red","grass-orange","grass-yellow","grass-yellow-fade","grass-dry","grass-medium","grass","grass-blue-fade","grass-blue","grass-purple-fade","grass-purple", - "dirt-red","dirt-brown","dirt-tan","dirt","dirt-dull","dirt-grey","dirt-red-dark","dirt-brown-dark","dirt-tan-dark","dirt-dark","dirt-dull-dark","dirt-grey-dark", - "sand-red","sand-orange","sand-gold","sand","sand-dull","sand-grey","sand-red-dark","sand-orange-dark","sand-gold-dark","sand-dark","sand-dull-dark","sand-grey-dark", - "snow","volcanic-cool","volcanic-medium","volcanic-hot" - } - for _, tile in pairs(alien_biomes) do - rec["dect-alien-biomes-"..tile].enabled = true - end - end - end -end \ No newline at end of file diff --git a/migrations/0.7.2.lua b/migrations/0.7.2.lua new file mode 100644 index 0000000..46b5a1c --- /dev/null +++ b/migrations/0.7.2.lua @@ -0,0 +1,22 @@ +for index, force in pairs(game.forces) do + + force.reset_recipes() + force.reset_technologies() + + local tech = force.technologies + local rec = force.recipes + + if settings.startup["dectorio-decoratives"].value then + if tech["plastics"].researched then + rec["dect-traffic-bollard"].enabled = true + end + end + if settings.startup["dectorio-landscaping"].value then + if tech["dect-landscaping"].researched then + rec["dect-base-stone-rock"].enabled = true + rec["dect-base-red-desert-rock-big-01"].enabled = true + rec["dect-base-red-desert-rock-huge-01"].enabled = true + rec["dect-base-red-desert-rock-huge-02"].enabled = true + end + end +end \ No newline at end of file diff --git a/prototypes/entity/decoratives.lua b/prototypes/entity/decoratives.lua new file mode 100644 index 0000000..71121bb --- /dev/null +++ b/prototypes/entity/decoratives.lua @@ -0,0 +1,32 @@ +-- entity/decoratives + +if DECT.ENABLED["decoratives"] then + + data:extend({ + { + type = "simple-entity", + name = "dect-traffic-bollard", + icon = "__Dectorio__/graphics/icons/traffic-bollard.png", + flags = {"placeable-neutral"}, + render_layer = "object", + minable = {mining_time = 1, result = "dect-traffic-bollard", count = 1}, + max_health = 120, + collision_box = {{-0.15, -0.15}, {0.25, 0.15}}, + selection_box = {{-0.25, -1.4}, {0.25, 0.16}}, + drawing_box = {{-0.2, -1}, {0.2, 0.1}}, + repair_sound = { filename = "__base__/sound/manual-repair-simple.ogg" }, + mined_sound = { filename = "__core__/sound/deconstruct-small.ogg" }, + vehicle_impact_sound = {filename = "__base__/sound/car-metal-impact.ogg", volume = 0.7}, + pictures = { + { + filename = "__Dectorio__/graphics/decoratives/traffic-bollard/traffic-bollard.png", + priority = "extra-high", + width = 35, + height = 42, + shift = {0.4, -0.6} + } + } + } + }) + +end \ No newline at end of file diff --git a/prototypes/item/decoratives.lua b/prototypes/item/decoratives.lua new file mode 100644 index 0000000..32139c9 --- /dev/null +++ b/prototypes/item/decoratives.lua @@ -0,0 +1,30 @@ +-- item/decoratives + +if DECT.ENABLED["decoratives"] then + + -- -- Add subgroup for decoratives + -- data:extend({ + -- { + -- type = "item-subgroup", + -- name = "decoratives", + -- group = "logistics", + -- order = "g-b" + -- } + -- }) + + data:extend({ + { + type = "item", + name = "dect-traffic-bollard", + icon = "__Dectorio__/graphics/icons/traffic-bollard.png", + flags = {"goes-to-quickbar"}, + -- subgroup = "decoratives", + -- order = "a[traffic-bollard]", + subgroup = "terrain", + order = "w[traffic-bollard]", + place_result = "dect-traffic-bollard", + stack_size = 50 + } + }) + +end \ No newline at end of file diff --git a/prototypes/item/flooring.lua b/prototypes/item/flooring.lua index 90a8e7a..0f45a1f 100644 --- a/prototypes/item/flooring.lua +++ b/prototypes/item/flooring.lua @@ -75,7 +75,7 @@ end if DECT.ENABLED["gravel"] then - -- Allow stone to be placed as gravel + -- Allow ores to be placed as gravel local base_stone = data.raw["item"]["stone"] base_stone.place_as_tile = { result = "dect-gravel", @@ -83,4 +83,25 @@ if DECT.ENABLED["gravel"] then condition = { "water-tile" } } + local base_iron = data.raw["item"]["iron-ore"] + base_iron.place_as_tile = { + result = "dect-iron-gravel", + condition_size = 4, + condition = { "water-tile" } + } + + local base_copper = data.raw["item"]["copper-ore"] + base_copper.place_as_tile = { + result = "dect-copper-gravel", + condition_size = 4, + condition = { "water-tile" } + } + + local base_coal = data.raw["item"]["coal"] + base_coal.place_as_tile = { + result = "dect-coal-gravel", + condition_size = 4, + condition = { "water-tile" } + } + end \ No newline at end of file diff --git a/prototypes/item/landscaping.lua b/prototypes/item/landscaping.lua index 8f3d54e..4b9afde 100644 --- a/prototypes/item/landscaping.lua +++ b/prototypes/item/landscaping.lua @@ -2,13 +2,13 @@ if DECT.ENABLED["landscaping"] then - -- Add subgroup for base assets + -- Add subgroup for base tiles data:extend({ { type = "item-subgroup", name = "landscaping", group = "logistics", - order = "g" + order = "g-a" } }) @@ -37,6 +37,40 @@ if DECT.ENABLED["landscaping"] then }) end + -- Add subgroup for base rocks + data:extend({ + { + type = "item-subgroup", + name = "landscaping2", + group = "logistics", + order = "g-b" + } + }) + + -- Add items for placing rocks + local base_rocks = {"stone-rock", "red-desert-rock-big-01", "red-desert-rock-huge-01", "red-desert-rock-huge-02"} + for _, rock in pairs(base_rocks) do + local rock_name = "" + if string.find(rock,"-0") then + rock_name = string.sub(rock,1,-4) + else + rock_name = rock + end + data:extend({ + { + type = "item", + name = "dect-base-"..rock, + icon = data.raw["simple-entity"][rock].icon, + flags = {"goes-to-main-inventory"}, + subgroup = "landscaping2", + order = _.."[base-"..rock.."]", + stack_size = DECT.CONFIG.SETTINGS["landscaping_stack_size"], + place_result = rock, + localised_name = {"entity-name."..rock_name} + } + }) + end + -- Modify base landfill stack size local base_landfill = data.raw["item"]["landfill"] base_landfill.subgroup = "landscaping" diff --git a/prototypes/recipe/decoratives.lua b/prototypes/recipe/decoratives.lua new file mode 100644 index 0000000..4b70512 --- /dev/null +++ b/prototypes/recipe/decoratives.lua @@ -0,0 +1,18 @@ +-- recipe/decoratives + +if DECT.ENABLED["decoratives"] then + + data:extend({ + { + type = "recipe", + name = "dect-traffic-bollard", + enabled = false, + ingredients = { + {"plastic-bar", 2}, + {"iron-plate", 1}, + }, + result = "dect-traffic-bollard" + } + }) + +end \ No newline at end of file diff --git a/prototypes/recipe/landscaping.lua b/prototypes/recipe/landscaping.lua index 92b66f0..6b47c88 100644 --- a/prototypes/recipe/landscaping.lua +++ b/prototypes/recipe/landscaping.lua @@ -2,7 +2,7 @@ if DECT.ENABLED["landscaping"] then - -- Add recipes for base assets + -- Add recipes for base tiles data:extend({ { type = "recipe", @@ -118,4 +118,26 @@ if DECT.ENABLED["landscaping"] then } }) + -- Add recipes for base rocks + local base_rocks = { + {name = "stone-rock", ingredients = {{"stone", 25}}}, + {name = "red-desert-rock-big-01", ingredients = {{"stone", 25}}}, + {name = "red-desert-rock-huge-01", ingredients = {{"stone", 60}, {"coal", 60}}}, + {name = "red-desert-rock-huge-02", ingredients = {{"stone", 220}}} + } + for _, rock in pairs(base_rocks) do + data:extend({ + { + type = "recipe", + name = "dect-base-"..rock.name, + energy_required = 2, + enabled = false, + category = "crafting", + ingredients = rock.ingredients, + result = "dect-base-"..rock.name, + result_count = 1 + } + }) + end + end \ No newline at end of file diff --git a/prototypes/technology/decoratives.lua b/prototypes/technology/decoratives.lua new file mode 100644 index 0000000..ddfb6b8 --- /dev/null +++ b/prototypes/technology/decoratives.lua @@ -0,0 +1,5 @@ +-- technology/decoratives + +-- Add Traffic Bollard to Plastics technology +local base_plastic = data.raw["technology"]["plastics"] +table.insert(base_plastic.effects,{type="unlock-recipe",recipe="dect-traffic-bollard"}) \ No newline at end of file diff --git a/prototypes/technology/landscaping.lua b/prototypes/technology/landscaping.lua index aa58cae..af6fd7b 100644 --- a/prototypes/technology/landscaping.lua +++ b/prototypes/technology/landscaping.lua @@ -43,6 +43,22 @@ if DECT.ENABLED["landscaping"] then { type = "unlock-recipe", recipe = "dect-base-red-desert-dark" + }, + { + type = "unlock-recipe", + recipe = "dect-base-stone-rock" + }, + { + type = "unlock-recipe", + recipe = "dect-base-red-desert-rock-big-01" + }, + { + type = "unlock-recipe", + recipe = "dect-base-red-desert-rock-huge-01" + }, + { + type = "unlock-recipe", + recipe = "dect-base-red-desert-rock-huge-02" } }, order = "a" diff --git a/prototypes/tile/tiles.lua b/prototypes/tile/tiles.lua index c384275..a31704e 100644 --- a/prototypes/tile/tiles.lua +++ b/prototypes/tile/tiles.lua @@ -9,7 +9,7 @@ local function tile_variants(set, variant) u_transition = 16, o_transition = 1 } - if set == "wood" or set == "stone" then + if set == "wood" or set == "stone" or set == "iron" or set == "copper" or set == "coal" then sprite_count = { inner_corner = 8, outer_corner = 1, @@ -121,6 +121,54 @@ if DECT.ENABLED["gravel"] then map_color={r=146, g=146, b=146}, ageing=0, vehicle_friction_modifier = dirt_vehicle_speed_modifier + }, + { + type = "tile", + name = "dect-iron-gravel", + needs_correction = false, + minable = {hardness = 0.2, mining_time = 0.5, result = "iron-ore"}, + mined_sound = { filename = "__core__/sound/axe-mining-ore-3.ogg" }, + collision_mask = {"ground-tile"}, + walking_speed_modifier = 1.1, + layer = 60, + decorative_removal_probability = DECT.CONFIG.SETTINGS["decorative_removal_probability"], + variants = tile_variants("iron", "gravel"), + walking_sound = data.raw["tile"]["dirt"].walking_sound, + map_color={r=114, g=137, b=163}, + ageing=0, + vehicle_friction_modifier = dirt_vehicle_speed_modifier + }, + { + type = "tile", + name = "dect-copper-gravel", + needs_correction = false, + minable = {hardness = 0.2, mining_time = 0.5, result = "copper-ore"}, + mined_sound = { filename = "__core__/sound/axe-mining-ore-3.ogg" }, + collision_mask = {"ground-tile"}, + walking_speed_modifier = 1.1, + layer = 60, + decorative_removal_probability = DECT.CONFIG.SETTINGS["decorative_removal_probability"], + variants = tile_variants("copper", "gravel"), + walking_sound = data.raw["tile"]["dirt"].walking_sound, + map_color={r=163, g=118, b=115}, + ageing=0, + vehicle_friction_modifier = dirt_vehicle_speed_modifier + }, + { + type = "tile", + name = "dect-coal-gravel", + needs_correction = false, + minable = {hardness = 0.2, mining_time = 0.5, result = "coal"}, + mined_sound = { filename = "__core__/sound/axe-mining-ore-3.ogg" }, + collision_mask = {"ground-tile"}, + walking_speed_modifier = 1.1, + layer = 60, + decorative_removal_probability = DECT.CONFIG.SETTINGS["decorative_removal_probability"], + variants = tile_variants("coal", "gravel"), + walking_sound = data.raw["tile"]["dirt"].walking_sound, + map_color={r=84, g=84, b=84}, + ageing=0, + vehicle_friction_modifier = dirt_vehicle_speed_modifier } }) diff --git a/settings.lua b/settings.lua index 6ddceee..a41e1df 100644 --- a/settings.lua +++ b/settings.lua @@ -10,39 +10,46 @@ data:extend({ }, { type = "bool-setting", - name = "dectorio-flooring", + name = "dectorio-decoratives", setting_type = "startup", default_value = true, order = "a-b" }, { type = "bool-setting", - name = "dectorio-walls", + name = "dectorio-flooring", setting_type = "startup", default_value = true, order = "a-c" }, { type = "bool-setting", - name = "dectorio-painted-concrete", + name = "dectorio-walls", setting_type = "startup", default_value = true, order = "a-d" }, { type = "bool-setting", - name = "dectorio-signs", + name = "dectorio-painted-concrete", setting_type = "startup", default_value = true, order = "a-e" }, { type = "bool-setting", - name = "dectorio-signals", + name = "dectorio-signs", setting_type = "startup", default_value = true, order = "a-f" }, + { + type = "bool-setting", + name = "dectorio-signals", + setting_type = "startup", + default_value = true, + order = "a-g" + }, { type = "bool-setting", name = "dectorio-vanilla-hazard-concrete-style",