diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index aee6b2fa37a..a936bdd4ae6 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -8,7 +8,6 @@ obj/machinery/atmospherics/binary/passive_gate
desc = "A one-way air valve that does not require power"
var/on = 0
- var/target_pressure = ONE_ATMOSPHERE
update_icon()
if(node1&&node2)
@@ -32,14 +31,14 @@ obj/machinery/atmospherics/binary/passive_gate
var/output_starting_pressure = air2.return_pressure()
var/input_starting_pressure = air1.return_pressure()
- if(output_starting_pressure >= min(target_pressure,input_starting_pressure-10))
- //No need to pump gas if target is already reached or input pressure is too low
- //Need at least 10 KPa difference to overcome friction in the mechanism
+ if(input_starting_pressure - output_starting_pressure < 1)
+ //No need to pump gas if input pressure is too low
+ //Need at least 1 KPa difference to overcome friction in the mechanism
return 1
//Calculate necessary moles to transfer using PV = nRT
if((air1.total_moles() > 0) && (air1.temperature>0))
- var/pressure_delta = min(target_pressure - output_starting_pressure, (input_starting_pressure - output_starting_pressure)/2)
+ var/pressure_delta = (input_starting_pressure - output_starting_pressure)/2
//Can not have a pressure delta that would cause output_pressure > input_pressure
var/transfer_moles = pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
diff --git a/code/game/magic/archived_book.dm b/code/game/magic/archived_book.dm
index 8443444aa38..d8452caa832 100644
--- a/code/game/magic/archived_book.dm
+++ b/code/game/magic/archived_book.dm
@@ -1,6 +1,7 @@
#define BOOK_VERSION_MIN 1
#define BOOK_VERSION_MAX 2
#define BOOK_PATH "data/books/"
+#define BOOKS_USE_SQL 0 // no guarentee for this branch to work right with sql
var/global/datum/book_manager/book_mgr = new()
@@ -41,7 +42,7 @@ datum/book_manager/proc/freeid()
if(!isbn)
return
- if(config.sql_enabled)
+ if(BOOKS_USE_SQL && config.sql_enabled)
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
if(!dbcon.IsConnected())
diff --git a/code/game/magic/library.dm b/code/game/magic/library.dm
index b99bf925756..4cdef6e855d 100644
--- a/code/game/magic/library.dm
+++ b/code/game/magic/library.dm
@@ -2,17 +2,6 @@
//
// Library SQL Configuration
//
-//*******************************
-
-// Deprecated! See global.dm for new SQL config vars -- TLE
-/*
-#define SQL_ADDRESS ""
-#define SQL_DB ""
-#define SQL_PORT "3306"
-#define SQL_LOGIN ""
-#define SQL_PASS ""
-*/
-
//*******************************
// Requires Dantom.DB library ( http://www.byond.com/developer/Dantom/DB )
@@ -499,7 +488,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
dat += "Filter by Author: [author]
"
dat += "\[Start Search\]
"
if(1)
- if(config.sql_enabled)
+ if(BOOKS_USE_SQL && config.sql_enabled)
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
if(!dbcon.IsConnected())
@@ -563,7 +552,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
author = null
author = dd_replacetext(author, "'", "''")
if(href_list["search"])
- if(config.sql_enabled)
+ if(BOOKS_USE_SQL && config.sql_enabled)
SQLquery = "SELECT author, title, category, id FROM library WHERE "
if(category == "Any")
SQLquery += "author LIKE '%[author]%' AND title LIKE '%[title]%'"
@@ -659,7 +648,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
dat += "(Return to main menu)
"
if(4)
dat += "