diff --git a/README.md b/README.md index 2aecf70..79b4e32 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,6 @@ The following mods can be a great addition for this mod: Sorted by priority -- Make wood-military optional -- Move pollution surface property to PlanetsLib - Fix pipe graphics on desiccation furnace, provisionary rocket silo and quality assembler - Ban huge rocks with coal from Nauvis - Create proper experience for the transition to Nauvis with a custom UI with launch button (and don't allow taking your inventory) @@ -34,6 +32,7 @@ Sorted by priority - Compatibility with [Amator Phasma's Coal & Steam (forked)](https://mods.factorio.com/mod/apm_power_ldinc) - Compatibility with [Noble Metals](https://mods.factorio.com/mod/bzgold) once it's updated - Revisit compatibility with [AAI Industry](https://mods.factorio.com/mod/aai-industry) +- Move pollution surface property to separate mod ## Credits diff --git a/lignumis/control.lua b/lignumis/control.lua index e8656be..790b1cd 100644 --- a/lignumis/control.lua +++ b/lignumis/control.lua @@ -70,7 +70,17 @@ script.on_event(e.on_player_created, function(event) storage.crashed_ship_parts = remote.call("freeplay", "get_ship_parts") storage.starting_message = remote.call("freeplay", "get_custom_intro_message") - local ship_items = { ["wood-darts-magazine"] = 8 } + local respawn_items = remote.call("freeplay", "get_respawn_items") + respawn_items["wood-darts-magazine"] = respawn_items["firearm-magazine"] + respawn_items["firearm-magazine"] = nil + remote.call("freeplay", "set_respawn_items", respawn_items) + + local created_items = remote.call("freeplay", "get_created_items") + created_items["wood-darts-magazine"] = created_items["firearm-magazine"] + created_items["firearm-magazine"] = nil + remote.call("freeplay", "set_created_items", created_items) + + local ship_items = { ["wood-darts-magazine"] = 2 } local debris_items = { ["lumber"] = 8 } crash_site.create_crash_site(surface, { -5, -6 }, ship_items, debris_items, diff --git a/lignumis/graphics/icons/wood-armor.png b/lignumis/graphics/icons/wood-armor.png new file mode 100644 index 0000000..2d538f0 Binary files /dev/null and b/lignumis/graphics/icons/wood-armor.png differ diff --git a/lignumis/graphics/icons/wood-darts-magazine.png b/lignumis/graphics/icons/wood-darts-magazine.png new file mode 100644 index 0000000..9d0816b Binary files /dev/null and b/lignumis/graphics/icons/wood-darts-magazine.png differ diff --git a/lignumis/info.json b/lignumis/info.json index b300688..995bdf9 100644 --- a/lignumis/info.json +++ b/lignumis/info.json @@ -15,11 +15,11 @@ "mf-core >= 1.0.3", "mf-buildings >= 1.0.7", "mf-logistics >= 1.0.1", - "wood-military >= 2.3.3", "Wood-Walls >= 1.2.0", "?hot-metals >= 1.1.0", "!apm_power_ldinc", "!alien-biomes", + "!wood-military", "!wood-logistics", "!wood-industry", "!early-agriculture", diff --git a/lignumis/locale/en/strings.cfg b/lignumis/locale/en/strings.cfg index c7ef442..37da121 100644 --- a/lignumis/locale/en/strings.cfg +++ b/lignumis/locale/en/strings.cfg @@ -64,6 +64,8 @@ basic-repair-pack=Basic repair pack cupriavidus-necator=Cupriavidus necator dead-cupriavidus-necator=Dead Cupriavidus necator gold-quality-catalyst=Gold quality catalyst +wood-armor=Wood armor +wood-darts-magazine=Wood darts magazine [item-description] wooden-wall=Use wooden walls to protect your base from the locals and to reduce noise levels. @@ -137,10 +139,12 @@ quality-catalyst=Quality catalyst [mod-setting-name] lignumis-belt-progression=Enable progressive belt recipes lignumis-inserter-progression=Enable progressive inserter recipes +lignumis-ammo-progression=Enable progressive ammo recipes [mod-setting-description] lignumis-belt-progression=Yellow belts will require wood belts to craft. lignumis-inserter-progression=Yellow electric inserter will require burner inserter to craft. +lignumis-ammo-progression=Firearm magazines will require wooden darts magazines to craft. [surface-property-name] pollution-type=Pollution type diff --git a/lignumis/prototypes/integrations/wood-military.lua b/lignumis/prototypes/compatibility/wood-military.lua similarity index 100% rename from lignumis/prototypes/integrations/wood-military.lua rename to lignumis/prototypes/compatibility/wood-military.lua diff --git a/lignumis/prototypes/content/data.lua b/lignumis/prototypes/content/data.lua index 86bbe3a..42fdb57 100644 --- a/lignumis/prototypes/content/data.lua +++ b/lignumis/prototypes/content/data.lua @@ -27,5 +27,6 @@ require("mid-game-recipes") require("active-noise-cancelling-tower") require("quality-assembler") require("decoratives") +require("wood-military") require("noise") diff --git a/lignumis/prototypes/content/wood-military.lua b/lignumis/prototypes/content/wood-military.lua new file mode 100644 index 0000000..4d250d6 --- /dev/null +++ b/lignumis/prototypes/content/wood-military.lua @@ -0,0 +1,144 @@ +local item_sounds = require("__base__.prototypes.item_sounds") +local simulations = require("__base__.prototypes.factoriopedia-simulations") + +data:extend({ + { + type = "explosion", + name = "explosion-hit-splinters", + localised_name = { "entity-name.explosion-hit" }, + flags = { "not-on-map" }, + subgroup = "explosions", + animations = util.empty_sprite(), + smoke = "smoke-fast", + smoke_count = 1, + smoke_slow_down_factor = 1, + created_effect = { + type = "direct", + action_delivery = { + type = "instant", + target_effects = { + type = "create-particle", + repeat_count = 2, + particle_name = "wooden-chest-wooden-splinter-particle-small", + offset_deviation = { { -0.5, -0.5 }, { 0.5, 0.5 } }, + initial_height = 0.5, + initial_height_deviation = 0.04, + initial_vertical_speed = 0.069, + initial_vertical_speed_deviation = 0.025, + speed_from_center = 0.01, + speed_from_center_deviation = 0.023 + } + } + } + }, + { + type = "ammo", + name = "wood-darts-magazine", + icon = "__lignumis__/graphics/icons/wood-darts-magazine.png", + ammo_category = "bullet", + ammo_type = { + range_modifier = 0.85, + cooldown_modifier = 1 / 0.85, + action = { + type = "direct", + action_delivery = { + type = "instant", + source_effects = { + { + type = "create-explosion", + entity_name = "explosion-gunshot" + } + }, + target_effects = { + { + type = "create-entity", + entity_name = "explosion-hit-splinters", + offsets = { { 0, 0.5 } }, + offset_deviation = { { -0.5, -0.5 }, { 0.5, 0.5 } } + }, + { + type = "damage", + damage = { amount = 3, type = "physical" } + } + } + } + } + }, + magazine_size = 10, + reload_time = 15, + subgroup = "ammo", + order = "a[basic-clips]-0[wood-darts-magazine]", + inventory_move_sound = item_sounds.wood_inventory_move, + pick_sound = item_sounds.wood_inventory_pickup, + drop_sound = item_sounds.wood_inventory_move, + stack_size = 100, + weight = 10 * kg + }, + { + type = "recipe", + name = "wood-darts-magazine", + energy_required = 1, + ingredients = { { type = "item", name = "wood", amount = 2 } }, + results = { { type = "item", name = "wood-darts-magazine", amount = 1 } } + }, + { + type = "armor", + name = "wood-armor", + icon = "__lignumis__/graphics/icons/wood-armor.png", + resistances = { + { + type = "physical", + decrease = 2, + percent = 10 + }, + { + type = "acid", + decrease = 0, + percent = 10 + }, + { + type = "explosion", + decrease = 1, + percent = 10 + }, + { + type = "fire", + decrease = 0, + percent = -90 + } + }, + subgroup = "armor", + order = "0[light-armor]", + factoriopedia_simulation = simulations.factoriopedia_light_armor, + inventory_move_sound = item_sounds.armor_small_inventory_move, + pick_sound = item_sounds.armor_small_inventory_pickup, + drop_sound = item_sounds.armor_small_inventory_move, + stack_size = 1, + infinite = true, + equipment_grid = "tiny-equipment-grid" + }, + { + type = "recipe", + name = "wood-armor", + energy_required = 4, + ingredients = { + { type = "item", name = "wood", amount = 20 }, + { type = "item", name = "gold-plate", amount = 4 } + }, + results = { { type = "item", name = "wood-armor", amount = 1 } } + }, +}) + +if settings.startup["lignumis-ammo-progression"].value then + table.insert( + data.raw.recipe["firearm-magazine"].ingredients, + { type = "item", name = "wood-darts-magazine", amount = 1 } + ) +end + +data.raw.recipe["firearm-magazine"].enabled = false +data.raw.recipe["light-armor"].enabled = false +table.assign(data.raw.technology["military"].effects, { + { type = "unlock-recipe", recipe = "firearm-magazine" }, + { type = "unlock-recipe", recipe = "light-armor" } +}) diff --git a/lignumis/prototypes/integrations/data.lua b/lignumis/prototypes/integrations/data.lua index db5ef92..038c3cb 100644 --- a/lignumis/prototypes/integrations/data.lua +++ b/lignumis/prototypes/integrations/data.lua @@ -1,3 +1,2 @@ require("vanilla") -require("Wood-Walls") -require("wood-military") \ No newline at end of file +require("Wood-Walls") \ No newline at end of file diff --git a/lignumis/settings-updates.lua b/lignumis/settings-updates.lua index a4401c8..d914cfb 100644 --- a/lignumis/settings-updates.lua +++ b/lignumis/settings-updates.lua @@ -1,7 +1,7 @@ -data.raw["bool-setting"]["wood-military-rockets"].default_value = false -data.raw["bool-setting"]["wood-military-artillery"].default_value = false -data.raw["bool-setting"]["wood-military-damage-buff"].default_value = false -data.raw["bool-setting"]["wood-military-armor"].hidden = true -data.raw["bool-setting"]["wood-military-armor"].forced_value = true -data.raw["bool-setting"]["wood-military-nerf-start"].hidden = true -data.raw["bool-setting"]["wood-military-nerf-start"].forced_value = true \ No newline at end of file +--data.raw["bool-setting"]["wood-military-rockets"].default_value = false +--data.raw["bool-setting"]["wood-military-artillery"].default_value = false +--data.raw["bool-setting"]["wood-military-damage-buff"].default_value = false +--data.raw["bool-setting"]["wood-military-armor"].hidden = true +--data.raw["bool-setting"]["wood-military-armor"].forced_value = true +--data.raw["bool-setting"]["wood-military-nerf-start"].hidden = true +--data.raw["bool-setting"]["wood-military-nerf-start"].forced_value = true \ No newline at end of file diff --git a/lignumis/settings.lua b/lignumis/settings.lua index 4fae102..8b20985 100644 --- a/lignumis/settings.lua +++ b/lignumis/settings.lua @@ -12,5 +12,12 @@ data:extend({ setting_type = "startup", default_value = true, order = "b" + }, + { + type = "bool-setting", + name = "lignumis-ammo-progression", + setting_type = "startup", + default_value = true, + order = "c" } }) diff --git a/sources/icons/wood-armor.afphoto b/sources/icons/wood-armor.afphoto new file mode 100644 index 0000000..a002418 Binary files /dev/null and b/sources/icons/wood-armor.afphoto differ diff --git a/sources/icons/wood-darts-magazine.afphoto b/sources/icons/wood-darts-magazine.afphoto new file mode 100644 index 0000000..06a35b2 Binary files /dev/null and b/sources/icons/wood-darts-magazine.afphoto differ