diff --git a/bobassembly/changelog.txt b/bobassembly/changelog.txt index 067a4bd9b..b5d8e7de9 100644 --- a/bobassembly/changelog.txt +++ b/bobassembly/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 1.3.0 +Date: ??? + Changes: + - Code tidy: Remove unnecessary global variables #178 +--------------------------------------------------------------------------------------------------- Version: 1.2.2 Date: 21. 02. 2024 Changes: diff --git a/bobassembly/info.json b/bobassembly/info.json index 46100ecbd..4e7f9a9f9 100644 --- a/bobassembly/info.json +++ b/bobassembly/info.json @@ -1,6 +1,6 @@ { "name": "bobassembly", - "version": "1.2.2", + "version": "1.3.0", "factorio_version": "1.1", "title": "Bob's Assembling machines mod", "author": "Bobingabout", diff --git a/bobassembly/prototypes/chemical-plant-updates.lua b/bobassembly/prototypes/chemical-plant-updates.lua index 4a409e7b7..ac813c388 100644 --- a/bobassembly/prototypes/chemical-plant-updates.lua +++ b/bobassembly/prototypes/chemical-plant-updates.lua @@ -91,7 +91,7 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then data.raw["assembling-machine"]["chemical-plant"].icon_size = 32 data.raw["assembling-machine"]["chemical-plant"].icon_mipmaps = nil data.raw["assembling-machine"]["chemical-plant"].animation = - bob_chemical_plant_animation({ r = 0.7, g = 0.2, b = 0.1 }) + bobmods.bob_chemical_plant_animation({ r = 0.7, g = 0.2, b = 0.1 }) -- data.raw["assembling-machine"]["chemical-plant"].working_visualisations = bob_chemical_plant_working_visualisations() data.raw.item["chemical-plant-2"].icon = "__bobassembly__/graphics/icons/new-colors/chemical-plant-2.png" @@ -100,13 +100,13 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then "__bobassembly__/graphics/icons/new-colors/chemical-plant-2.png" data.raw["assembling-machine"]["chemical-plant-2"].icon_size = 32 data.raw["assembling-machine"]["chemical-plant-2"].animation = - bob_chemical_plant_animation({ r = 0.1, g = 0.5, b = 0.7 }) + bobmods.bob_chemical_plant_animation({ r = 0.1, g = 0.5, b = 0.7 }) data.raw.item["chemical-plant-3"].icon = "__bobassembly__/graphics/icons/chemical-plant-2.png" data.raw.item["chemical-plant-3"].icon_size = 32 data.raw["assembling-machine"]["chemical-plant-3"].icon = "__bobassembly__/graphics/icons/chemical-plant-2.png" data.raw["assembling-machine"]["chemical-plant-3"].icon_size = 32 data.raw["assembling-machine"]["chemical-plant-3"].animation = - bob_chemical_plant_animation({ r = 0.7, g = 0.1, b = 0.7 }) + bobmods.bob_chemical_plant_animation({ r = 0.7, g = 0.1, b = 0.7 }) end end diff --git a/bobassembly/prototypes/chemical-plant.lua b/bobassembly/prototypes/chemical-plant.lua index 37668a681..abdbe6c8e 100644 --- a/bobassembly/prototypes/chemical-plant.lua +++ b/bobassembly/prototypes/chemical-plant.lua @@ -16,7 +16,7 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then data.raw.item["chemical-plant"].subgroup = "bob-chemical-machine" data.raw.item["chemical-plant"].order = "e[chemical-plant-1]" - function bob_chemical_plant_old_facing(tint, x) + local function bob_chemical_plant_old_facing(tint, x) return { layers = { { @@ -70,7 +70,7 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then } end - function bob_chemical_plant_old_animation(tint) + local function bob_chemical_plant_old_animation(tint) return { north = bob_chemical_plant_old_facing(tint, 0), east = bob_chemical_plant_old_facing(tint, 1), @@ -79,7 +79,7 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then } end - function bob_chemical_plant_old_working_visualisations() + local function bob_chemical_plant_old_working_visualisations() return { { north_position = util.by_pixel(30, -24), @@ -186,7 +186,7 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then } end - function bob_chemical_plant_fluid_boxes() + local function bob_chemical_plant_fluid_boxes() return { { production_type = "input", @@ -217,7 +217,7 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then } end - function bob_chemical_plant_facing(tint, offset) + local function bob_chemical_plant_facing(tint, offset) return { layers = { { @@ -306,7 +306,7 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then } end - function bob_chemical_plant_animation(tint) + function bobmods.bob_chemical_plant_animation(tint) return { north = bob_chemical_plant_facing(tint, 0), east = bob_chemical_plant_facing(tint, 1), @@ -417,7 +417,7 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then }, crafting_categories = { "chemistry" }, fluid_boxes = bob_chemical_plant_fluid_boxes(), - animation = bob_chemical_plant_animation({ r = 0.5, g = 0.1, b = 0.7 }), + animation = bobmods.bob_chemical_plant_animation({ r = 0.5, g = 0.1, b = 0.7 }), working_visualisations = data.raw["assembling-machine"]["chemical-plant"].working_visualisations, working_sound = data.raw["assembling-machine"]["chemical-plant"].working_sound, vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 }, @@ -451,7 +451,7 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then }, crafting_categories = { "chemistry" }, fluid_boxes = bob_chemical_plant_fluid_boxes(), - animation = bob_chemical_plant_animation({ r = 0.7, g = 0.2, b = 0.1 }), + animation = bobmods.bob_chemical_plant_animation({ r = 0.7, g = 0.2, b = 0.1 }), working_visualisations = data.raw["assembling-machine"]["chemical-plant"].working_visualisations, working_sound = data.raw["assembling-machine"]["chemical-plant"].working_sound, vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 }, @@ -485,7 +485,7 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then }, crafting_categories = { "chemistry" }, fluid_boxes = bob_chemical_plant_fluid_boxes(), - animation = bob_chemical_plant_animation({ r = 0.1, g = 0.7, b = 0.1 }), + animation = bobmods.bob_chemical_plant_animation({ r = 0.1, g = 0.7, b = 0.1 }), working_visualisations = data.raw["assembling-machine"]["chemical-plant"].working_visualisations, working_sound = data.raw["assembling-machine"]["chemical-plant"].working_sound, vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },