EarendelDevelopers / factorio-mods

This is a public repository for tracking issues with Earendel's factorio mods.
19 stars 3 forks source link

Combat Mechanics Overhaul touches my hidden accumulators #345

Closed James-Fire closed 3 months ago

James-Fire commented 4 months ago

It changes their icon, and sets their upgrade to another accumulator without care for if that upgrade is even valid.

https://cdn.discordapp.com/attachments/888589621078929458/1245915572319948971/image.png?ex=665a7ccc&is=66592b4c&hm=3ed2301b2678b5f6811f20932cbac054233aeb4f703cc134547e6e42701143aa&

A) You shouldn't be setting entities to upgrade to other entities without checking that it's a valid upgrade

B) Why are you even touching upgrades or icons on accumulators in CMO in the first place?

I have added a line to my mod to undo the upgrade for now, so it still works, but you need to fix this on your end.

My accumulator as it should be: https://cdn.discordapp.com/attachments/888589621078929458/1245914832222552237/image.png?ex=665a7c1b&is=66592a9b&hm=e1ce7532d446dd519636c806bd398f4b62b49238bd54749ff155de67b9484c56&

My accumulator after you touch it: https://cdn.discordapp.com/attachments/888589621078929458/1245914270084890695/image.png?ex=665a7b95&is=66592a15&hm=b6f70fa7bb3a613c11b7e6be2bc4f85cd2eeca063d884a7c2395755c0c241270&

heinwessels commented 4 months ago

The images you linked isn't displaying, so it's hard to see the problem you are having. You can paste images straight into the description, or comments, like this. Seeing the images will help diagnose your issue :) image

I don't see anything related to next_upgrade in CMO's code though

James-Fire commented 4 months ago

The images in order

image

image

image

Yeah, I looked in CMO as well and couldn't find something that should do it, but my entity is only edited by it.

BurninSun commented 4 months ago

Can you provide the line of code that needs to go into your mod to cause this? With just CMO and your mod loaded as-is, everything looks normal.

James-Fire commented 4 months ago

Yes, as I said I added a line to undo the upgrade, which allows it to load.

https://github.com/James-Fire/James-Train-Mod/blob/40965ff659f944914ebac5a750498605c15fd0d7/data-final-fixes.lua#L28

This line fixes the loading issue by removing the upgrade in the accumulator. I did not fix the icon or naming.

My accumulator is copied from the vanilla accumulator, with this stuff set after copying. I'm not sure how this happens, since CMO doesn't appear to actually do it, but it's also the only one that touches it

BurninSun commented 4 months ago

Loading up CMO and James' Train Mod, in the startup settings I enable everything in yours, and the only thing that CMO changes with your prototype is adding:

  trigger_target_mask = {
    "ground-static"
  },

Here is the entity tooltip: image

and the next_upgrade is <empty> CMO itself never sets next_upgrade anywhere in its code.

Not sure what is going on, but its more than just CMO modifying things.

James-Fire commented 4 months ago

No idea on the icon or description either?

BurninSun commented 4 months ago

Its some other mod doing it, just not showing in the prototype history for some reason. Can try disabling mods until it is corrected.

James-Fire commented 4 months ago

Well I have a guess who's doing it then...