mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
- Prayer visibility now starts on, as it should.
- Fixed pulse rifle, energy sword, blackhole and mob spawning - Fixed 'reload admins' not properly updating the 'admins' list, which made adminwho fail, along with some other things. - Fixed a bug, which prevented admin from even being loaded properly in some circumstances, in the database admin system. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5027 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -160,25 +160,3 @@ proc/sql_commit_feedback()
|
|||||||
if(!query.Execute())
|
if(!query.Execute())
|
||||||
var/err = query.ErrorMsg()
|
var/err = query.ErrorMsg()
|
||||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||||
|
|
||||||
|
|
||||||
proc/debug_sql_commit_feedback()
|
|
||||||
if(!blackbox)
|
|
||||||
world << "Round ended without a blackbox recorder. No feedback was sent to the database."
|
|
||||||
return
|
|
||||||
|
|
||||||
//content is a list of lists. Each item in the list is a list with two fields, a variable name and a value. Items MUST only have these two values.
|
|
||||||
var/list/datum/feedback_variable/content = blackbox.get_round_feedback()
|
|
||||||
|
|
||||||
if(!content)
|
|
||||||
world << "Round ended without any feedback being generated. No feedback was sent to the database."
|
|
||||||
return
|
|
||||||
|
|
||||||
for(var/datum/feedback_variable/item in content)
|
|
||||||
var/variable = item.get_variable()
|
|
||||||
var/value = item.get_value()
|
|
||||||
|
|
||||||
world << "INSERT INTO erro_feedback (id, roundid, time, variable, value) VALUES (null, ABC, Now(), '[variable]', '[value]')"
|
|
||||||
|
|
||||||
|
|
||||||
world << "end"
|
|
||||||
@@ -97,6 +97,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
|||||||
|
|
||||||
establish_db_connection()
|
establish_db_connection()
|
||||||
if(!dbcon.IsConnected())
|
if(!dbcon.IsConnected())
|
||||||
|
world.log << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||||
diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||||
config.admin_legacy_system = 1
|
config.admin_legacy_system = 1
|
||||||
load_admins()
|
load_admins()
|
||||||
@@ -107,7 +108,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
|||||||
while(query.NextRow())
|
while(query.NextRow())
|
||||||
var/ckey = query.item[1]
|
var/ckey = query.item[1]
|
||||||
var/rank = query.item[2]
|
var/rank = query.item[2]
|
||||||
if(rank == "Removed") return //This person was de-adminned. They are only in the admin list for archive purposes.
|
if(rank == "Removed") continue //This person was de-adminned. They are only in the admin list for archive purposes.
|
||||||
|
|
||||||
var/rights = query.item[4]
|
var/rights = query.item[4]
|
||||||
if(istext(rights)) rights = text2num(rights)
|
if(istext(rights)) rights = text2num(rights)
|
||||||
@@ -115,8 +116,8 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
|||||||
|
|
||||||
//find the client for a ckey if they are connected and associate them with the new admin datum
|
//find the client for a ckey if they are connected and associate them with the new admin datum
|
||||||
D.associate(directory[ckey])
|
D.associate(directory[ckey])
|
||||||
|
|
||||||
if(!admin_datums)
|
if(!admin_datums)
|
||||||
|
world.log << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
|
||||||
diary << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
|
diary << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
|
||||||
config.admin_legacy_system = 1
|
config.admin_legacy_system = 1
|
||||||
load_admins()
|
load_admins()
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ var/list/admin_datums = list()
|
|||||||
owner = C
|
owner = C
|
||||||
owner.holder = src
|
owner.holder = src
|
||||||
owner.add_admin_verbs() //TODO
|
owner.add_admin_verbs() //TODO
|
||||||
admins += src
|
admins += C
|
||||||
|
|
||||||
/datum/admins/proc/disassociate()
|
/datum/admins/proc/disassociate()
|
||||||
if(owner)
|
if(owner)
|
||||||
|
|||||||
@@ -1401,25 +1401,32 @@
|
|||||||
var/path = text2path(dirty_path)
|
var/path = text2path(dirty_path)
|
||||||
if(!path)
|
if(!path)
|
||||||
removed_paths += dirty_path
|
removed_paths += dirty_path
|
||||||
|
continue
|
||||||
else if(!ispath(path, /obj) && !ispath(path, /turf) && !ispath(path, /mob))
|
else if(!ispath(path, /obj) && !ispath(path, /turf) && !ispath(path, /mob))
|
||||||
removed_paths += dirty_path
|
removed_paths += dirty_path
|
||||||
|
continue
|
||||||
else if(ispath(path, /obj/item/weapon/gun/energy/pulse_rifle))
|
else if(ispath(path, /obj/item/weapon/gun/energy/pulse_rifle))
|
||||||
if(!check_rights(R_FUN,0))
|
if(!check_rights(R_FUN,0))
|
||||||
removed_paths += dirty_path
|
removed_paths += dirty_path
|
||||||
|
continue
|
||||||
else if(ispath(path, /obj/item/weapon/melee/energy/blade))//Not an item one should be able to spawn./N
|
else if(ispath(path, /obj/item/weapon/melee/energy/blade))//Not an item one should be able to spawn./N
|
||||||
if(!check_rights(R_FUN,0))
|
if(!check_rights(R_FUN,0))
|
||||||
removed_paths += dirty_path
|
removed_paths += dirty_path
|
||||||
|
continue
|
||||||
else if(ispath(path, /obj/effect/bhole))
|
else if(ispath(path, /obj/effect/bhole))
|
||||||
if(!check_rights(R_FUN,0))
|
if(!check_rights(R_FUN,0))
|
||||||
removed_paths += dirty_path
|
removed_paths += dirty_path
|
||||||
|
continue
|
||||||
else if(ispath(path, /mob))
|
else if(ispath(path, /mob))
|
||||||
if(!check_rights(R_FUN,0))
|
if(!check_rights(R_FUN,0))
|
||||||
removed_paths += dirty_path
|
removed_paths += dirty_path
|
||||||
else
|
continue
|
||||||
paths += path
|
paths += path
|
||||||
|
|
||||||
if(!paths) return
|
if(!paths)
|
||||||
else if (length(paths) > 5)
|
alert("The path list you sent is empty")
|
||||||
|
return
|
||||||
|
if (length(paths) > 5)
|
||||||
alert("Select fewer object types, (max 5)")
|
alert("Select fewer object types, (max 5)")
|
||||||
return
|
return
|
||||||
else if (length(removed_paths))
|
else if (length(removed_paths))
|
||||||
@@ -1439,11 +1446,9 @@
|
|||||||
if (!( where in list("onfloor","inhand","inmarked") ))
|
if (!( where in list("onfloor","inhand","inmarked") ))
|
||||||
where = "onfloor"
|
where = "onfloor"
|
||||||
|
|
||||||
//TODO ERRORAGE
|
|
||||||
if( where == "inhand" )
|
if( where == "inhand" )
|
||||||
usr << "Support for inhand not available yet. Will spawn on floor."
|
usr << "Support for inhand not available yet. Will spawn on floor."
|
||||||
where = "onfloor"
|
where = "onfloor"
|
||||||
//END TODO ERRORAGE
|
|
||||||
|
|
||||||
if ( where == "inhand" ) //Can only give when human or monkey
|
if ( where == "inhand" ) //Can only give when human or monkey
|
||||||
if ( !( ishuman(usr) || ismonkey(usr) ) )
|
if ( !( ishuman(usr) || ismonkey(usr) ) )
|
||||||
@@ -1452,6 +1457,7 @@
|
|||||||
else if ( usr.get_active_hand() )
|
else if ( usr.get_active_hand() )
|
||||||
usr << "Your active hand is full. Spawning on floor."
|
usr << "Your active hand is full. Spawning on floor."
|
||||||
where = "onfloor"
|
where = "onfloor"
|
||||||
|
|
||||||
if ( where == "inmarked" )
|
if ( where == "inmarked" )
|
||||||
if ( !marked_datum )
|
if ( !marked_datum )
|
||||||
usr << "You don't have any object marked. Abandoning spawn."
|
usr << "You don't have any object marked. Abandoning spawn."
|
||||||
@@ -1472,9 +1478,6 @@
|
|||||||
if ( "inmarked" )
|
if ( "inmarked" )
|
||||||
target = marked_datum
|
target = marked_datum
|
||||||
|
|
||||||
|
|
||||||
//TODO ERRORAGE - Give support for "inhand"
|
|
||||||
|
|
||||||
if(target)
|
if(target)
|
||||||
for (var/path in paths)
|
for (var/path in paths)
|
||||||
for (var/i = 0; i < number; i++)
|
for (var/i = 0; i < number; i++)
|
||||||
@@ -1487,6 +1490,8 @@
|
|||||||
var/mob/M = O
|
var/mob/M = O
|
||||||
M.real_name = obj_name
|
M.real_name = obj_name
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (number == 1)
|
if (number == 1)
|
||||||
log_admin("[key_name(usr)] created a [english_list(paths)]")
|
log_admin("[key_name(usr)] created a [english_list(paths)]")
|
||||||
for(var/path in paths)
|
for(var/path in paths)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
////////////////
|
////////////////
|
||||||
var/datum/admins/holder = null
|
var/datum/admins/holder = null
|
||||||
var/buildmode = 0
|
var/buildmode = 0
|
||||||
var/seeprayers = 0
|
var/seeprayers = 1
|
||||||
|
|
||||||
var/muted = 0
|
var/muted = 0
|
||||||
var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming.
|
var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming.
|
||||||
|
|||||||
Reference in New Issue
Block a user