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

Fix waterskins not being open containers #4165

Merged
merged 1 commit into from
Jul 8, 2024
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
12 changes: 12 additions & 0 deletions code/game/objects/items/waterskin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@
icon = 'icons/obj/items/waterskin.dmi'
icon_state = ICON_STATE_WORLD
material = /decl/material/solid/organic/leather/gut
atom_flags = ATOM_FLAG_OPEN_CONTAINER
volume = 120
material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME

/obj/item/chems/waterskin/attack_self()
. = ..()
if(!.)
if(ATOM_IS_OPEN_CONTAINER(src))
to_chat(usr, SPAN_NOTICE("You cork \the [src]."))
atom_flags ^= ATOM_FLAG_OPEN_CONTAINER
else
to_chat(usr, SPAN_NOTICE("You remove the cork from \the [src]."))
atom_flags |= ATOM_FLAG_OPEN_CONTAINER
update_icon() // TODO: filled/empty and corked/uncorked sprites

/obj/item/chems/waterskin/crafted
desc = "A long and rather unwieldly water-carrying vessel."
material = /decl/material/solid/organic/leather
Expand Down
Loading