/obj/item/weapon/reagent_containers/food/drinks/glass2/attackby(obj/item/I as obj, mob/user as mob) if(extras.len >= 2) return ..() // max 2 extras, one on each side of the drink if(istype(I, /obj/item/weapon/glass_extra)) var/obj/item/weapon/glass_extra/GE = I if(can_add_extra(GE)) extras += GE user.remove_from_mob(GE) GE.loc = src to_chat(user, "You add \the [GE] to \the [src].") update_icon() else to_chat(user, "There's no space to put \the [GE] on \the [src]!") else if(istype(I, /obj/item/weapon/reagent_containers/food/snacks/fruit_slice)) if(!rim_pos) to_chat(user, "There's no space to put \the [I] on \the [src]!") return var/obj/item/weapon/reagent_containers/food/snacks/fruit_slice/FS = I extras += FS user.remove_from_mob(FS) FS.pixel_x = 0 // Reset its pixel offsets so the icons work! FS.pixel_y = 0 FS.loc = src to_chat(user, "You add \the [FS] to \the [src].") update_icon() else return ..() /obj/item/weapon/reagent_containers/food/drinks/glass2/attack_hand(mob/user as mob) if(src != user.get_inactive_hand()) return ..() if(!extras.len) to_chat(user, "There's nothing on the glass to remove!") return var/choice = input(user, "What would you like to remove from the glass?") as null|anything in extras if(!choice || !(choice in extras)) return if(user.put_in_active_hand(choice)) to_chat(user, "You remove \the [choice] from \the [src].") extras -= choice else to_chat(user, "Something went wrong, please try again.") update_icon() /obj/item/weapon/glass_extra name = "generic glass addition" desc = "This goes on a glass." var/glass_addition var/glass_desc var/glass_color w_class = ITEMSIZE_TINY icon = DRINK_ICON_FILE /obj/item/weapon/glass_extra/stick name = "stick" desc = "This goes in a glass." glass_addition = "stick" glass_desc = "There is a stick in the glass." icon_state = "stick" /obj/item/weapon/glass_extra/straw name = "straw" desc = "This goes in a glass." glass_addition = "straw" glass_desc = "There is a straw in the glass." icon_state = "straw" #undef DRINK_ICON_FILE