anchor.diff:  	var/datum/gas_mixture/airmix = current_location.return_air()
   
   	var/time_taken = 4 SECONDS
  -
  -	if(air_contents.return_pressure() > airmix.return_pressure())
  +	var/unsafe = FALSE
  +
  +	var/internal_pressure = air_contents.return_pressure() - airmix.return_pressure()
  +	if(internal_pressure > 2 * ONE_ATMOSPHERE)
   		time_taken *= 2
   		to_chat(user, span_warning("The tank seems to be pressurized, are you sure this is a good idea?"))
  +		unsafe = TRUE
   
   	if(!tool.use_tool(src, user, time_taken, volume =  60))
   		return
   
  +	if(unsafe)
  +		unsafe_pressure_release(user, internal_pressure)
   	deconstruct(disassembled=TRUE)
   	to_chat(user, span_notice("You finish cutting open the sealed gas tank, revealing the innards."))
   
   /obj/machinery/atmospherics/components/tank/deconstruct(disassembled)
   	var/turf/location = drop_location()
   	. = ..()
  +	location.assume_air(air_contents)
   	if(!disassembled)
   		return
   	var/obj/structure/tank_frame/frame = new(location)
   	frame.construction_state = TANK_PLATING_UNSECURED
  -	frame.material_end_product = custom_materials[2].type
  +	for(var/datum/material/material as anything in custom_materials)
  +		if (frame.material_end_product)
  +			// If something looks fishy, you get nothing
  +			message_admins("\The [src] had multiple materials set. Unless you were messing around with VV, yell at a coder")
  +			frame.material_end_product = null
  +			frame.construction_state = TANK_FRAME
  +			break
  +		else
  +			frame.material_end_product = material
   	frame.update_appearance()
   
   ///////////////////////////////////////////////////////////////////
  
positive.code: 	to_chat(user, span_notice("You begin adding [stack] to [src]..."))
  	if(!stack.use_tool(src, user, 3 SECONDS))
  		return
  	if(!stack.use(20))
  		var/amount_more
  		switch(stack.amount)
  			if(0) // Wat?
  				amount_more = "any at all"
  			if(1 to 4)
  				amount_more = "a lot more"
  			if(5 to 9)
  				amount_more = "about four times as much"
  			if(10 to 15)
  				amount_more = "about twice as much"
  			if(16 to 20)
  				amount_more = "just a bit more"
  			else
  				amount_more = "an indeterminate amount more"
  
negative.code: 	if(!isturf(build_location))
  		return
  	var/obj/machinery/atmospherics/components/tank/new_tank = new(build_location)
  	var/list/new_custom_materials = list((material_end_product) = TANK_PLATING_SHEETS * MINERAL_MATERIAL_AMOUNT)
  	new_tank.set_custom_materials(new_custom_materials)
  	new_tank.on_construction(new_tank.pipe_color, new_tank.piping_layer)
  	to_chat(user, span_notice("[new_tank] has been sealed and is ready to accept gases."))
  	qdel(src)
  
  #undef TANK_PLATING_SHEETS
  