mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
Fixed a bunch of warnings and errors (#26993)
* renamed implant malfunction defines * refactored domutation * possibly fix something about whitelists * fix admin_memo warning * fixed wrong attackby parameters in click.dm * remove superfluous return in BSQL * maybe fix something in mob/add_language * maybe fix more language stuff * Added return-type annotation to job_controller * removed unreachable code from observer.dm * possibly fix electrocute_act * fixed bees wow this code never ran, 100% tested * fixed parrot life * fixed wolf attack logs * fix bear life * removed unreachable slime/show_inv * fixed human/electrocute_act * actually just get rid of this shit * properly add return types * removed more returns from BSQL * added get_organ return type * fixed infrared holder_movement * fixed type_instances declaration * fixed unreacheable overlay/New * possibly fix release_restraints * remove hopefully final return from BSQL
This commit is contained in:
@@ -19,7 +19,6 @@ BSQL_PROTECT_DATUM(/datum/BSQL_Connection)
|
||||
var/error = world._BSQL_Internal_Call("CreateConnection", connection_type, "[asyncTimeout]", "[blockingTimeout]", "[threadLimit]")
|
||||
if(error)
|
||||
BSQL_ERROR(error)
|
||||
return
|
||||
|
||||
id = world._BSQL_Internal_Call("GetConnection")
|
||||
if(!id)
|
||||
@@ -37,12 +36,10 @@ BSQL_DEL_PROC(/datum/BSQL_Connection)
|
||||
var/error = world._BSQL_Internal_Call("OpenConnection", id, ipaddress, "[port]", username, password, database)
|
||||
if(error)
|
||||
BSQL_ERROR(error)
|
||||
return
|
||||
|
||||
var/op_id = world._BSQL_Internal_Call("GetOperation")
|
||||
if(!op_id)
|
||||
BSQL_ERROR("Library failed to provide connect operation for connection id [id]([connection_type])!")
|
||||
return
|
||||
|
||||
return new /datum/BSQL_Operation(src, op_id)
|
||||
|
||||
@@ -51,18 +48,16 @@ BSQL_DEL_PROC(/datum/BSQL_Connection)
|
||||
var/error = world._BSQL_Internal_Call("NewQuery", id, query)
|
||||
if(error)
|
||||
BSQL_ERROR(error)
|
||||
return
|
||||
|
||||
var/op_id = world._BSQL_Internal_Call("GetOperation")
|
||||
if(!op_id)
|
||||
BSQL_ERROR("Library failed to provide query operation for connection id [id]([connection_type])!")
|
||||
return
|
||||
|
||||
return new /datum/BSQL_Operation/Query(src, op_id)
|
||||
|
||||
|
||||
/datum/BSQL_Connection/Quote(str)
|
||||
if(!str)
|
||||
return null;
|
||||
. = world._BSQL_Internal_Call("QuoteString", id, "[str]")
|
||||
if(!.)
|
||||
BSQL_ERROR("Library failed to provide quote for [str]!")
|
||||
BSQL_ERROR("Library failed to provide quote for [str]!")
|
||||
|
||||
@@ -15,19 +15,16 @@
|
||||
if(!fexists(libPath))
|
||||
BSQL_DEL_CALL(caller)
|
||||
BSQL_ERROR("Could not find [libPath]!")
|
||||
return
|
||||
|
||||
var/version = _BSQL_Internal_Call("Version")
|
||||
if(version != BSQL_VERSION)
|
||||
BSQL_DEL_CALL(caller)
|
||||
BSQL_ERROR("BSQL DMAPI version mismatch! Expected [BSQL_VERSION], got [version == null ? "NULL" : version]!")
|
||||
return
|
||||
|
||||
var/result = _BSQL_Internal_Call("Initialize")
|
||||
if(result)
|
||||
BSQL_DEL_CALL(caller)
|
||||
BSQL_ERROR(result)
|
||||
return
|
||||
_BSQL_Initialized(TRUE)
|
||||
|
||||
/world/proc/_BSQL_Initialized(new_val)
|
||||
|
||||
@@ -22,7 +22,6 @@ BSQL_DEL_PROC(/datum/BSQL_Operation)
|
||||
var/result = world._BSQL_Internal_Call("OpComplete", connection.id, id)
|
||||
if(!result)
|
||||
BSQL_ERROR("Error fetching operation [id] for connection [connection.id]!")
|
||||
return
|
||||
return result == "DONE"
|
||||
|
||||
/datum/BSQL_Operation/GetError()
|
||||
@@ -43,5 +42,4 @@ BSQL_DEL_PROC(/datum/BSQL_Operation)
|
||||
if(error == "Operation timed out!") //match this with the implementation
|
||||
return FALSE
|
||||
BSQL_ERROR("Error waiting for operation [id] for connection [connection.id]! [error]")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user