Bleeding edgy refresh (#303)
* not code stuff * other things * global vars, defines, helpers * onclick hud stuff, orphans, world.dm * controllers and datums * game folder * everything not client/mobs in modules * client folder * stage 1 mob stuff * simple animal things * silicons * carbon things * ayylmaos and monkeys * hyoomahn * icons n shit * sprite fixes * compile fixes * some fixes I cherrypicked. * qdel fixes * forgot brain refractors
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
var/datum/action/quit_vr/quit_action
|
||||
|
||||
|
||||
/mob/living/carbon/human/virtual_reality/New()
|
||||
/mob/living/carbon/human/virtual_reality/Initialize()
|
||||
..()
|
||||
quit_action = new()
|
||||
quit_action.Grant(src)
|
||||
|
||||
@@ -93,31 +93,31 @@
|
||||
switch(action)
|
||||
if("vr_connect")
|
||||
if(ishuman(occupant) && occupant.mind)
|
||||
occupant << "<span class='warning'>Transfering to virtual reality...</span>"
|
||||
to_chat(occupant, "<span class='warning'>Transfering to virtual reality...</span>")
|
||||
if(vr_human)
|
||||
vr_human.revert_to_reality(FALSE, FALSE)
|
||||
occupant.mind.transfer_to(vr_human)
|
||||
vr_human.real_me = occupant
|
||||
vr_human << "<span class='notice'>Transfer successful! you are now playing as [vr_human] in VR!</span>"
|
||||
to_chat(vr_human, "<span class='notice'>Transfer successful! you are now playing as [vr_human] in VR!</span>")
|
||||
SStgui.close_user_uis(vr_human, src)
|
||||
else
|
||||
if(allow_creating_vr_humans)
|
||||
occupant << "<span class='warning'>Virtual avatar not found, attempting to create one...</span>"
|
||||
to_chat(occupant, "<span class='warning'>Virtual avatar not found, attempting to create one...</span>")
|
||||
var/turf/T = get_vr_spawnpoint()
|
||||
if(T)
|
||||
build_virtual_human(occupant, T)
|
||||
vr_human << "<span class='notice'>Transfer successful! you are now playing as [vr_human] in VR!</span>"
|
||||
to_chat(vr_human, "<span class='notice'>Transfer successful! you are now playing as [vr_human] in VR!</span>")
|
||||
else
|
||||
occupant << "<span class='warning'>Virtual world misconfigured, aborting transfer</span>"
|
||||
to_chat(occupant, "<span class='warning'>Virtual world misconfigured, aborting transfer</span>")
|
||||
else
|
||||
occupant << "<span class='warning'>The virtual world does not support the creation of new virtual avatars, aborting transfer</span>"
|
||||
to_chat(occupant, "<span class='warning'>The virtual world does not support the creation of new virtual avatars, aborting transfer</span>")
|
||||
. = TRUE
|
||||
if("delete_avatar")
|
||||
if(!occupant || usr == occupant)
|
||||
if(vr_human)
|
||||
qdel(vr_human)
|
||||
else
|
||||
usr << "<span class='warning'>The VR Sleeper's safeties prevent you from doing that."
|
||||
to_chat(usr, "<span class='warning'>The VR Sleeper's safeties prevent you from doing that.")
|
||||
. = TRUE
|
||||
if("toggle_open")
|
||||
if(state_open)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
return
|
||||
|
||||
if(!dbcon.Connect())
|
||||
src << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
|
||||
var/bantype_pass = 0
|
||||
@@ -71,10 +71,11 @@
|
||||
computerid = bancid
|
||||
ip = banip
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
|
||||
query.Execute()
|
||||
var/DBQuery/query_add_ban_get_id = dbcon.NewQuery("SELECT id FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
|
||||
if(!query_add_ban_get_id.warn_execute())
|
||||
return
|
||||
var/validckey = 0
|
||||
if(query.NextRow())
|
||||
if(query_add_ban_get_id.NextRow())
|
||||
validckey = 1
|
||||
if(!validckey)
|
||||
if(!banned_mob || (banned_mob && !IsGuestKey(banned_mob.key)))
|
||||
@@ -92,7 +93,7 @@
|
||||
|
||||
if(blockselfban)
|
||||
if(a_ckey == ckey)
|
||||
usr << "<span class='danger'>You cannot apply this ban type on yourself.</span>"
|
||||
to_chat(usr, "<span class='danger'>You cannot apply this ban type on yourself.</span>")
|
||||
return
|
||||
|
||||
var/who
|
||||
@@ -112,18 +113,23 @@
|
||||
reason = sanitizeSQL(reason)
|
||||
|
||||
if(maxadminbancheck)
|
||||
var/DBQuery/adm_query = dbcon.NewQuery("SELECT count(id) AS num FROM [format_table_name("ban")] WHERE (a_ckey = '[a_ckey]') AND (bantype = 'ADMIN_PERMABAN' OR (bantype = 'ADMIN_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
adm_query.Execute()
|
||||
if(adm_query.NextRow())
|
||||
var/adm_bans = text2num(adm_query.item[1])
|
||||
var/DBQuery/query_check_adminban_amt = dbcon.NewQuery("SELECT count(id) AS num FROM [format_table_name("ban")] WHERE (a_ckey = '[a_ckey]') AND (bantype = 'ADMIN_PERMABAN' OR (bantype = 'ADMIN_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
if(!query_check_adminban_amt.warn_execute())
|
||||
return
|
||||
if(query_check_adminban_amt.NextRow())
|
||||
var/adm_bans = text2num(query_check_adminban_amt.item[1])
|
||||
if(adm_bans >= MAX_ADMIN_BANS_PER_ADMIN)
|
||||
usr << "<span class='danger'>You already logged [MAX_ADMIN_BANS_PER_ADMIN] admin ban(s) or more. Do not abuse this function!</span>"
|
||||
to_chat(usr, "<span class='danger'>You already logged [MAX_ADMIN_BANS_PER_ADMIN] admin ban(s) or more. Do not abuse this function!</span>")
|
||||
return
|
||||
|
||||
if(!computerid)
|
||||
computerid = "0"
|
||||
if(!ip)
|
||||
ip = "0.0.0.0"
|
||||
var/sql = "INSERT INTO [format_table_name("ban")] (`bantime`,`server_ip`,`server_port`,`bantype`,`reason`,`job`,`duration`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`) VALUES (Now(), INET_ATON('[world.internet_address]'), '[world.port]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', INET_ATON('[ip]'), '[a_ckey]', '[a_computerid]', INET_ATON('[a_ip]'), '[who]', '[adminwho]')"
|
||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||
query_insert.Execute()
|
||||
usr << "<span class='adminnotice'>Ban saved to database.</span>"
|
||||
var/DBQuery/query_add_ban = dbcon.NewQuery(sql)
|
||||
if(!query_add_ban.warn_execute())
|
||||
return
|
||||
to_chat(usr, "<span class='adminnotice'>Ban saved to database.</span>")
|
||||
message_admins("[key_name_admin(usr)] has added a [bantype_str] for [ckey] [(job)?"([job])":""] [(duration > 0)?"([duration] minutes)":""] with the reason: \"[reason]\" to the ban database.",1)
|
||||
|
||||
if(announceinirc)
|
||||
@@ -187,24 +193,25 @@
|
||||
var/ban_id
|
||||
var/ban_number = 0 //failsafe
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery(sql)
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
ban_id = query.item[1]
|
||||
var/DBQuery/query_unban_get_id = dbcon.NewQuery(sql)
|
||||
if(!query_unban_get_id.warn_execute())
|
||||
return
|
||||
while(query_unban_get_id.NextRow())
|
||||
ban_id = query_unban_get_id.item[1]
|
||||
ban_number++;
|
||||
|
||||
if(ban_number == 0)
|
||||
usr << "<span class='danger'>Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.</span>"
|
||||
to_chat(usr, "<span class='danger'>Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.</span>")
|
||||
return
|
||||
|
||||
if(ban_number > 1)
|
||||
usr << "<span class='danger'>Database update failed due to multiple bans fitting the search criteria. Note down the ckey, job and current time and contact the database admin.</span>"
|
||||
to_chat(usr, "<span class='danger'>Database update failed due to multiple bans fitting the search criteria. Note down the ckey, job and current time and contact the database admin.</span>")
|
||||
return
|
||||
|
||||
if(istext(ban_id))
|
||||
ban_id = text2num(ban_id)
|
||||
if(!isnum(ban_id))
|
||||
usr << "<span class='danger'>Database update failed due to a ban ID mismatch. Contact the database admin.</span>"
|
||||
to_chat(usr, "<span class='danger'>Database update failed due to a ban ID mismatch. Contact the database admin.</span>")
|
||||
return
|
||||
|
||||
DB_ban_unban_by_id(ban_id)
|
||||
@@ -215,23 +222,24 @@
|
||||
return
|
||||
|
||||
if(!isnum(banid) || !istext(param))
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, duration, reason FROM [format_table_name("ban")] WHERE id = [banid]")
|
||||
query.Execute()
|
||||
var/DBQuery/query_edit_ban_get_details = dbcon.NewQuery("SELECT ckey, duration, reason FROM [format_table_name("ban")] WHERE id = [banid]")
|
||||
if(!query_edit_ban_get_details.warn_execute())
|
||||
return
|
||||
|
||||
var/eckey = usr.ckey //Editing admin ckey
|
||||
var/pckey //(banned) Player ckey
|
||||
var/duration //Old duration
|
||||
var/reason //Old reason
|
||||
|
||||
if(query.NextRow())
|
||||
pckey = query.item[1]
|
||||
duration = query.item[2]
|
||||
reason = query.item[3]
|
||||
if(query_edit_ban_get_details.NextRow())
|
||||
pckey = query_edit_ban_get_details.item[1]
|
||||
duration = query_edit_ban_get_details.item[2]
|
||||
reason = query_edit_ban_get_details.item[3]
|
||||
else
|
||||
usr << "Invalid ban id. Contact the database admin"
|
||||
to_chat(usr, "Invalid ban id. Contact the database admin")
|
||||
return
|
||||
|
||||
reason = sanitizeSQL(reason)
|
||||
@@ -243,31 +251,33 @@
|
||||
value = input("Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text
|
||||
value = sanitizeSQL(value)
|
||||
if(!value)
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/update_query = dbcon.NewQuery("UPDATE [format_table_name("ban")] SET reason = '[value]', edits = CONCAT(edits,'- [eckey] changed ban reason from <cite><b>\\\"[reason]\\\"</b></cite> to <cite><b>\\\"[value]\\\"</b></cite><BR>') WHERE id = [banid]")
|
||||
update_query.Execute()
|
||||
var/DBQuery/query_edit_ban_reason = dbcon.NewQuery("UPDATE [format_table_name("ban")] SET reason = '[value]', edits = CONCAT(edits,'- [eckey] changed ban reason from <cite><b>\\\"[reason]\\\"</b></cite> to <cite><b>\\\"[value]\\\"</b></cite><BR>') WHERE id = [banid]")
|
||||
if(!query_edit_ban_reason.warn_execute())
|
||||
return
|
||||
message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s reason from [reason] to [value]",1)
|
||||
if("duration")
|
||||
if(!value)
|
||||
value = input("Insert the new duration (in minutes) for [pckey]'s ban", "New Duration", "[duration]", null) as null|num
|
||||
if(!isnum(value) || !value)
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/update_query = dbcon.NewQuery("UPDATE [format_table_name("ban")] SET duration = [value], edits = CONCAT(edits,'- [eckey] changed ban duration from [duration] to [value]<br>'), expiration_time = DATE_ADD(bantime, INTERVAL [value] MINUTE) WHERE id = [banid]")
|
||||
var/DBQuery/query_edit_ban_duration = dbcon.NewQuery("UPDATE [format_table_name("ban")] SET duration = [value], edits = CONCAT(edits,'- [eckey] changed ban duration from [duration] to [value]<br>'), expiration_time = DATE_ADD(bantime, INTERVAL [value] MINUTE) WHERE id = [banid]")
|
||||
if(!query_edit_ban_duration.warn_execute())
|
||||
return
|
||||
message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s duration from [duration] to [value]",1)
|
||||
update_query.Execute()
|
||||
if("unban")
|
||||
if(alert("Unban [pckey]?", "Unban?", "Yes", "No") == "Yes")
|
||||
DB_ban_unban_by_id(banid)
|
||||
return
|
||||
else
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
else
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
/datum/admins/proc/DB_ban_unban_by_id(id)
|
||||
@@ -283,18 +293,19 @@
|
||||
var/ban_number = 0 //failsafe
|
||||
|
||||
var/pckey
|
||||
var/DBQuery/query = dbcon.NewQuery(sql)
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
pckey = query.item[1]
|
||||
var/DBQuery/query_unban_get_ckey = dbcon.NewQuery(sql)
|
||||
if(!query_unban_get_ckey.warn_execute())
|
||||
return
|
||||
while(query_unban_get_ckey.NextRow())
|
||||
pckey = query_unban_get_ckey.item[1]
|
||||
ban_number++;
|
||||
|
||||
if(ban_number == 0)
|
||||
usr << "<span class='danger'>Database update failed due to a ban id not being present in the database.</span>"
|
||||
to_chat(usr, "<span class='danger'>Database update failed due to a ban id not being present in the database.</span>")
|
||||
return
|
||||
|
||||
if(ban_number > 1)
|
||||
usr << "<span class='danger'>Database update failed due to multiple bans having the same ID. Contact the database admin.</span>"
|
||||
to_chat(usr, "<span class='danger'>Database update failed due to multiple bans having the same ID. Contact the database admin.</span>")
|
||||
return
|
||||
|
||||
if(!src.owner || !istype(src.owner, /client))
|
||||
@@ -305,12 +316,11 @@
|
||||
var/unban_ip = src.owner:address
|
||||
|
||||
var/sql_update = "UPDATE [format_table_name("ban")] SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = INET_ATON('[unban_ip]') WHERE id = [id]"
|
||||
var/DBQuery/query_unban = dbcon.NewQuery(sql_update)
|
||||
if(!query_unban.warn_execute())
|
||||
return
|
||||
message_admins("[key_name_admin(usr)] has lifted [pckey]'s ban.",1)
|
||||
|
||||
var/DBQuery/query_update = dbcon.NewQuery(sql_update)
|
||||
query_update.Execute()
|
||||
|
||||
|
||||
/client/proc/DB_ban_panel()
|
||||
set category = "Admin"
|
||||
set name = "Banning Panel"
|
||||
@@ -322,7 +332,7 @@
|
||||
holder.DB_ban_panel()
|
||||
|
||||
|
||||
/datum/admins/proc/DB_ban_panel(playerckey = null, adminckey = null)
|
||||
/datum/admins/proc/DB_ban_panel(playerckey = null, adminckey = null, page = 0)
|
||||
if(!usr.client)
|
||||
return
|
||||
|
||||
@@ -330,7 +340,7 @@
|
||||
return
|
||||
|
||||
if(!dbcon.Connect())
|
||||
usr << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
|
||||
var/output = "<div align='center'><table width='90%'><tr>"
|
||||
@@ -383,7 +393,30 @@
|
||||
output += "Please note that all jobban bans or unbans are in-effect the following round."
|
||||
|
||||
if(adminckey || playerckey)
|
||||
|
||||
playerckey = sanitizeSQL(ckey(playerckey))
|
||||
adminckey = sanitizeSQL(ckey(adminckey))
|
||||
var/playersearch = ""
|
||||
var/adminsearch = ""
|
||||
if(playerckey)
|
||||
playersearch = "AND ckey = '[playerckey]' "
|
||||
if(adminckey)
|
||||
adminsearch = "AND a_ckey = '[adminckey]' "
|
||||
var/bancount = 0
|
||||
var/bansperpage = 15
|
||||
var/pagecount = 0
|
||||
page = text2num(page)
|
||||
var/DBQuery/query_count_bans = dbcon.NewQuery("SELECT COUNT(id) FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch]")
|
||||
if(!query_count_bans.warn_execute())
|
||||
return
|
||||
if(query_count_bans.NextRow())
|
||||
bancount = text2num(query_count_bans.item[1])
|
||||
if(bancount > bansperpage)
|
||||
output += "<br><b>Page: </b>"
|
||||
while(bancount > 0)
|
||||
output+= "|<a href='?_src_=holder;dbsearchckey=[playerckey];dbsearchadmin=[adminckey];dbsearchpage=[pagecount]'>[pagecount == page ? "<b>\[[pagecount]\]</b>" : "\[[pagecount]\]"]</a>"
|
||||
bancount -= bansperpage
|
||||
pagecount++
|
||||
output += "|"
|
||||
var/blcolor = "#ffeeee" //banned light
|
||||
var/bdcolor = "#ffdddd" //banned dark
|
||||
var/ulcolor = "#eeffee" //unbanned light
|
||||
@@ -397,33 +430,25 @@
|
||||
output += "<th width='20%'><b>ADMIN</b></th>"
|
||||
output += "<th width='15%'><b>OPTIONS</b></th>"
|
||||
output += "</tr>"
|
||||
var/limit = " LIMIT [bansperpage * page], [bansperpage]"
|
||||
var/DBQuery/query_search_bans = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch] ORDER BY bantime DESC[limit]")
|
||||
if(!query_search_bans.warn_execute())
|
||||
return
|
||||
|
||||
adminckey = ckey(adminckey)
|
||||
playerckey = ckey(playerckey)
|
||||
var/adminsearch = ""
|
||||
var/playersearch = ""
|
||||
if(adminckey)
|
||||
adminsearch = "AND a_ckey = '[adminckey]' "
|
||||
if(playerckey)
|
||||
playersearch = "AND ckey = '[playerckey]' "
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch] ORDER BY bantime DESC")
|
||||
select_query.Execute()
|
||||
|
||||
while(select_query.NextRow())
|
||||
var/banid = select_query.item[1]
|
||||
var/bantime = select_query.item[2]
|
||||
var/bantype = select_query.item[3]
|
||||
var/reason = select_query.item[4]
|
||||
var/job = select_query.item[5]
|
||||
var/duration = select_query.item[6]
|
||||
var/expiration = select_query.item[7]
|
||||
var/ckey = select_query.item[8]
|
||||
var/ackey = select_query.item[9]
|
||||
var/unbanned = select_query.item[10]
|
||||
var/unbanckey = select_query.item[11]
|
||||
var/unbantime = select_query.item[12]
|
||||
var/edits = select_query.item[13]
|
||||
while(query_search_bans.NextRow())
|
||||
var/banid = query_search_bans.item[1]
|
||||
var/bantime = query_search_bans.item[2]
|
||||
var/bantype = query_search_bans.item[3]
|
||||
var/reason = query_search_bans.item[4]
|
||||
var/job = query_search_bans.item[5]
|
||||
var/duration = query_search_bans.item[6]
|
||||
var/expiration = query_search_bans.item[7]
|
||||
var/ckey = query_search_bans.item[8]
|
||||
var/ackey = query_search_bans.item[9]
|
||||
var/unbanned = query_search_bans.item[10]
|
||||
var/unbanckey = query_search_bans.item[11]
|
||||
var/unbantime = query_search_bans.item[12]
|
||||
var/edits = query_search_bans.item[13]
|
||||
|
||||
var/lcolor = blcolor
|
||||
var/dcolor = bdcolor
|
||||
|
||||
@@ -74,18 +74,17 @@
|
||||
if(computer_id)
|
||||
cidquery = " OR computerid = '[computer_id]' "
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, a_ckey, reason, expiration_time, duration, bantime, bantype FROM [format_table_name("ban")] WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR bantype = 'ADMIN_PERMABAN' OR ((bantype = 'TEMPBAN' OR bantype = 'ADMIN_TEMPBAN') AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
var/pckey = query.item[1]
|
||||
var/ackey = query.item[2]
|
||||
var/reason = query.item[3]
|
||||
var/expiration = query.item[4]
|
||||
var/duration = query.item[5]
|
||||
var/bantime = query.item[6]
|
||||
var/bantype = query.item[7]
|
||||
var/DBQuery/query_ban_check = dbcon.NewQuery("SELECT ckey, a_ckey, reason, expiration_time, duration, bantime, bantype FROM [format_table_name("ban")] WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR bantype = 'ADMIN_PERMABAN' OR ((bantype = 'TEMPBAN' OR bantype = 'ADMIN_TEMPBAN') AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
if(!query_ban_check.Execute())
|
||||
return
|
||||
while(query_ban_check.NextRow())
|
||||
var/pckey = query_ban_check.item[1]
|
||||
var/ackey = query_ban_check.item[2]
|
||||
var/reason = query_ban_check.item[3]
|
||||
var/expiration = query_ban_check.item[4]
|
||||
var/duration = query_ban_check.item[5]
|
||||
var/bantime = query_ban_check.item[6]
|
||||
var/bantype = query_ban_check.item[7]
|
||||
if (bantype == "ADMIN_PERMABAN" || bantype == "ADMIN_TEMPBAN")
|
||||
//admin bans MUST match on ckey to prevent cid-spoofing attacks
|
||||
// as well as dynamic ip abuse
|
||||
@@ -182,7 +181,7 @@
|
||||
return null
|
||||
|
||||
if (C) //user is already connected!.
|
||||
C << "You are about to get disconnected for matching a sticky ban after you connected. If this turns out to be the ban evasion detection system going haywire, we will automatically detect this and revert the matches. if you feel that this is the case, please wait EXACTLY 6 seconds then reconnect using file -> reconnect to see if the match was reversed."
|
||||
to_chat(C, "You are about to get disconnected for matching a sticky ban after you connected. If this turns out to be the ban evasion detection system going haywire, we will automatically detect this and revert the matches. if you feel that this is the case, please wait EXACTLY 6 seconds then reconnect using file -> reconnect to see if the match was reversed.")
|
||||
|
||||
var/desc = "\nReason:(StickyBan) You, or another user of this computer or connection ([bannedckey]) is banned from playing here. The ban reason is:\n[ban["message"]]\nThis ban was applied by [ban["admin"]]\nThis is a BanEvasion Detection System ban, if you think this ban is a mistake, please wait EXACTLY 6 seconds, then try again before filing an appeal.\n"
|
||||
. = list("reason" = "Stickyban", "desc" = desc)
|
||||
|
||||
@@ -103,7 +103,7 @@ var/savefile/Banlist
|
||||
|
||||
Banlist.cd = "/base"
|
||||
if ( Banlist.dir.Find("[ckey][computerid]") )
|
||||
usr << text("<span class='danger'>Ban already exists.</span>")
|
||||
to_chat(usr, text("<span class='danger'>Ban already exists.</span>"))
|
||||
return 0
|
||||
else
|
||||
Banlist.dir.Add("[ckey][computerid]")
|
||||
|
||||
+38
-44
@@ -4,11 +4,11 @@ var/global/BSACooldown = 0
|
||||
////////////////////////////////
|
||||
/proc/message_admins(msg)
|
||||
msg = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[msg]</span></span>"
|
||||
admins << msg
|
||||
to_chat(admins, msg)
|
||||
|
||||
/proc/relay_msg_admins(msg)
|
||||
msg = "<span class=\"admin\"><span class=\"prefix\">RELAY:</span> <span class=\"message\">[msg]</span></span>"
|
||||
admins << msg
|
||||
to_chat(admins, msg)
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////Panels
|
||||
@@ -25,7 +25,7 @@ var/global/BSACooldown = 0
|
||||
log_game("[key_name_admin(usr)] checked the player panel while in game.")
|
||||
|
||||
if(!M)
|
||||
usr << "You seem to be selecting a mob that doesn't exist anymore."
|
||||
to_chat(usr, "You seem to be selecting a mob that doesn't exist anymore.")
|
||||
return
|
||||
|
||||
var/body = "<html><head><title>Options for [M.key]</title></head>"
|
||||
@@ -82,7 +82,8 @@ var/global/BSACooldown = 0
|
||||
body += "<br><br>"
|
||||
body += "<A href='?_src_=holder;traitor=\ref[M]'>Traitor panel</A> | "
|
||||
body += "<A href='?_src_=holder;narrateto=\ref[M]'>Narrate to</A> | "
|
||||
body += "<A href='?_src_=holder;subtlemessage=\ref[M]'>Subtle message</A>"
|
||||
body += "<A href='?_src_=holder;subtlemessage=\ref[M]'>Subtle message</A> | "
|
||||
body += "<A href='?_src_=holder;individuallog=\ref[M]'>Individual Round Logs</A>"
|
||||
|
||||
if (M.client)
|
||||
if(!isnewplayer(M))
|
||||
@@ -156,9 +157,6 @@ var/global/BSACooldown = 0
|
||||
body += "<br><br>"
|
||||
body += "<b>Other actions:</b>"
|
||||
body += "<br>"
|
||||
body += "<A href='?_src_=holder;mentor=\ref[M]'>Make Mentor</A> | "
|
||||
body += "<A href='?_src_=holder;removementor=\ref[M]'>Remove Mentor</A> | "
|
||||
body += "<br>"
|
||||
body += "<A href='?_src_=holder;forcespeech=\ref[M]'>Forcesay</A> | "
|
||||
body += "<A href='?_src_=holder;tdome1=\ref[M]'>Thunderdome 1</A> | "
|
||||
body += "<A href='?_src_=holder;tdome2=\ref[M]'>Thunderdome 2</A> | "
|
||||
@@ -180,7 +178,7 @@ var/global/BSACooldown = 0
|
||||
if (!istype(src,/datum/admins))
|
||||
src = usr.client.holder
|
||||
if (!istype(src,/datum/admins))
|
||||
usr << "Error: you are not an admin!"
|
||||
to_chat(usr, "Error: you are not an admin!")
|
||||
return
|
||||
var/dat
|
||||
dat = text("<HEAD><TITLE>Admin Newscaster</TITLE></HEAD><H3>Admin Newscaster Unit</H3>")
|
||||
@@ -376,8 +374,8 @@ var/global/BSACooldown = 0
|
||||
else
|
||||
dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com"
|
||||
|
||||
//world << "Channelname: [src.admincaster_feed_channel.channel_name] [src.admincaster_feed_channel.author]"
|
||||
//world << "Msg: [src.admincaster_feed_message.author] [src.admincaster_feed_message.body]"
|
||||
//to_chat(world, "Channelname: [src.admincaster_feed_channel.channel_name] [src.admincaster_feed_channel.author]")
|
||||
//to_chat(world, "Msg: [src.admincaster_feed_message.author] [src.admincaster_feed_message.body]")
|
||||
usr << browse(dat, "window=admincaster_main;size=400x600")
|
||||
onclose(usr, "admincaster_main")
|
||||
|
||||
@@ -451,7 +449,7 @@ var/global/BSACooldown = 0
|
||||
if(message)
|
||||
if(!check_rights(R_SERVER,0))
|
||||
message = adminscrub(message,500)
|
||||
world << "<span class='adminnotice'><b>[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:</b></span>\n \t [message]"
|
||||
to_chat(world, "<span class='adminnotice'><b>[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:</b></span>\n \t [message]")
|
||||
log_admin("Announce: [key_name(usr)] : [message]")
|
||||
feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -473,7 +471,7 @@ var/global/BSACooldown = 0
|
||||
else
|
||||
message_admins("[key_name(usr)] set the admin notice.")
|
||||
log_admin("[key_name(usr)] set the admin notice:\n[new_admin_notice]")
|
||||
world << "<span class ='adminnotice'><b>Admin Notice:</b>\n \t [new_admin_notice]</span>"
|
||||
to_chat(world, "<span class ='adminnotice'><b>Admin Notice:</b>\n \t [new_admin_notice]</span>")
|
||||
feedback_add_details("admin_verb","SAN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
admin_notice = new_admin_notice
|
||||
return
|
||||
@@ -493,7 +491,7 @@ var/global/BSACooldown = 0
|
||||
set name="Toggle Dead OOC"
|
||||
dooc_allowed = !( dooc_allowed )
|
||||
|
||||
log_admin("[key_name(usr)] toggled Dead OOC.")
|
||||
log_admin("[key_name(usr)] toggled OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.")
|
||||
feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
/*
|
||||
@@ -522,7 +520,7 @@ var/global/BSACooldown = 0
|
||||
feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return 1
|
||||
else
|
||||
usr << "<font color='red'>Error: Start Now: Game has already started.</font>"
|
||||
to_chat(usr, "<font color='red'>Error: Start Now: Game has already started.</font>")
|
||||
|
||||
return 0
|
||||
|
||||
@@ -532,9 +530,9 @@ var/global/BSACooldown = 0
|
||||
set name="Toggle Entering"
|
||||
enter_allowed = !( enter_allowed )
|
||||
if (!( enter_allowed ))
|
||||
world << "<B>New players may no longer enter the game.</B>"
|
||||
to_chat(world, "<B>New players may no longer enter the game.</B>")
|
||||
else
|
||||
world << "<B>New players may now enter the game.</B>"
|
||||
to_chat(world, "<B>New players may now enter the game.</B>")
|
||||
log_admin("[key_name(usr)] toggled new player game entering.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled new player game entering.</span>")
|
||||
world.update_status()
|
||||
@@ -546,9 +544,9 @@ var/global/BSACooldown = 0
|
||||
set name="Toggle AI"
|
||||
config.allow_ai = !( config.allow_ai )
|
||||
if (!( config.allow_ai ))
|
||||
world << "<B>The AI job is no longer chooseable.</B>"
|
||||
to_chat(world, "<B>The AI job is no longer chooseable.</B>")
|
||||
else
|
||||
world << "<B>The AI job is chooseable now.</B>"
|
||||
to_chat(world, "<B>The AI job is chooseable now.</B>")
|
||||
log_admin("[key_name(usr)] toggled AI allowed.")
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -559,9 +557,9 @@ var/global/BSACooldown = 0
|
||||
set name="Toggle Respawn"
|
||||
abandon_allowed = !( abandon_allowed )
|
||||
if (abandon_allowed)
|
||||
world << "<B>You may now respawn.</B>"
|
||||
to_chat(world, "<B>You may now respawn.</B>")
|
||||
else
|
||||
world << "<B>You may no longer respawn :(</B>"
|
||||
to_chat(world, "<B>You may no longer respawn :(</B>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].</span>")
|
||||
log_admin("[key_name(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].")
|
||||
world.update_status()
|
||||
@@ -578,10 +576,10 @@ var/global/BSACooldown = 0
|
||||
if(newtime)
|
||||
ticker.SetTimeLeft(newtime * 10)
|
||||
if(newtime < 0)
|
||||
world << "<b>The game start has been delayed.</b>"
|
||||
to_chat(world, "<b>The game start has been delayed.</b>")
|
||||
log_admin("[key_name(usr)] delayed the round start.")
|
||||
else
|
||||
world << "<b>The game will start in [newtime] seconds.</b>"
|
||||
to_chat(world, "<b>The game will start in [newtime] seconds.</b>")
|
||||
world << 'sound/ai/attention.ogg'
|
||||
log_admin("[key_name(usr)] set the pre-game delay to [newtime] seconds.")
|
||||
feedback_add_details("admin_verb","DELAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -645,10 +643,10 @@ var/global/BSACooldown = 0
|
||||
set name = "Show Traitor Panel"
|
||||
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
if(!M.mind)
|
||||
usr << "This mob has no mind!"
|
||||
to_chat(usr, "This mob has no mind!")
|
||||
return
|
||||
|
||||
M.mind.edit_memory()
|
||||
@@ -661,9 +659,9 @@ var/global/BSACooldown = 0
|
||||
set name="Toggle tinted welding helmes"
|
||||
tinted_weldhelh = !( tinted_weldhelh )
|
||||
if (tinted_weldhelh)
|
||||
world << "<B>The tinted_weldhelh has been enabled!</B>"
|
||||
to_chat(world, "<B>The tinted_weldhelh has been enabled!</B>")
|
||||
else
|
||||
world << "<B>The tinted_weldhelh has been disabled!</B>"
|
||||
to_chat(world, "<B>The tinted_weldhelh has been disabled!</B>")
|
||||
log_admin("[key_name(usr)] toggled tinted_weldhelh.")
|
||||
message_admins("[key_name_admin(usr)] toggled tinted_weldhelh.")
|
||||
feedback_add_details("admin_verb","TTWH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -674,9 +672,9 @@ var/global/BSACooldown = 0
|
||||
set name="Toggle guests"
|
||||
guests_allowed = !( guests_allowed )
|
||||
if (!( guests_allowed ))
|
||||
world << "<B>Guests may no longer enter the game.</B>"
|
||||
to_chat(world, "<B>Guests may no longer enter the game.</B>")
|
||||
else
|
||||
world << "<B>Guests may now enter the game.</B>"
|
||||
to_chat(world, "<B>Guests may now enter the game.</B>")
|
||||
log_admin("[key_name(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.</span>")
|
||||
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -686,35 +684,35 @@ var/global/BSACooldown = 0
|
||||
for(var/mob/living/silicon/S in mob_list)
|
||||
ai_number++
|
||||
if(isAI(S))
|
||||
usr << "<b>AI [key_name(S, usr)]'s laws:</b>"
|
||||
to_chat(usr, "<b>AI [key_name(S, usr)]'s laws:</b>")
|
||||
else if(iscyborg(S))
|
||||
var/mob/living/silicon/robot/R = S
|
||||
usr << "<b>CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:</b>"
|
||||
to_chat(usr, "<b>CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:</b>")
|
||||
else if (ispAI(S))
|
||||
usr << "<b>pAI [key_name(S, usr)]'s laws:</b>"
|
||||
to_chat(usr, "<b>pAI [key_name(S, usr)]'s laws:</b>")
|
||||
else
|
||||
usr << "<b>SOMETHING SILICON [key_name(S, usr)]'s laws:</b>"
|
||||
to_chat(usr, "<b>SOMETHING SILICON [key_name(S, usr)]'s laws:</b>")
|
||||
|
||||
if (S.laws == null)
|
||||
usr << "[key_name(S, usr)]'s laws are null?? Contact a coder."
|
||||
to_chat(usr, "[key_name(S, usr)]'s laws are null?? Contact a coder.")
|
||||
else
|
||||
S.laws.show_laws(usr)
|
||||
if(!ai_number)
|
||||
usr << "<b>No AIs located</b>" //Just so you know the thing is actually working and not just ignoring you.
|
||||
to_chat(usr, "<b>No AIs located</b>" )
|
||||
|
||||
/datum/admins/proc/output_all_devil_info()
|
||||
var/devil_number = 0
|
||||
for(var/D in ticker.mode.devils)
|
||||
devil_number++
|
||||
usr << "Devil #[devil_number]:<br><br>" + ticker.mode.printdevilinfo(D)
|
||||
to_chat(usr, "Devil #[devil_number]:<br><br>" + ticker.mode.printdevilinfo(D))
|
||||
if(!devil_number)
|
||||
usr << "<b>No Devils located</b>" //Just so you know the thing is actually working and not just ignoring you.
|
||||
to_chat(usr, "<b>No Devils located</b>" )
|
||||
|
||||
/datum/admins/proc/output_devil_info(mob/living/M)
|
||||
if(istype(M) && M.mind && M.mind.devilinfo)
|
||||
usr << ticker.mode.printdevilinfo(M.mind)
|
||||
to_chat(usr, ticker.mode.printdevilinfo(M.mind))
|
||||
else
|
||||
usr << "<b>[M] is not a devil."
|
||||
to_chat(usr, "<b>[M] is not a devil.")
|
||||
|
||||
/datum/admins/proc/manage_free_slots()
|
||||
if(!check_rights())
|
||||
@@ -776,7 +774,7 @@ var/global/BSACooldown = 0
|
||||
if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk
|
||||
continue
|
||||
if(message)
|
||||
C << message
|
||||
to_chat(C, message)
|
||||
kicked_client_names.Add("[C.ckey]")
|
||||
qdel(C)
|
||||
return kicked_client_names
|
||||
@@ -825,8 +823,4 @@ var/global/BSACooldown = 0
|
||||
string = pick(
|
||||
"Admin login: [key_name(src)]")
|
||||
if(string)
|
||||
message_admins("[string]")
|
||||
|
||||
|
||||
/datum/admins/SDQL_update()
|
||||
return FALSE //No.
|
||||
message_admins("[string]")
|
||||
@@ -31,20 +31,20 @@
|
||||
if(!holder)
|
||||
return
|
||||
switch(subject)
|
||||
if("singulo", "wires", "telesci", "gravity", "records", "cargo", "supermatter", "atmos", "kudzu") //general one-round-only stuff
|
||||
if("singulo", "wires", "telesci", "gravity", "records", "cargo", "supermatter", "atmos", "botany") //general one-round-only stuff
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
|
||||
to_chat(src, "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>")
|
||||
return
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
if("hrefs") //persistent logs and stuff
|
||||
if(href_logfile)
|
||||
src << browse(href_logfile,"window=investigate[subject];size=800x300")
|
||||
else if(!config.log_hrefs)
|
||||
src << "<span class='danger'>Href logging is off and no logfile was found.</span>"
|
||||
to_chat(src, "<span class='danger'>Href logging is off and no logfile was found.</span>")
|
||||
return
|
||||
else
|
||||
src << "<span class='danger'>No href logfile was found.</span>"
|
||||
to_chat(src, "<span class='danger'>No href logfile was found.</span>")
|
||||
return
|
||||
if("notes, memos, watchlist")
|
||||
browse_messages()
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
/client/proc/admin_memo()
|
||||
set name = "Admin Memos"
|
||||
set category = "Server"
|
||||
if(!check_rights(0))
|
||||
return
|
||||
if(!dbcon.IsConnected())
|
||||
src << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
return
|
||||
var/memotask = input(usr,"Choose task.","Memo") in list("Show","Write","Edit","Remove")
|
||||
if(!memotask)
|
||||
return
|
||||
admin_memo_output(memotask)
|
||||
|
||||
/client/proc/admin_memo_output(task)
|
||||
if(!task)
|
||||
return
|
||||
if(!dbcon.IsConnected())
|
||||
src << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
return
|
||||
var/sql_ckey = sanitizeSQL(src.ckey)
|
||||
switch(task)
|
||||
if("Write")
|
||||
var/DBQuery/query_memocheck = dbcon.NewQuery("SELECT ckey FROM [format_table_name("memo")] WHERE ckey = '[sql_ckey]'")
|
||||
if(!query_memocheck.Execute())
|
||||
var/err = query_memocheck.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining ckey from memo table. Error : \[[err]\]\n")
|
||||
return
|
||||
if(query_memocheck.NextRow())
|
||||
src << "You already have set an admin memo."
|
||||
return
|
||||
var/memotext = input(src,"Write your Memo","Memo") as message
|
||||
if(!memotext)
|
||||
return
|
||||
memotext = sanitizeSQL(memotext)
|
||||
var/timestamp = SQLtime()
|
||||
var/DBQuery/query_memoadd = dbcon.NewQuery("INSERT INTO [format_table_name("memo")] (ckey, memotext, timestamp) VALUES ('[sql_ckey]', '[memotext]', '[timestamp]')")
|
||||
if(!query_memoadd.Execute())
|
||||
var/err = query_memoadd.ErrorMsg()
|
||||
log_game("SQL ERROR adding new memo. Error : \[[err]\]\n")
|
||||
return
|
||||
log_admin("[key_name(src)] has set an admin memo: [memotext]")
|
||||
message_admins("[key_name_admin(src)] has set an admin memo:<br>[memotext]")
|
||||
if("Edit")
|
||||
var/DBQuery/query_memolist = dbcon.NewQuery("SELECT ckey FROM [format_table_name("memo")]")
|
||||
if(!query_memolist.Execute())
|
||||
var/err = query_memolist.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining ckey from memo table. Error : \[[err]\]\n")
|
||||
return
|
||||
var/list/memolist = list()
|
||||
while(query_memolist.NextRow())
|
||||
var/lkey = query_memolist.item[1]
|
||||
memolist += "[lkey]"
|
||||
if(!memolist.len)
|
||||
src << "No memos found in database."
|
||||
return
|
||||
var/target_ckey = input(src, "Select whose memo to edit", "Select memo") as null|anything in memolist
|
||||
if(!target_ckey)
|
||||
return
|
||||
var/target_sql_ckey = sanitizeSQL(target_ckey)
|
||||
var/DBQuery/query_memofind = dbcon.NewQuery("SELECT memotext FROM [format_table_name("memo")] WHERE ckey = '[target_sql_ckey]'")
|
||||
if(!query_memofind.Execute())
|
||||
var/err = query_memofind.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining memotext from memo table. Error : \[[err]\]\n")
|
||||
return
|
||||
if(query_memofind.NextRow())
|
||||
var/old_memo = query_memofind.item[1]
|
||||
var/new_memo = input("Input new memo", "New Memo", "[old_memo]", null) as message
|
||||
if(!new_memo)
|
||||
return
|
||||
new_memo = sanitizeSQL(new_memo)
|
||||
var/edit_text = "Edited by [sql_ckey] on [SQLtime()] from<br>[old_memo]<br>to<br>[new_memo]<hr>"
|
||||
edit_text = sanitizeSQL(edit_text)
|
||||
var/DBQuery/update_query = dbcon.NewQuery("UPDATE [format_table_name("memo")] SET memotext = '[new_memo]', last_editor = '[sql_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE ckey = '[target_sql_ckey]'")
|
||||
if(!update_query.Execute())
|
||||
var/err = update_query.ErrorMsg()
|
||||
log_game("SQL ERROR editing memo. Error : \[[err]\]\n")
|
||||
return
|
||||
if(target_sql_ckey == sql_ckey)
|
||||
log_admin("[key_name(src)] has edited their admin memo from [old_memo] to [new_memo]")
|
||||
message_admins("[key_name_admin(src)] has edited their admin memo from<br>[old_memo]<br>to<br>[new_memo]")
|
||||
else
|
||||
log_admin("[key_name(src)] has edited [target_sql_ckey]'s admin memo from [old_memo] to [new_memo]")
|
||||
message_admins("[key_name_admin(src)] has edited [target_sql_ckey]'s admin memo from<br>[old_memo]<br>to<br>[new_memo]")
|
||||
if("Show")
|
||||
var/DBQuery/query_memoshow = dbcon.NewQuery("SELECT ckey, memotext, timestamp, last_editor FROM [format_table_name("memo")]")
|
||||
if(!query_memoshow.Execute())
|
||||
var/err = query_memoshow.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining ckey, memotext, timestamp, last_editor from memo table. Error : \[[err]\]\n")
|
||||
return
|
||||
var/output = null
|
||||
while(query_memoshow.NextRow())
|
||||
var/ckey = query_memoshow.item[1]
|
||||
var/memotext = query_memoshow.item[2]
|
||||
var/timestamp = query_memoshow.item[3]
|
||||
var/last_editor = query_memoshow.item[4]
|
||||
output += "<span class='memo'>Admin memo by <span class='prefix'>[ckey]</span> on [timestamp]"
|
||||
if(last_editor)
|
||||
output += "<br><span class='memoedit'>Last edit by [last_editor] <A href='?_src_=holder;memoeditlist=[ckey]'>(Click here to see edit log)</A></span>"
|
||||
output += "<br>[memotext]</span><br>"
|
||||
if(!output)
|
||||
src << "No memos found in database."
|
||||
return
|
||||
src << output
|
||||
if("Remove")
|
||||
var/DBQuery/query_memodellist = dbcon.NewQuery("SELECT ckey FROM [format_table_name("memo")]")
|
||||
if(!query_memodellist.Execute())
|
||||
var/err = query_memodellist.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining ckey from memo table. Error : \[[err]\]\n")
|
||||
return
|
||||
var/list/memolist = list()
|
||||
while(query_memodellist.NextRow())
|
||||
var/ckey = query_memodellist.item[1]
|
||||
memolist += "[ckey]"
|
||||
if(!memolist.len)
|
||||
src << "No memos found in database."
|
||||
return
|
||||
var/target_ckey = input(src, "Select whose memo to delete", "Select memo") as null|anything in memolist
|
||||
if(!target_ckey)
|
||||
return
|
||||
var/target_sql_ckey = sanitizeSQL(target_ckey)
|
||||
var/DBQuery/query_memodel = dbcon.NewQuery("DELETE FROM [format_table_name("memo")] WHERE ckey = '[target_sql_ckey]'")
|
||||
if(!query_memodel.Execute())
|
||||
var/err = query_memodel.ErrorMsg()
|
||||
log_game("SQL ERROR removing memo. Error : \[[err]\]\n")
|
||||
return
|
||||
if(target_sql_ckey == sql_ckey)
|
||||
log_admin("[key_name(src)] has removed their admin memo.")
|
||||
message_admins("[key_name_admin(src)] has removed their admin memo.")
|
||||
else
|
||||
log_admin("[key_name(src)] has removed [target_sql_ckey]'s admin memo.")
|
||||
message_admins("[key_name_admin(src)] has removed [target_sql_ckey]'s admin memo.")
|
||||
@@ -6,9 +6,6 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
var/list/adds
|
||||
var/list/subs
|
||||
|
||||
/datum/admin_rank/SDQL_update()
|
||||
return FALSE //Nice try trivialadmin!
|
||||
|
||||
/datum/admin_rank/New(init_name, init_rights, list/init_adds, list/init_subs)
|
||||
name = init_name
|
||||
switch(name)
|
||||
@@ -134,11 +131,12 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
load_admin_ranks()
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT rank, flags FROM [format_table_name("admin_ranks")]")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
var/rank_name = ckeyEx(query.item[1])
|
||||
var/flags = query.item[2]
|
||||
var/DBQuery/query_load_admin_ranks = dbcon.NewQuery("SELECT rank, flags FROM [format_table_name("admin_ranks")]")
|
||||
if(!query_load_admin_ranks.Execute())
|
||||
return
|
||||
while(query_load_admin_ranks.NextRow())
|
||||
var/rank_name = ckeyEx(query_load_admin_ranks.item[1])
|
||||
var/flags = query_load_admin_ranks.item[2]
|
||||
if(istext(flags))
|
||||
flags = text2num(flags)
|
||||
var/datum/admin_rank/R = new(rank_name, flags)
|
||||
@@ -208,11 +206,12 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
load_admins()
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, rank FROM [format_table_name("admin")]")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
var/ckey = ckey(query.item[1])
|
||||
var/rank = ckeyEx(query.item[2])
|
||||
var/DBQuery/query_load_admins = dbcon.NewQuery("SELECT ckey, rank FROM [format_table_name("admin")]")
|
||||
if(!query_load_admins.Execute())
|
||||
return
|
||||
while(query_load_admins.NextRow())
|
||||
var/ckey = ckey(query_load_admins.item[1])
|
||||
var/rank = ckeyEx(query_load_admins.item[2])
|
||||
if(target && ckey != target)
|
||||
continue
|
||||
|
||||
@@ -268,14 +267,14 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
if(!new_ckey)
|
||||
return
|
||||
if(new_ckey in admin_datums)
|
||||
usr << "<font color='red'>Error: Topic 'editrights': [new_ckey] is already an admin</font>"
|
||||
to_chat(usr, "<font color='red'>Error: Topic 'editrights': [new_ckey] is already an admin</font>")
|
||||
return
|
||||
adm_ckey = new_ckey
|
||||
task = "rank"
|
||||
else
|
||||
adm_ckey = ckey(href_list["ckey"])
|
||||
if(!adm_ckey)
|
||||
usr << "<font color='red'>Error: Topic 'editrights': No valid ckey</font>"
|
||||
to_chat(usr, "<font color='red'>Error: Topic 'editrights': No valid ckey</font>")
|
||||
return
|
||||
|
||||
var/datum/admins/D = admin_datums[adm_ckey]
|
||||
@@ -378,5 +377,5 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
var/sql_admin_rank = sanitizeSQL(newrank)
|
||||
|
||||
var/DBQuery/query_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sql_admin_rank]' WHERE ckey = '[sql_ckey]'")
|
||||
query_update.Execute()
|
||||
var/DBQuery/query_admin_rank_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sql_admin_rank]' WHERE ckey = '[sql_ckey]'")
|
||||
query_admin_rank_update.Execute()
|
||||
|
||||
@@ -7,8 +7,6 @@ var/list/admin_verbs_default = list(
|
||||
/client/proc/hide_verbs, /*hides all our adminverbs*/
|
||||
/client/proc/hide_most_verbs, /*hides all our hideable adminverbs*/
|
||||
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/
|
||||
/client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/
|
||||
/client/proc/mentor_memo, /*mentor memo system. show/delete/write. +SERVER needed to delete mentor memos of others*/
|
||||
/client/proc/deadchat, /*toggles deadchat on/off*/
|
||||
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
|
||||
/client/proc/toggleprayers, /*toggles prayers on/off*/
|
||||
@@ -21,7 +19,8 @@ var/list/admin_verbs_default = list(
|
||||
/client/proc/reestablish_db_connection,/*reattempt a connection to the database*/
|
||||
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
|
||||
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
|
||||
/client/proc/stop_sounds
|
||||
/client/proc/stop_sounds,
|
||||
/client/proc/mentor_memo, /*mentor memo system. show/delete/write. +SERVER needed to delete mentor memos of others*/
|
||||
)
|
||||
var/list/admin_verbs_admin = list(
|
||||
/client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
|
||||
@@ -119,10 +118,8 @@ var/list/admin_verbs_server = list(
|
||||
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
|
||||
/client/proc/cmd_debug_del_all,
|
||||
/client/proc/toggle_random_events,
|
||||
#if SERVERTOOLS
|
||||
/client/proc/forcerandomrotate,
|
||||
/client/proc/adminchangemap,
|
||||
#endif
|
||||
/client/proc/panicbunker,
|
||||
/client/proc/toggle_hub
|
||||
|
||||
@@ -150,7 +147,6 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/get_dynex_range, //*debug verbs for dynex explosions.
|
||||
/client/proc/set_dynex_scale,
|
||||
/client/proc/cmd_display_del_log,
|
||||
/client/proc/reset_latejoin_spawns,
|
||||
/client/proc/create_outfits,
|
||||
/client/proc/modify_goals,
|
||||
/client/proc/debug_huds,
|
||||
@@ -159,7 +155,8 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/jump_to_ruin,
|
||||
/client/proc/clear_dynamic_transit,
|
||||
/client/proc/toggle_medal_disable,
|
||||
/client/proc/view_runtimes
|
||||
/client/proc/view_runtimes,
|
||||
/client/proc/pump_random_event
|
||||
)
|
||||
var/list/admin_verbs_possess = list(
|
||||
/proc/possess,
|
||||
@@ -327,7 +324,7 @@ var/list/admin_verbs_hideable = list(
|
||||
verbs.Remove(/client/proc/hide_most_verbs, admin_verbs_hideable)
|
||||
verbs += /client/proc/show_verbs
|
||||
|
||||
src << "<span class='interface'>Most of your adminverbs have been hidden.</span>"
|
||||
to_chat(src, "<span class='interface'>Most of your adminverbs have been hidden.</span>")
|
||||
feedback_add_details("admin_verb","HMV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -338,7 +335,7 @@ var/list/admin_verbs_hideable = list(
|
||||
remove_admin_verbs()
|
||||
verbs += /client/proc/show_verbs
|
||||
|
||||
src << "<span class='interface'>Almost all of your adminverbs have been hidden.</span>"
|
||||
to_chat(src, "<span class='interface'>Almost all of your adminverbs have been hidden.</span>")
|
||||
feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -349,7 +346,7 @@ var/list/admin_verbs_hideable = list(
|
||||
verbs -= /client/proc/show_verbs
|
||||
add_admin_verbs()
|
||||
|
||||
src << "<span class='interface'>All of your adminverbs are now visible.</span>"
|
||||
to_chat(src, "<span class='interface'>All of your adminverbs are now visible.</span>")
|
||||
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -372,7 +369,7 @@ var/list/admin_verbs_hideable = list(
|
||||
ghost.reenter_corpse()
|
||||
feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
else if(isnewplayer(mob))
|
||||
src << "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.</font>")
|
||||
else
|
||||
//ghostize
|
||||
log_admin("[key_name(usr)] admin ghosted.")
|
||||
@@ -391,10 +388,10 @@ var/list/admin_verbs_hideable = list(
|
||||
if(holder && mob)
|
||||
if(mob.invisibility == INVISIBILITY_OBSERVER)
|
||||
mob.invisibility = initial(mob.invisibility)
|
||||
mob << "<span class='boldannounce'>Invisimin off. Invisibility reset.</span>"
|
||||
to_chat(mob, "<span class='boldannounce'>Invisimin off. Invisibility reset.</span>")
|
||||
else
|
||||
mob.invisibility = INVISIBILITY_OBSERVER
|
||||
mob << "<span class='adminnotice'><b>Invisimin on. You are now as invisible as a ghost.</b></span>"
|
||||
to_chat(mob, "<span class='adminnotice'><b>Invisimin on. You are now as invisible as a ghost.</b></span>")
|
||||
|
||||
/client/proc/player_panel_new()
|
||||
set name = "Player Panel"
|
||||
@@ -552,7 +549,7 @@ var/list/admin_verbs_hideable = list(
|
||||
|
||||
var/ex_power = input("Explosive Power:") as null|num
|
||||
var/range = round((2 * ex_power)**DYN_EX_SCALE)
|
||||
usr << "Estimated Explosive Range: (Devestation: [round(range*0.25)], Heavy: [round(range*0.5)], Light: [round(range)])"
|
||||
to_chat(usr, "Estimated Explosive Range: (Devestation: [round(range*0.25)], Heavy: [round(range*0.5)], Light: [round(range)])")
|
||||
|
||||
/client/proc/get_dynex_power()
|
||||
set category = "Debug"
|
||||
@@ -561,7 +558,7 @@ var/list/admin_verbs_hideable = list(
|
||||
|
||||
var/ex_range = input("Light Explosion Range:") as null|num
|
||||
var/power = (0.5 * ex_range)**(1/DYN_EX_SCALE)
|
||||
usr << "Estimated Explosive Power: [power]"
|
||||
to_chat(usr, "Estimated Explosive Power: [power]")
|
||||
|
||||
/client/proc/set_dynex_scale()
|
||||
set category = "Debug"
|
||||
@@ -652,10 +649,10 @@ var/list/admin_verbs_hideable = list(
|
||||
if(config)
|
||||
if(config.log_hrefs)
|
||||
config.log_hrefs = 0
|
||||
src << "<b>Stopped logging hrefs</b>"
|
||||
to_chat(src, "<b>Stopped logging hrefs</b>")
|
||||
else
|
||||
config.log_hrefs = 1
|
||||
src << "<b>Started logging hrefs</b>"
|
||||
to_chat(src, "<b>Started logging hrefs</b>")
|
||||
|
||||
/client/proc/check_ai_laws()
|
||||
set name = "Check AI Laws"
|
||||
@@ -678,7 +675,7 @@ var/list/admin_verbs_hideable = list(
|
||||
admin_datums -= ckey
|
||||
verbs += /client/proc/readmin
|
||||
|
||||
src << "<span class='interface'>You are now a normal player.</span>"
|
||||
to_chat(src, "<span class='interface'>You are now a normal player.</span>")
|
||||
log_admin("[src] deadmined themself.")
|
||||
message_admins("[src] deadmined themself.")
|
||||
feedback_add_details("admin_verb","DAS")
|
||||
@@ -696,7 +693,7 @@ var/list/admin_verbs_hideable = list(
|
||||
deadmins -= ckey
|
||||
verbs -= /client/proc/readmin
|
||||
|
||||
src << "<span class='interface'>You are now an admin.</span>"
|
||||
to_chat(src, "<span class='interface'>You are now an admin.</span>")
|
||||
message_admins("[src] re-adminned themselves.")
|
||||
log_admin("[src] re-adminned themselves.")
|
||||
feedback_add_details("admin_verb","RAS")
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
return 0
|
||||
|
||||
if(!M.client) //no cache. fallback to a DBQuery
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(M.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[sanitizeSQL(rank)]'")
|
||||
if(!query.Execute())
|
||||
log_game("SQL ERROR obtaining jobbans. Error : \[[query.ErrorMsg()]\]\n")
|
||||
var/DBQuery/query_jobban_check_ban = dbcon.NewQuery("SELECT reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(M.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[sanitizeSQL(rank)]'")
|
||||
if(!query_jobban_check_ban.warn_execute())
|
||||
return
|
||||
if(query.NextRow())
|
||||
var/reason = query.item[1]
|
||||
if(query_jobban_check_ban.NextRow())
|
||||
var/reason = query_jobban_check_ban.item[1]
|
||||
return reason ? reason : 1 //we don't want to return "" if there is no ban reason, as that would evaluate to false
|
||||
else
|
||||
return 0
|
||||
@@ -25,12 +24,11 @@
|
||||
/proc/jobban_buildcache(client/C)
|
||||
if(C && istype(C))
|
||||
C.jobbancache = list()
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT job, reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(C.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
if(!query.Execute())
|
||||
log_game("SQL ERROR obtaining jobbans. Error : \[[query.ErrorMsg()]\]\n")
|
||||
var/DBQuery/query_jobban_build_cache = dbcon.NewQuery("SELECT job, reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(C.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
if(!query_jobban_build_cache.warn_execute())
|
||||
return
|
||||
while(query.NextRow())
|
||||
C.jobbancache[query.item[1]] = query.item[2]
|
||||
while(query_jobban_build_cache.NextRow())
|
||||
C.jobbancache[query_jobban_build_cache.item[1]] = query_jobban_build_cache.item[2]
|
||||
|
||||
/proc/ban_unban_log_save(var/formatted_log)
|
||||
text2file(formatted_log,"data/ban_unban_log.txt")
|
||||
|
||||
@@ -4,20 +4,16 @@
|
||||
if(!check_rights(R_PERMISSIONS))
|
||||
return
|
||||
if(!dbcon.IsConnected())
|
||||
src << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
var/returned = create_poll_function()
|
||||
if(returned)
|
||||
var/DBQuery/query_check_option = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE pollid = [returned]")
|
||||
if(!query_check_option.Execute())
|
||||
var/err = query_check_option.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining id from poll_option table. Error : \[[err]\]\n")
|
||||
if(!query_check_option.warn_execute())
|
||||
return
|
||||
if(query_check_option.NextRow())
|
||||
var/DBQuery/query_log_get = dbcon.NewQuery("SELECT polltype, question, adminonly FROM [format_table_name("poll_question")] WHERE id = [returned]")
|
||||
if(!query_log_get.Execute())
|
||||
var/err = query_log_get.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining polltype, question, adminonly from poll_question table. Error : \[[err]\]\n")
|
||||
if(!query_log_get.warn_execute())
|
||||
return
|
||||
if(query_log_get.NextRow())
|
||||
var/polltype = query_log_get.item[1]
|
||||
@@ -26,11 +22,9 @@
|
||||
log_admin("[key_name(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"] - Question: [question]")
|
||||
message_admins("[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]<br>Question: [question]")
|
||||
else
|
||||
src << "Poll question created without any options, poll will be deleted."
|
||||
to_chat(src, "Poll question created without any options, poll will be deleted.")
|
||||
var/DBQuery/query_del_poll = dbcon.NewQuery("DELETE FROM [format_table_name("poll_question")] WHERE id = [returned]")
|
||||
if(!query_del_poll.Execute())
|
||||
var/err = query_del_poll.ErrorMsg()
|
||||
log_game("SQL ERROR deleting poll question [returned]. Error : \[[err]\]\n")
|
||||
if(!query_del_poll.warn_execute())
|
||||
return
|
||||
|
||||
/client/proc/create_poll_function()
|
||||
@@ -58,24 +52,20 @@
|
||||
return
|
||||
endtime = sanitizeSQL(endtime)
|
||||
var/DBQuery/query_validate_time = dbcon.NewQuery("SELECT STR_TO_DATE('[endtime]','%Y-%c-%d %T')")
|
||||
if(!query_validate_time.Execute())
|
||||
var/err = query_validate_time.ErrorMsg()
|
||||
log_game("SQL ERROR validating endtime. Error : \[[err]\]\n")
|
||||
if(!query_validate_time.warn_execute())
|
||||
return
|
||||
if(query_validate_time.NextRow())
|
||||
endtime = query_validate_time.item[1]
|
||||
if(!endtime)
|
||||
src << "Datetime entered is invalid."
|
||||
to_chat(src, "Datetime entered is invalid.")
|
||||
return
|
||||
var/DBQuery/query_time_later = dbcon.NewQuery("SELECT TIMESTAMP('[endtime]') < NOW()")
|
||||
if(!query_time_later.Execute())
|
||||
var/err = query_time_later.ErrorMsg()
|
||||
log_game("SQL ERROR comparing endtime to NOW(). Error : \[[err]\]\n")
|
||||
if(!query_time_later.warn_execute())
|
||||
return
|
||||
if(query_time_later.NextRow())
|
||||
var/checklate = text2num(query_time_later.item[1])
|
||||
if(checklate)
|
||||
src << "Datetime entered is not later than current server time."
|
||||
to_chat(src, "Datetime entered is not later than current server time.")
|
||||
return
|
||||
var/adminonly
|
||||
switch(alert("Admin only poll?",,"Yes","No","Cancel"))
|
||||
@@ -99,9 +89,7 @@
|
||||
return
|
||||
question = sanitizeSQL(question)
|
||||
var/DBQuery/query_polladd_question = dbcon.NewQuery("INSERT INTO [format_table_name("poll_question")] (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip, dontshow) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', INET_ATON('[address]'), '[dontshow]')")
|
||||
if(!query_polladd_question.Execute())
|
||||
var/err = query_polladd_question.ErrorMsg()
|
||||
log_game("SQL ERROR adding new poll question to table. Error : \[[err]\]\n")
|
||||
if(!query_polladd_question.warn_execute())
|
||||
return
|
||||
if(polltype == POLLTYPE_TEXT)
|
||||
log_admin("[key_name(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"] - Question: [question]")
|
||||
@@ -109,9 +97,7 @@
|
||||
return
|
||||
var/pollid = 0
|
||||
var/DBQuery/query_get_id = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE question = '[question]' AND starttime = '[starttime]' AND endtime = '[endtime]' AND createdby_ckey = '[sql_ckey]' AND createdby_ip = INET_ATON('[address]')")
|
||||
if(!query_get_id.Execute())
|
||||
var/err = query_get_id.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining id from poll_question table. Error : \[[err]\]\n")
|
||||
if(!query_get_id.warn_execute())
|
||||
return
|
||||
if(query_get_id.NextRow())
|
||||
pollid = query_get_id.item[1]
|
||||
@@ -143,7 +129,7 @@
|
||||
if(!maxval)
|
||||
return pollid
|
||||
if(minval >= maxval)
|
||||
src << "Minimum rating value can't be more than maximum rating value"
|
||||
to_chat(src, "Minimum rating value can't be more than maximum rating value")
|
||||
return pollid
|
||||
descmin = input("Optional: Set description for minimum rating","Minimum rating description") as message|null
|
||||
if(descmin)
|
||||
@@ -161,9 +147,7 @@
|
||||
else if(descmax == null)
|
||||
return pollid
|
||||
var/DBQuery/query_polladd_option = dbcon.NewQuery("INSERT INTO [format_table_name("poll_option")] (pollid, text, percentagecalc, minval, maxval, descmin, descmid, descmax) VALUES ('[pollid]', '[option]', '[percentagecalc]', '[minval]', '[maxval]', '[descmin]', '[descmid]', '[descmax]')")
|
||||
if(!query_polladd_option.Execute())
|
||||
var/err = query_polladd_option.ErrorMsg()
|
||||
log_game("SQL ERROR adding new poll option to table. Error : \[[err]\]\n")
|
||||
if(!query_polladd_option.warn_execute())
|
||||
return pollid
|
||||
switch(alert(" ",,"Add option","Finish", "Cancel"))
|
||||
if("Add option")
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
var/mob/dead/observer/ghost = pick_n_take(candidates)
|
||||
var/mob/living/body = pick_n_take(bodies)
|
||||
|
||||
body << "Your mob has been taken over by a ghost!"
|
||||
to_chat(body, "Your mob has been taken over by a ghost!")
|
||||
message_admins("[key_name_admin(ghost)] has taken control of ([key_name_admin(body)])")
|
||||
body.ghostize(0)
|
||||
body.key = ghost.key
|
||||
@@ -81,7 +81,7 @@
|
||||
var/turf/T = find_safe_turf()
|
||||
new /obj/effect/overlay/temp/gravpush(get_turf(M))
|
||||
M.forceMove(T)
|
||||
M << "<span class='notice'>Pop!</span>"
|
||||
to_chat(M, "<span class='notice'>Pop!</span>")
|
||||
|
||||
/obj/effect/station_crash
|
||||
name = "station crash"
|
||||
@@ -133,16 +133,16 @@
|
||||
else
|
||||
var/mob/living/L = M
|
||||
if(L.pulling && istype(L.pulling, /obj/item/bodypart/head))
|
||||
L << "Your offering is accepted. You may pass."
|
||||
to_chat(L, "Your offering is accepted. You may pass.")
|
||||
qdel(L.pulling)
|
||||
var/turf/LA = pick(warp_points)
|
||||
L.forceMove(LA)
|
||||
L.hallucination = 0
|
||||
L << "<span class='reallybig redtext'>The battle is won. Your bloodlust subsides.</span>"
|
||||
to_chat(L, "<span class='reallybig redtext'>The battle is won. Your bloodlust subsides.</span>")
|
||||
for(var/obj/item/weapon/twohanded/required/chainsaw/doomslayer/chainsaw in L)
|
||||
qdel(chainsaw)
|
||||
else
|
||||
L << "You are not yet worthy of passing. Drag a severed head to the barrier to be allowed entry to the hall of champions."
|
||||
to_chat(L, "You are not yet worthy of passing. Drag a severed head to the barrier to be allowed entry to the hall of champions.")
|
||||
|
||||
/obj/effect/landmark/shuttle_arena_safe
|
||||
name = "hall of champions"
|
||||
@@ -167,7 +167,7 @@
|
||||
var/obj/effect/landmark/LA = pick(warp_points)
|
||||
|
||||
M.forceMove(get_turf(LA))
|
||||
M << "<span class='reallybig redtext'>You're trapped in a deadly arena! To escape, you'll need to drag a severed head to the escape portals.</span>"
|
||||
to_chat(M, "<span class='reallybig redtext'>You're trapped in a deadly arena! To escape, you'll need to drag a severed head to the escape portals.</span>")
|
||||
spawn()
|
||||
var/obj/effect/mine/pickup/bloodbath/B = new(M)
|
||||
B.mineEffect(M)
|
||||
|
||||
@@ -8,6 +8,8 @@ var/list/admin_datums = list()
|
||||
|
||||
var/datum/marked_datum
|
||||
|
||||
var/spamcooldown = 0
|
||||
|
||||
var/admincaster_screen = 0 //TODO: remove all these 5 variables, they are completly unacceptable
|
||||
var/datum/newscaster/feed_message/admincaster_feed_message = new /datum/newscaster/feed_message
|
||||
var/datum/newscaster/wanted_message/admincaster_wanted_message = new /datum/newscaster/wanted_message
|
||||
@@ -16,13 +18,11 @@ var/list/admin_datums = list()
|
||||
|
||||
/datum/admins/New(datum/admin_rank/R, ckey)
|
||||
if(!ckey)
|
||||
spawn(0)
|
||||
del(src)
|
||||
QDEL_IN(src, 0)
|
||||
throw EXCEPTION("Admin datum created without a ckey")
|
||||
return
|
||||
if(!istype(R))
|
||||
spawn(0)
|
||||
del(src)
|
||||
QDEL_IN(src, 0)
|
||||
throw EXCEPTION("Admin datum created without a rank")
|
||||
return
|
||||
rank = R
|
||||
@@ -67,7 +67,7 @@ generally it would be used like so:
|
||||
|
||||
/proc/admin_proc()
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
world << "you have enough rights!"
|
||||
to_chat(world, "you have enough rights!")
|
||||
|
||||
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call
|
||||
you will have to do something like if(client.rights & R_ADMIN) yourself.
|
||||
@@ -78,7 +78,7 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
|
||||
return 1
|
||||
else
|
||||
if(show_msg)
|
||||
usr << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
|
||||
to_chat(usr, "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>")
|
||||
return 0
|
||||
|
||||
//probably a bit iffy - will hopefully figure out a better solution
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
return cachedintel
|
||||
|
||||
if(dbcon.Connect())
|
||||
var/DBQuery/query = dbcon.NewQuery({"
|
||||
var/DBQuery/query_get_ip_intel = dbcon.NewQuery({"
|
||||
SELECT date, intel, TIMESTAMPDIFF(MINUTE,date,NOW())
|
||||
FROM [format_table_name("ipintel")]
|
||||
WHERE
|
||||
@@ -49,22 +49,22 @@
|
||||
date + INTERVAL [config.ipintel_save_bad] HOUR > NOW()
|
||||
))
|
||||
"})
|
||||
query.Execute()
|
||||
if (query.NextRow())
|
||||
if(!query_get_ip_intel.Execute())
|
||||
return
|
||||
if (query_get_ip_intel.NextRow())
|
||||
res.cache = TRUE
|
||||
res.cachedate = query.item[1]
|
||||
res.intel = text2num(query.item[2])
|
||||
res.cacheminutesago = text2num(query.item[3])
|
||||
res.cacherealtime = world.realtime - (text2num(query.item[3])*10*60)
|
||||
res.cachedate = query_get_ip_intel.item[1]
|
||||
res.intel = text2num(query_get_ip_intel.item[2])
|
||||
res.cacheminutesago = text2num(query_get_ip_intel.item[3])
|
||||
res.cacherealtime = world.realtime - (text2num(query_get_ip_intel.item[3])*10*60)
|
||||
SSipintel.cache[ip] = res
|
||||
return
|
||||
res.intel = ip_intel_query(ip)
|
||||
if (updatecache && res.intel >= 0)
|
||||
SSipintel.cache[ip] = res
|
||||
if(dbcon.Connect())
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO [format_table_name("ipintel")] (ip, intel) VALUES (INET_ATON('[ip]'), [res.intel]) ON DUPLICATE KEY UPDATE intel = VALUES(intel), date = NOW()")
|
||||
query.Execute()
|
||||
return
|
||||
var/DBQuery/query_add_ip_intel = dbcon.NewQuery("INSERT INTO [format_table_name("ipintel")] (ip, intel) VALUES (INET_ATON('[ip]'), [res.intel]) ON DUPLICATE KEY UPDATE intel = VALUES(intel), date = NOW()")
|
||||
query_add_ip_intel.Execute()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
return
|
||||
|
||||
if(!dbcon.Connect())
|
||||
usr << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
|
||||
if(!adm_ckey || !new_rank)
|
||||
@@ -75,28 +75,33 @@
|
||||
if(!istext(adm_ckey) || !istext(new_rank))
|
||||
return
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
|
||||
select_query.Execute()
|
||||
var/DBQuery/query_get_admin = dbcon.NewQuery("SELECT id FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
|
||||
if(!query_get_admin.warn_execute())
|
||||
return
|
||||
|
||||
var/new_admin = 1
|
||||
var/admin_id
|
||||
while(select_query.NextRow())
|
||||
while(query_get_admin.NextRow())
|
||||
new_admin = 0
|
||||
admin_id = text2num(select_query.item[1])
|
||||
admin_id = text2num(query_get_admin.item[1])
|
||||
|
||||
if(new_admin)
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO `[format_table_name("admin")]` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
|
||||
log_query.Execute()
|
||||
usr << "<span class='adminnotice'>New admin added.</span>"
|
||||
var/DBQuery/query_add_admin = dbcon.NewQuery("INSERT INTO `[format_table_name("admin")]` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
|
||||
if(!query_add_admin.warn_execute())
|
||||
return
|
||||
var/DBQuery/query_add_admin_log = dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
|
||||
if(!query_add_admin_log.warn_execute())
|
||||
return
|
||||
to_chat(usr, "<span class='adminnotice'>New admin added.</span>")
|
||||
else
|
||||
if(!isnull(admin_id) && isnum(admin_id))
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET rank = '[new_rank]' WHERE id = [admin_id]")
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
|
||||
log_query.Execute()
|
||||
usr << "<span class='adminnnotice'>Admin rank changed.</span>"
|
||||
var/DBQuery/query_change_admin = dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET rank = '[new_rank]' WHERE id = [admin_id]")
|
||||
if(!query_change_admin.warn_execute())
|
||||
return
|
||||
var/DBQuery/query_change_admin_log = dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
|
||||
if(!query_change_admin_log.warn_execute())
|
||||
return
|
||||
to_chat(usr, "<span class='adminnnotice'>Admin rank changed.</span>")
|
||||
|
||||
|
||||
/datum/admins/proc/log_admin_permission_modification(adm_ckey, new_permission)
|
||||
@@ -108,23 +113,25 @@
|
||||
return
|
||||
|
||||
if(!dbcon.Connect())
|
||||
usr << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
|
||||
if(!adm_ckey || !istext(adm_ckey) || !isnum(new_permission))
|
||||
return
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, flags FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
|
||||
select_query.Execute()
|
||||
var/DBQuery/query_get_perms = dbcon.NewQuery("SELECT id, flags FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
|
||||
if(!query_get_perms.warn_execute())
|
||||
return
|
||||
|
||||
var/admin_id
|
||||
while(select_query.NextRow())
|
||||
admin_id = text2num(select_query.item[1])
|
||||
while(query_get_perms.NextRow())
|
||||
admin_id = text2num(query_get_perms.item[1])
|
||||
|
||||
if(!admin_id)
|
||||
return
|
||||
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET flags = [new_permission] WHERE id = [admin_id]")
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edit permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
|
||||
log_query.Execute()
|
||||
var/DBQuery/query_change_perms = dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET flags = [new_permission] WHERE id = [admin_id]")
|
||||
if(!query_change_perms.warn_execute())
|
||||
return
|
||||
var/DBQuery/query_change_perms_log = dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edit permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
|
||||
query_change_perms_log.warn_execute()
|
||||
|
||||
@@ -349,12 +349,16 @@
|
||||
var/brains = 0
|
||||
var/other_players = 0
|
||||
var/living_skipped = 0
|
||||
var/drones = 0
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.ckey)
|
||||
if(isnewplayer(M))
|
||||
lobby_players++
|
||||
continue
|
||||
else if(M.stat != DEAD && M.mind && !isbrain(M))
|
||||
if(isdrone(M))
|
||||
drones++
|
||||
continue
|
||||
if(M.z == ZLEVEL_CENTCOM)
|
||||
living_skipped++
|
||||
continue
|
||||
@@ -373,7 +377,7 @@
|
||||
other_players++
|
||||
dat += "<BR><b><font color='blue' size='3'>Players:|[connected_players - lobby_players] ingame|[connected_players] connected|[lobby_players] lobby|</font></b>"
|
||||
dat += "<BR><b><font color='green'>Living Players:|[living_players_connected] active|[living_players - living_players_connected] disconnected|[living_players_antagonist] antagonists|</font></b>"
|
||||
dat += "<BR><b><font color='#bf42f4'>SKIPPED \[On centcom Z-level\]: [living_skipped] living players|</font></b>"
|
||||
dat += "<BR><b><font color='#bf42f4'>SKIPPED \[On centcom Z-level\]: [living_skipped] living players|[drones] living drones|</font></b>"
|
||||
dat += "<BR><b><font color='red'>Dead/Observing players:|[observers_connected] active|[observers - observers_connected] disconnected|[brains] brains|</font></b>"
|
||||
if(other_players)
|
||||
dat += "<BR><span class='userdanger'>[other_players] players in invalid state or the statistics code is bugged!</span>"
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<A href='?src=\ref[src];secrets=list_job_debug'>Show Job Debug</A><BR>
|
||||
<A href='?src=\ref[src];secrets=admin_log'>Admin Log</A><BR>
|
||||
<A href='?src=\ref[src];secrets=show_admins'>Show Admin List</A><BR>
|
||||
<A href='?src=\ref[src];secrets=mentor_log'>Mentor Log</A><BR>
|
||||
<BR>
|
||||
"}
|
||||
|
||||
@@ -29,11 +28,13 @@
|
||||
<A href='?src=\ref[src];secrets=fingerprints'>List Fingerprints</A><BR>
|
||||
<A href='?src=\ref[src];secrets=ctfbutton'>Enable/Disable CTF</A><BR><BR>
|
||||
<A href='?src=\ref[src];secrets=tdomereset'>Reset Thunderdome to default state</A><BR>
|
||||
<A href='?src=\ref[src];secrets=set_name'>Rename Station Name</A><BR>
|
||||
<A href='?src=\ref[src];secrets=reset_name'>Reset Station Name</A><BR>
|
||||
<BR>
|
||||
<B>Shuttles</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secrets=moveferry'>Move Ferry</A><BR>
|
||||
<A href='?src=\ref[src];secrets=togglearrivals'>Toggle Arrivals Ferry</A><BR>
|
||||
<A href='?src=\ref[src];secrets=moveminingshuttle'>Move Mining Shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secrets=movelaborshuttle'>Move Labor Shuttle</A><BR>
|
||||
<BR>
|
||||
@@ -149,14 +150,25 @@
|
||||
message_admins("[key_name_admin(usr)] has cured all diseases.")
|
||||
for(var/datum/disease/D in SSdisease.processing)
|
||||
D.cure(D)
|
||||
if("set_name")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/new_name = input(usr, "Please input a new name for the station.", "What?", "") as text|null
|
||||
if(!new_name)
|
||||
return
|
||||
change_station_name(new_name)
|
||||
log_admin("[key_name(usr)] renamed the station to \"[new_name]\".")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] renamed the station to: [new_name].</span>")
|
||||
priority_announce("[command_name()] has renamed the station to \"[new_name]\".")
|
||||
|
||||
if("reset_name")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
world.name = new_station_name()
|
||||
station_name = world.name
|
||||
var/new_name = new_station_name()
|
||||
change_station_name(new_name)
|
||||
log_admin("[key_name(usr)] reset the station name.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] reset the station name.</span>")
|
||||
priority_announce("[command_name()] has renamed the station to \"[new_name]\".")
|
||||
|
||||
if("list_bombers")
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -208,7 +220,20 @@
|
||||
if(!SSshuttle.toggleShuttle("ferry","ferry_home","ferry_away"))
|
||||
message_admins("[key_name_admin(usr)] moved the centcom ferry")
|
||||
log_admin("[key_name(usr)] moved the centcom ferry")
|
||||
|
||||
|
||||
if("togglearrivals")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/obj/docking_port/mobile/arrivals/A = SSshuttle.arrivals
|
||||
if(A)
|
||||
var/new_perma = !A.perma_docked
|
||||
A.perma_docked = new_perma
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","ShA[new_perma ? "s" : "g"]")
|
||||
message_admins("[key_name_admin(usr)] [new_perma ? "stopped" : "started"] the arrivals shuttle")
|
||||
log_admin("[key_name(usr)] [new_perma ? "stopped" : "started"] the arrivals shuttle")
|
||||
else
|
||||
to_chat(usr, "<span class='admin'>There is no arrivals shuttle</span>")
|
||||
if("showailaws")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
@@ -417,7 +442,7 @@
|
||||
H.equip_to_slot_or_del(I, slot_w_uniform)
|
||||
I.flags |= NODROP
|
||||
else
|
||||
H << "You're not kawaii enough for this."
|
||||
to_chat(H, "You're not kawaii enough for this.")
|
||||
|
||||
if("whiteout")
|
||||
if(!check_rights(R_FUN))
|
||||
@@ -453,7 +478,7 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","RET")
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
H << "<span class='boldannounce'>You suddenly feel stupid.</span>"
|
||||
to_chat(H, "<span class='boldannounce'>You suddenly feel stupid.</span>")
|
||||
H.setBrainLoss(60)
|
||||
message_admins("[key_name_admin(usr)] made everybody retarded")
|
||||
|
||||
@@ -578,11 +603,7 @@
|
||||
if("ctfbutton")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/ctf_enabled = FALSE
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
ctf_enabled = CTF.toggle_ctf()
|
||||
message_admins("[key_name_admin(usr)] has [ctf_enabled? "enabled" : "disabled"] CTF!")
|
||||
notify_ghosts("CTF has been [ctf_enabled? "enabled" : "disabled"]!",'sound/effects/ghost2.ogg')
|
||||
toggle_all_ctf(usr)
|
||||
if("masspurrbation")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
@@ -598,14 +619,6 @@
|
||||
purrbation.")
|
||||
log_admin("[key_name(usr)] has removed everyone from purrbation.")
|
||||
|
||||
if("mentor_log")
|
||||
var/dat = "<B>Mentor Log<HR></B>"
|
||||
for(var/l in mentor_log)
|
||||
dat += "<li>[l]</li>"
|
||||
if(!mentor_log.len)
|
||||
dat += "No mentors have done anything this round!"
|
||||
usr << browse(dat, "window=mentor_log")
|
||||
|
||||
if(E)
|
||||
E.processing = 0
|
||||
if(E.announceWhen>0)
|
||||
@@ -615,4 +628,4 @@
|
||||
if (usr)
|
||||
log_admin("[key_name(usr)] used secret [item]")
|
||||
if (ok)
|
||||
world << text("<B>A secret has been activated by []!</B>", usr.key)
|
||||
to_chat(world, text("<B>A secret has been activated by []!</B>", usr.key))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/proc/create_message(type, target_ckey, admin_ckey, text, timestamp, server, secret, logged = 1, browse)
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
if(!type)
|
||||
return
|
||||
@@ -10,9 +10,7 @@
|
||||
return
|
||||
new_ckey = sanitizeSQL(new_ckey)
|
||||
var/DBQuery/query_find_ckey = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ckey = '[new_ckey]'")
|
||||
if(!query_find_ckey.Execute())
|
||||
var/err = query_find_ckey.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining ckey from player table. Error : \[[err]\]\n")
|
||||
if(!query_find_ckey.warn_execute())
|
||||
return
|
||||
if(!query_find_ckey.NextRow())
|
||||
if(alert(usr, "[new_ckey] has not been seen before, are you sure you want to create a [type] for them?", "Unknown ckey", "Yes", "No", "Cancel") != "Yes")
|
||||
@@ -47,9 +45,7 @@
|
||||
else
|
||||
return
|
||||
var/DBQuery/query_create_message = dbcon.NewQuery("INSERT INTO [format_table_name("messages")] (type, targetckey, adminckey, text, timestamp, server, secret) VALUES ('[type]', '[target_ckey]', '[admin_ckey]', '[text]', '[timestamp]', '[server]', '[secret]')")
|
||||
if(!query_create_message.Execute())
|
||||
var/err = query_create_message.ErrorMsg()
|
||||
log_game("SQL ERROR creating new [type] in messages table. Error : \[[err]\]\n")
|
||||
if(!query_create_message.warn_execute())
|
||||
return
|
||||
if(logged)
|
||||
log_admin_private("[key_name(usr)] has created a [type][(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_ckey]" : ""]: [text]")
|
||||
@@ -61,7 +57,7 @@
|
||||
|
||||
/proc/delete_message(message_id, logged = 1, browse)
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
message_id = text2num(message_id)
|
||||
if(!message_id)
|
||||
@@ -70,18 +66,14 @@
|
||||
var/target_ckey
|
||||
var/text
|
||||
var/DBQuery/query_find_del_message = dbcon.NewQuery("SELECT type, targetckey, adminckey, text FROM [format_table_name("messages")] WHERE id = [message_id]")
|
||||
if(!query_find_del_message.Execute())
|
||||
var/err = query_find_del_message.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining type, targetckey, adminckey text from messages table. Error : \[[err]\]\n")
|
||||
if(!query_find_del_message.warn_execute())
|
||||
return
|
||||
if(query_find_del_message.NextRow())
|
||||
type = query_find_del_message.item[1]
|
||||
target_ckey = query_find_del_message.item[2]
|
||||
text = query_find_del_message.item[4]
|
||||
var/DBQuery/query_del_message = dbcon.NewQuery("DELETE FROM [format_table_name("messages")] WHERE id = [message_id]")
|
||||
if(!query_del_message.Execute())
|
||||
var/err = query_del_message.ErrorMsg()
|
||||
log_game("SQL ERROR deleting [type] from messages table. Error : \[[err]\]\n")
|
||||
if(!query_del_message.warn_execute())
|
||||
return
|
||||
if(logged)
|
||||
log_admin_private("[key_name(usr)] has deleted a [type][(type == "note" || type == "message" || type == "watchlist entry") ? " for" : " made by"] [target_ckey]: [text]")
|
||||
@@ -93,15 +85,13 @@
|
||||
|
||||
/proc/edit_message(message_id, browse)
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
message_id = text2num(message_id)
|
||||
if(!message_id)
|
||||
return
|
||||
var/DBQuery/query_find_edit_message = dbcon.NewQuery("SELECT type, targetckey, adminckey, text FROM [format_table_name("messages")] WHERE id = [message_id]")
|
||||
if(!query_find_edit_message.Execute())
|
||||
var/err = query_find_edit_message.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining type, targetckey, adminckey, text from messages table. Error : \[[err]\]\n")
|
||||
if(!query_find_edit_message.warn_execute())
|
||||
return
|
||||
if(query_find_edit_message.NextRow())
|
||||
var/type = query_find_edit_message.item[1]
|
||||
@@ -115,9 +105,7 @@
|
||||
new_text = sanitizeSQL(new_text)
|
||||
var/edit_text = sanitizeSQL("Edited by [editor_ckey] on [SQLtime()] from<br>[old_text]<br>to<br>[new_text]<hr>")
|
||||
var/DBQuery/query_edit_message = dbcon.NewQuery("UPDATE [format_table_name("messages")] SET text = '[new_text]', lasteditor = '[editor_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE id = [message_id]")
|
||||
if(!query_edit_message.Execute())
|
||||
var/err = query_edit_message.ErrorMsg()
|
||||
log_game("SQL ERROR editing messages table. Error : \[[err]\]\n")
|
||||
if(!query_edit_message.warn_execute())
|
||||
return
|
||||
log_admin_private("[key_name(usr)] has edited a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_ckey]" : ""] made by [admin_ckey] from [old_text] to [new_text]")
|
||||
message_admins("[key_name_admin(usr)] has edited a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_ckey]" : ""] made by [admin_ckey] from<br>[old_text]<br>to<br>[new_text]")
|
||||
@@ -128,15 +116,13 @@
|
||||
|
||||
/proc/toggle_message_secrecy(message_id)
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
message_id = text2num(message_id)
|
||||
if(!message_id)
|
||||
return
|
||||
var/DBQuery/query_find_message_secret = dbcon.NewQuery("SELECT type, targetckey, adminckey, secret FROM [format_table_name("messages")] WHERE id = [message_id]")
|
||||
if(!query_find_message_secret.Execute())
|
||||
var/err = query_find_message_secret.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining type, targetckey, adminckey, secret from messages table. Error : \[[err]\]\n")
|
||||
if(!query_find_message_secret.warn_execute())
|
||||
return
|
||||
if(query_find_message_secret.NextRow())
|
||||
var/type = query_find_message_secret.item[1]
|
||||
@@ -146,9 +132,7 @@
|
||||
var/editor_ckey = sanitizeSQL(usr.ckey)
|
||||
var/edit_text = "Made [secret ? "not secret" : "secret"] by [editor_ckey] on [SQLtime()]<hr>"
|
||||
var/DBQuery/query_message_secret = dbcon.NewQuery("UPDATE [format_table_name("messages")] SET secret = NOT secret, lasteditor = '[editor_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE id = [message_id]")
|
||||
if(!query_message_secret.Execute())
|
||||
var/err = query_message_secret.ErrorMsg()
|
||||
log_game("SQL ERROR toggling message secrecy. Error : \[[err]\]\n")
|
||||
if(!query_message_secret.warn_execute())
|
||||
return
|
||||
log_admin_private("[key_name(usr)] has toggled [target_ckey]'s [type] made by [admin_ckey] to [secret ? "not secret" : "secret"]")
|
||||
message_admins("[key_name_admin(usr)] has toggled [target_ckey]'s [type] made by [admin_ckey] to [secret ? "not secret" : "secret"]")
|
||||
@@ -156,7 +140,7 @@
|
||||
|
||||
/proc/browse_messages(type, target_ckey, index, linkless = 0, filter)
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
var/output
|
||||
var/ruler = "<hr style='background:#000000; border:0; height:3px'>"
|
||||
@@ -183,9 +167,7 @@
|
||||
output += "|<a href='?_src_=holder;showwatchfilter=1'>\[Filter offline clients\]</a></center>"
|
||||
output += ruler
|
||||
var/DBQuery/query_get_type_messages = dbcon.NewQuery("SELECT id, targetckey, adminckey, text, timestamp, server, lasteditor FROM [format_table_name("messages")] WHERE type = '[type]'")
|
||||
if(!query_get_type_messages.Execute())
|
||||
var/err = query_get_type_messages.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining id, targetckey, adminckey, text, timestamp, server, lasteditor from messages table. Error : \[[err]\]\n")
|
||||
if(!query_get_type_messages.warn_execute())
|
||||
return
|
||||
while(query_get_type_messages.NextRow())
|
||||
var/id = query_get_type_messages.item[1]
|
||||
@@ -208,10 +190,8 @@
|
||||
output += "<br>[text]<hr style='background:#000000; border:0; height:1px'>"
|
||||
if(target_ckey)
|
||||
target_ckey = sanitizeSQL(target_ckey)
|
||||
var/DBQuery/query_get_messages = dbcon.NewQuery("SELECT type, secret, id, adminckey, text, timestamp, server, lasteditor FROM [format_table_name("messages")] WHERE type <> 'memo' AND targetckey = '[target_ckey]' ORDER BY timestamp")
|
||||
if(!query_get_messages.Execute())
|
||||
var/err = query_get_messages.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining type, secret, id, adminckey, text, timestamp, server, lasteditor from messages table. Error : \[[err]\]\n")
|
||||
var/DBQuery/query_get_messages = dbcon.NewQuery("SELECT type, secret, id, adminckey, text, timestamp, server, lasteditor FROM [format_table_name("messages")] WHERE type <> 'memo' AND targetckey = '[target_ckey]' ORDER BY timestamp DESC")
|
||||
if(!query_get_messages.warn_execute())
|
||||
return
|
||||
var/messagedata
|
||||
var/watchdata
|
||||
@@ -286,9 +266,7 @@
|
||||
else
|
||||
search = "^[index]"
|
||||
var/DBQuery/query_list_messages = dbcon.NewQuery("SELECT DISTINCT targetckey FROM [format_table_name("messages")] WHERE type <> 'memo' AND targetckey REGEXP '[search]' ORDER BY targetckey")
|
||||
if(!query_list_messages.Execute())
|
||||
var/err = query_list_messages.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining distinct targetckey from messages table. Error : \[[err]\]\n")
|
||||
if(!query_list_messages.warn_execute())
|
||||
return
|
||||
while(query_list_messages.NextRow())
|
||||
index_ckey = query_list_messages.item[1]
|
||||
@@ -300,7 +278,7 @@
|
||||
|
||||
proc/get_message_output(type, target_ckey)
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
if(!type)
|
||||
return
|
||||
@@ -311,9 +289,7 @@ proc/get_message_output(type, target_ckey)
|
||||
if(type == "message" || type == "watchlist entry")
|
||||
query += " AND targetckey = '[target_ckey]'"
|
||||
var/DBQuery/query_get_message_output = dbcon.NewQuery(query)
|
||||
if(!query_get_message_output.Execute())
|
||||
var/err = query_get_message_output.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining id, adminckey, text, timestamp, lasteditor from messages table. Error : \[[err]\]\n")
|
||||
if(!query_get_message_output.warn_execute())
|
||||
return
|
||||
while(query_get_message_output.NextRow())
|
||||
var/message_id = query_get_message_output.item[1]
|
||||
@@ -326,13 +302,11 @@ proc/get_message_output(type, target_ckey)
|
||||
output += "<font color='red' size='3'><b>Admin message left by <span class='prefix'>[admin_ckey]</span> on [timestamp]</b></font>"
|
||||
output += "<br><font color='red'>[text]</font><br>"
|
||||
var/DBQuery/query_message_read = dbcon.NewQuery("UPDATE [format_table_name("messages")] SET type = 'message sent' WHERE id = [message_id]")
|
||||
if(!query_message_read.Execute())
|
||||
var/err = query_message_read.ErrorMsg()
|
||||
log_game("SQL ERROR updating message type. Error : \[[err]\]\n")
|
||||
if(!query_message_read.warn_execute())
|
||||
return
|
||||
if("watchlist entry")
|
||||
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'>[key_name_admin(target_ckey)] is on the watchlist and has just connected - Reason: [text]</font>")
|
||||
send2irc("Watchlist", "[key_name(target_ckey)] is on the watchlist and has just connected - Reason: [text]")
|
||||
send2irc_adminless_only("Watchlist", "[key_name(target_ckey)] is on the watchlist and has just connected - Reason: [text]")
|
||||
if("memo")
|
||||
output += "<span class='memo'>Memo by <span class='prefix'>[admin_ckey]</span> on [timestamp]"
|
||||
if(editor_ckey)
|
||||
@@ -361,8 +335,6 @@ proc/get_message_output(type, target_ckey)
|
||||
var/admin_ckey = note.group[3]
|
||||
var/DBQuery/query_convert_time = dbcon.NewQuery("SELECT ADDTIME(STR_TO_DATE('[timestamp]','%d-%b-%Y'), '0')")
|
||||
if(!query_convert_time.Execute())
|
||||
var/err = query_convert_time.ErrorMsg()
|
||||
log_game("SQL ERROR converting timestamp. Error : \[[err]\]\n")
|
||||
return
|
||||
if(query_convert_time.NextRow())
|
||||
timestamp = query_convert_time.item[1]
|
||||
@@ -374,7 +346,7 @@ proc/get_message_output(type, target_ckey)
|
||||
/*alternatively this proc can be run once to pass through every note and attempt to convert it before deleting the file, if done then AUTOCONVERT_NOTES should be turned off
|
||||
this proc can take several minutes to execute fully if converting and cause DD to hang if converting a lot of notes; it's not advised to do so while a server is live
|
||||
/proc/mass_convert_notes()
|
||||
world << "Beginning mass note conversion"
|
||||
to_chat(world, "Beginning mass note conversion")
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
if(!notesfile)
|
||||
log_game("Error: Cannot access [NOTESFILE]")
|
||||
@@ -382,7 +354,7 @@ this proc can take several minutes to execute fully if converting and cause DD t
|
||||
notesfile.cd = "/"
|
||||
for(var/ckey in notesfile.dir)
|
||||
convert_notes_sql(ckey)
|
||||
world << "Deleting NOTESFILE"
|
||||
to_chat(world, "Deleting NOTESFILE")
|
||||
fdel(NOTESFILE)
|
||||
world << "Finished mass note conversion, remember to turn off AUTOCONVERT_NOTES"*/
|
||||
to_chat(world, "Finished mass note conversion, remember to turn off AUTOCONVERT_NOTES")*/
|
||||
#undef NOTESFILE
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
ban["ckey"] = ckey
|
||||
|
||||
if (get_stickyban_from_ckey(ckey))
|
||||
usr << "<span class='adminnotice'>Error: Can not add a stickyban: User already has a current sticky ban</span>"
|
||||
to_chat(usr, "<span class='adminnotice'>Error: Can not add a stickyban: User already has a current sticky ban</span>")
|
||||
|
||||
if (data["reason"])
|
||||
ban["message"] = data["reason"]
|
||||
@@ -43,12 +43,12 @@
|
||||
|
||||
var/ban = get_stickyban_from_ckey(ckey)
|
||||
if (!ban)
|
||||
usr << "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>"
|
||||
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>")
|
||||
return
|
||||
if (alert("Are you sure you want to remove the sticky ban on [ckey]?","Are you sure","Yes","No") == "No")
|
||||
return
|
||||
if (!get_stickyban_from_ckey(ckey))
|
||||
usr << "<span class='adminnotice'>Error: The ban disappeared.</span>"
|
||||
to_chat(usr, "<span class='adminnotice'>Error: The ban disappeared.</span>")
|
||||
return
|
||||
world.SetConfig("ban",ckey, null)
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
var/alt = ckey(data["alt"])
|
||||
var/ban = get_stickyban_from_ckey(ckey)
|
||||
if (!ban)
|
||||
usr << "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>"
|
||||
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>")
|
||||
return
|
||||
|
||||
var/found = 0
|
||||
@@ -75,7 +75,7 @@
|
||||
break
|
||||
|
||||
if (!found)
|
||||
usr << "<span class='adminnotice'>Error: [alt] is not linked to [ckey]'s sticky ban!</span>"
|
||||
to_chat(usr, "<span class='adminnotice'>Error: [alt] is not linked to [ckey]'s sticky ban!</span>")
|
||||
return
|
||||
|
||||
if (alert("Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them","Are you sure","Yes","No") == "No")
|
||||
@@ -84,7 +84,7 @@
|
||||
//we have to do this again incase something changes
|
||||
ban = get_stickyban_from_ckey(ckey)
|
||||
if (!ban)
|
||||
usr << "<span class='adminnotice'>Error: The ban disappeared.</span>"
|
||||
to_chat(usr, "<span class='adminnotice'>Error: The ban disappeared.</span>")
|
||||
return
|
||||
|
||||
found = 0
|
||||
@@ -95,7 +95,7 @@
|
||||
break
|
||||
|
||||
if (!found)
|
||||
usr << "<span class='adminnotice'>Error: [alt] link to [ckey]'s sticky ban disappeared.</span>"
|
||||
to_chat(usr, "<span class='adminnotice'>Error: [alt] link to [ckey]'s sticky ban disappeared.</span>")
|
||||
return
|
||||
|
||||
world.SetConfig("ban",ckey,list2stickyban(ban))
|
||||
@@ -109,7 +109,7 @@
|
||||
var/ckey = data["ckey"]
|
||||
var/ban = get_stickyban_from_ckey(ckey)
|
||||
if (!ban)
|
||||
usr << "<span class='adminnotice'>Error: No sticky ban for [ckey] found!"
|
||||
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!")
|
||||
return
|
||||
var/oldreason = ban["message"]
|
||||
var/reason = input(usr,"Reason","Reason","[ban["message"]]") as text|null
|
||||
@@ -118,7 +118,7 @@
|
||||
//we have to do this again incase something changed while we waited for input
|
||||
ban = get_stickyban_from_ckey(ckey)
|
||||
if (!ban)
|
||||
usr << "<span class='adminnotice'>Error: The ban disappeared.</span>"
|
||||
to_chat(usr, "<span class='adminnotice'>Error: The ban disappeared.</span>")
|
||||
return
|
||||
ban["message"] = "[reason]"
|
||||
|
||||
@@ -135,11 +135,11 @@
|
||||
return
|
||||
var/ban = get_stickyban_from_ckey(ckey)
|
||||
if (!ban)
|
||||
usr << "<span class='adminnotice'>Error: No sticky ban for [ckey] found!"
|
||||
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!")
|
||||
return
|
||||
var/cached_ban = SSstickyban.cache[ckey]
|
||||
if (!cached_ban)
|
||||
usr << "<span class='adminnotice'>Error: No cached sticky ban for [ckey] found!"
|
||||
to_chat(usr, "<span class='adminnotice'>Error: No cached sticky ban for [ckey] found!")
|
||||
world.SetConfig("ban",ckey,null)
|
||||
|
||||
log_admin_private("[key_name(usr)] has reverted [ckey]'s sticky ban to it's state at round start.")
|
||||
|
||||
+129
-111
@@ -6,6 +6,9 @@
|
||||
log_admin("[key_name(usr)] tried to use the admin panel without authorization.")
|
||||
return
|
||||
if(href_list["rejectadminhelp"])
|
||||
if(world.time && (spamcooldown > world.time))
|
||||
to_chat(usr, "Please wait [max(round((spamcooldown - world.time)*0.1, 0.1), 0)] seconds.")
|
||||
return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/client/C = locate(href_list["rejectadminhelp"]) in clients
|
||||
@@ -16,14 +19,18 @@
|
||||
|
||||
C << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
C << "<font color='red' size='4'><b>- AdminHelp Rejected! -</b></font>"
|
||||
C << "<font color='red'><b>Your admin help was rejected.</b> The adminhelp verb has been returned to you so that you may try again.</font>"
|
||||
C << "Please try to be calm, clear, and descriptive in admin helps, do not assume the admin has seen any related events, and clearly state the names of anybody you are reporting."
|
||||
to_chat(C, "<font color='red' size='4'><b>- AdminHelp Rejected! -</b></font>")
|
||||
to_chat(C, "<font color='red'><b>Your admin help was rejected.</b> The adminhelp verb has been returned to you so that you may try again.</font>")
|
||||
to_chat(C, "Please try to be calm, clear, and descriptive in admin helps, do not assume the admin has seen any related events, and clearly state the names of anybody you are reporting.")
|
||||
|
||||
message_admins("[key_name_admin(usr)] Rejected [C.key]'s admin help. [C.key]'s Adminhelp verb has been returned to them.")
|
||||
log_admin_private("[key_name(usr)] Rejected [C.key]'s admin help.")
|
||||
spamcooldown = world.time + 150 // 15 seconds
|
||||
|
||||
else if(href_list["icissue"])
|
||||
if(world.time && spamcooldown > world.time)
|
||||
to_chat(usr, "Please wait [max(round((spamcooldown - world.time)*0.1, 0.1), 0)] seconds.")
|
||||
return
|
||||
var/client/C = locate(href_list["icissue"]) in clients
|
||||
if(!C)
|
||||
return
|
||||
@@ -32,17 +39,18 @@
|
||||
msg += "<font color='red'><b>Losing is part of the game!</b></font><br>"
|
||||
msg += "<font color='red'>Your character will frequently die, sometimes without even a possibility of avoiding it. Events will often be out of your control. No matter how good or prepared you are, sometimes you just lose.</font>"
|
||||
|
||||
C << msg
|
||||
to_chat(C, msg)
|
||||
|
||||
message_admins("[key_name_admin(usr)] marked [C.key]'s admin help as an IC issue.")
|
||||
log_admin_private("[key_name(usr)] marked [C.key]'s admin help as an IC issue.")
|
||||
spamcooldown = world.time + 150 // 15 seconds
|
||||
|
||||
else if(href_list["stickyban"])
|
||||
stickyban(href_list["stickyban"],href_list)
|
||||
|
||||
else if(href_list["makeAntag"])
|
||||
if (!ticker.mode)
|
||||
usr << "<span class='danger'>Not until the round starts!</span>"
|
||||
to_chat(usr, "<span class='danger'>Not until the round starts!</span>")
|
||||
return
|
||||
switch(href_list["makeAntag"])
|
||||
if("traitors")
|
||||
@@ -173,8 +181,9 @@
|
||||
else if(href_list["dbsearchckey"] || href_list["dbsearchadmin"])
|
||||
var/adminckey = href_list["dbsearchadmin"]
|
||||
var/playerckey = href_list["dbsearchckey"]
|
||||
var/page = href_list["dbsearchpage"]
|
||||
|
||||
DB_ban_panel(playerckey, adminckey)
|
||||
DB_ban_panel(playerckey, adminckey, page)
|
||||
return
|
||||
|
||||
else if(href_list["dbbanedit"])
|
||||
@@ -201,33 +210,33 @@
|
||||
switch(bantype)
|
||||
if(BANTYPE_PERMA)
|
||||
if(!banckey || !banreason)
|
||||
usr << "Not enough parameters (Requires ckey and reason)."
|
||||
to_chat(usr, "Not enough parameters (Requires ckey and reason).")
|
||||
return
|
||||
banduration = null
|
||||
banjob = null
|
||||
if(BANTYPE_TEMP)
|
||||
if(!banckey || !banreason || !banduration)
|
||||
usr << "Not enough parameters (Requires ckey, reason and duration)."
|
||||
to_chat(usr, "Not enough parameters (Requires ckey, reason and duration).")
|
||||
return
|
||||
banjob = null
|
||||
if(BANTYPE_JOB_PERMA)
|
||||
if(!banckey || !banreason || !banjob)
|
||||
usr << "Not enough parameters (Requires ckey, reason and job)."
|
||||
to_chat(usr, "Not enough parameters (Requires ckey, reason and job).")
|
||||
return
|
||||
banduration = null
|
||||
if(BANTYPE_JOB_TEMP)
|
||||
if(!banckey || !banreason || !banjob || !banduration)
|
||||
usr << "Not enough parameters (Requires ckey, reason and job)."
|
||||
to_chat(usr, "Not enough parameters (Requires ckey, reason and job).")
|
||||
return
|
||||
if(BANTYPE_ADMIN_PERMA)
|
||||
if(!banckey || !banreason)
|
||||
usr << "Not enough parameters (Requires ckey and reason)."
|
||||
to_chat(usr, "Not enough parameters (Requires ckey and reason).")
|
||||
return
|
||||
banduration = null
|
||||
banjob = null
|
||||
if(BANTYPE_ADMIN_TEMP)
|
||||
if(!banckey || !banreason || !banduration)
|
||||
usr << "Not enough parameters (Requires ckey, reason and duration)."
|
||||
to_chat(usr, "Not enough parameters (Requires ckey, reason and duration).")
|
||||
return
|
||||
banjob = null
|
||||
|
||||
@@ -250,7 +259,7 @@
|
||||
message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom ip and computer id fields replaced with the ip and computer id from the located mob.")
|
||||
|
||||
if(!DB_ban_record(bantype, playermob, banduration, banreason, banjob, banckey, banip, bancid ))
|
||||
usr << "<span class='danger'>Failed to apply ban.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to apply ban.</span>")
|
||||
return
|
||||
create_message("note", banckey, null, banreason, null, null, 0, 0)
|
||||
|
||||
@@ -387,7 +396,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["mob"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob."
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
|
||||
var/delmob = 0
|
||||
@@ -525,10 +534,10 @@
|
||||
return
|
||||
var/mob/M = locate(href_list["appearanceban"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
if(!M.ckey) //sanity
|
||||
usr << "This mob has no ckey"
|
||||
to_chat(usr, "This mob has no ckey")
|
||||
return
|
||||
|
||||
|
||||
@@ -542,7 +551,7 @@
|
||||
if(M.client)
|
||||
jobban_buildcache(M.client)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban.</span>")
|
||||
M << "<span class='boldannounce'><BIG>[usr.client.ckey] has removed your appearance ban.</BIG></span>"
|
||||
to_chat(M, "<span class='boldannounce'><BIG>[usr.client.ckey] has removed your appearance ban.</BIG></span>")
|
||||
|
||||
else switch(alert("Appearance ban [M.ckey]?",,"Yes","No", "Cancel"))
|
||||
if("Yes")
|
||||
@@ -550,7 +559,7 @@
|
||||
if(!reason)
|
||||
return
|
||||
if(!DB_ban_record(BANTYPE_JOB_PERMA, M, -1, reason, "appearance"))
|
||||
usr << "<span class='danger'>Failed to apply ban.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to apply ban.</span>")
|
||||
return
|
||||
if(M.client)
|
||||
jobban_buildcache(M.client)
|
||||
@@ -559,24 +568,24 @@
|
||||
feedback_inc("ban_appearance",1)
|
||||
create_message("note", M.ckey, null, "Appearance banned - [reason]", null, null, 0, 0)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] appearance banned [key_name_admin(M)].</span>")
|
||||
M << "<span class='boldannounce'><BIG>You have been appearance banned by [usr.client.ckey].</BIG></span>"
|
||||
M << "<span class='boldannounce'>The reason is: [reason]</span>"
|
||||
M << "<span class='danger'>Appearance ban can be lifted only upon request.</span>"
|
||||
to_chat(M, "<span class='boldannounce'><BIG>You have been appearance banned by [usr.client.ckey].</BIG></span>")
|
||||
to_chat(M, "<span class='boldannounce'>The reason is: [reason]</span>")
|
||||
to_chat(M, "<span class='danger'>Appearance ban can be lifted only upon request.</span>")
|
||||
if(config.banappeals)
|
||||
M << "<span class='danger'>To try to resolve this matter head to [config.banappeals]</span>"
|
||||
to_chat(M, "<span class='danger'>To try to resolve this matter head to [config.banappeals]</span>")
|
||||
else
|
||||
M << "<span class='danger'>No ban appeals URL has been set.</span>"
|
||||
to_chat(M, "<span class='danger'>No ban appeals URL has been set.</span>")
|
||||
if("No")
|
||||
return
|
||||
|
||||
else if(href_list["jobban2"])
|
||||
var/mob/M = locate(href_list["jobban2"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob."
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
|
||||
if(!M.ckey) //sanity
|
||||
usr << "This mob has no ckey."
|
||||
to_chat(usr, "This mob has no ckey.")
|
||||
return
|
||||
|
||||
var/dat = "<head><title>Job-Ban Panel: [key_name(M)]</title></head>"
|
||||
@@ -862,10 +871,10 @@
|
||||
return
|
||||
var/mob/M = locate(href_list["jobban4"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
if(!SSjob)
|
||||
usr << "Jobs subsystem not initialized yet!"
|
||||
to_chat(usr, "Jobs subsystem not initialized yet!")
|
||||
return
|
||||
//get jobs for department if specified, otherwise just return the one job in a list.
|
||||
var/list/joblist = list()
|
||||
@@ -935,7 +944,7 @@
|
||||
var/msg
|
||||
for(var/job in notbannedlist)
|
||||
if(!DB_ban_record(BANTYPE_JOB_TEMP, M, mins, reason, job))
|
||||
usr << "<span class='danger'>Failed to apply ban.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to apply ban.</span>")
|
||||
return
|
||||
if(M.client)
|
||||
jobban_buildcache(M.client)
|
||||
@@ -949,9 +958,9 @@
|
||||
msg += ", [job]"
|
||||
create_message("note", M.ckey, null, "Banned from [msg] - [reason]", null, null, 0, 0)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes.</span>")
|
||||
M << "<span class='boldannounce'><BIG>You have been [(msg == ("ooc" || "appearance")) ? "banned" : "jobbanned"] by [usr.client.ckey] from: [msg].</BIG></span>"
|
||||
M << "<span class='boldannounce'>The reason is: [reason]</span>"
|
||||
M << "<span class='danger'>This jobban will be lifted in [mins] minutes.</span>"
|
||||
to_chat(M, "<span class='boldannounce'><BIG>You have been [(msg == ("ooc" || "appearance")) ? "banned" : "jobbanned"] by [usr.client.ckey] from: [msg].</BIG></span>")
|
||||
to_chat(M, "<span class='boldannounce'>The reason is: [reason]</span>")
|
||||
to_chat(M, "<span class='danger'>This jobban will be lifted in [mins] minutes.</span>")
|
||||
href_list["jobban2"] = 1 // lets it fall through and refresh
|
||||
return 1
|
||||
if("No")
|
||||
@@ -960,7 +969,7 @@
|
||||
var/msg
|
||||
for(var/job in notbannedlist)
|
||||
if(!DB_ban_record(BANTYPE_JOB_PERMA, M, -1, reason, job))
|
||||
usr << "<span class='danger'>Failed to apply ban.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to apply ban.</span>")
|
||||
return
|
||||
if(M.client)
|
||||
jobban_buildcache(M.client)
|
||||
@@ -974,9 +983,9 @@
|
||||
msg += ", [job]"
|
||||
create_message("note", M.ckey, null, "Banned from [msg] - [reason]", null, null, 0, 0)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg].</span>")
|
||||
M << "<span class='boldannounce'><BIG>You have been [(msg == ("ooc" || "appearance")) ? "banned" : "jobbanned"] by [usr.client.ckey] from: [msg].</BIG></span>"
|
||||
M << "<span class='boldannounce'>The reason is: [reason]</span>"
|
||||
M << "<span class='danger'>Jobban can be lifted only upon request.</span>"
|
||||
to_chat(M, "<span class='boldannounce'><BIG>You have been [(msg == ("ooc" || "appearance")) ? "banned" : "jobbanned"] by [usr.client.ckey] from: [msg].</BIG></span>")
|
||||
to_chat(M, "<span class='boldannounce'>The reason is: [reason]</span>")
|
||||
to_chat(M, "<span class='danger'>Jobban can be lifted only upon request.</span>")
|
||||
href_list["jobban2"] = 1 // lets it fall through and refresh
|
||||
return 1
|
||||
if("Cancel")
|
||||
@@ -1007,7 +1016,7 @@
|
||||
continue
|
||||
if(msg)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg].</span>")
|
||||
M << "<span class='boldannounce'><BIG>You have been un-jobbanned by [usr.client.ckey] from [msg].</BIG></span>"
|
||||
to_chat(M, "<span class='boldannounce'><BIG>You have been un-jobbanned by [usr.client.ckey] from [msg].</BIG></span>")
|
||||
href_list["jobban2"] = 1 // lets it fall through and refresh
|
||||
return 1
|
||||
return 0 //we didn't do anything!
|
||||
@@ -1016,9 +1025,9 @@
|
||||
var/mob/M = locate(href_list["boot2"])
|
||||
if (ismob(M))
|
||||
if(!check_if_greater_rights_than(M.client))
|
||||
usr << "<span class='danger'>Error: They have more rights than you do.</span>"
|
||||
to_chat(usr, "<span class='danger'>Error: They have more rights than you do.</span>")
|
||||
return
|
||||
M << "<span class='danger'>You have been kicked from the server by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.ckey]"].</span>"
|
||||
to_chat(M, "<span class='danger'>You have been kicked from the server by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.ckey]"].</span>")
|
||||
log_admin("[key_name(usr)] kicked [key_name(M)].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] kicked [key_name_admin(M)].</span>")
|
||||
//M.client = null
|
||||
@@ -1101,9 +1110,7 @@
|
||||
else if(href_list["messageedits"])
|
||||
var/message_id = sanitizeSQL("[href_list["messageedits"]]")
|
||||
var/DBQuery/query_get_message_edits = dbcon.NewQuery("SELECT edits FROM [format_table_name("messages")] WHERE id = '[message_id]'")
|
||||
if(!query_get_message_edits.Execute())
|
||||
var/err = query_get_message_edits.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining edits from messages table. Error : \[[err]\]\n")
|
||||
if(!query_get_message_edits.warn_execute())
|
||||
return
|
||||
if(query_get_message_edits.NextRow())
|
||||
var/edit_log = query_get_message_edits.item[1]
|
||||
@@ -1129,18 +1136,18 @@
|
||||
if(!reason)
|
||||
return
|
||||
if(!DB_ban_record(BANTYPE_TEMP, M, mins, reason))
|
||||
usr << "<span class='danger'>Failed to apply ban.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to apply ban.</span>")
|
||||
return
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
|
||||
ban_unban_log_save("[key_name(usr)] has banned [key_name(M)]. - Reason: [reason] - This will be removed in [mins] minutes.")
|
||||
M << "<span class='boldannounce'><BIG>You have been banned by [usr.client.ckey].\nReason: [reason]</BIG></span>"
|
||||
M << "<span class='danger'>This is a temporary ban, it will be removed in [mins] minutes.</span>"
|
||||
to_chat(M, "<span class='boldannounce'><BIG>You have been banned by [usr.client.ckey].\nReason: [reason]</BIG></span>")
|
||||
to_chat(M, "<span class='danger'>This is a temporary ban, it will be removed in [mins] minutes.</span>")
|
||||
feedback_inc("ban_tmp",1)
|
||||
feedback_inc("ban_tmp_mins",mins)
|
||||
if(config.banappeals)
|
||||
M << "<span class='danger'>To try to resolve this matter head to [config.banappeals]</span>"
|
||||
to_chat(M, "<span class='danger'>To try to resolve this matter head to [config.banappeals]</span>")
|
||||
else
|
||||
M << "<span class='danger'>No ban appeals URL has been set.</span>"
|
||||
to_chat(M, "<span class='danger'>No ban appeals URL has been set.</span>")
|
||||
log_admin_private("[key_name(usr)] has banned [M.ckey].\nReason: [key_name(M)]\nThis will be removed in [mins] minutes.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has banned [key_name_admin(M)].\nReason: [reason]\nThis will be removed in [mins] minutes.</span>")
|
||||
|
||||
@@ -1156,14 +1163,14 @@
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
|
||||
if("No")
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
|
||||
M << "<span class='boldannounce'><BIG>You have been banned by [usr.client.ckey].\nReason: [reason]</BIG></span>"
|
||||
M << "<span class='danger'>This is a permanent ban.</span>"
|
||||
to_chat(M, "<span class='boldannounce'><BIG>You have been banned by [usr.client.ckey].\nReason: [reason]</BIG></span>")
|
||||
to_chat(M, "<span class='danger'>This is a permanent ban.</span>")
|
||||
if(config.banappeals)
|
||||
M << "<span class='danger'>To try to resolve this matter head to [config.banappeals]</span>"
|
||||
to_chat(M, "<span class='danger'>To try to resolve this matter head to [config.banappeals]</span>")
|
||||
else
|
||||
M << "<span class='danger'>No ban appeals URL has been set.</span>"
|
||||
to_chat(M, "<span class='danger'>No ban appeals URL has been set.</span>")
|
||||
if(!DB_ban_record(BANTYPE_PERMA, M, -1, reason))
|
||||
usr << "<span class='danger'>Failed to apply ban.</span>"
|
||||
to_chat(usr, "<span class='danger'>Failed to apply ban.</span>")
|
||||
return
|
||||
ban_unban_log_save("[key_name(usr)] has permabanned [key_name(M)]. - Reason: [reason] - This is a permanent ban.")
|
||||
log_admin_private("[key_name(usr)] has banned [key_name_admin(M)].\nReason: [reason]\nThis is a permanent ban.")
|
||||
@@ -1216,7 +1223,7 @@
|
||||
master_mode = href_list["c_mode2"]
|
||||
log_admin("[key_name(usr)] set the mode as [master_mode].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the mode as [master_mode].</span>")
|
||||
world << "<span class='adminnotice'><b>The mode is now: [master_mode]</b></span>"
|
||||
to_chat(world, "<span class='adminnotice'><b>The mode is now: [master_mode]</b></span>")
|
||||
Game() // updates the main game menu
|
||||
world.save_mode(master_mode)
|
||||
.(href, list("c_mode"=1))
|
||||
@@ -1241,7 +1248,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["monkeyone"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human."
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)].")
|
||||
@@ -1254,7 +1261,7 @@
|
||||
|
||||
var/mob/living/carbon/monkey/Mo = locate(href_list["humanone"])
|
||||
if(!istype(Mo))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/monkey."
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/monkey.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] attempting to humanize [key_name(Mo)].")
|
||||
@@ -1267,7 +1274,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["corgione"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human."
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] attempting to corgize [key_name(H)].")
|
||||
@@ -1281,7 +1288,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["forcespeech"])
|
||||
if(!ismob(M))
|
||||
usr << "this can only be used on instances of type /mob."
|
||||
to_chat(usr, "this can only be used on instances of type /mob.")
|
||||
|
||||
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
|
||||
if(!speech)
|
||||
@@ -1297,17 +1304,17 @@
|
||||
|
||||
var/mob/M = locate(href_list["sendtoprison"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob."
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
if(isAI(M))
|
||||
usr << "This cannot be used on instances of type /mob/living/silicon/ai."
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.")
|
||||
return
|
||||
|
||||
if(alert(usr, "Send [key_name(M)] to Prison?", "Message", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
M.loc = pick(prisonwarp)
|
||||
M << "<span class='adminnotice'>You have been sent to Prison!</span>"
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to Prison!</span>")
|
||||
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to Prison!")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] Prison!")
|
||||
@@ -1319,11 +1326,11 @@
|
||||
var/mob/M = locate(href_list["sendbacktolobby"])
|
||||
|
||||
if(!isobserver(M))
|
||||
usr << "<span class='notice'>You can only send ghost players back to the Lobby.</span>"
|
||||
to_chat(usr, "<span class='notice'>You can only send ghost players back to the Lobby.</span>")
|
||||
return
|
||||
|
||||
if(!M.client)
|
||||
usr << "<span class='warning'>[M] doesn't seem to have an active client.</span>"
|
||||
to_chat(usr, "<span class='warning'>[M] doesn't seem to have an active client.</span>")
|
||||
return
|
||||
|
||||
if(alert(usr, "Send [key_name(M)] back to Lobby?", "Message", "Yes", "No") != "Yes")
|
||||
@@ -1332,7 +1339,7 @@
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
|
||||
message_admins("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
|
||||
|
||||
var/mob/new_player/NP = new()
|
||||
var/mob/dead/new_player/NP = new()
|
||||
NP.ckey = M.ckey
|
||||
qdel(M)
|
||||
|
||||
@@ -1345,10 +1352,10 @@
|
||||
|
||||
var/mob/M = locate(href_list["tdome1"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob."
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
if(isAI(M))
|
||||
usr << "This cannot be used on instances of type /mob/living/silicon/ai."
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.")
|
||||
return
|
||||
|
||||
for(var/obj/item/I in M)
|
||||
@@ -1358,7 +1365,7 @@
|
||||
sleep(5)
|
||||
M.loc = pick(tdome1)
|
||||
spawn(50)
|
||||
M << "<span class='adminnotice'>You have been sent to the Thunderdome.</span>"
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)")
|
||||
|
||||
@@ -1371,10 +1378,10 @@
|
||||
|
||||
var/mob/M = locate(href_list["tdome2"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob."
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
if(isAI(M))
|
||||
usr << "This cannot be used on instances of type /mob/living/silicon/ai."
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.")
|
||||
return
|
||||
|
||||
for(var/obj/item/I in M)
|
||||
@@ -1384,7 +1391,7 @@
|
||||
sleep(5)
|
||||
M.loc = pick(tdome2)
|
||||
spawn(50)
|
||||
M << "<span class='adminnotice'>You have been sent to the Thunderdome.</span>"
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)")
|
||||
|
||||
@@ -1397,17 +1404,17 @@
|
||||
|
||||
var/mob/M = locate(href_list["tdomeadmin"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob."
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
if(isAI(M))
|
||||
usr << "This cannot be used on instances of type /mob/living/silicon/ai."
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.")
|
||||
return
|
||||
|
||||
M.Paralyse(5)
|
||||
sleep(5)
|
||||
M.loc = pick(tdomeadmin)
|
||||
spawn(50)
|
||||
M << "<span class='adminnotice'>You have been sent to the Thunderdome.</span>"
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)")
|
||||
|
||||
@@ -1420,10 +1427,10 @@
|
||||
|
||||
var/mob/M = locate(href_list["tdomeobserve"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob."
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
if(isAI(M))
|
||||
usr << "This cannot be used on instances of type /mob/living/silicon/ai."
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.")
|
||||
return
|
||||
|
||||
for(var/obj/item/I in M)
|
||||
@@ -1437,7 +1444,7 @@
|
||||
sleep(5)
|
||||
M.loc = pick(tdomeobserve)
|
||||
spawn(50)
|
||||
M << "<span class='adminnotice'>You have been sent to the Thunderdome.</span>"
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)")
|
||||
|
||||
@@ -1447,7 +1454,7 @@
|
||||
|
||||
var/mob/living/L = locate(href_list["revive"])
|
||||
if(!istype(L))
|
||||
usr << "This can only be used on instances of type /mob/living."
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living.")
|
||||
return
|
||||
|
||||
L.revive(full_heal = 1, admin_revive = 1)
|
||||
@@ -1460,7 +1467,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human."
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.")
|
||||
return
|
||||
|
||||
message_admins("<span class='danger'>Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!</span>")
|
||||
@@ -1473,7 +1480,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makealien"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human."
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_alienize(H)
|
||||
@@ -1484,7 +1491,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human."
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_slimeize(H)
|
||||
@@ -1495,7 +1502,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeblob"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human."
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_blobize(H)
|
||||
@@ -1507,7 +1514,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human."
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_robotize(H)
|
||||
@@ -1518,7 +1525,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["makeanimal"])
|
||||
if(isnewplayer(M))
|
||||
usr << "This cannot be used on instances of type /mob/new_player."
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/dead/new_player.")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_animalize(M)
|
||||
@@ -1574,7 +1581,7 @@
|
||||
else if(href_list["adminmoreinfo"])
|
||||
var/mob/M = locate(href_list["adminmoreinfo"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob."
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
|
||||
var/location_description = ""
|
||||
@@ -1619,12 +1626,12 @@
|
||||
else
|
||||
gender_description = "<font color='red'><b>[M.gender]</b></font>"
|
||||
|
||||
src.owner << "<b>Info about [M.name]:</b> "
|
||||
src.owner << "Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]"
|
||||
src.owner << "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;"
|
||||
src.owner << "Location = [location_description];"
|
||||
src.owner << "[special_role_description]"
|
||||
src.owner << "(<a href='?priv_msg=[M.ckey]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) (<A HREF='?src=\ref[src];adminplayerobservefollow=\ref[M]'>FLW</A>) (<A HREF='?src=\ref[src];secrets=check_antagonist'>CA</A>)"
|
||||
to_chat(src.owner, "<b>Info about [M.name]:</b> ")
|
||||
to_chat(src.owner, "Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]")
|
||||
to_chat(src.owner, "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;")
|
||||
to_chat(src.owner, "Location = [location_description];")
|
||||
to_chat(src.owner, "[special_role_description]")
|
||||
to_chat(src.owner, "(<a href='?priv_msg=[M.ckey]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) (<A HREF='?src=\ref[src];adminplayerobservefollow=\ref[M]'>FLW</A>) (<A HREF='?src=\ref[src];secrets=check_antagonist'>CA</A>)")
|
||||
|
||||
else if(href_list["addjobslot"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -1685,7 +1692,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["adminspawncookie"])
|
||||
if(!ishuman(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human."
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.")
|
||||
return
|
||||
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/cookie/cookie = new(H)
|
||||
@@ -1700,7 +1707,7 @@
|
||||
log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)].")
|
||||
message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)].")
|
||||
feedback_inc("admin_cookies_spawned",1)
|
||||
H << "<span class='adminnotice'>Your prayers have been answered!! You received the <b>best cookie</b>!</span>"
|
||||
to_chat(H, "<span class='adminnotice'>Your prayers have been answered!! You received the <b>best cookie</b>!</span>")
|
||||
H << 'sound/effects/pray_chaplain.ogg'
|
||||
|
||||
else if(href_list["adminsmite"])
|
||||
@@ -1724,7 +1731,7 @@
|
||||
T.Beam(H, icon_state="lightning[rand(1,12)]", time = 5)
|
||||
H.adjustFireLoss(75)
|
||||
H.electrocution_animation(40)
|
||||
H << "<span class='userdanger'>The gods have punished you for your sins!</span>"
|
||||
to_chat(H, "<span class='userdanger'>The gods have punished you for your sins!</span>")
|
||||
if(ADMIN_PUNISHMENT_BRAINDAMAGE)
|
||||
H.adjustBrainLoss(75)
|
||||
if(ADMIN_PUNISHMENT_GIB)
|
||||
@@ -1740,10 +1747,10 @@
|
||||
else if(href_list["CentcommReply"])
|
||||
var/mob/living/carbon/human/H = locate(href_list["CentcommReply"]) in mob_list
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
if(!istype(H.ears, /obj/item/device/radio/headset))
|
||||
usr << "The person you are trying to contact is not wearing a headset."
|
||||
to_chat(usr, "The person you are trying to contact is not wearing a headset.")
|
||||
return
|
||||
|
||||
message_admins("[src.owner] has started answering [key_name(H)]'s Centcomm request.")
|
||||
@@ -1752,18 +1759,18 @@
|
||||
message_admins("[src.owner] decided not to answer [key_name(H)]'s Centcomm request.")
|
||||
return
|
||||
|
||||
src.owner << "You sent [input] to [H] via a secure channel."
|
||||
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
|
||||
log_admin("[src.owner] replied to [key_name(H)]'s Centcom message with the message [input].")
|
||||
message_admins("[src.owner] replied to [key_name(H)]'s Centcom message with: \"[input]\"")
|
||||
H << "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\""
|
||||
to_chat(H, "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\"")
|
||||
|
||||
else if(href_list["SyndicateReply"])
|
||||
var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human."
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.")
|
||||
return
|
||||
if(!istype(H.ears, /obj/item/device/radio/headset))
|
||||
usr << "The person you are trying to contact is not wearing a headset."
|
||||
to_chat(usr, "The person you are trying to contact is not wearing a headset.")
|
||||
return
|
||||
|
||||
message_admins("[src.owner] has started answering [key_name(H)]'s syndicate request.")
|
||||
@@ -1772,10 +1779,10 @@
|
||||
message_admins("[src.owner] decided not to answer [key_name(H)]'s syndicate request.")
|
||||
return
|
||||
|
||||
src.owner << "You sent [input] to [H] via a secure channel."
|
||||
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
|
||||
log_admin("[src.owner] replied to [key_name(H)]'s Syndicate message with the message [input].")
|
||||
message_admins("[src.owner] replied to [key_name(H)]'s Syndicate message with: \"[input]\"")
|
||||
H << "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. [input]. Message ends.\""
|
||||
to_chat(H, "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. [input]. Message ends.\"")
|
||||
|
||||
else if(href_list["reject_custom_name"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -1820,6 +1827,17 @@
|
||||
var/mob/M = locate(href_list["subtlemessage"])
|
||||
usr.client.cmd_admin_subtle_message(M)
|
||||
|
||||
else if(href_list["individuallog"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["individuallog"]) in mob_list
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
|
||||
show_individual_logging_panel(M, href_list["log_type"])
|
||||
|
||||
else if(href_list["traitor"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
@@ -1830,7 +1848,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["traitor"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob."
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
show_traitor_panel(M)
|
||||
|
||||
@@ -1909,7 +1927,7 @@
|
||||
switch(where)
|
||||
if("inhand")
|
||||
if (!iscarbon(usr) && !iscyborg(usr))
|
||||
usr << "Can only spawn in hand when you're a carbon mob or cyborg."
|
||||
to_chat(usr, "Can only spawn in hand when you're a carbon mob or cyborg.")
|
||||
where = "onfloor"
|
||||
target = usr
|
||||
|
||||
@@ -1921,10 +1939,10 @@
|
||||
target = locate(loc.x + X,loc.y + Y,loc.z + Z)
|
||||
if("inmarked")
|
||||
if(!marked_datum)
|
||||
usr << "You don't have any object marked. Abandoning spawn."
|
||||
to_chat(usr, "You don't have any object marked. Abandoning spawn.")
|
||||
return
|
||||
else if(!istype(marked_datum,/atom))
|
||||
usr << "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn."
|
||||
to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.")
|
||||
return
|
||||
else
|
||||
target = marked_datum
|
||||
@@ -2178,7 +2196,7 @@
|
||||
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||
var/afkonly = text2num(href_list["afkonly"])
|
||||
if(alert("Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message","Yes","Cancel") != "Yes")
|
||||
usr << "Kick clients from lobby aborted"
|
||||
to_chat(usr, "Kick clients from lobby aborted")
|
||||
return
|
||||
var/list/listkicked = kick_clients_in_lobby("<span class='danger'>You were kicked from the lobby by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.ckey]"].</span>", afkonly)
|
||||
|
||||
@@ -2188,7 +2206,7 @@
|
||||
message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
|
||||
log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
|
||||
else
|
||||
usr << "You may only use this when the game is running."
|
||||
to_chat(usr, "You may only use this when the game is running.")
|
||||
|
||||
else if(href_list["create_outfit"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -2250,24 +2268,24 @@
|
||||
else if(href_list["viewruntime"])
|
||||
var/datum/error_viewer/error_viewer = locate(href_list["viewruntime"])
|
||||
if(!istype(error_viewer))
|
||||
usr << "<span class='warning'>That runtime viewer no longer exists.</span>"
|
||||
to_chat(usr, "<span class='warning'>That runtime viewer no longer exists.</span>")
|
||||
return
|
||||
|
||||
if(href_list["viewruntime_backto"])
|
||||
error_viewer.show_to(owner, locate(href_list["viewruntime_backto"]), href_list["viewruntime_linear"])
|
||||
else
|
||||
error_viewer.show_to(owner, null, href_list["viewruntime_linear"])
|
||||
|
||||
else if(href_list["mentor"])
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/mob/M = locate(href_list["mentor"])
|
||||
if(!ismob(M))
|
||||
usr << "this can be only used on instances of type /mob"
|
||||
to_chat(usr, "this can be only used on instances of type /mob")
|
||||
return
|
||||
|
||||
if(!M.client)
|
||||
usr << "no client"
|
||||
to_chat(usr, "no client")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] has granted [key_name(M)] mentor access")
|
||||
@@ -2280,7 +2298,7 @@
|
||||
load_mentors()
|
||||
M.verbs += /client/proc/cmd_mentor_say
|
||||
M.verbs += /client/proc/show_mentor_memo
|
||||
M << "\blue You've been granted mentor access! Help people who send mentor-pms"
|
||||
to_chat(M, "\blue You've been granted mentor access! Help people who send mentor-pms")
|
||||
|
||||
else if(href_list["removementor"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
@@ -2298,7 +2316,7 @@
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during removing mentor. Error : \[[err]\]\n")
|
||||
load_mentors()
|
||||
M << "\blue Your mentor access has been removed"
|
||||
to_chat(M, "\blue Your mentor access has been removed")
|
||||
M.verbs -= /client/proc/cmd_mentor_say
|
||||
M.verbs -= /client/proc/show_mentor_memo
|
||||
|
||||
|
||||
@@ -29,6 +29,6 @@
|
||||
var/F = file("broken_icons.txt")
|
||||
fdel(F)
|
||||
F << text
|
||||
world << "Completely successfully and written to [F]"
|
||||
to_chat(world, "Completely successfully and written to [F]")
|
||||
|
||||
|
||||
|
||||
@@ -18,10 +18,6 @@
|
||||
|
||||
*/
|
||||
|
||||
/datum/proc/SDQL_update(const/var_name, new_value)
|
||||
vars[var_name] = new_value
|
||||
return TRUE
|
||||
|
||||
/client/proc/SDQL2_query(query_text as message)
|
||||
set category = "Debug"
|
||||
if(!check_rights(R_DEBUG)) //Shouldn't happen... but just to be safe.
|
||||
@@ -38,7 +34,7 @@
|
||||
if(!query_text || length(query_text) < 1)
|
||||
return
|
||||
|
||||
//world << query_text
|
||||
//to_chat(world, query_text)
|
||||
|
||||
var/list/query_list = SDQL2_tokenize(query_text)
|
||||
|
||||
@@ -75,15 +71,8 @@
|
||||
var/list/objs = list()
|
||||
|
||||
for(var/type in select_types)
|
||||
var/char = copytext(type, 1, 2)
|
||||
|
||||
if(char == "/" || char == "*")
|
||||
for(var/from in from_objs)
|
||||
objs += SDQL_get_all(type, from)
|
||||
CHECK_TICK
|
||||
|
||||
else if(char == "'" || char == "\"")
|
||||
objs += locate(copytext(type, 2, length(type)))
|
||||
objs += SDQL_get_all(type, from_objs)
|
||||
CHECK_TICK
|
||||
|
||||
if("where" in query_tree)
|
||||
var/objs_temp = objs
|
||||
@@ -95,19 +84,8 @@
|
||||
|
||||
switch(query_tree[1])
|
||||
if("call")
|
||||
var/list/call_list = query_tree["call"]
|
||||
var/list/args_list = query_tree["args"]
|
||||
|
||||
for(var/datum/d in objs)
|
||||
var/list/new_args = list()
|
||||
for(var/a in args_list)
|
||||
new_args += SDQL_expression(d,a)
|
||||
for(var/v in call_list)
|
||||
if(copytext(v,1,8) == "global.")
|
||||
v = "/proc/[copytext(v,8)]"
|
||||
SDQL_callproc_global(v,new_args)
|
||||
else
|
||||
SDQL_callproc(d, v, new_args)
|
||||
SDQL_var(d, query_tree["call"][1], source = d)
|
||||
CHECK_TICK
|
||||
|
||||
if("delete")
|
||||
@@ -146,7 +124,7 @@
|
||||
var/i = 0
|
||||
for(var/v in sets)
|
||||
if(++i == sets.len)
|
||||
temp.SDQL_update(v, SDQL_expression(d, set_list[sets]))
|
||||
temp.vv_edit_var(v, SDQL_expression(d, set_list[sets]))
|
||||
break
|
||||
if(temp.vars.Find(v) && (istype(temp.vars[v], /datum)))
|
||||
temp = temp.vars[v]
|
||||
@@ -155,10 +133,10 @@
|
||||
CHECK_TICK
|
||||
|
||||
catch(var/exception/e)
|
||||
usr << "<span class='boldwarning'>A runtime error has occured in your SDQL2-query.</span>"
|
||||
usr << "\[NAME\][e.name]"
|
||||
usr << "\[FILE\][e.file]"
|
||||
usr << "\[LINE\][e.line]"
|
||||
to_chat(usr, "<span class='boldwarning'>A runtime error has occured in your SDQL2-query.</span>")
|
||||
to_chat(usr, "\[NAME\][e.name]")
|
||||
to_chat(usr, "\[FILE\][e.file]")
|
||||
to_chat(usr, "\[LINE\][e.line]")
|
||||
|
||||
/proc/SDQL_callproc_global(procname,args_list)
|
||||
set waitfor = FALSE
|
||||
@@ -193,7 +171,7 @@
|
||||
querys[querys_pos] = parsed_tree
|
||||
querys_pos++
|
||||
else //There was an error so don't run anything, and tell the user which query has errored.
|
||||
usr << "<span class='danger'>Parsing error on [querys_pos]\th query. Nothing was executed.</span>"
|
||||
to_chat(usr, "<span class='danger'>Parsing error on [querys_pos]\th query. Nothing was executed.</span>")
|
||||
return list()
|
||||
query_tree = list()
|
||||
do_parse = 0
|
||||
@@ -214,51 +192,36 @@
|
||||
|
||||
for(var/item in query_tree)
|
||||
if(istype(item, /list))
|
||||
usr << "[spaces]("
|
||||
to_chat(usr, "[spaces](")
|
||||
SDQL_testout(item, indent + 1)
|
||||
usr << "[spaces])"
|
||||
to_chat(usr, "[spaces])")
|
||||
|
||||
else
|
||||
usr << "[spaces][item]"
|
||||
to_chat(usr, "[spaces][item]")
|
||||
|
||||
if(!isnum(item) && query_tree[item])
|
||||
|
||||
if(istype(query_tree[item], /list))
|
||||
usr << "[spaces] ("
|
||||
to_chat(usr, "[spaces] (")
|
||||
SDQL_testout(query_tree[item], indent + 2)
|
||||
usr << "[spaces] )"
|
||||
to_chat(usr, "[spaces] )")
|
||||
|
||||
else
|
||||
usr << "[spaces] [query_tree[item]]"
|
||||
to_chat(usr, "[spaces] [query_tree[item]]")
|
||||
|
||||
|
||||
|
||||
/proc/SDQL_from_objs(list/tree)
|
||||
if("world" in tree)
|
||||
return list(world)
|
||||
|
||||
var/list/out = list()
|
||||
|
||||
for(var/type in tree)
|
||||
var/char = copytext(type, 1, 2)
|
||||
|
||||
if(char == "/")
|
||||
out += SDQL_get_all(type, world)
|
||||
|
||||
else if(char == "'" || char == "\"")
|
||||
out += locate(copytext(type, 2, length(type)))
|
||||
|
||||
return out
|
||||
|
||||
return world
|
||||
return SDQL_expression(world, tree)
|
||||
|
||||
/proc/SDQL_get_all(type, location)
|
||||
var/list/out = list()
|
||||
|
||||
if(type == "*")
|
||||
for(var/datum/d in location)
|
||||
out += d
|
||||
|
||||
return out
|
||||
// If only a single object got returned, wrap it into a list so the for loops run on it.
|
||||
if(!islist(location) && location != world)
|
||||
location = list(location)
|
||||
|
||||
type = text2path(type)
|
||||
var/typecache = typecacheof(type)
|
||||
@@ -355,7 +318,7 @@
|
||||
if("or", "||")
|
||||
result = (result || val)
|
||||
else
|
||||
usr << "<span class='danger'>SDQL2: Unknown op [op]</span>"
|
||||
to_chat(usr, "<span class='danger'>SDQL2: Unknown op [op]</span>")
|
||||
result = null
|
||||
else
|
||||
result = val
|
||||
@@ -398,51 +361,89 @@
|
||||
|
||||
else if(expression[i] == "\[")
|
||||
var/list/expressions_list = expression[++i]
|
||||
var/list/val2 = list()
|
||||
val = list()
|
||||
for(var/list/expression_list in expressions_list)
|
||||
val2[++val2.len] = SDQL_expression(object, expression_list)
|
||||
val = val2
|
||||
var/result = SDQL_expression(object, expression_list)
|
||||
var/assoc
|
||||
if(expressions_list[expression_list] != null)
|
||||
assoc = SDQL_expression(object, expressions_list[expression_list])
|
||||
if(assoc != null)
|
||||
// Need to insert the key like this to prevent duplicate keys fucking up.
|
||||
var/list/dummy = list()
|
||||
dummy[result] = assoc
|
||||
result = dummy
|
||||
val += result
|
||||
else
|
||||
val = SDQL_var(object, expression, i)
|
||||
val = SDQL_var(object, expression, i, object)
|
||||
i = expression.len
|
||||
|
||||
return list("val" = val, "i" = i)
|
||||
|
||||
/proc/SDQL_var(datum/object, list/expression, start = 1)
|
||||
/proc/SDQL_var(datum/object, list/expression, start = 1, source)
|
||||
var/v
|
||||
if(expression[start] in object.vars)
|
||||
v = object.vars[expression[start]]
|
||||
else if(expression[start] == "{" && start < expression.len)
|
||||
var/static/list/exclude = list("usr", "src", "marked", "global")
|
||||
var/long = start < expression.len
|
||||
if(object == world && long && expression[start + 1] == ".")
|
||||
to_chat(usr, "Sorry, but global variables are not supported at the moment.")
|
||||
return null
|
||||
else if(expression [start] == "{" && long)
|
||||
if(lowertext(copytext(expression[start + 1], 1, 3)) != "0x")
|
||||
usr << "<span class='danger'>Invalid pointer syntax: [expression[start + 1]]</span>"
|
||||
to_chat(usr, "<span class='danger'>Invalid pointer syntax: [expression[start + 1]]</span>")
|
||||
return null
|
||||
v = locate("\[[expression[start + 1]]]")
|
||||
if(!v)
|
||||
usr << "<span class='danger'>Invalid pointer: [expression[start + 1]]</span>"
|
||||
to_chat(usr, "<span class='danger'>Invalid pointer: [expression[start + 1]]</span>")
|
||||
return null
|
||||
start++
|
||||
else
|
||||
else if((!long || expression[start + 1] == ".") && (expression[start] in object.vars))
|
||||
v = object.vars[expression[start]]
|
||||
else if(long && expression[start + 1] == ":" && hascall(object, expression[start]))
|
||||
v = expression[start]
|
||||
else if(!long || expression[start + 1] == ".")
|
||||
switch(expression[start])
|
||||
if("usr")
|
||||
v = usr
|
||||
if("src")
|
||||
v = object
|
||||
v = source
|
||||
if("marked")
|
||||
if(usr.client && usr.client.holder && usr.client.holder.marked_datum)
|
||||
v = usr.client.holder.marked_datum
|
||||
else
|
||||
return null
|
||||
if("global")
|
||||
v = world
|
||||
else
|
||||
return null
|
||||
if(start < expression.len && expression[start + 1] == ".")
|
||||
return SDQL_var(v, expression[start + 2])
|
||||
else
|
||||
return v
|
||||
else if(object == world) // Shitty ass hack kill me.
|
||||
v = expression[start]
|
||||
if(long)
|
||||
if(expression[start + 1] == ".")
|
||||
return SDQL_var(v, expression[start + 2], source = source)
|
||||
else if(expression[start + 1] == ":")
|
||||
return SDQL_function(object, v, expression[start + 2], source)
|
||||
else if(expression[start + 1] == "\[" && islist(v))
|
||||
var/list/L = v
|
||||
var/index = SDQL_expression(source, expression[start + 2])
|
||||
if(isnum(index) && (!IsInteger(index) || L.len < index))
|
||||
to_chat(usr, "<span class='danger'>Invalid list index: [index]</span>")
|
||||
return null
|
||||
return L[index]
|
||||
return v
|
||||
|
||||
/proc/SDQL_function(var/datum/object, var/procname, var/list/arguments, source)
|
||||
set waitfor = FALSE
|
||||
var/list/new_args = list()
|
||||
for(var/arg in arguments)
|
||||
new_args += SDQL_expression(source, arg)
|
||||
if(object == world) // Global proc.
|
||||
procname = "/proc/[procname]"
|
||||
return call(procname)(arglist(new_args))
|
||||
return call(object, procname)(arglist(new_args)) // Spawn in case the function sleeps.
|
||||
|
||||
/proc/SDQL2_tokenize(query_text)
|
||||
|
||||
var/list/whitespace = list(" ", "\n", "\t")
|
||||
var/list/single = list("(", ")", ",", "+", "-", ".", ";", "{", "}", "\[", "]")
|
||||
var/list/single = list("(", ")", ",", "+", "-", ".", ";", "{", "}", "\[", "]", ":")
|
||||
var/list/multi = list(
|
||||
"=" = list("", "="),
|
||||
"<" = list("", "=", ">"),
|
||||
@@ -484,7 +485,7 @@
|
||||
|
||||
else if(char == "'")
|
||||
if(word != "")
|
||||
usr << "\red SDQL2: You have an error in your SDQL syntax, unexpected ' in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again."
|
||||
to_chat(usr, "\red SDQL2: You have an error in your SDQL syntax, unexpected ' in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.")
|
||||
return null
|
||||
|
||||
word = "'"
|
||||
@@ -504,7 +505,7 @@
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "\red SDQL2: You have an error in your SDQL syntax, unmatched ' in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again."
|
||||
to_chat(usr, "\red SDQL2: You have an error in your SDQL syntax, unmatched ' in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.")
|
||||
return null
|
||||
|
||||
query_list += "[word]'"
|
||||
@@ -512,7 +513,7 @@
|
||||
|
||||
else if(char == "\"")
|
||||
if(word != "")
|
||||
usr << "\red SDQL2: You have an error in your SDQL syntax, unexpected \" in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again."
|
||||
to_chat(usr, "\red SDQL2: You have an error in your SDQL syntax, unexpected \" in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.")
|
||||
return null
|
||||
|
||||
word = "\""
|
||||
@@ -532,7 +533,7 @@
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "\red SDQL2: You have an error in your SDQL syntax, unmatched \" in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again."
|
||||
to_chat(usr, "\red SDQL2: You have an error in your SDQL syntax, unmatched \" in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.")
|
||||
return null
|
||||
|
||||
query_list += "[word]\""
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/datum/SDQL_parser/proc/parse_error(error_message)
|
||||
error = 1
|
||||
usr << "<span class='danger'>SQDL2 Parsing Error: [error_message]</span>"
|
||||
to_chat(usr, "<span class='danger'>SQDL2 Parsing Error: [error_message]</span>")
|
||||
return query.len + 1
|
||||
|
||||
/datum/SDQL_parser/proc/parse()
|
||||
@@ -116,18 +116,7 @@
|
||||
i = select_list(i + 1, select)
|
||||
node += "select"
|
||||
node["select"] = select
|
||||
var/list/from = list()
|
||||
if(tokenl(i) in list("from", "in"))
|
||||
i = from_list(i + 1, from)
|
||||
else
|
||||
from += "world"
|
||||
node += "from"
|
||||
node["from"] = from
|
||||
if(tokenl(i) == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
node += "where"
|
||||
node["where"] = where
|
||||
selectors(i, node)
|
||||
return i
|
||||
|
||||
//delete_query: 'DELETE' select_list [('FROM' | 'IN') from_list] ['WHERE' bool_expression]
|
||||
@@ -136,18 +125,7 @@
|
||||
i = select_list(i + 1, select)
|
||||
node += "delete"
|
||||
node["delete"] = select
|
||||
var/list/from = list()
|
||||
if(tokenl(i) in list("from", "in"))
|
||||
i = from_list(i + 1, from)
|
||||
else
|
||||
from += "world"
|
||||
node += "from"
|
||||
node["from"] = from
|
||||
if(tokenl(i) == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
node += "where"
|
||||
node["where"] = where
|
||||
selectors(i, node)
|
||||
return i
|
||||
|
||||
//update_query: 'UPDATE' select_list [('FROM' | 'IN') from_list] 'SET' assignments ['WHERE' bool_expression]
|
||||
@@ -156,52 +134,28 @@
|
||||
i = select_list(i + 1, select)
|
||||
node += "update"
|
||||
node["update"] = select
|
||||
var/list/from = list()
|
||||
if(tokenl(i) in list("from", "in"))
|
||||
i = from_list(i + 1, from)
|
||||
else
|
||||
from += "world"
|
||||
node += "from"
|
||||
node["from"] = from
|
||||
if(tokenl(i) != "set")
|
||||
i = parse_error("UPDATE has misplaced SET")
|
||||
var/list/set_assignments = list()
|
||||
i = assignments(i + 1, set_assignments)
|
||||
node += "set"
|
||||
node["set"] = set_assignments
|
||||
if(tokenl(i) == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
node += "where"
|
||||
node["where"] = where
|
||||
selectors(i, node)
|
||||
return i
|
||||
|
||||
//call_query: 'CALL' call_function ['ON' select_list [('FROM' | 'IN') from_list] ['WHERE' bool_expression]]
|
||||
/datum/SDQL_parser/proc/call_query(i, list/node)
|
||||
var/list/func = list()
|
||||
var/list/arguments = list()
|
||||
i = call_function(i + 1, func, arguments)
|
||||
i = variable(i + 1, func) // Yes technically does anything variable() matches but I don't care, if admins fuck up this badly then they shouldn't be allowed near SDQL.
|
||||
node += "call"
|
||||
node["call"] = func
|
||||
node["args"] = arguments
|
||||
if(tokenl(i) != "on")
|
||||
return i
|
||||
var/list/select = list()
|
||||
i = select_list(i + 1, select)
|
||||
node += "on"
|
||||
node["on"] = select
|
||||
var/list/from = list()
|
||||
if(tokenl(i) in list("from", "in"))
|
||||
i = from_list(i + 1, from)
|
||||
else
|
||||
from += "world"
|
||||
node += "from"
|
||||
node["from"] = from
|
||||
if(tokenl(i) == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
node += "where"
|
||||
node["where"] = where
|
||||
selectors(i, node)
|
||||
return i
|
||||
|
||||
//select_list: select_item [',' select_list]
|
||||
@@ -211,13 +165,6 @@
|
||||
i = select_list(i + 1, node)
|
||||
return i
|
||||
|
||||
//from_list: from_item [',' from_list]
|
||||
/datum/SDQL_parser/proc/from_list(i, list/node)
|
||||
i = from_item(i, node)
|
||||
if(token(i) == ",")
|
||||
i = from_list(i + 1, node)
|
||||
return i
|
||||
|
||||
//assignments: assignment, [',' assignments]
|
||||
/datum/SDQL_parser/proc/assignments(i, list/node)
|
||||
i = assignment(i, node)
|
||||
@@ -236,13 +183,33 @@
|
||||
i = object_type(i, node)
|
||||
return i
|
||||
|
||||
// Standardized method for handling the IN/FROM and WHERE options.
|
||||
/datum/SDQL_parser/proc/selectors(i, list/node)
|
||||
while (token(i))
|
||||
var/tok = tokenl(i)
|
||||
if(tok in list("from", "in"))
|
||||
var/list/from = list()
|
||||
i = from_item(i + 1, from)
|
||||
node["from"] = from
|
||||
continue
|
||||
if(tok == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
node["where"] = where
|
||||
continue
|
||||
parse_error("Expected either FROM, IN or WHERE token, found [token(i)] instead.")
|
||||
return i + 1
|
||||
if(!node.Find("from"))
|
||||
node["from"] = list("world")
|
||||
return i
|
||||
|
||||
//from_item: 'world' | object_type
|
||||
/datum/SDQL_parser/proc/from_item(i, list/node)
|
||||
if(token(i) == "world")
|
||||
node += "world"
|
||||
i++
|
||||
else
|
||||
i = object_type(i, node)
|
||||
i = expression(i, node)
|
||||
return i
|
||||
|
||||
//bool_expression: expression [bool_operator bool_expression]
|
||||
@@ -280,6 +247,19 @@
|
||||
if(token(i + 1) == ".")
|
||||
L += "."
|
||||
i = variable(i + 2, L)
|
||||
else if(token(i + 1) == "(") // OH BOY PROC
|
||||
var/list/arguments = list()
|
||||
i = call_function(i, null, arguments)
|
||||
L += ":"
|
||||
L[++L.len] = arguments
|
||||
else if(token(i + 1) == "\[")
|
||||
var/list/expression = list()
|
||||
i = expression(i + 2, expression)
|
||||
if (token(i) != "]")
|
||||
parse_error("Missing ] at the end of list access.")
|
||||
L += "\["
|
||||
L[++L.len] = expression
|
||||
i++
|
||||
else
|
||||
i++
|
||||
return i
|
||||
@@ -291,17 +271,36 @@
|
||||
return i + 1
|
||||
node += token(i)
|
||||
var/list/expression_list = list()
|
||||
if(token(i + 1) != "]")
|
||||
i++
|
||||
if(token(i) != "]")
|
||||
var/list/temp_expression_list = list()
|
||||
var/tok
|
||||
do
|
||||
i = expression(i + 1, temp_expression_list)
|
||||
if(token(i) == ",")
|
||||
tok = token(i)
|
||||
if(tok == "," || tok == ":")
|
||||
if(temp_expression_list == null)
|
||||
parse_error("Found ',' or ':' without expression in an array.")
|
||||
return i + 1
|
||||
expression_list[++expression_list.len] = temp_expression_list
|
||||
temp_expression_list = list()
|
||||
temp_expression_list = null
|
||||
if(tok == ":")
|
||||
temp_expression_list = list()
|
||||
i = expression(i + 1, temp_expression_list)
|
||||
expression_list[expression_list[expression_list.len]] = temp_expression_list
|
||||
temp_expression_list = null
|
||||
tok = token(i)
|
||||
if(tok != ",")
|
||||
if(tok == "]")
|
||||
break
|
||||
parse_error("Expected ',' or ']' after array assoc value, but found '[token(i)]'")
|
||||
return i
|
||||
i++
|
||||
continue
|
||||
temp_expression_list = list()
|
||||
i = expression(i, temp_expression_list)
|
||||
while(token(i) && token(i) != "]")
|
||||
expression_list[++expression_list.len] = temp_expression_list
|
||||
else
|
||||
i++
|
||||
if(temp_expression_list)
|
||||
expression_list[++expression_list.len] = temp_expression_list
|
||||
node[++node.len] = expression_list
|
||||
return i + 1
|
||||
|
||||
|
||||
@@ -81,12 +81,12 @@
|
||||
set name = "Adminhelp"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
//handle muting and automuting
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
src << "<span class='danger'>Error: Admin-PM: You cannot send adminhelps (Muted).</span>"
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: You cannot send adminhelps (Muted).</span>")
|
||||
return
|
||||
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
|
||||
return
|
||||
@@ -108,7 +108,7 @@
|
||||
return //this doesn't happen
|
||||
|
||||
var/ref_client = "\ref[src]"
|
||||
msg = "<span class='adminnotice'><b><font color=red>HELP: </font><A HREF='?priv_msg=[ckey];ahelp_reply=1'>[key_name(src)]</A> [ADMIN_QUE(mob)] [ADMIN_PP(mob)] [ADMIN_VV(mob)] [ADMIN_SM(mob)] [ADMIN_FLW(mob)] [ADMIN_TP(mob)] (<A HREF='?_src_=holder;rejectadminhelp=[ref_client]'>REJT</A>) (<A HREF='?_src_=holder;icissue=[ref_client]'>IC</A>):</b> [msg]</span>"
|
||||
msg = "<span class='adminnotice'><b><font color=red>HELP: </font><A HREF='?priv_msg=[ckey];ahelp_reply=1'>[key_name(src)]</A> [ADMIN_QUE(mob)] [ADMIN_PP(mob)] [ADMIN_VV(mob)] [ADMIN_SM(mob)] [ADMIN_FLW(mob)] [ADMIN_TP(mob)] [ADMIN_SMITE(mob)] (<A HREF='?_src_=holder;rejectadminhelp=[ref_client]'>REJT</A>) (<A HREF='?_src_=holder;icissue=[ref_client]'>IC</A>):</b> [msg]</span>"
|
||||
|
||||
//send this msg to all admins
|
||||
|
||||
@@ -116,17 +116,17 @@
|
||||
if(X.prefs.toggles & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
window_flash(X, ignorepref = TRUE)
|
||||
X << msg
|
||||
to_chat(X, msg)
|
||||
|
||||
|
||||
//show it to the person adminhelping too
|
||||
src << "<span class='adminnotice'>PM to-<b>Admins</b>: [original_msg]</span>"
|
||||
to_chat(src, "<span class='adminnotice'>PM to-<b>Admins</b>: [original_msg]</span>")
|
||||
|
||||
//send it to irc if nobody is on and tell us how many were on
|
||||
var/admin_number_present = send2irc_adminless_only(ckey,original_msg)
|
||||
log_admin_private("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins who have +BAN.")
|
||||
if(admin_number_present <= 0)
|
||||
src << "<span class='notice'>No active admins are online, your adminhelp was sent to the admin irc.</span>"
|
||||
to_chat(src, "<span class='notice'>No active admins are online, your adminhelp was sent to the admin irc.</span>")
|
||||
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
return
|
||||
|
||||
/proc/send2otherserver(source,msg,type = "Ahelp")
|
||||
if(global.cross_allowed)
|
||||
if(config.cross_allowed)
|
||||
var/list/message = list()
|
||||
message["message_sender"] = source
|
||||
message["message"] = msg
|
||||
@@ -175,7 +175,7 @@
|
||||
message["key"] = global.comms_key
|
||||
message["crossmessage"] = type
|
||||
|
||||
world.Export("[global.cross_address]?[list2params(message)]")
|
||||
world.Export("[config.cross_address]?[list2params(message)]")
|
||||
|
||||
|
||||
/proc/ircadminwho()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set desc = "Area to jump to"
|
||||
set category = "Admin"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(!A)
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
var/turf/T = safepick(turfs)
|
||||
if(!T)
|
||||
src << "Nowhere to jump to!"
|
||||
to_chat(src, "Nowhere to jump to!")
|
||||
return
|
||||
usr.forceMove(T)
|
||||
log_admin("[key_name(usr)] jumped to [A]")
|
||||
@@ -29,7 +29,7 @@
|
||||
set name = "Jump to Turf"
|
||||
set category = "Admin"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
||||
@@ -43,7 +43,7 @@
|
||||
set name = "Jump to Mob"
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
@@ -55,14 +55,14 @@
|
||||
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
A.forceMove(M.loc)
|
||||
else
|
||||
A << "This mob is not located in the game world."
|
||||
to_chat(A, "This mob is not located in the game world.")
|
||||
|
||||
/client/proc/jumptocoord(tx as num, ty as num, tz as num)
|
||||
set category = "Admin"
|
||||
set name = "Jump to Coordinate"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(src.mob)
|
||||
@@ -78,7 +78,7 @@
|
||||
set name = "Jump to Key"
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/list/keys = list()
|
||||
@@ -86,7 +86,7 @@
|
||||
keys += M.client
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
if(!selection)
|
||||
src << "No keys found."
|
||||
to_chat(src, "No keys found.")
|
||||
return
|
||||
var/mob/M = selection:mob
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
@@ -101,7 +101,7 @@
|
||||
set name = "Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
||||
@@ -115,7 +115,7 @@
|
||||
set desc = "Key to teleport"
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/list/keys = list()
|
||||
@@ -139,7 +139,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Send Mob"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/area/A = input(usr, "Pick an area.", "Pick an area") in sortedAreas|null
|
||||
if(A && istype(A))
|
||||
@@ -148,5 +148,5 @@
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]")
|
||||
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]")
|
||||
else
|
||||
src << "Failed to move mob to a valid location."
|
||||
to_chat(src, "Failed to move mob to a valid location.")
|
||||
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
set category = null
|
||||
set name = "Admin PM Mob"
|
||||
if(!holder)
|
||||
src << "<font color='red'>Error: Admin-PM-Context: Only administrators may use this command.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM-Context: Only administrators may use this command.</font>")
|
||||
return
|
||||
if( !ismob(M) || !M.client )
|
||||
return
|
||||
@@ -18,7 +18,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Admin PM"
|
||||
if(!holder)
|
||||
src << "<font color='red'>Error: Admin-PM-Panel: Only administrators may use this command.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM-Panel: Only administrators may use this command.</font>")
|
||||
return
|
||||
var/list/client/targets[0]
|
||||
for(var/client/T)
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/client/proc/cmd_ahelp_reply(whom)
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
src << "<font color='red'>Error: Admin-PM: You are unable to use admin PM-s (muted).</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM: You are unable to use admin PM-s (muted).</font>")
|
||||
return
|
||||
var/client/C
|
||||
if(istext(whom))
|
||||
@@ -48,7 +48,7 @@
|
||||
C = whom
|
||||
if(!C)
|
||||
if(holder)
|
||||
src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM: Client not found.</font>")
|
||||
return
|
||||
message_admins("[key_name_admin(src)] has started replying to [key_name(C, 0, 0)]'s admin help.")
|
||||
var/msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as text|null
|
||||
@@ -61,7 +61,7 @@
|
||||
//Fetching a message if needed. src is the sender and C is the target client
|
||||
/client/proc/cmd_admin_pm(whom, msg)
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
src << "<font color='red'>Error: Admin-PM: You are unable to use admin PM-s (muted).</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM: You are unable to use admin PM-s (muted).</font>")
|
||||
return
|
||||
|
||||
var/client/C
|
||||
@@ -84,14 +84,14 @@
|
||||
if(!msg)
|
||||
return
|
||||
if(holder)
|
||||
src << "<font color='red'>Error: Use the admin IRC channel, nerd.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Use the admin IRC channel, nerd.</font>")
|
||||
return
|
||||
|
||||
|
||||
else
|
||||
if(!C)
|
||||
if(holder)
|
||||
src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM: Client not found.</font>")
|
||||
else
|
||||
adminhelp(msg) //admin we are replying to left. adminhelp instead
|
||||
return
|
||||
@@ -104,12 +104,12 @@
|
||||
return
|
||||
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
src << "<font color='red'>Error: Admin-PM: You are unable to use admin PM-s (muted).</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM: You are unable to use admin PM-s (muted).</font>")
|
||||
return
|
||||
|
||||
if(!C)
|
||||
if(holder)
|
||||
src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM: Client not found.</font>")
|
||||
else
|
||||
adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
|
||||
return
|
||||
@@ -131,18 +131,18 @@
|
||||
var/keywordparsedmsg = keywords_lookup(msg)
|
||||
|
||||
if(irc)
|
||||
src << "<font color='blue'>PM to-<b>Admins</b>: [rawmsg]</font>"
|
||||
to_chat(src, "<font color='blue'>PM to-<b>Admins</b>: [rawmsg]</font>")
|
||||
ircreplyamount--
|
||||
send2irc("Reply: [ckey]",rawmsg)
|
||||
else
|
||||
if(C.holder)
|
||||
if(holder) //both are admins
|
||||
C << "<font color='red'>Admin PM from-<b>[key_name(src, C, 1)]</b>: [keywordparsedmsg]</font>"
|
||||
src << "<font color='blue'>Admin PM to-<b>[key_name(C, src, 1)]</b>: [keywordparsedmsg]</font>"
|
||||
to_chat(C, "<font color='red'>Admin PM from-<b>[key_name(src, C, 1)]</b>: [keywordparsedmsg]</font>")
|
||||
to_chat(src, "<font color='blue'>Admin PM to-<b>[key_name(C, src, 1)]</b>: [keywordparsedmsg]</font>")
|
||||
|
||||
else //recipient is an admin but sender is not
|
||||
C << "<font color='red'>Reply PM from-<b>[key_name(src, C, 1)]</b>: [keywordparsedmsg]</font>"
|
||||
src << "<font color='blue'>PM to-<b>Admins</b>: [msg]</font>"
|
||||
to_chat(C, "<font color='red'>Reply PM from-<b>[key_name(src, C, 1)]</b>: [keywordparsedmsg]</font>")
|
||||
to_chat(src, "<font color='blue'>PM to-<b>Admins</b>: [msg]</font>")
|
||||
|
||||
//play the recieving admin the adminhelp sound (if they have them enabled)
|
||||
if(C.prefs.toggles & SOUND_ADMINHELP)
|
||||
@@ -150,10 +150,10 @@
|
||||
|
||||
else
|
||||
if(holder) //sender is an admin but recipient is not. Do BIG RED TEXT
|
||||
C << "<font color='red' size='4'><b>-- Administrator private message --</b></font>"
|
||||
C << "<font color='red'>Admin PM from-<b>[key_name(src, C, 0)]</b>: [msg]</font>"
|
||||
C << "<font color='red'><i>Click on the administrator's name to reply.</i></font>"
|
||||
src << "<font color='blue'>Admin PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>"
|
||||
to_chat(C, "<font color='red' size='4'><b>-- Administrator private message --</b></font>")
|
||||
to_chat(C, "<font color='red'>Admin PM from-<b>[key_name(src, C, 0)]</b>: [msg]</font>")
|
||||
to_chat(C, "<font color='red'><i>Click on the administrator's name to reply.</i></font>")
|
||||
to_chat(src, "<font color='blue'>Admin PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>")
|
||||
|
||||
//always play non-admin recipients the adminhelp sound
|
||||
C << 'sound/effects/adminhelp.ogg'
|
||||
@@ -172,20 +172,20 @@
|
||||
return
|
||||
|
||||
else //neither are admins
|
||||
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>")
|
||||
return
|
||||
|
||||
if(irc)
|
||||
log_admin_private("PM: [key_name(src)]->IRC: [rawmsg]")
|
||||
for(var/client/X in admins)
|
||||
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]->IRC:</B> \blue [keywordparsedmsg]</font>" //inform X
|
||||
to_chat(X, "<B><font color='blue'>PM: [key_name(src, X, 0)]->IRC:</B> \blue [keywordparsedmsg]</font>" )
|
||||
else
|
||||
window_flash(C, ignorepref = TRUE)
|
||||
log_admin_private("PM: [key_name(src)]->[key_name(C)]: [rawmsg]")
|
||||
//we don't use message_admins here because the sender/receiver might get it too
|
||||
for(var/client/X in admins)
|
||||
if(X.key!=key && X.key!=C.key) //check client/X is an admin and isn't the sender or recipient
|
||||
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [keywordparsedmsg]</font>" //inform X
|
||||
to_chat(X, "<B><font color='blue'>PM: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [keywordparsedmsg]</font>" )
|
||||
|
||||
|
||||
|
||||
@@ -211,9 +211,9 @@
|
||||
log_admin_private("IRC PM: [sender] -> [key_name(C)] : [msg]")
|
||||
msg = emoji_parse(msg)
|
||||
|
||||
C << "<font color='red' size='4'><b>-- Administrator private message --</b></font>"
|
||||
C << "<font color='red'>Admin PM from-<b><a href='?priv_msg=[stealthkey]'>[adminname]</A></b>: [msg]</font>"
|
||||
C << "<font color='red'><i>Click on the administrator's name to reply.</i></font>"
|
||||
to_chat(C, "<font color='red' size='4'><b>-- Administrator private message --</b></font>")
|
||||
to_chat(C, "<font color='red'>Admin PM from-<b><a href='?priv_msg=[stealthkey]'>[adminname]</A></b>: [msg]</font>")
|
||||
to_chat(C, "<font color='red'><i>Click on the administrator's name to reply.</i></font>")
|
||||
window_flash(C, ignorepref = TRUE)
|
||||
//always play non-admin recipients the adminhelp sound
|
||||
C << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
msg = keywords_lookup(msg)
|
||||
if(check_rights(R_ADMIN,0))
|
||||
msg = "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> (<a href='?_src_=holder;adminplayerobservefollow=\ref[mob]'>FLW</A>): <span class='message'>[msg]</span></span>"
|
||||
admins << msg
|
||||
to_chat(admins, msg)
|
||||
else
|
||||
msg = "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]:</EM> <span class='message'>[msg]</span></span>"
|
||||
admins << msg
|
||||
to_chat(admins, msg)
|
||||
|
||||
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -2,30 +2,30 @@
|
||||
set category = "Mapping"
|
||||
set name = "Check Plumbing"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
//all plumbing - yes, some things might get stated twice, doesn't matter.
|
||||
for (var/obj/machinery/atmospherics/plumbing in machines)
|
||||
if (plumbing.nodealert)
|
||||
usr << "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])"
|
||||
to_chat(usr, "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])")
|
||||
|
||||
//Manifolds
|
||||
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in machines)
|
||||
if (!pipe.NODE1 || !pipe.NODE2 || !pipe.NODE3)
|
||||
usr << "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])"
|
||||
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||
|
||||
//Pipes
|
||||
for (var/obj/machinery/atmospherics/pipe/simple/pipe in machines)
|
||||
if (!pipe.NODE1 || !pipe.NODE2)
|
||||
usr << "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])"
|
||||
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||
|
||||
/client/proc/powerdebug()
|
||||
set category = "Mapping"
|
||||
set name = "Check Power"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
if (!PN.nodes || !PN.nodes.len)
|
||||
if(PN.cables && (PN.cables.len > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
usr << "Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"
|
||||
to_chat(usr, "Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]")
|
||||
|
||||
if (!PN.cables || (PN.cables.len < 10))
|
||||
if(PN.cables && (PN.cables.len > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
usr << "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"
|
||||
to_chat(usr, "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]")
|
||||
@@ -8,7 +8,7 @@
|
||||
var/mob/living/target = M
|
||||
|
||||
if(!isliving(target))
|
||||
usr << "This can only be used on instances of type /mob/living"
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living")
|
||||
return
|
||||
|
||||
if(alert(usr, "Are you sure you wish to hit [key_name(target)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
|
||||
@@ -23,7 +23,7 @@
|
||||
else
|
||||
T.break_tile()
|
||||
|
||||
target << "<span class='userdanger'>You're hit by bluespace artillery!</span>"
|
||||
to_chat(target, "<span class='userdanger'>You're hit by bluespace artillery!</span>")
|
||||
log_admin("[key_name(target)] has been hit by Bluespace Artillery fired by [key_name(usr)]")
|
||||
message_admins("[ADMIN_LOOKUPFLW(target)] has been hit by Bluespace Artillery fired by [ADMIN_LOOKUPFLW(usr)]")
|
||||
|
||||
|
||||
@@ -116,45 +116,45 @@
|
||||
/datum/buildmode/proc/show_help(mob/user)
|
||||
switch(mode)
|
||||
if(BASIC_BUILDMODE)
|
||||
user << "\blue ***********************************************************"
|
||||
user << "\blue Left Mouse Button = Construct / Upgrade"
|
||||
user << "\blue Right Mouse Button = Deconstruct / Delete / Downgrade"
|
||||
user << "\blue Left Mouse Button + ctrl = R-Window"
|
||||
user << "\blue Left Mouse Button + alt = Airlock"
|
||||
user << ""
|
||||
user << "\blue Use the button in the upper left corner to"
|
||||
user << "\blue change the direction of built objects."
|
||||
user << "\blue ***********************************************************"
|
||||
to_chat(user, "\blue ***********************************************************")
|
||||
to_chat(user, "\blue Left Mouse Button = Construct / Upgrade")
|
||||
to_chat(user, "\blue Right Mouse Button = Deconstruct / Delete / Downgrade")
|
||||
to_chat(user, "\blue Left Mouse Button + ctrl = R-Window")
|
||||
to_chat(user, "\blue Left Mouse Button + alt = Airlock")
|
||||
to_chat(user, "")
|
||||
to_chat(user, "\blue Use the button in the upper left corner to")
|
||||
to_chat(user, "\blue change the direction of built objects.")
|
||||
to_chat(user, "\blue ***********************************************************")
|
||||
if(ADV_BUILDMODE)
|
||||
user << "\blue ***********************************************************"
|
||||
user << "\blue Right Mouse Button on buildmode button = Set object type"
|
||||
user << "\blue Left Mouse Button on turf/obj = Place objects"
|
||||
user << "\blue Right Mouse Button = Delete objects"
|
||||
user << ""
|
||||
user << "\blue Use the button in the upper left corner to"
|
||||
user << "\blue change the direction of built objects."
|
||||
user << "\blue ***********************************************************"
|
||||
to_chat(user, "\blue ***********************************************************")
|
||||
to_chat(user, "\blue Right Mouse Button on buildmode button = Set object type")
|
||||
to_chat(user, "\blue Left Mouse Button on turf/obj = Place objects")
|
||||
to_chat(user, "\blue Right Mouse Button = Delete objects")
|
||||
to_chat(user, "")
|
||||
to_chat(user, "\blue Use the button in the upper left corner to")
|
||||
to_chat(user, "\blue change the direction of built objects.")
|
||||
to_chat(user, "\blue ***********************************************************")
|
||||
if(VAR_BUILDMODE)
|
||||
user << "\blue ***********************************************************"
|
||||
user << "\blue Right Mouse Button on buildmode button = Select var(type) & value"
|
||||
user << "\blue Left Mouse Button on turf/obj/mob = Set var(type) & value"
|
||||
user << "\blue Right Mouse Button on turf/obj/mob = Reset var's value"
|
||||
user << "\blue ***********************************************************"
|
||||
to_chat(user, "\blue ***********************************************************")
|
||||
to_chat(user, "\blue Right Mouse Button on buildmode button = Select var(type) & value")
|
||||
to_chat(user, "\blue Left Mouse Button on turf/obj/mob = Set var(type) & value")
|
||||
to_chat(user, "\blue Right Mouse Button on turf/obj/mob = Reset var's value")
|
||||
to_chat(user, "\blue ***********************************************************")
|
||||
if(THROW_BUILDMODE)
|
||||
user << "\blue ***********************************************************"
|
||||
user << "\blue Left Mouse Button on turf/obj/mob = Select"
|
||||
user << "\blue Right Mouse Button on turf/obj/mob = Throw"
|
||||
user << "\blue ***********************************************************"
|
||||
to_chat(user, "\blue ***********************************************************")
|
||||
to_chat(user, "\blue Left Mouse Button on turf/obj/mob = Select")
|
||||
to_chat(user, "\blue Right Mouse Button on turf/obj/mob = Throw")
|
||||
to_chat(user, "\blue ***********************************************************")
|
||||
if(AREA_BUILDMODE)
|
||||
user << "\blue ***********************************************************"
|
||||
user << "\blue Left Mouse Button on turf/obj/mob = Select corner"
|
||||
user << "\blue Right Mouse Button on buildmode button = Select generator"
|
||||
user << "\blue ***********************************************************"
|
||||
to_chat(user, "\blue ***********************************************************")
|
||||
to_chat(user, "\blue Left Mouse Button on turf/obj/mob = Select corner")
|
||||
to_chat(user, "\blue Right Mouse Button on buildmode button = Select generator")
|
||||
to_chat(user, "\blue ***********************************************************")
|
||||
if(COPY_BUILDMODE)
|
||||
user << "\blue ***********************************************************"
|
||||
user << "\blue Left Mouse Button on obj/turf/mob = Spawn a Copy of selected target"
|
||||
user << "\blue Right Mouse Button on obj/mob = Select target to copy"
|
||||
user << "\blue ***********************************************************"
|
||||
to_chat(user, "\blue ***********************************************************")
|
||||
to_chat(user, "\blue Left Mouse Button on obj/turf/mob = Spawn a Copy of selected target")
|
||||
to_chat(user, "\blue Right Mouse Button on obj/mob = Select target to copy")
|
||||
to_chat(user, "\blue ***********************************************************")
|
||||
|
||||
/datum/buildmode/proc/change_settings(mob/user)
|
||||
switch(mode)
|
||||
@@ -284,7 +284,7 @@
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
||||
WIN.setDir(WEST)
|
||||
if(NORTHWEST)
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced/fulltile(get_turf(object))
|
||||
WIN.setDir(NORTHWEST)
|
||||
log_admin("Build Mode: [key_name(user)] built a window at ([object.x],[object.y],[object.z])")
|
||||
if(ADV_BUILDMODE)
|
||||
@@ -308,13 +308,13 @@
|
||||
log_admin("Build Mode: [key_name(user)] modified [object.name]'s [varholder] to [valueholder]")
|
||||
object.vars[varholder] = valueholder
|
||||
else
|
||||
user << "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>"
|
||||
to_chat(user, "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>")
|
||||
if(right_click)
|
||||
if(object.vars.Find(varholder))
|
||||
log_admin("Build Mode: [key_name(user)] modified [object.name]'s [varholder] to [valueholder]")
|
||||
object.vars[varholder] = initial(object.vars[varholder])
|
||||
else
|
||||
user << "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>"
|
||||
to_chat(user, "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>")
|
||||
|
||||
if(THROW_BUILDMODE)
|
||||
if(left_click)
|
||||
@@ -335,7 +335,7 @@
|
||||
if(left_click) //rectangular
|
||||
if(cornerA && cornerB)
|
||||
if(!generator_path)
|
||||
user << "<span class='warning'>Select generator type first.</span>"
|
||||
to_chat(user, "<span class='warning'>Select generator type first.</span>")
|
||||
var/datum/mapGenerator/G = new generator_path
|
||||
G.defineRegion(cornerA,cornerB,1)
|
||||
G.generate()
|
||||
@@ -352,4 +352,4 @@
|
||||
DuplicateObject(stored,perfectcopy=1,newloc=T)
|
||||
else if(right_click)
|
||||
if(ismovableatom(object)) // No copying turfs for now.
|
||||
stored = object
|
||||
stored = object
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite
|
||||
set hidden = 1
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
if(!src.mob)
|
||||
return
|
||||
if(prefs.muted & MUTE_DEADCHAT)
|
||||
src << "<span class='danger'>You cannot send DSAY messages (muted).</span>"
|
||||
to_chat(src, "<span class='danger'>You cannot send DSAY messages (muted).</span>")
|
||||
return
|
||||
|
||||
if (src.handle_spam_prevention(msg,MUTE_DEADCHAT))
|
||||
|
||||
@@ -53,12 +53,12 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
return
|
||||
|
||||
if(targetselected && !hascall(target,procname))
|
||||
usr << "<font color='red'>Error: callproc(): type [target.type] has no proc named [procname].</font>"
|
||||
to_chat(usr, "<font color='red'>Error: callproc(): type [target.type] has no proc named [procname].</font>")
|
||||
return
|
||||
else
|
||||
var/procpath = text2path(procname)
|
||||
if (!procpath)
|
||||
usr << "<font color='red'>Error: callproc(): proc [procname] does not exist. (Did you forget the /proc/ part?)</font>"
|
||||
to_chat(usr, "<font color='red'>Error: callproc(): proc [procname] does not exist. (Did you forget the /proc/ part?)</font>")
|
||||
return
|
||||
var/list/lst = get_callproc_args()
|
||||
if(!lst)
|
||||
@@ -66,7 +66,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
if(targetselected)
|
||||
if(!target)
|
||||
usr << "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>"
|
||||
to_chat(usr, "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>")
|
||||
return
|
||||
log_admin("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
message_admins("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
@@ -78,7 +78,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc
|
||||
. = get_callproc_returnval(returnval, procname)
|
||||
if(.)
|
||||
usr << .
|
||||
to_chat(usr, .)
|
||||
feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/callproc_datum(datum/A as null|area|mob|obj|turf)
|
||||
@@ -93,14 +93,14 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(!procname)
|
||||
return
|
||||
if(!hascall(A,procname))
|
||||
usr << "<font color='red'>Error: callproc_datum(): type [A.type] has no proc named [procname].</font>"
|
||||
to_chat(usr, "<font color='red'>Error: callproc_datum(): type [A.type] has no proc named [procname].</font>")
|
||||
return
|
||||
var/list/lst = get_callproc_args()
|
||||
if(!lst)
|
||||
return
|
||||
|
||||
if(!A || !IsValidSrc(A))
|
||||
usr << "<span class='warning'>Error: callproc_datum(): owner of proc no longer exists.</span>"
|
||||
to_chat(usr, "<span class='warning'>Error: callproc_datum(): owner of proc no longer exists.</span>")
|
||||
return
|
||||
log_admin("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
message_admins("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
@@ -109,7 +109,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
var/returnval = call(A,procname)(arglist(lst)) // Pass the lst as an argument list to the proc
|
||||
. = get_callproc_returnval(returnval,procname)
|
||||
if(.)
|
||||
usr << .
|
||||
to_chat(usr, .)
|
||||
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(id in hardcoded_gases || env_gases[id][MOLES])
|
||||
t+= "[env_gases[id][GAS_META][META_GAS_NAME]] : [env_gases[id][MOLES]]\n"
|
||||
|
||||
usr << t
|
||||
to_chat(usr, t)
|
||||
feedback_add_details("admin_verb","ASL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_robotize(mob/M in mob_list)
|
||||
@@ -507,33 +507,33 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
var/list/areas_without_intercom = areas_all - areas_with_intercom
|
||||
var/list/areas_without_camera = areas_all - areas_with_camera
|
||||
|
||||
world << "<b>AREAS WITHOUT AN APC:</b>"
|
||||
to_chat(world, "<b>AREAS WITHOUT AN APC:</b>")
|
||||
for(var/areatype in areas_without_APC)
|
||||
world << "* [areatype]"
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
world << "<b>AREAS WITHOUT AN AIR ALARM:</b>"
|
||||
to_chat(world, "<b>AREAS WITHOUT AN AIR ALARM:</b>")
|
||||
for(var/areatype in areas_without_air_alarm)
|
||||
world << "* [areatype]"
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
world << "<b>AREAS WITHOUT A REQUEST CONSOLE:</b>"
|
||||
to_chat(world, "<b>AREAS WITHOUT A REQUEST CONSOLE:</b>")
|
||||
for(var/areatype in areas_without_RC)
|
||||
world << "* [areatype]"
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
world << "<b>AREAS WITHOUT ANY LIGHTS:</b>"
|
||||
to_chat(world, "<b>AREAS WITHOUT ANY LIGHTS:</b>")
|
||||
for(var/areatype in areas_without_light)
|
||||
world << "* [areatype]"
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
world << "<b>AREAS WITHOUT A LIGHT SWITCH:</b>"
|
||||
to_chat(world, "<b>AREAS WITHOUT A LIGHT SWITCH:</b>")
|
||||
for(var/areatype in areas_without_LS)
|
||||
world << "* [areatype]"
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
world << "<b>AREAS WITHOUT ANY INTERCOMS:</b>"
|
||||
to_chat(world, "<b>AREAS WITHOUT ANY INTERCOMS:</b>")
|
||||
for(var/areatype in areas_without_intercom)
|
||||
world << "* [areatype]"
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
world << "<b>AREAS WITHOUT ANY CAMERAS:</b>"
|
||||
to_chat(world, "<b>AREAS WITHOUT ANY CAMERAS:</b>")
|
||||
for(var/areatype in areas_without_camera)
|
||||
world << "* [areatype]"
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
/client/proc/cmd_admin_dress(mob/living/carbon/human/M in mob_list)
|
||||
set category = "Fun"
|
||||
@@ -663,19 +663,19 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
|
||||
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients"))
|
||||
if("Players")
|
||||
usr << jointext(player_list,",")
|
||||
to_chat(usr, jointext(player_list,","))
|
||||
if("Admins")
|
||||
usr << jointext(admins,",")
|
||||
to_chat(usr, jointext(admins,","))
|
||||
if("Mobs")
|
||||
usr << jointext(mob_list,",")
|
||||
to_chat(usr, jointext(mob_list,","))
|
||||
if("Living Mobs")
|
||||
usr << jointext(living_mob_list,",")
|
||||
to_chat(usr, jointext(living_mob_list,","))
|
||||
if("Dead Mobs")
|
||||
usr << jointext(dead_mob_list,",")
|
||||
to_chat(usr, jointext(dead_mob_list,","))
|
||||
if("Clients")
|
||||
usr << jointext(clients,",")
|
||||
to_chat(usr, jointext(clients,","))
|
||||
if("Joined Clients")
|
||||
usr << jointext(joined_player_list,",")
|
||||
to_chat(usr, jointext(joined_player_list,","))
|
||||
|
||||
/client/proc/cmd_display_del_log()
|
||||
set category = "Debug"
|
||||
@@ -734,8 +734,8 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
if(istype(landmark))
|
||||
var/datum/map_template/ruin/template = landmark.ruin_template
|
||||
usr.forceMove(get_turf(landmark))
|
||||
usr << "<span class='name'>[template.name]</span>"
|
||||
usr << "<span class='italics'>[template.description]</span>"
|
||||
to_chat(usr, "<span class='name'>[template.name]</span>")
|
||||
to_chat(usr, "<span class='italics'>[template.description]</span>")
|
||||
|
||||
/client/proc/clear_dynamic_transit()
|
||||
set category = "Debug"
|
||||
@@ -771,4 +771,17 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
error_cache.show_to(src)
|
||||
error_cache.show_to(src)
|
||||
|
||||
/client/proc/pump_random_event()
|
||||
set category = "Debug"
|
||||
set name = "Pump Random Event"
|
||||
set desc = "Schedules the event subsystem to fire a new random event immediately. Some events may fire without notification."
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
SSevent.scheduled = world.time
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] pumped a random event.</span>")
|
||||
feedback_add_details("admin_verb","PRE")
|
||||
log_admin("[key_name(src)] pumped a random event.")
|
||||
@@ -13,9 +13,9 @@
|
||||
if(T.active_hotspot)
|
||||
burning = 1
|
||||
|
||||
usr << "<span class='adminnotice'>@[target.x],[target.y]: [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("\red BURNING"):(null)]</span>"
|
||||
to_chat(usr, "<span class='adminnotice'>@[target.x],[target.y]: [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("\red BURNING"):(null)]</span>")
|
||||
for(var/id in GM_gases)
|
||||
usr << "[GM_gases[id][GAS_META][META_GAS_NAME]]: [GM_gases[id][MOLES]]"
|
||||
to_chat(usr, "[GM_gases[id][GAS_META][META_GAS_NAME]]: [GM_gases[id][MOLES]]")
|
||||
feedback_add_details("admin_verb","DAST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/fix_next_move()
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/new_fps = round(input("Sets game frames-per-second. Can potentially break the game (default: [config.fps])","FPS", world.fps) as num|null)
|
||||
|
||||
if(new_fps <= 0)
|
||||
src << "<span class='danger'>Error: set_server_fps(): Invalid world.fps value. No changes made.</span>"
|
||||
to_chat(src, "<span class='danger'>Error: set_server_fps(): Invalid world.fps value. No changes made.</span>")
|
||||
return
|
||||
if(new_fps > config.fps*1.5)
|
||||
if(alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [config.fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm")
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
set category = null
|
||||
|
||||
if(!src.holder)
|
||||
src << "<font color='red'>Only Admins may use this command.</font>"
|
||||
to_chat(src, "<font color='red'>Only Admins may use this command.</font>")
|
||||
return
|
||||
|
||||
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in clients
|
||||
if(!istype(target,/client))
|
||||
src << "<font color='red'>Error: giveruntimelog(): Client not found.</font>"
|
||||
to_chat(src, "<font color='red'>Error: giveruntimelog(): Client not found.</font>")
|
||||
return
|
||||
|
||||
target.verbs |= /client/proc/getruntimelog
|
||||
target << "<font color='red'>You have been granted access to runtime logs. Please use them responsibly or risk being banned.</font>"
|
||||
to_chat(target, "<font color='red'>You have been granted access to runtime logs. Please use them responsibly or risk being banned.</font>")
|
||||
return
|
||||
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(src)] accessed file: [path]")
|
||||
src << ftp( file(path) )
|
||||
src << "Attempting to send file, this may take a fair few minutes if the file is very large."
|
||||
src << ftp(file(path))
|
||||
to_chat(src, "Attempting to send file, this may take a fair few minutes if the file is very large.")
|
||||
return
|
||||
|
||||
|
||||
@@ -72,8 +72,8 @@
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(src)] accessed file: [path]")
|
||||
src << ftp( file(path) )
|
||||
src << "Attempting to send file, this may take a fair few minutes if the file is very large."
|
||||
src << ftp(file(path))
|
||||
to_chat(src, "Attempting to send file, this may take a fair few minutes if the file is very large.")
|
||||
return
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
if(fexists("[diary]"))
|
||||
src << ftp(diary)
|
||||
else
|
||||
src << "<font color='red'>Server log not found, try using .getserverlog.</font>"
|
||||
to_chat(src, "<font color='red'>Server log not found, try using .getserverlog.</font>")
|
||||
return
|
||||
feedback_add_details("admin_verb","VTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
@@ -102,7 +102,7 @@
|
||||
if(fexists("[diaryofmeanpeople]"))
|
||||
src << ftp(diaryofmeanpeople)
|
||||
else
|
||||
src << "<font color='red'>Server attack log not found, try using .getserverlog.</font>"
|
||||
to_chat(src, "<font color='red'>Server attack log not found, try using .getserverlog.</font>")
|
||||
return
|
||||
feedback_add_details("admin_verb","SSAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/proc/show_individual_logging_panel(mob/M, type = INDIVIDUAL_ATTACK_LOG)
|
||||
if(!M || !ismob(M))
|
||||
return
|
||||
var/dat = "<center><a href='?_src_=holder;individuallog=\ref[M];log_type=[INDIVIDUAL_ATTACK_LOG]'>Attack log</a> | "
|
||||
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=[INDIVIDUAL_SAY_LOG]'>Say log</a> | "
|
||||
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=[INDIVIDUAL_EMOTE_LOG]'>Emote log</a> | "
|
||||
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=[INDIVIDUAL_OOC_LOG]'>OOC log</a> | "
|
||||
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=[INDIVIDUAL_SHOW_ALL_LOG]'>Show all</a> | "
|
||||
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=[type]'>Refresh</a></center>"
|
||||
|
||||
dat += "<hr style='background:#000000; border:0; height:1px'>"
|
||||
|
||||
|
||||
|
||||
if(type == INDIVIDUAL_SHOW_ALL_LOG)
|
||||
dat += "<center>Displaying all logs of [key_name(M)]</center><br><hr>"
|
||||
for(var/log_type in M.logging)
|
||||
dat += "<center>[log_type]</center><br>"
|
||||
for(var/entry in M.logging[log_type])
|
||||
dat += "<font size=2px>[entry]: [M.logging[log_type][entry]]</font><br>"
|
||||
dat += "<hr>"
|
||||
else
|
||||
dat += "<center>[type] of [key_name(M)]</center><br>"
|
||||
for(var/entry in M.logging[type])
|
||||
dat += "<font size=2px>[entry]: [M.logging[type][entry]]</font><hr>"
|
||||
|
||||
usr << browse(dat, "window=invidual_logging;size=600x480")
|
||||
@@ -21,7 +21,7 @@
|
||||
if(template.load(T, centered = TRUE))
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has placed a map template ([template.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a></span>")
|
||||
else
|
||||
usr << "Failed to place map"
|
||||
to_chat(usr, "Failed to place map")
|
||||
usr.client.images -= preview
|
||||
|
||||
/client/proc/map_template_upload()
|
||||
@@ -32,13 +32,13 @@
|
||||
if(!map)
|
||||
return
|
||||
if(copytext("[map]",-4) != ".dmm")
|
||||
usr << "Bad map file: [map]"
|
||||
to_chat(usr, "Bad map file: [map]")
|
||||
return
|
||||
|
||||
var/datum/map_template/M = new(map, "[map]")
|
||||
if(M.preload_size(map))
|
||||
usr << "Map template '[map]' ready to place ([M.width]x[M.height])"
|
||||
to_chat(usr, "Map template '[map]' ready to place ([M.width]x[M.height])")
|
||||
SSmapping.map_templates[M.name] = M
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has uploaded a map template ([map])</span>")
|
||||
else
|
||||
usr << "Map template '[map]' failed to load properly"
|
||||
to_chat(usr, "Map template '[map]' failed to load properly")
|
||||
|
||||
@@ -215,9 +215,9 @@ var/list/admin_verbs_debug_mapping = list(
|
||||
if(i*10+j <= atom_list.len)
|
||||
temp_atom = atom_list[i*10+j]
|
||||
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
|
||||
world << line*/
|
||||
to_chat(world, line)*/
|
||||
|
||||
world << "There are [count] objects of type [type_path] on z-level [num_level]"
|
||||
to_chat(world, "There are [count] objects of type [type_path] on z-level [num_level]")
|
||||
feedback_add_details("admin_verb","mOBJZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/count_objects_all()
|
||||
@@ -242,9 +242,9 @@ var/list/admin_verbs_debug_mapping = list(
|
||||
if(i*10+j <= atom_list.len)
|
||||
temp_atom = atom_list[i*10+j]
|
||||
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
|
||||
world << line*/
|
||||
to_chat(world, line)*/
|
||||
|
||||
world << "There are [count] objects of type [type_path] in the game world"
|
||||
to_chat(world, "There are [count] objects of type [type_path] in the game world")
|
||||
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
|
||||
@@ -7,27 +7,27 @@
|
||||
message_admins("[key_name_admin(usr)] is forcing a random map rotation.")
|
||||
log_admin("[key_name(usr)] is forcing a random map rotation.")
|
||||
ticker.maprotatechecked = 1
|
||||
maprotate()
|
||||
SSmapping.maprotate()
|
||||
|
||||
/client/proc/adminchangemap()
|
||||
set category = "Server"
|
||||
set name = "Change Map"
|
||||
var/list/maprotatechoices = list()
|
||||
for (var/map in config.maplist)
|
||||
var/datum/votablemap/VM = config.maplist[map]
|
||||
var/mapname = VM.friendlyname
|
||||
var/datum/map_config/VM = config.maplist[map]
|
||||
var/mapname = VM.map_name
|
||||
if (VM == config.defaultmap)
|
||||
mapname += " (Default)"
|
||||
|
||||
if (VM.minusers > 0 || VM.maxusers > 0)
|
||||
if (VM.config_min_users > 0 || VM.config_max_users > 0)
|
||||
mapname += " \["
|
||||
if (VM.minusers > 0)
|
||||
mapname += "[VM.minusers]"
|
||||
if (VM.config_min_users > 0)
|
||||
mapname += "[VM.config_min_users]"
|
||||
else
|
||||
mapname += "0"
|
||||
mapname += "-"
|
||||
if (VM.maxusers > 0)
|
||||
mapname += "[VM.maxusers]"
|
||||
if (VM.config_max_users > 0)
|
||||
mapname += "[VM.config_max_users]"
|
||||
else
|
||||
mapname += "inf"
|
||||
mapname += "\]"
|
||||
@@ -37,8 +37,8 @@
|
||||
if (!chosenmap)
|
||||
return
|
||||
ticker.maprotatechecked = 1
|
||||
var/datum/votablemap/VM = maprotatechoices[chosenmap]
|
||||
message_admins("[key_name_admin(usr)] is changing the map to [VM.name]([VM.friendlyname])")
|
||||
log_admin("[key_name(usr)] is changing the map to [VM.name]([VM.friendlyname])")
|
||||
if (changemap(VM) == 0)
|
||||
message_admins("[key_name_admin(usr)] has changed the map to [VM.name]([VM.friendlyname])")
|
||||
var/datum/map_config/VM = maprotatechoices[chosenmap]
|
||||
message_admins("[key_name_admin(usr)] is changing the map to [VM.map_name]")
|
||||
log_admin("[key_name(usr)] is changing the map to [VM.map_name]")
|
||||
if (SSmapping.changemap(VM) == 0)
|
||||
message_admins("[key_name_admin(usr)] has changed the map to [VM.map_name]")
|
||||
@@ -38,7 +38,7 @@
|
||||
var/var_value = O.vars[variable]
|
||||
|
||||
if(variable in VVckey_edit)
|
||||
src << "It's forbidden to mass-modify ckeys. It'll crash everyone's client you dummy."
|
||||
to_chat(src, "It's forbidden to mass-modify ckeys. It'll crash everyone's client you dummy.")
|
||||
return
|
||||
if(variable in VVlocked)
|
||||
if(!check_rights(R_DEBUG))
|
||||
@@ -56,11 +56,11 @@
|
||||
default = vv_get_class(var_value)
|
||||
|
||||
if(isnull(default))
|
||||
src << "Unable to determine variable type."
|
||||
to_chat(src, "Unable to determine variable type.")
|
||||
else
|
||||
src << "Variable appears to be <b>[uppertext(default)]</b>."
|
||||
to_chat(src, "Variable appears to be <b>[uppertext(default)]</b>.")
|
||||
|
||||
src << "Variable contains: [var_value]"
|
||||
to_chat(src, "Variable contains: [var_value]")
|
||||
|
||||
if(default == VV_NUM)
|
||||
var/dir_text = ""
|
||||
@@ -75,7 +75,7 @@
|
||||
dir_text += "WEST"
|
||||
|
||||
if(dir_text)
|
||||
src << "If a direction, direction is: [dir_text]"
|
||||
to_chat(src, "If a direction, direction is: [dir_text]")
|
||||
|
||||
var/value = vv_get_value(default_class = default)
|
||||
var/new_value = value["value"]
|
||||
@@ -97,9 +97,9 @@
|
||||
|
||||
switch(class)
|
||||
if(VV_RESTORE_DEFAULT)
|
||||
src << "Finding items..."
|
||||
to_chat(src, "Finding items...")
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
src << "Changing [items.len] items..."
|
||||
to_chat(src, "Changing [items.len] items...")
|
||||
for(var/thing in items)
|
||||
if (!thing)
|
||||
continue
|
||||
@@ -123,9 +123,9 @@
|
||||
for(var/V in varsvars)
|
||||
new_value = replacetext(new_value,"\[[V]]","[O.vars[V]]")
|
||||
|
||||
src << "Finding items..."
|
||||
to_chat(src, "Finding items...")
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
src << "Changing [items.len] items..."
|
||||
to_chat(src, "Changing [items.len] items...")
|
||||
for(var/thing in items)
|
||||
if (!thing)
|
||||
continue
|
||||
@@ -151,9 +151,9 @@
|
||||
many = FALSE
|
||||
|
||||
var/type = value["type"]
|
||||
src << "Finding items..."
|
||||
to_chat(src, "Finding items...")
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
src << "Changing [items.len] items..."
|
||||
to_chat(src, "Changing [items.len] items...")
|
||||
for(var/thing in items)
|
||||
if (!thing)
|
||||
continue
|
||||
@@ -169,9 +169,9 @@
|
||||
CHECK_TICK
|
||||
|
||||
else
|
||||
src << "Finding items..."
|
||||
to_chat(src, "Finding items...")
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
src << "Changing [items.len] items..."
|
||||
to_chat(src, "Changing [items.len] items...")
|
||||
for(var/thing in items)
|
||||
if (!thing)
|
||||
continue
|
||||
@@ -185,13 +185,13 @@
|
||||
|
||||
var/count = rejected+accepted
|
||||
if (!count)
|
||||
src << "No objects found"
|
||||
to_chat(src, "No objects found")
|
||||
return
|
||||
if (!accepted)
|
||||
src << "Every object rejected your edit"
|
||||
to_chat(src, "Every object rejected your edit")
|
||||
return
|
||||
if (rejected)
|
||||
src << "[rejected] out of [count] objects rejected your edit"
|
||||
to_chat(src, "[rejected] out of [count] objects rejected your edit")
|
||||
|
||||
log_world("### MassVarEdit by [src]: [O.type] (A/R [accepted]/[rejected]) [variable]=[html_encode("[O.vars[variable]]")]([list2params(value)])")
|
||||
log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]] ([accepted] objects modified)")
|
||||
|
||||
@@ -335,7 +335,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
L[var_value] = mod_list_add_ass(O) //hehe
|
||||
if (O)
|
||||
if (O.vv_edit_var(objectvar, L) == FALSE)
|
||||
src << "Your edit was rejected by the object."
|
||||
to_chat(src, "Your edit was rejected by the object.")
|
||||
return
|
||||
log_world("### ListVarEdit by [src]: [(O ? O.type : "/list")] [objectvar]: ADDED=[var_value]")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]")
|
||||
@@ -345,7 +345,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
if(!check_rights(R_VAREDIT))
|
||||
return
|
||||
if(!istype(L, /list))
|
||||
src << "Not a List."
|
||||
to_chat(src, "Not a List.")
|
||||
return
|
||||
|
||||
if(L.len > 1000)
|
||||
@@ -378,7 +378,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
L = L.Copy()
|
||||
listclearnulls(L)
|
||||
if (!O.vv_edit_var(objectvar, L))
|
||||
src << "Your edit was rejected by the object."
|
||||
to_chat(src, "Your edit was rejected by the object.")
|
||||
return
|
||||
log_world("### ListVarEdit by [src]: [O.type] [objectvar]: CLEAR NULLS")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: CLEAR NULLS")
|
||||
@@ -388,7 +388,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
if(variable == "(CLEAR DUPES)")
|
||||
L = uniqueList(L)
|
||||
if (!O.vv_edit_var(objectvar, L))
|
||||
src << "Your edit was rejected by the object."
|
||||
to_chat(src, "Your edit was rejected by the object.")
|
||||
return
|
||||
log_world("### ListVarEdit by [src]: [O.type] [objectvar]: CLEAR DUPES")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: CLEAR DUPES")
|
||||
@@ -398,7 +398,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
if(variable == "(SHUFFLE)")
|
||||
L = shuffle(L)
|
||||
if (!O.vv_edit_var(objectvar, L))
|
||||
src << "Your edit was rejected by the object."
|
||||
to_chat(src, "Your edit was rejected by the object.")
|
||||
return
|
||||
log_world("### ListVarEdit by [src]: [O.type] [objectvar]: SHUFFLE")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: SHUFFLE")
|
||||
@@ -427,9 +427,9 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
|
||||
default = vv_get_class(variable)
|
||||
|
||||
src << "Variable appears to be <b>[uppertext(default)]</b>."
|
||||
to_chat(src, "Variable appears to be <b>[uppertext(default)]</b>.")
|
||||
|
||||
src << "Variable contains: [L[index]]"
|
||||
to_chat(src, "Variable contains: [L[index]]")
|
||||
|
||||
if(default == VV_NUM)
|
||||
var/dir_text = ""
|
||||
@@ -444,7 +444,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
dir_text += "WEST"
|
||||
|
||||
if(dir_text)
|
||||
usr << "If a direction, direction is: [dir_text]"
|
||||
to_chat(usr, "If a direction, direction is: [dir_text]")
|
||||
|
||||
var/original_var
|
||||
if(assoc)
|
||||
@@ -475,7 +475,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
L.Cut(index, index+1)
|
||||
if (O)
|
||||
if (O.vv_edit_var(objectvar, L))
|
||||
src << "Your edit was rejected by the object."
|
||||
to_chat(src, "Your edit was rejected by the object.")
|
||||
return
|
||||
log_world("### ListVarEdit by [src]: [O.type] [objectvar]: REMOVED=[html_encode("[original_var]")]")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: REMOVED=[original_var]")
|
||||
@@ -494,7 +494,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
L[index] = new_var
|
||||
if (O)
|
||||
if (O.vv_edit_var(objectvar, L) == FALSE)
|
||||
src << "Your edit was rejected by the object."
|
||||
to_chat(src, "Your edit was rejected by the object.")
|
||||
return
|
||||
log_world("### ListVarEdit by [src]: [(O ? O.type : "/list")] [objectvar]: [original_var]=[new_var]")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: [original_var]=[new_var]")
|
||||
@@ -510,7 +510,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
|
||||
if(param_var_name)
|
||||
if(!param_var_name in O.vars)
|
||||
src << "A variable with this name ([param_var_name]) doesn't exist in this datum ([O])"
|
||||
to_chat(src, "A variable with this name ([param_var_name]) doesn't exist in this datum ([O])")
|
||||
return
|
||||
variable = param_var_name
|
||||
|
||||
@@ -547,11 +547,11 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
var/default = vv_get_class(var_value)
|
||||
|
||||
if(isnull(default))
|
||||
src << "Unable to determine variable type."
|
||||
to_chat(src, "Unable to determine variable type.")
|
||||
else
|
||||
src << "Variable appears to be <b>[uppertext(default)]</b>."
|
||||
to_chat(src, "Variable appears to be <b>[uppertext(default)]</b>.")
|
||||
|
||||
src << "Variable contains: [var_value]"
|
||||
to_chat(src, "Variable contains: [var_value]")
|
||||
|
||||
if(default == VV_NUM)
|
||||
var/dir_text = ""
|
||||
@@ -566,7 +566,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
dir_text += "WEST"
|
||||
|
||||
if(dir_text)
|
||||
src << "If a direction, direction is: [dir_text]"
|
||||
to_chat(src, "If a direction, direction is: [dir_text]")
|
||||
|
||||
if(autodetect_class && default != VV_NULL)
|
||||
if (default == VV_TEXT)
|
||||
@@ -603,7 +603,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
|
||||
|
||||
if (O.vv_edit_var(variable, var_new) == FALSE)
|
||||
src << "Your edit was rejected by the object."
|
||||
to_chat(src, "Your edit was rejected by the object.")
|
||||
return
|
||||
log_world("### VarEdit by [src]: [O.type] [variable]=[html_encode("[O.vars[variable]]")]")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [variable] to [O.vars[variable]]")
|
||||
|
||||
@@ -199,9 +199,9 @@
|
||||
|
||||
for(var/i = 0, i<numCultists, i++)
|
||||
H = pick(candidates)
|
||||
H << "<span class='heavy_brass'>The world before you suddenly glows a brilliant yellow. You hear the whooshing steam and clanking cogs of a billion billion machines, and all at once \
|
||||
to_chat(H, "<span class='heavy_brass'>The world before you suddenly glows a brilliant yellow. You hear the whooshing steam and clanking cogs of a billion billion machines, and all at once \
|
||||
you see the truth. Ratvar, the Clockwork Justiciar, lies derelict and forgotten in an unseen realm, and he has selected you as one of his harbringers. You are now a servant of \
|
||||
Ratvar, and you will bring him back.</span>"
|
||||
Ratvar, and you will bring him back.</span>")
|
||||
add_servant_of_ratvar(H, TRUE)
|
||||
ticker.mode.equip_servant(H)
|
||||
candidates.Remove(H)
|
||||
@@ -331,14 +331,14 @@
|
||||
Commando.mind.objectives += missionobj
|
||||
|
||||
//Greet the commando
|
||||
Commando << "<B><font size=3 color=red>You are the [numagents==1?"Deathsquad Officer":"Death Commando"].</font></B>"
|
||||
to_chat(Commando, "<B><font size=3 color=red>You are the [numagents==1?"Deathsquad Officer":"Death Commando"].</font></B>")
|
||||
var/missiondesc = "Your squad is being sent on a mission to [station_name()] by Nanotrasen's Security Division."
|
||||
if(numagents == 1) //If Squad Leader
|
||||
missiondesc += " Lead your squad to ensure the completion of the mission. Board the shuttle when your team is ready."
|
||||
else
|
||||
missiondesc += " Follow orders given to you by your squad leader."
|
||||
missiondesc += "<BR><B>Your Mission</B>: [mission]"
|
||||
Commando << missiondesc
|
||||
to_chat(Commando, missiondesc)
|
||||
|
||||
if(config.enforce_human_authority)
|
||||
Commando.set_species(/datum/species/human)
|
||||
@@ -423,8 +423,8 @@
|
||||
newmob.set_species(/datum/species/human)
|
||||
|
||||
//Greet the official
|
||||
newmob << "<B><font size=3 color=red>You are a Centcom Official.</font></B>"
|
||||
newmob << "<BR>Central Command is sending you to [station_name()] with the task: [mission]"
|
||||
to_chat(newmob, "<B><font size=3 color=red>You are a Centcom Official.</font></B>")
|
||||
to_chat(newmob, "<BR>Central Command is sending you to [station_name()] with the task: [mission]")
|
||||
|
||||
//Logging and cleanup
|
||||
message_admins("Centcom Official [key_name_admin(newmob)] has spawned with the task: [mission]")
|
||||
@@ -520,14 +520,14 @@
|
||||
ERTOperative.mind.objectives += missionobj
|
||||
|
||||
//Greet the commando
|
||||
ERTOperative << "<B><font size=3 color=red>You are [numagents==1?"the Emergency Response Team Commander":"an Emergency Response Officer"].</font></B>"
|
||||
to_chat(ERTOperative, "<B><font size=3 color=red>You are [numagents==1?"the Emergency Response Team Commander":"an Emergency Response Officer"].</font></B>")
|
||||
var/missiondesc = "Your squad is being sent on a Code [alert] mission to [station_name()] by Nanotrasen's Security Division."
|
||||
if(numagents == 1) //If Squad Leader
|
||||
missiondesc += " Lead your squad to ensure the completion of the mission. Avoid civilian casualites when possible. Board the shuttle when your team is ready."
|
||||
else
|
||||
missiondesc += " Follow orders given to you by your commander. Avoid civilian casualites when possible."
|
||||
missiondesc += "<BR><B>Your Mission</B>: [mission]"
|
||||
ERTOperative << missiondesc
|
||||
to_chat(ERTOperative, missiondesc)
|
||||
|
||||
if(config.enforce_human_authority)
|
||||
ERTOperative.set_species(/datum/species/human)
|
||||
|
||||
@@ -75,8 +75,8 @@ var/highlander = FALSE
|
||||
antiwelder.icon_state = "bloodhand_right"
|
||||
put_in_hands(antiwelder)
|
||||
|
||||
src << "<span class='boldannounce'>Your [H1.name] cries out for blood. Claim the lives of others, and your own will be restored!\n\
|
||||
Activate it in your hand, and it will lead to the nearest target. Attack the nuclear authentication disk with it, and you will store it.</span>"
|
||||
to_chat(src, "<span class='boldannounce'>Your [H1.name] cries out for blood. Claim the lives of others, and your own will be restored!\n\
|
||||
Activate it in your hand, and it will lead to the nearest target. Attack the nuclear authentication disk with it, and you will store it.</span>")
|
||||
|
||||
/proc/only_me()
|
||||
if(!ticker || !ticker.mode)
|
||||
@@ -94,7 +94,7 @@ var/highlander = FALSE
|
||||
hijack_objective.owner = H.mind
|
||||
H.mind.objectives += hijack_objective
|
||||
|
||||
H << "<B>You are the multiverse summoner. Activate your blade to summon copies of yourself from another universe to fight by your side.</B>"
|
||||
to_chat(H, "<B>You are the multiverse summoner. Activate your blade to summon copies of yourself from another universe to fight by your side.</B>")
|
||||
H.mind.announce_objectives()
|
||||
|
||||
var/datum/gang/multiverse/G = new(src, "[H.real_name]")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set category = "Server"
|
||||
set name = "Toggle Panic Bunker"
|
||||
if (!config.sql_enabled)
|
||||
usr << "<span class='adminnotice'>The Database is not enabled!</span>"
|
||||
to_chat(usr, "<span class='adminnotice'>The Database is not enabled!</span>")
|
||||
return
|
||||
|
||||
config.panic_bunker = (!config.panic_bunker)
|
||||
|
||||
@@ -13,7 +13,7 @@ var/sound/admin_sound
|
||||
var/freq = 1
|
||||
if(SSevent.holidays && SSevent.holidays[APRIL_FOOLS])
|
||||
freq = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5)
|
||||
src << "You feel the Honkmother messing with your song..."
|
||||
to_chat(src, "You feel the Honkmother messing with your song...")
|
||||
|
||||
var/sound/admin_sound = new()
|
||||
admin_sound.file = S
|
||||
@@ -23,11 +23,11 @@ var/sound/admin_sound
|
||||
admin_sound.wait = 1
|
||||
admin_sound.repeat = 0
|
||||
admin_sound.status = SOUND_STREAM
|
||||
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client.prefs.toggles & SOUND_MIDI)
|
||||
M << admin_sound
|
||||
|
||||
|
||||
feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
if(istype(O,/obj/singularity))
|
||||
if(config.forbid_singulo_possession)
|
||||
usr << "It is forbidden to possess singularities."
|
||||
to_chat(usr, "It is forbidden to possess singularities.")
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(O)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set name = "Pray"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
@@ -12,7 +12,7 @@
|
||||
log_prayer("[src.key]/([src.name]): [msg]")
|
||||
if(usr.client)
|
||||
if(usr.client.prefs.muted & MUTE_PRAY)
|
||||
usr << "<span class='danger'>You cannot pray (muted).</span>"
|
||||
to_chat(usr, "<span class='danger'>You cannot pray (muted).</span>")
|
||||
return
|
||||
if(src.client.handle_spam_prevention(msg,MUTE_PRAY))
|
||||
return
|
||||
@@ -37,11 +37,11 @@
|
||||
|
||||
for(var/client/C in admins)
|
||||
if(C.prefs.chat_toggles & CHAT_PRAYER)
|
||||
C << msg
|
||||
to_chat(C, msg)
|
||||
if(C.prefs.toggles & SOUND_PRAYERS)
|
||||
if(usr.job == "Chaplain")
|
||||
C << 'sound/effects/pray.ogg'
|
||||
usr << "Your prayers have been received by the gods."
|
||||
to_chat(usr, "Your prayers have been received by the gods.")
|
||||
|
||||
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
@@ -53,7 +53,7 @@
|
||||
[ADMIN_FULLMONTY(Sender)] [ADMIN_BSA(Sender)] \
|
||||
[ADMIN_CENTCOM_REPLY(Sender)]:</b> \
|
||||
[msg]</span>"
|
||||
admins << msg
|
||||
to_chat(admins, msg)
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
C.overrideCooldown()
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
[ADMIN_FULLMONTY(Sender)] [ADMIN_BSA(Sender)] \
|
||||
[ADMIN_SYNDICATE_REPLY(Sender)]:</b> \
|
||||
[msg]</span>"
|
||||
admins << msg
|
||||
to_chat(admins, msg)
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
C.overrideCooldown()
|
||||
|
||||
@@ -76,6 +76,6 @@
|
||||
[ADMIN_CENTCOM_REPLY(Sender)] \
|
||||
[ADMIN_SET_SD_CODE]:</b> \
|
||||
[msg]</span>"
|
||||
admins << msg
|
||||
to_chat(admins, msg)
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
C.overrideCooldown()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set category = null
|
||||
set name = "Drop Everything"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No")
|
||||
@@ -26,7 +26,7 @@
|
||||
if(!ismob(M))
|
||||
return
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(src)] has started answering [key_name(M.key, 0, 0)]'s prayer.")
|
||||
@@ -38,7 +38,7 @@
|
||||
if(usr)
|
||||
if (usr.client)
|
||||
if(usr.client.holder)
|
||||
M << "<i>You hear a voice in your head... <b>[msg]</i></b>"
|
||||
to_chat(M, "<i>You hear a voice in your head... <b>[msg]</i></b>")
|
||||
|
||||
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
|
||||
message_admins("<span class='adminnotice'><b> SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]</span>")
|
||||
@@ -49,14 +49,14 @@
|
||||
set name = "Global Narrate"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
world << "[msg]"
|
||||
to_chat(world, "[msg]")
|
||||
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] Sent a global narrate</span>")
|
||||
feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -66,7 +66,7 @@
|
||||
set name = "Direct Narrate"
|
||||
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(!M)
|
||||
@@ -80,7 +80,7 @@
|
||||
if( !msg )
|
||||
return
|
||||
|
||||
M << msg
|
||||
to_chat(M, msg)
|
||||
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
|
||||
message_admins("<span class='adminnotice'><b> DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]):</b> [msg]<BR></span>")
|
||||
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -90,7 +90,7 @@
|
||||
set name = "Local Narrate"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
if(!A)
|
||||
return
|
||||
@@ -101,7 +101,7 @@
|
||||
if (!msg)
|
||||
return
|
||||
for(var/mob/M in view(range,A))
|
||||
M << msg
|
||||
to_chat(M, msg)
|
||||
|
||||
log_admin("LocalNarrate: [key_name(usr)] at ([get_area(A)]): [msg]")
|
||||
message_admins("<span class='adminnotice'><b> LocalNarrate: [key_name_admin(usr)] at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[A.x];Y=[A.y];Z=[A.z]'>[get_area(A)]</a>):</b> [msg]<BR></span>")
|
||||
@@ -111,10 +111,10 @@
|
||||
set category = "Special Verbs"
|
||||
set name = "Godmode"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
M.status_flags ^= GODMODE
|
||||
usr << "<span class='adminnotice'>Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]</span>"
|
||||
to_chat(usr, "<span class='adminnotice'>Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]</span>")
|
||||
|
||||
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
|
||||
message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
|
||||
@@ -172,7 +172,7 @@
|
||||
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(whom)] from [mute_string]")
|
||||
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(whom)] from [mute_string].")
|
||||
if(C)
|
||||
C << "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."
|
||||
to_chat(C, "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.")
|
||||
feedback_add_details("admin_verb","AUTOMUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
log_admin("[key_name(usr)] has [muteunmute] [key_name(whom)] from [mute_string]")
|
||||
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(whom)] from [mute_string].")
|
||||
if(C)
|
||||
C << "You have been [muteunmute] from [mute_string] by [key_name(usr, include_name = FALSE)]."
|
||||
to_chat(C, "You have been [muteunmute] from [mute_string] by [key_name(usr, include_name = FALSE)].")
|
||||
feedback_add_details("admin_verb","MUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
if(candidates.len)
|
||||
ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
|
||||
else
|
||||
usr << "<font color='red'>Error: create_xeno(): no suitable candidates.</font>"
|
||||
to_chat(usr, "<font color='red'>Error: create_xeno(): no suitable candidates.</font>")
|
||||
if(!istext(ckey))
|
||||
return 0
|
||||
|
||||
@@ -244,7 +244,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Respawn Character"
|
||||
set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into."
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", ""))
|
||||
if(!input)
|
||||
@@ -257,7 +257,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
break
|
||||
|
||||
if(!G_found)//If a ghost was not found.
|
||||
usr << "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>"
|
||||
to_chat(usr, "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>")
|
||||
return
|
||||
|
||||
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
|
||||
@@ -289,7 +289,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
//Now to give them their mind back.
|
||||
G_found.mind.transfer_to(new_xeno) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
||||
new_xeno.key = G_found.key
|
||||
new_xeno << "You have been fully respawned. Enjoy the game."
|
||||
to_chat(new_xeno, "You have been fully respawned. Enjoy the game.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno.</span>")
|
||||
return //all done. The ghost is auto-deleted
|
||||
|
||||
@@ -299,7 +299,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
var/mob/living/carbon/monkey/new_monkey = new(pick(latejoin))
|
||||
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
||||
new_monkey.key = G_found.key
|
||||
new_monkey << "You have been fully respawned. Enjoy the game."
|
||||
to_chat(new_monkey, "You have been fully respawned. Enjoy the game.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has respawned [new_monkey.key] as a filthy xeno.</span>")
|
||||
return //all done. The ghost is auto-deleted
|
||||
|
||||
@@ -395,11 +395,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
data_core.manifest_inject(new_character)
|
||||
|
||||
if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
|
||||
call(/mob/new_player/proc/AnnounceArrival)(new_character, new_character.mind.assigned_role)
|
||||
AnnounceArrival(new_character, new_character.mind.assigned_role)
|
||||
|
||||
message_admins("<span class='adminnotice'>[admin] has respawned [player_key] as [new_character.real_name].</span>")
|
||||
|
||||
new_character << "You have been fully respawned. Enjoy the game."
|
||||
to_chat(new_character, "You have been fully respawned. Enjoy the game.")
|
||||
|
||||
feedback_add_details("admin_verb","RSPCH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return new_character
|
||||
@@ -408,7 +408,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Fun"
|
||||
set name = "Add Custom AI law"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
|
||||
if(!input)
|
||||
@@ -430,7 +430,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Special Verbs"
|
||||
set name = "Rejuvenate"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
if(!mob)
|
||||
return
|
||||
@@ -447,19 +447,19 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Special Verbs"
|
||||
set name = "Create Command Report"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "Do you want to announce the contents of the report to the crew?", "Announce", "Yes", "No")
|
||||
var/announce_command_report = TRUE
|
||||
if(confirm == "Yes")
|
||||
priority_announce(input, null, 'sound/AI/commandreport.ogg')
|
||||
else
|
||||
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", 'sound/AI/commandreport.ogg')
|
||||
announce_command_report = FALSE
|
||||
|
||||
print_command_report(input,"[confirm=="Yes" ? "" : "Classified "][command_name()] Update")
|
||||
print_command_report(input,"[confirm=="Yes" ? "" : "Classified "][command_name()] Update",announce=announce_command_report)
|
||||
|
||||
log_admin("[key_name(src)] has created a command report: [input]")
|
||||
message_admins("[key_name_admin(src)] has created a command report")
|
||||
@@ -469,7 +469,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Special Verbs"
|
||||
set name = "Change Command Name"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/input = input(usr, "Please input a new name for Central Command.", "What?", "") as text|null
|
||||
if(!input)
|
||||
@@ -483,7 +483,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Delete"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if (alert(src, "Are you sure you want to delete:\n[O]\nat ([O.x], [O.y], [O.z])?", "Confirmation", "Yes", "No") == "Yes")
|
||||
@@ -501,17 +501,17 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Manage Job Slots"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
holder.manage_free_slots()
|
||||
feedback_add_details("admin_verb","MFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world)
|
||||
set category = "Dangerous"
|
||||
set category = "Special Verbs"
|
||||
set name = "Explosion"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
|
||||
@@ -539,11 +539,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
|
||||
/client/proc/cmd_admin_emp(atom/O as obj|mob|turf in world)
|
||||
set category = "Dangerous"
|
||||
set category = "Special Verbs"
|
||||
set name = "EM Pulse"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
|
||||
@@ -567,7 +567,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Gib"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "Drop a brain?", "Confirm", "Yes", "No","Cancel")
|
||||
@@ -606,7 +606,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
var/list/L = M.get_contents()
|
||||
for(var/t in L)
|
||||
usr << "[t]"
|
||||
to_chat(usr, "[t]")
|
||||
feedback_add_details("admin_verb","CC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggle_view_range()
|
||||
@@ -633,7 +633,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
@@ -664,29 +664,19 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
return
|
||||
|
||||
/client/proc/cmd_admin_attack_log(mob/M in mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Attack Log"
|
||||
|
||||
usr << "<span class='boldannounce'>Attack Log for [mob]</span>"
|
||||
for(var/t in M.attack_log)
|
||||
usr << t
|
||||
feedback_add_details("admin_verb","ATTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/everyone_random()
|
||||
set category = "Dangerous"
|
||||
set category = "Fun"
|
||||
set name = "Make Everyone Random"
|
||||
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
usr << "Nope you can't do this, the game's already started. This only works before rounds!"
|
||||
to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!")
|
||||
return
|
||||
|
||||
if(config.force_random_names)
|
||||
config.force_random_names = 0
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.")
|
||||
usr << "Disabled."
|
||||
to_chat(usr, "Disabled.")
|
||||
return
|
||||
|
||||
|
||||
@@ -698,9 +688,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.")
|
||||
|
||||
if(notifyplayers == "Yes")
|
||||
world << "<span class='adminnotice'>Admin [usr.key] has forced the players to have completely random identities!</span>"
|
||||
to_chat(world, "<span class='adminnotice'>Admin [usr.key] has forced the players to have completely random identities!</span>")
|
||||
|
||||
usr << "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>."
|
||||
to_chat(usr, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.")
|
||||
|
||||
config.force_random_names = 1
|
||||
feedback_add_details("admin_verb","MER") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -712,11 +702,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off"
|
||||
if(!config.allow_random_events)
|
||||
config.allow_random_events = 1
|
||||
usr << "Random events enabled"
|
||||
to_chat(usr, "Random events enabled")
|
||||
message_admins("Admin [key_name_admin(usr)] has enabled random events.")
|
||||
else
|
||||
config.allow_random_events = 0
|
||||
usr << "Random events disabled"
|
||||
to_chat(usr, "Random events disabled")
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled random events.")
|
||||
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -727,7 +717,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set desc = "Changes the security level. Announcement only, i.e. setting to Delta won't activate nuke"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/level = input("Select security level to change to","Set Security Level") as null|anything in list("green","blue","red","delta")
|
||||
@@ -740,7 +730,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in nuke_list)
|
||||
set name = "Toggle Nuke"
|
||||
set category = "Dangerous"
|
||||
set category = "Fun"
|
||||
set popup_menu = 0
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
@@ -757,24 +747,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [ADMIN_COORDJMP(N)].")
|
||||
feedback_add_details("admin_verb","TN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/reset_latejoin_spawns()
|
||||
set category = "Debug"
|
||||
set name = "Remove Latejoin Spawns"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/confirm = alert(src, "Disable Latejoin spawns??", "Message", "Yes", "No")
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
latejoin.Cut()
|
||||
|
||||
log_admin("[key_name(usr)] removed latejoin spawnpoints.")
|
||||
message_admins("[key_name_admin(usr)] removed latejoin spawnpoints.")
|
||||
|
||||
|
||||
|
||||
|
||||
var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
|
||||
/client/proc/create_outfits()
|
||||
@@ -969,7 +941,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
var/datum/atom_hud/antag/H = G.ganghud
|
||||
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
|
||||
|
||||
usr << "You toggled your admin antag HUD [adding_hud ? "ON" : "OFF"]."
|
||||
to_chat(usr, "You toggled your admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
||||
message_admins("[key_name_admin(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
||||
log_admin("[key_name(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
||||
feedback_add_details("admin_verb","TAH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -983,7 +955,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
M.ui_interact(usr)
|
||||
|
||||
/client/proc/mass_zombie_infection()
|
||||
set category = "Dangerous"
|
||||
set category = "Fun"
|
||||
set name = "Mass Zombie Infection"
|
||||
set desc = "Infects all humans with a latent organ that will zombify \
|
||||
them on death."
|
||||
@@ -1003,7 +975,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
feedback_add_details("admin_verb","MZI")
|
||||
|
||||
/client/proc/mass_zombie_cure()
|
||||
set category = "Dangerous"
|
||||
set category = "Fun"
|
||||
set name = "Mass Zombie Cure"
|
||||
set desc = "Removes the zombie infection from all humans, returning them to normal."
|
||||
if(!holder)
|
||||
@@ -1021,7 +993,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
feedback_add_details("admin_verb","MZC")
|
||||
|
||||
/client/proc/polymorph_all()
|
||||
set category = "Dangerous"
|
||||
set category = "Fun"
|
||||
set name = "Polymorph All"
|
||||
set desc = "Applies the effects of the bolt of change to every single mob."
|
||||
|
||||
@@ -1109,7 +1081,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
return
|
||||
if(ON_PURRBATION(H))
|
||||
return
|
||||
H << "Something is nya~t right."
|
||||
to_chat(H, "Something is nya~t right.")
|
||||
H.dna.features["tail_human"] = "Cat"
|
||||
H.dna.features["ears"] = "Cat"
|
||||
H.regenerate_icons()
|
||||
@@ -1120,7 +1092,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
return
|
||||
if(!ON_PURRBATION(H))
|
||||
return
|
||||
H << "You are no longer a cat."
|
||||
to_chat(H, "You are no longer a cat.")
|
||||
H.dna.features["tail_human"] = "None"
|
||||
H.dna.features["ears"] = "None"
|
||||
H.regenerate_icons()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set category = "Special Verbs"
|
||||
set name = "Reestablish DB Connection"
|
||||
if (!config.sql_enabled)
|
||||
usr << "<span class='adminnotice'>The Database is not enabled!</span>"
|
||||
to_chat(usr, "<span class='adminnotice'>The Database is not enabled!</span>")
|
||||
return
|
||||
|
||||
if (dbcon && dbcon.IsConnected())
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
set name = "Create AI Triumvirate"
|
||||
|
||||
if(ticker.current_state > GAME_STATE_PREGAME)
|
||||
usr << "This option is currently only usable during pregame. This may change at a later date."
|
||||
to_chat(usr, "This option is currently only usable during pregame. This may change at a later date.")
|
||||
return
|
||||
|
||||
var/datum/job/job = SSjob.GetJob("AI")
|
||||
if(!job)
|
||||
usr << "Unable to locate the AI job"
|
||||
to_chat(usr, "Unable to locate the AI job")
|
||||
return
|
||||
if(ticker.triai)
|
||||
ticker.triai = 0
|
||||
usr << "Only one AI will be spawned at round start."
|
||||
to_chat(usr, "Only one AI will be spawned at round start.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has toggled off triple AIs at round start.</span>")
|
||||
else
|
||||
ticker.triai = 1
|
||||
usr << "There will be an AI Triumvirate at round start."
|
||||
to_chat(usr, "There will be an AI Triumvirate at round start.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has toggled on triple AIs at round start.</span>")
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/obj/item/device/assembly/proc/is_secured(mob/user)
|
||||
if(!secured)
|
||||
user << "<span class='warning'>The [name] is unsecured!</span>"
|
||||
to_chat(user, "<span class='warning'>The [name] is unsecured!</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -87,15 +87,15 @@
|
||||
if((!A.secured) && (!secured))
|
||||
holder = new/obj/item/device/assembly_holder(get_turf(src))
|
||||
holder.assemble(src,A,user)
|
||||
user << "<span class='notice'>You attach and secure \the [A] to \the [src]!</span>"
|
||||
to_chat(user, "<span class='notice'>You attach and secure \the [A] to \the [src]!</span>")
|
||||
else
|
||||
user << "<span class='warning'>Both devices must be in attachable mode to be attached together.</span>"
|
||||
to_chat(user, "<span class='warning'>Both devices must be in attachable mode to be attached together.</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(toggle_secure())
|
||||
user << "<span class='notice'>\The [src] is ready!</span>"
|
||||
to_chat(user, "<span class='notice'>\The [src] is ready!</span>")
|
||||
else
|
||||
user << "<span class='notice'>\The [src] can now be attached!</span>"
|
||||
to_chat(user, "<span class='notice'>\The [src] can now be attached!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -103,9 +103,9 @@
|
||||
/obj/item/device/assembly/examine(mob/user)
|
||||
..()
|
||||
if(secured)
|
||||
user << "\The [src] is secured and ready to be used."
|
||||
to_chat(user, "\The [src] is secured and ready to be used.")
|
||||
else
|
||||
user << "\The [src] can be attached to other things."
|
||||
to_chat(user, "\The [src] can be attached to other things.")
|
||||
|
||||
|
||||
/obj/item/device/assembly/attack_self(mob/user)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/wrench) && !status) //This is basically bomb assembly code inverted. apparently it works.
|
||||
|
||||
user << "<span class='notice'>You disassemble [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You disassemble [src].</span>")
|
||||
|
||||
bombassembly.loc = user.loc
|
||||
bombassembly.master = null
|
||||
@@ -47,11 +47,11 @@
|
||||
status = 1
|
||||
bombers += "[key_name(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
|
||||
message_admins("[key_name_admin(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]")
|
||||
user << "<span class='notice'>A pressure hole has been bored to [bombtank] valve. \The [bombtank] can now be ignited.</span>"
|
||||
to_chat(user, "<span class='notice'>A pressure hole has been bored to [bombtank] valve. \The [bombtank] can now be ignited.</span>")
|
||||
else
|
||||
status = 0
|
||||
bombers += "[key_name(user)] unwelded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
|
||||
user << "<span class='notice'>The hole has been closed.</span>"
|
||||
to_chat(user, "<span class='notice'>The hole has been closed.</span>")
|
||||
add_fingerprint(user)
|
||||
..()
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/item/device/assembly/control/examine(mob/user)
|
||||
..()
|
||||
if(id)
|
||||
user << "<span class='notice'>Its channel ID is '[id]'.</span>"
|
||||
to_chat(user, "<span class='notice'>Its channel ID is '[id]'.</span>")
|
||||
|
||||
|
||||
/obj/item/device/assembly/control/activate()
|
||||
|
||||
@@ -92,12 +92,12 @@
|
||||
terrible_conversion_proc(M, user)
|
||||
M.Weaken(rand(4,6))
|
||||
visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
|
||||
user << "<span class='danger'>You blind [M] with the flash!</span>"
|
||||
M << "<span class='userdanger'>[user] blinds you with the flash!</span>"
|
||||
to_chat(user, "<span class='danger'>You blind [M] with the flash!</span>")
|
||||
to_chat(M, "<span class='userdanger'>[user] blinds you with the flash!</span>")
|
||||
else
|
||||
visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
|
||||
user << "<span class='warning'>You fail to blind [M] with the flash!</span>"
|
||||
M << "<span class='danger'>[user] fails to blind you with the flash!</span>"
|
||||
to_chat(user, "<span class='warning'>You fail to blind [M] with the flash!</span>")
|
||||
to_chat(M, "<span class='danger'>[user] fails to blind you with the flash!</span>")
|
||||
else
|
||||
if(M.flash_act())
|
||||
M.confused += power
|
||||
@@ -160,11 +160,11 @@
|
||||
resisted = 1
|
||||
|
||||
if(resisted)
|
||||
user << "<span class='warning'>This mind seems resistant to the flash!</span>"
|
||||
to_chat(user, "<span class='warning'>This mind seems resistant to the flash!</span>")
|
||||
else
|
||||
user << "<span class='warning'>They must be conscious before you can convert them!</span>"
|
||||
to_chat(user, "<span class='warning'>They must be conscious before you can convert them!</span>")
|
||||
else
|
||||
user << "<span class='warning'>This mind is so vacant that it is not susceptible to influence!</span>"
|
||||
to_chat(user, "<span class='warning'>This mind is so vacant that it is not susceptible to influence!</span>")
|
||||
|
||||
|
||||
/obj/item/device/assembly/flash/cyborg
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
/obj/item/device/assembly/flash/armimplant/burn_out()
|
||||
if(I && I.owner)
|
||||
I.owner << "<span class='warning'>Your photon projector implant overheats and deactivates!</span>"
|
||||
to_chat(I.owner, "<span class='warning'>Your photon projector implant overheats and deactivates!</span>")
|
||||
I.Retract()
|
||||
overheat = FALSE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), flashcd * 2)
|
||||
@@ -207,7 +207,7 @@
|
||||
/obj/item/device/assembly/flash/armimplant/try_use_flash(mob/user = null)
|
||||
if(overheat)
|
||||
if(I && I.owner)
|
||||
I.owner << "<span class='warning'>Your photon projector is running too hot to be used again so quickly!</span>"
|
||||
to_chat(I.owner, "<span class='warning'>Your photon projector is running too hot to be used again so quickly!</span>")
|
||||
return FALSE
|
||||
overheat = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), flashcd)
|
||||
@@ -247,10 +247,10 @@
|
||||
if(istype(W, /obj/item/device/assembly/flash/handheld))
|
||||
var/obj/item/device/assembly/flash/handheld/flash = W
|
||||
if(flash.crit_fail)
|
||||
user << "No sense replacing it with a broken bulb."
|
||||
to_chat(user, "No sense replacing it with a broken bulb.")
|
||||
return
|
||||
else
|
||||
user << "You begin to replace the bulb."
|
||||
to_chat(user, "You begin to replace the bulb.")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(flash.crit_fail || !flash || QDELETED(flash))
|
||||
return
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
/obj/item/device/assembly_holder/attack_self(mob/user)
|
||||
src.add_fingerprint(user)
|
||||
if(!a_left || !a_right)
|
||||
user << "<span class='danger'>Assembly part missing!</span>"
|
||||
to_chat(user, "<span class='danger'>Assembly part missing!</span>")
|
||||
return
|
||||
if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code
|
||||
switch(alert("Which side would you like to use?",,"Left","Right"))
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
/obj/item/device/assembly/infra/AltClick(mob/user)
|
||||
..()
|
||||
if(user.incapacitated())
|
||||
user << "<span class='warning'>You can't do that right now!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user))
|
||||
return
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
/obj/item/device/assembly/mousetrap/examine(mob/user)
|
||||
..()
|
||||
if(armed)
|
||||
user << "The mousetrap is armed!"
|
||||
to_chat(user, "The mousetrap is armed!")
|
||||
else
|
||||
user << "The mousetrap is not armed."
|
||||
to_chat(user, "The mousetrap is not armed.")
|
||||
|
||||
/obj/item/device/assembly/mousetrap/activate()
|
||||
if(..())
|
||||
@@ -22,7 +22,7 @@
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY && prob(50))
|
||||
user << "<span class='warning'>Your hand slips, setting off the trigger!</span>"
|
||||
to_chat(user, "<span class='warning'>Your hand slips, setting off the trigger!</span>")
|
||||
pulse(0)
|
||||
update_icon()
|
||||
if(usr)
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
/obj/item/device/assembly/mousetrap/attack_self(mob/living/carbon/human/user)
|
||||
if(!armed)
|
||||
user << "<span class='notice'>You arm [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You arm [src].</span>")
|
||||
else
|
||||
if(((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY) && prob(50))
|
||||
var/which_hand = "l_hand"
|
||||
@@ -85,7 +85,7 @@
|
||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
return
|
||||
user << "<span class='notice'>You disarm [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You disarm [src].</span>")
|
||||
armed = !armed
|
||||
update_icon()
|
||||
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
@@ -102,7 +102,7 @@ Code:
|
||||
if(secured && signaler2.secured)
|
||||
code = signaler2.code
|
||||
frequency = signaler2.frequency
|
||||
user << "You transfer the frequency and code of \the [signaler2.name] to \the [name]"
|
||||
to_chat(user, "You transfer the frequency and code of \the [signaler2.name] to \the [name]")
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
mode %= modes.len
|
||||
mode++
|
||||
user << "You set [src] into a [modes[mode]] mode."
|
||||
to_chat(user, "You set [src] into a [modes[mode]] mode.")
|
||||
listening = 0
|
||||
recorded = ""
|
||||
else
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "1"
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
luminosity = 3
|
||||
light_range = 3
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
|
||||
var/volume = 125
|
||||
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
|
||||
@@ -147,7 +148,7 @@
|
||||
return 1
|
||||
|
||||
/obj/effect/hotspot/Destroy()
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
SSair.hotspots -= src
|
||||
var/turf/open/T = loc
|
||||
if(istype(T) && T.active_hotspot == src)
|
||||
|
||||
@@ -149,7 +149,7 @@ var/list/gaslist_cache = null
|
||||
if(thermal_energy() > (PLASMA_BINDING_ENERGY*10))
|
||||
if(cached_gases["plasma"] && cached_gases["co2"] && cached_gases["plasma"][MOLES] > MINIMUM_HEAT_CAPACITY && cached_gases["co2"][MOLES] > MINIMUM_HEAT_CAPACITY && (cached_gases["plasma"][MOLES]+cached_gases["co2"][MOLES])/total_moles() >= FUSION_PURITY_THRESHOLD)//Fusion wont occur if the level of impurities is too high.
|
||||
//fusion converts plasma and co2 to o2 and n2 (exothermic)
|
||||
//world << "pre [temperature, [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]]
|
||||
//to_chat(world, "pre [temperature, [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]])
|
||||
var/old_heat_capacity = heat_capacity()
|
||||
var/carbon_efficency = min(cached_gases["plasma"][MOLES]/cached_gases["co2"][MOLES],MAX_CARBON_EFFICENCY)
|
||||
var/reaction_energy = thermal_energy()
|
||||
@@ -177,7 +177,7 @@ var/list/gaslist_cache = null
|
||||
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
|
||||
temperature = max(((temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB)
|
||||
//Prevents whatever mechanism is causing it to hit negative temperatures.
|
||||
//world << "post [temperature], [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]]
|
||||
//to_chat(world, "post [temperature], [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]])
|
||||
*/
|
||||
if(holder)
|
||||
if(cached_gases["freon"])
|
||||
@@ -192,10 +192,10 @@ var/list/gaslist_cache = null
|
||||
|
||||
fuel_burnt = 0
|
||||
if(temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
|
||||
//world << "pre [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]"
|
||||
//to_chat(world, "pre [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]")
|
||||
if(fire())
|
||||
reacting = 1
|
||||
//world << "post [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]"
|
||||
//to_chat(world, "post [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]")
|
||||
|
||||
return reacting
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
/obj/machinery/airalarm/ui_status(mob/user)
|
||||
if(user.has_unlimited_silicon_privilege && aidisabled)
|
||||
user << "AI control has been disabled."
|
||||
to_chat(user, "AI control has been disabled.")
|
||||
else if(!shorted)
|
||||
return ..()
|
||||
return UI_CLOSE
|
||||
@@ -404,7 +404,7 @@
|
||||
signal.data["sigtype"] = "command"
|
||||
|
||||
radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM)
|
||||
// world << text("Signal [] Broadcasted to []", command, target)
|
||||
// to_chat(world, text("Signal [] Broadcasted to []", command, target))
|
||||
|
||||
return 1
|
||||
|
||||
@@ -631,7 +631,7 @@
|
||||
if(2)
|
||||
if(istype(W, /obj/item/weapon/wirecutters) && panel_open && wires.is_all_cut())
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user << "<span class='notice'>You cut the final wires.</span>"
|
||||
to_chat(user, "<span class='notice'>You cut the final wires.</span>")
|
||||
new /obj/item/stack/cable_coil(loc, 5)
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
@@ -639,18 +639,18 @@
|
||||
else if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
panel_open = !panel_open
|
||||
user << "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>"
|
||||
to_chat(user, "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>")
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
user << "<span class='warning'>It does nothing!</span>"
|
||||
to_chat(user, "<span class='warning'>It does nothing!</span>")
|
||||
else
|
||||
if(src.allowed(usr) && !wires.is_cut(WIRE_IDSCAN))
|
||||
locked = !locked
|
||||
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the air alarm interface.</span>"
|
||||
to_chat(user, "<span class='notice'>You [ locked ? "lock" : "unlock"] the air alarm interface.</span>")
|
||||
else
|
||||
user << "<span class='danger'>Access denied.</span>"
|
||||
to_chat(user, "<span class='danger'>Access denied.</span>")
|
||||
return
|
||||
else if(panel_open && is_wire_tool(W))
|
||||
wires.interact(user)
|
||||
@@ -672,14 +672,14 @@
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/cable = W
|
||||
if(cable.get_amount() < 5)
|
||||
user << "<span class='warning'>You need five lengths of cable to wire the fire alarm!</span>"
|
||||
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the fire alarm!</span>")
|
||||
return
|
||||
user.visible_message("[user.name] wires the air alarm.", \
|
||||
"<span class='notice'>You start wiring the air alarm...</span>")
|
||||
if (do_after(user, 20, target = src))
|
||||
if (cable.get_amount() >= 5 && buildstage == 1)
|
||||
cable.use(5)
|
||||
user << "<span class='notice'>You wire the air alarm.</span>"
|
||||
to_chat(user, "<span class='notice'>You wire the air alarm.</span>")
|
||||
wires.repair()
|
||||
aidisabled = 0
|
||||
locked = 1
|
||||
@@ -692,14 +692,14 @@
|
||||
if(0)
|
||||
if(istype(W, /obj/item/weapon/electronics/airalarm))
|
||||
if(user.temporarilyRemoveItemFromInventory(W))
|
||||
user << "<span class='notice'>You insert the circuit.</span>"
|
||||
to_chat(user, "<span class='notice'>You insert the circuit.</span>")
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You detach \the [src] from the wall.</span>"
|
||||
to_chat(user, "<span class='notice'>You detach \the [src] from the wall.</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
new /obj/item/wallframe/airalarm( user.loc )
|
||||
qdel(src)
|
||||
|
||||
@@ -127,7 +127,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
if(can_unwrench(user))
|
||||
var/turf/T = get_turf(src)
|
||||
if (level==1 && isturf(T) && T.intact)
|
||||
user << "<span class='warning'>You must remove the plating first!</span>"
|
||||
to_chat(user, "<span class='warning'>You must remove the plating first!</span>")
|
||||
return 1
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
var/datum/gas_mixture/env_air = loc.return_air()
|
||||
@@ -137,9 +137,9 @@ Pipelines + Other Objects -> Pipe network
|
||||
var/internal_pressure = int_air.return_pressure()-env_air.return_pressure()
|
||||
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (internal_pressure > 2*ONE_ATMOSPHERE)
|
||||
user << "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>"
|
||||
to_chat(user, "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>")
|
||||
unsafe_wrenching = TRUE //Oh dear oh dear
|
||||
|
||||
if (do_after(user, 20*W.toolspeed, target = src) && !QDELETED(src))
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
last_pressure_delta = pressure_delta
|
||||
|
||||
//world << "pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];"
|
||||
//to_chat(world, "pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];")
|
||||
|
||||
//Actually transfer the gas
|
||||
var/datum/gas_mixture/removed = air2.remove(transfer_moles)
|
||||
|
||||
@@ -169,7 +169,7 @@ Passive gate is similar to the regular pump except:
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/can_unwrench(mob/user)
|
||||
if(..())
|
||||
if(on)
|
||||
user << "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>"
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>")
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
if(!(stat & NOPOWER) && on)
|
||||
user << "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>"
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>")
|
||||
else
|
||||
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", "atmos")
|
||||
message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [ADMIN_COORDJMP(T)]")
|
||||
|
||||
@@ -181,7 +181,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
var/turf/T = get_turf(src)
|
||||
//var/area/A = get_area(src)
|
||||
if(!(stat & NOPOWER) && on)
|
||||
user << "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>"
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>")
|
||||
else
|
||||
investigate_log("Volume Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [loc.loc]", "atmos")
|
||||
message_admins("Volume Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)]")
|
||||
|
||||
@@ -167,6 +167,6 @@ UI Stuff
|
||||
/obj/machinery/atmospherics/components/ui_status(mob/user)
|
||||
if(allowed(user))
|
||||
return ..()
|
||||
user << "<span class='danger'>Access denied.</span>"
|
||||
to_chat(user, "<span class='danger'>Access denied.</span>")
|
||||
return UI_CLOSE
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
return occupant
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/container_resist(mob/living/user)
|
||||
user << "<span class='notice'>You struggle inside the cryotube, kicking the release with your foot... (This will take around 30 seconds.)</span>"
|
||||
to_chat(user, "<span class='notice'>You struggle inside the cryotube, kicking the release with your foot... (This will take around 30 seconds.)</span>")
|
||||
audible_message("<span class='notice'>You hear a thump from [src].</span>")
|
||||
if(do_after(user, 300))
|
||||
if(occupant == user) // Check they're still here.
|
||||
@@ -242,11 +242,11 @@
|
||||
..()
|
||||
if(occupant)
|
||||
if(on)
|
||||
user << "Someone's inside [src]!"
|
||||
to_chat(user, "[occupant] is inside [src]!")
|
||||
else
|
||||
user << "You can barely make out a form floating in [src]."
|
||||
to_chat(user, "You can barely make out a form floating in [src].")
|
||||
else
|
||||
user << "[src] seems empty."
|
||||
to_chat(user, "[src] seems empty.")
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/MouseDrop_T(mob/target, mob/user)
|
||||
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
|
||||
@@ -257,7 +257,7 @@
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass))
|
||||
. = 1 //no afterattack
|
||||
if(beaker)
|
||||
user << "<span class='warning'>A beaker is already loaded into [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>A beaker is already loaded into [src]!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/obj/machinery/atmospherics/components/unary/portables_connector/can_unwrench(mob/user)
|
||||
if(..())
|
||||
if(connected_device)
|
||||
user << "<span class='warning'>You cannot unwrench this [src], detach [connected_device] first!</span>"
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], detach [connected_device] first!</span>")
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
newtype = heater
|
||||
name = initial(newtype.name)
|
||||
build_path = initial(newtype.build_path)
|
||||
user << "<span class='notice'>You change the circuitboard setting to \"[new_setting]\".</span>"
|
||||
to_chat(user, "<span class='notice'>You change the circuitboard setting to \"[new_setting]\".</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
user << "<span class='notice'>You begin welding the vent...</span>"
|
||||
to_chat(user, "<span class='notice'>You begin welding the vent...</span>")
|
||||
if(do_after(user, 20*W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
@@ -268,14 +268,14 @@
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/can_unwrench(mob/user)
|
||||
if(..())
|
||||
if(!(stat & NOPOWER) && on)
|
||||
user << "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>"
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>")
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/examine(mob/user)
|
||||
..()
|
||||
if(welded)
|
||||
user << "It seems welded shut."
|
||||
to_chat(user, "It seems welded shut.")
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/power_change()
|
||||
..()
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
user << "<span class='notice'>Now welding the scrubber.</span>"
|
||||
to_chat(user, "<span class='notice'>Now welding the scrubber.</span>")
|
||||
if(do_after(user, 20*W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
@@ -361,7 +361,7 @@
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/can_unwrench(mob/user)
|
||||
if(..())
|
||||
if (!(stat & NOPOWER) && on)
|
||||
user << "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>"
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>")
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
@@ -94,13 +94,13 @@
|
||||
|
||||
/obj/machinery/meter/examine(mob/user)
|
||||
..()
|
||||
user << status()
|
||||
to_chat(user, status())
|
||||
|
||||
|
||||
/obj/machinery/meter/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40*W.toolspeed, target = src))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
@@ -122,7 +122,7 @@
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return 1
|
||||
else
|
||||
usr << status()
|
||||
to_chat(usr, status())
|
||||
return 1
|
||||
|
||||
/obj/machinery/meter/singularity_pull(S, current_size)
|
||||
|
||||
@@ -204,11 +204,11 @@
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
user << "<span class='notice'>You begin cutting [src] apart...</span>"
|
||||
to_chat(user, "<span class='notice'>You begin cutting [src] apart...</span>")
|
||||
if(do_after(user, 30, target = src))
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
user << "<span class='notice'>You cannot slice [src] apart when it isn't broken.</span>"
|
||||
to_chat(user, "<span class='notice'>You cannot slice [src] apart when it isn't broken.</span>")
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -101,10 +101,10 @@
|
||||
else
|
||||
var/obj/machinery/atmospherics/components/unary/portables_connector/possible_port = locate(/obj/machinery/atmospherics/components/unary/portables_connector) in loc
|
||||
if(!possible_port)
|
||||
user << "<span class='notice'>Nothing happens.</span>"
|
||||
to_chat(user, "<span class='notice'>Nothing happens.</span>")
|
||||
return
|
||||
if(!connect(possible_port))
|
||||
user << "<span class='notice'>[name] failed to connect to the port.</span>"
|
||||
to_chat(user, "<span class='notice'>[name] failed to connect to the port.</span>")
|
||||
return
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user.visible_message( \
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
volume = 1000
|
||||
|
||||
/obj/machinery/portable_atmospherics/pump/New()
|
||||
/obj/machinery/portable_atmospherics/pump/Initialize()
|
||||
..()
|
||||
pump = new(src, FALSE)
|
||||
pump.on = TRUE
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
armour_penetration = 1000
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
anchored = TRUE
|
||||
flags = HANDSLOW
|
||||
var/team = WHITE_TEAM
|
||||
var/reset_cooldown = 0
|
||||
var/obj/effect/ctf/flag_reset/reset
|
||||
@@ -35,6 +34,7 @@
|
||||
|
||||
/obj/item/weapon/twohanded/ctf/Initialize()
|
||||
..()
|
||||
SET_SECONDARY_FLAG(src, SLOWS_WHILE_IN_HAND)
|
||||
if(!reset)
|
||||
reset = new reset_path(get_turf(src))
|
||||
|
||||
@@ -44,15 +44,14 @@
|
||||
for(var/mob/M in player_list)
|
||||
var/area/mob_area = get_area(M)
|
||||
if(istype(mob_area, /area/ctf))
|
||||
M << "<span class='userdanger'>\The [src] has been returned \
|
||||
to base!</span>"
|
||||
to_chat(M, "<span class='userdanger'>\The [src] has been returned to base!</span>")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/twohanded/ctf/attack_hand(mob/living/user)
|
||||
if(!user)
|
||||
return
|
||||
if(team in user.faction)
|
||||
user << "You can't move your own flag!"
|
||||
to_chat(user, "You can't move your own flag!")
|
||||
return
|
||||
if(loc == user)
|
||||
if(!user.dropItemToGround(src))
|
||||
@@ -66,7 +65,7 @@
|
||||
for(var/mob/M in player_list)
|
||||
var/area/mob_area = get_area(M)
|
||||
if(istype(mob_area, /area/ctf))
|
||||
M << "<span class='userdanger'>\The [src] has been taken!</span>"
|
||||
to_chat(M, "<span class='userdanger'>\The [src] has been taken!</span>")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/twohanded/ctf/dropped(mob/user)
|
||||
@@ -77,7 +76,7 @@
|
||||
for(var/mob/M in player_list)
|
||||
var/area/mob_area = get_area(M)
|
||||
if(istype(mob_area, /area/ctf))
|
||||
M << "<span class='userdanger'>\The [src] has been dropped!</span>"
|
||||
to_chat(M, "<span class='userdanger'>\The [src] has been dropped!</span>")
|
||||
anchored = TRUE
|
||||
|
||||
|
||||
@@ -117,6 +116,13 @@
|
||||
desc = "This is where a blue banner used to play capture the flag \
|
||||
would go."
|
||||
|
||||
/proc/toggle_all_ctf(mob/user)
|
||||
var/ctf_enabled = FALSE
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
ctf_enabled = CTF.toggle_ctf()
|
||||
message_admins("[key_name_admin(user)] has [ctf_enabled? "enabled" : "disabled"] CTF!")
|
||||
notify_ghosts("CTF has been [ctf_enabled? "enabled" : "disabled"]!",'sound/effects/ghost2.ogg')
|
||||
|
||||
/obj/machinery/capture_the_flag
|
||||
name = "CTF Controller"
|
||||
desc = "Used for running friendly games of capture the flag."
|
||||
@@ -138,12 +144,14 @@
|
||||
var/ctf_enabled = FALSE
|
||||
var/ctf_gear = /datum/outfit/ctf
|
||||
var/instagib_gear = /datum/outfit/ctf/instagib
|
||||
var/list/dead_barricades = list()
|
||||
|
||||
var/list/obj/effect/ctf/dead_barricade/dead_barricades = list()
|
||||
var/list/obj/structure/barricade/security/ctf/living_barricades = list()
|
||||
|
||||
var/static/ctf_object_typecache
|
||||
var/static/arena_cleared = FALSE
|
||||
|
||||
/obj/machinery/capture_the_flag/New()
|
||||
/obj/machinery/capture_the_flag/Initialize()
|
||||
..()
|
||||
if(!ctf_object_typecache)
|
||||
ctf_object_typecache = typecacheof(list(
|
||||
@@ -173,8 +181,8 @@
|
||||
else
|
||||
// The changes that you've been hit with no shield but not
|
||||
// instantly critted are low, but have some healing.
|
||||
M.adjustBruteLoss(-1)
|
||||
M.adjustFireLoss(-1)
|
||||
M.adjustBruteLoss(-5)
|
||||
M.adjustFireLoss(-5)
|
||||
|
||||
/obj/machinery/capture_the_flag/red
|
||||
name = "Red CTF Controller"
|
||||
@@ -192,12 +200,17 @@
|
||||
|
||||
/obj/machinery/capture_the_flag/attack_ghost(mob/user)
|
||||
if(ctf_enabled == FALSE)
|
||||
if(user.client && user.client.holder)
|
||||
var/response = alert("Enable CTF?", "CTF", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
toggle_all_ctf(user)
|
||||
return
|
||||
|
||||
if(ticker.current_state < GAME_STATE_PLAYING)
|
||||
return
|
||||
if(user.ckey in team_members)
|
||||
if(user.ckey in recently_dead_ckeys)
|
||||
user << "It must be more than [respawn_cooldown/10] seconds from your last death to respawn!"
|
||||
to_chat(user, "It must be more than [respawn_cooldown/10] seconds from your last death to respawn!")
|
||||
return
|
||||
var/client/new_team_member = user.client
|
||||
if(user.mind && user.mind.current)
|
||||
@@ -209,10 +222,10 @@
|
||||
if(CTF == src || CTF.ctf_enabled == FALSE)
|
||||
continue
|
||||
if(user.ckey in CTF.team_members)
|
||||
user << "No switching teams while the round is going!"
|
||||
to_chat(user, "No switching teams while the round is going!")
|
||||
return
|
||||
if(CTF.team_members.len < src.team_members.len)
|
||||
user << "[src.team] has more team members than [CTF.team]. Try joining [CTF.team] to even things up."
|
||||
to_chat(user, "[src.team] has more team members than [CTF.team]. Try joining [CTF.team] to even things up.")
|
||||
return
|
||||
team_members |= user.ckey
|
||||
var/client/new_team_member = user.client
|
||||
@@ -254,7 +267,7 @@
|
||||
for(var/mob/M in player_list)
|
||||
var/area/mob_area = get_area(M)
|
||||
if(istype(mob_area, /area/ctf))
|
||||
M << "<span class='userdanger'>[user.real_name] has captured \the [flag], scoring a point for [team] team! They now have [points]/[points_to_win] points!</span>"
|
||||
to_chat(M, "<span class='userdanger'>[user.real_name] has captured \the [flag], scoring a point for [team] team! They now have [points]/[points_to_win] points!</span>")
|
||||
if(points >= points_to_win)
|
||||
victory()
|
||||
|
||||
@@ -262,8 +275,8 @@
|
||||
for(var/mob/M in mob_list)
|
||||
var/area/mob_area = get_area(M)
|
||||
if(istype(mob_area, /area/ctf))
|
||||
M << "<span class='narsie'>[team] team wins!</span>"
|
||||
M << "<span class='userdanger'>The game has been reset! Teams have been cleared. The machines will be active again in 30 seconds.</span>"
|
||||
to_chat(M, "<span class='narsie'>[team] team wins!</span>")
|
||||
to_chat(M, "<span class='userdanger'>The game has been reset! Teams have been cleared. The machines will be active again in 30 seconds.</span>")
|
||||
for(var/obj/item/weapon/twohanded/ctf/W in M)
|
||||
M.dropItemToGround(W)
|
||||
M.dust()
|
||||
@@ -289,9 +302,16 @@
|
||||
|
||||
/obj/machinery/capture_the_flag/proc/start_ctf()
|
||||
ctf_enabled = TRUE
|
||||
for(var/obj/effect/ctf/dead_barricade/ded in dead_barricades)
|
||||
ded.respawn()
|
||||
for(var/d in dead_barricades)
|
||||
var/obj/effect/ctf/dead_barricade/D = d
|
||||
D.respawn()
|
||||
|
||||
dead_barricades.Cut()
|
||||
|
||||
for(var/b in living_barricades)
|
||||
var/obj/structure/barricade/security/ctf/B = b
|
||||
B.obj_integrity = B.max_integrity
|
||||
|
||||
notify_ghosts("[name] has been activated!", enter_link="<a href=?src=\ref[src];join=1>(Click to join the [team] team!)</a> or click on the controller directly!", source = src, action=NOTIFY_ATTACK)
|
||||
|
||||
if(!arena_cleared)
|
||||
@@ -433,6 +453,7 @@
|
||||
ears = /obj/item/device/radio/headset
|
||||
uniform = /obj/item/clothing/under/syndicate
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/shielded/ctf
|
||||
toggle_helmet = FALSE // see the whites of their eyes
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
id = /obj/item/weapon/card/id/syndicate
|
||||
@@ -514,7 +535,7 @@
|
||||
|
||||
/obj/structure/trap/ctf/trap_effect(mob/living/L)
|
||||
if(!(src.team in L.faction))
|
||||
L << "<span class='danger'><B>Stay out of the enemy spawn!</B></span>"
|
||||
to_chat(L, "<span class='danger'><B>Stay out of the enemy spawn!</B></span>")
|
||||
L.death()
|
||||
|
||||
/obj/structure/trap/ctf/red
|
||||
@@ -528,6 +549,18 @@
|
||||
/obj/structure/barricade/security/ctf
|
||||
name = "barrier"
|
||||
desc = "A barrier. Provides cover in fire fights."
|
||||
deploy_time = 0
|
||||
deploy_message = 0
|
||||
|
||||
/obj/structure/barricade/security/ctf/Initialize(mapload)
|
||||
..()
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
CTF.living_barricades += src
|
||||
|
||||
/obj/structure/barricade/security/ctf/Destroy()
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
CTF.living_barricades -= src
|
||||
. = ..()
|
||||
|
||||
/obj/structure/barricade/security/ctf/make_debris()
|
||||
new /obj/effect/ctf/dead_barricade(get_turf(src))
|
||||
@@ -549,7 +582,7 @@
|
||||
alpha = 255
|
||||
invisibility = 0
|
||||
|
||||
/obj/effect/ctf/ammo/New()
|
||||
/obj/effect/ctf/ammo/Initialize(mapload)
|
||||
..()
|
||||
QDEL_IN(src, AMMO_DROP_LIFETIME)
|
||||
|
||||
@@ -572,7 +605,7 @@
|
||||
for(var/obj/item/weapon/gun/G in M)
|
||||
qdel(G)
|
||||
O.equip(M)
|
||||
M << "<span class='notice'>Ammunition reloaded!</span>"
|
||||
to_chat(M, "<span class='notice'>Ammunition reloaded!</span>")
|
||||
playsound(get_turf(M), 'sound/weapons/shotgunpump.ogg', 50, 1, -1)
|
||||
qdel(src)
|
||||
break
|
||||
@@ -583,7 +616,8 @@
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "barrier0"
|
||||
|
||||
/obj/effect/ctf/dead_barricade/New()
|
||||
/obj/effect/ctf/dead_barricade/Initialize(mapload)
|
||||
..()
|
||||
for(var/obj/machinery/capture_the_flag/CTF in machines)
|
||||
CTF.dead_barricades += src
|
||||
|
||||
@@ -627,5 +661,13 @@
|
||||
for(var/mob/M in player_list)
|
||||
var/area/mob_area = get_area(M)
|
||||
if(istype(mob_area, /area/ctf))
|
||||
M << "<span class='userdanger'>[user.real_name] has captured \the [src], claiming it for [CTF.team]! Go take it back!</span>"
|
||||
to_chat(M, "<span class='userdanger'>[user.real_name] has captured \the [src], claiming it for [CTF.team]! Go take it back!</span>")
|
||||
break
|
||||
|
||||
#undef WHITE_TEAM
|
||||
#undef RED_TEAM
|
||||
#undef BLUE_TEAM
|
||||
#undef FLAG_RETURN_TIME
|
||||
#undef INSTAGIB_RESPAWN
|
||||
#undef DEFAULT_RESPAWN
|
||||
#undef AMMO_DROP_LIFETIME
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
if(ticker.current_state != GAME_STATE_PLAYING || !loc)
|
||||
return
|
||||
if(!uses)
|
||||
user << "<span class='warning'>This spawner is out of charges!</span>"
|
||||
to_chat(user, "<span class='warning'>This spawner is out of charges!</span>")
|
||||
return
|
||||
if(jobban_isbanned(user, "lavaland"))
|
||||
user << "<span class='warning'>You are jobanned!</span>"
|
||||
to_chat(user, "<span class='warning'>You are jobanned!</span>")
|
||||
return
|
||||
var/ghost_role = alert("Become [mob_name]? (Warning, You can no longer be cloned!)",,"Yes","No")
|
||||
if(ghost_role == "No" || !loc)
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
if(ckey)
|
||||
M.ckey = ckey
|
||||
M << "[flavour_text]"
|
||||
to_chat(M, "[flavour_text]")
|
||||
var/datum/mind/MM = M.mind
|
||||
if(objectives)
|
||||
for(var/objective in objectives)
|
||||
|
||||
@@ -126,10 +126,10 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
|
||||
if(!powered())
|
||||
return
|
||||
if(!awaygate)
|
||||
user << "<span class='notice'>Error: No destination found.</span>"
|
||||
to_chat(user, "<span class='notice'>Error: No destination found.</span>")
|
||||
return
|
||||
if(world.time < wait)
|
||||
user << "<span class='notice'>Error: Warpspace triangulation in progress. Estimated time to completion: [round(((wait - world.time) / 10) / 60)] minutes.</span>"
|
||||
to_chat(user, "<span class='notice'>Error: Warpspace triangulation in progress. Estimated time to completion: [round(((wait - world.time) / 10) / 60)] minutes.</span>")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/gateway/G in linked)
|
||||
@@ -166,10 +166,10 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
|
||||
/obj/machinery/gateway/centeraway/attackby(obj/item/device/W, mob/user, params)
|
||||
if(istype(W,/obj/item/device/multitool))
|
||||
if(calibrated)
|
||||
user << "\black The gate is already calibrated, there is no work for you to do here."
|
||||
to_chat(user, "\black The gate is already calibrated, there is no work for you to do here.")
|
||||
return
|
||||
else
|
||||
user << "<span class='boldnotice'>Recalibration successful!</span>: \black This gate's systems have been fine tuned. Travel to this gate will now be on target."
|
||||
to_chat(user, "<span class='boldnotice'>Recalibration successful!</span>: \black This gate's systems have been fine tuned. Travel to this gate will now be on target.")
|
||||
calibrated = TRUE
|
||||
return
|
||||
|
||||
@@ -200,7 +200,7 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
|
||||
if(!detect())
|
||||
return
|
||||
if(!stationgate)
|
||||
user << "<span class='notice'>Error: No destination found.</span>"
|
||||
to_chat(user, "<span class='notice'>Error: No destination found.</span>")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/gateway/G in linked)
|
||||
@@ -219,7 +219,7 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
|
||||
if(istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = AM
|
||||
for(var/obj/item/weapon/implant/exile/E in C.implants)//Checking that there is an exile implant
|
||||
AM << "\black The station gate has detected your exile implant and is blocking your entry."
|
||||
to_chat(AM, "\black The station gate has detected your exile implant and is blocking your entry.")
|
||||
return
|
||||
AM.forceMove(get_step(stationgate.loc, SOUTH))
|
||||
AM.setDir(SOUTH)
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
..()
|
||||
if(!used)
|
||||
if(!ishuman(user) || !user.mind || (user.mind in ticker.mode.wizards))
|
||||
user << "<span class='warning'>You feel the magic of the dice is restricted to ordinary humans!</span>"
|
||||
to_chat(user, "<span class='warning'>You feel the magic of the dice is restricted to ordinary humans!</span>")
|
||||
return
|
||||
if(rigged)
|
||||
effect(user,rigged)
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
/obj/item/weapon/dice/d20/fate/equipped(mob/user, slot)
|
||||
if(!ishuman(user) || !user.mind || (user.mind in ticker.mode.wizards))
|
||||
user << "<span class='warning'>You feel the magic of the dice is restricted to ordinary humans! You should leave it alone.</span>"
|
||||
to_chat(user, "<span class='warning'>You feel the magic of the dice is restricted to ordinary humans! You should leave it alone.</span>")
|
||||
user.drop_item()
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
new /obj/item/weapon/card/id/captains_spare(get_turf(src))
|
||||
if(19)
|
||||
//Instrinct Resistance
|
||||
user << "<span class='notice'>You feel robust.</span>"
|
||||
to_chat(user, "<span class='notice'>You feel robust.</span>")
|
||||
var/datum/species/S = user.dna.species
|
||||
S.brutemod *= 0.5
|
||||
S.burnmod *= 0.5
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
|
||||
/obj/structure/firepit/proc/toggleFirepit()
|
||||
if(active)
|
||||
SetLuminosity(8)
|
||||
set_light(8)
|
||||
icon_state = "firepit-active"
|
||||
else
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
icon_state = "firepit"
|
||||
|
||||
/obj/structure/firepit/extinguish()
|
||||
|
||||
@@ -25,18 +25,18 @@
|
||||
usr.set_machine(src)
|
||||
|
||||
if(chargesa <= 0)
|
||||
user << "The Wish Granter lies silent."
|
||||
to_chat(user, "The Wish Granter lies silent.")
|
||||
return
|
||||
|
||||
else if(!ishuman(user))
|
||||
user << "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's."
|
||||
to_chat(user, "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's.")
|
||||
return
|
||||
|
||||
else if(is_special_character(user))
|
||||
user << "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away."
|
||||
to_chat(user, "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away.")
|
||||
|
||||
else if (!insistinga)
|
||||
user << "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?"
|
||||
to_chat(user, "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?")
|
||||
insistinga++
|
||||
|
||||
else
|
||||
@@ -45,36 +45,36 @@
|
||||
var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","Immortality","To Kill","Peace")
|
||||
switch(wish)
|
||||
if("Power")
|
||||
user << "<B>Your wish is granted, but at a terrible cost...</B>"
|
||||
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
|
||||
to_chat(user, "<B>Your wish is granted, but at a terrible cost...</B>")
|
||||
to_chat(user, "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart.")
|
||||
user.dna.add_mutation(LASEREYES)
|
||||
user.dna.add_mutation(COLDRES)
|
||||
user.dna.add_mutation(XRAY)
|
||||
user.set_species(/datum/species/shadow)
|
||||
if("Wealth")
|
||||
user << "<B>Your wish is granted, but at a terrible cost...</B>"
|
||||
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
|
||||
to_chat(user, "<B>Your wish is granted, but at a terrible cost...</B>")
|
||||
to_chat(user, "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart.")
|
||||
new /obj/structure/closet/syndicate/resources/everything(loc)
|
||||
user.set_species(/datum/species/shadow)
|
||||
if("Immortality")
|
||||
user << "<B>Your wish is granted, but at a terrible cost...</B>"
|
||||
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
|
||||
to_chat(user, "<B>Your wish is granted, but at a terrible cost...</B>")
|
||||
to_chat(user, "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart.")
|
||||
user.verbs += /mob/living/carbon/proc/immortality
|
||||
user.set_species(/datum/species/shadow)
|
||||
if("To Kill")
|
||||
user << "<B>Your wish is granted, but at a terrible cost...</B>"
|
||||
user << "The Wish Granter punishes you for your wickedness, claiming your soul and warping your body to match the darkness in your heart."
|
||||
to_chat(user, "<B>Your wish is granted, but at a terrible cost...</B>")
|
||||
to_chat(user, "The Wish Granter punishes you for your wickedness, claiming your soul and warping your body to match the darkness in your heart.")
|
||||
ticker.mode.traitors += user.mind
|
||||
user.mind.special_role = "traitor"
|
||||
var/datum/objective/hijack/hijack = new
|
||||
hijack.owner = user.mind
|
||||
user.mind.objectives += hijack
|
||||
user << "<B>Your inhibitions are swept away, the bonds of loyalty broken, you are free to murder as you please!</B>"
|
||||
to_chat(user, "<B>Your inhibitions are swept away, the bonds of loyalty broken, you are free to murder as you please!</B>")
|
||||
user.mind.announce_objectives()
|
||||
user.set_species(/datum/species/shadow)
|
||||
if("Peace")
|
||||
user << "<B>Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence.</B>"
|
||||
user << "You feel as if you just narrowly avoided a terrible fate..."
|
||||
to_chat(user, "<B>Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence.</B>")
|
||||
to_chat(user, "You feel as if you just narrowly avoided a terrible fate...")
|
||||
for(var/mob/living/simple_animal/hostile/faithless/F in mob_list)
|
||||
F.death()
|
||||
|
||||
@@ -118,13 +118,10 @@
|
||||
|
||||
var/mob/living/carbon/C = usr
|
||||
if(!C.stat)
|
||||
C << "<span class='notice'>You're not dead yet!</span>"
|
||||
to_chat(C, "<span class='notice'>You're not dead yet!</span>")
|
||||
return
|
||||
C << "<span class='notice'>Death is not your end!</span>"
|
||||
|
||||
spawn(rand(80,120))
|
||||
C.revive(full_heal = 1, admin_revive = 1)
|
||||
C << "<span class='notice'>You have regenerated.</span>"
|
||||
C.visible_message("<span class='warning'>[usr] appears to wake from the dead, having healed all wounds.</span>")
|
||||
C.update_canmove()
|
||||
return 1
|
||||
if(C.has_status_effect(STATUS_EFFECT_WISH_GRANTERS_GIFT))
|
||||
to_chat(C, "<span class='warning'>You're already resurrecting!</span>")
|
||||
return
|
||||
C.apply_status_effect(STATUS_EFFECT_WISH_GRANTERS_GIFT)
|
||||
return 1
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/structure/signpost/New()
|
||||
. = ..()
|
||||
SetLuminosity(2)
|
||||
set_light(2)
|
||||
|
||||
/obj/structure/signpost/attackby(obj/item/weapon/W, mob/user, params)
|
||||
return attack_hand(user)
|
||||
@@ -22,10 +22,9 @@
|
||||
if(T)
|
||||
var/area/A = get_area(T)
|
||||
user.forceMove(T)
|
||||
user << "<span class='notice'>You blink and find yourself \
|
||||
in [A.name].</span>"
|
||||
to_chat(user, "<span class='notice'>You blink and find yourself in [A.name].</span>")
|
||||
else
|
||||
user << "Nothing happens. You feel that this is a bad sign."
|
||||
to_chat(user, "Nothing happens. You feel that this is a bad sign.")
|
||||
if("No")
|
||||
return
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
|
||||
return
|
||||
|
||||
if(potentialRandomZlevels && potentialRandomZlevels.len)
|
||||
world << "<span class='boldannounce'>Loading away mission...</span>"
|
||||
to_chat(world, "<span class='boldannounce'>Loading away mission...</span>")
|
||||
var/map = pick(potentialRandomZlevels)
|
||||
load_new_z_level(map)
|
||||
world << "<span class='boldannounce'>Away mission loaded.</span>"
|
||||
to_chat(world, "<span class='boldannounce'>Away mission loaded.</span>")
|
||||
|
||||
/proc/reset_gateway_spawns(reset = FALSE)
|
||||
for(var/obj/machinery/gateway/G in world)
|
||||
@@ -28,7 +28,7 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
|
||||
|
||||
/obj/effect/landmark/awaystart/Destroy()
|
||||
awaydestinations -= src
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/proc/generateMapList(filename)
|
||||
var/list/potentialMaps = list()
|
||||
@@ -60,4 +60,4 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
|
||||
|
||||
potentialMaps.Add(t)
|
||||
|
||||
return potentialMaps
|
||||
return potentialMaps
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
var/safety_warning = "For safety reasons the automated supply shuttle \
|
||||
cannot transport live organisms, classified nuclear weaponry or \
|
||||
homing beacons."
|
||||
|
||||
light_color = "#E2853D"//orange
|
||||
|
||||
/obj/machinery/computer/cargo/request
|
||||
name = "supply request console"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/item/device/export_scanner/examine(user)
|
||||
..()
|
||||
if(!cargo_console)
|
||||
user << "<span class='notice'>The [src] is currently not linked to a cargo console.</span>"
|
||||
to_chat(user, "<span class='notice'>The [src] is currently not linked to a cargo console.</span>")
|
||||
|
||||
/obj/item/device/export_scanner/afterattack(obj/O, mob/user, proximity)
|
||||
if(!istype(O) || !proximity)
|
||||
@@ -21,17 +21,15 @@
|
||||
var/obj/machinery/computer/cargo/C = O
|
||||
if(!C.requestonly)
|
||||
cargo_console = C
|
||||
user << "<span class='notice'>Scanner linked to [C].</span>"
|
||||
to_chat(user, "<span class='notice'>Scanner linked to [C].</span>")
|
||||
else if(!istype(cargo_console))
|
||||
user << "<span class='warning'>You must link [src] to a cargo console first!</span>"
|
||||
to_chat(user, "<span class='warning'>You must link [src] to a cargo console first!</span>")
|
||||
else
|
||||
// Before you fix it:
|
||||
// yes, checking manifests is a part of intended functionality.
|
||||
var/price = export_item_and_contents(O, cargo_console.contraband, cargo_console.emagged, dry_run=TRUE)
|
||||
|
||||
if(price)
|
||||
user << "<span class='notice'>Scanned [O], value: <b>[price]</b> \
|
||||
credits[O.contents.len ? " (contents included)" : ""].</span>"
|
||||
to_chat(user, "<span class='notice'>Scanned [O], value: <b>[price]</b> credits[O.contents.len ? " (contents included)" : ""].</span>")
|
||||
else
|
||||
user << "<span class='warning'>Scanned [O], no export value. \
|
||||
</span>"
|
||||
to_chat(user, "<span class='warning'>Scanned [O], no export value.</span>")
|
||||
|
||||
@@ -91,7 +91,7 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
return FALSE
|
||||
if(!get_cost(O, contr, emag))
|
||||
return FALSE
|
||||
if(O.flags & HOLOGRAM)
|
||||
if(HAS_SECONDARY_FLAG(O, HOLOGRAM))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
|
||||
/datum/supply_pack/security/armory/ballistic
|
||||
name = "Combat Shotguns Crate"
|
||||
cost = 4000
|
||||
cost = 8000
|
||||
contains = list(/obj/item/weapon/gun/ballistic/shotgun/automatic/combat,
|
||||
/obj/item/weapon/gun/ballistic/shotgun/automatic/combat,
|
||||
/obj/item/weapon/gun/ballistic/shotgun/automatic/combat,
|
||||
@@ -1006,7 +1006,14 @@
|
||||
/obj/item/weapon/reagent_containers/food/drinks/beer,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/beer,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/beer,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/beer)
|
||||
/obj/item/weapon/reagent_containers/food/drinks/beer,
|
||||
/obj/item/device/flashlight/glowstick,
|
||||
/obj/item/device/flashlight/glowstick/red,
|
||||
/obj/item/device/flashlight/glowstick/blue,
|
||||
/obj/item/device/flashlight/glowstick/cyan,
|
||||
/obj/item/device/flashlight/glowstick/orange,
|
||||
/obj/item/device/flashlight/glowstick/yellow,
|
||||
/obj/item/device/flashlight/glowstick/pink)
|
||||
crate_name = "party equipment crate"
|
||||
|
||||
/datum/supply_pack/organic/critter
|
||||
@@ -1567,7 +1574,7 @@
|
||||
contraband = TRUE
|
||||
cost = 3000
|
||||
num_contained = 6
|
||||
contains = list(/obj/item/weapon/poster/contraband,
|
||||
contains = list(/obj/item/weapon/poster/random_contraband,
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims,
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_midori,
|
||||
/obj/item/seeds/ambrosia/deus,
|
||||
@@ -1577,6 +1584,7 @@
|
||||
/datum/supply_pack/misc/randomised/toys
|
||||
name = "Toy Crate"
|
||||
cost = 5000 // or play the arcade machines ya lazy bum
|
||||
// TODO make this actually just use the arcade machine loot list
|
||||
num_contained = 5
|
||||
contains = list(/obj/item/toy/spinningtoy,
|
||||
/obj/item/toy/sword,
|
||||
@@ -1591,7 +1599,8 @@
|
||||
/obj/item/weapon/coin/antagtoken,
|
||||
/obj/item/stack/tile/fakespace/loaded,
|
||||
/obj/item/weapon/gun/ballistic/shotgun/toy/crossbow,
|
||||
/obj/item/toy/redbutton)
|
||||
/obj/item/toy/redbutton,
|
||||
/obj/item/toy/eightball)
|
||||
crate_name = "toy crate"
|
||||
|
||||
/datum/supply_pack/misc/autodrobe
|
||||
@@ -1696,7 +1705,12 @@
|
||||
cost = 12000
|
||||
special = TRUE
|
||||
contains = list(
|
||||
/obj/item/weapon/circuitboard/machine/dna_vault
|
||||
/obj/item/weapon/circuitboard/machine/dna_vault,
|
||||
/obj/item/device/dna_probe,
|
||||
/obj/item/device/dna_probe,
|
||||
/obj/item/device/dna_probe,
|
||||
/obj/item/device/dna_probe,
|
||||
/obj/item/device/dna_probe
|
||||
)
|
||||
crate_name= "dna vault parts crate"
|
||||
|
||||
@@ -1733,3 +1747,10 @@
|
||||
/obj/item/weapon/circuitboard/machine/computer/sat_control
|
||||
)
|
||||
crate_name= "shield control board crate"
|
||||
|
||||
/datum/supply_pack/misc/bicycle
|
||||
name = "Bicycle"
|
||||
cost = 10000
|
||||
contains = list(/obj/vehicle/bicycle)
|
||||
crate_name = "Bicycle Crate"
|
||||
crate_type = /obj/structure/closet/crate/large
|
||||
|
||||
@@ -89,7 +89,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the
|
||||
if(!unreceived || !unreceived.len)
|
||||
return 0
|
||||
if (unreceived.len >= ASSET_CACHE_TELL_CLIENT_AMOUNT)
|
||||
client << "Sending Resources..."
|
||||
to_chat(client, "Sending Resources...")
|
||||
for(var/asset in unreceived)
|
||||
if (asset in SSasset.cache)
|
||||
client << browse_rsc(SSasset.cache[asset], asset)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
// asset_cache
|
||||
if(href_list["asset_cache_confirm_arrival"])
|
||||
//src << "ASSET JOB [href_list["asset_cache_confirm_arrival"]] ARRIVED."
|
||||
//to_chat(src, "ASSET JOB [href_list["asset_cache_confirm_arrival"]] ARRIVED.")
|
||||
var/job = text2num(href_list["asset_cache_confirm_arrival"])
|
||||
//because we skip the limiter, we have to make sure this is a valid arrival and not somebody tricking us
|
||||
// into letting append to a list without limit.
|
||||
@@ -53,8 +53,8 @@
|
||||
topiclimiter[ADMINSWARNED_AT] = minute
|
||||
msg += " Administrators have been informed."
|
||||
log_game("[key_name(src)] Has hit the per-minute topic limit of [config.minutetopiclimit] topic calls in a given game minute")
|
||||
message_admins("[key_name_admin(src)] [ADMIN_KICK(usr)] Has hit the per-minute topic limit of [config.minutetopiclimit] topic calls in a given game minute")
|
||||
src << "<span class='danger'>[msg]</span>"
|
||||
message_admins("[key_name_admin(src)] [ADMIN_FLW(usr)] [ADMIN_KICK(usr)] Has hit the per-minute topic limit of [config.minutetopiclimit] topic calls in a given game minute")
|
||||
to_chat(src, "<span class='danger'>[msg]</span>")
|
||||
return
|
||||
|
||||
if (!holder && config.secondtopiclimit)
|
||||
@@ -66,7 +66,7 @@
|
||||
topiclimiter[SECOND_COUNT] = 0
|
||||
topiclimiter[SECOND_COUNT] += 1
|
||||
if (topiclimiter[SECOND_COUNT] > config.secondtopiclimit)
|
||||
src << "<span class='danger'>Your previous action was ignored because you've done too many in a second</span>"
|
||||
to_chat(src, "<span class='danger'>Your previous action was ignored because you've done too many in a second</span>")
|
||||
return
|
||||
|
||||
if(href_list["mentor_msg"])
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
//Logs all hrefs
|
||||
if(config && config.log_hrefs && href_logfile)
|
||||
href_logfile << "<small>[time2text(world.timeofday,"hh:mm")] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>"
|
||||
href_logfile << "<small>[time_stamp(show_ds = TRUE)] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>"
|
||||
|
||||
// Admin PM
|
||||
if(href_list["priv_msg"])
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
/client/proc/is_content_unlocked()
|
||||
if(!prefs.unlock_content)
|
||||
src << "Become a BYOND member to access member-perks and features, as well as support the engine that makes this game possible. Only 10 bucks for 3 months! <a href='http://www.byond.com/membership'>Click Here to find out more</a>."
|
||||
to_chat(src, "Become a BYOND member to access member-perks and features, as well as support the engine that makes this game possible. Only 10 bucks for 3 months! <a href='http://www.byond.com/membership'>Click Here to find out more</a>.")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -116,11 +116,11 @@
|
||||
if(config.automute_on && !holder && src.last_message == message)
|
||||
src.last_message_count++
|
||||
if(src.last_message_count >= SPAM_TRIGGER_AUTOMUTE)
|
||||
src << "<span class='danger'>You have exceeded the spam filter limit for identical messages. An auto-mute was applied.</span>"
|
||||
to_chat(src, "<span class='danger'>You have exceeded the spam filter limit for identical messages. An auto-mute was applied.</span>")
|
||||
cmd_admin_mute(src, mute_type, 1)
|
||||
return 1
|
||||
if(src.last_message_count >= SPAM_TRIGGER_WARNING)
|
||||
src << "<span class='danger'>You are nearing the spam filter limit for identical messages.</span>"
|
||||
to_chat(src, "<span class='danger'>You are nearing the spam filter limit for identical messages.</span>")
|
||||
return 0
|
||||
else
|
||||
last_message = message
|
||||
@@ -130,13 +130,13 @@
|
||||
//This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc.
|
||||
/client/AllowUpload(filename, filelength)
|
||||
if(filelength > UPLOAD_LIMIT)
|
||||
src << "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB.</font>"
|
||||
to_chat(src, "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB.</font>")
|
||||
return 0
|
||||
/* //Don't need this at the moment. But it's here if it's needed later.
|
||||
//Helps prevent multiple files being uploaded at once. Or right after eachother.
|
||||
var/time_to_wait = fileaccess_timer - world.time
|
||||
if(time_to_wait > 0)
|
||||
src << "<font color='red'>Error: AllowUpload(): Spam prevention. Please wait [round(time_to_wait/10)] seconds.</font>"
|
||||
to_chat(src, "<font color='red'>Error: AllowUpload(): Spam prevention. Please wait [round(time_to_wait/10)] seconds.</font>")
|
||||
return 0
|
||||
fileaccess_timer = world.time + FTPDELAY */
|
||||
return 1
|
||||
@@ -174,15 +174,15 @@ var/next_external_rsc = 0
|
||||
if(localhost_rank)
|
||||
var/datum/admins/localhost_holder = new(localhost_rank, ckey)
|
||||
localhost_holder.associate(src)
|
||||
if(protected_config.autoadmin)
|
||||
if(config.autoadmin)
|
||||
if(!admin_datums[ckey])
|
||||
var/datum/admin_rank/autorank
|
||||
for(var/datum/admin_rank/R in admin_ranks)
|
||||
if(R.name == protected_config.autoadmin_rank)
|
||||
if(R.name == config.autoadmin_rank)
|
||||
autorank = R
|
||||
break
|
||||
if(!autorank)
|
||||
world << "Autoadmin rank not found"
|
||||
to_chat(world, "Autoadmin rank not found")
|
||||
else
|
||||
var/datum/admins/D = new(autorank, ckey)
|
||||
admin_datums[ckey] = D
|
||||
@@ -197,10 +197,6 @@ var/next_external_rsc = 0
|
||||
verbs += /client/proc/cmd_mentor_say
|
||||
verbs += /client/proc/show_mentor_memo
|
||||
mentors += src
|
||||
/*
|
||||
if(check_rights(R_ADMIN))
|
||||
if(ahelp_count(0) > 0)
|
||||
list_ahelps(src, 0)*/
|
||||
|
||||
//preferences datum - also holds some persistent data for the client (because we may as well keep these datums to a minimum)
|
||||
prefs = preferences_datums[ckey]
|
||||
@@ -222,30 +218,30 @@ var/next_external_rsc = 0
|
||||
connection_timeofday = world.timeofday
|
||||
winset(src, null, "command=\".configure graphics-hwmode on\"")
|
||||
if (byond_version < config.client_error_version) //Out of date client.
|
||||
src << "<span class='danger'><b>Your version of byond is too old:</b></span>"
|
||||
src << config.client_error_message
|
||||
src << "Your version: [byond_version]"
|
||||
src << "Required version: [config.client_error_version] or later"
|
||||
src << "Visit http://www.byond.com/download/ to get the latest version of byond."
|
||||
to_chat(src, "<span class='danger'><b>Your version of byond is too old:</b></span>")
|
||||
to_chat(src, config.client_error_message)
|
||||
to_chat(src, "Your version: [byond_version]")
|
||||
to_chat(src, "Required version: [config.client_error_version] or later")
|
||||
to_chat(src, "Visit http://www.byond.com/download/ to get the latest version of byond.")
|
||||
if (holder)
|
||||
src << "Because you are an admin, you are being allowed to walk past this limitation, But it is still STRONGLY suggested you upgrade"
|
||||
to_chat(src, "Because you are an admin, you are being allowed to walk past this limitation, But it is still STRONGLY suggested you upgrade")
|
||||
else
|
||||
qdel(src)
|
||||
return 0
|
||||
else if (byond_version < config.client_warn_version) //We have words for this client.
|
||||
src << "<span class='danger'><b>Your version of byond may be getting out of date:</b></span>"
|
||||
src << config.client_warn_message
|
||||
src << "Your version: [byond_version]"
|
||||
src << "Required version to remove this message: [config.client_warn_version] or later"
|
||||
src << "Visit http://www.byond.com/download/ to get the latest version of byond."
|
||||
to_chat(src, "<span class='danger'><b>Your version of byond may be getting out of date:</b></span>")
|
||||
to_chat(src, config.client_warn_message)
|
||||
to_chat(src, "Your version: [byond_version]")
|
||||
to_chat(src, "Required version to remove this message: [config.client_warn_version] or later")
|
||||
to_chat(src, "Visit http://www.byond.com/download/ to get the latest version of byond.")
|
||||
|
||||
if (connection == "web" && !holder)
|
||||
if (!config.allowwebclient)
|
||||
src << "Web client is disabled"
|
||||
to_chat(src, "Web client is disabled")
|
||||
qdel(src)
|
||||
return 0
|
||||
if (config.webclientmembersonly && !IsByondMember())
|
||||
src << "Sorry, but the web client is restricted to byond members only."
|
||||
to_chat(src, "Sorry, but the web client is restricted to byond members only.")
|
||||
qdel(src)
|
||||
return 0
|
||||
|
||||
@@ -255,10 +251,10 @@ var/next_external_rsc = 0
|
||||
|
||||
if(holder)
|
||||
add_admin_verbs()
|
||||
src << get_message_output("memo")
|
||||
to_chat(src, get_message_output("memo"))
|
||||
adminGreet()
|
||||
if((global.comms_key == "default_pwd" || length(global.comms_key) <= 6) && global.comms_allowed) //It's the default value or less than 6 characters long, but it somehow didn't disable comms.
|
||||
src << "<span class='danger'>The server's API key is either too short or is the default value! Consider changing it immediately!</span>"
|
||||
to_chat(src, "<span class='danger'>The server's API key is either too short or is the default value! Consider changing it immediately!</span>")
|
||||
|
||||
if(mentor && !holder)
|
||||
mentor_memo_output("Show")
|
||||
@@ -270,9 +266,9 @@ var/next_external_rsc = 0
|
||||
if (config.panic_bunker && !holder && !(ckey in deadmins))
|
||||
log_access("Failed Login: [key] - New account attempting to connect during panic bunker")
|
||||
message_admins("<span class='adminnotice'>Failed Login: [key] - New account attempting to connect during panic bunker</span>")
|
||||
src << "Sorry but the server is currently not accepting connections from never before seen players."
|
||||
to_chat(src, "Sorry but the server is currently not accepting connections from never before seen players.")
|
||||
if(config.allow_panic_bunker_bounce && tdata != "redirect")
|
||||
src << "<span class='notice'>Sending you to [config.panic_server_name].</span>"
|
||||
to_chat(src, "<span class='notice'>Sending you to [config.panic_server_name].</span>")
|
||||
winset(src, null, "command=.options")
|
||||
src << link("[config.panic_address]?redirect")
|
||||
qdel(src)
|
||||
@@ -281,7 +277,7 @@ var/next_external_rsc = 0
|
||||
if (config.notify_new_player_age >= 0)
|
||||
message_admins("New user: [key_name_admin(src)] is connecting here for the first time.")
|
||||
if (config.irc_first_connection_alert)
|
||||
send2irc("New-user", "[key_name(src)] is connecting for the first time!")
|
||||
send2irc_adminless_only("New-user", "[key_name(src)] is connecting for the first time!")
|
||||
|
||||
player_age = 0 // set it from -1 to 0 so the job selection code doesn't have a panic attack
|
||||
|
||||
@@ -303,7 +299,7 @@ var/next_external_rsc = 0
|
||||
screen += void
|
||||
|
||||
if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates.
|
||||
src << "<span class='info'>You have unread updates in the changelog.</span>"
|
||||
to_chat(src, "<span class='info'>You have unread updates in the changelog.</span>")
|
||||
if(config.aggressive_changelog)
|
||||
changelog()
|
||||
else
|
||||
@@ -311,14 +307,14 @@ var/next_external_rsc = 0
|
||||
|
||||
if(ckey in clientmessages)
|
||||
for(var/message in clientmessages[ckey])
|
||||
src << message
|
||||
to_chat(src, message)
|
||||
clientmessages.Remove(ckey)
|
||||
|
||||
if(config && config.autoconvert_notes)
|
||||
convert_notes_sql(ckey)
|
||||
src << get_message_output("message", ckey)
|
||||
to_chat(src, get_message_output("message", ckey))
|
||||
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
|
||||
src << "<span class='warning'>Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you.</span>"
|
||||
to_chat(src, "<span class='warning'>Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you.</span>")
|
||||
|
||||
|
||||
//This is down here because of the browse() calls in tooltip/New()
|
||||
@@ -355,12 +351,12 @@ var/next_external_rsc = 0
|
||||
|
||||
var/sql_ckey = sanitizeSQL(src.ckey)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
|
||||
if (!query.Execute())
|
||||
var/DBQuery/query_get_client_age = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
|
||||
if(!query_get_client_age.Execute())
|
||||
return
|
||||
|
||||
while (query.NextRow())
|
||||
player_age = text2num(query.item[2])
|
||||
while(query_get_client_age.NextRow())
|
||||
player_age = text2num(query_get_client_age.item[2])
|
||||
return
|
||||
|
||||
//no match mark it as a first connection for use in client/New()
|
||||
@@ -376,17 +372,18 @@ var/next_external_rsc = 0
|
||||
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
|
||||
var/DBQuery/query_ip = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = INET_ATON('[address]') AND ckey != '[sql_ckey]'")
|
||||
query_ip.Execute()
|
||||
var/DBQuery/query_get_ip = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = INET_ATON('[address]') AND ckey != '[sql_ckey]'")
|
||||
query_get_ip.Execute()
|
||||
related_accounts_ip = ""
|
||||
while(query_ip.NextRow())
|
||||
related_accounts_ip += "[query_ip.item[1]], "
|
||||
while(query_get_ip.NextRow())
|
||||
related_accounts_ip += "[query_get_ip.item[1]], "
|
||||
|
||||
var/DBQuery/query_cid = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE computerid = '[computer_id]' AND ckey != '[sql_ckey]'")
|
||||
query_cid.Execute()
|
||||
var/DBQuery/query_get_cid = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE computerid = '[computer_id]' AND ckey != '[sql_ckey]'")
|
||||
if(!query_get_cid.Execute())
|
||||
return
|
||||
related_accounts_cid = ""
|
||||
while (query_cid.NextRow())
|
||||
related_accounts_cid += "[query_cid.item[1]], "
|
||||
while (query_get_cid.NextRow())
|
||||
related_accounts_cid += "[query_get_cid.item[1]], "
|
||||
|
||||
var/admin_rank = "Player"
|
||||
if (src.holder && src.holder.rank)
|
||||
@@ -400,12 +397,14 @@ var/next_external_rsc = 0
|
||||
var/sql_admin_rank = sanitizeSQL(admin_rank)
|
||||
|
||||
|
||||
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), INET_ATON('[sql_ip]'), '[sql_computerid]', '[sql_admin_rank]') ON DUPLICATE KEY UPDATE lastseen = VALUES(lastseen), ip = VALUES(ip), computerid = VALUES(computerid), lastadminrank = VALUES(lastadminrank)")
|
||||
query_insert.Execute()
|
||||
var/DBQuery/query_log_player = dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), INET_ATON('[sql_ip]'), '[sql_computerid]', '[sql_admin_rank]') ON DUPLICATE KEY UPDATE lastseen = VALUES(lastseen), ip = VALUES(ip), computerid = VALUES(computerid), lastadminrank = VALUES(lastadminrank)")
|
||||
if(!query_log_player.Execute())
|
||||
return
|
||||
|
||||
//Logging player access
|
||||
var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]` (`id`,`datetime`,`server_ip`,`server_port`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),INET_ATON('[world.internet_address]'),'[world.port]','[sql_ckey]',INET_ATON('[sql_ip]'),'[sql_computerid]');")
|
||||
query_accesslog.Execute()
|
||||
|
||||
var/DBQuery/query_log_connection = dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]` (`id`,`datetime`,`server_ip`,`server_port`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),INET_ATON('[world.internet_address]'),'[world.port]','[sql_ckey]',INET_ATON('[sql_ip]'),'[sql_computerid]')")
|
||||
query_log_connection.Execute()
|
||||
|
||||
/client/proc/check_randomizer(topic)
|
||||
. = FALSE
|
||||
@@ -436,12 +435,12 @@ var/next_external_rsc = 0
|
||||
if (oldcid != computer_id) //IT CHANGED!!!
|
||||
cidcheck -= ckey //so they can try again after removing the cid randomizer.
|
||||
|
||||
src << "<span class='userdanger'>Connection Error:</span>"
|
||||
src << "<span class='danger'>Invalid ComputerID(spoofed). Please remove the ComputerID spoofer from your byond installation and try again.</span>"
|
||||
to_chat(src, "<span class='userdanger'>Connection Error:</span>")
|
||||
to_chat(src, "<span class='danger'>Invalid ComputerID(spoofed). Please remove the ComputerID spoofer from your byond installation and try again.</span>")
|
||||
|
||||
if (!cidcheck_failedckeys[ckey])
|
||||
message_admins("<span class='adminnotice'>[key_name(src)] has been detected as using a cid randomizer. Connection rejected.</span>")
|
||||
send2irc("CidRandomizer", "[key_name(src)] has been detected as using a cid randomizer. Connection rejected.")
|
||||
send2irc_adminless_only("CidRandomizer", "[key_name(src)] has been detected as using a cid randomizer. Connection rejected.")
|
||||
cidcheck_failedckeys[ckey] = TRUE
|
||||
note_randomizer_user()
|
||||
|
||||
@@ -452,7 +451,7 @@ var/next_external_rsc = 0
|
||||
else
|
||||
if (cidcheck_failedckeys[ckey])
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] has been allowed to connect after showing they removed their cid randomizer</span>")
|
||||
send2irc("CidRandomizer", "[key_name(src)] has been allowed to connect after showing they removed their cid randomizer.")
|
||||
send2irc_adminless_only("CidRandomizer", "[key_name(src)] has been allowed to connect after showing they removed their cid randomizer.")
|
||||
cidcheck_failedckeys -= ckey
|
||||
if (cidcheck_spoofckeys[ckey])
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] has been allowed to connect after appearing to have attempted to spoof a cid randomizer check because it <i>appears</i> they aren't spoofing one this time</span>")
|
||||
@@ -482,7 +481,7 @@ var/next_external_rsc = 0
|
||||
var/url = winget(src, null, "url")
|
||||
//special javascript to make them reconnect under a new window.
|
||||
src << browse("<a id='link' href='byond://[url]?token=[token]'>byond://[url]?token=[token]</a><script type='text/javascript'>document.getElementById(\"link\").click();window.location=\"byond://winset?command=.quit\"</script>", "border=0;titlebar=0;size=1x1")
|
||||
src << "<a href='byond://[url]?token=[token]'>You will be automatically taken to the game, if not, click here to be taken manually</a>"
|
||||
to_chat(src, "<a href='byond://[url]?token=[token]'>You will be automatically taken to the game, if not, click here to be taken manually</a>")
|
||||
|
||||
/client/proc/note_randomizer_user()
|
||||
var/const/adminckey = "CID-Error"
|
||||
@@ -490,19 +489,14 @@ var/next_external_rsc = 0
|
||||
//check to see if we noted them in the last day.
|
||||
var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT id FROM [format_table_name("messages")] WHERE type = 'note' AND targetckey = '[sql_ckey]' AND adminckey = '[adminckey]' AND timestamp + INTERVAL 1 DAY < NOW()")
|
||||
if(!query_get_notes.Execute())
|
||||
var/err = query_get_notes.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining id from messages table. Error : \[[err]\]\n")
|
||||
return
|
||||
if (query_get_notes.NextRow())
|
||||
if(query_get_notes.NextRow())
|
||||
return
|
||||
|
||||
//regardless of above, make sure their last note is not from us, as no point in repeating the same note over and over.
|
||||
query_get_notes = dbcon.NewQuery("SELECT adminckey FROM [format_table_name("messages")] WHERE targetckey = '[sql_ckey]' ORDER BY timestamp DESC LIMIT 1")
|
||||
if(!query_get_notes.Execute())
|
||||
var/err = query_get_notes.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining adminckey from notes table. Error : \[[err]\]\n")
|
||||
return
|
||||
if (query_get_notes.NextRow())
|
||||
if(query_get_notes.NextRow())
|
||||
if (query_get_notes.item[1] == adminckey)
|
||||
return
|
||||
create_message("note", sql_ckey, adminckey, "Detected as using a cid randomizer.", null, null, 0, 0)
|
||||
|
||||
@@ -128,7 +128,6 @@ var/list/preferences_datums = list()
|
||||
"womb_fluid" = "femcum"
|
||||
)//MAKE SURE TO UPDATE THE LIST IN MOBS.DM IF YOU'RE GOING TO ADD TO THIS LIST, OTHERWISE THINGS MIGHT GET FUCKEY
|
||||
|
||||
|
||||
var/list/custom_names = list("clown", "mime", "ai", "cyborg", "religion", "deity")
|
||||
var/prefered_security_department = SEC_DEPT_RANDOM
|
||||
|
||||
@@ -149,17 +148,12 @@ var/list/preferences_datums = list()
|
||||
var/job_engsec_med = 0
|
||||
var/job_engsec_low = 0
|
||||
|
||||
//citadel code
|
||||
var/arousable = TRUE //Allows players to disable arousal from the character creation menu
|
||||
|
||||
// Want randomjob if preferences already filled - Donkie
|
||||
var/joblessrole = BERANDOMJOB //defaults to 1 for fewer assistants
|
||||
|
||||
// 0 = character settings, 1 = game preferences, 2 = character appearance
|
||||
var/current_tab = 0
|
||||
|
||||
var/flavor_text = ""
|
||||
|
||||
// OOC Metadata:
|
||||
var/metadata = ""
|
||||
|
||||
@@ -169,10 +163,14 @@ var/list/preferences_datums = list()
|
||||
|
||||
var/clientfps = 0
|
||||
|
||||
var/parallax = PARALLAX_DISABLE //Starting disabled by default so people stop freaking about about certain issues.
|
||||
var/parallax
|
||||
|
||||
var/uplink_spawn_loc = UPLINK_PDA
|
||||
|
||||
//citadel code
|
||||
var/arousable = TRUE //Allows players to disable arousal from the character creation menu
|
||||
var/flavor_text = ""
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
parent = C
|
||||
custom_names["ai"] = pick(ai_names)
|
||||
@@ -211,7 +209,6 @@ var/list/preferences_datums = list()
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=2' [current_tab == 2 ? "class='linkOn'" : ""]>Character Appearance</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=1' [current_tab == 1 ? "class='linkOn'" : ""]>Game Preferences</a>"
|
||||
|
||||
|
||||
if(!path)
|
||||
dat += "<div class='notice'>Please create an account to save your preferences</div>"
|
||||
|
||||
@@ -324,22 +321,23 @@ var/list/preferences_datums = list()
|
||||
|
||||
dat += "<b>Ghosts of Others:</b> <a href='?_src_=prefs;task=input;preference=ghostothers'>[button_name]</a><br>"
|
||||
|
||||
if (SERVERTOOLS && config.maprotation)
|
||||
if (config.maprotation)
|
||||
var/p_map = preferred_map
|
||||
if (!p_map)
|
||||
p_map = "Default"
|
||||
if (config.defaultmap)
|
||||
p_map += " ([config.defaultmap.friendlyname])"
|
||||
p_map += " ([config.defaultmap.map_name])"
|
||||
else
|
||||
if (p_map in config.maplist)
|
||||
var/datum/votablemap/VM = config.maplist[p_map]
|
||||
var/datum/map_config/VM = config.maplist[p_map]
|
||||
if (!VM)
|
||||
p_map += " (No longer exists)"
|
||||
else
|
||||
p_map = VM.friendlyname
|
||||
p_map = VM.map_name
|
||||
else
|
||||
p_map += " (No longer exists)"
|
||||
dat += "<b>Preferred Map:</b> <a href='?_src_=prefs;preference=preferred_map;task=input'>[p_map]</a><br>"
|
||||
if(config.allow_map_voting)
|
||||
dat += "<b>Preferred Map:</b> <a href='?_src_=prefs;preference=preferred_map;task=input'>[p_map]</a><br>"
|
||||
|
||||
dat += "<b>FPS:</b> <a href='?_src_=prefs;preference=clientfps;task=input'>[clientfps]</a><br>"
|
||||
|
||||
@@ -514,7 +512,7 @@ var/list/preferences_datums = list()
|
||||
dat += "<a href='?_src_=prefs;preference=reset_all'>Reset Setup</a>"
|
||||
dat += "</center>"
|
||||
|
||||
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 750)
|
||||
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 770)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
|
||||
@@ -715,7 +713,7 @@ var/list/preferences_datums = list()
|
||||
return
|
||||
|
||||
if (!isnum(desiredLvl))
|
||||
user << "<span class='danger'>UpdateJobPreference - desired level was not a number. Please notify coders!</span>"
|
||||
to_chat(user, "<span class='danger'>UpdateJobPreference - desired level was not a number. Please notify coders!</span>")
|
||||
ShowChoices(user)
|
||||
return
|
||||
|
||||
@@ -782,10 +780,8 @@ var/list/preferences_datums = list()
|
||||
if(href_list["jobbancheck"])
|
||||
var/job = sanitizeSQL(href_list["jobbancheck"])
|
||||
var/sql_ckey = sanitizeSQL(user.ckey)
|
||||
var/DBQuery/query_get_jobban = dbcon.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND job = '[job]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
if(!query_get_jobban.Execute())
|
||||
var/err = query_get_jobban.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining reason from ban table. Error : \[[err]\]\n")
|
||||
var/DBQuery/query_get_jobban = dbcon.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[job]'")
|
||||
if(!query_get_jobban.warn_execute())
|
||||
return
|
||||
if(query_get_jobban.NextRow())
|
||||
var/reason = query_get_jobban.item[1]
|
||||
@@ -798,7 +794,7 @@ var/list/preferences_datums = list()
|
||||
if(text2num(duration) > 0)
|
||||
text += ". The ban is for [duration] minutes and expires on [expiration_time] (server time)"
|
||||
text += ".</span>"
|
||||
user << text
|
||||
to_chat(user, text)
|
||||
return
|
||||
|
||||
if(href_list["preference"] == "job")
|
||||
@@ -895,7 +891,7 @@ var/list/preferences_datums = list()
|
||||
if(new_name)
|
||||
real_name = new_name
|
||||
else
|
||||
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>"
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("age")
|
||||
var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null
|
||||
@@ -997,11 +993,7 @@ var/list/preferences_datums = list()
|
||||
eye_color = sanitize_hexcolor(new_eyes)
|
||||
|
||||
if("species")
|
||||
/* for(var/spath in subtypesof(/datum/species))
|
||||
var/datum/species/S = new spath()
|
||||
var/list/wlist = S.whitelist
|
||||
if(S.whitelisted && (wlist.Find(user.ckey) || wlist.Find(user.key) || user.client.holder)) //If your ckey is on the species whitelist or you're an admin:)
|
||||
roundstart_species[S.id] = S */
|
||||
|
||||
var/result = input(user, "Select a species", "Species Selection") as null|anything in roundstart_species
|
||||
|
||||
if(result)
|
||||
@@ -1025,7 +1017,7 @@ var/list/preferences_datums = list()
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
features["mcolor"] = sanitize_hexcolor(new_mutantcolor)
|
||||
else
|
||||
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
|
||||
to_chat(user, "<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
|
||||
if("mutant_color2")
|
||||
var/new_mutantcolor = input(user, "Choose your character's secondary alien/mutant color:", "Character Preference") as color|null
|
||||
@@ -1036,7 +1028,7 @@ var/list/preferences_datums = list()
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
features["mcolor2"] = sanitize_hexcolor(new_mutantcolor)
|
||||
else
|
||||
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
|
||||
to_chat(user, "<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
|
||||
if("mutant_color3")
|
||||
var/new_mutantcolor = input(user, "Choose your character's tertiary alien/mutant color:", "Character Preference") as color|null
|
||||
@@ -1047,7 +1039,7 @@ var/list/preferences_datums = list()
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
features["mcolor3"] = sanitize_hexcolor(new_mutantcolor)
|
||||
else
|
||||
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
|
||||
to_chat(user, "<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
|
||||
if("tail_lizard")
|
||||
var/new_tail
|
||||
@@ -1064,7 +1056,6 @@ var/list/preferences_datums = list()
|
||||
features["tail_human"] = new_tail
|
||||
if(new_tail != "None")
|
||||
features["taur"] = "None"
|
||||
|
||||
if("mam_tail")
|
||||
var/new_tail
|
||||
new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in mam_tails_list
|
||||
@@ -1184,73 +1175,74 @@ var/list/preferences_datums = list()
|
||||
if(new_backbag)
|
||||
backbag = new_backbag
|
||||
|
||||
if("uplink_loc")
|
||||
var/new_loc = input(user, "Choose your character's traitor uplink spawn location:", "Character Preference") as null|anything in uplink_spawn_loc_list
|
||||
if(new_loc)
|
||||
uplink_spawn_loc = new_loc
|
||||
|
||||
if("clown_name")
|
||||
var/new_clown_name = reject_bad_name( input(user, "Choose your character's clown name:", "Character Preference") as text|null )
|
||||
if(new_clown_name)
|
||||
custom_names["clown"] = new_clown_name
|
||||
else
|
||||
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>"
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("mime_name")
|
||||
var/new_mime_name = reject_bad_name( input(user, "Choose your character's mime name:", "Character Preference") as text|null )
|
||||
if(new_mime_name)
|
||||
custom_names["mime"] = new_mime_name
|
||||
else
|
||||
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>"
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("ai_name")
|
||||
var/new_ai_name = reject_bad_name( input(user, "Choose your character's AI name:", "Character Preference") as text|null, 1 )
|
||||
if(new_ai_name)
|
||||
custom_names["ai"] = new_ai_name
|
||||
else
|
||||
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .</font>"
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .</font>")
|
||||
|
||||
if("cyborg_name")
|
||||
var/new_cyborg_name = reject_bad_name( input(user, "Choose your character's cyborg name:", "Character Preference") as text|null, 1 )
|
||||
if(new_cyborg_name)
|
||||
custom_names["cyborg"] = new_cyborg_name
|
||||
else
|
||||
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .</font>"
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .</font>")
|
||||
|
||||
if("religion_name")
|
||||
var/new_religion_name = reject_bad_name( input(user, "Choose your character's religion:", "Character Preference") as text|null )
|
||||
if(new_religion_name)
|
||||
custom_names["religion"] = new_religion_name
|
||||
else
|
||||
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>"
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("deity_name")
|
||||
var/new_deity_name = reject_bad_name( input(user, "Choose your character's deity:", "Character Preference") as text|null )
|
||||
if(new_deity_name)
|
||||
custom_names["deity"] = new_deity_name
|
||||
else
|
||||
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>"
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("sec_dept")
|
||||
var/department = input(user, "Choose your prefered security department:", "Security Departments") as null|anything in security_depts_prefs
|
||||
if(department)
|
||||
prefered_security_department = department
|
||||
|
||||
if("uplink_loc")
|
||||
var/new_loc = input(user, "Choose your character's traitor uplink spawn location:", "Character Preference") as null|anything in uplink_spawn_loc_list
|
||||
if(new_loc)
|
||||
uplink_spawn_loc = new_loc
|
||||
|
||||
if ("preferred_map")
|
||||
var/maplist = list()
|
||||
var/default = "Default"
|
||||
if (config.defaultmap)
|
||||
default += " ([config.defaultmap.friendlyname])"
|
||||
default += " ([config.defaultmap.map_name])"
|
||||
for (var/M in config.maplist)
|
||||
var/datum/votablemap/VM = config.maplist[M]
|
||||
var/friendlyname = "[VM.friendlyname] "
|
||||
var/datum/map_config/VM = config.maplist[M]
|
||||
var/friendlyname = "[VM.map_name] "
|
||||
if (VM.voteweight <= 0)
|
||||
friendlyname += " (disabled)"
|
||||
maplist[friendlyname] = VM.name
|
||||
maplist[friendlyname] = VM.map_name
|
||||
maplist[default] = null
|
||||
var/pickedmap = input(user, "Choose your preferred map. This will be used to help weight random map selection.", "Character Preference") as null|anything in maplist
|
||||
if (pickedmap)
|
||||
preferred_map = maplist[pickedmap]
|
||||
|
||||
if ("clientfps")
|
||||
var/version_message
|
||||
if (user.client && user.client.byond_version < 511)
|
||||
@@ -1343,7 +1335,6 @@ var/list/preferences_datums = list()
|
||||
else
|
||||
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
|
||||
|
||||
|
||||
else
|
||||
switch(href_list["preference"])
|
||||
|
||||
@@ -1576,16 +1567,18 @@ var/list/preferences_datums = list()
|
||||
else if(firstspace == name_length)
|
||||
real_name += "[pick(last_names)]"
|
||||
|
||||
//citadel code
|
||||
character.canbearoused = arousable
|
||||
character.real_name = real_name
|
||||
character.name = character.real_name
|
||||
|
||||
character.flavor_text = flavor_text
|
||||
character.gender = gender
|
||||
character.age = age
|
||||
|
||||
character.eye_color = eye_color
|
||||
var/obj/item/organ/eyes/organ_eyes = character.getorgan(/obj/item/organ/eyes)
|
||||
if(organ_eyes)
|
||||
if(!initial(organ_eyes.eye_color))
|
||||
organ_eyes.eye_color = eye_color
|
||||
organ_eyes.old_eye_color = eye_color
|
||||
character.hair_color = hair_color
|
||||
character.facial_hair_color = facial_hair_color
|
||||
|
||||
@@ -1606,10 +1599,13 @@ var/list/preferences_datums = list()
|
||||
else
|
||||
chosen_species = /datum/species/human
|
||||
character.set_species(chosen_species, icon_update=0)
|
||||
|
||||
//citadel code
|
||||
character.give_genitals()
|
||||
character.flavor_text = flavor_text
|
||||
character.canbearoused = arousable
|
||||
|
||||
if(icon_updates)
|
||||
character.update_body()
|
||||
character.update_hair()
|
||||
character.update_body_parts()
|
||||
character.update_body_parts()
|
||||
|
||||
@@ -8,11 +8,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
This proc checks if the current directory of the savefile S needs updating
|
||||
It is to be used by the load_character and load_preferences procs.
|
||||
(S.cd=="/" is preferences, S.cd=="/character[integer]" is a character slot, etc)
|
||||
|
||||
if the current directory's version is below SAVEFILE_VERSION_MIN it will simply wipe everything in that directory
|
||||
(if we're at root "/" then it'll just wipe the entire savefile, for instance.)
|
||||
|
||||
if its version is below SAVEFILE_VERSION_MAX but above the minimum, it will load data but later call the
|
||||
respective update_preferences() or update_character() proc.
|
||||
Those procs allow coders to specify format changes so users do not lose their setups and have to redo them again.
|
||||
|
||||
Failing all that, the standard sanity checks are performed. They simply check the data is suitable, reverting to
|
||||
initial() values if necessary.
|
||||
*/
|
||||
@@ -273,7 +276,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
//Character
|
||||
S["OOC_Notes"] >> metadata
|
||||
S["flavor_text"] >> flavor_text
|
||||
S["real_name"] >> real_name
|
||||
S["name_is_always_random"] >> be_random_name
|
||||
S["body_is_always_random"] >> be_random_body
|
||||
@@ -290,16 +292,46 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["socks"] >> socks
|
||||
S["backbag"] >> backbag
|
||||
S["uplink_loc"] >> uplink_spawn_loc
|
||||
S["feature_exhibitionist"] >> features["exhibitionist"]
|
||||
S["feature_mcolor"] >> features["mcolor"]
|
||||
S["feature_mcolor2"] >> features["mcolor2"]
|
||||
S["feature_mcolor3"] >> features["mcolor3"]
|
||||
S["feature_lizard_tail"] >> features["tail_lizard"]
|
||||
S["feature_lizard_snout"] >> features["snout"]
|
||||
S["feature_lizard_horns"] >> features["horns"]
|
||||
S["feature_lizard_frills"] >> features["frills"]
|
||||
S["feature_lizard_spines"] >> features["spines"]
|
||||
S["feature_lizard_body_markings"] >> features["body_markings"]
|
||||
S["feature_lizard_legs"] >> features["legs"]
|
||||
if(!config.mutant_humans)
|
||||
features["tail_human"] = "none"
|
||||
features["ears"] = "none"
|
||||
else
|
||||
S["feature_human_tail"] >> features["tail_human"]
|
||||
S["feature_human_ears"] >> features["ears"]
|
||||
S["clown_name"] >> custom_names["clown"]
|
||||
S["mime_name"] >> custom_names["mime"]
|
||||
S["ai_name"] >> custom_names["ai"]
|
||||
S["cyborg_name"] >> custom_names["cyborg"]
|
||||
S["religion_name"] >> custom_names["religion"]
|
||||
S["deity_name"] >> custom_names["deity"]
|
||||
S["prefered_security_department"] >> prefered_security_department
|
||||
|
||||
//Jobs
|
||||
S["joblessrole"] >> joblessrole
|
||||
S["job_civilian_high"] >> job_civilian_high
|
||||
S["job_civilian_med"] >> job_civilian_med
|
||||
S["job_civilian_low"] >> job_civilian_low
|
||||
S["job_medsci_high"] >> job_medsci_high
|
||||
S["job_medsci_med"] >> job_medsci_med
|
||||
S["job_medsci_low"] >> job_medsci_low
|
||||
S["job_engsec_high"] >> job_engsec_high
|
||||
S["job_engsec_med"] >> job_engsec_med
|
||||
S["job_engsec_low"] >> job_engsec_low
|
||||
|
||||
|
||||
//Citadel code
|
||||
S["flavor_text"] >> flavor_text
|
||||
S["feature_exhibitionist"] >> features["exhibitionist"]
|
||||
S["feature_mcolor2"] >> features["mcolor2"]
|
||||
S["feature_mcolor3"] >> features["mcolor3"]
|
||||
S["feature_mam_body_markings"] >> features["mam_body_markings"]
|
||||
S["feature_mam_tail"] >> features["mam_tail"]
|
||||
S["feature_mam_ears"] >> features["mam_ears"]
|
||||
@@ -309,7 +341,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["feature_xeno_tail"] >> features["xenotail"]
|
||||
S["feature_xeno_dors"] >> features["xenodorsal"]
|
||||
S["feature_xeno_head"] >> features["xenohead"]
|
||||
S["feature_lizard_legs"] >> features["legs"]
|
||||
//cock features
|
||||
S["feature_has_cock"] >> features["has_cock"]
|
||||
S["feature_cock_shape"] >> features["cock_shape"]
|
||||
@@ -331,47 +362,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
//vagina features
|
||||
S["feature_has_vag"] >> features["has_vag"]
|
||||
S["feature_vag_color"] >> features["vag_color"]
|
||||
if(!config.mutant_humans)
|
||||
features["tail_human"] = "none"
|
||||
features["ears"] = "none"
|
||||
else
|
||||
S["feature_human_tail"] >> features["tail_human"]
|
||||
S["feature_human_ears"] >> features["ears"]
|
||||
S["clown_name"] >> custom_names["clown"]
|
||||
S["mime_name"] >> custom_names["mime"]
|
||||
S["ai_name"] >> custom_names["ai"]
|
||||
S["cyborg_name"] >> custom_names["cyborg"]
|
||||
S["religion_name"] >> custom_names["religion"]
|
||||
S["deity_name"] >> custom_names["deity"]
|
||||
S["prefered_security_department"] >> prefered_security_department
|
||||
|
||||
|
||||
//Jobs
|
||||
S["joblessrole"] >> joblessrole
|
||||
S["job_civilian_high"] >> job_civilian_high
|
||||
S["job_civilian_med"] >> job_civilian_med
|
||||
S["job_civilian_low"] >> job_civilian_low
|
||||
S["job_medsci_high"] >> job_medsci_high
|
||||
S["job_medsci_med"] >> job_medsci_med
|
||||
S["job_medsci_low"] >> job_medsci_low
|
||||
S["job_engsec_high"] >> job_engsec_high
|
||||
S["job_engsec_med"] >> job_engsec_med
|
||||
S["job_engsec_low"] >> job_engsec_low
|
||||
|
||||
//try to fix any outdated data if necessary
|
||||
if(needs_update >= 0)
|
||||
update_character(needs_update, S) //needs_update == savefile_version if we need an update (positive integer)
|
||||
|
||||
//Sanitize
|
||||
flavor_text = sanitize_text(flavor_text, initial(flavor_text))
|
||||
metadata = sanitize_text(metadata, initial(metadata))
|
||||
real_name = reject_bad_name(real_name)
|
||||
if(!features["mcolor"] || features["mcolor"] == "#000")
|
||||
features["mcolor"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
|
||||
if(!features["mcolor2"] || features["mcolor"] == "#000")
|
||||
features["mcolor2"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
|
||||
if(!features["mcolor3"] || features["mcolor"] == "#000")
|
||||
features["mcolor3"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
|
||||
if(!real_name)
|
||||
real_name = random_unique_name(gender)
|
||||
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
|
||||
@@ -399,8 +399,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
backbag = sanitize_inlist(backbag, backbaglist, initial(backbag))
|
||||
uplink_spawn_loc = sanitize_inlist(uplink_spawn_loc, uplink_spawn_loc_list, initial(uplink_spawn_loc))
|
||||
features["mcolor"] = sanitize_hexcolor(features["mcolor"], 3, 0)
|
||||
features["mcolor2"] = sanitize_hexcolor(features["mcolor2"], 3, 0)
|
||||
features["mcolor3"] = sanitize_hexcolor(features["mcolor3"], 3, 0)
|
||||
features["tail_lizard"] = sanitize_inlist(features["tail_lizard"], tails_list_lizard)
|
||||
features["tail_human"] = sanitize_inlist(features["tail_human"], tails_list_human, "None")
|
||||
features["snout"] = sanitize_inlist(features["snout"], snouts_list)
|
||||
@@ -409,6 +407,27 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
features["frills"] = sanitize_inlist(features["frills"], frills_list)
|
||||
features["spines"] = sanitize_inlist(features["spines"], spines_list)
|
||||
features["body_markings"] = sanitize_inlist(features["body_markings"], body_markings_list)
|
||||
features["feature_lizard_legs"] = sanitize_inlist(features["legs"], legs_list, "Normal Legs")
|
||||
|
||||
joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))
|
||||
job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high))
|
||||
job_civilian_med = sanitize_integer(job_civilian_med, 0, 65535, initial(job_civilian_med))
|
||||
job_civilian_low = sanitize_integer(job_civilian_low, 0, 65535, initial(job_civilian_low))
|
||||
job_medsci_high = sanitize_integer(job_medsci_high, 0, 65535, initial(job_medsci_high))
|
||||
job_medsci_med = sanitize_integer(job_medsci_med, 0, 65535, initial(job_medsci_med))
|
||||
job_medsci_low = sanitize_integer(job_medsci_low, 0, 65535, initial(job_medsci_low))
|
||||
job_engsec_high = sanitize_integer(job_engsec_high, 0, 65535, initial(job_engsec_high))
|
||||
job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med))
|
||||
job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low))
|
||||
|
||||
//Citadel
|
||||
flavor_text = sanitize_text(flavor_text, initial(flavor_text))
|
||||
if(!features["mcolor2"] || features["mcolor"] == "#000")
|
||||
features["mcolor2"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
|
||||
if(!features["mcolor3"] || features["mcolor"] == "#000")
|
||||
features["mcolor3"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
|
||||
features["mcolor2"] = sanitize_hexcolor(features["mcolor2"], 3, 0)
|
||||
features["mcolor3"] = sanitize_hexcolor(features["mcolor3"], 3, 0)
|
||||
features["mam_body_markings"] = sanitize_inlist(features["mam_body_markings"], mam_body_markings_list)
|
||||
features["mam_ears"] = sanitize_inlist(features["mam_ears"], mam_ears_list)
|
||||
features["mam_tail"] = sanitize_inlist(features["mam_tail"], mam_tails_list)
|
||||
@@ -417,7 +436,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
features["xenotail"] = sanitize_inlist(features["xenotail"], xeno_tail_list)
|
||||
features["xenohead"] = sanitize_inlist(features["xenohead"], xeno_head_list)
|
||||
features["xenodorsal"] = sanitize_inlist(features["xenodorsal"], xeno_dorsal_list)
|
||||
features["feature_lizard_legs"] = sanitize_inlist(features["legs"], legs_list, "Normal Legs")
|
||||
//cock features
|
||||
features["has_cock"] = sanitize_integer(features["has_cock"], 0, 1, 0)
|
||||
features["cock_shape"] = sanitize_inlist(features["cock_shape"], cock_shapes_list, "Human")
|
||||
@@ -438,16 +456,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
features["has_vag"] = sanitize_integer(features["has_vag"], 0, 1, 0)
|
||||
features["vag_color"] = sanitize_hexcolor(features["vag_color"], 3, 0)
|
||||
|
||||
joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))
|
||||
job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high))
|
||||
job_civilian_med = sanitize_integer(job_civilian_med, 0, 65535, initial(job_civilian_med))
|
||||
job_civilian_low = sanitize_integer(job_civilian_low, 0, 65535, initial(job_civilian_low))
|
||||
job_medsci_high = sanitize_integer(job_medsci_high, 0, 65535, initial(job_medsci_high))
|
||||
job_medsci_med = sanitize_integer(job_medsci_med, 0, 65535, initial(job_medsci_med))
|
||||
job_medsci_low = sanitize_integer(job_medsci_low, 0, 65535, initial(job_medsci_low))
|
||||
job_engsec_high = sanitize_integer(job_engsec_high, 0, 65535, initial(job_engsec_high))
|
||||
job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med))
|
||||
job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low))
|
||||
|
||||
return 1
|
||||
|
||||
@@ -479,12 +487,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["socks"] << socks
|
||||
S["backbag"] << backbag
|
||||
S["uplink_loc"] << uplink_spawn_loc
|
||||
S["flavor_text"] << flavor_text
|
||||
S["species"] << pref_species.id
|
||||
S["feature_exhibitionist"] << features["exhibitionist"]
|
||||
S["feature_mcolor"] << features["mcolor"]
|
||||
S["feature_mcolor2"] << features["mcolor2"]
|
||||
S["feature_mcolor3"] << features["mcolor3"]
|
||||
S["feature_lizard_tail"] << features["tail_lizard"]
|
||||
S["feature_human_tail"] << features["tail_human"]
|
||||
S["feature_lizard_snout"] << features["snout"]
|
||||
@@ -493,6 +497,32 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["feature_lizard_frills"] << features["frills"]
|
||||
S["feature_lizard_spines"] << features["spines"]
|
||||
S["feature_lizard_body_markings"] << features["body_markings"]
|
||||
S["feature_lizard_legs"] << features["legs"]
|
||||
S["clown_name"] << custom_names["clown"]
|
||||
S["mime_name"] << custom_names["mime"]
|
||||
S["ai_name"] << custom_names["ai"]
|
||||
S["cyborg_name"] << custom_names["cyborg"]
|
||||
S["religion_name"] << custom_names["religion"]
|
||||
S["deity_name"] << custom_names["deity"]
|
||||
S["prefered_security_department"] << prefered_security_department
|
||||
|
||||
//Jobs
|
||||
S["joblessrole"] << joblessrole
|
||||
S["job_civilian_high"] << job_civilian_high
|
||||
S["job_civilian_med"] << job_civilian_med
|
||||
S["job_civilian_low"] << job_civilian_low
|
||||
S["job_medsci_high"] << job_medsci_high
|
||||
S["job_medsci_med"] << job_medsci_med
|
||||
S["job_medsci_low"] << job_medsci_low
|
||||
S["job_engsec_high"] << job_engsec_high
|
||||
S["job_engsec_med"] << job_engsec_med
|
||||
S["job_engsec_low"] << job_engsec_low
|
||||
|
||||
//Citadel
|
||||
S["flavor_text"] << flavor_text
|
||||
S["feature_exhibitionist"] << features["exhibitionist"]
|
||||
S["feature_mcolor2"] << features["mcolor2"]
|
||||
S["feature_mcolor3"] << features["mcolor3"]
|
||||
S["feature_mam_body_markings"] << features["mam_body_markings"]
|
||||
S["feature_mam_tail"] << features["mam_tail"]
|
||||
S["feature_mam_ears"] << features["mam_ears"]
|
||||
@@ -502,14 +532,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["feature_xeno_tail"] << features["xenotail"]
|
||||
S["feature_xeno_dors"] << features["xenodorsal"]
|
||||
S["feature_xeno_head"] << features["xenohead"]
|
||||
S["feature_lizard_legs"] << features["legs"]
|
||||
S["clown_name"] << custom_names["clown"]
|
||||
S["mime_name"] << custom_names["mime"]
|
||||
S["ai_name"] << custom_names["ai"]
|
||||
S["cyborg_name"] << custom_names["cyborg"]
|
||||
S["religion_name"] << custom_names["religion"]
|
||||
S["deity_name"] << custom_names["deity"]
|
||||
S["prefered_security_department"] << prefered_security_department
|
||||
//cock features
|
||||
S["feature_has_cock"] << features["has_cock"]
|
||||
S["feature_cock_shape"] << features["cock_shape"]
|
||||
@@ -532,18 +554,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["feature_has_vag"] << features["has_vag"]
|
||||
S["feature_vag_color"] << features["vag_color"]
|
||||
|
||||
//Jobs
|
||||
S["joblessrole"] << joblessrole
|
||||
S["job_civilian_high"] << job_civilian_high
|
||||
S["job_civilian_med"] << job_civilian_med
|
||||
S["job_civilian_low"] << job_civilian_low
|
||||
S["job_medsci_high"] << job_medsci_high
|
||||
S["job_medsci_med"] << job_medsci_med
|
||||
S["job_medsci_low"] << job_medsci_low
|
||||
S["job_engsec_high"] << job_engsec_high
|
||||
S["job_engsec_med"] << job_engsec_med
|
||||
S["job_engsec_low"] << job_engsec_low
|
||||
|
||||
return 1
|
||||
|
||||
#undef SAVEFILE_VERSION_MAX
|
||||
@@ -559,4 +569,4 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
/client/verb/savefile_import(path as text)
|
||||
var/savefile/S = new /savefile(path)
|
||||
S.ImportText("/",file("[path].txt"))
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle Between seeing all mob speech, and only speech of nearby mobs"
|
||||
prefs.chat_toggles ^= CHAT_GHOSTEARS
|
||||
src << "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"]."
|
||||
to_chat(src, "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"].")
|
||||
prefs.save_preferences()
|
||||
feedback_add_details("admin_verb","TGE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle Between seeing all mob emotes, and only emotes of nearby mobs"
|
||||
prefs.chat_toggles ^= CHAT_GHOSTSIGHT
|
||||
src << "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"]."
|
||||
to_chat(src, "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"].")
|
||||
prefs.save_preferences()
|
||||
feedback_add_details("admin_verb","TGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle between hearing all whispers, and only whispers of nearby mobs"
|
||||
prefs.chat_toggles ^= CHAT_GHOSTWHISPER
|
||||
src << "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTWHISPER) ? "see all whispers in the world" : "only see whispers from nearby mobs"]."
|
||||
to_chat(src, "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTWHISPER) ? "see all whispers in the world" : "only see whispers from nearby mobs"].")
|
||||
prefs.save_preferences()
|
||||
feedback_add_details("admin_verb","TGW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
set category = "Preferences"
|
||||
set desc = ".Enable or disable hearing radio chatter as a ghost"
|
||||
prefs.chat_toggles ^= CHAT_GHOSTRADIO
|
||||
src << "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTRADIO) ? "see radio chatter" : "not see radio chatter"]."
|
||||
to_chat(src, "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTRADIO) ? "see radio chatter" : "not see radio chatter"].")
|
||||
prefs.save_preferences()
|
||||
feedback_add_details("admin_verb","TGR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //social experiment, increase the generation whenever you copypaste this shamelessly GENERATION 1
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle Between seeing all mob pda messages, and only pda messages of nearby mobs"
|
||||
prefs.chat_toggles ^= CHAT_GHOSTPDA
|
||||
src << "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTPDA) ? "see all pda messages in the world" : "only see pda messages from nearby mobs"]."
|
||||
to_chat(src, "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTPDA) ? "see all pda messages in the world" : "only see pda messages from nearby mobs"].")
|
||||
prefs.save_preferences()
|
||||
feedback_add_details("admin_verb","TGP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
if(!holder) return
|
||||
prefs.chat_toggles ^= CHAT_RADIO
|
||||
prefs.save_preferences()
|
||||
usr << "You will [(prefs.chat_toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from nearby radios or speakers"
|
||||
to_chat(usr, "You will [(prefs.chat_toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from nearby radios or speakers")
|
||||
feedback_add_details("admin_verb","THR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_deathrattle()
|
||||
@@ -61,9 +61,7 @@
|
||||
die."
|
||||
prefs.toggles ^= DISABLE_DEATHRATTLE
|
||||
prefs.save_preferences()
|
||||
usr << "You will \
|
||||
[(prefs.toggles & DISABLE_DEATHRATTLE) ? "no longer" : "now"] get \
|
||||
messages when a sentient mob dies."
|
||||
to_chat(usr, "You will [(prefs.toggles & DISABLE_DEATHRATTLE) ? "no longer" : "now"] get messages when a sentient mob dies.")
|
||||
feedback_add_details("admin_verb", "TDR") // If you are copy-pasting this, maybe you should spend some time reading the comments.
|
||||
|
||||
/client/verb/toggle_arrivalrattle()
|
||||
@@ -72,9 +70,7 @@
|
||||
set desc = "Toggle recieving a message in deadchat when someone joins \
|
||||
the station."
|
||||
prefs.toggles ^= DISABLE_ARRIVALRATTLE
|
||||
usr << "You will \
|
||||
[(prefs.toggles & DISABLE_ARRIVALRATTLE) ? "no longer" : "now"] get \
|
||||
messages when someone joins the station."
|
||||
to_chat(usr, "You will [(prefs.toggles & DISABLE_ARRIVALRATTLE) ? "no longer" : "now"] get messages when someone joins the station.")
|
||||
prefs.save_preferences()
|
||||
feedback_add_details("admin_verb", "TAR") // If you are copy-pasting this, maybe you should rethink where your life went so wrong.
|
||||
|
||||
@@ -86,7 +82,7 @@
|
||||
return
|
||||
prefs.toggles ^= SOUND_ADMINHELP
|
||||
prefs.save_preferences()
|
||||
usr << "You will [(prefs.toggles & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive."
|
||||
to_chat(usr, "You will [(prefs.toggles & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive.")
|
||||
feedback_add_details("admin_verb","AHS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggleannouncelogin()
|
||||
@@ -97,7 +93,7 @@
|
||||
return
|
||||
prefs.toggles ^= ANNOUNCE_LOGIN
|
||||
prefs.save_preferences()
|
||||
usr << "You will [(prefs.toggles & ANNOUNCE_LOGIN) ? "now" : "no longer"] have an announcement to other admins when you login."
|
||||
to_chat(usr, "You will [(prefs.toggles & ANNOUNCE_LOGIN) ? "now" : "no longer"] have an announcement to other admins when you login.")
|
||||
feedback_add_details("admin_verb","TAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/deadchat()
|
||||
@@ -106,7 +102,7 @@
|
||||
set desc ="Toggles seeing deadchat"
|
||||
prefs.chat_toggles ^= CHAT_DEAD
|
||||
prefs.save_preferences()
|
||||
src << "You will [(prefs.chat_toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat."
|
||||
to_chat(src, "You will [(prefs.chat_toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat.")
|
||||
feedback_add_details("admin_verb","TDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggleprayers()
|
||||
@@ -115,7 +111,7 @@
|
||||
set desc = "Toggles seeing prayers"
|
||||
prefs.chat_toggles ^= CHAT_PRAYER
|
||||
prefs.save_preferences()
|
||||
src << "You will [(prefs.chat_toggles & CHAT_PRAYER) ? "now" : "no longer"] see prayerchat."
|
||||
to_chat(src, "You will [(prefs.chat_toggles & CHAT_PRAYER) ? "now" : "no longer"] see prayerchat.")
|
||||
feedback_add_details("admin_verb","TP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggleprayersounds()
|
||||
@@ -125,9 +121,9 @@
|
||||
prefs.toggles ^= SOUND_PRAYERS
|
||||
prefs.save_preferences()
|
||||
if(prefs.toggles & SOUND_PRAYERS)
|
||||
src << "You will now hear prayer sounds."
|
||||
to_chat(src, "You will now hear prayer sounds.")
|
||||
else
|
||||
src << "You will no longer prayer sounds."
|
||||
to_chat(src, "You will no longer prayer sounds.")
|
||||
feedback_add_details("admin_verb", "PSounds")
|
||||
|
||||
/client/verb/togglemidroundantag()
|
||||
@@ -136,7 +132,7 @@
|
||||
set desc = "Toggles whether or not you will be considered for antagonist status given during a round."
|
||||
prefs.toggles ^= MIDROUND_ANTAG
|
||||
prefs.save_preferences()
|
||||
src << "You will [(prefs.toggles & MIDROUND_ANTAG) ? "now" : "no longer"] be considered for midround antagonist positions."
|
||||
to_chat(src, "You will [(prefs.toggles & MIDROUND_ANTAG) ? "now" : "no longer"] be considered for midround antagonist positions.")
|
||||
feedback_add_details("admin_verb","TMidroundA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggletitlemusic()
|
||||
@@ -146,11 +142,11 @@
|
||||
prefs.toggles ^= SOUND_LOBBY
|
||||
prefs.save_preferences()
|
||||
if(prefs.toggles & SOUND_LOBBY)
|
||||
src << "You will now hear music in the game lobby."
|
||||
to_chat(src, "You will now hear music in the game lobby.")
|
||||
if(isnewplayer(mob))
|
||||
playtitlemusic()
|
||||
else
|
||||
src << "You will no longer hear music in the game lobby."
|
||||
to_chat(src, "You will no longer hear music in the game lobby.")
|
||||
if(isnewplayer(mob))
|
||||
mob.stopLobbySound()
|
||||
feedback_add_details("admin_verb","TLobby") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -162,14 +158,14 @@
|
||||
prefs.toggles ^= SOUND_MIDI
|
||||
prefs.save_preferences()
|
||||
if(prefs.toggles & SOUND_MIDI)
|
||||
src << "You will now hear any sounds uploaded by admins."
|
||||
to_chat(src, "You will now hear any sounds uploaded by admins.")
|
||||
if(admin_sound)
|
||||
src << admin_sound
|
||||
to_chat(src, admin_sound)
|
||||
else
|
||||
src << "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled."
|
||||
to_chat(src, "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled.")
|
||||
if(admin_sound && !(admin_sound.status & SOUND_PAUSED))
|
||||
admin_sound.status |= SOUND_PAUSED
|
||||
src << admin_sound
|
||||
to_chat(src, admin_sound)
|
||||
admin_sound.status ^= SOUND_PAUSED
|
||||
feedback_add_details("admin_verb","TMidi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -186,7 +182,7 @@
|
||||
set desc = "Toggles seeing OutOfCharacter chat"
|
||||
prefs.chat_toggles ^= CHAT_OOC
|
||||
prefs.save_preferences()
|
||||
src << "You will [(prefs.chat_toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel."
|
||||
to_chat(src, "You will [(prefs.chat_toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel.")
|
||||
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/Toggle_Soundscape() //All new ambience should be added here so it works with this verb until someone better at things comes up with a fix that isn't awful
|
||||
@@ -196,9 +192,9 @@
|
||||
prefs.toggles ^= SOUND_AMBIENCE
|
||||
prefs.save_preferences()
|
||||
if(prefs.toggles & SOUND_AMBIENCE)
|
||||
src << "You will now hear ambient sounds."
|
||||
to_chat(src, "You will now hear ambient sounds.")
|
||||
else
|
||||
src << "You will no longer hear ambient sounds."
|
||||
to_chat(src, "You will no longer hear ambient sounds.")
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 1)
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
|
||||
feedback_add_details("admin_verb","TAmbi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -211,9 +207,9 @@
|
||||
prefs.toggles ^= SOUND_INSTRUMENTS
|
||||
prefs.save_preferences()
|
||||
if(prefs.toggles & SOUND_INSTRUMENTS)
|
||||
src << "You will now hear people playing musical instruments."
|
||||
to_chat(src, "You will now hear people playing musical instruments.")
|
||||
else
|
||||
src << "You will no longer hear musical instruments."
|
||||
to_chat(src, "You will no longer hear musical instruments.")
|
||||
feedback_add_details("admin_verb","TInstru") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
//Lots of people get headaches from the normal ship ambience, this is to prevent that
|
||||
@@ -224,9 +220,9 @@
|
||||
prefs.toggles ^= SOUND_SHIP_AMBIENCE
|
||||
prefs.save_preferences()
|
||||
if(prefs.toggles & SOUND_SHIP_AMBIENCE)
|
||||
src << "You will now hear ship ambience."
|
||||
to_chat(src, "You will now hear ship ambience.")
|
||||
else
|
||||
src << "You will no longer hear ship ambience."
|
||||
to_chat(src, "You will no longer hear ship ambience.")
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
|
||||
src.ambience_playing = 0
|
||||
feedback_add_details("admin_verb", "SAmbi") //If you are copy-pasting this, I bet you read this comment expecting to see the same thing :^)
|
||||
@@ -315,7 +311,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle between directly clicking the desired intent or clicking to rotate through."
|
||||
prefs.toggles ^= INTENT_STYLE
|
||||
src << "[(prefs.toggles & INTENT_STYLE) ? "Clicking directly on intents selects them." : "Clicking on intents rotates selection clockwise."]"
|
||||
to_chat(src, "[(prefs.toggles & INTENT_STYLE) ? "Clicking directly on intents selects them." : "Clicking on intents rotates selection clockwise."]")
|
||||
prefs.save_preferences()
|
||||
feedback_add_details("admin_verb","ITENTS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -332,7 +328,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
||||
set desc = "Hide/Show Ghost HUD"
|
||||
|
||||
prefs.ghost_hud = !prefs.ghost_hud
|
||||
src << "Ghost HUD will now be [prefs.ghost_hud ? "visible" : "hidden"]."
|
||||
to_chat(src, "Ghost HUD will now be [prefs.ghost_hud ? "visible" : "hidden"].")
|
||||
prefs.save_preferences()
|
||||
if(isobserver(mob))
|
||||
mob.hud_used.show_hud()
|
||||
@@ -345,15 +341,15 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
||||
prefs.inquisitive_ghost = !prefs.inquisitive_ghost
|
||||
prefs.save_preferences()
|
||||
if(prefs.inquisitive_ghost)
|
||||
src << "<span class='notice'>You will now examine everything you click on.</span>"
|
||||
to_chat(src, "<span class='notice'>You will now examine everything you click on.</span>")
|
||||
else
|
||||
src << "<span class='notice'>You will no longer examine things you click on.</span>"
|
||||
to_chat(src, "<span class='notice'>You will no longer examine things you click on.</span>")
|
||||
|
||||
/client/verb/toggle_announcement_sound()
|
||||
set name = "Hear/Silence Announcements"
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggles hearing Central Command, Captain, VOX, and other announcement sounds"
|
||||
prefs.toggles ^= SOUND_ANNOUNCEMENTS
|
||||
src << "You will now [(prefs.toggles & SOUND_ANNOUNCEMENTS) ? "hear announcement sounds" : "no longer hear announcements"]."
|
||||
to_chat(src, "You will now [(prefs.toggles & SOUND_ANNOUNCEMENTS) ? "hear announcement sounds" : "no longer hear announcements"].")
|
||||
prefs.save_preferences()
|
||||
feedback_add_details("admin_verb","TAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
set category = "OOC"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
if(!mob)
|
||||
return
|
||||
|
||||
if(IsGuestKey(key))
|
||||
src << "Guests may not use OOC."
|
||||
to_chat(src, "Guests may not use OOC.")
|
||||
return
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
@@ -26,32 +26,33 @@
|
||||
return
|
||||
|
||||
if(!(prefs.chat_toggles & CHAT_OOC))
|
||||
src << "<span class='danger'>You have OOC muted.</span>"
|
||||
to_chat(src, "<span class='danger'>You have OOC muted.</span>")
|
||||
return
|
||||
|
||||
if(!holder)
|
||||
if(!ooc_allowed)
|
||||
src << "<span class='danger'>OOC is globally muted.</span>"
|
||||
to_chat(src, "<span class='danger'>OOC is globally muted.</span>")
|
||||
return
|
||||
if(!dooc_allowed && (mob.stat == DEAD))
|
||||
usr << "<span class='danger'>OOC for dead mobs has been turned off.</span>"
|
||||
to_chat(usr, "<span class='danger'>OOC for dead mobs has been turned off.</span>")
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
src << "<span class='danger'>You cannot use OOC (muted).</span>"
|
||||
to_chat(src, "<span class='danger'>You cannot use OOC (muted).</span>")
|
||||
return
|
||||
if(src.mob)
|
||||
if(jobban_isbanned(src.mob, "OOC"))
|
||||
src << "<span class='danger'>You have been banned from OOC.</span>"
|
||||
to_chat(src, "<span class='danger'>You have been banned from OOC.</span>")
|
||||
return
|
||||
if(handle_spam_prevention(msg,MUTE_OOC))
|
||||
return
|
||||
if(findtext(msg, "byond://"))
|
||||
src << "<B>Advertising other servers is not allowed.</B>"
|
||||
to_chat(src, "<B>Advertising other servers is not allowed.</B>")
|
||||
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]")
|
||||
return
|
||||
|
||||
log_ooc("[mob.name]/[key] : [raw_msg]")
|
||||
mob.log_message("[key]: [raw_msg]", INDIVIDUAL_OOC_LOG)
|
||||
|
||||
var/keyname = key
|
||||
if(prefs.unlock_content)
|
||||
@@ -63,17 +64,13 @@
|
||||
if(holder)
|
||||
if(!holder.fakekey || C.holder)
|
||||
if(check_rights_for(src, R_ADMIN))
|
||||
C << "<span class='adminooc'>[config.allow_admin_ooccolor && prefs.ooccolor ? "<font color=[prefs.ooccolor]>" :"" ]<span class='prefix'>OOC:</span> <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
to_chat(C, "<span class='adminooc'>[config.allow_admin_ooccolor && prefs.ooccolor ? "<font color=[prefs.ooccolor]>" :"" ]<span class='prefix'>OOC:</span> <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span></font>")
|
||||
else
|
||||
C << "<span class='adminobserverooc'><span class='prefix'>OOC:</span> <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
|
||||
to_chat(C, "<span class='adminobserverooc'><span class='prefix'>OOC:</span> <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>")
|
||||
else
|
||||
C << "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[holder.fakekey ? holder.fakekey : key]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
|
||||
else if(check_mentor()) //mentors
|
||||
C << "<font color='#FF3E96'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[keyname]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
|
||||
to_chat(C, "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[holder.fakekey ? holder.fakekey : key]:</EM> <span class='message'>[msg]</span></span></font>")
|
||||
else if(!(key in C.prefs.ignoring))
|
||||
C << "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[keyname]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
to_chat(C, "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[keyname]:</EM> <span class='message'>[msg]</span></span></font>")
|
||||
|
||||
/proc/toggle_ooc(toggle = null)
|
||||
if(toggle != null) //if we're specifically en/disabling ooc
|
||||
@@ -83,7 +80,7 @@
|
||||
return
|
||||
else //otherwise just toggle it
|
||||
ooc_allowed = !ooc_allowed
|
||||
world << "<B>The OOC channel has been globally [ooc_allowed ? "enabled" : "disabled"].</B>"
|
||||
to_chat(world, "<B>The OOC channel has been globally [ooc_allowed ? "enabled" : "disabled"].</B>")
|
||||
|
||||
var/global/normal_ooc_colour = OOC_COLOR
|
||||
|
||||
@@ -133,9 +130,9 @@ var/global/normal_ooc_colour = OOC_COLOR
|
||||
set desc ="Check the admin notice if it has been set"
|
||||
|
||||
if(admin_notice)
|
||||
src << "<span class='boldnotice'>Admin Notice:</span>\n \t [admin_notice]"
|
||||
to_chat(src, "<span class='boldnotice'>Admin Notice:</span>\n \t [admin_notice]")
|
||||
else
|
||||
src << "<span class='notice'>There are no admin notices at the moment.</span>"
|
||||
to_chat(src, "<span class='notice'>There are no admin notices at the moment.</span>")
|
||||
|
||||
/client/verb/motd()
|
||||
set name = "MOTD"
|
||||
@@ -143,9 +140,9 @@ var/global/normal_ooc_colour = OOC_COLOR
|
||||
set desc ="Check the Message of the Day"
|
||||
|
||||
if(join_motd)
|
||||
src << "<div class=\"motd\">[join_motd]</div>"
|
||||
to_chat(src, "<div class=\"motd\">[join_motd]</div>")
|
||||
else
|
||||
src << "<span class='notice'>The Message of the Day has not been set.</span>"
|
||||
to_chat(src, "<span class='notice'>The Message of the Day has not been set.</span>")
|
||||
|
||||
/client/proc/self_notes()
|
||||
set name = "View Admin Remarks"
|
||||
@@ -153,7 +150,7 @@ var/global/normal_ooc_colour = OOC_COLOR
|
||||
set desc = "View the notes that admins have written about you"
|
||||
|
||||
if(!config.see_own_notes)
|
||||
usr << "<span class='notice'>Sorry, that function is not enabled on this server.</span>"
|
||||
to_chat(usr, "<span class='notice'>Sorry, that function is not enabled on this server.</span>")
|
||||
return
|
||||
|
||||
browse_messages(null, usr.ckey, null, 1)
|
||||
@@ -164,7 +161,7 @@ var/global/normal_ooc_colour = OOC_COLOR
|
||||
prefs.ignoring -= C.key
|
||||
else
|
||||
prefs.ignoring |= C.key
|
||||
src << "You are [(C.key in prefs.ignoring) ? "now" : "no longer"] ignoring [C.key] on the OOC channel."
|
||||
to_chat(src, "You are [(C.key in prefs.ignoring) ? "now" : "no longer"] ignoring [C.key] on the OOC channel.")
|
||||
prefs.save_preferences()
|
||||
|
||||
/client/verb/select_ignore()
|
||||
@@ -176,6 +173,6 @@ var/global/normal_ooc_colour = OOC_COLOR
|
||||
if(!selection)
|
||||
return
|
||||
if(selection == src)
|
||||
src << "You can't ignore yourself."
|
||||
to_chat(src, "You can't ignore yourself.")
|
||||
return
|
||||
ignore_key(selection)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/client/verb/display_ping(time as num)
|
||||
set instant = TRUE
|
||||
set name = ".display_ping"
|
||||
src << "<span class='notice'>Round trip ping took [round(pingfromtime(time),1)]ms</span>"
|
||||
to_chat(src, "<span class='notice'>Round trip ping took [round(pingfromtime(time),1)]ms</span>")
|
||||
|
||||
/client/verb/ping()
|
||||
set name = "Ping"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/mob/living/carbon/human/verb/suicide()
|
||||
set hidden = 1
|
||||
return
|
||||
return // H U G B O X
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/oldkey = ckey
|
||||
@@ -126,7 +126,7 @@
|
||||
"<span class='notice'>[src] bleeps electronically.</span>")
|
||||
death(0)
|
||||
else
|
||||
src << "Aborting suicide attempt."
|
||||
to_chat(src, "Aborting suicide attempt.")
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/suicide()
|
||||
set hidden = 1
|
||||
@@ -162,18 +162,18 @@
|
||||
if(stat == CONSCIOUS)
|
||||
return TRUE
|
||||
else if(stat == DEAD)
|
||||
src << "You're already dead!"
|
||||
to_chat(src, "You're already dead!")
|
||||
else if(stat == UNCONSCIOUS)
|
||||
src << "You need to be conscious to suicide!"
|
||||
to_chat(src, "You need to be conscious to suicide!")
|
||||
return
|
||||
|
||||
/mob/living/carbon/canSuicide()
|
||||
if(!..())
|
||||
return
|
||||
if(!canmove || restrained()) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide
|
||||
src << "You can't commit suicide whilst restrained! ((You can type Ghost instead however.))"
|
||||
to_chat(src, "You can't commit suicide whilst restrained! ((You can type Ghost instead however.))")
|
||||
return
|
||||
if(has_brain_worms())
|
||||
src << "You can't bring yourself to commit suicide!"
|
||||
to_chat(src, "You can't bring yourself to commit suicide!")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
@@ -2,65 +2,59 @@
|
||||
set name = "Who"
|
||||
set category = "OOC"
|
||||
|
||||
var/msg = ""
|
||||
var/msg = "<b>Current Players:</b>\n"
|
||||
|
||||
var/list/Lines = list()
|
||||
|
||||
if(length(admins) > 0)
|
||||
Lines += "<b>Admins:</b>"
|
||||
for(var/client/C in sortList(admins))
|
||||
if(!C.holder.fakekey)
|
||||
Lines += "\t <font color='#FF0000'>[C.key]</font>[show_info(C)]"
|
||||
if(holder)
|
||||
if (check_rights(R_ADMIN,0) && isobserver(src.mob))//If they have +ADMIN and are a ghost they can see players IC names and statuses.
|
||||
var/mob/dead/observer/G = src.mob
|
||||
if(!G.started_as_observer)//If you aghost to do this, KorPhaeron will deadmin you in your sleep.
|
||||
log_admin("[key_name(usr)] checked advanced who in-round")
|
||||
for(var/client/C in clients)
|
||||
var/entry = "\t[C.key]"
|
||||
if(C.holder && C.holder.fakekey)
|
||||
entry += " <i>(as [C.holder.fakekey])</i>"
|
||||
if (isnewplayer(C.mob))
|
||||
entry += " - <font color='darkgray'><b>In Lobby</b></font>"
|
||||
else
|
||||
entry += " - Playing as [C.mob.real_name]"
|
||||
switch(C.mob.stat)
|
||||
if(UNCONSCIOUS)
|
||||
entry += " - <font color='darkgray'><b>Unconscious</b></font>"
|
||||
if(DEAD)
|
||||
if(isobserver(C.mob))
|
||||
var/mob/dead/observer/O = C.mob
|
||||
if(O.started_as_observer)
|
||||
entry += " - <font color='gray'>Observing</font>"
|
||||
else
|
||||
entry += " - <font color='black'><b>DEAD</b></font>"
|
||||
else
|
||||
entry += " - <font color='black'><b>DEAD</b></font>"
|
||||
if(is_special_character(C.mob))
|
||||
entry += " - <b><font color='red'>Antagonist</font></b>"
|
||||
entry += " (<A HREF='?_src_=holder;adminmoreinfo=\ref[C.mob]'>?</A>)"
|
||||
entry += " ([round(C.avgping, 1)]ms)"
|
||||
Lines += entry
|
||||
else//If they don't have +ADMIN, only show hidden admins
|
||||
for(var/client/C in clients)
|
||||
var/entry = "\t[C.key]"
|
||||
if(C.holder && C.holder.fakekey)
|
||||
entry += " <i>(as [C.holder.fakekey])</i>"
|
||||
entry += " ([round(C.avgping, 1)]ms)"
|
||||
Lines += entry
|
||||
else
|
||||
for(var/client/C in clients)
|
||||
if(C.holder && C.holder.fakekey)
|
||||
Lines += "[C.holder.fakekey] ([round(C.avgping, 1)]ms)"
|
||||
else
|
||||
Lines += "[C.key] ([round(C.avgping, 1)]ms)"
|
||||
|
||||
if(length(mentors) > 0)
|
||||
Lines += "<b>Mentors:</b>"
|
||||
for(var/client/C in sortList(clients))
|
||||
var/mentor = mentor_datums[C.ckey]
|
||||
if(mentor)
|
||||
Lines += "\t <font color='#0033CC'>[C.key]</font>[show_info(C)]"
|
||||
|
||||
Lines += "<b>Players:</b>"
|
||||
for(var/client/C in sortList(clients))
|
||||
if(!check_mentor_other(C) || (C.holder && C.holder.fakekey))
|
||||
Lines += "\t [C.key][show_info(C)]"
|
||||
|
||||
for(var/line in Lines)
|
||||
for(var/line in sortList(Lines))
|
||||
msg += "[line]\n"
|
||||
|
||||
msg += "<b>Total Players: [length(Lines)]</b>"
|
||||
src << msg
|
||||
|
||||
/client/proc/show_info(var/client/C)
|
||||
if(!C)
|
||||
return ""
|
||||
|
||||
if(!src.holder)
|
||||
return ""
|
||||
|
||||
var/entry = ""
|
||||
if(C.holder && C.holder.fakekey)
|
||||
entry += " <i>(as [C.holder.fakekey])</i>"
|
||||
if (isnewplayer(C.mob))
|
||||
entry += " - <font color='darkgray'><b>In Lobby</b></font>"
|
||||
else
|
||||
entry += " - Playing as [C.mob.real_name]"
|
||||
switch(C.mob.stat)
|
||||
if(UNCONSCIOUS)
|
||||
entry += " - <font color='darkgray'><b>Unconscious</b></font>"
|
||||
if(DEAD)
|
||||
if(isobserver(C.mob))
|
||||
var/mob/dead/observer/O = C.mob
|
||||
if(O.started_as_observer)
|
||||
entry += " - <font color='gray'>Observing</font>"
|
||||
else
|
||||
entry += " - <font color='black'><b>DEAD</b></font>"
|
||||
else
|
||||
entry += " - <font color='black'><b>DEAD</b></font>"
|
||||
if(is_special_character(C.mob))
|
||||
entry += " - <b><font color='red'>Antagonist</font></b>"
|
||||
entry += " (<A HREF='?_src_=holder;adminmoreinfo=\ref[C.mob]'>?</A>)"
|
||||
entry += " ([round(C.avgping, 1)]ms)"
|
||||
return entry
|
||||
to_chat(src, msg)
|
||||
|
||||
/client/verb/adminwho()
|
||||
set category = "Admin"
|
||||
@@ -90,8 +84,8 @@
|
||||
continue //Don't show afk admins to adminwho
|
||||
if(!C.holder.fakekey)
|
||||
msg += "\t[C] is a [C.holder.rank]\n"
|
||||
msg += "<span class='info'>Adminhelps are also sent to IRC. If no admins are available in game adminhelp anyways and an admin on IRC will see it and respond.</span>"
|
||||
src << msg
|
||||
msg += "<span class='info'>Adminhelps are also sent to Discord. If no admins are available in game adminhelp anyways and an admin on Discord will see it and respond.</span>"
|
||||
to_chat(src, msg)
|
||||
|
||||
/client/verb/mentorwho()
|
||||
set category = "Mentor"
|
||||
@@ -102,7 +96,7 @@
|
||||
if(holder)
|
||||
if(isobserver(C.mob))
|
||||
suffix += " - Observing"
|
||||
else if(istype(C.mob,/mob/new_player))
|
||||
else if(istype(C.mob,/mob/dead/new_player))
|
||||
suffix += " - Lobby"
|
||||
else
|
||||
suffix += " - Playing"
|
||||
@@ -110,4 +104,4 @@
|
||||
if(C.is_afk())
|
||||
suffix += " (AFK)"
|
||||
msg += "\t[C][suffix]\n"
|
||||
src << msg
|
||||
to_chat(src, msg)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
else if(istype(old_headgear,/obj/item/clothing/mask/chameleon/drone))
|
||||
new_headgear = new /obj/item/clothing/head/chameleon/drone()
|
||||
else
|
||||
owner << "<span class='warning'>You shouldn't be able to toggle a camogear helmetmask if you're not wearing it</span>"
|
||||
to_chat(owner, "<span class='warning'>You shouldn't be able to toggle a camogear helmetmask if you're not wearing it</span>")
|
||||
if(new_headgear)
|
||||
// Force drop the item in the headslot, even though
|
||||
// it's NODROP
|
||||
@@ -122,6 +122,9 @@
|
||||
update_item(picked_item)
|
||||
|
||||
/datum/action/item_action/chameleon/change/proc/update_look(mob/user, obj/item/picked_item)
|
||||
if(istype(target, /obj/item/weapon/gun/energy/laser/chameleon))
|
||||
var/obj/item/weapon/gun/energy/laser/chameleon/CG = target
|
||||
CG.get_chameleon_projectile(picked_item)
|
||||
if(isliving(user))
|
||||
var/mob/living/C = user
|
||||
if(C.stat != CONSCIOUS)
|
||||
@@ -153,6 +156,8 @@
|
||||
return 1
|
||||
|
||||
/datum/action/item_action/chameleon/change/proc/emp_randomise()
|
||||
if(istype(target, /obj/item/weapon/gun/energy/laser/chameleon))
|
||||
return //Please no crash!
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
random_look(owner)
|
||||
|
||||
@@ -355,7 +360,7 @@
|
||||
|
||||
/obj/item/clothing/mask/chameleon/attack_self(mob/user)
|
||||
vchange = !vchange
|
||||
user << "<span class='notice'>The voice changer is now [vchange ? "on" : "off"]!</span>"
|
||||
to_chat(user, "<span class='notice'>The voice changer is now [vchange ? "on" : "off"]!</span>")
|
||||
|
||||
|
||||
/obj/item/clothing/mask/chameleon/drone
|
||||
@@ -374,7 +379,7 @@
|
||||
randomise_action.UpdateButtonIcon()
|
||||
|
||||
/obj/item/clothing/mask/chameleon/drone/attack_self(mob/user)
|
||||
user << "<span class='notice'>The [src] does not have a voice changer.</span>"
|
||||
to_chat(user, "<span class='notice'>The [src] does not have a voice changer.</span>")
|
||||
|
||||
/obj/item/clothing/shoes/chameleon
|
||||
name = "black shoes"
|
||||
@@ -404,13 +409,20 @@
|
||||
/obj/item/weapon/gun/energy/laser/chameleon
|
||||
name = "practice laser gun"
|
||||
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/chameleon)
|
||||
clumsy_check = 0
|
||||
needs_permit = 0
|
||||
pin = /obj/item/device/firing_pin
|
||||
cell_type = /obj/item/weapon/stock_parts/cell/bluespace
|
||||
|
||||
var/datum/action/item_action/chameleon/change/chameleon_action
|
||||
var/list/chameleon_projectile_vars
|
||||
var/list/chameleon_ammo_vars
|
||||
var/list/chameleon_gun_vars
|
||||
var/list/projectile_copy_vars
|
||||
var/list/ammo_copy_vars
|
||||
var/list/gun_copy_vars
|
||||
var/badmin_mode = FALSE
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/chameleon/New()
|
||||
..()
|
||||
@@ -420,8 +432,96 @@
|
||||
chameleon_action.chameleon_blacklist = typecacheof(/obj/item/weapon/gun/magic, ignore_root_path = FALSE)
|
||||
chameleon_action.initialize_disguises()
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/chameleon/Initialize()
|
||||
..()
|
||||
projectile_copy_vars = list("name", "icon", "icon_state", "item_state", "speed", "color", "hitsound", "forcedodge", "impact_effect_type", "range", "suppressed", "hitsound_wall", "impact_effect_type", "pass_flags")
|
||||
chameleon_projectile_vars = list("name" = "practice laser", "icon" = 'icons/obj/projectiles.dmi', "icon_state" = "laser")
|
||||
gun_copy_vars = list("fire_sound", "burst_size", "fire_delay")
|
||||
chameleon_gun_vars = list()
|
||||
ammo_copy_vars = list("firing_effect_type")
|
||||
chameleon_ammo_vars = list()
|
||||
get_chameleon_projectile(/obj/item/weapon/gun/energy/laser)
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/chameleon/emp_act(severity)
|
||||
chameleon_action.emp_randomise()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/chameleon/proc/reset_chameleon_vars()
|
||||
chameleon_ammo_vars = list()
|
||||
chameleon_gun_vars = list()
|
||||
chameleon_projectile_vars = list()
|
||||
for(var/V in chambered.vars)
|
||||
chambered.vars[V] = initial(chambered.vars[V])
|
||||
qdel(chambered.BB)
|
||||
chambered.newshot()
|
||||
for(var/V in vars)
|
||||
vars[V] = initial(vars[V])
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/chameleon/proc/set_chameleon_ammo(obj/item/ammo_casing/AC, passthrough = TRUE, reset = FALSE)
|
||||
if(!istype(AC))
|
||||
CRASH("[AC] is not /obj/item/ammo_casing!")
|
||||
return FALSE
|
||||
for(var/V in ammo_copy_vars)
|
||||
if(AC.vars[V])
|
||||
chameleon_ammo_vars[V] = AC.vars[V]
|
||||
if(chambered.vars[V])
|
||||
chambered.vars[V] = AC.vars[V]
|
||||
if(passthrough)
|
||||
var/obj/item/projectile/P = AC.BB
|
||||
set_chameleon_projectile(P)
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/chameleon/proc/set_chameleon_projectile(obj/item/projectile/P)
|
||||
if(!istype(P))
|
||||
CRASH("[P] is not /obj/item/projectile!")
|
||||
return FALSE
|
||||
chameleon_projectile_vars = list("name" = "practice laser", "icon" = 'icons/obj/projectiles.dmi', "icon_state" = "laser")
|
||||
for(var/V in projectile_copy_vars)
|
||||
if(P.vars[V])
|
||||
chameleon_projectile_vars[V] = P.vars[V]
|
||||
if(istype(chambered, /obj/item/ammo_casing/energy/chameleon))
|
||||
var/obj/item/ammo_casing/energy/chameleon/AC = chambered
|
||||
AC.projectile_vars = chameleon_projectile_vars.Copy()
|
||||
if(badmin_mode)
|
||||
qdel(chambered.BB)
|
||||
chambered.projectile_type = P.type
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/chameleon/proc/set_chameleon_gun(obj/item/weapon/gun/G , passthrough = TRUE)
|
||||
if(!istype(G))
|
||||
CRASH("[G] is not /obj/item/weapon/gun!")
|
||||
return FALSE
|
||||
for(var/V in gun_copy_vars)
|
||||
if(vars[V] && G.vars[V])
|
||||
chameleon_gun_vars[V] = G.vars[V]
|
||||
vars[V] = G.vars[V]
|
||||
if(passthrough)
|
||||
if(istype(G, /obj/item/weapon/gun/ballistic))
|
||||
var/obj/item/weapon/gun/ballistic/BG = G
|
||||
var/obj/item/ammo_box/AB = new BG.mag_type(G)
|
||||
qdel(BG)
|
||||
if(!istype(AB)||!AB.ammo_type)
|
||||
qdel(AB)
|
||||
return FALSE
|
||||
var/obj/item/ammo_casing/AC = new AB.ammo_type(G)
|
||||
set_chameleon_ammo(AC)
|
||||
else if(istype(G, /obj/item/weapon/gun/magic))
|
||||
var/obj/item/weapon/gun/magic/MG = G
|
||||
var/obj/item/ammo_casing/AC = new MG.ammo_type(G)
|
||||
set_chameleon_ammo(AC)
|
||||
else if(istype(G, /obj/item/weapon/gun/energy))
|
||||
var/obj/item/weapon/gun/energy/EG = G
|
||||
if(islist(EG.ammo_type) && EG.ammo_type.len)
|
||||
var/obj/item/ammo_casing/AC = EG.ammo_type[1]
|
||||
set_chameleon_ammo(AC)
|
||||
else if(istype(G, /obj/item/weapon/gun/syringe))
|
||||
var/obj/item/ammo_casing/AC = new /obj/item/ammo_casing/syringegun(src)
|
||||
set_chameleon_ammo(AC)
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/chameleon/proc/get_chameleon_projectile(guntype)
|
||||
reset_chameleon_vars()
|
||||
var/obj/item/weapon/gun/G = new guntype(src)
|
||||
set_chameleon_gun(G)
|
||||
qdel(G)
|
||||
|
||||
/obj/item/weapon/storage/backpack/chameleon
|
||||
name = "backpack"
|
||||
@@ -437,6 +537,22 @@
|
||||
/obj/item/weapon/storage/backpack/chameleon/emp_act(severity)
|
||||
chameleon_action.emp_randomise()
|
||||
|
||||
/obj/item/weapon/storage/belt/chameleon
|
||||
name = "toolbelt"
|
||||
desc = "Holds tools."
|
||||
silent = 1
|
||||
var/datum/action/item_action/chameleon/change/chameleon_action
|
||||
|
||||
/obj/item/weapon/storage/belt/chameleon/New()
|
||||
..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action.chameleon_type = /obj/item/weapon/storage/belt
|
||||
chameleon_action.chameleon_name = "Belt"
|
||||
chameleon_action.initialize_disguises()
|
||||
|
||||
/obj/item/weapon/storage/belt/chameleon/emp_act(severity)
|
||||
chameleon_action.emp_randomise()
|
||||
|
||||
/obj/item/device/radio/headset/chameleon
|
||||
name = "radio headset"
|
||||
var/datum/action/item_action/chameleon/change/chameleon_action
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user