anchor.diff:  	var/anchorable = TRUE
   	var/icon_welded = "welded"
   	var/notreallyacloset = FALSE // It is genuinely a closet
  +	var/datum/gas_mixture/air_contents
  +	var/airtight_when_welded = TRUE
  +	var/airtight_when_closed = FALSE
   
   
   /obj/structure/closet/Initialize(mapload)
  
positive.code: 	opened = FALSE
  	density = TRUE
  	update_icon()
  	return TRUE
  
  /obj/structure/closet/proc/toggle(mob/living/user)
  
negative.code: 		user.resting = FALSE
  		togglelock(user)
  		T1.visible_message("<span class='warning'>[user] dives into [src]!</span>")
  
  /obj/structure/closet/proc/update_airtightness()
  	var/is_airtight = FALSE
  	if(airtight_when_closed && !opened)
  		is_airtight = TRUE
  	if(airtight_when_welded && welded)
  		is_airtight = TRUE
  	// okay so this might create/delete gases but the alternative is extra work and/or unnecessary spacewind from welding lockers.
  	// basically we're simulating the air being displaced without actually having the air be displaced.
  	// speaking of we should really add a way to displace air. Canisters are really big and they really ought to displace air. Alas it doesnt exist
  	// so instead I have to violate conservation of energy. Not that this game already doesn't.
  	if(is_airtight && !air_contents)
  		air_contents = new(500)
  		var/datum/gas_mixture/loc_air = loc?.return_air()
  		if(loc_air)
  			air_contents.copy_from(loc_air)
  			air_contents.remove_ratio((1 - (air_contents.volume / loc_air.volume))) // and thus we have just magically created new gases....
  	else if(!is_airtight && air_contents)
  		var/datum/gas_mixture/loc_air = loc?.return_air()
  		if(loc_air) // remember that air we created earlier? Now it's getting deleted! I mean it's still going on the turf....
  			var/remove_amount = (loc_air.total_moles() + air_contents.total_moles()) * air_contents.volume / (loc_air.volume + air_contents.volume)
  			loc.assume_air(air_contents)
  			loc.remove_air(remove_amount)
  			loc.air_update_turf()
  		air_contents = null
  
  /obj/structure/closet/return_air()
  	if(welded)
  		return air_contents
  	return ..()
  
  /obj/structure/closet/assume_air(datum/gas_mixture/giver)
  	if(air_contents)
  		return air_contents.merge(giver)
  	return ..()
  
  /obj/structure/closet/remove_air(amount)
  	if(air_contents)
  		return air_contents.remove(amount)
  	return ..()
  
  /obj/structure/closet/return_temperature()
  	if(air_contents)
  		return air_contents.temperature
  	return ..()
  