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:
Ghom
2025-10-18 11:43:38 +02:00
committed by GitHub
parent 45d7078120
commit e5be2d0f91
22 changed files with 296 additions and 79 deletions
+2 -5
View File
@@ -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