|
133 | 133 | playsound(src, select_sound, 50, TRUE, extrarange = -3) |
134 | 134 | //Add reagent to mixer |
135 | 135 | if("addMixer") |
136 | | - src.reagents.trans_id_to(mixer, text2path(params["itemPath"]), selected_transfer) |
| 136 | + reagents.trans_id_to(mixer, text2path(params["itemPath"]), selected_transfer) |
137 | 137 | playsound(src, select_sound, 50, TRUE, extrarange = -3) |
138 | 138 | //Return reagent to storage |
139 | 139 | if("transferBack") |
|
148 | 148 | //Create reagents holder for drinks |
149 | 149 | create_reagents(reagent_capacity, OPENCONTAINER | NO_REACT) |
150 | 150 | mixer = new /obj/item/reagent_containers(src, 50) |
151 | | - mixer.reagent_flags = NO_REACT | SPILLABLE |
| 151 | + mixer.create_reagents(50, NO_REACT) |
152 | 152 |
|
153 | 153 | /obj/machinery/food_cart/Destroy() |
154 | | - //Increase the mixer's volume to hold all of cart's reagents and set its name to cart's name |
155 | | - mixer.volume += reagent_capacity |
156 | | - mixer.name = name |
157 | | - //Move all reagents in cart to mixer |
158 | | - src.reagents.trans_to(mixer, reagent_capacity) |
159 | | - mixer.loc = src.loc |
160 | | - //Spill the contents of the mixer |
161 | | - mixer.SplashReagents(src.loc, TRUE) |
| 154 | + //Only alert others if the cart or mixer has any reagents |
| 155 | + if(mixer.reagents.total_volume > 0 || reagents.total_volume > 0) |
| 156 | + visible_message(span_alert("[src] spills all of its liquids onto the floor!")) |
| 157 | + //Spill reagents on the cart's turf |
| 158 | + var/turf/spill_area = loc |
| 159 | + spill_area.add_liquid_from_reagents(mixer.reagents, FALSE, mixer.reagents.chem_temp) |
| 160 | + spill_area.add_liquid_from_reagents(reagents, FALSE, mixer.reagents.chem_temp) |
162 | 161 | //Reduce mixer to dust |
163 | 162 | QDEL_NULL(mixer) |
| 163 | + |
164 | 164 | return ..() |
165 | 165 |
|
166 | 166 | //For adding items and reagents to storage |
|
0 commit comments