Skip to content

Commit

Permalink
Fix not being able to select container/pill/patch type in chemmasters (
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy authored Dec 10, 2024
1 parent 798b1f2 commit 862d4b7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions code/modules/reagents/chemistry/machinery/chem_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ GLOBAL_LIST_INIT(chem_master_containers, list(
return TRUE

if(action == "selectContainer")
var/obj/item/reagent_containers/target = locate(params["ref"])
var/target_ref = params["ref"]
var/obj/item/reagent_containers/target = locate(target_ref)

//is this even a valid type path
if(!ispath(target))
Expand All @@ -364,15 +365,14 @@ GLOBAL_LIST_INIT(chem_master_containers, list(
//are we printing a valid container
var/container_found = FALSE
for(var/category in printable_containers)
for(var/obj/item/reagent_containers/container as anything in printable_containers[category])
if(target == container)
container_found = TRUE
break
if(target in printable_containers[category])
container_found = TRUE
break
if(!container_found)
return FALSE

//set the container
selected_container = target
selected_container = target_ref
return TRUE

if(action == "create")
Expand Down

0 comments on commit 862d4b7

Please sign in to comment.