Refactorio / RedMew

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

April fools maps #1404

Closed RedRafe closed 5 months ago

RedRafe commented 5 months ago

This would be the 1st draft of the April Fools scenario.

As of current time of posting this. I'm running out of time before 2024 April Fools', so I expect this PR to be a draft/test of the features rather than a finished product. Some tips to navigate the new code:

Relevant global redmew changes

Main dir: map_gen/maps/april_fools is the new subfolder, structured as: --- scenario : relevant features that may or may not be included in the map --- modules : only "random/crazy" modules (each module is a 1-N level of some crazy behaviour, controlled by the scenario) --- 2019.lua and 2024.lua : the two version of the scenario (reconstructed from Pinguin of 2019 and expanded)

There's a good degree of copy/paste to quickly adapt some of our modules to work outside RedmewSurface, I'll tidy 'em up if needed afterwards. Half of the scenario is at RedMew Data/april-fools (for the data stage part and some minor tweaks)

How to test

I'm attaching below a copy of my mod-setting.dat, v0.2.4 of the RedMew mod, & a copy of a save

Short-term feature until event launches

mod-settings.dat.zip redmew-data_0.2.4.zip af_test-deflated.zip

(yup, fails build because of nice-fill.lua I know)

RedRafe commented 5 months ago

Hi, thanks a lot for reviewing with such short notice. I'm still trying to add some features of the bullet list before tomorrow (so wait a sec before merging :-) ). Just to answer your points:

  1. nicefill code was taken from nicefill mod, I dont have time to refactor it for us so i'll be ditching the module and just add the mod to the event modlist. but I'll be happy to implement one for us in the future

  2. I do not have the images unfortunately, only the code

  3. will add scenarios to templates & turn off debug mode obviously (and also add poll/restart module to them too I guess)

  4. script.on_event I really don't like to add to luacheck cuz I also think it was left out to catch script. instead of using the event. I'm going to disable the check in that line instead of adding to luacheck, and implement the customInput support later

  5. I was getting crashes before adding any gui, don't know it it was a mod or something related to the toast module...

RedRafe commented 5 months ago

@grilledham I believe this to be the "final" version before the event. Got a couple features in from the bullet list too. I would have loved to add Diggy's cave collapses to the underworld surface, but need to rework the Diggy's module to work outside surface 'redmew' and check other Diggy's template data... I'll have a look tomorrow if I can

Other than that, maybe just have a look at ../scenario/restart_command.lua (which is the main addition that uses shared_globals.lua and rocket_launched.lua to set the target condition & pass it along) if you want

grilledham commented 5 months ago

LGTM. Would you like me to merge now?

RedRafe commented 5 months ago

Sure