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

SM now comes in crates #8306

Merged
merged 2 commits into from
Sep 15, 2023

Conversation

null-Aurelian
Copy link
Contributor

Per issue #7994, quick check for SM shard and crates the order if SM is present in order

About The Pull Request

Per issue #7994, QoL change to put the SM from the Zayra in a crate. We do want guild techs, even if it is funny when they run into the SM they ordered.

Why It's Good For The Game

Minor QoL fix so people aren't upset about dusting themselves by accident.

Testing

Tested by ordering a single SM from Zayra
Tested by ordering an SM with other items from Zayra

Changelog

🆑
tweak: added a check to creating an order from the trade beacon so that orders containing an SM shard are crated on spawn.
/:cl:

Per issue discordia-space#7994, quick check for SM shard and crates the order if SM is present in order
@Mycah142

This comment was marked as off-topic.

@null-Aurelian

This comment was marked as off-topic.

@Humonitarian

This comment was marked as off-topic.

@Mycah142

This comment was marked as off-topic.

@null-Aurelian

This comment was marked as off-topic.

Copy link
Contributor

@TheShown911 TheShown911 left a comment

Choose a reason for hiding this comment

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

Literally 0 soul, next thing they are gonna do is forbid people from spawning without a brain.

@@ -446,7 +446,7 @@ SUBSYSTEM_DEF(trade)
var/obj/structure/closet/secure_closet/personal/trade/C
var/count_of_all = collect_counts_from(shopList)
var/price_for_all = collect_price_for_list(shopList)
if(isnum(count_of_all) && count_of_all > 1)
if((isnum(count_of_all) && count_of_all > 1) || shopList.Find("/obj/machinery/power/supermatter") > -1)
Copy link
Contributor

Choose a reason for hiding this comment

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

From byond manual

The Find proc could be used for that purpose, but if you don't care about the position of the item in the list, in is more convenient and efficient. The expression is 1 if the item exists in the list and 0 if not.

Your > -1 will always be true ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't realize, I just thought it would return the position and -1 if it doesn't exist like a normal language. I'll fix this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

change has been applied, searches for >0 rather than >-1

Copy link
Contributor

Choose a reason for hiding this comment

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

like a normal language

This is BYOND we're dealing with my good sir!

find() returns 0 if item is not found, not -1 apparently
@hyperioo hyperioo merged commit f9d3804 into discordia-space:master Sep 15, 2023
6 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants