mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
[MIRROR] Refactor rolling paper to use customizable reagent holder [MDB IGNORE] (#8905)
* Refactor rolling paper to use customizable reagent holder (#61758) The component can accept dryable items and food items now. Any instance of the component can be set to use dryable items, just like normally food items are used. To add the dryable item, it's the same as with food. You attack with the item in hand. I am currently thinking about more uses for dryable items and also more ways the component can be used. * Refactor rolling paper to use customizable reagent holder Co-authored-by: Jack LeCroy <3073035+jacklecroy@users.noreply.github.com>
This commit is contained in:
@@ -33,7 +33,8 @@
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
var/atom/atom_parent = parent
|
||||
if (!atom_parent.reagents)
|
||||
// assume replacement is OK
|
||||
if (!atom_parent.reagents && !replacement)
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.replacement = replacement
|
||||
@@ -108,6 +109,8 @@
|
||||
switch (ingredient_type)
|
||||
if (CUSTOM_INGREDIENT_TYPE_EDIBLE)
|
||||
valid_ingredient = IS_EDIBLE(ingredient)
|
||||
if (CUSTOM_INGREDIENT_TYPE_DRYABLE)
|
||||
valid_ingredient = HAS_TRAIT(ingredient, TRAIT_DRYABLE)
|
||||
|
||||
// only accept valid ingredients
|
||||
if (!valid_ingredient || HAS_TRAIT(ingredient, TRAIT_CUSTOMIZABLE_REAGENT_HOLDER))
|
||||
|
||||
Reference in New Issue
Block a user