diff --git a/changelog.txt b/changelog.txt index c2572f4..705a811 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,8 @@ +Version: 2.1.1 +Date: 2022.10.09 20:00:00+00:00 + Bugfixes: + - QUICK HOTFIX - Discovered an issue with fusion versus fission for the base game and quick-start-delight. The mod will use `fission` if you are not in "Space Age", and `fusion` if you are. Thanks to https://github.com/Xephi for reporting this issue. + --------------------------------------------------------------------------------------------------- Version: 2.1.0 Date: 2024.10.21 03:00:00+00:00 diff --git a/control.lua b/control.lua index b726de6..5756729 100644 --- a/control.lua +++ b/control.lua @@ -57,7 +57,7 @@ script.on_event(defines.events.on_player_created, function(event) armor_inventory.insert({name = "power-armor-mk2", count = 1}) -- Insert the rest of the equipment into the armor - configure_gear(character, CHARACTER_GEAR) + configure_gear(player, character, CHARACTER_GEAR) -- Place construction bots, and other items into inventory load_gear(PLAYER_LOADOUT_FROM_SETTINGS, player, inventory) @@ -82,7 +82,7 @@ script.on_event(defines.events.on_player_created, function(event) spidertron.create_grid() -- Insert the Spidertron gear - configure_gear(spidertron, SPIDER_GEAR) + configure_gear(player, spidertron, SPIDER_GEAR) -- The Spidertron is prepared player.print({"qsd-log-message.info-startup-spidertron"}, COLOR_WHITE) diff --git a/info.json b/info.json index a63735e..22dd43a 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "quick-start-delight", - "version": "2.1.0", + "version": "2.1.1", "title": "Quick Start Delight", "author": "urda", "homepage": "https://github.com/urda/quick-start-delight", diff --git a/locale/en/strings.cfg b/locale/en/strings.cfg index 3eac7a4..2de4866 100644 --- a/locale/en/strings.cfg +++ b/locale/en/strings.cfg @@ -7,6 +7,8 @@ error-no-inventory=Quick Start Delight :: No character inventory found! error-no-spidertron=Quick Start Delight :: Unable to locate Spidertron! info-character-init=Quick Start Delight :: Your character has been "quick started" thanks to Urda! +info-space-no-space-fission=Quick Start Delight :: No space age! Bummer. Using fission. +info-space-space-fusion=Quick Start Delight :: Space age detected! Using fusion. info-startup=Quick Start Delight :: Starting up ... info-startup-inventory=Quick Start Delight :: Character inventory initialized ... info-startup-inventory-added-generic=Quick Start Delight :: Added __1__ (x__2__) to inventory ... diff --git a/qsd/utils.lua b/qsd/utils.lua index d73dcc8..1fe4933 100644 --- a/qsd/utils.lua +++ b/qsd/utils.lua @@ -19,12 +19,22 @@ require("constants") -- -- @usage configure_gear(character, CHARACTER_GEAR) -- +-- @param target_player The current player -- @param gear_to_load The target character, spidertron, or other equipment grid. -- @param gear_loadout The gear to load into the equipment grid. -- -function configure_gear(gear_to_load, gear_loadout) +function configure_gear(target_player, gear_to_load, gear_loadout) for gear_type, gear_group in pairs(gear_loadout) do for gear_name, gear_position_array in pairs(gear_group) do + if gear_name == "fusion-reactor-equipment" then + if script.active_mods['space-age'] then + target_player.print({"qsd-log-message.info-space-space-fusion"}) + else + gear_name = "fission-reactor-equipment" + target_player.print({"qsd-log-message.info-space-no-space-fission"}) + end + end + for key, position in ipairs(gear_position_array) do local new_gear = gear_to_load.grid.put({name = gear_name, position = position})