Selene: Lunar Exploitation


Explore and exploit Nauvis's closest neighbour, its moon Selene. Mine new metals, transform your use of solar energy and unlock powerful new technologies.

Content
9 days ago
2.0 - 2.1
316
Planets Combat Armor Environment Mining Fluids Logistic network Manufacturing Power Storage

g Glass smelting

a month ago

I guess that it's intended that glass smelting doesn't work on Selene, but it would be nice if there was some ingame hint - when placing down a furnace on Selene, the input slot still shows "Silicon" as a possible ingredient, but actual insertion is still impossible due to the surface condition, which confused me for a bit (there are enough furnaces and planets in my current game that the surface conditions box isn't all that obvious when looking at a recipe).

a month ago
(updated a month ago)

Also, I found an actual incompatibility: More Quality Scaling replaces quality solar collectors with tweaked variants (higher max temperature and/or heat capacity), which are not affected by your script.

You could look for the modified variants and treat them the same as solar-collector in your code (1), or add solar-collector to the MQS blacklist (if data.raw["mod-data"] and data.raw["mod-data"]["clone-blacklist"] then data.raw["mod-data"]["clone-blacklist"].data["solar-collector"] = true end, ideally in the data-updates stage to not depend on load order), to fix this issue.

(1) these were all the changes necessary to make it work for me locally:

-- add at the top of solar.lua
local solar_filters = {{filter = "name", name = "solar-collector"}, {filter = "name", name = "solar-mirror"}}
local solar_power_2_items = { "solar-collector", "solar-mirror" }

local collector_names = {"solar-collector"}
local collector_names_i = {["solar-collector"]=true}
-- MQS registers clones in a mod_data entry
if prototypes.mod_data["entity-clones"] then
  for _,name in pairs(prototypes.mod_data["entity-clones"].data["solar-collector"]) do
    table.insert(collector_names, name)
    collector_names_i[name] = true
    table.insert(solar_filters,{filter="name",name=name})
    table.insert(solar_power_2_items, name)
  end
end

-- pass the array instead of the single entity name in find_entities_filtered
local solar_collectors = surface.find_entities_filtered{area = {{x_lower, y_lower}, {x_upper, y_upper}}, name = collector_names}

-- replace
if event.name == "solar-collector" then
-- with
if collector_names_i[event.name] then
-- in two places

-- not sure if necessary - in handle_teleport_f queue struct
name = collector.name, -- instead of "solar-collector"

-- and comment out/remove the array definitions that were moved up before the entity-clones loop (solar_filters/solar_power_2_items)
a month ago

Modified solar.lua: https://pastebin.com/xYXb4Q27

a month ago

Thanks for letting me know about both of these!

The presence of silicon in the furnace's input box is misleading - it looks like the base game decides what can go in there per furnace, regardless of the surface the furnace is on. I'll look into a tooltip or recipe name change to make this clearer.

I'll look into the More Quality Scaling issue too - am I right in thinking this mod adds quality scaling to things that don't normally scale, and since collectors and mirrors do already scale it would be appropriate for them to go in the cloning blacklist?

a month ago

More Quality Scaling doesn't just affect entities with no vanilla scaling at all, but also (optionally) extends the quality scaling to new properties - in the case of heat related entities, the maximum temperature and/or the heat capacity. Active compatibility would allow eg. uncommon solar collectors to heat up to 1300°C, just like uncommon nuclear reactors (if temperature scaling is enabled).
Blacklisting would only be necessary if you wanted to prevent such scaling, or if integration was too difficult/complex to be worth bothering.

In this case, integration seems quite simple - consider my pastebin file a pull request :) (I did playtest it a bit, and didn't notice any issues)

The mirrors are not touched by MQS either way.

a month ago

Yep, I've been doing some more digging - ideally the MQS reactor changes would apply to solar collectors, agreed (although in truth they're only reactors because of engine limitations, ideally they'd be heat pipes but that doesn't work). I will probably adopt your proposed changes once I've run the test suite against them; much obliged there.

I'm also noticing there's some bugs with high quality roboports when MQS's roboport "range" and "both" settings are on - it's to do with how I make roboports on airless surfaces inert. I'm working on a fix for that too.

a month ago

Glass smelting recipe name and tooltip now should now point the player towards using the chemical plant recipe on airless surfaces.

Additionally, MQS solar collectors now both scale properly as other reactors do, and work correctly with the solar mirrors. A migration should correct any orphaned MQS collectors that have appeared in the meantime. An issue with MSQ roboports has also been addressed.

Thanks for spotting these again and the solar code changes.

New response