Derpumu / Pacifist

A Factorio mod to remove military items, recipes, and technologies so you can concentrate on building useful things in peaceful mode.
MIT License
2 stars 1 forks source link

Hide combat-related icons from signals/rich text menus #56

Closed Derpumu closed 5 months ago

Derpumu commented 6 months ago

reported by @dperelman: In the rich text item selection menu (e.g. when naming a train stop), I noticed there were a lot of icons related to things that had been removed from the game, including remnants of military entities.

See discussion in #55

dperelman commented 6 months ago

Here's the code to go through all of the entities, record which corpses are used, and hide the rest: 5017577. I originally removed the rest... but there's also references through dying/damage explosions and particles. The right solution might be to follow all of those references and remove those items... but leaving them in the game hidden is simpler and good enough as far as a player can tell.

dperelman commented 6 months ago

Here's a work-in-progress on removing enemies: ac4edb3. The useful part is that I managed to make dummies for "turret" and "unit-spawner" (although it should probably have a dummy "unit" to spawn instead of assuming "compilatron" exists). It seems like actually removing the entities should fit into the existing mechanism for removing military entities, but I didn't quite figure that out. Combat robots should probably also be removed here.

After that, the remaining military rich text items are the artillery flare (data_raw.hide("artillery-flare", "artillery-flare")) and the wall and biter damage explosions that appear when these items are hidden/removed. I'm not sure what effect setting the "hidden" flag on all explosions actually has other than removing them from that menu, but you could hide just the two that show up, I guess. Although I wonder if them showing up there means there's no references to them that the game detects?

dperelman commented 6 months ago

I have a branch https://github.com/dperelman/Pacifist/tree/exp/hide-all-rich-text that gets rid of all of the icons and I think does it in a reasonable way by searching for everything that Pacifist removes references to and removes those (and adds more dummies to cover the newly empty categories). I need to test a bit more and split it out into a couple PRs for the separate pieces, which I'll probably do tomorrow.