-
Notifications
You must be signed in to change notification settings - Fork 497
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
SM now comes in crates #8306
Conversation
Per issue discordia-space#7994, quick check for SM shard and crates the order if SM is present in order
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this 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.
code/controllers/subsystems/trade.dm
Outdated
@@ -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) |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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: