Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates normal cs to 2.0 #1440

Merged
merged 14 commits into from
Nov 9, 2024
Merged

Updates normal cs to 2.0 #1440

merged 14 commits into from
Nov 9, 2024

Conversation

RedRafe
Copy link
Contributor

@RedRafe RedRafe commented Oct 26, 2024

Updated crash site to 2.0

  • Updated only core scenario code and tested normal preset
  • Migrated internal names for collision masks, rocks, modules, inserters, chests of all repo

@grilledham
Copy link
Collaborator

Did a quick play test and got this error:
image

Should we be using registration_number instead of unit_number?

@RedRafe
Copy link
Contributor Author

RedRafe commented Oct 26, 2024

Yes this is one of the migrated behaviors. I shall have a second look at this and possibly other migrated cases of registrations

@RedRafe
Copy link
Contributor Author

RedRafe commented Oct 26, 2024

Should we be using registration_number instead of unit_number?

register_on_object_destroyed(LuaEntity) returns --> registration_number, useful_id, defines.target_type.

Same 3 values are provided as params in the raised event when object is destroyed on_object_destroyed.

useful_id is same as LuaEntity::unit_number so in my opinion, keeping the entries in the dictionary sorted by key LuaEntity::unit_number is more convenient in 2.0 as we don't need to keep tabs on registration_number which was an arbitrary ID generated for the event

@RedRafe
Copy link
Contributor Author

RedRafe commented Oct 26, 2024

I've added extra checks for useful_id in case any mod registers rocks/trees (simple entities do not have uid) just to play it safe

ref:

The registration is global across all mods, meaning once one mod registers an object, all mods listening to on_object_destroyed will receive the event when it is destroyed.

@RedRafe RedRafe mentioned this pull request Oct 26, 2024
@grilledham
Copy link
Collaborator

Did another play test, ran into two issues:

  1. Outposts can't be captured. I think it's because in outpost_builder.lua turret_died function line 1673 we need to change local number = event.unit_number to local number = event.useful_id.

image

@RedRafe
Copy link
Contributor Author

RedRafe commented Oct 27, 2024

These have been fixed. Debug mode on this map is still broken, probably on cutscene. It may have to do with renders but I'll need to check

@grilledham
Copy link
Collaborator

These have been fixed. Debug mode on this map is still broken, probably on cutscene. It may have to do with renders but I'll need to check

Do you want to fix that before we merge? We could merge without fixing if this blocks other PRs.

@RedRafe
Copy link
Contributor Author

RedRafe commented Oct 31, 2024

I'm in no rush to merge. I'll take the time to review and fix what's missing. It just has been a tough weeks and I've spent more time just playing tbh 😆

@grilledham
Copy link
Collaborator

grilledham commented Oct 31, 2024

I'm in no rush to merge. I'll take the time to review and fix what's missing. It just has been a tough weeks and I've spent more time just playing tbh 😆

That's cool. No worries in taking the time you need, there is no rush. I just wanted to make sure I wasn't blocking any of your work.

@RedRafe
Copy link
Contributor Author

RedRafe commented Nov 9, 2024

@grilledham fixed the polygon function of renders which was changes and broke some of CS renders. The cutscene is a delicate piece of the scenario during the migration so I'd like a second feedback if everything is working as supposed

@grilledham
Copy link
Collaborator

The cutscene doesn't error in debug mode. But I don't think it's displaying all the text that it should. It shows the first couple of text messages, but after that I only get the clicking sound that is played when rendering text but no actual text.

I'm not sure what is wrong. But we could leave fixing the cutscene to later if you don't want to fix it now.

@grilledham
Copy link
Collaborator

I tested this again and I think it is good expect for the cutscenes. Do we want to merge it now and fix the cutscenes later?

@RedRafe
Copy link
Contributor Author

RedRafe commented Nov 9, 2024

Yes I guess we could merge this and maybe have it run on a server. Usually letting ppl play test it makes it easier to spot missing bugs since the have more time than me to fully test the scenario from beginning to end

@grilledham grilledham merged commit 87957e2 into Refactorio:develop Nov 9, 2024
1 check passed
@RedRafe RedRafe deleted the updates/cs branch November 10, 2024 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants