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

Medbelts pull from pillbottles as default #4621

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
storage_slots = 14
max_w_class = SIZE_MEDIUM
max_storage_space = 28
var/mode = 0 //Pill picking mode
var/mode = 1 //Picking from pill bottle mode
Comment on lines 152 to +154
Copy link

@ghost ghost Oct 10, 2023

Choose a reason for hiding this comment

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

bit of an ask, but you should probably be using defines, for example, there is a define here called SIZE_MEDIUM. https://github.com/cmss13-devs/cmss13/blob/master/.github/guides/STYLES.md#no-magic-numbers-or-strings

Copy link
Contributor

Choose a reason for hiding this comment

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

Since it seems the code to toggle is just mode = !mode, it should just be a FALSE/TRUE boolean

Copy link

@ghost ghost Oct 10, 2023

Choose a reason for hiding this comment

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

for this too, max_storage_space = 28, storage_slots = 14, It's not even his code, hence it's a bit of an ask. I didn't look deep enough into the code, it doesn't seem to be the trend there so nvm.

Copy link

@ghost ghost Oct 10, 2023

Choose a reason for hiding this comment

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

And aren't true and false just defines for 1 and 0? Might be wrong.

Copy link

@ghost ghost Oct 10, 2023

Choose a reason for hiding this comment

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

not saying you need to do this, but this is an example of how boolean defines are properly done
Screen Shot 2023-10-09 at 10 11 02 PM
It would eliminate the need for you to place a comment like this
Screen Shot 2023-10-09 at 10 13 52 PM
because it would be self-explanatory what the define is.
So compare that with this
Screen Shot 2023-10-09 at 10 41 28 PM

Alternatively a much simpler approach using true or false with comments.
Screen Shot 2023-10-09 at 10 34 59 PM


can_hold = list(
/obj/item/device/healthanalyzer,
Expand Down
Loading