mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-31 20:11:56 +00:00
## About The Pull Request this is a re-attempt at PR #70725 that was practically ready but was ruined in the course of my hardships with git. Mistakes were made. In this re-edition I also addressed a few suggestions from the comments of the original pr. There is a shaker added in the meta station cafe and the pill bottle is moved out of sight to the fridge (I still left it cause it contained antidepressants for the especially overworked NT employees). Additionally, the naming of `/cup/glass/coffee` has been handled differently this time to minimize the need of changing the code in multiple places. Please refer to the original PR for all details concerning the content, below I add just a rough line-out for the sake of coherency.  The content of the pr extends to: - a new coffee bean driven coffeemaker - syrup bottles - a coffee condiment display box - almost complete make-over of the meta station cafe - adding the new coffeemaker in a few break rooms on delta and tram (2 machines per station) ## Why It's Good For The Game Please refer to #70725 ## Changelog 🆑 add: After a massive success of the Modello 3 series, Piccionaia Home Appliances rolls out a completely new coffeemaker model and renovates the meta station cafe for free in a promotional campaign! add: Syrup bottles, condiment displays, and more, to make the spess coffee experience even better /🆑 Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Tastyfish <crazychris32@gmail.com>
45 lines
1.6 KiB
Plaintext
45 lines
1.6 KiB
Plaintext
// If an item has this element, it can be dried on a drying rack.
|
|
/datum/element/dryable
|
|
element_flags = ELEMENT_BESPOKE
|
|
argument_hash_start_idx = 2
|
|
/// The type of atom that is spawned by this element on drying.
|
|
var/dry_result
|
|
|
|
/datum/element/dryable/Attach(datum/target, atom/dry_result)
|
|
. = ..()
|
|
if(!isatom(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
src.dry_result = dry_result
|
|
|
|
RegisterSignal(target, COMSIG_ITEM_DRIED, PROC_REF(finish_drying))
|
|
ADD_TRAIT(target, TRAIT_DRYABLE, ELEMENT_TRAIT(type))
|
|
|
|
|
|
/datum/element/dryable/Detach(datum/target)
|
|
. = ..()
|
|
UnregisterSignal(target, COMSIG_FOOD_CONSUMED)
|
|
REMOVE_TRAIT(target, TRAIT_DRYABLE, ELEMENT_TRAIT(type))
|
|
|
|
/datum/element/dryable/proc/finish_drying(atom/source)
|
|
SIGNAL_HANDLER
|
|
var/atom/dried_atom = source
|
|
if(dry_result == dried_atom.type)//if the dried type is the same as our currrent state, don't bother creating a whole new item, just re-color it.
|
|
var/atom/movable/resulting_atom = dried_atom
|
|
resulting_atom.add_atom_colour(COLOR_DRIED_TAN, FIXED_COLOUR_PRIORITY)
|
|
ADD_TRAIT(resulting_atom, TRAIT_DRIED, ELEMENT_TRAIT(type))
|
|
resulting_atom.forceMove(source.drop_location())
|
|
return
|
|
|
|
else if(isstack(source)) //Check if its a sheet
|
|
var/obj/item/stack/itemstack = dried_atom
|
|
for(var/i in 1 to itemstack.amount)
|
|
var/atom/movable/resulting_atom = new dry_result(source.drop_location())
|
|
ADD_TRAIT(resulting_atom, TRAIT_DRIED, ELEMENT_TRAIT(type))
|
|
qdel(source)
|
|
return
|
|
else
|
|
var/atom/movable/resulting_atom = new dry_result(source.drop_location())
|
|
ADD_TRAIT(resulting_atom, TRAIT_DRIED, ELEMENT_TRAIT(type))
|
|
qdel(source)
|
|
|