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

Clique: Refactors and Additional Features supported by v1.5 #1989

Merged
merged 4 commits into from
Jul 19, 2023
Merged

Conversation

ThePhar
Copy link
Member

@ThePhar ThePhar commented Jul 19, 2023

What is this fixing or adding?

Refactors, implementation of get_filler_item_name, and new color option.

Also sidesteps a possible generation issue with larger Clique-only games because of how restricted the "viable location pool" is by preventing Button Activation from being on The Button.

How was this tested?

Ran a mostly Clique test game, with minimal issues.

If this makes graphical changes, please attach screenshots.

N/A

@ThePhar ThePhar added is: enhancement Issues requesting new features or pull requests implementing new features. is: refactor/cleanup Improvements to code/output readability or organizization. labels Jul 19, 2023

def create_item(self, name: str) -> CliqueItem:
return CliqueItem(name, ItemClassification.progression, self.item_name_to_id[name], self.player)
return CliqueItem(name, item_data_table[name].type, item_data_table[name].code, self.player)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this raise if someone plandoes "Button Activation" with "hard_mode" disabled?

Suggested change
return CliqueItem(name, item_data_table[name].type, item_data_table[name].code, self.player)
return CliqueItem(name, item_data_table[name].type, item_data_table[name].code, self.player)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you asking if it should raise or it does if that happens? If someone plandos Button Activation it would just create a useless item.

Worst case, it will cause a generation failure (or ignore for force: false and force: null if it's not possible like in a single player game.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was a play on the attribute name can_create. if can_create returns false, it should crash, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, can_create is only referenced in create_items for normal items.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know. i would expect it to throw an exception or divide by 0 when being called from plando

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I disagree.

worlds/clique/Rules.py Outdated Show resolved Hide resolved

def fill_slot_data(self):
return {
"color": getattr(self.multiworld, "color")[self.player].current_key
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could make this a lot nicer and get rid of all the getattr with #993

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah well... it ain't merged yet. :P

@ThePhar ThePhar merged commit ca46a64 into main Jul 19, 2023
@ThePhar ThePhar deleted the clique-1.5 branch July 19, 2023 22:16
FlySniper pushed a commit to FlySniper/Archipelago that referenced this pull request Nov 14, 2023
kl3cks7r pushed a commit to kl3cks7r/Archipelago that referenced this pull request Dec 15, 2023
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: enhancement Issues requesting new features or pull requests implementing new features. is: refactor/cleanup Improvements to code/output readability or organizization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants