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

Include items on exterior stairs of custom houses in MultiRef.items #507

Merged
merged 9 commits into from Mar 18, 2023

Conversation

KevinEady
Copy link
Contributor

Items on exterior stairs of custom houses were not being included in the multi's item script member.

Here is a script where I target the robe, check robe.multi, and loop through robe.multi.items:

    var item := Target(who).multi;
    Broadcast($"multi: {item}");
    foreach child_item in (item.items)
        Broadcast($"  child item: {child_item.objtype} - {child_item.desc}");
    endforeach

First iteration shows the robe not included, and second iteration shows robe included:

Screenshot 2023-02-27 at 22 56 04

@KevinEady KevinEady changed the title Include items on exterior stairs of custom houses to MultiRef.items Include items on exterior stairs of custom houses in MultiRef.items Feb 28, 2023
@coveralls
Copy link
Collaborator

coveralls commented Feb 28, 2023

Coverage Status

Coverage: 44.589% (-0.009%) from 44.599% when pulling ccf053c on increase-multi-items-bounds-check into d9fd8d4 on master.

@@ -175,6 +176,8 @@ void CustomHousesSendFull( UHouse* house, Network::Client* client,
void CustomHousesSendFullToInRange( UHouse* house, int design, int range );
void CustomHousesSendShort( UHouse* house, Network::Client* client );
void CustomHouseStopEditing( Mobile::Character* chr, UHouse* house, bool send_pkts = true );
void CustomHouseStopEditing( Mobile::Character* chr, UHouse* house, ItemList& foo,
Copy link
Member

Choose a reason for hiding this comment

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

foo? :)
A comment why these two versions exists would be good when we cannot get rid of the second version, otherwise we will forget it.

@KevinEady KevinEady merged commit 84d5048 into master Mar 18, 2023
@KevinEady KevinEady deleted the increase-multi-items-bounds-check branch March 18, 2023 12:17
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.

None yet

3 participants