Refactorio / RedMew

The RedMew scenario code for Factorio.
https://redmew.com
GNU General Public License v3.0
176 stars 80 forks source link

DangerOre Krastorio2 preset #1377

Closed RedRafe closed 11 months ago

RedRafe commented 11 months ago

Hi, I would like to contribute with a DangerOre-Krastorio2 compatible preset.

The commits involve two major changes:

  1. Compatibility added to the turret-autofill shared module
  2. A map preset for DangerOres to be used with Krastorio2 and k2-danger-ores mods

The development was based off Redmew's the already present preset "danger_ore_lazy_one_beltboxes_ore_only", and still features:

Some changes were necessarily made at data-stage by the side mod k2-danger-ores, which is kinda required to run the map with K2 mod, but presents adjustable settings for some features to be enabled/disabled at one's preferences.

RedRafe commented 11 months ago

I've kept the autofill changes separate, as yes, it would be cool to autofill k2 ammos, but the scenario is in peaceful mode so it's not strictly required. The autofill module is shared with all other maps, so I don't really know if that would be a good place to dump non-vanilla code

grilledham commented 11 months ago

Some luacheck failures I can fix if you would prefer. https://github.com/Refactorio/RedMew/actions/runs/6394626624/job/17365979698?pr=1377

Looks like active_mods needs to be added to script -> fields in .luacheckrc.

RedRafe commented 11 months ago
grilledham commented 11 months ago

This is great stuff! I have taken a quick look but I won't be able to review this fully until Friday at the earliest, failing that I should have time at the weekend.

grilledham commented 11 months ago

Thanks. I think we still need to remove the print_satellite_message function though.

RedRafe commented 11 months ago

Thanks. I think we still need to remove the print_satellite_message function though.

That function only prints "Launched X rockets" without any target. Could be useful to know the progression out of the 1000 estimated rockets (from discord at least). But tyou can comment it out.

I'll be out for the weekend so I pass the ball to you now ;) I'll be on my phone tho so I'll be able to reply to messages, but not code

grilledham commented 11 months ago

Cool. I can make the last small change.

score.lua https://github.com/Refactorio/RedMew/blob/develop/features/gui/score.lua#L143 already prints the satellite counts, so we don't need rocket_launched_krastorio2.lua to do that. Previously the rocket_launched script printed the remaining count to win, but the krastorio version doesn't do that.