mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
Sensors can now be printed, removed and installed on jumpsuits. HANDCRAFTED jumpsuits no longer have sensors by default (also mild crafting refactor) (#93121)
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
This commit is contained in:
@@ -372,19 +372,17 @@
|
||||
if(recipe.structures)
|
||||
requirements += recipe.structures
|
||||
|
||||
var/list/surroundings = get_environment(atom, recipe.blacklist)
|
||||
for(var/path_key in requirements)
|
||||
var/list/surroundings
|
||||
var/amount = recipe.reqs?[path_key] || recipe.machinery?[path_key] || recipe.structures?[path_key]
|
||||
if(!amount)//since machinery & structures can have 0 aka CRAFTING_MACHINERY_USE - i.e. use it, don't consume it!
|
||||
continue
|
||||
surroundings = get_environment(atom, recipe.blacklist)
|
||||
surroundings -= return_list
|
||||
if(ispath(path_key, /datum/reagent))
|
||||
if(!holder)
|
||||
holder = new(INFINITY, NO_REACT) //an infinite volume holder than can store reagents without reacting
|
||||
return_list += holder
|
||||
while(amount > 0)
|
||||
var/obj/item/reagent_containers/container = locate() in surroundings
|
||||
var/obj/item/reagent_containers/container = (locate() in surroundings) || (locate() in return_list)
|
||||
if(isnull(container)) //This would only happen if the previous checks for contents and tools were flawed.
|
||||
stack_trace("couldn't fulfill the required amount for [path_key]. Dangit")
|
||||
if(QDELING(container)) //it's deleting...
|
||||
@@ -394,7 +392,6 @@
|
||||
if(reagent_volume)
|
||||
container.reagents.trans_to(holder, min(amount, reagent_volume), target_id = path_key, no_react = TRUE)
|
||||
amount -= reagent_volume
|
||||
surroundings -= container
|
||||
container.update_appearance(UPDATE_ICON)
|
||||
else if(ispath(path_key, /obj/item/stack))
|
||||
var/obj/item/stack/tally_stack
|
||||
|
||||
Reference in New Issue
Block a user