Skip to content

Commit

Permalink
Merge pull request #4165 from out-of-phaze/fix/waterskin-open
Browse files Browse the repository at this point in the history
Fix waterskins not being open containers
  • Loading branch information
MistakeNot4892 authored Jul 8, 2024
2 parents 17fa8d8 + 14cc3f5 commit bd74d1c
Showing 1 changed file with 12 additions and 0 deletions.
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

0 comments on commit bd74d1c

Please sign in to comment.