mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-25 17:41:56 +00:00
Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12
This commit is contained in:
@@ -92,7 +92,7 @@ obj/machinery/computer/forensic_scanning
|
||||
attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
var/isai = 0
|
||||
if(istype(usr,/mob/living/silicon))
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
|
||||
datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = -1, var/reason, var/job = "", var/rounds = 0)
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = -1, var/reason, var/job = "", var/rounds = 0, var/banckey = null)
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
return
|
||||
|
||||
@@ -43,6 +38,17 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
if(banned_mob.client)
|
||||
computerid = banned_mob.client.computer_id
|
||||
ip = banned_mob.client.address
|
||||
else if(banckey)
|
||||
ckey = ckey(banckey)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_player WHERE ckey = '[ckey]'")
|
||||
query.Execute()
|
||||
var/validckey = 0
|
||||
if(query.NextRow())
|
||||
validckey = 1
|
||||
if(!validckey)
|
||||
message_admins("<font color='red'>[key_name_admin(usr)] attempted to ban [ckey], but [ckey] has not been seen yet. Please only ban actual players.</font>",1)
|
||||
return
|
||||
|
||||
var/a_ckey
|
||||
var/a_computerid
|
||||
@@ -53,17 +59,15 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
a_computerid = src.owner:computer_id
|
||||
a_ip = src.owner:address
|
||||
|
||||
// var/list/client/clients = get_all_clients()
|
||||
var/who
|
||||
for(var/client/C in client_list)
|
||||
for(var/client/C in clients)
|
||||
if(!who)
|
||||
who = "[C]"
|
||||
else
|
||||
who += ", [C]"
|
||||
|
||||
var/list/client/admin_clients = get_all_admin_clients()
|
||||
var/adminwho
|
||||
for(var/client/C in admin_clients)
|
||||
for(var/client/C in admins)
|
||||
if(!adminwho)
|
||||
adminwho = "[C]"
|
||||
else
|
||||
@@ -74,17 +78,14 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
var/sql = "INSERT INTO erro_ban VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)"
|
||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||
query_insert.Execute()
|
||||
|
||||
dbcon.Disconnect()
|
||||
usr << "\blue Ban saved to database."
|
||||
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)
|
||||
|
||||
|
||||
|
||||
datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
var/bantype_str
|
||||
if(bantype)
|
||||
@@ -117,9 +118,7 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
||||
if(job)
|
||||
sql += " AND job = '[job]'"
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
return
|
||||
|
||||
@@ -148,27 +147,83 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
||||
|
||||
DB_ban_unban_by_id(ban_id)
|
||||
|
||||
datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
|
||||
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
if(!isnum(banid) || !istext(param))
|
||||
usr << "Cancelled"
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, duration, reason FROM erro_ban WHERE id = [banid]")
|
||||
query.Execute()
|
||||
|
||||
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]
|
||||
else
|
||||
usr << "Invalid ban id. Contact the database admin"
|
||||
return
|
||||
|
||||
reason = sql_sanitize_text(reason)
|
||||
var/value
|
||||
|
||||
switch(param)
|
||||
if("reason")
|
||||
if(!value)
|
||||
value = input("Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text
|
||||
value = sql_sanitize_text(value)
|
||||
if(!value)
|
||||
usr << "Cancelled"
|
||||
return
|
||||
|
||||
var/DBQuery/update_query = dbcon.NewQuery("UPDATE erro_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()
|
||||
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"
|
||||
return
|
||||
|
||||
var/DBQuery/update_query = dbcon.NewQuery("UPDATE erro_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]")
|
||||
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"
|
||||
return
|
||||
else
|
||||
usr << "Cancelled"
|
||||
return
|
||||
|
||||
datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/sql = "SELECT id FROM erro_ban WHERE id = [id]"
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
var/sql = "SELECT ckey FROM erro_ban WHERE id = [id]"
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
return
|
||||
|
||||
var/ban_number = 0 //failsafe
|
||||
|
||||
var/pckey
|
||||
var/DBQuery/query = dbcon.NewQuery(sql)
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
pckey = query.item[1]
|
||||
ban_number++;
|
||||
|
||||
if(ban_number == 0)
|
||||
@@ -187,7 +242,157 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
var/unban_ip = src.owner:address
|
||||
|
||||
var/sql_update = "UPDATE erro_ban SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = '[unban_ip]' WHERE id = [id]"
|
||||
|
||||
message_admins("[key_name_admin(usr)] has lifted [pckey]'s ban.",1)
|
||||
|
||||
var/DBQuery/query_update = dbcon.NewQuery(sql_update)
|
||||
query_update.Execute()
|
||||
query_update.Execute()
|
||||
|
||||
|
||||
/client/proc/DB_ban_panel()
|
||||
set category = "Admin"
|
||||
set name = "Banning Panel"
|
||||
set desc = "Edit admin permissions"
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
holder.DB_ban_panel()
|
||||
|
||||
|
||||
/datum/admins/proc/DB_ban_panel(var/playerckey = null, var/adminckey = null)
|
||||
if(!usr.client)
|
||||
return
|
||||
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "\red Failed to establish database connection"
|
||||
return
|
||||
|
||||
var/output = "<div align='center'><table width='90%'><tr>"
|
||||
|
||||
output += "<td width='35%' align='center'>"
|
||||
output += "<h1>Banning panel</h1>"
|
||||
output += "</td>"
|
||||
|
||||
output += "<td width='65%' align='center' bgcolor='#f9f9f9'>"
|
||||
|
||||
output += "<form method='GET' action='?src=\ref[src]'><b>Add custom ban:</b> (ONLY use this if you can't ban through any other method)"
|
||||
output += "<input type='hidden' name='src' value='\ref[src]'>"
|
||||
output += "<table width='100%'><tr>"
|
||||
output += "<td><b>Ban type:</b><select name='dbbanaddtype'>"
|
||||
output += "<option value=''>--</option>"
|
||||
output += "<option value='[BANTYPE_PERMA]'>PERMABAN</option>"
|
||||
output += "<option value='[BANTYPE_TEMP]'>TEMPBAN</option>"
|
||||
output += "<option value='[BANTYPE_JOB_PERMA]'>JOB PERMABAN</option>"
|
||||
output += "</select></td>"
|
||||
output += "<td><b>Ckey:</b> <input type='text' name='dbbanaddckey'></td></tr>"
|
||||
output += "<tr><td><b>Duration:</b> <input type='text' name='dbbaddduration'></td>"
|
||||
output += "<td><b>Job:</b><select name='dbbanaddjob'>"
|
||||
output += "<option value=''>--</option>"
|
||||
for(var/j in get_all_jobs())
|
||||
output += "<option value='[j]'>[j]</option>"
|
||||
output += "</select></td></tr></table>"
|
||||
output += "<b>Reason:<br></b><textarea name='dbbanreason' cols='50'></textarea><br>"
|
||||
output += "<input type='submit' value='Add ban'>"
|
||||
output += "</form>"
|
||||
|
||||
output += "</td>"
|
||||
output += "</tr>"
|
||||
output += "</table>"
|
||||
|
||||
output += "<form method='GET' action='?src=\ref[src]'><b>Search:</b> "
|
||||
output += "<input type='hidden' name='src' value='\ref[src]'>"
|
||||
output += "<b>Ckey:</b> <input type='text' name='dbsearchckey' value='[playerckey]'>"
|
||||
output += "<b>Admin ckey:</b> <input type='text' name='dbsearchadmin' value='[adminckey]'>"
|
||||
output += "<input type='submit' value='search'>"
|
||||
output += "</form>"
|
||||
output += "Please note that all jobban bans or unbans are in-effect the following round."
|
||||
|
||||
if(adminckey || playerckey)
|
||||
|
||||
var/blcolor = "#ffeeee" //banned light
|
||||
var/bdcolor = "#ffdddd" //banned dark
|
||||
var/ulcolor = "#eeffee" //unbanned light
|
||||
var/udcolor = "#ddffdd" //unbanned dark
|
||||
|
||||
output += "<table width='90%' bgcolor='#e3e3e3' cellpadding='5' cellspacing='0' align='center'>"
|
||||
output += "<tr>"
|
||||
output += "<th width='25%'><b>TYPE</b></th>"
|
||||
output += "<th width='20%'><b>CKEY</b></th>"
|
||||
output += "<th width='20%'><b>TIME APPLIED</b></th>"
|
||||
output += "<th width='20%'><b>ADMIN</b></th>"
|
||||
output += "<th width='15%'><b>OPTIONS</b></th>"
|
||||
output += "</tr>"
|
||||
|
||||
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 erro_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]
|
||||
|
||||
var/lcolor = blcolor
|
||||
var/dcolor = bdcolor
|
||||
if(unbanned)
|
||||
lcolor = ulcolor
|
||||
dcolor = udcolor
|
||||
|
||||
var/typedesc =""
|
||||
switch(bantype)
|
||||
if("PERMABAN")
|
||||
typedesc = "<font color='red'><b>PERMABAN</b></font>"
|
||||
if("TEMPBAN")
|
||||
typedesc = "<b>TEMPBAN</b><br><font size='2'>([duration] minutes [(unbanned) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=duration;dbbanid=[banid]\">Edit</a>))"]<br>Expires [expiration]</font>"
|
||||
if("JOB_PERMABAN")
|
||||
typedesc = "<b>JOBBAN</b><br><font size='2'>([job])"
|
||||
|
||||
output += "<tr bgcolor='[dcolor]'>"
|
||||
output += "<td align='center'>[typedesc]</td>"
|
||||
output += "<td align='center'><b>[ckey]</b></td>"
|
||||
output += "<td align='center'>[bantime]</td>"
|
||||
output += "<td align='center'><b>[ackey]</b></td>"
|
||||
output += "<td align='center'>[(unbanned) ? "" : "<b><a href=\"byond://?src=\ref[src];dbbanedit=unban;dbbanid=[banid]\">Unban</a></b>"]</td>"
|
||||
output += "</tr>"
|
||||
output += "<tr bgcolor='[lcolor]'>"
|
||||
output += "<td align='center' colspan='5'><b>Reason: [(unbanned) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=reason;dbbanid=[banid]\">Edit</a>)"]</b> <cite>\"[reason]\"</cite></td>"
|
||||
output += "</tr>"
|
||||
if(edits)
|
||||
output += "<tr bgcolor='[dcolor]'>"
|
||||
output += "<td align='center' colspan='5'><b>EDITS</b></td>"
|
||||
output += "</tr>"
|
||||
output += "<tr bgcolor='[lcolor]'>"
|
||||
output += "<td align='center' colspan='5'><font size='2'>[edits]</font></td>"
|
||||
output += "</tr>"
|
||||
if(unbanned)
|
||||
output += "<tr bgcolor='[dcolor]'>"
|
||||
output += "<td align='center' colspan='5' bgcolor=''><b>UNBANNED by admin [unbanckey] on [unbantime]</b></td>"
|
||||
output += "</tr>"
|
||||
output += "<tr>"
|
||||
output += "<td colspan='5' bgcolor='white'> </td>"
|
||||
output += "</tr>"
|
||||
|
||||
output += "</table></div>"
|
||||
|
||||
usr << browse(output,"window=lookupbans;size=900x500")
|
||||
@@ -1,27 +1,63 @@
|
||||
//Blocks an attempt to connect before even creating our client datum thing.
|
||||
world/IsBanned(key,address,computer_id)
|
||||
if(ckey(key) in admins)
|
||||
if(ckey(key) in admin_datums)
|
||||
return ..()
|
||||
|
||||
//Guest Checking
|
||||
if( !guests_allowed && IsGuestKey(key) )
|
||||
log_access("Failed Login: [key] - Guests not allowed")
|
||||
message_admins("\blue Failed Login: [key] - Guests not allowed")
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
|
||||
if(config.ban_legacy_system)
|
||||
|
||||
//check if the IP address is a known TOR node
|
||||
if( config && config.ToRban && ToRban_isbanned(address) )
|
||||
log_access("Failed Login: [src] - Banned: ToR")
|
||||
message_admins("\blue Failed Login: [src] - Banned: ToR")
|
||||
//ban their computer_id and ckey for posterity
|
||||
AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0)
|
||||
return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [config.banappeals]")
|
||||
//Guest Checking
|
||||
if( !guests_allowed && IsGuestKey(key) )
|
||||
log_access("Failed Login: [key] - Guests not allowed")
|
||||
message_admins("\blue Failed Login: [key] - Guests not allowed")
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
|
||||
|
||||
//Ban Checking
|
||||
. = CheckBan( ckey(key), computer_id, address )
|
||||
if(.)
|
||||
log_access("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
|
||||
message_admins("\blue Failed Login: [key] id:[computer_id] ip:[address] - Banned [.["reason"]]")
|
||||
return .
|
||||
//check if the IP address is a known TOR node
|
||||
if( config && config.ToRban && ToRban_isbanned(address) )
|
||||
log_access("Failed Login: [src] - Banned: ToR")
|
||||
message_admins("\blue Failed Login: [src] - Banned: ToR")
|
||||
//ban their computer_id and ckey for posterity
|
||||
AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0)
|
||||
return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [config.banappeals]")
|
||||
|
||||
return ..() //default pager ban stuff
|
||||
//Ban Checking
|
||||
. = CheckBan( ckey(key), computer_id, address )
|
||||
if(.)
|
||||
log_access("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
|
||||
message_admins("\blue Failed Login: [key] id:[computer_id] ip:[address] - Banned [.["reason"]]")
|
||||
return .
|
||||
|
||||
return ..() //default pager ban stuff
|
||||
|
||||
else
|
||||
|
||||
var/ckeytext = ckey(key)
|
||||
|
||||
if(!establish_db_connection())
|
||||
world.log << "Ban database connection failure. Key [ckeytext] not checked"
|
||||
diary << "Ban database connection failure. Key [ckeytext] not checked"
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_Ban WHERE (ckey = '[ckeytext]' OR ip = '[address]' OR computerid = '[computer_id]') AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
var/pckey = query.item[1]
|
||||
//var/pip = query.item[2]
|
||||
//var/pcid = query.item[3]
|
||||
var/ackey = query.item[4]
|
||||
var/reason = query.item[5]
|
||||
var/expiration = query.item[6]
|
||||
var/duration = query.item[7]
|
||||
var/bantime = query.item[8]
|
||||
var/bantype = query.item[9]
|
||||
|
||||
var/expires = ""
|
||||
if(text2num(duration) > 0)
|
||||
expires = " The ban is for [duration] minutes and expires on [expiration] (server time)."
|
||||
|
||||
var/desc = "\nReason: You, or another user of this computer or connection ([pckey]) is banned from playing here. The ban reason is:\n[reason]\nThis ban was applied by [ackey] on [bantime], [expires]"
|
||||
|
||||
return list("reason"="[bantype]", "desc"="[desc]")
|
||||
|
||||
return ..() //default pager ban stuff
|
||||
@@ -25,22 +25,20 @@
|
||||
diary << "Downloading updated ToR data..."
|
||||
var/http[] = world.Export("http://exitlist.torproject.org/exit-addresses")
|
||||
|
||||
var/rawtext = file2text(http["CONTENT"])
|
||||
if(rawtext)
|
||||
var/list/rawlist = tg_text2list(rawtext,"\n")
|
||||
if(rawlist.len)
|
||||
fdel(TORFILE)
|
||||
var/savefile/F = new(TORFILE)
|
||||
for( var/line in rawlist )
|
||||
if(!line) continue
|
||||
if( copytext(line,1,12) == "ExitAddress" )
|
||||
var/cleaned = copytext(line,13,length(line)-19)
|
||||
if(!cleaned) continue
|
||||
F[cleaned] << 1
|
||||
F["last_update"] << world.realtime
|
||||
diary << "ToR data updated!"
|
||||
if(usr) usr << "ToRban updated."
|
||||
return 1
|
||||
var/list/rawlist = file2list(http["CONTENT"])
|
||||
if(rawlist.len)
|
||||
fdel(TORFILE)
|
||||
var/savefile/F = new(TORFILE)
|
||||
for( var/line in rawlist )
|
||||
if(!line) continue
|
||||
if( copytext(line,1,12) == "ExitAddress" )
|
||||
var/cleaned = copytext(line,13,length(line)-19)
|
||||
if(!cleaned) continue
|
||||
F[cleaned] << 1
|
||||
F["last_update"] << world.realtime
|
||||
diary << "ToR data updated!"
|
||||
if(usr) usr << "ToRban updated."
|
||||
return 1
|
||||
diary << "ToR data update aborted: no data."
|
||||
return 0
|
||||
|
||||
|
||||
@@ -7,26 +7,24 @@ var/global/floorIsLava = 0
|
||||
/proc/message_admins(var/text, var/admin_ref = 0, var/admin_holder_ref = 0)
|
||||
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[text]</span></span>"
|
||||
log_adminwarn(rendered)
|
||||
for (var/client/C in admin_list)
|
||||
if (C)
|
||||
if (C.holder.level >= 1)
|
||||
var/msg = rendered
|
||||
if (admin_ref)
|
||||
msg = dd_replacetext(msg, "%admin_ref%", "\ref[C]")
|
||||
if (admin_holder_ref && C.holder)
|
||||
msg = dd_replacetext(msg, "%holder_ref%", "\ref[C.holder]")
|
||||
C << msg
|
||||
|
||||
for(var/client/C in admins)
|
||||
var/msg = rendered
|
||||
if(admin_ref)
|
||||
msg = replacetext(msg, "%admin_ref%", "\ref[C]")
|
||||
if(admin_holder_ref && C.holder)
|
||||
msg = replacetext(msg, "%holder_ref%", "\ref[C.holder]")
|
||||
C << msg
|
||||
|
||||
/*
|
||||
/proc/msg_admin_attack(var/text) //Toggleable Attack Messages
|
||||
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[text]</span></span>"
|
||||
log_adminwarn(rendered)
|
||||
for (var/client/C in admin_list)
|
||||
if (C)
|
||||
if (C.holder.level >= 1)
|
||||
if(!C.STFU_atklog)
|
||||
var/msg = rendered
|
||||
C << msg
|
||||
for(var/client/C in admins)
|
||||
if (C.holder.level >= 1)
|
||||
if(!C.STFU_atklog)
|
||||
var/msg = rendered
|
||||
C << msg
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////Panels
|
||||
|
||||
@@ -60,9 +58,9 @@ var/global/floorIsLava = 0
|
||||
|
||||
body += "<br><br>\[ "
|
||||
body += "<a href='?src=\ref[src];adminplayervars=\ref[M]'>VV</a> - "
|
||||
body += "<a href='?src=\ref[src];traitor_panel_pp=\ref[M]'>TP</a> - "
|
||||
body += "<a href='?src=\ref[src];traitor=\ref[M]'>TP</a> - "
|
||||
body += "<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a> - "
|
||||
body += "<a href='?src=\ref[src];adminplayersubtlemessage=\ref[M]'>SM</a> - "
|
||||
body += "<a href='?src=\ref[src];subtlemessage=\ref[M]'>SM</a> - "
|
||||
body += "<a href='?src=\ref[src];adminplayerobservejump=\ref[M]'>JMP</a>\] </b><br>"
|
||||
|
||||
body += "<b>Mob type</b> = [M.type]<br><br>"
|
||||
@@ -467,183 +465,132 @@ var/global/floorIsLava = 0
|
||||
|
||||
|
||||
/datum/admins/proc/Jobbans()
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
if ((src.rank in list( "Game Admin", "Game Master" )))
|
||||
var/dat = "<B>Job Bans!</B><HR><table>"
|
||||
for(var/t in jobban_keylist)
|
||||
var/r = t
|
||||
if( findtext(r,"##") )
|
||||
r = copytext( r, 1, findtext(r,"##") )//removes the description
|
||||
dat += text("<tr><td>[t] (<A href='?src=\ref[src];removejobban=[r]'>unban</A>)</td></tr>")
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=ban;size=400x400")
|
||||
var/dat = "<B>Job Bans!</B><HR><table>"
|
||||
for(var/t in jobban_keylist)
|
||||
var/r = t
|
||||
if( findtext(r,"##") )
|
||||
r = copytext( r, 1, findtext(r,"##") )//removes the description
|
||||
dat += text("<tr><td>[t] (<A href='?src=\ref[src];removejobban=[r]'>unban</A>)</td></tr>")
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=ban;size=400x400")
|
||||
|
||||
/datum/admins/proc/Game()
|
||||
|
||||
var/dat
|
||||
var/lvl = 0
|
||||
switch(src.rank)
|
||||
if("Moderator")
|
||||
lvl = 1
|
||||
if("Temporary Admin")
|
||||
lvl = 2
|
||||
if("Admin Candidate")
|
||||
lvl = 3
|
||||
if("Trial Admin")
|
||||
lvl = 4
|
||||
if("Badmin")
|
||||
lvl = 5
|
||||
if("Game Admin")
|
||||
lvl = 6
|
||||
if("Game Master")
|
||||
lvl = 7
|
||||
|
||||
dat += "<center><B>Game Panel</B></center><hr>\n"
|
||||
|
||||
if(lvl > 0)
|
||||
|
||||
// if(lvl >= 2 )
|
||||
dat += "<A href='?src=\ref[src];c_mode=1'>Change Game Mode</A><br>"
|
||||
|
||||
if(lvl > 0 && master_mode == "secret")
|
||||
dat += "<A href='?src=\ref[src];f_secret=1'>(Force Secret Mode)</A><br>"
|
||||
|
||||
dat += "<BR>"
|
||||
|
||||
if(lvl >= 3 )
|
||||
dat += "<A href='?src=\ref[src];create_object=1'>Create Object</A><br>"
|
||||
dat += "<A href='?src=\ref[src];quick_create_object=1'>Quick Create Object</A><br>"
|
||||
dat += "<A href='?src=\ref[src];create_turf=1'>Create Turf</A><br>"
|
||||
if(lvl >= 5)
|
||||
dat += "<A href='?src=\ref[src];create_mob=1'>Create Mob</A><br>"
|
||||
if(lvl >= 3 )
|
||||
dat += "<br><A href='?src=\ref[src];vsc=airflow'>Edit Airflow Settings</A><br>"
|
||||
dat += "<A href='?src=\ref[src];vsc=plasma'>Edit Plasma Settings</A><br>"
|
||||
dat += "<A href='?src=\ref[src];vsc=default'>Choose a default ZAS setting</A><br>"
|
||||
// if(lvl == 6 )
|
||||
usr << browse(dat, "window=admin2;size=210x180")
|
||||
return
|
||||
/*
|
||||
/datum/admins/proc/goons()
|
||||
var/dat = "<HR><B>GOOOOOOONS</B><HR><table cellspacing=5><tr><th>Key</th><th>SA Username</th></tr>"
|
||||
for(var/t in goon_keylist)
|
||||
dat += text("<tr><td><A href='?src=\ref[src];remove=[ckey(t)]'><B>[t]</B></A></td><td>[goon_keylist[ckey(t)]]</td></tr>")
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=ban;size=300x400")
|
||||
|
||||
/datum/admins/proc/beta_testers()
|
||||
var/dat = "<HR><B>Beta testers</B><HR><table cellspacing=5><tr><th>Key</th></tr>"
|
||||
for(var/t in beta_tester_keylist)
|
||||
dat += text("<tr><td>[t]</td></tr>")
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=ban;size=300x400")
|
||||
*/
|
||||
/datum/admins/proc/Secrets()
|
||||
if (!usr.client.holder)
|
||||
return
|
||||
|
||||
var/lvl = 0
|
||||
switch(src.rank)
|
||||
if("Moderator")
|
||||
lvl = 1
|
||||
if("Temporary Admin")
|
||||
lvl = 2
|
||||
if("Admin Candidate")
|
||||
lvl = 3
|
||||
if("Trial Admin")
|
||||
lvl = 4
|
||||
if("Badmin")
|
||||
lvl = 5
|
||||
if("Game Admin")
|
||||
lvl = 6
|
||||
if("Game Master")
|
||||
lvl = 7
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/dat = {"
|
||||
<B>Choose a secret, any secret at all.</B><HR>
|
||||
<B>Admin Secrets</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretsadmin=clear_bombs'>Remove all bombs currently in existence</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=list_bombers'>Bombing List</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=check_antagonist'>Show current traitors and objectives</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=list_signalers'>Show last [length(lastsignalers)] signalers</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=list_lawchanges'>Show last [length(lawchanges)] law changes</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=showailaws'>Show AI Laws</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=showgm'>Show Game Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=manifest'>Show Crew Manifest</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=DNA'>List DNA (Blood)</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=fingerprints'>List Fingerprints</A><BR><BR>
|
||||
<BR>"}
|
||||
if(lvl > 2)
|
||||
dat += {"
|
||||
<B>'Random' Events</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretsfun=wave'>Spawn a wave of meteors</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=gravanomalies'>Spawn a gravitational anomaly (Untested)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=timeanomalies'>Spawn wormholes (Untested)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=goblob'>Spawn blob(Untested)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=aliens'>Trigger an Alien infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spaceninja'>Send in a space ninja</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=carp'>Trigger an Carp migration</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=radiation'>Irradiate the station</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=prison_break'>Trigger a Prison Break</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=virus'>Trigger a Virus Outbreak</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=immovable'>Spawn an Immovable Rod</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=lightsout'>Toggle a "lights out" event</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=ionstorm'>Spawn an Ion Storm</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spacevines'>Spawn Space-Vines</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=comms_blackout'>Trigger a communication blackout</A><BR>
|
||||
<BR>
|
||||
<B>Fun Secrets</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretsfun=sec_clothes'>Remove 'internal' clothing</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=sec_all_clothes'>Remove ALL clothing</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=toxic'>Toxic Air (WARNING: dangerous)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=monkey'>Turn all humans into monkeys</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=sec_classic1'>Remove firesuits, grilles, and pods</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=power'>Make all areas powered</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=unpower'>Make all areas unpowered</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=quickpower'>Power all SMES</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=toggleprisonstatus'>Toggle Prison Shuttle Status(Use with S/R)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=activateprison'>Send Prison Shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=deactivateprison'>Return Prison Shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=prisonwarp'>Warp all Players to Prison</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=traitor_all'>Everyone is the traitor</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=flicklights'>Ghost Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=retardify'>Make all players retarded</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=moveadminshuttle'>Move Administration Shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=moveferry'>Move Ferry</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=movealienship'>Move Alien Dinghy</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=moveminingshuttle'>Move Mining Shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=friendai'>Best Friend AI</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=floorlava'>The floor is lava! (DANGEROUS)</A><BR>"}
|
||||
//<A href='?src=\ref[src];secretsfun=shockwave'>Station Shockwave</A><BR>
|
||||
|
||||
if(lvl >= 6)
|
||||
dat += {"
|
||||
<A href='?src=\ref[src];secretsfun=togglebombcap'>Toggle bomb cap</A><BR>
|
||||
<center><B>Game Panel</B></center><hr>\n
|
||||
<A href='?src=\ref[src];c_mode=1'>Change Game Mode</A><br>
|
||||
"}
|
||||
if(master_mode == "secret")
|
||||
dat += "<A href='?src=\ref[src];f_secret=1'>(Force Secret Mode)</A><br>"
|
||||
|
||||
dat += {"
|
||||
<BR>
|
||||
<A href='?src=\ref[src];create_object=1'>Create Object</A><br>
|
||||
<A href='?src=\ref[src];quick_create_object=1'>Quick Create Object</A><br>
|
||||
<A href='?src=\ref[src];create_turf=1'>Create Turf</A><br>
|
||||
<A href='?src=\ref[src];create_mob=1'>Create Mob</A><br>
|
||||
"}
|
||||
|
||||
usr << browse(dat, "window=admin2;size=210x180")
|
||||
return
|
||||
|
||||
/datum/admins/proc/Secrets()
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/dat = "<B>The first rule of adminbuse is: you don't talk about the adminbuse.</B><HR>"
|
||||
|
||||
if(check_rights(R_ADMIN,0))
|
||||
dat += {"
|
||||
<B>Admin Secrets</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretsadmin=clear_bombs'>Remove all bombs currently in existence</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=list_bombers'>Bombing List</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=check_antagonist'>Show current traitors and objectives</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=list_signalers'>Show last [length(lastsignalers)] signalers</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=list_lawchanges'>Show last [length(lawchanges)] law changes</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=showailaws'>Show AI Laws</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=showgm'>Show Game Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=manifest'>Show Crew Manifest</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=DNA'>List DNA (Blood)</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=fingerprints'>List Fingerprints</A><BR><BR>
|
||||
<BR>
|
||||
"}
|
||||
|
||||
if(check_rights(R_FUN,0))
|
||||
dat += {"
|
||||
<B>'Random' Events</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretsfun=gravity'>Toggle station artificial gravity</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=wave'>Spawn a wave of meteors (aka lagocolyptic shower)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=gravanomalies'>Spawn a gravitational anomaly (aka lagitational anomolag)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=timeanomalies'>Spawn wormholes</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=goblob'>Spawn blob</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=aliens'>Trigger an Alien infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=alien_silent'>Spawn an Alien silently</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spaceninja'>Send in a space ninja</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=striketeam'>Send in a strike team</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=carp'>Trigger an Carp migration</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=radiation'>Irradiate the station</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=prison_break'>Trigger a Prison Break</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=virus'>Trigger a Virus Outbreak</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=immovable'>Spawn an Immovable Rod</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=lightsout'>Toggle a "lights out" event</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=ionstorm'>Spawn an Ion Storm</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spacevines'>Spawn Space-Vines</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=comms_blackout'>Trigger a communication blackout</A><BR>
|
||||
<BR>
|
||||
<B>Fun Secrets</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretsfun=sec_clothes'>Remove 'internal' clothing</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=sec_all_clothes'>Remove ALL clothing</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=monkey'>Turn all humans into monkeys</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=sec_classic1'>Remove firesuits, grilles, and pods</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=power'>Make all areas powered</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=unpower'>Make all areas unpowered</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=quickpower'>Power all SMES</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=toggleprisonstatus'>Toggle Prison Shuttle Status(Use with S/R)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=activateprison'>Send Prison Shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=deactivateprison'>Return Prison Shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=prisonwarp'>Warp all Players to Prison</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=tripleAI'>Triple AI mode (needs to be used in the lobby)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=traitor_all'>Everyone is the traitor</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=flicklights'>Ghost Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=retardify'>Make all players retarded</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=moveadminshuttle'>Move Administration Shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=moveferry'>Move Ferry</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=movealienship'>Move Alien Dinghy</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=moveminingshuttle'>Move Mining Shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=friendai'>Best Friend AI</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=floorlava'>The floor is lava! (DANGEROUS: extremely lame)</A><BR>
|
||||
"}
|
||||
|
||||
if(check_rights(R_SERVER,0))
|
||||
dat += "<A href='?src=\ref[src];secretsfun=togglebombcap'>Toggle bomb cap</A><BR>"
|
||||
|
||||
dat += "<BR>"
|
||||
|
||||
if(lvl >= 5)
|
||||
if(check_rights(R_DEBUG,0))
|
||||
dat += {"
|
||||
<B>Security Level Elevated</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretscoder=maint_access_engiebrig'>Change all maintenance doors to engie/brig access only</A><BR>
|
||||
<A href='?src=\ref[src];secretscoder=maint_access_brig'>Change all maintenance doors to brig access only</A><BR>
|
||||
<A href='?src=\ref[src];secretscoder=infinite_sec'>Remove cap on security officers</A><BR>
|
||||
<BR>
|
||||
<B>Coder Secrets</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretsadmin=list_job_debug'>Show Job Debug</A><BR>
|
||||
<A href='?src=\ref[src];secretscoder=spawn_objects'>Admin Log</A><BR>
|
||||
<BR>
|
||||
"}
|
||||
<B>Security Level Elevated</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretscoder=maint_access_engiebrig'>Change all maintenance doors to engie/brig access only</A><BR>
|
||||
<A href='?src=\ref[src];secretscoder=maint_access_brig'>Change all maintenance doors to brig access only</A><BR>
|
||||
<A href='?src=\ref[src];secretscoder=infinite_sec'>Remove cap on security officers</A><BR>
|
||||
<BR>
|
||||
<B>Coder Secrets</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretsadmin=list_job_debug'>Show Job Debug</A><BR>
|
||||
<A href='?src=\ref[src];secretscoder=spawn_objects'>Admin Log</A><BR>
|
||||
<BR>
|
||||
"}
|
||||
|
||||
usr << browse(dat, "window=secrets")
|
||||
return
|
||||
|
||||
@@ -680,10 +627,11 @@ var/global/floorIsLava = 0
|
||||
set category = "Special Verbs"
|
||||
set name = "Announce"
|
||||
set desc="Announce your desires to the world"
|
||||
if(!usr.client.holder) return
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/message = input("Global message to send:", "Admin Announce", null, null) as message
|
||||
if (message)
|
||||
if(usr.client.holder.rank != "Game Admin" && usr.client.holder.rank != "Game Master")
|
||||
if(message)
|
||||
if(!check_rights(R_SERVER,0))
|
||||
message = adminscrub(message,500)
|
||||
world << "\blue <b>[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:</b>\n \t [message]"
|
||||
log_admin("Announce: [key_name(usr)] : [message]")
|
||||
@@ -958,36 +906,32 @@ var/global/floorIsLava = 0
|
||||
*/
|
||||
/datum/admins/proc/spawn_atom(var/object as text)
|
||||
set category = "Debug"
|
||||
set desc= "(atom path) Spawn an atom"
|
||||
set name= "Spawn"
|
||||
set desc = "(atom path) Spawn an atom"
|
||||
set name = "Spawn"
|
||||
|
||||
if(usr.client.holder.level >= 5)
|
||||
var/list/types = typesof(/atom)
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
var/list/matches = new()
|
||||
var/list/types = typesof(/atom)
|
||||
var/list/matches = new()
|
||||
|
||||
for(var/path in types)
|
||||
if(findtext("[path]", object))
|
||||
matches += path
|
||||
for(var/path in types)
|
||||
if(findtext("[path]", object))
|
||||
matches += path
|
||||
|
||||
if(matches.len==0)
|
||||
if(matches.len==0)
|
||||
return
|
||||
|
||||
var/chosen
|
||||
if(matches.len==1)
|
||||
chosen = matches[1]
|
||||
else
|
||||
chosen = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
|
||||
if(!chosen)
|
||||
return
|
||||
|
||||
var/chosen
|
||||
if(matches.len==1)
|
||||
chosen = matches[1]
|
||||
else
|
||||
chosen = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
|
||||
if(!chosen)
|
||||
return
|
||||
new chosen(usr.loc)
|
||||
|
||||
new chosen(usr.loc)
|
||||
|
||||
log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
|
||||
|
||||
else
|
||||
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
|
||||
return
|
||||
log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
|
||||
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -996,9 +940,13 @@ var/global/floorIsLava = 0
|
||||
set desc = "Edit mobs's memory and role"
|
||||
set name = "Show Traitor Panel"
|
||||
|
||||
if (!M.mind)
|
||||
usr << "Sorry, this mob has no mind!"
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
if(!M.mind)
|
||||
usr << "This mob has no mind!"
|
||||
return
|
||||
|
||||
M.mind.edit_memory()
|
||||
feedback_add_details("admin_verb","STP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -1151,4 +1099,4 @@ proc/move_alien_ship()
|
||||
alien_ship_location = 0
|
||||
else
|
||||
alien_ship_location = 1
|
||||
return
|
||||
return
|
||||
@@ -5,15 +5,12 @@
|
||||
/client/proc/admin_memo(task in list("write","show","delete"))
|
||||
set name = "Memo"
|
||||
set category = "Server"
|
||||
if(!holder || !ENABLE_MEMOS) return
|
||||
if(!ENABLE_MEMOS) return
|
||||
if(!check_rights(0)) return
|
||||
switch(task)
|
||||
if("write")
|
||||
admin_memo_write()
|
||||
if("show")
|
||||
admin_memo_show()
|
||||
if("delete")
|
||||
admin_memo_delete()
|
||||
|
||||
if("write") admin_memo_write()
|
||||
if("show") admin_memo_show()
|
||||
if("delete") admin_memo_delete()
|
||||
|
||||
//write a message
|
||||
/client/proc/admin_memo_write()
|
||||
@@ -45,7 +42,7 @@
|
||||
var/savefile/F = new(MEMOFILE)
|
||||
if(F)
|
||||
var/ckey
|
||||
if( holder.rank == "Game Master" )
|
||||
if(check_rights(R_SERVER,0)) //high ranking admins can delete other admin's memos
|
||||
ckey = input(src,"Whose memo shall we remove?","Remove Memo",null) as null|anything in F.dir
|
||||
else
|
||||
ckey = src.ckey
|
||||
|
||||
157
code/modules/admin/admin_ranks.dm
Normal file
157
code/modules/admin/admin_ranks.dm
Normal file
@@ -0,0 +1,157 @@
|
||||
var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
|
||||
//load our rank - > rights associations
|
||||
/proc/load_admin_ranks()
|
||||
admin_ranks.Cut()
|
||||
|
||||
var/previous_rights = 0
|
||||
|
||||
//load text from file
|
||||
var/list/Lines = file2list("config/admin_ranks.txt")
|
||||
|
||||
//process each line seperately
|
||||
for(var/line in Lines)
|
||||
if(!length(line)) continue
|
||||
if(copytext(line,1,2) == "#") continue
|
||||
|
||||
var/list/List = text2list(line,"+")
|
||||
if(!List.len) continue
|
||||
|
||||
var/rank = ckeyEx(List[1])
|
||||
switch(rank)
|
||||
if(null,"") continue
|
||||
if("Removed") continue //Reserved
|
||||
|
||||
var/rights = 0
|
||||
for(var/i=2, i<=List.len, i++)
|
||||
switch(ckey(List[i]))
|
||||
if("@","prev") rights |= previous_rights
|
||||
if("buildmode","build") rights |= R_BUILDMODE
|
||||
if("admin") rights |= R_ADMIN
|
||||
if("ban") rights |= R_BAN
|
||||
if("fun") rights |= R_FUN
|
||||
if("server") rights |= R_SERVER
|
||||
if("debug") rights |= R_DEBUG
|
||||
if("permissions","rights") rights |= R_PERMISSIONS
|
||||
if("possess") rights |= R_POSSESS
|
||||
if("stealth") rights |= R_STEALTH
|
||||
if("rejuv","rejuvinate") rights |= R_REJUVINATE
|
||||
if("varedit") rights |= R_VAREDIT
|
||||
if("everything","host","all") rights |= R_HOST
|
||||
if("sound","sounds") rights |= R_SOUNDS
|
||||
if("spawn","create") rights |= R_SPAWN
|
||||
if("mod") rights |= R_MOD
|
||||
|
||||
admin_ranks[rank] = rights
|
||||
previous_rights = rights
|
||||
|
||||
#ifdef TESTING
|
||||
var/msg = "Permission Sets Built:\n"
|
||||
for(var/rank in admin_ranks)
|
||||
msg += "\t[rank] - [admin_ranks[rank]]\n"
|
||||
testing(msg)
|
||||
#endif
|
||||
|
||||
|
||||
/proc/load_admins()
|
||||
//clear the datums references
|
||||
admin_datums.Cut()
|
||||
for(var/client/C in admins)
|
||||
C.remove_admin_verbs()
|
||||
C.holder = null
|
||||
admins.Cut()
|
||||
|
||||
if(config.admin_legacy_system)
|
||||
load_admin_ranks()
|
||||
|
||||
//load text from file
|
||||
var/list/Lines = file2list("config/admins.txt")
|
||||
|
||||
//process each line seperately
|
||||
for(var/line in Lines)
|
||||
if(!length(line)) continue
|
||||
if(copytext(line,1,2) == "#") continue
|
||||
|
||||
//Split the line at every "-"
|
||||
var/list/List = text2list(line, "-")
|
||||
if(!List.len) continue
|
||||
|
||||
//ckey is before the first "-"
|
||||
var/ckey = ckey(List[1])
|
||||
if(!ckey) continue
|
||||
|
||||
//rank follows the first "-"
|
||||
var/rank = ""
|
||||
if(List.len >= 2)
|
||||
rank = ckeyEx(List[2])
|
||||
|
||||
//load permissions associated with this rank
|
||||
var/rights = admin_ranks[rank]
|
||||
|
||||
//create the admin datum and store it for later use
|
||||
var/datum/admins/D = new /datum/admins(rank, rights, ckey)
|
||||
|
||||
//find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
D.associate(directory[ckey])
|
||||
|
||||
else
|
||||
//The current admin system uses SQL
|
||||
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
world.log << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||
diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||
config.admin_legacy_system = 1
|
||||
load_admins()
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, rank, level, flags FROM erro_admin")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
var/ckey = query.item[1]
|
||||
var/rank = query.item[2]
|
||||
if(rank == "Removed") continue //This person was de-adminned. They are only in the admin list for archive purposes.
|
||||
|
||||
var/rights = query.item[4]
|
||||
if(istext(rights)) rights = text2num(rights)
|
||||
var/datum/admins/D = new /datum/admins(rank, rights, ckey)
|
||||
|
||||
//find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
D.associate(directory[ckey])
|
||||
if(!admin_datums)
|
||||
world.log << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
|
||||
diary << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
|
||||
config.admin_legacy_system = 1
|
||||
load_admins()
|
||||
return
|
||||
|
||||
#ifdef TESTING
|
||||
var/msg = "Admins Built:\n"
|
||||
for(var/ckey in admin_datums)
|
||||
var/rank
|
||||
var/datum/admins/D = admin_datums[ckey]
|
||||
if(D) rank = D.rank
|
||||
msg += "\t[ckey] - [rank]\n"
|
||||
testing(msg)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef TESTING
|
||||
/client/verb/changerank(newrank in admin_ranks)
|
||||
if(holder)
|
||||
holder.rank = newrank
|
||||
holder.rights = admin_ranks[newrank]
|
||||
else
|
||||
holder = new /datum/admins(newrank,admin_ranks[newrank],ckey)
|
||||
remove_admin_verbs()
|
||||
holder.associate(src)
|
||||
|
||||
/client/verb/changerights(newrights as num)
|
||||
if(holder)
|
||||
holder.rights = newrights
|
||||
else
|
||||
holder = new /datum/admins("testing",newrights,ckey)
|
||||
remove_admin_verbs()
|
||||
holder.associate(src)
|
||||
|
||||
#endif
|
||||
180
code/modules/admin/admin_report.dm
Normal file
180
code/modules/admin/admin_report.dm
Normal file
@@ -0,0 +1,180 @@
|
||||
// Reports are a way to notify admins of wrongdoings that happened
|
||||
// while no admin was present. They work a bit similar to news, but
|
||||
// they can only be read by admins and moderators.
|
||||
|
||||
// a single admin report
|
||||
datum/admin_report/var
|
||||
ID // the ID of the report
|
||||
body // the content of the report
|
||||
author // key of the author
|
||||
date // date on which this was created
|
||||
done // whether this was handled
|
||||
|
||||
offender_key // store the key of the offender
|
||||
offender_cid // store the cid of the offender
|
||||
|
||||
datum/report_topic_handler
|
||||
Topic(href,href_list)
|
||||
..()
|
||||
var/client/C = locate(href_list["client"])
|
||||
if(href_list["action"] == "show_reports")
|
||||
C.display_admin_reports()
|
||||
else if(href_list["action"] == "remove")
|
||||
C.mark_report_done(text2num(href_list["ID"]))
|
||||
else if(href_list["action"] == "edit")
|
||||
C.edit_report(text2num(href_list["ID"]))
|
||||
|
||||
var/datum/report_topic_handler/report_topic_handler
|
||||
|
||||
world/New()
|
||||
..()
|
||||
report_topic_handler = new
|
||||
|
||||
// add a new news datums
|
||||
proc/make_report(body, author, okey, cid)
|
||||
var/savefile/Reports = new("data/reports.sav")
|
||||
var/list/reports
|
||||
var/lastID
|
||||
|
||||
Reports["reports"] >> reports
|
||||
Reports["lastID"] >> lastID
|
||||
|
||||
if(!reports) reports = list()
|
||||
if(!lastID) lastID = 0
|
||||
|
||||
var/datum/admin_report/created = new()
|
||||
created.ID = ++lastID
|
||||
created.body = body
|
||||
created.author = author
|
||||
created.date = world.realtime
|
||||
created.done = 0
|
||||
created.offender_key = okey
|
||||
created.offender_cid = cid
|
||||
|
||||
reports.Insert(1, created)
|
||||
|
||||
Reports["reports"] << reports
|
||||
Reports["lastID"] << lastID
|
||||
|
||||
// load the reports from disk
|
||||
proc/load_reports()
|
||||
var/savefile/Reports = new("data/reports.sav")
|
||||
var/list/reports
|
||||
|
||||
Reports["reports"] >> reports
|
||||
|
||||
if(!reports) reports = list()
|
||||
|
||||
return reports
|
||||
|
||||
// check if there are any unhandled reports
|
||||
client/proc/unhandled_reports()
|
||||
if(!src.holder) return 0
|
||||
var/list/reports = load_reports()
|
||||
|
||||
for(var/datum/admin_report/N in reports)
|
||||
if(N.done)
|
||||
continue
|
||||
else return 1
|
||||
|
||||
return 0
|
||||
|
||||
// checks if the player has an unhandled report against him
|
||||
client/proc/is_reported()
|
||||
var/list/reports = load_reports()
|
||||
|
||||
for(var/datum/admin_report/N in reports) if(!N.done)
|
||||
if(N.offender_key == src.key)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
// display only the reports that haven't been handled
|
||||
client/proc/display_admin_reports()
|
||||
set category = "Admin"
|
||||
set name = "Display Admin Reports"
|
||||
if(!src.holder) return
|
||||
|
||||
var/list/reports = load_reports()
|
||||
|
||||
var/output = ""
|
||||
if(unhandled_reports())
|
||||
// load the list of unhandled reports
|
||||
for(var/datum/admin_report/N in reports)
|
||||
if(N.done)
|
||||
continue
|
||||
output += "<b>Reported player:</b> [N.offender_key](CID: [N.offender_cid])<br>"
|
||||
output += "<b>Offense:</b>[N.body]<br>"
|
||||
output += "<small>Occured at [time2text(N.date,"MM/DD hh:mm:ss")]</small><br>"
|
||||
output += "<small>authored by <i>[N.author]</i></small><br>"
|
||||
output += " <a href='?src=\ref[report_topic_handler];client=\ref[src];action=remove;ID=[N.ID]'>Flag as Handled</a>"
|
||||
if(src.key == N.author)
|
||||
output += " <a href='?src=\ref[report_topic_handler];client=\ref[src];action=edit;ID=[N.ID]'>Edit</a>"
|
||||
output += "<br>"
|
||||
output += "<br>"
|
||||
else
|
||||
output += "Whoops, no reports!"
|
||||
|
||||
usr << browse(output, "window=news;size=600x400")
|
||||
|
||||
|
||||
client/proc/Report(mob/M as mob in world)
|
||||
set category = "Admin"
|
||||
if(!src.holder)
|
||||
return
|
||||
|
||||
var/CID = "Unknown"
|
||||
if(M.client)
|
||||
CID = M.client.computer_id
|
||||
|
||||
var/body = input(src.mob, "Describe in detail what you're reporting [M] for", "Report") as null|text
|
||||
if(!body) return
|
||||
|
||||
|
||||
make_report(body, key, M.key, CID)
|
||||
|
||||
spawn(1)
|
||||
display_admin_reports()
|
||||
|
||||
client/proc/mark_report_done(ID as num)
|
||||
if(!src.holder || src.holder.level < 0)
|
||||
return
|
||||
|
||||
var/savefile/Reports = new("data/reports.sav")
|
||||
var/list/reports
|
||||
|
||||
Reports["reports"] >> reports
|
||||
|
||||
var/datum/admin_report/found
|
||||
for(var/datum/admin_report/N in reports)
|
||||
if(N.ID == ID)
|
||||
found = N
|
||||
if(!found) src << "<b>* An error occured, sorry.</b>"
|
||||
|
||||
found.done = 1
|
||||
|
||||
Reports["reports"] << reports
|
||||
|
||||
|
||||
client/proc/edit_report(ID as num)
|
||||
if(!src.holder || src.holder.level < 0)
|
||||
src << "<b>You tried to modify the news, but you're not an admin!"
|
||||
return
|
||||
|
||||
var/savefile/Reports = new("data/reports.sav")
|
||||
var/list/reports
|
||||
|
||||
Reports["reports"] >> reports
|
||||
|
||||
var/datum/admin_report/found
|
||||
for(var/datum/admin_report/N in reports)
|
||||
if(N.ID == ID)
|
||||
found = N
|
||||
if(!found) src << "<b>* An error occured, sorry.</b>"
|
||||
|
||||
var/body = input(src.mob, "Enter a body for the news", "Body") as null|message
|
||||
if(!body) return
|
||||
|
||||
found.body = body
|
||||
|
||||
Reports["reports"] << reports
|
||||
@@ -1,459 +1,318 @@
|
||||
//GUYS REMEMBER TO ADD A += to UPDATE_ADMINS
|
||||
//AND A -= TO CLEAR_ADMIN_VERBS
|
||||
|
||||
|
||||
|
||||
//Some verbs that are still in the code but not used atm
|
||||
// Debug
|
||||
// verbs += /client/proc/radio_report //for radio debugging dont think its been used in a very long time
|
||||
// verbs += /client/proc/fix_next_move //has not been an issue in a very very long time
|
||||
|
||||
// Mapping helpers added via enable_debug_verbs verb
|
||||
// verbs += /client/proc/do_not_use_these
|
||||
// verbs += /client/proc/camera_view
|
||||
// verbs += /client/proc/sec_camera_report
|
||||
// verbs += /client/proc/intercom_view
|
||||
// verbs += /client/proc/air_status //Air things
|
||||
// verbs += /client/proc/Cell //More air things
|
||||
|
||||
/client/proc/admin_rank_check(var/rank, var/requested)
|
||||
if(rank < requested)
|
||||
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
|
||||
return(0)
|
||||
return(1)
|
||||
|
||||
/client/proc/update_admins(var/rank)
|
||||
if(!holder)
|
||||
holder = new /datum/admins(rank)
|
||||
admin_list |= src
|
||||
admins[ckey] = holder
|
||||
|
||||
var/need_update = 0
|
||||
//check if our rank has changed
|
||||
if(holder.rank != rank)
|
||||
holder.rank = rank
|
||||
need_update = 1
|
||||
//check if our state has changed
|
||||
if(istype(mob,/mob/living))
|
||||
if(holder.state != 1)
|
||||
holder.state = 1
|
||||
need_update = 1
|
||||
else
|
||||
if(holder.state != 2)
|
||||
holder.state = 2
|
||||
need_update = 1
|
||||
|
||||
if(!need_update) return
|
||||
|
||||
clear_admin_verbs()
|
||||
handle_permission_verbs()
|
||||
|
||||
switch(rank)
|
||||
if("Game Master")
|
||||
holder.level = 6
|
||||
|
||||
if ("Game Admin")
|
||||
holder.level = 5
|
||||
|
||||
if ("Badmin")
|
||||
holder.level = 4
|
||||
|
||||
if ("Trial Admin")
|
||||
holder.level = 3
|
||||
if(holder.state == 2) // if observing
|
||||
verbs += /client/proc/debug_variables
|
||||
verbs += /client/proc/cmd_modify_ticker_variables
|
||||
verbs += /client/proc/toggle_view_range
|
||||
verbs += /client/proc/Getmob
|
||||
verbs += /client/proc/Getkey
|
||||
verbs += /client/proc/sendmob
|
||||
verbs += /client/proc/Jump
|
||||
verbs += /client/proc/jumptokey
|
||||
verbs += /client/proc/jumptomob
|
||||
verbs += /client/proc/jumptoturf
|
||||
verbs += /client/proc/jumptocoord
|
||||
verbs += /client/proc/cmd_admin_delete
|
||||
verbs += /client/proc/cmd_admin_add_freeform_ai_law
|
||||
verbs += /client/proc/cmd_admin_rejuvenate
|
||||
|
||||
if ("Admin Candidate")
|
||||
holder.level = 2
|
||||
if(holder.state == 2) // if observing
|
||||
deadchat = 1
|
||||
verbs += /datum/admins/proc/toggleaban //abandon mob
|
||||
verbs += /client/proc/deadchat //toggles deadchat
|
||||
verbs += /client/proc/cmd_admin_check_contents
|
||||
verbs += /client/proc/Jump
|
||||
verbs += /client/proc/jumptokey
|
||||
verbs += /client/proc/jumptomob
|
||||
|
||||
if ("Temporary Admin")
|
||||
holder.level = 1
|
||||
|
||||
if ("Moderator")
|
||||
holder.level = 0
|
||||
|
||||
if ("Admin Observer")
|
||||
holder.level = -1
|
||||
|
||||
// if ("Banned")
|
||||
// holder.level = -2
|
||||
// del(src)
|
||||
// return
|
||||
|
||||
else
|
||||
del(holder)
|
||||
return
|
||||
|
||||
if (holder) //THE BELOW handles granting powers. The above is for special cases only!
|
||||
holder.owner = src
|
||||
|
||||
//---- Special Admin Ranks //Retired admin
|
||||
if (holder.level == -3)
|
||||
verbs += /client/proc/cmd_admin_say
|
||||
verbs += /client/proc/cmd_mod_say
|
||||
return
|
||||
|
||||
//Admin Observer
|
||||
if (holder.level >= -1)
|
||||
seeprayers = 1
|
||||
|
||||
verbs += /client/proc/cmd_admin_say //Allows anyone rank -1 or higher to use asay -- removed when it hits 0 (mods), added again at 1 (Temp Admin)
|
||||
verbs += /client/proc/cmd_mod_say //Allows anyone rank -1 or higher to use msay
|
||||
verbs += /client/proc/deadmin_self
|
||||
verbs += /client/proc/toggleadminhelpsound
|
||||
else
|
||||
return
|
||||
|
||||
//Moderator
|
||||
if (holder.level >= 0)
|
||||
verbs += /client/proc/cmd_admin_pm_panel
|
||||
verbs += /client/proc/cmd_admin_pm_context
|
||||
verbs += /client/proc/hide_verbs
|
||||
verbs += /client/proc/Report
|
||||
verbs += /client/proc/display_admin_reports
|
||||
verbs += /datum/admins/proc/show_skills
|
||||
verbs += /client/proc/admin_ghost
|
||||
verbs += /datum/admins/proc/show_player_info
|
||||
verbs += /datum/admins/proc/PlayerNotes
|
||||
else
|
||||
return
|
||||
|
||||
//Extra moderator commands
|
||||
if(holder.level == 0)
|
||||
verbs += /client/proc/mod_panel
|
||||
verbs -= /client/proc/cmd_admin_say
|
||||
return
|
||||
|
||||
//Temporary Admin
|
||||
if (holder.level >= 1)
|
||||
verbs += /client/proc/investigate_show
|
||||
verbs += /client/proc/cmd_admin_say
|
||||
verbs += /datum/admins/proc/startnow
|
||||
verbs += /datum/admins/proc/delay //game start delay
|
||||
verbs += /datum/admins/proc/immreboot //immediate reboot
|
||||
verbs += /datum/admins/proc/restart //restart
|
||||
verbs += /client/proc/cmd_admin_check_contents
|
||||
verbs += /client/proc/cmd_admin_create_centcom_report
|
||||
verbs += /client/proc/toggle_hear_deadcast
|
||||
verbs += /client/proc/toggle_hear_radio
|
||||
verbs += /client/proc/deadmin_self
|
||||
verbs += /datum/admins/proc/announce
|
||||
verbs += /datum/admins/proc/startnow
|
||||
verbs += /datum/admins/proc/toggleAI //Toggle the AI
|
||||
verbs += /datum/admins/proc/toggleenter //Toggle enterting
|
||||
verbs += /datum/admins/proc/toggleguests //Toggle guests entering
|
||||
verbs += /datum/admins/proc/toggleooc //toggle ooc
|
||||
verbs += /datum/admins/proc/toggleoocdead //toggle ooc for dead/unc
|
||||
verbs += /datum/admins/proc/show_player_panel
|
||||
verbs += /client/proc/deadchat //toggles deadchat
|
||||
verbs += /client/proc/cmd_admin_subtle_message
|
||||
verbs += /client/proc/dsay
|
||||
verbs += /client/proc/admin_ghost
|
||||
verbs += /client/proc/game_panel
|
||||
verbs += /client/proc/player_panel
|
||||
verbs += /client/proc/player_panel_new
|
||||
verbs += /client/proc/unban_panel
|
||||
verbs += /client/proc/jobbans
|
||||
verbs += /client/proc/unjobban_panel
|
||||
verbs += /client/proc/hide_verbs
|
||||
verbs += /client/proc/general_report
|
||||
verbs += /client/proc/air_report
|
||||
verbs += /client/proc/check_ai_laws
|
||||
verbs += /client/proc/investigate_show
|
||||
verbs += /client/proc/cmd_admin_gib_self
|
||||
verbs += /client/proc/player_panel_new
|
||||
verbs += /client/proc/cmd_admin_change_custom_event
|
||||
verbs += /client/proc/game_panel
|
||||
verbs += /client/proc/unjobban_panel
|
||||
verbs += /client/proc/jobbans
|
||||
verbs += /client/proc/unban_panel
|
||||
verbs += /datum/admins/proc/toggleooc
|
||||
verbs += /datum/admins/proc/toggleoocdead
|
||||
else
|
||||
return
|
||||
|
||||
//Admin Candidate
|
||||
if (holder.level >= 2)
|
||||
verbs += /client/proc/cmd_admin_add_random_ai_law
|
||||
verbs += /client/proc/secrets
|
||||
verbs += /client/proc/check_antagonists
|
||||
verbs += /client/proc/play_sound
|
||||
verbs += /client/proc/stealth
|
||||
else
|
||||
return
|
||||
|
||||
//Trial Admin
|
||||
if (holder.level >= 3)
|
||||
deadchat = 1
|
||||
|
||||
verbs += /client/proc/invisimin
|
||||
verbs += /datum/admins/proc/view_txt_log
|
||||
verbs += /datum/admins/proc/view_atk_log
|
||||
verbs += /datum/admins/proc/toggleaban //abandon mob
|
||||
verbs += /datum/admins/proc/show_traitor_panel
|
||||
verbs += /client/proc/getserverlog //fetch an old serverlog to look at
|
||||
verbs += /client/proc/admin_call_shuttle
|
||||
verbs += /client/proc/admin_cancel_shuttle
|
||||
verbs += /client/proc/cmd_admin_dress
|
||||
verbs += /client/proc/respawn_character
|
||||
verbs += /client/proc/spawn_xeno
|
||||
verbs += /client/proc/toggleprayers
|
||||
verbs += /proc/possess
|
||||
verbs += /proc/release
|
||||
verbs += /client/proc/one_click_antag
|
||||
|
||||
//bs12 specific
|
||||
verbs += /client/proc/admin_deny_shuttle
|
||||
verbs += /client/proc/editappear
|
||||
else
|
||||
return
|
||||
|
||||
//Badmin
|
||||
if (holder.level >= 4)
|
||||
verbs += /datum/admins/proc/adrev //toggle admin revives
|
||||
verbs += /datum/admins/proc/adspawn //toggle admin item spawning
|
||||
verbs += /client/proc/debug_variables
|
||||
verbs += /datum/admins/proc/access_news_network //Admin access to the newscaster network
|
||||
verbs += /client/proc/cmd_modify_ticker_variables
|
||||
verbs += /client/proc/Debug2 //debug toggle switch
|
||||
verbs += /client/proc/toggle_view_range
|
||||
verbs += /client/proc/Getmob
|
||||
verbs += /client/proc/Getkey
|
||||
verbs += /client/proc/sendmob
|
||||
verbs += /client/proc/Jump
|
||||
verbs += /client/proc/jumptokey
|
||||
verbs += /client/proc/jumptomob
|
||||
verbs += /client/proc/jumptoturf
|
||||
verbs += /client/proc/cmd_admin_delete
|
||||
verbs += /client/proc/cmd_admin_add_freeform_ai_law
|
||||
verbs += /client/proc/cmd_admin_add_random_ai_law
|
||||
verbs += /client/proc/cmd_admin_rejuvenate
|
||||
verbs += /client/proc/hide_most_verbs
|
||||
verbs += /client/proc/jumptocoord
|
||||
verbs += /client/proc/deadmin_self
|
||||
verbs += /client/proc/giveruntimelog //used by coders to retrieve runtime logs
|
||||
verbs += /client/proc/togglebuildmodeself
|
||||
verbs += /client/proc/debug_controller
|
||||
else
|
||||
return
|
||||
|
||||
//Game Admin
|
||||
if (holder.level >= 5)
|
||||
verbs += /datum/admins/proc/spawn_atom
|
||||
verbs += /client/proc/cmd_admin_list_open_jobs
|
||||
verbs += /client/proc/cmd_admin_direct_narrate
|
||||
verbs += /client/proc/colorooc
|
||||
verbs += /client/proc/kill_air
|
||||
verbs += /client/proc/cmd_admin_world_narrate
|
||||
verbs += /client/proc/cmd_debug_del_all
|
||||
verbs += /client/proc/cmd_debug_tog_aliens
|
||||
verbs += /client/proc/check_words
|
||||
verbs += /client/proc/drop_bomb
|
||||
verbs += /client/proc/kill_airgroup
|
||||
verbs += /client/proc/make_sound
|
||||
verbs += /client/proc/play_local_sound
|
||||
verbs += /client/proc/send_space_ninja
|
||||
verbs += /client/proc/restart_controller //Can call via aproccall --I_hate_easy_things.jpg, Mport --Agouri
|
||||
verbs += /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the new clickproc is being tested)
|
||||
verbs += /client/proc/toggle_gravity_on
|
||||
verbs += /client/proc/toggle_gravity_off
|
||||
verbs += /client/proc/toggle_random_events
|
||||
verbs += /client/proc/deadmin_self
|
||||
verbs += /client/proc/Set_Holiday //Force-set a Holiday
|
||||
verbs += /client/proc/admin_memo
|
||||
verbs += /client/proc/ToRban //ToRban frontend to access its features.
|
||||
verbs += /client/proc/game_panel
|
||||
else
|
||||
return
|
||||
|
||||
//Game Master
|
||||
if (holder.level >= 6)
|
||||
verbs += /datum/admins/proc/toggle_aliens //toggle aliens
|
||||
verbs += /datum/admins/proc/toggle_space_ninja //toggle ninjas
|
||||
verbs += /datum/admins/proc/adjump
|
||||
verbs += /client/proc/callproc
|
||||
verbs += /client/proc/triple_ai
|
||||
verbs += /client/proc/get_admin_state
|
||||
verbs += /client/proc/reload_admins
|
||||
verbs += /client/proc/cmd_debug_make_powernets
|
||||
verbs += /client/proc/object_talk
|
||||
verbs += /client/proc/strike_team
|
||||
verbs += /client/proc/enable_debug_verbs
|
||||
verbs += /client/proc/everyone_random
|
||||
verbs += /client/proc/only_one
|
||||
verbs += /client/proc/cinematic //show a cinematic sequence
|
||||
verbs += /client/proc/startSinglo //Used to prevent the station from losing power while testing stuff out.
|
||||
verbs += /client/proc/toggle_log_hrefs
|
||||
verbs += /client/proc/cmd_debug_mob_lists
|
||||
verbs += /client/proc/set_ooc
|
||||
else
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/client/proc/clear_admin_verbs()
|
||||
deadchat = 0
|
||||
verbs.Remove(
|
||||
/datum/admins/proc/announce,
|
||||
/datum/admins/proc/startnow,
|
||||
/datum/admins/proc/toggleAI, /*Toggle the AI*/
|
||||
/datum/admins/proc/toggleenter, /*Toggle enterting*/
|
||||
/datum/admins/proc/toggleguests, /*Toggle guests entering*/
|
||||
/datum/admins/proc/toggleooc, /*toggle ooc*/
|
||||
/datum/admins/proc/toggleoocdead, /*toggle ooc for dead/unc*/
|
||||
/datum/admins/proc/delay, /*game start delay*/
|
||||
/datum/admins/proc/immreboot, /*immediate reboot*/
|
||||
/datum/admins/proc/restart, /*restart*/
|
||||
/datum/admins/proc/show_traitor_panel,
|
||||
/datum/admins/proc/show_player_panel,
|
||||
/datum/admins/proc/toggle_aliens, /*toggle aliens*/
|
||||
/datum/admins/proc/toggle_space_ninja,/*toggle ninjas*/
|
||||
/datum/admins/proc/adjump,
|
||||
/datum/admins/proc/view_txt_log,
|
||||
/datum/admins/proc/view_atk_log,
|
||||
/datum/admins/proc/spawn_atom,
|
||||
/datum/admins/proc/adrev, /*toggle admin revives*/
|
||||
/datum/admins/proc/adspawn, /*toggle admin item spawning*/
|
||||
/datum/admins/proc/toggleaban, /*abandon mob*/
|
||||
/client/proc/hide_verbs,
|
||||
/client/proc/hide_most_verbs,
|
||||
/client/proc/show_verbs,
|
||||
/client/proc/colorooc,
|
||||
/client/proc/triple_ai,
|
||||
/client/proc/get_admin_state,
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/kill_air,
|
||||
/client/proc/cmd_debug_make_powernets,
|
||||
/client/proc/object_talk,
|
||||
/client/proc/strike_team,
|
||||
/client/proc/cmd_admin_list_open_jobs,
|
||||
/client/proc/cmd_admin_direct_narrate,
|
||||
/client/proc/cmd_admin_world_narrate,
|
||||
/client/proc/callproc,
|
||||
/client/proc/Cell,
|
||||
/client/proc/cmd_debug_del_all,
|
||||
/client/proc/cmd_debug_tog_aliens,
|
||||
/client/proc/check_words,
|
||||
/client/proc/drop_bomb,
|
||||
/client/proc/make_sound,
|
||||
/client/proc/only_one,
|
||||
/client/proc/send_space_ninja,
|
||||
/client/proc/debug_variables,
|
||||
/client/proc/cmd_modify_ticker_variables,
|
||||
/client/proc/Debug2, /*debug toggle switch*/
|
||||
/client/proc/toggle_view_range,
|
||||
/client/proc/Getmob,
|
||||
/client/proc/Getkey,
|
||||
/client/proc/sendmob,
|
||||
/client/proc/Jump,
|
||||
/client/proc/jumptokey,
|
||||
/client/proc/jumptomob,
|
||||
/client/proc/jumptoturf,
|
||||
/client/proc/cmd_admin_add_freeform_ai_law,
|
||||
/client/proc/cmd_admin_add_random_ai_law,
|
||||
/client/proc/cmd_admin_rejuvenate,
|
||||
/client/proc/cmd_admin_delete,
|
||||
/client/proc/toggleadminhelpsound,
|
||||
/client/proc/admin_call_shuttle,
|
||||
/client/proc/admin_cancel_shuttle,
|
||||
/client/proc/cmd_admin_dress,
|
||||
/client/proc/respawn_character,
|
||||
/client/proc/spawn_xeno,
|
||||
/client/proc/cmd_admin_add_random_ai_law,
|
||||
/client/proc/secrets,
|
||||
/client/proc/check_antagonists,
|
||||
/client/proc/play_sound,
|
||||
/client/proc/stealth,
|
||||
/client/proc/cmd_admin_check_contents,
|
||||
/client/proc/cmd_admin_create_centcom_report,
|
||||
/client/proc/deadchat, /*toggles deadchat*/
|
||||
/client/proc/cmd_admin_pm_context,
|
||||
/client/proc/cmd_admin_pm_panel,
|
||||
/client/proc/cmd_admin_say,
|
||||
/client/proc/cmd_admin_subtle_message,
|
||||
/client/proc/dsay,
|
||||
/client/proc/admin_ghost,
|
||||
/client/proc/game_panel,
|
||||
/client/proc/player_panel,
|
||||
/client/proc/unban_panel,
|
||||
/client/proc/jobbans,
|
||||
/client/proc/unjobban_panel,
|
||||
/client/proc/hide_verbs,
|
||||
/client/proc/general_report,
|
||||
/client/proc/air_report,
|
||||
/client/proc/cmd_admin_say,
|
||||
/client/proc/cmd_admin_gib_self,
|
||||
/client/proc/restart_controller,
|
||||
/client/proc/play_local_sound,
|
||||
/client/proc/enable_debug_verbs,
|
||||
/client/proc/toggleprayers,
|
||||
/client/proc/toggle_clickproc, /*TODO ERRORAGE (Temporary proc while the enw clickproc is being tested)*/
|
||||
/client/proc/toggle_hear_deadcast,
|
||||
/client/proc/toggle_hear_radio,
|
||||
/client/proc/player_panel_new,
|
||||
/client/proc/toggle_gravity_on,
|
||||
/client/proc/toggle_gravity_off,
|
||||
/client/proc/toggle_random_events,
|
||||
/client/proc/deadmin_self,
|
||||
/client/proc/jumptocoord,
|
||||
/client/proc/everyone_random,
|
||||
/client/proc/Set_Holiday,
|
||||
/client/proc/giveruntimelog, /*used by coders to retrieve runtime logs*/
|
||||
/client/proc/getserverlog,
|
||||
/client/proc/cinematic, /*show a cinematic sequence*/
|
||||
/client/proc/admin_memo,
|
||||
/client/proc/investigate_show, /*investigate in-game mishaps using various logs.*/
|
||||
/client/proc/toggle_log_hrefs,
|
||||
/client/proc/ToRban,
|
||||
/proc/possess,
|
||||
/proc/release,
|
||||
/client/proc/togglebuildmodeself,
|
||||
/client/proc/kill_airgroup,
|
||||
/client/proc/debug_controller,
|
||||
/client/proc/startSinglo,
|
||||
/client/proc/check_ai_laws,
|
||||
/client/proc/cmd_debug_mob_lists,
|
||||
/datum/admins/proc/access_news_network,
|
||||
/client/proc/one_click_antag,
|
||||
/client/proc/invisimin,
|
||||
/client/proc/set_ooc,
|
||||
|
||||
//bs12 verbs
|
||||
/client/proc/update_mob_sprite,
|
||||
/client/proc/mod_panel,
|
||||
/client/proc/admin_deny_shuttle,
|
||||
/client/proc/playernotes,
|
||||
/datum/admins/proc/show_skills,
|
||||
/client/proc/Report,
|
||||
/client/proc/display_admin_reports,
|
||||
/client/proc/editappear,
|
||||
/client/proc/cmd_mod_say,
|
||||
/client/proc/playernotes,
|
||||
/client/proc/cmd_admin_change_custom_event
|
||||
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
|
||||
var/list/admin_verbs_default = list(
|
||||
/datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/
|
||||
/client/proc/game_panel, /*game panel, allows to change game-mode etc*/
|
||||
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
|
||||
/datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
|
||||
/client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/
|
||||
/client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/
|
||||
/client/proc/cmd_admin_say, /*admin-only ooc chat*/
|
||||
/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/check_ai_laws, /*shows AI and borg laws*/
|
||||
/client/proc/check_antagonists, /*shows all antags*/
|
||||
/client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin 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*/
|
||||
/client/proc/toggle_hear_deadcast, /*toggles whether we hear deadchat*/
|
||||
/client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/
|
||||
/client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
|
||||
/client/proc/secrets
|
||||
)
|
||||
var/list/admin_verbs_admin = list(
|
||||
/client/proc/player_panel, /*shows an interface for all players, with links to various panels (old style)*/
|
||||
/client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
|
||||
/client/proc/invisimin, /*allows our mob to go invisible/visible*/
|
||||
/datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/
|
||||
/datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/
|
||||
/datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/
|
||||
/datum/admins/proc/announce, /*priority announce something to all clients.*/
|
||||
/client/proc/colorooc, /*allows us to set a custom colour for everythign we say in ooc*/
|
||||
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
|
||||
/client/proc/toggle_view_range, /*changes how far we can see*/
|
||||
/datum/admins/proc/view_txt_log, /*shows the server log (diary) for today*/
|
||||
// /datum/admins/proc/view_atk_log, /*shows the server combat-log, doesn't do anything presently*/
|
||||
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
|
||||
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
|
||||
/client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/
|
||||
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
|
||||
/client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/
|
||||
/datum/admins/proc/access_news_network, /*allows access of newscasters*/
|
||||
/client/proc/giveruntimelog, /*allows us to give access to runtime logs to somebody*/
|
||||
/client/proc/getserverlog, /*allows us to fetch server logs (diary) for other days*/
|
||||
/client/proc/jumptocoord, /*we ghost and jump to a coordinate*/
|
||||
/client/proc/Getmob, /*teleports a mob to our location*/
|
||||
/client/proc/Getkey, /*teleports a mob with a certain ckey to our location*/
|
||||
/client/proc/sendmob, /*sends a mob somewhere*/
|
||||
/client/proc/Jump,
|
||||
/client/proc/jumptokey, /*allows us to jump to the location of a mob with a certain ckey*/
|
||||
/client/proc/jumptomob, /*allows us to jump to a specific mob*/
|
||||
/client/proc/jumptoturf, /*allows us to jump to a specific turf*/
|
||||
/client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/
|
||||
/client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcomm*/
|
||||
/client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/
|
||||
/client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/
|
||||
/client/proc/cmd_admin_create_centcom_report,
|
||||
/client/proc/check_words /*displays cult-words*/
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
/client/proc/jobbans,
|
||||
/client/proc/unjobban_panel,
|
||||
/client/proc/DB_ban_panel
|
||||
)
|
||||
var/list/admin_verbs_sounds = list(
|
||||
/client/proc/play_local_sound,
|
||||
/client/proc/play_sound
|
||||
)
|
||||
var/list/admin_verbs_fun = list(
|
||||
/client/proc/object_talk,
|
||||
/client/proc/cmd_admin_dress,
|
||||
/client/proc/cmd_admin_gib_self,
|
||||
/client/proc/drop_bomb,
|
||||
/client/proc/cinematic,
|
||||
/client/proc/one_click_antag,
|
||||
/datum/admins/proc/toggle_aliens,
|
||||
/datum/admins/proc/toggle_space_ninja,
|
||||
/client/proc/only_one,
|
||||
/client/proc/send_space_ninja,
|
||||
/client/proc/cmd_admin_add_freeform_ai_law,
|
||||
/client/proc/cmd_admin_add_random_ai_law,
|
||||
/client/proc/make_sound,
|
||||
/client/proc/toggle_random_events
|
||||
)
|
||||
var/list/admin_verbs_spawn = list(
|
||||
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
||||
/client/proc/respawn_character
|
||||
)
|
||||
var/list/admin_verbs_server = list(
|
||||
/client/proc/Set_Holiday,
|
||||
/client/proc/ToRban,
|
||||
/datum/admins/proc/startnow,
|
||||
/datum/admins/proc/restart,
|
||||
/datum/admins/proc/delay,
|
||||
/datum/admins/proc/toggleaban,
|
||||
/client/proc/toggle_log_hrefs,
|
||||
/datum/admins/proc/immreboot,
|
||||
/client/proc/everyone_random,
|
||||
/datum/admins/proc/toggleAI,
|
||||
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
|
||||
/client/proc/cmd_debug_del_all,
|
||||
/datum/admins/proc/adrev,
|
||||
/datum/admins/proc/adspawn,
|
||||
/datum/admins/proc/adjump,
|
||||
/client/proc/toggle_random_events
|
||||
)
|
||||
var/list/admin_verbs_debug = list(
|
||||
/client/proc/restart_controller,
|
||||
/client/proc/cmd_admin_list_open_jobs,
|
||||
/client/proc/Debug2,
|
||||
/client/proc/kill_air,
|
||||
/client/proc/cmd_debug_make_powernets,
|
||||
/client/proc/kill_airgroup,
|
||||
/client/proc/debug_controller,
|
||||
/client/proc/cmd_debug_mob_lists,
|
||||
/client/proc/cmd_admin_delete,
|
||||
/client/proc/cmd_debug_del_all,
|
||||
/client/proc/cmd_debug_tog_aliens,
|
||||
/client/proc/air_report,
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/restart_controller,
|
||||
/client/proc/enable_debug_verbs
|
||||
)
|
||||
var/list/admin_verbs_possess = list(
|
||||
/proc/possess,
|
||||
/proc/release
|
||||
)
|
||||
var/list/admin_verbs_permissions = list(
|
||||
/client/proc/edit_admin_permissions
|
||||
)
|
||||
var/list/admin_verbs_rejuv = list(
|
||||
/client/proc/cmd_admin_rejuvenate,
|
||||
/client/proc/respawn_character
|
||||
)
|
||||
|
||||
//verbs which can be hidden - needs work
|
||||
var/list/admin_verbs_hideable = list(
|
||||
/client/proc/deadmin_self,
|
||||
/client/proc/deadchat,
|
||||
/client/proc/toggleprayers,
|
||||
/client/proc/toggle_hear_deadcast,
|
||||
/client/proc/toggle_hear_radio,
|
||||
/datum/admins/proc/show_traitor_panel,
|
||||
/datum/admins/proc/toggleenter,
|
||||
/datum/admins/proc/toggleguests,
|
||||
/datum/admins/proc/announce,
|
||||
/client/proc/colorooc,
|
||||
/client/proc/admin_ghost,
|
||||
/client/proc/toggle_view_range,
|
||||
/datum/admins/proc/view_txt_log,
|
||||
// /datum/admins/proc/view_atk_log,
|
||||
/client/proc/cmd_admin_subtle_message,
|
||||
/client/proc/cmd_admin_check_contents,
|
||||
/datum/admins/proc/access_news_network,
|
||||
/client/proc/giveruntimelog,
|
||||
/client/proc/getserverlog,
|
||||
/client/proc/admin_call_shuttle,
|
||||
/client/proc/admin_cancel_shuttle,
|
||||
/client/proc/cmd_admin_direct_narrate,
|
||||
/client/proc/cmd_admin_world_narrate,
|
||||
/client/proc/check_words,
|
||||
/client/proc/play_local_sound,
|
||||
/client/proc/play_sound,
|
||||
/client/proc/object_talk,
|
||||
/client/proc/cmd_admin_dress,
|
||||
/client/proc/cmd_admin_gib_self,
|
||||
/client/proc/drop_bomb,
|
||||
/client/proc/cinematic,
|
||||
/datum/admins/proc/toggle_aliens,
|
||||
/datum/admins/proc/toggle_space_ninja,
|
||||
/client/proc/only_one,
|
||||
/client/proc/send_space_ninja,
|
||||
/client/proc/cmd_admin_add_freeform_ai_law,
|
||||
/client/proc/cmd_admin_add_random_ai_law,
|
||||
/client/proc/cmd_admin_create_centcom_report,
|
||||
/client/proc/make_sound,
|
||||
/client/proc/toggle_random_events,
|
||||
/client/proc/cmd_admin_add_random_ai_law,
|
||||
/client/proc/Set_Holiday,
|
||||
/client/proc/ToRban,
|
||||
/datum/admins/proc/startnow,
|
||||
/datum/admins/proc/restart,
|
||||
/datum/admins/proc/delay,
|
||||
/datum/admins/proc/toggleaban,
|
||||
/client/proc/toggle_log_hrefs,
|
||||
/datum/admins/proc/immreboot,
|
||||
/client/proc/everyone_random,
|
||||
/datum/admins/proc/toggleAI,
|
||||
/datum/admins/proc/adrev,
|
||||
/datum/admins/proc/adspawn,
|
||||
/datum/admins/proc/adjump,
|
||||
/client/proc/restart_controller,
|
||||
/client/proc/cmd_admin_list_open_jobs,
|
||||
/client/proc/callproc,
|
||||
/client/proc/Debug2,
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/kill_air,
|
||||
/client/proc/cmd_debug_make_powernets,
|
||||
/client/proc/kill_airgroup,
|
||||
/client/proc/debug_controller,
|
||||
/client/proc/startSinglo,
|
||||
/client/proc/cmd_debug_mob_lists,
|
||||
/client/proc/cmd_debug_del_all,
|
||||
/client/proc/cmd_debug_tog_aliens,
|
||||
/client/proc/air_report,
|
||||
/client/proc/enable_debug_verbs,
|
||||
/proc/possess,
|
||||
/proc/release
|
||||
)
|
||||
var/list/admin_verbs_mod = list(
|
||||
/client/proc/check_antagonists, /*shows all antags*/
|
||||
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
|
||||
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
|
||||
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game.*/
|
||||
/client/proc/playernotes,
|
||||
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
|
||||
/client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/
|
||||
/client/proc/hide_verbs, /*hides all our adminverbs*/
|
||||
/client/proc/hide_verbs,
|
||||
/client/proc/mod_panel,
|
||||
/client/proc/cmd_mod_say,
|
||||
/datum/admins/proc/show_player_info
|
||||
//client/proc/Report,
|
||||
//client/proc/display_admin_reports
|
||||
)
|
||||
/client/proc/add_admin_verbs()
|
||||
if(holder)
|
||||
verbs += admin_verbs_default
|
||||
if(holder.rights & R_BUILDMODE) verbs += /client/proc/togglebuildmodeself
|
||||
if(holder.rights & R_ADMIN) verbs += admin_verbs_admin
|
||||
if(holder.rights & R_BAN) verbs += admin_verbs_ban
|
||||
if(holder.rights & R_FUN) verbs += admin_verbs_fun
|
||||
if(holder.rights & R_SERVER) verbs += admin_verbs_server
|
||||
if(holder.rights & R_DEBUG) verbs += admin_verbs_debug
|
||||
if(holder.rights & R_POSSESS) verbs += admin_verbs_possess
|
||||
if(holder.rights & R_PERMISSIONS) verbs += admin_verbs_permissions
|
||||
if(holder.rights & R_STEALTH) verbs += /client/proc/stealth
|
||||
if(holder.rights & R_REJUVINATE) verbs += admin_verbs_rejuv
|
||||
if(holder.rights & R_SOUNDS) verbs += admin_verbs_sounds
|
||||
if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn
|
||||
if(holder.rights & R_MOD) verbs -= admin_verbs_default; verbs += admin_verbs_mod
|
||||
|
||||
/client/proc/remove_admin_verbs()
|
||||
verbs.Remove(
|
||||
admin_verbs_default,
|
||||
/client/proc/togglebuildmodeself,
|
||||
admin_verbs_admin,
|
||||
admin_verbs_ban,
|
||||
admin_verbs_fun,
|
||||
admin_verbs_server,
|
||||
admin_verbs_debug,
|
||||
admin_verbs_possess,
|
||||
admin_verbs_permissions,
|
||||
/client/proc/stealth,
|
||||
admin_verbs_rejuv,
|
||||
admin_verbs_sounds,
|
||||
admin_verbs_spawn,
|
||||
/*Debug verbs added by "show debug verbs"*/
|
||||
/client/proc/Cell,
|
||||
/client/proc/do_not_use_these,
|
||||
/client/proc/camera_view,
|
||||
/client/proc/sec_camera_report,
|
||||
/client/proc/intercom_view,
|
||||
/client/proc/air_status,
|
||||
/client/proc/atmosscan,
|
||||
/client/proc/powerdebug,
|
||||
/client/proc/count_objects_on_z_level,
|
||||
/client/proc/count_objects_all,
|
||||
/client/proc/cmd_assume_direct_control,
|
||||
/client/proc/jump_to_dead_group,
|
||||
/client/proc/startSinglo,
|
||||
/client/proc/ticklag,
|
||||
/client/proc/cmd_admin_grantfullaccess,
|
||||
/client/proc/kaboom,
|
||||
/client/proc/splash,
|
||||
/client/proc/cmd_admin_areatest
|
||||
)
|
||||
|
||||
/client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs
|
||||
set name = "Adminverbs - Hide Most"
|
||||
set category = "Admin"
|
||||
|
||||
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>"
|
||||
feedback_add_details("admin_verb","HMV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/hide_verbs()
|
||||
set name = "Adminverbs - Hide All"
|
||||
set category = "Admin"
|
||||
|
||||
remove_admin_verbs()
|
||||
verbs += /client/proc/show_verbs
|
||||
|
||||
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
|
||||
|
||||
/client/proc/show_verbs()
|
||||
set name = "Adminverbs - Show"
|
||||
set category = "Admin"
|
||||
|
||||
verbs -= /client/proc/show_verbs
|
||||
add_admin_verbs()
|
||||
|
||||
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!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/client/proc/admin_ghost()
|
||||
set category = "Admin"
|
||||
set name = "Aghost"
|
||||
@@ -475,18 +334,6 @@
|
||||
feedback_add_details("admin_verb","O") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/get_admin_state()
|
||||
set name = "Get Admin State"
|
||||
set category = "Debug"
|
||||
for(var/client/C in admin_list)
|
||||
if(C.holder.state == 1)
|
||||
src << "[C.key] is playing - [C.holder.state]"
|
||||
else if(C.holder.state == 2)
|
||||
src << "[C.key] is observing - [C.holder.state]"
|
||||
else
|
||||
src << "[C.key] is undefined - [C.holder.state]"
|
||||
feedback_add_details("admin_verb","GAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/invisimin()
|
||||
set name = "Invisimin"
|
||||
set category = "Admin"
|
||||
@@ -534,7 +381,10 @@
|
||||
set name = "Display Job bans"
|
||||
set category = "Admin"
|
||||
if(holder)
|
||||
holder.Jobbans()
|
||||
if(config.ban_legacy_system)
|
||||
holder.Jobbans()
|
||||
else
|
||||
holder.DB_ban_panel()
|
||||
feedback_add_details("admin_verb","VJB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -542,7 +392,10 @@
|
||||
set name = "Unban Panel"
|
||||
set category = "Admin"
|
||||
if(holder)
|
||||
holder.unbanpanel()
|
||||
if(config.ban_legacy_system)
|
||||
holder.unbanpanel()
|
||||
else
|
||||
holder.DB_ban_panel()
|
||||
feedback_add_details("admin_verb","UBP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -587,17 +440,14 @@
|
||||
message_admins("[key_name_admin(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]", 1)
|
||||
feedback_add_details("admin_verb","SM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
#define AUTOBATIME 10
|
||||
/client/proc/warn(var/mob/M in player_list)
|
||||
/*set category = "Special Verbs"
|
||||
set name = "Warn"
|
||||
set desc = "Warn a player"*/ //Based on the information I gathered via stat logging this verb was not used. Use the show player panel alternative. --erro
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(M.client && M.client.holder && (M.client.holder.level >= holder.level))
|
||||
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!M.client.warned)
|
||||
M << "\red <B>You have been warned by an administrator. This is the only warning you will recieve.</B>"
|
||||
M.client.warned = 1
|
||||
@@ -652,6 +502,17 @@
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].")
|
||||
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the spell [S].", 1)
|
||||
|
||||
/client/proc/give_disease(mob/T as mob in mob_list) // -- Giacom
|
||||
set category = "Fun"
|
||||
set name = "Give Disease"
|
||||
set desc = "Gives a Disease to a mob."
|
||||
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in diseases
|
||||
if(!D) return
|
||||
T.contract_disease(new D, 1)
|
||||
feedback_add_details("admin_verb","GD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")
|
||||
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the disease [D].", 1)
|
||||
|
||||
/client/proc/make_sound(var/obj/O in world) // -- TLE
|
||||
set category = "Special Verbs"
|
||||
set name = "Make Sound"
|
||||
@@ -711,17 +572,6 @@
|
||||
log_admin("[key_name(usr)] used 'kill air'.")
|
||||
message_admins("\blue [key_name_admin(usr)] used 'kill air'.", 1)
|
||||
|
||||
/client/proc/show_verbs()
|
||||
set name = "Toggle admin verb visibility"
|
||||
set category = "Admin"
|
||||
src << "Restoring admin verbs back"
|
||||
|
||||
var/temp = deadchat
|
||||
holder.state = null //forces a full verbs update
|
||||
update_admins(holder.rank)
|
||||
deadchat = temp
|
||||
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggle_clickproc() //TODO ERRORAGE (This is a temporary verb here while I test the new clicking proc)
|
||||
set name = "Toggle NewClickProc"
|
||||
set category = "Debug"
|
||||
@@ -753,72 +603,14 @@
|
||||
set name = "De-admin self"
|
||||
set category = "Admin"
|
||||
|
||||
if(src.holder)
|
||||
if(holder)
|
||||
if(alert("Confirm self-deadmin for the round? You can't re-admin yourself without someont promoting you.",,"Yes","No") == "Yes")
|
||||
log_admin("[src] deadmined themself.")
|
||||
message_admins("[src] deadmined themself.", 1)
|
||||
deadmin()
|
||||
usr << "You are now a normal player."
|
||||
src << "<span class='interface'>You are now a normal player.</span>"
|
||||
feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs
|
||||
set name = "Toggle most admin verb visibility"
|
||||
set category = "Admin"
|
||||
src << "Hiding most admin verbs"
|
||||
|
||||
var/temp = deadchat
|
||||
clear_admin_verbs()
|
||||
deadchat = temp
|
||||
verbs -= /client/proc/hide_verbs
|
||||
verbs -= /client/proc/hide_most_verbs
|
||||
verbs += /client/proc/show_verbs
|
||||
|
||||
if(holder.level >= 5)//Game Admin********************************************************************
|
||||
verbs += /client/proc/colorooc
|
||||
|
||||
if(holder.level >= 4)//Badmin********************************************************************
|
||||
verbs += /client/proc/debug_variables
|
||||
//verbs += /client/proc/cmd_modify_object_variables --merged with view vairiables
|
||||
verbs += /client/proc/Jump
|
||||
verbs += /client/proc/jumptoturf
|
||||
verbs += /client/proc/togglebuildmodeself
|
||||
|
||||
verbs += /client/proc/dsay
|
||||
verbs += /client/proc/admin_ghost
|
||||
verbs += /client/proc/game_panel
|
||||
verbs += /client/proc/player_panel
|
||||
verbs += /client/proc/cmd_admin_subtle_message
|
||||
verbs += /client/proc/cmd_admin_pm_context
|
||||
verbs += /client/proc/cmd_admin_pm_panel
|
||||
verbs += /client/proc/cmd_admin_gib_self
|
||||
|
||||
verbs += /client/proc/deadchat //toggles deadchat
|
||||
verbs += /datum/admins/proc/toggleooc //toggle ooc
|
||||
verbs += /client/proc/cmd_admin_say//asay
|
||||
verbs += /client/proc/toggleadminhelpsound
|
||||
feedback_add_details("admin_verb","HMV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
|
||||
/client/proc/hide_verbs()
|
||||
set name = "Toggle admin verb visibility"
|
||||
set category = "Admin"
|
||||
src << "Hiding almost all admin verbs"
|
||||
|
||||
var/temp = deadchat
|
||||
clear_admin_verbs()
|
||||
deadchat = temp
|
||||
verbs -= /client/proc/hide_verbs
|
||||
verbs -= /client/proc/hide_most_verbs
|
||||
verbs += /client/proc/show_verbs
|
||||
|
||||
verbs += /client/proc/deadchat //toggles deadchat
|
||||
verbs += /datum/admins/proc/toggleooc //toggle ooc
|
||||
verbs += /client/proc/cmd_admin_say//asay
|
||||
feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/toggle_log_hrefs()
|
||||
set name = "Toggle href logging"
|
||||
set category = "Server"
|
||||
@@ -942,7 +734,6 @@
|
||||
M.update_body()
|
||||
M.check_dna(M)
|
||||
*/
|
||||
|
||||
/client/proc/playernotes()
|
||||
set name = "Show Player Info"
|
||||
set category = "Admin"
|
||||
|
||||
@@ -48,24 +48,31 @@ DEBUG
|
||||
*/
|
||||
|
||||
/proc/jobban_loadbanfile()
|
||||
var/savefile/S=new("data/job_full.ban")
|
||||
S["keys[0]"] >> jobban_keylist
|
||||
log_admin("Loading jobban_rank")
|
||||
S["runonce"] >> jobban_runonce
|
||||
if(config.ban_legacy_system)
|
||||
var/savefile/S=new("data/job_full.ban")
|
||||
S["keys[0]"] >> jobban_keylist
|
||||
log_admin("Loading jobban_rank")
|
||||
S["runonce"] >> jobban_runonce
|
||||
|
||||
/*
|
||||
for(var/i = 1; i <= length(jobban_keylist); i++)
|
||||
if( findtext(jobban_keylist[i],"##") )
|
||||
var/index = findtext(jobban_keylist[i],"##")
|
||||
var/s = jobban_keylist[i]
|
||||
s = copytext( s , 1 , index ) //Removes the reason for the ban from this list
|
||||
jobban_keylist[i] = s
|
||||
world << "DEBUG: index: [index] - s: [s] - jobban_keylist\[[i]\] = [jobban_keylist[i]]"*/
|
||||
if (!length(jobban_keylist))
|
||||
jobban_keylist=list()
|
||||
log_admin("jobban_keylist was empty")
|
||||
else
|
||||
if(!establish_db_connection())
|
||||
world.log << "Database connection failed. Reverting to the legacy ban system."
|
||||
diary << "Database connection failed. Reverting to the legacy ban system."
|
||||
config.ban_legacy_system = 1
|
||||
jobban_loadbanfile()
|
||||
return
|
||||
|
||||
if (!length(jobban_keylist))
|
||||
jobban_keylist=list()
|
||||
log_admin("jobban_keylist was empty")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, job FROM erro_ban WHERE bantype = 'JOB_PERMABAN' AND isnull(unbanned)")
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
var/ckey = query.item[1]
|
||||
var/job = query.item[2]
|
||||
|
||||
jobban_keylist.Add("[ckey] - [job]")
|
||||
|
||||
/proc/jobban_savebanfile()
|
||||
var/savefile/S=new("data/job_full.ban")
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
var/mobjs = null
|
||||
mobjs = dd_list2text(typesof(/mob), ";")
|
||||
create_mob_html = file2text('html/create_object.html')
|
||||
create_mob_html = dd_replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
|
||||
create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
|
||||
|
||||
user << browse(dd_replacetext(create_mob_html, "/* ref src */", "\ref[src]"), "window=create_mob;size=425x475")
|
||||
user << browse(replacetext(create_mob_html, "/* ref src */", "\ref[src]"), "window=create_mob;size=425x475")
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
var/objectjs = null
|
||||
objectjs = dd_list2text(typesof(/obj), ";")
|
||||
create_object_html = file2text('html/create_object.html')
|
||||
create_object_html = dd_replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
|
||||
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
|
||||
|
||||
user << browse(dd_replacetext(create_object_html, "/* ref src */", "\ref[src]"), "window=create_object;size=425x475")
|
||||
user << browse(replacetext(create_object_html, "/* ref src */", "\ref[src]"), "window=create_object;size=425x475")
|
||||
|
||||
|
||||
/datum/admins/proc/quick_create_object(var/mob/user)
|
||||
@@ -23,6 +23,6 @@
|
||||
var/objectjs = null
|
||||
objectjs = dd_list2text(typesof(path), ";")
|
||||
quick_create_object_html = file2text('html/create_object.html')
|
||||
quick_create_object_html = dd_replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
|
||||
quick_create_object_html = replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
|
||||
|
||||
user << browse(dd_replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=425x475")
|
||||
user << browse(replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=425x475")
|
||||
@@ -4,6 +4,6 @@
|
||||
var/turfjs = null
|
||||
turfjs = dd_list2text(typesof(/turf), ";")
|
||||
create_turf_html = file2text('html/create_object.html')
|
||||
create_turf_html = dd_replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"")
|
||||
create_turf_html = replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"")
|
||||
|
||||
user << browse(dd_replacetext(create_turf_html, "/* ref src */", "\ref[src]"), "window=create_turf;size=425x475")
|
||||
user << browse(replacetext(create_turf_html, "/* ref src */", "\ref[src]"), "window=create_turf;size=425x475")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -262,23 +262,23 @@
|
||||
else if(isobserver(M))
|
||||
M_job = "Ghost"
|
||||
|
||||
M_job = dd_replacetext(M_job, "'", "")
|
||||
M_job = dd_replacetext(M_job, "\"", "")
|
||||
M_job = dd_replacetext(M_job, "\\", "")
|
||||
M_job = replacetext(M_job, "'", "")
|
||||
M_job = replacetext(M_job, "\"", "")
|
||||
M_job = replacetext(M_job, "\\", "")
|
||||
|
||||
var/M_name = M.name
|
||||
M_name = dd_replacetext(M_name, "'", "")
|
||||
M_name = dd_replacetext(M_name, "\"", "")
|
||||
M_name = dd_replacetext(M_name, "\\", "")
|
||||
M_name = replacetext(M_name, "'", "")
|
||||
M_name = replacetext(M_name, "\"", "")
|
||||
M_name = replacetext(M_name, "\\", "")
|
||||
var/M_rname = M.real_name
|
||||
M_rname = dd_replacetext(M_rname, "'", "")
|
||||
M_rname = dd_replacetext(M_rname, "\"", "")
|
||||
M_rname = dd_replacetext(M_rname, "\\", "")
|
||||
M_rname = replacetext(M_rname, "'", "")
|
||||
M_rname = replacetext(M_rname, "\"", "")
|
||||
M_rname = replacetext(M_rname, "\\", "")
|
||||
|
||||
var/M_key = M.key
|
||||
M_key = dd_replacetext(M_key, "'", "")
|
||||
M_key = dd_replacetext(M_key, "\"", "")
|
||||
M_key = dd_replacetext(M_key, "\\", "")
|
||||
M_key = replacetext(M_key, "'", "")
|
||||
M_key = replacetext(M_key, "\"", "")
|
||||
M_key = replacetext(M_key, "\\", "")
|
||||
|
||||
//output for each mob
|
||||
dat += {"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
|
||||
|
||||
|
||||
//Before this proc is called, the holder variable must already be set, with the proper rank, level and permissions set.
|
||||
//This proc also DOES NOT CLEAR EXISTING ADMIN VERBS
|
||||
|
||||
/client/proc/handle_permission_verbs()
|
||||
if(!holder || !holder.rank || !holder.sql_permissions)
|
||||
return
|
||||
|
||||
if(holder.sql_permissions & PERMISSIONS)
|
||||
verbs += /client/proc/edit_admin_permissions
|
||||
@@ -8,21 +8,9 @@
|
||||
holder.edit_admin_permissions()
|
||||
|
||||
/datum/admins/proc/edit_admin_permissions()
|
||||
if(!usr.client)
|
||||
return
|
||||
if(!check_rights(R_PERMISSIONS)) return
|
||||
|
||||
if(!usr.client.holder || !(usr.client.holder.sql_permissions & PERMISSIONS))
|
||||
usr << "\red You do not have permission to do this!"
|
||||
return
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "\red Failed to establish database connection"
|
||||
return
|
||||
@@ -53,14 +41,18 @@
|
||||
var/adm_rank = select_query.item[2]
|
||||
var/adm_level = select_query.item[3]
|
||||
var/adm_flags = text2num(select_query.item[4])
|
||||
|
||||
var/rights_text = rights2text(adm_flags)
|
||||
rights_text = replacetextEx(rights_text, "+", "<br>+")
|
||||
if(length(rights_text) > 5)
|
||||
rights_text = copytext(rights_text, 5) //Removes the first <br>, which replacetextEx() adds.
|
||||
|
||||
output += "<tr bgcolor='[(i % 2) ? color1 : color2]'>"
|
||||
output += "<td align='center'><b>[adm_ckey]</b></td>"
|
||||
output += "<td align='center'><b>[adm_rank]</b></td>"
|
||||
output += "<td align='center'>[adm_level]</td>"
|
||||
var/list/permissionlist = bitfield2list(adm_flags, permissionwords_sql)
|
||||
output += "<td align='center'>"
|
||||
for(var/word in permissionlist)
|
||||
output += "[word]<BR>"
|
||||
output += "<font size='2'>[rights_text]</font>"
|
||||
output += "</td>"
|
||||
output += "<td align='center'><font size='2'>"
|
||||
|
||||
@@ -81,18 +73,12 @@
|
||||
if(!usr.client)
|
||||
return
|
||||
|
||||
if(!usr.client.holder || !(usr.client.holder.sql_permissions & PERMISSIONS))
|
||||
if(!usr.client.holder || !(usr.client.holder.rights & R_PERMISSIONS))
|
||||
usr << "\red You do not have permission to do this!"
|
||||
return
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
establish_db_connection()
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "\red Failed to establish database connection"
|
||||
return
|
||||
@@ -130,3 +116,58 @@
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_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 << "\blue Admin rank changed."
|
||||
|
||||
|
||||
|
||||
/datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission)
|
||||
|
||||
if(!usr.client)
|
||||
return
|
||||
|
||||
if(!usr.client.holder || !(usr.client.holder.rights & R_PERMISSIONS))
|
||||
usr << "\red You do not have permission to do this!"
|
||||
return
|
||||
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "\red Failed to establish database connection"
|
||||
return
|
||||
|
||||
if(!adm_ckey || !new_permission)
|
||||
return
|
||||
|
||||
adm_ckey = ckey(adm_ckey)
|
||||
|
||||
if(!adm_ckey)
|
||||
return
|
||||
|
||||
if(istext(new_permission))
|
||||
new_permission = text2num(new_permission)
|
||||
|
||||
if(!istext(adm_ckey) || !isnum(new_permission))
|
||||
return
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, flags FROM erro_admin WHERE ckey = '[adm_ckey]'")
|
||||
select_query.Execute()
|
||||
|
||||
var/admin_id
|
||||
var/admin_rights
|
||||
while(select_query.NextRow())
|
||||
admin_id = text2num(select_query.item[1])
|
||||
admin_rights = text2num(select_query.item[2])
|
||||
|
||||
if(!admin_id)
|
||||
return
|
||||
|
||||
if(admin_rights & new_permission) //This admin already has this permission, so we are removing it.
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET flags = [admin_rights & ~new_permission] WHERE id = [admin_id]")
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
|
||||
log_query.Execute()
|
||||
usr << "\blue Permission removed."
|
||||
else //This admin doesn't have this permission, so we are adding it.
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET flags = '[admin_rights | new_permission]' WHERE id = [admin_id]")
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')")
|
||||
log_query.Execute()
|
||||
usr << "\blue Permission added."
|
||||
@@ -0,0 +1,154 @@
|
||||
//This stuff was originally intended to be integrated into the ban-system I was working on
|
||||
//but it's safe to say that'll never be finished. So I've merged it into the current player panel.
|
||||
//enjoy ~Carn
|
||||
/*
|
||||
#define NOTESFILE "data/player_notes.sav" //where the player notes are saved
|
||||
|
||||
datum/admins/proc/notes_show(var/ckey)
|
||||
usr << browse("<head><title>Player Notes</title></head><body>[notes_gethtml(ckey)]</body>","window=player_notes;size=700x400")
|
||||
|
||||
|
||||
datum/admins/proc/notes_gethtml(var/ckey)
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
if(!notesfile) return "<font color='red'>Error: Cannot access [NOTESFILE]</font>"
|
||||
if(ckey)
|
||||
. = "<b>Notes for <a href='?src=\ref[src];notes=show'>[ckey]</a>:</b> <a href='?src=\ref[src];notes=add;ckey=[ckey]'>\[+\]</a> <a href='?src=\ref[src];notes=remove;ckey=[ckey]'>\[-\]</a><br>"
|
||||
notesfile.cd = "/[ckey]"
|
||||
var/index = 1
|
||||
while( !notesfile.eof )
|
||||
var/note
|
||||
notesfile >> note
|
||||
. += "[note] <a href='?src=\ref[src];notes=remove;ckey=[ckey];from=[index]'>\[-\]</a><br>"
|
||||
index++
|
||||
else
|
||||
. = "<b>All Notes:</b> <a href='?src=\ref[src];notes=add'>\[+\]</a> <a href='?src=\ref[src];notes=remove'>\[-\]</a><br>"
|
||||
notesfile.cd = "/"
|
||||
for(var/dir in notesfile.dir)
|
||||
. += "<a href='?src=\ref[src];notes=show;ckey=[dir]'>[dir]</a><br>"
|
||||
return
|
||||
|
||||
|
||||
//handles adding notes to the end of a ckey's buffer
|
||||
//originally had seperate entries such as var/by to record who left the note and when
|
||||
//but the current bansystem is a heap of dung.
|
||||
/proc/notes_add(var/ckey, var/note)
|
||||
if(!ckey)
|
||||
ckey = ckey(input(usr,"Who would you like to add notes for?","Enter a ckey",null) as text|null)
|
||||
if(!ckey) return
|
||||
|
||||
if(!note)
|
||||
note = html_encode(input(usr,"Enter your note:","Enter some text",null) as message|null)
|
||||
if(!note) return
|
||||
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
if(!notesfile) return
|
||||
notesfile.cd = "/[ckey]"
|
||||
notesfile.eof = 1 //move to the end of the buffer
|
||||
notesfile << "[time2text(world.realtime,"DD-MMM-YYYY")] | [note][(usr && usr.ckey)?" ~[usr.ckey]":""]"
|
||||
return
|
||||
|
||||
//handles removing entries from the buffer, or removing the entire directory if no start_index is given
|
||||
/proc/notes_remove(var/ckey, var/start_index, var/end_index)
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
if(!notesfile) return
|
||||
|
||||
if(!ckey)
|
||||
notesfile.cd = "/"
|
||||
ckey = ckey(input(usr,"Who would you like to remove notes for?","Enter a ckey",null) as null|anything in notesfile.dir)
|
||||
if(!ckey) return
|
||||
|
||||
if(start_index)
|
||||
notesfile.cd = "/[ckey]"
|
||||
var/list/noteslist = list()
|
||||
if(!end_index) end_index = start_index
|
||||
var/index = 0
|
||||
while( !notesfile.eof )
|
||||
index++
|
||||
var/temp
|
||||
notesfile >> temp
|
||||
if( (start_index <= index) && (index <= end_index) )
|
||||
continue
|
||||
noteslist += temp
|
||||
|
||||
notesfile.eof = -2 //Move to the start of the buffer and then erase.
|
||||
|
||||
for( var/note in noteslist )
|
||||
notesfile << note
|
||||
else
|
||||
notesfile.cd = "/"
|
||||
if(alert(usr,"Are you sure you want to remove all their notes?","Confirmation","No","Yes - Remove all notes") == "Yes - Remove all notes")
|
||||
notesfile.dir.Remove(ckey)
|
||||
return
|
||||
|
||||
#undef NOTESFILE
|
||||
*/
|
||||
|
||||
//Hijacking this file for BS12 playernotes functions. I like this ^ one systemm alright, but converting sounds too bothersome~ Chinsky.
|
||||
|
||||
/proc/notes_add(var/key, var/note, var/mob/usr)
|
||||
if (!key || !note)
|
||||
return
|
||||
|
||||
//Loading list of notes for this key
|
||||
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
|
||||
var/list/infos
|
||||
info >> infos
|
||||
if(!infos) infos = list()
|
||||
|
||||
//Overly complex timestamp creation
|
||||
var/modifyer = "th"
|
||||
switch(time2text(world.timeofday, "DD"))
|
||||
if("01","21","31")
|
||||
modifyer = "st"
|
||||
if("02","22",)
|
||||
modifyer = "nd"
|
||||
if("03","23")
|
||||
modifyer = "rd"
|
||||
var/day_string = "[time2text(world.timeofday, "DD")][modifyer]"
|
||||
if(copytext(day_string,1,2) == "0")
|
||||
day_string = copytext(day_string,2)
|
||||
var/full_date = time2text(world.timeofday, "DDD, Month DD of YYYY")
|
||||
var/day_loc = findtext(full_date, time2text(world.timeofday, "DD"))
|
||||
|
||||
var/datum/player_info/P = new
|
||||
if (usr)
|
||||
P.author = usr.key
|
||||
P.rank = usr.client.holder.rank
|
||||
else
|
||||
P.author = "Adminbot"
|
||||
P.rank = "Friendly Robot"
|
||||
P.content = note
|
||||
P.timestamp = "[copytext(full_date,1,day_loc)][day_string][copytext(full_date,day_loc+2)]"
|
||||
|
||||
infos += P
|
||||
info << infos
|
||||
|
||||
message_admins("\blue [key_name_admin(usr)] has edited [key]'s notes.")
|
||||
log_admin("[key_name(usr)] has edited [key]'s notes.")
|
||||
|
||||
del info
|
||||
|
||||
//Updating list of keys with notes on them
|
||||
var/savefile/note_list = new("data/player_notes.sav")
|
||||
var/list/note_keys
|
||||
note_list >> note_keys
|
||||
if(!note_keys) note_keys = list()
|
||||
if(!note_keys.Find(key)) note_keys += key
|
||||
note_list << note_keys
|
||||
del note_list
|
||||
|
||||
|
||||
/proc/notes_del(var/key, var/index)
|
||||
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
|
||||
var/list/infos
|
||||
info >> infos
|
||||
if(!infos || infos.len < index) return
|
||||
|
||||
var/datum/player_info/item = infos[index]
|
||||
infos.Remove(item)
|
||||
info << infos
|
||||
|
||||
message_admins("\blue [key_name_admin(usr)] deleted one of [key]'s notes.")
|
||||
log_admin("[key_name(usr)] deleted one of [key]'s notes.")
|
||||
|
||||
del info
|
||||
|
||||
@@ -78,9 +78,9 @@
|
||||
body += "<a href='?src=\ref[src];adminplayeropts="+ref+"'>PP</a> - "
|
||||
body += "<a href='?src=\ref[src];notes=show;mob="+ref+"'>N</a> - "
|
||||
body += "<a href='?src=\ref[src];adminplayervars="+ref+"'>VV</a> - "
|
||||
body += "<a href='?src=\ref[src];traitor_panel_pp="+ref+"'>TP</a> - "
|
||||
body += "<a href='?src=\ref[src];traitor="+ref+"'>TP</a> - "
|
||||
body += "<a href='?src=\ref[usr];priv_msg=\ref"+ref+"'>PM</a> - "
|
||||
body += "<a href='?src=\ref[src];adminplayersubtlemessage="+ref+"'>SM</a> - "
|
||||
body += "<a href='?src=\ref[src];subtlemessage="+ref+"'>SM</a> - "
|
||||
body += "<a href='?src=\ref[src];adminplayerobservejump="+ref+"'>JMP</a><br>"
|
||||
if(antagonist > 0)
|
||||
body += "<font size='2'><a href='?src=\ref[src];secretsadmin=check_antagonist'><font color='red'><b>Antagonist</b></font></a></font>";
|
||||
@@ -266,23 +266,23 @@
|
||||
else if(isobserver(M))
|
||||
M_job = "Ghost"
|
||||
|
||||
M_job = dd_replacetext(M_job, "'", "")
|
||||
M_job = dd_replacetext(M_job, "\"", "")
|
||||
M_job = dd_replacetext(M_job, "\\", "")
|
||||
M_job = replacetext(M_job, "'", "")
|
||||
M_job = replacetext(M_job, "\"", "")
|
||||
M_job = replacetext(M_job, "\\", "")
|
||||
|
||||
var/M_name = M.name
|
||||
M_name = dd_replacetext(M_name, "'", "")
|
||||
M_name = dd_replacetext(M_name, "\"", "")
|
||||
M_name = dd_replacetext(M_name, "\\", "")
|
||||
M_name = replacetext(M_name, "'", "")
|
||||
M_name = replacetext(M_name, "\"", "")
|
||||
M_name = replacetext(M_name, "\\", "")
|
||||
var/M_rname = M.real_name
|
||||
M_rname = dd_replacetext(M_rname, "'", "")
|
||||
M_rname = dd_replacetext(M_rname, "\"", "")
|
||||
M_rname = dd_replacetext(M_rname, "\\", "")
|
||||
M_rname = replacetext(M_rname, "'", "")
|
||||
M_rname = replacetext(M_rname, "\"", "")
|
||||
M_rname = replacetext(M_rname, "\\", "")
|
||||
|
||||
var/M_key = M.key
|
||||
M_key = dd_replacetext(M_key, "'", "")
|
||||
M_key = dd_replacetext(M_key, "\"", "")
|
||||
M_key = dd_replacetext(M_key, "\\", "")
|
||||
M_key = replacetext(M_key, "'", "")
|
||||
M_key = replacetext(M_key, "\"", "")
|
||||
M_key = replacetext(M_key, "\\", "")
|
||||
|
||||
//output for each mob
|
||||
dat += {"
|
||||
|
||||
2446
code/modules/admin/topic.dm
Normal file
2446
code/modules/admin/topic.dm
Normal file
File diff suppressed because it is too large
Load Diff
@@ -26,11 +26,11 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an", "monkey", "ali
|
||||
var/original_msg = msg
|
||||
|
||||
//The symbol <20> (fancy multiplication sign) will be used to mark where to put replacements, so the original message must not contain it.
|
||||
msg = dd_replacetext(msg, "<22>", "")
|
||||
msg = dd_replacetext(msg, "HOLDERREF", "HOLDER-REF") //HOLDERREF is a key word which gets replaced with the admin's holder ref later on, so it mustn't be in the original message
|
||||
msg = dd_replacetext(msg, "ADMINREF", "ADMIN-REF") //ADMINREF is a key word which gets replaced with the admin's client's ref. So it mustn't be in the original message.
|
||||
msg = replacetext(msg, "<22>", "")
|
||||
msg = replacetext(msg, "HOLDERREF", "HOLDER-REF") //HOLDERREF is a key word which gets replaced with the admin's holder ref later on, so it mustn't be in the original message
|
||||
msg = replacetext(msg, "ADMINREF", "ADMIN-REF") //ADMINREF is a key word which gets replaced with the admin's client's ref. So it mustn't be in the original message.
|
||||
|
||||
var/list/msglist = dd_text2list(msg, " ")
|
||||
var/list/msglist = text2list(msg, " ")
|
||||
|
||||
var/list/mob/mobs = list()
|
||||
|
||||
@@ -51,21 +51,21 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an", "monkey", "ali
|
||||
for(var/i = 1; i <= msglist.len; i++)
|
||||
var/word = msglist[i]
|
||||
var/original_word = word
|
||||
word = dd_replacetext(word, ".", "")
|
||||
word = dd_replacetext(word, ",", "")
|
||||
word = dd_replacetext(word, "!", "")
|
||||
word = dd_replacetext(word, "?", "") //Strips some common punctuation characters so the actual word can be better compared.
|
||||
word = dd_replacetext(word, ";", "")
|
||||
word = dd_replacetext(word, ":", "")
|
||||
word = dd_replacetext(word, "(", "")
|
||||
word = dd_replacetext(word, ")", "")
|
||||
word = replacetext(word, ".", "")
|
||||
word = replacetext(word, ",", "")
|
||||
word = replacetext(word, "!", "")
|
||||
word = replacetext(word, "?", "") //Strips some common punctuation characters so the actual word can be better compared.
|
||||
word = replacetext(word, ";", "")
|
||||
word = replacetext(word, ":", "")
|
||||
word = replacetext(word, "(", "")
|
||||
word = replacetext(word, ")", "")
|
||||
if(lowertext(word) in adminhelp_ignored_words)
|
||||
continue
|
||||
if(lowertext(word) == "ai")
|
||||
ai_found = 1
|
||||
continue
|
||||
for(var/mob/M in mobs)
|
||||
var/list/namelist = dd_text2list("[M.name] [M.real_name] [(M.mind)?"[M.mind.name]":""] [M.ckey] [M.key]", " ")
|
||||
var/list/namelist = text2list("[M.name] [M.real_name] [(M.mind)?"[M.mind.name]":""] [M.ckey] [M.key]", " ")
|
||||
var/word_is_match = 0 //Used to break from this mob for loop if a match is found
|
||||
for(var/namepart in namelist)
|
||||
if( lowertext(word) == lowertext(namepart) )
|
||||
@@ -88,43 +88,38 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an", "monkey", "ali
|
||||
j++
|
||||
|
||||
msg = dd_list2text(msglist, " ")
|
||||
var/admin_number = 0
|
||||
var/admin_number_afk = 0
|
||||
|
||||
if(mob)
|
||||
var/ref_mob = "\ref[src.mob]"
|
||||
for (var/client/X)
|
||||
if (X.holder)
|
||||
admin_number++
|
||||
if( X.inactivity > AFK_THRESHOLD ) //When I made this, the AFK_THRESHOLD was 3000ds = 300s = 5m, see setup.dm for the new one.
|
||||
admin_number_afk++
|
||||
if(X.holder.sound_adminhelp)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
var/check_laws_text = ""
|
||||
if(ai_found)
|
||||
check_laws_text = (" (<A HREF='?src=\ref[X.holder];adminchecklaws=[ref_mob]'>CL</A>)")
|
||||
for(var/client/X in admins)
|
||||
if( X.inactivity > AFK_THRESHOLD ) //When I made this, the AFK_THRESHOLD was 3000ds = 300s = 5m, see setup.dm for the new one.
|
||||
admin_number_afk++
|
||||
if(X.holder.sound_adminhelp)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
var/check_laws_text = ""
|
||||
if(ai_found)
|
||||
check_laws_text = (" (<A HREF='?src=\ref[X.holder];adminchecklaws=[ref_mob]'>CL</A>)")
|
||||
|
||||
var/msg_to_send = "\blue <b><font color=red>HELP: </font>[key_name(src, X)] (<A HREF='?src=\ref[X.holder];adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?src=\ref[X.holder];adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?src=\ref[X.holder];adminplayervars=[ref_mob]'>VV</A>) (<A HREF='?src=\ref[X.holder];adminplayersubtlemessage=[ref_mob]'>SM</A>) (<A HREF='?src=\ref[X.holder];adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?src=\ref[X.holder];secretsadmin=check_antagonist'>CA</A>) [check_laws_text]:</b> [msg]"
|
||||
msg_to_send = dd_replacetext(msg_to_send, "HOLDERREF", "\ref[X.holder]")
|
||||
msg_to_send = dd_replacetext(msg_to_send, "ADMINREF", "\ref[X]")
|
||||
X << msg_to_send
|
||||
var/msg_to_send = "\blue <b><font color=red>HELP: </font>[key_name(src, X)] (<A HREF='?src=\ref[X.holder];adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?src=\ref[X.holder];adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?src=\ref[X.holder];adminplayervars=[ref_mob]'>VV</A>) (<A HREF='?src=\ref[X.holder];subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?src=\ref[X.holder];adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?src=\ref[X.holder];secretsadmin=check_antagonist'>CA</A>) [check_laws_text]:</b> [msg]"
|
||||
msg_to_send = replacetext(msg_to_send, "HOLDERREF", "\ref[X.holder]")
|
||||
msg_to_send = replacetext(msg_to_send, "ADMINREF", "\ref[X]")
|
||||
X << msg_to_send
|
||||
else
|
||||
var/ref_client = "\ref[src]"
|
||||
for (var/client/X)
|
||||
if (X.holder)
|
||||
admin_number++
|
||||
if( X.inactivity > AFK_THRESHOLD ) //When I made this, the AFK_THRESHOLD was 3000ds = 300s = 5m, see setup.dm for the new one.
|
||||
admin_number_afk++
|
||||
if(X.holder.sound_adminhelp)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
var/msg_to_send = "\blue <b><font color=red>HELP: </font>[key_name(src, X)] (<A HREF='?src=\ref[X.holder];adminplayervars=[ref_client]'>VV</A>) (<A HREF='?src=\ref[X.holder];secretsadmin=check_antagonist'>CA</A>):</b> [msg]"
|
||||
msg_to_send = dd_replacetext(msg_to_send, "HOLDERREF", "\ref[X.holder]")
|
||||
msg_to_send = dd_replacetext(msg_to_send, "ADMINREF", "\ref[X]")
|
||||
X << msg_to_send
|
||||
|
||||
for(var/client/X in admins)
|
||||
if( X.inactivity > AFK_THRESHOLD ) //When I made this, the AFK_THRESHOLD was 3000ds = 300s = 5m, see setup.dm for the new one.
|
||||
admin_number_afk++
|
||||
if(X.holder.sound_adminhelp)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
var/msg_to_send = "\blue <b><font color=red>HELP: </font>[key_name(src, X)] (<A HREF='?src=\ref[X.holder];adminplayervars=[ref_client]'>VV</A>) (<A HREF='?src=\ref[X.holder];secretsadmin=check_antagonist'>CA</A>):</b> [msg]"
|
||||
msg_to_send = replacetext(msg_to_send, "HOLDERREF", "\ref[X.holder]")
|
||||
msg_to_send = replacetext(msg_to_send, "ADMINREF", "\ref[X]")
|
||||
X << msg_to_send
|
||||
var/admin_number_present = admins.len - admin_number_afk
|
||||
src << "<font color='blue'>PM to-<b>Admins</b>: [original_msg]</font>"
|
||||
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number] non-AFK admins.")
|
||||
if((admin_number - admin_number_afk) <= 0)
|
||||
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.")
|
||||
if(admin_number_present <= 0)
|
||||
if(!admin_number_afk)
|
||||
send2irc(ckey, "[original_msg] - No admins online")
|
||||
else
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
alert("Admin jumping disabled")
|
||||
return
|
||||
|
||||
/client/proc/jumptomob(var/mob/M in sortmobs())
|
||||
/client/proc/jumptomob(var/mob/M in mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Jump to Mob"
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
src << "<font color='red'>Error: Admin-PM: You are unable to use admin PM-s (muted).</font>"
|
||||
return
|
||||
|
||||
if( !C || !istype(C,/client) )
|
||||
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
|
||||
else adminhelp(msg) //admin we are replying to left. adminhelp instead
|
||||
if(!istype(C,/client))
|
||||
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
|
||||
else adminhelp(msg) //admin we are replying to left. adminhelp instead
|
||||
return
|
||||
|
||||
//get message text, limit it's length.and clean/escape html
|
||||
@@ -58,8 +58,8 @@
|
||||
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
|
||||
return
|
||||
|
||||
//clean the message if it's not sent by a GA or GM
|
||||
if( !holder || !(holder.rank in list("Game Admin", "Game Master")) )
|
||||
//clean the message if it's not sent by a high-rank admin
|
||||
if(!check_rights(R_SERVER|R_DEBUG,0))
|
||||
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
|
||||
if(!msg) return
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]")
|
||||
|
||||
//we don't use message_admins here because the sender/receiver might get it too
|
||||
for(var/client/X) //there are fewer clients than mobs
|
||||
if(X.holder && X.key!=key && X.key!=C.key) //check client/X is an admin and isn't the sender or recipient
|
||||
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 [msg]</font>" //inform X
|
||||
|
||||
|
||||
@@ -2,31 +2,20 @@
|
||||
set category = "Special Verbs"
|
||||
set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite
|
||||
set hidden = 1
|
||||
|
||||
if (!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
if (src.muted & MUTE_ADMINHELP)
|
||||
src << "You cannot send ASAY messages (muted)."
|
||||
return
|
||||
|
||||
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
|
||||
return
|
||||
if(!check_rights(0)) return
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
if(!msg) return
|
||||
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
for (var/client/C in admin_list)
|
||||
if (src.holder.rank == "Admin Observer")
|
||||
C << "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, C)]:</EM> <span class='message'>[msg]</span></span>"
|
||||
else if(C.holder && C.holder.level != 0)
|
||||
if(check_rights(R_ADMIN,0))
|
||||
for(var/client/C in admins)
|
||||
C << "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, C)]</EM> (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
else
|
||||
for(var/client/C in admins)
|
||||
C << "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, C)]:</EM> <span class='message'>[msg]</span></span>"
|
||||
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_mod_say(msg as text)
|
||||
set category = "Special Verbs"
|
||||
|
||||
@@ -1,22 +1,17 @@
|
||||
/client/proc/Debug2()
|
||||
set category = "Debug"
|
||||
set name = "Debug-Game"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(holder.rank == "Game Admin")
|
||||
Debug2 = !Debug2
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
world << "Debugging [Debug2 ? "On" : "Off"]"
|
||||
log_admin("[key_name(src)] toggled debugging to [Debug2]")
|
||||
else if(holder.rank == "Game Master")
|
||||
Debug2 = !Debug2
|
||||
|
||||
world << "Debugging [Debug2 ? "On" : "Off"]"
|
||||
log_admin("[key_name(src)] toggled debugging to [Debug2]")
|
||||
if(Debug2)
|
||||
Debug2 = 0
|
||||
message_admins("[key_name(src)] toggled debugging off.")
|
||||
log_admin("[key_name(src)] toggled debugging off.")
|
||||
else
|
||||
alert("Coders only baby")
|
||||
return
|
||||
Debug2 = 1
|
||||
message_admins("[key_name(src)] toggled debugging on.")
|
||||
log_admin("[key_name(src)] toggled debugging on.")
|
||||
|
||||
feedback_add_details("admin_verb","DG2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -34,9 +29,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
set category = "Debug"
|
||||
set name = "Advanced ProcCall"
|
||||
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
spawn(0)
|
||||
var/target = null
|
||||
@@ -345,6 +338,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
src << "Made [M] a cultist."
|
||||
*/
|
||||
|
||||
//TODO: merge the vievars version into this or something maybe mayhaps
|
||||
/client/proc/cmd_debug_del_all()
|
||||
set category = "Debug"
|
||||
set name = "Del-All"
|
||||
@@ -419,13 +413,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
else
|
||||
var/mob/dead/observer/ghost = new/mob/dead/observer(M,1)
|
||||
ghost.ckey = M.ckey
|
||||
message_admins("\blue [key_name_admin(usr)] assumed direct control of [M].", 1)
|
||||
log_admin("[key_name(usr)] assumed direct control of [M].")
|
||||
var/mob/adminmob = src.mob
|
||||
M.ckey = src.ckey
|
||||
if( isobserver(adminmob) )
|
||||
del(adminmob)
|
||||
feedback_add_details("admin_verb","ADC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] assumed direct control of [M].")
|
||||
message_admins("\blue [key_name_admin(usr)] assumed direct control of [M].", 1)
|
||||
|
||||
|
||||
|
||||
@@ -600,7 +594,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/det(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/det_suit(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/det_suit(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(M), slot_head)
|
||||
|
||||
@@ -937,7 +931,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if("Players")
|
||||
usr << dd_list2text(player_list,",")
|
||||
if("Admins")
|
||||
usr << dd_list2text(admin_list,",")
|
||||
usr << dd_list2text(admins,",")
|
||||
if("Mobs")
|
||||
usr << dd_list2text(mob_list,",")
|
||||
if("Living Mobs")
|
||||
@@ -945,4 +939,4 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if("Dead Mobs")
|
||||
usr << dd_list2text(dead_mob_list,",")
|
||||
if("Clients")
|
||||
usr << dd_list2text(client_list,",")
|
||||
usr << dd_list2text(clients,",")
|
||||
|
||||
@@ -1,53 +1,26 @@
|
||||
/client/proc
|
||||
general_report()
|
||||
set category = "Debug"
|
||||
set name = "Show General Report"
|
||||
/client/proc/air_report()
|
||||
set category = "Debug"
|
||||
set name = "Show Air Report"
|
||||
|
||||
if(!master_controller)
|
||||
usr << alert("Master_controller not found.")
|
||||
/*(!master_controller || !air_master)
|
||||
alert(usr,"Master_controller or air_master not found.","Air Report")
|
||||
return 0
|
||||
|
||||
var/mobs = 0
|
||||
for(var/mob/M in mob_list)
|
||||
mobs++
|
||||
var/active_groups = 0
|
||||
var/inactive_groups = 0
|
||||
var/active_tiles = 0
|
||||
for(var/datum/air_group/group in air_master.air_groups)
|
||||
if(group.group_processing)
|
||||
active_groups++
|
||||
else
|
||||
inactive_groups++
|
||||
active_tiles += group.members.len
|
||||
|
||||
var/output = {"<B>GENERAL SYSTEMS REPORT</B><HR>
|
||||
<B>General Processing Data</B><BR>
|
||||
<B># of Machines:</B> [machines.len]<BR>
|
||||
<B># of Pipe Networks:</B> [pipe_networks.len]<BR>
|
||||
<B># of Processing Items:</B> [processing_objects.len]<BR>
|
||||
<B># of Power Nets:</B> [powernets.len]<BR>
|
||||
<B># of Mobs:</B> [mobs]<BR>
|
||||
"}
|
||||
var/hotspots = 0
|
||||
for(var/obj/effect/hotspot/hotspot in world)
|
||||
hotspots++
|
||||
|
||||
usr << browse(output,"window=generalreport")
|
||||
feedback_add_details("admin_verb","SGR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
//todo:
|
||||
air_report()
|
||||
set category = "Debug"
|
||||
set name = "Show Air Report"
|
||||
|
||||
usr << "\red This proc is unavailable."
|
||||
/*
|
||||
if(!master_controller || !air_master)
|
||||
alert(usr,"Master_controller or air_master not found.","Air Report")
|
||||
return 0
|
||||
|
||||
var/active_groups = 0
|
||||
var/inactive_groups = 0
|
||||
var/active_tiles = 0
|
||||
for(var/datum/air_group/group in air_master.air_groups)
|
||||
if(group.group_processing)
|
||||
active_groups++
|
||||
else
|
||||
inactive_groups++
|
||||
active_tiles += group.members.len
|
||||
|
||||
var/hotspots = 0
|
||||
for(var/obj/effect/hotspot/hotspot in world)
|
||||
hotspots++
|
||||
|
||||
var/output = {"<B>AIR SYSTEMS REPORT</B><HR>
|
||||
var/output = {"<B>AIR SYSTEMS REPORT</B><HR>
|
||||
<B>General Processing Data</B><BR>
|
||||
<B># of Groups:</B> [air_master.air_groups.len]<BR>
|
||||
---- <I>Active:</I> [active_groups]<BR>
|
||||
@@ -65,159 +38,148 @@
|
||||
<B>Tile Update:</B> [air_master.tiles_to_update.len]<BR>
|
||||
"}
|
||||
|
||||
usr << browse(output,"window=airreport")
|
||||
feedback_add_details("admin_verb","SAR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
usr << browse(output,"window=airreport")
|
||||
feedback_add_details("admin_verb","SAR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
/client/proc/air_status(turf/target as turf)
|
||||
set category = "Debug"
|
||||
set name = "Display Air Status"
|
||||
|
||||
//todo:
|
||||
air_status(turf/target as turf)
|
||||
set category = "Debug"
|
||||
set name = "Display Air Status"
|
||||
|
||||
usr << "\red This proc is unavailable."
|
||||
/*
|
||||
if(!isturf(target))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/GM = target.return_air()
|
||||
var/burning = 0
|
||||
if(istype(target, /turf/simulated))
|
||||
var/turf/simulated/T = target
|
||||
if(T.active_hotspot)
|
||||
burning = 1
|
||||
|
||||
usr << "\blue @[target.x],[target.y] ([GM.group_multiplier]): O:[GM.oxygen] T:[GM.toxins] N:[GM.nitrogen] C:[GM.carbon_dioxide] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("\red BURNING"):(null)]"
|
||||
for(var/datum/gas/trace_gas in GM.trace_gases)
|
||||
usr << "[trace_gas.type]: [trace_gas.moles]"
|
||||
feedback_add_details("admin_verb","DAST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
|
||||
fix_next_move()
|
||||
set category = "Debug"
|
||||
set name = "Unfreeze Everyone"
|
||||
var/largest_move_time = 0
|
||||
var/largest_click_time = 0
|
||||
var/mob/largest_move_mob = null
|
||||
var/mob/largest_click_mob = null
|
||||
for(var/mob/M in world)
|
||||
if(!M.client)
|
||||
continue
|
||||
if(M.next_move >= largest_move_time)
|
||||
largest_move_mob = M
|
||||
if(M.next_move > world.time)
|
||||
largest_move_time = M.next_move - world.time
|
||||
else
|
||||
largest_move_time = 1
|
||||
if(M.lastDblClick >= largest_click_time)
|
||||
largest_click_mob = M
|
||||
if(M.lastDblClick > world.time)
|
||||
largest_click_time = M.lastDblClick - world.time
|
||||
else
|
||||
largest_click_time = 0
|
||||
log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] lastDblClick = [M.lastDblClick] world.time = [world.time]")
|
||||
M.next_move = 1
|
||||
M.lastDblClick = 0
|
||||
message_admins("[key_name_admin(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [largest_move_time/10] seconds!", 1)
|
||||
message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [largest_click_time/10] seconds!", 1)
|
||||
message_admins("world.time = [world.time]", 1)
|
||||
feedback_add_details("admin_verb","UFE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
/*(!isturf(target))
|
||||
return
|
||||
|
||||
radio_report()
|
||||
set category = "Debug"
|
||||
set name = "Radio report"
|
||||
var/datum/gas_mixture/GM = target.return_air()
|
||||
var/burning = 0
|
||||
if(istype(target, /turf/simulated))
|
||||
var/turf/simulated/T = target
|
||||
if(T.active_hotspot)
|
||||
burning = 1
|
||||
|
||||
var/filters = list(
|
||||
"1" = "RADIO_TO_AIRALARM",
|
||||
"2" = "RADIO_FROM_AIRALARM",
|
||||
"3" = "RADIO_CHAT",
|
||||
"4" = "RADIO_ATMOSIA",
|
||||
"5" = "RADIO_NAVBEACONS",
|
||||
"6" = "RADIO_AIRLOCK",
|
||||
"7" = "RADIO_SECBOT",
|
||||
"8" = "RADIO_MULEBOT",
|
||||
"_default" = "NO_FILTER"
|
||||
)
|
||||
var/output = "<b>Radio Report</b><hr>"
|
||||
for (var/fq in radio_controller.frequencies)
|
||||
output += "<b>Freq: [fq]</b><br>"
|
||||
var/list/datum/radio_frequency/fqs = radio_controller.frequencies[fq]
|
||||
if (!fqs)
|
||||
output += " <b>ERROR</b><br>"
|
||||
usr << "\blue @[target.x],[target.y] ([GM.group_multiplier]): O:[GM.oxygen] T:[GM.toxins] N:[GM.nitrogen] C:[GM.carbon_dioxide] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("\red BURNING"):(null)]"
|
||||
for(var/datum/gas/trace_gas in GM.trace_gases)
|
||||
usr << "[trace_gas.type]: [trace_gas.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()
|
||||
set category = "Debug"
|
||||
set name = "Unfreeze Everyone"
|
||||
var/largest_move_time = 0
|
||||
var/largest_click_time = 0
|
||||
var/mob/largest_move_mob = null
|
||||
var/mob/largest_click_mob = null
|
||||
for(var/mob/M in world)
|
||||
if(!M.client)
|
||||
continue
|
||||
if(M.next_move >= largest_move_time)
|
||||
largest_move_mob = M
|
||||
if(M.next_move > world.time)
|
||||
largest_move_time = M.next_move - world.time
|
||||
else
|
||||
largest_move_time = 1
|
||||
if(M.lastDblClick >= largest_click_time)
|
||||
largest_click_mob = M
|
||||
if(M.lastDblClick > world.time)
|
||||
largest_click_time = M.lastDblClick - world.time
|
||||
else
|
||||
largest_click_time = 0
|
||||
log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] lastDblClick = [M.lastDblClick] world.time = [world.time]")
|
||||
M.next_move = 1
|
||||
M.lastDblClick = 0
|
||||
message_admins("[key_name_admin(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [largest_move_time/10] seconds!", 1)
|
||||
message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [largest_click_time/10] seconds!", 1)
|
||||
message_admins("world.time = [world.time]", 1)
|
||||
feedback_add_details("admin_verb","UFE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/radio_report()
|
||||
set category = "Debug"
|
||||
set name = "Radio report"
|
||||
|
||||
var/filters = list(
|
||||
"1" = "RADIO_TO_AIRALARM",
|
||||
"2" = "RADIO_FROM_AIRALARM",
|
||||
"3" = "RADIO_CHAT",
|
||||
"4" = "RADIO_ATMOSIA",
|
||||
"5" = "RADIO_NAVBEACONS",
|
||||
"6" = "RADIO_AIRLOCK",
|
||||
"7" = "RADIO_SECBOT",
|
||||
"8" = "RADIO_MULEBOT",
|
||||
"_default" = "NO_FILTER"
|
||||
)
|
||||
var/output = "<b>Radio Report</b><hr>"
|
||||
for (var/fq in radio_controller.frequencies)
|
||||
output += "<b>Freq: [fq]</b><br>"
|
||||
var/list/datum/radio_frequency/fqs = radio_controller.frequencies[fq]
|
||||
if (!fqs)
|
||||
output += " <b>ERROR</b><br>"
|
||||
continue
|
||||
for (var/filter in fqs.devices)
|
||||
var/list/f = fqs.devices[filter]
|
||||
if (!f)
|
||||
output += " [filters[filter]]: ERROR<br>"
|
||||
continue
|
||||
for (var/filter in fqs.devices)
|
||||
var/list/f = fqs.devices[filter]
|
||||
if (!f)
|
||||
output += " [filters[filter]]: ERROR<br>"
|
||||
continue
|
||||
output += " [filters[filter]]: [f.len]<br>"
|
||||
for (var/device in f)
|
||||
if (isobj(device))
|
||||
output += " [device] ([device:x],[device:y],[device:z] in area [get_area(device:loc)])<br>"
|
||||
else
|
||||
output += " [device]<br>"
|
||||
output += " [filters[filter]]: [f.len]<br>"
|
||||
for (var/device in f)
|
||||
if (isobj(device))
|
||||
output += " [device] ([device:x],[device:y],[device:z] in area [get_area(device:loc)])<br>"
|
||||
else
|
||||
output += " [device]<br>"
|
||||
|
||||
usr << browse(output,"window=radioreport")
|
||||
feedback_add_details("admin_verb","RR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
usr << browse(output,"window=radioreport")
|
||||
feedback_add_details("admin_verb","RR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
reload_admins()
|
||||
set name = "Reload Admins"
|
||||
set category = "Debug"
|
||||
/client/proc/reload_admins()
|
||||
set name = "Reload Admins"
|
||||
set category = "Debug"
|
||||
|
||||
if(!(usr.client.holder && usr.client.holder.level >= 6)) // protect and prevent
|
||||
usr << "\red Not a good cop"
|
||||
return
|
||||
if(!check_rights(R_SERVER)) return
|
||||
|
||||
message_admins("[usr] manually reloaded admins.txt and moderators.txt")
|
||||
usr << "You reload admins.txt and moderators.txt"
|
||||
world.load_admins()
|
||||
world.load_mods()
|
||||
feedback_add_details("admin_verb","RLDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
message_admins("[usr] manually reloaded admins")
|
||||
load_admins()
|
||||
feedback_add_details("admin_verb","RLDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
//todo:
|
||||
jump_to_dead_group()
|
||||
set name = "Jump to dead group"
|
||||
set category = "Debug"
|
||||
|
||||
usr << "\red This proc is unavailable."
|
||||
/client/proc/jump_to_dead_group()
|
||||
set name = "Jump to dead group"
|
||||
set category = "Debug"
|
||||
/*
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
if(!air_master)
|
||||
usr << "Cannot find air_system"
|
||||
return
|
||||
var/datum/air_group/dead_groups = list()
|
||||
for(var/datum/air_group/group in air_master.air_groups)
|
||||
if (!group.group_processing)
|
||||
dead_groups += group
|
||||
var/datum/air_group/dest_group = pick(dead_groups)
|
||||
usr.loc = pick(dest_group.members)
|
||||
feedback_add_details("admin_verb","JDAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
*/
|
||||
|
||||
kill_airgroup()
|
||||
set name = "Kill Local Airgroup"
|
||||
set desc = "Use this to allow manual manupliation of atmospherics."
|
||||
set category = "Debug"
|
||||
usr << "\red This proc is unavailable."
|
||||
/*
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(!air_master)
|
||||
usr << "Cannot find air_system"
|
||||
return
|
||||
var/datum/air_group/dead_groups = list()
|
||||
for(var/datum/air_group/group in air_master.air_groups)
|
||||
if (!group.group_processing)
|
||||
dead_groups += group
|
||||
var/datum/air_group/dest_group = pick(dead_groups)
|
||||
usr.loc = pick(dest_group.members)
|
||||
feedback_add_details("admin_verb","JDAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
*/
|
||||
|
||||
if(!air_master)
|
||||
usr << "Cannot find air_system"
|
||||
return
|
||||
/client/proc/kill_airgroup()
|
||||
set name = "Kill Local Airgroup"
|
||||
set desc = "Use this to allow manual manupliation of atmospherics."
|
||||
set category = "Debug"
|
||||
/*
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(usr)
|
||||
if(istype(T, /turf/simulated))
|
||||
var/datum/air_group/AG = T:parent
|
||||
AG.next_check = 30
|
||||
AG.group_processing = 0
|
||||
else
|
||||
usr << "Local airgroup is unsimulated!"
|
||||
feedback_add_detail("admin_verb","KLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
if(!air_master)
|
||||
usr << "Cannot find air_system"
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(usr)
|
||||
if(istype(T, /turf/simulated))
|
||||
var/datum/air_group/AG = T:parent
|
||||
AG.next_check = 30
|
||||
AG.group_processing = 0
|
||||
else
|
||||
usr << "Local airgroup is unsimulated!"
|
||||
feedback_add_details("admin_verb","KLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
@@ -35,10 +35,6 @@
|
||||
src << "<font color='red'>Only Game Masters may use this command.</font>"
|
||||
return
|
||||
|
||||
var/list/clients = list()
|
||||
for(var/client/C)
|
||||
clients += C
|
||||
|
||||
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( !target || !istype(target,/client) )
|
||||
src << "<font color='red'>Error: giveruntimelog(): Client not found.</font>"
|
||||
|
||||
@@ -127,6 +127,9 @@ var/intercom_range_display_status = 0
|
||||
/client/proc/enable_debug_verbs()
|
||||
set category = "Debug"
|
||||
set name = "Debug verbs"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
src.verbs += /client/proc/do_not_use_these //-errorage
|
||||
src.verbs += /client/proc/camera_view //-errorage
|
||||
src.verbs += /client/proc/sec_camera_report //-errorage
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
var/method = 0 //0 means strict type detection while 1 means this type and all subtypes (IE: /obj/item with this set to 1 will set it to ALL itms)
|
||||
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
if(A && A.type)
|
||||
if(typesof(A.type))
|
||||
@@ -24,11 +24,9 @@
|
||||
|
||||
|
||||
/client/proc/massmodify_variables(var/atom/O, var/var_name = "", var/method = 0)
|
||||
var/list/locked = list("vars", "key", "ckey", "client")
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
var/list/locked = list("vars", "key", "ckey", "client")
|
||||
|
||||
for(var/p in forbidden_varedit_object_types)
|
||||
if( istype(O,p) )
|
||||
@@ -48,17 +46,13 @@
|
||||
else
|
||||
variable = var_name
|
||||
|
||||
if(!variable)
|
||||
return
|
||||
if(!variable) return
|
||||
var/default
|
||||
var/var_value = O.vars[variable]
|
||||
var/dir
|
||||
|
||||
if (locked.Find(variable) && !(src.holder.rank in list("Game Master", "Game Admin")))
|
||||
return
|
||||
|
||||
if (variable == "holder" && holder.rank != "Game Master") //Hotfix, a bit ugly but that exploit has been there for ages and now somebody just had to go and tell everyone of it bluh bluh - U
|
||||
return
|
||||
if(variable == "holder" || (variable in locked))
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
if(isnull(var_value))
|
||||
usr << "Unable to determine variable type."
|
||||
|
||||
@@ -126,6 +126,8 @@ var/list/forbidden_varedit_object_types = list(
|
||||
L += var_value
|
||||
|
||||
/client/proc/mod_list(var/list/L)
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
if(!istype(L,/list)) src << "Not a List."
|
||||
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state")
|
||||
@@ -144,8 +146,8 @@ var/list/forbidden_varedit_object_types = list(
|
||||
|
||||
var/dir
|
||||
|
||||
if (locked.Find(variable) && !(src.holder.rank in list("Game Master", "Game Admin")))
|
||||
return
|
||||
if(variable in locked)
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
if(isnull(variable))
|
||||
usr << "Unable to determine variable type."
|
||||
@@ -264,12 +266,9 @@ var/list/forbidden_varedit_object_types = list(
|
||||
|
||||
|
||||
/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "icon", "icon_state", "mutantrace")
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(!admin_rank_check(src.holder.level, 3)) return
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "icon", "icon_state", "mutantrace")
|
||||
|
||||
for(var/p in forbidden_varedit_object_types)
|
||||
if( istype(O,p) )
|
||||
@@ -285,13 +284,8 @@ var/list/forbidden_varedit_object_types = list(
|
||||
src << "A variable with this name ([param_var_name]) doesn't exist in this atom ([O])"
|
||||
return
|
||||
|
||||
if (param_var_name == "holder" && holder.rank != "Game Master")
|
||||
src << "No. Stop being stupid."
|
||||
return
|
||||
|
||||
if (locked.Find(param_var_name) && !(src.holder.rank in list("Game Master", "Game Admin")))
|
||||
src << "Editing this variable requires you to be a game master or game admin."
|
||||
return
|
||||
if(param_var_name == "holder" || (param_var_name in locked))
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
variable = param_var_name
|
||||
|
||||
@@ -345,15 +339,11 @@ var/list/forbidden_varedit_object_types = list(
|
||||
names = sortList(names)
|
||||
|
||||
variable = input("Which var?","Var") as null|anything in names
|
||||
if(!variable)
|
||||
return
|
||||
if(!variable) return
|
||||
var_value = O.vars[variable]
|
||||
|
||||
if (locked.Find(variable) && !(src.holder.rank in list("Game Master", "Game Admin")))
|
||||
return
|
||||
|
||||
if (variable == "holder" && holder.rank != "Game Master") //Hotfix, a bit ugly but that exploit has been there for ages and now somebody just had to go and tell everyone of it bluh bluh - U
|
||||
return
|
||||
if(variable == "holder" || (variable in locked))
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
if(!autodetect_class)
|
||||
|
||||
|
||||
@@ -1,47 +1,28 @@
|
||||
/client/proc/play_sound(S as sound)
|
||||
set category = "Fun"
|
||||
set name = "Play Global Sound"
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(!check_rights(R_SOUNDS)) return
|
||||
|
||||
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777)
|
||||
uploaded_sound.priority = 250
|
||||
|
||||
if(src.holder.rank == "Game Master" || src.holder.rank == "Game Admin" || src.holder.rank == "Badmin")
|
||||
log_admin("[key_name(src)] played sound [S]")
|
||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client.midis)
|
||||
M << uploaded_sound
|
||||
else
|
||||
if(usr.client.canplaysound)
|
||||
usr.client.canplaysound = 0
|
||||
log_admin("[key_name(src)] played sound [S]")
|
||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client.midis)
|
||||
M << uploaded_sound
|
||||
else
|
||||
usr << "You already used up your jukebox monies this round!"
|
||||
del(uploaded_sound)
|
||||
log_admin("[key_name(src)] played sound [S]")
|
||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client.midis)
|
||||
M << uploaded_sound
|
||||
|
||||
feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/play_local_sound(S as sound)
|
||||
set category = "Fun"
|
||||
set name = "Play Local Sound"
|
||||
if(!check_rights(R_SOUNDS)) return
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
if(src.holder.rank == "Game Master" || src.holder.rank == "Game Admin")
|
||||
log_admin("[key_name(src)] played a local sound [S]")
|
||||
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
|
||||
playsound(get_turf_loc(src.mob), S, 50, 0, 0)
|
||||
return
|
||||
log_admin("[key_name(src)] played a local sound [S]")
|
||||
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
|
||||
playsound(get_turf_loc(src.mob), S, 50, 0, 0)
|
||||
feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
var/icon/cross = icon('icons/obj/storage.dmi',"bible")
|
||||
|
||||
for (var/client/C in admin_list)
|
||||
if (C.seeprayers)
|
||||
C << "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, C)] (<A HREF='?src=\ref[C.holder];adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?src=\ref[C.holder];adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?src=\ref[C.holder];adminplayervars=\ref[src]'>VV</A>) (<A HREF='?src=\ref[C.holder];adminplayersubtlemessage=\ref[src]'>SM</A>) (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?src=\ref[C.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[C.holder];adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
|
||||
for(var/client/C in admins)
|
||||
if(C.seeprayers)
|
||||
C << "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, C)] (<A HREF='?src=\ref[C.holder];adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?src=\ref[C.holder];adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?src=\ref[C.holder];adminplayervars=\ref[src]'>VV</A>) (<A HREF='?src=\ref[C.holder];subtlemessage=\ref[src]'>SM</A>) (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?src=\ref[C.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[C.holder];adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
|
||||
|
||||
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!
|
||||
@@ -27,20 +27,12 @@
|
||||
|
||||
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender)
|
||||
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
for(var/client/C in admins)
|
||||
C << "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, C)] (<A HREF='?src=\ref[C.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[C.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[C.holder];subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[C.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[C.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?src=\ref[C.holder];CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
|
||||
// log_admin("[key_name(Sender)] sent a message to Centcomm! The message was [msg]") // Handled somewhere else
|
||||
|
||||
for (var/client/C in admin_list)
|
||||
C << "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, C)] (<A HREF='?src=\ref[C.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[C.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[C.holder];adminplayersubtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[C.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[C.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?src=\ref[C.holder];CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
//
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
for(var/client/C in admins)
|
||||
C << "\blue <b><font color=crimson>SYNDICATE:</font>[key_name(Sender, C)] (<A HREF='?src=\ref[C.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[C.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[C.holder];subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[C.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[C.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?src=\ref[C.holder];SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
|
||||
// log_admin("[key_name(Sender)] sent a message to the Syndicate! The message was [msg]") // Handled somewhere else
|
||||
|
||||
for (var/client/C in admin_list)
|
||||
C << "\blue <b><font color=crimson>SYNDICATE:</font>[key_name(Sender, C)] (<A HREF='?src=\ref[C.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[C.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[C.holder];adminplayersubtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[C.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[C.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?src=\ref[C.holder];SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
//
|
||||
|
||||
@@ -193,69 +193,37 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
IonStorm(0)
|
||||
feedback_add_details("admin_verb","ION") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/*
|
||||
Stealth spawns xenos
|
||||
Changed to accomodate specific spawning. It was annoying before. /N
|
||||
*/
|
||||
/client/proc/spawn_xeno()
|
||||
set category = "Fun"
|
||||
set name = "Spawn Xeno"
|
||||
set desc = "Spawns a xenomorph for all those boring rounds, without having you to do so manually."
|
||||
set popup_menu = 0
|
||||
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes") return
|
||||
|
||||
if(create_xeno())
|
||||
feedback_add_details("admin_verb","X") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] spawned a xeno.")
|
||||
message_admins("\blue [key_name_admin(usr)] spawned a xeno.", 1)
|
||||
return
|
||||
|
||||
|
||||
|
||||
//I use this proc for respawn character too. /N
|
||||
/proc/create_xeno(mob/dead/observer/G)
|
||||
var/alien_caste = alert(src, "Please choose which caste to spawn.",,"Hunter","Sentinel","Drone")
|
||||
|
||||
var/obj/effect/landmark/spawn_here = xeno_spawn.len ? pick(xeno_spawn) : pick(latejoin)
|
||||
|
||||
var/mob/living/carbon/alien/humanoid/new_xeno
|
||||
switch(alien_caste)
|
||||
if("Hunter")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(spawn_here)
|
||||
if("Sentinel")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(spawn_here)
|
||||
if("Drone")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/drone(spawn_here)
|
||||
else
|
||||
return 0
|
||||
|
||||
var/selected_key
|
||||
if(G && G.key)
|
||||
selected_key = G.key
|
||||
else
|
||||
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
|
||||
for(G in player_list)
|
||||
if(G.client.be_alien)
|
||||
if(((G.client.inactivity/10)/60) <= 5)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
/proc/create_xeno(ckey)
|
||||
if(!ckey)
|
||||
var/list/candidates = list()
|
||||
for(var/mob/M in player_list)
|
||||
if(M.stat != DEAD) continue //we are not dead!
|
||||
if(!M.client.be_alien) continue //we don't want to be an alium
|
||||
if(M.client.is_afk()) continue //we are afk
|
||||
if(M.mind && M.mind.current && M.mind.current.stat != DEAD) continue //we have a live body we are tied to
|
||||
candidates += M.ckey
|
||||
if(candidates.len)
|
||||
selected_key = input("Pick the client you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
|
||||
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>"
|
||||
if(!istext(ckey)) return 0
|
||||
|
||||
if(selected_key)
|
||||
new_xeno.key = selected_key
|
||||
message_admins("\blue [key_name_admin(usr)] has spawned [selected_key] as a filthy xeno.", 1)
|
||||
return 1
|
||||
else
|
||||
//we couldn't find a candidate
|
||||
usr << "<font color='red'>Error: create_xeno(): no suitable players.</font>"
|
||||
del(new_xeno)
|
||||
return 0
|
||||
var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Hunter","Sentinel","Drone","Larva")
|
||||
var/obj/effect/landmark/spawn_here = xeno_spawn.len ? pick(xeno_spawn) : pick(latejoin)
|
||||
var/mob/living/carbon/alien/new_xeno
|
||||
switch(alien_caste)
|
||||
if("Queen") new_xeno = new /mob/living/carbon/alien/humanoid/queen(spawn_here)
|
||||
if("Hunter") new_xeno = new /mob/living/carbon/alien/humanoid/hunter(spawn_here)
|
||||
if("Sentinel") new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(spawn_here)
|
||||
if("Drone") new_xeno = new /mob/living/carbon/alien/humanoid/drone(spawn_here)
|
||||
if("Larva") new_xeno = new /mob/living/carbon/alien/larva(spawn_here)
|
||||
else return 0
|
||||
|
||||
new_xeno.ckey = ckey
|
||||
message_admins("\blue [key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].", 1)
|
||||
return 1
|
||||
|
||||
/*
|
||||
If a guy was gibbed and you want to revive him, this is a good way to do so.
|
||||
@@ -298,7 +266,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if("Drone") new_xeno = new /mob/living/carbon/alien/humanoid/drone(T)
|
||||
if("Queen") new_xeno = new /mob/living/carbon/alien/humanoid/queen(T)
|
||||
else//If we don't know what special role they have, for whatever reason, or they're a larva.
|
||||
create_xeno(G_found)
|
||||
create_xeno(G_found.ckey)
|
||||
return
|
||||
|
||||
//Now to give them their mind back.
|
||||
@@ -673,7 +641,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
M << "\red To try to resolve this matter head to http://ss13.donglabs.com/forum/"
|
||||
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=[mins]&server=[dd_replacetext(config.server_name, "#", "")]")
|
||||
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=[mins]&server=[replacetext(config.server_name, "#", "")]")
|
||||
del(M.client)
|
||||
del(M)
|
||||
else
|
||||
@@ -688,7 +656,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
M << "\red To try to resolve this matter head to http://ss13.donglabs.com/forum/"
|
||||
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
|
||||
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
|
||||
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=perma&server=[dd_replacetext(config.server_name, "#", "")]")
|
||||
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=perma&server=[replacetext(config.server_name, "#", "")]")
|
||||
del(M.client)
|
||||
del(M)
|
||||
*/
|
||||
@@ -784,20 +752,14 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
|
||||
/client/proc/admin_cancel_shuttle()
|
||||
|
||||
set category = "Admin"
|
||||
set name = "Cancel Shuttle"
|
||||
if(!check_rights(0)) return
|
||||
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
|
||||
|
||||
if ((!( ticker ) || emergency_shuttle.location || emergency_shuttle.direction == 0))
|
||||
if(!ticker || emergency_shuttle.location || emergency_shuttle.direction == 0)
|
||||
return
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes") return
|
||||
|
||||
emergency_shuttle.recall()
|
||||
feedback_add_details("admin_verb","CCSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
|
||||
@@ -862,38 +824,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
ticker.random_players = 1
|
||||
feedback_add_details("admin_verb","MER") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggle_gravity_on()
|
||||
set category = "Debug"
|
||||
set name = "Toggle station gravity on"
|
||||
set desc = "Toggles all gravity to active on the station."
|
||||
|
||||
if (!(ticker && ticker.mode))
|
||||
usr << "Please wait until the game starts! Not sure how it will work otherwise."
|
||||
return
|
||||
|
||||
|
||||
for(var/area/A in world)
|
||||
A.gravitychange(1,A)
|
||||
|
||||
command_alert("CentComm is now beaming gravitons to your station. We appoligize for any inconvience.")
|
||||
feedback_add_details("admin_verb","TSGON") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggle_gravity_off()
|
||||
set category = "Debug"
|
||||
set name = "Toggle station gravity off"
|
||||
set desc = "Toggles all gravity to inactive on the station."
|
||||
|
||||
if (!(ticker && ticker.mode))
|
||||
usr << "Please wait until the game starts! Not sure how it will work otherwise."
|
||||
return
|
||||
|
||||
|
||||
for(var/area/A in world)
|
||||
A.gravitychange(0,A)
|
||||
|
||||
command_alert("For budget reasons, Centcomm is no longer beaming gravitons to your station. We appoligize for any inconvience.")
|
||||
feedback_add_details("admin_verb","TSGOFF") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/toggle_random_events()
|
||||
set category = "Server"
|
||||
|
||||
@@ -3,22 +3,16 @@
|
||||
var/const/commandos_possible = 6 //if more Commandos are needed in the future
|
||||
var/global/sent_strike_team = 0
|
||||
/client/proc/strike_team()
|
||||
set category = "Fun"
|
||||
set name = "Spawn Death Squad"
|
||||
set desc = "Spawns a squad of commandos in CentCom if you want to run an admin event."
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(!ticker)
|
||||
alert("The game hasn't started yet!")
|
||||
usr << "<font color='red'>The game hasn't started yet!</font>"
|
||||
return
|
||||
if(world.time < 6000)
|
||||
alert("Not so fast, buddy. Wait a few minutes until the game gets going. There are [(6000-world.time)/10] seconds remaining.")
|
||||
usr << "<font color='red'>There are [(6000-world.time)/10] seconds remaining before it may be called.</font>"
|
||||
return
|
||||
if(sent_strike_team == 1)
|
||||
alert("CentCom is already sending a team, Mr. Dumbass.")
|
||||
usr << "<font color='red'>CentCom is already sending a team.</font>"
|
||||
return
|
||||
if(alert("Do you want to send in the CentCom death squad? Once enabled, this is irreversible.",,"Yes","No")=="No")
|
||||
if(alert("Do you want to send in the CentCom death squad? Once enabled, this is irreversible.",,"Yes","No")!="Yes")
|
||||
return
|
||||
alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.")
|
||||
|
||||
@@ -30,7 +24,7 @@ var/global/sent_strike_team = 0
|
||||
return
|
||||
|
||||
if(sent_strike_team)
|
||||
src << "Looks like someone beat you to it."
|
||||
usr << "Looks like someone beat you to it."
|
||||
return
|
||||
|
||||
sent_strike_team = 1
|
||||
@@ -100,7 +94,7 @@ var/global/sent_strike_team = 0
|
||||
|
||||
message_admins("\blue [key_name_admin(usr)] has spawned a CentCom strike squad.", 1)
|
||||
log_admin("[key_name(usr)] used Spawn Death Squad.")
|
||||
feedback_add_details("admin_verb","DTHS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return 1
|
||||
|
||||
/client/proc/create_death_commando(obj/spawn_location, leader_selected = 0)
|
||||
var/mob/living/carbon/human/new_commando = new(spawn_location.loc)
|
||||
@@ -181,5 +175,4 @@ var/global/sent_strike_team = 0
|
||||
W.registered_name = real_name
|
||||
equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
resistances += "alien_embryo"
|
||||
return 1
|
||||
@@ -178,5 +178,4 @@ var/global/sent_syndicate_strike_team = 0
|
||||
W.registered_name = real_name
|
||||
equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
resistances += "alien_embryo"
|
||||
return 1
|
||||
@@ -5,28 +5,20 @@
|
||||
set name = "Set Ticklag"
|
||||
set desc = "Sets a new tick lag. Recommend you don't mess with this too much! Stable, time-tested ticklag value is 0.9"
|
||||
|
||||
if(src.holder)
|
||||
if(!src.mob) return
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
if(src.holder.rank in list("Game Admin", "Game Master"))
|
||||
var/newtick = input("Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9","Lag of Tick", world.tick_lag) as num|null
|
||||
//I've used ticks of 2 before to help with serious singulo lags
|
||||
if(newtick && newtick <= 2 && newtick > 0)
|
||||
log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
|
||||
message_admins("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
|
||||
world.tick_lag = newtick
|
||||
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
var/newtick = input("Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9","Lag of Tick", world.tick_lag) as num|null
|
||||
//I've used ticks of 2 before to help with serious singulo lags
|
||||
if(newtick && newtick <= 2 && newtick > 0)
|
||||
log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
|
||||
message_admins("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
|
||||
world.tick_lag = newtick
|
||||
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
switch(alert("Enable Tick Compensation?","Tick Comp is currently: [config.Tickcomp]","Yes","No"))
|
||||
if("Yes")
|
||||
config.Tickcomp = 1
|
||||
else
|
||||
config.Tickcomp = 0
|
||||
switch(alert("Enable Tick Compensation?","Tick Comp is currently: [config.Tickcomp]","Yes","No"))
|
||||
if("Yes") config.Tickcomp = 1
|
||||
else config.Tickcomp = 0
|
||||
else
|
||||
src << "\red Error: ticklag(): Invalid world.ticklag value. No changes made."
|
||||
|
||||
return
|
||||
|
||||
src << "\red Error: ticklag(): Invalid world.ticklag value. No changes made."
|
||||
return
|
||||
|
||||
src << "\red Error: ticklag(): You are not authorised to use this. Game Admins and higher only."
|
||||
return
|
||||
|
||||
@@ -6,9 +6,6 @@
|
||||
usr << "This option is currently only usable during pregame. This may change at a later date."
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes") return
|
||||
|
||||
if(job_master && ticker)
|
||||
var/datum/job/job = job_master.GetJob("AI")
|
||||
if(!job)
|
||||
@@ -22,5 +19,4 @@
|
||||
ticker.triai = 1
|
||||
usr << "There will be an AI Triumvirate at round start."
|
||||
message_admins("\blue [key_name_admin(usr)] has toggled on triple AIs at round start.", 1)
|
||||
feedback_add_details("admin_verb","CAIT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
proc/holder_movement() //Called when the holder is moved
|
||||
return
|
||||
|
||||
proc/interact(mob/user as mob) //Called when attack_self is called
|
||||
interact(mob/user as mob) //Called when attack_self is called
|
||||
return
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(!user) return 0
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -75,29 +75,29 @@
|
||||
|
||||
// ---------- Procs below are for tanks that are used exclusively in 1-tank bombs ----------
|
||||
|
||||
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob) //Bomb assembly proc. This turns assembly+tank into a bomb
|
||||
if(istype(W, /obj/item/device/assembly_holder))
|
||||
var/obj/item/device/assembly_holder/S = W
|
||||
if(!S.secured) //Check if the assembly is secured
|
||||
return
|
||||
if(isigniter(S.a_left) == isigniter(S.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
|
||||
return
|
||||
|
||||
var/obj/item/device/onetankbomb/R = new /obj/item/device/onetankbomb(loc)
|
||||
|
||||
user.drop_item() //Remove the assembly from your hands
|
||||
user.remove_from_mob(src) //Remove the tank from your character,in case you were holding it
|
||||
user.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
|
||||
|
||||
R.bombassembly = S //Tell the bomb about its assembly part
|
||||
S.master = R //Tell the assembly about its new owner
|
||||
S.loc = R //Move the assembly out of the fucking way
|
||||
|
||||
R.bombtank = src //Same for tank
|
||||
master = R
|
||||
loc = R
|
||||
R.update_icon()
|
||||
/obj/item/weapon/tank/proc/bomb_assemble(W,user) //Bomb assembly proc. This turns assembly+tank into a bomb
|
||||
var/obj/item/device/assembly_holder/S = W
|
||||
var/mob/M = user
|
||||
if(!S.secured) //Check if the assembly is secured
|
||||
return
|
||||
if(isigniter(S.a_left) == isigniter(S.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
|
||||
return
|
||||
|
||||
var/obj/item/device/onetankbomb/R = new /obj/item/device/onetankbomb(loc)
|
||||
|
||||
M.drop_item() //Remove the assembly from your hands
|
||||
M.remove_from_mob(src) //Remove the tank from your character,in case you were holding it
|
||||
M.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
|
||||
|
||||
R.bombassembly = S //Tell the bomb about its assembly part
|
||||
S.master = R //Tell the assembly about its new owner
|
||||
S.loc = R //Move the assembly out of the fucking way
|
||||
|
||||
R.bombtank = src //Same for tank
|
||||
master = R
|
||||
loc = R
|
||||
R.update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/proc/ignite() //This happens when a bomb is told to explode
|
||||
var/fuel_moles = air_contents.toxins + air_contents.oxygen/6
|
||||
|
||||
@@ -66,11 +66,11 @@
|
||||
update_icon()
|
||||
overlays = null
|
||||
if(a_left)
|
||||
overlays += "[initial(a_left.icon_state)]_left" //the initial() is probably unnecessary, but you just know
|
||||
for(var/O in a_left.attached_overlays) //someone is gonna fuck around with the icon_state in the future
|
||||
overlays += "[a_left.icon_state]_left"
|
||||
for(var/O in a_left.attached_overlays)
|
||||
overlays += "[O]_l"
|
||||
if(a_right)
|
||||
src.overlays += "[initial(a_right.icon_state)]_right"
|
||||
src.overlays += "[a_right.icon_state]_right"
|
||||
for(var/O in a_right.attached_overlays)
|
||||
overlays += "[O]_r"
|
||||
if(master)
|
||||
@@ -102,7 +102,26 @@
|
||||
a_right.HasProximity(AM)
|
||||
if(special_assembly)
|
||||
special_assembly.HasProximity(AM)
|
||||
return
|
||||
|
||||
|
||||
HasEntered(atom/movable/AM as mob|obj)
|
||||
if(a_left)
|
||||
a_left.HasEntered(AM)
|
||||
if(a_right)
|
||||
a_right.HasEntered(AM)
|
||||
if(special_assembly)
|
||||
special_assembly.HasEntered(AM)
|
||||
|
||||
|
||||
on_found(mob/finder as mob)
|
||||
if(a_left)
|
||||
a_left.on_found(finder)
|
||||
if(a_right)
|
||||
a_right.on_found(finder)
|
||||
if(special_assembly)
|
||||
if(istype(special_assembly, /obj/item))
|
||||
var/obj/item/S = special_assembly
|
||||
S.on_found(finder)
|
||||
|
||||
|
||||
Move()
|
||||
|
||||
@@ -7,10 +7,8 @@
|
||||
w_amt = 10
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
wires = WIRE_RECEIVE
|
||||
|
||||
secured = 1
|
||||
|
||||
wires = WIRE_RECEIVE
|
||||
|
||||
activate()
|
||||
if(!..()) return 0//Cooldown check
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
interact(mob/user as mob)//TODO: change this this to the wire control panel
|
||||
if(!secured) return
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>Infrared Laser</B>\n<B>Status</B>: []<BR>\n<B>Visibility</B>: []<BR>\n</TT>", (on ? text("<A href='?src=\ref[];state=0'>On</A>", src) : text("<A href='?src=\ref[];state=1'>Off</A>", src)), (src.visible ? text("<A href='?src=\ref[];visible=0'>Visible</A>", src) : text("<A href='?src=\ref[];visible=1'>Invisible</A>", src)))
|
||||
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
|
||||
115
code/modules/assembly/mousetrap.dm
Normal file
115
code/modules/assembly/mousetrap.dm
Normal file
@@ -0,0 +1,115 @@
|
||||
/obj/item/device/assembly/mousetrap
|
||||
name = "mousetrap"
|
||||
desc = "A handy little spring-loaded trap for catching pesty rodents."
|
||||
icon_state = "mousetrap"
|
||||
m_amt = 100
|
||||
w_amt = 10
|
||||
origin_tech = "combat=1"
|
||||
var/armed = 0
|
||||
|
||||
|
||||
examine()
|
||||
..()
|
||||
if(armed)
|
||||
usr << "It looks like it's armed."
|
||||
|
||||
update_icon()
|
||||
if(armed)
|
||||
icon_state = "mousetraparmed"
|
||||
else
|
||||
icon_state = "mousetrap"
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
|
||||
proc/triggered(mob/target as mob, var/type = "feet")
|
||||
if(!armed)
|
||||
return
|
||||
var/datum/organ/external/affecting = null
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
switch(type)
|
||||
if("feet")
|
||||
if(!H.shoes)
|
||||
affecting = H.get_organ(pick("l_leg", "r_leg"))
|
||||
H.Weaken(3)
|
||||
if("l_hand", "r_hand")
|
||||
if(!H.gloves)
|
||||
affecting = H.get_organ(type)
|
||||
H.Stun(3)
|
||||
if(affecting)
|
||||
if(affecting.take_damage(1, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
else if(ismouse(target))
|
||||
var/mob/living/simple_animal/mouse/M = target
|
||||
visible_message("\red <b>SPLAT!</b>")
|
||||
M.splat()
|
||||
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
armed = 0
|
||||
update_icon()
|
||||
pulse(0)
|
||||
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
if(!armed)
|
||||
user << "<span class='notice'>You arm [src].</span>"
|
||||
else
|
||||
if(((user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50)))
|
||||
var/which_hand = "l_hand"
|
||||
if(!user.hand)
|
||||
which_hand = "r_hand"
|
||||
triggered(user, which_hand)
|
||||
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>"
|
||||
armed = !armed
|
||||
update_icon()
|
||||
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
|
||||
attack_hand(mob/living/user as mob)
|
||||
if(armed)
|
||||
if(((user.getBrainLoss() >= 60 || CLUMSY in user.mutations)) && prob(50))
|
||||
var/which_hand = "l_hand"
|
||||
if(!user.hand)
|
||||
which_hand = "r_hand"
|
||||
triggered(user, which_hand)
|
||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
HasEntered(AM as mob|obj)
|
||||
if(armed)
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == "run")
|
||||
triggered(H)
|
||||
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
|
||||
"<span class='warning'>You accidentally step on [src]</span>")
|
||||
if(ismouse(AM))
|
||||
triggered(AM)
|
||||
..()
|
||||
|
||||
|
||||
on_found(mob/finder as mob)
|
||||
if(armed)
|
||||
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
triggered(finder, finder.hand ? "l_hand" : "r_hand")
|
||||
return 1 //end the search!
|
||||
return 0
|
||||
|
||||
|
||||
hitby(A as mob|obj)
|
||||
if(!armed)
|
||||
return ..()
|
||||
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
|
||||
triggered(null)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/armed
|
||||
icon_state = "mousetraparmed"
|
||||
armed = 1
|
||||
@@ -21,7 +21,7 @@
|
||||
density = 0
|
||||
|
||||
/obj/machinery/artillerycontrol/attack_hand(mob/user as mob)
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = "<B>Bluespace Artillery Control:</B><BR>"
|
||||
dat += "Locked on<BR>"
|
||||
dat += "<B>Charge progress: [reload]/180:</B><BR>"
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
name = "Doctor"
|
||||
corpseradio = /obj/item/device/radio/headset/headset_med
|
||||
corpseuniform = /obj/item/clothing/under/rank/medical
|
||||
corpsesuit = /obj/item/clothing/suit/labcoat
|
||||
corpsesuit = /obj/item/clothing/suit/storage/labcoat
|
||||
corpseback = /obj/item/weapon/storage/backpack/medic
|
||||
corpsepocket1 = /obj/item/device/flashlight/pen
|
||||
corpseshoes = /obj/item/clothing/shoes/black
|
||||
@@ -166,7 +166,7 @@
|
||||
name = "Scientist"
|
||||
corpseradio = /obj/item/device/radio/headset/headset_sci
|
||||
corpseuniform = /obj/item/clothing/under/rank/scientist
|
||||
corpsesuit = /obj/item/clothing/suit/labcoat/science
|
||||
corpsesuit = /obj/item/clothing/suit/storage/labcoat/science
|
||||
corpseback = /obj/item/weapon/storage/backpack
|
||||
corpseshoes = /obj/item/clothing/shoes/white
|
||||
corpseid = 1
|
||||
|
||||
@@ -35,7 +35,7 @@ var/global/announced_gateway_activation = 0
|
||||
/obj/machinery/gateway/centerstation/initialize()
|
||||
update_icon()
|
||||
returndestination = get_step(loc, SOUTH)
|
||||
wait = world.time + 18000 //+ thirty minutes
|
||||
wait = world.time + config.gateway_delay //+ thirty minutes default
|
||||
awaygate = locate(/obj/machinery/gateway/centeraway, world)
|
||||
|
||||
/obj/machinery/gateway/centerstation/update_icon()
|
||||
|
||||
@@ -3,17 +3,10 @@ proc/createRandomZlevel()
|
||||
return
|
||||
|
||||
var/list/potentialRandomZlevels = list()
|
||||
|
||||
var/text = file2text("maps/RandomZLevels/fileList.txt")
|
||||
|
||||
if (!text) // No random Z-levels for you.
|
||||
return
|
||||
|
||||
world << "\red \b Searching for away missions..."
|
||||
|
||||
var/list/CL = dd_text2list(text, "\n")
|
||||
|
||||
for (var/t in CL)
|
||||
var/list/Lines = file2list("maps/RandomZLevels/fileList.txt")
|
||||
if(!Lines.len) return
|
||||
for (var/t in Lines)
|
||||
if (!t)
|
||||
continue
|
||||
|
||||
@@ -58,4 +51,4 @@ proc/createRandomZlevel()
|
||||
|
||||
else
|
||||
world << "\red \b No away missions found."
|
||||
return
|
||||
return
|
||||
@@ -4,7 +4,7 @@
|
||||
////////////////
|
||||
var/datum/admins/holder = null
|
||||
var/buildmode = 0
|
||||
var/seeprayers = 0
|
||||
var/seeprayers = 1
|
||||
|
||||
var/muted = 0
|
||||
var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming.
|
||||
@@ -19,13 +19,14 @@
|
||||
var/move_delay = 1
|
||||
var/moving = null
|
||||
var/adminobs = null
|
||||
var/deadchat = 0
|
||||
var/deadchat = 1
|
||||
var/changes = 0
|
||||
var/area = null
|
||||
var/played = 0
|
||||
var/be_alien = 0 //Check if that guy wants to be an alien
|
||||
var/be_pai = 1 //Consider client when searching for players to recruit as a pAI
|
||||
var/be_syndicate = 1 //Consider client for late-game autotraitor
|
||||
var/be_spaceninja = 0
|
||||
var/activeslot = 1 //Default active slot!
|
||||
var/STFU_ghosts //80+ people rounds are fun to admin when text flies faster than airport security
|
||||
var/STFU_radio //80+ people rounds are fun to admin when text flies faster than airport security
|
||||
@@ -45,3 +46,4 @@
|
||||
var/next_allowed_topic_time = 10
|
||||
// comment out the line below when debugging locally to enable the options & messages menu
|
||||
control_freak = 1
|
||||
|
||||
|
||||
@@ -95,38 +95,34 @@
|
||||
if(byond_version < MIN_CLIENT_VERSION) //Out of date client.
|
||||
return null
|
||||
|
||||
|
||||
if(IsGuestKey(key))
|
||||
alert(src,"Baystation12 doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK")
|
||||
del(src)
|
||||
return
|
||||
|
||||
client_list += src
|
||||
if ( (world.address == address || !address) && !host )
|
||||
host = key
|
||||
world.update_status()
|
||||
clients += src
|
||||
directory[ckey] = src
|
||||
|
||||
//Admin Authorisation
|
||||
var/datum/admins/Admin_Obj = admins[ckey]
|
||||
if(istype(Admin_Obj))
|
||||
admin_list += src
|
||||
holder = Admin_Obj
|
||||
holder = admin_datums[ckey]
|
||||
if(holder)
|
||||
admins += src
|
||||
holder.owner = src
|
||||
holder.state = null
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
|
||||
//makejson()
|
||||
|
||||
if(custom_event_msg && custom_event_msg != "")
|
||||
src << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
src << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
src << "<br>"
|
||||
|
||||
..() //calls mob.Login()
|
||||
if( (world.address == address || !address) && !host )
|
||||
host = key
|
||||
world.update_status()
|
||||
|
||||
if(holder)
|
||||
add_admin_verbs()
|
||||
admin_memo_show()
|
||||
|
||||
log_client_to_db()
|
||||
@@ -137,9 +133,10 @@
|
||||
//////////////
|
||||
/client/Del()
|
||||
if(holder)
|
||||
holder.state = null
|
||||
admin_list -= src
|
||||
client_list -= src
|
||||
holder.owner = null
|
||||
admins -= src
|
||||
directory -= ckey
|
||||
clients -= src
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -149,15 +146,7 @@
|
||||
if ( IsGuestKey(src.key) )
|
||||
return
|
||||
|
||||
var/user = sqlfdbklogin
|
||||
var/pass = sqlfdbkpass
|
||||
var/db = sqlfdbkdb
|
||||
var/address = sqladdress
|
||||
var/port = sqlport
|
||||
|
||||
var/DBConnection/dbcon = new()
|
||||
|
||||
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
return
|
||||
|
||||
@@ -188,17 +177,19 @@
|
||||
|
||||
if(sql_id)
|
||||
//Player already identified previously, we need to just update the 'lastseen', 'ip' and 'computer_id' variables
|
||||
|
||||
var/DBQuery/query_update = dbcon.NewQuery("UPDATE erro_player SET lastseen = Now(), ip = '[sql_ip]', computerid = '[sql_computerid]', lastadminrank = '[sql_admin_rank]' WHERE id = [sql_id]")
|
||||
query_update.Execute()
|
||||
else
|
||||
//New player!! Need to insert all the stuff
|
||||
|
||||
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO erro_player (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')")
|
||||
query_insert.Execute()
|
||||
|
||||
dbcon.Disconnect()
|
||||
|
||||
#undef TOPIC_SPAM_DELAY
|
||||
#undef UPLOAD_LIMIT
|
||||
#undef MIN_CLIENT_VERSION
|
||||
|
||||
//checks if a client is afk
|
||||
//3000 frames = 5 minutes
|
||||
/client/proc/is_afk(duration=3000)
|
||||
if(inactivity > duration) return inactivity
|
||||
return 0
|
||||
@@ -78,6 +78,7 @@ BLIND // can't see anything
|
||||
icon = 'icons/obj/clothing/shoes.dmi'
|
||||
desc = "Comfortable-looking shoes."
|
||||
gender = PLURAL //Carn: for grammarically correct text-parsing
|
||||
var/chained = 0
|
||||
|
||||
body_parts_covered = FEET
|
||||
slot_flags = SLOT_FEET
|
||||
@@ -94,6 +95,7 @@ BLIND // can't see anything
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
slot_flags = SLOT_OCLOTHING
|
||||
var/blood_overlay_type = "suit"
|
||||
|
||||
//Spacesuit
|
||||
//Note: Everything in modules/clothing/spacesuits should have the entire suit grouped together.
|
||||
@@ -102,7 +104,7 @@ BLIND // can't see anything
|
||||
name = "Space helmet"
|
||||
icon_state = "space"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE
|
||||
item_state = "space"
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
|
||||
@@ -118,7 +120,7 @@ BLIND // can't see anything
|
||||
w_class = 4//bulky item
|
||||
gas_transfer_coefficient = 0.01
|
||||
permeability_coefficient = 0.02
|
||||
flags = FPRINT | TABLEPASS
|
||||
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen)
|
||||
slowdown = 3
|
||||
|
||||
@@ -52,4 +52,23 @@
|
||||
name = "security beret"
|
||||
desc = "A beret with the security insignia emblazoned on it. For officers that are more inclined towards style than safety."
|
||||
icon_state = "beret_badge"
|
||||
flags = FPRINT | TABLEPASS
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
//Medical
|
||||
/obj/item/clothing/head/surgery
|
||||
name = "surgical cap"
|
||||
desc = "A cap surgeons wear during operations. Keeps thier hair from tickling your internal organs."
|
||||
icon_state = "surgcap_blue"
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
/obj/item/clothing/head/surgery/purple
|
||||
desc = "A cap surgeons wear during operations. Keeps thier hair from tickling your internal organs. This one is deep purple."
|
||||
icon_state = "surgcap_purple"
|
||||
|
||||
/obj/item/clothing/head/surgery/blue
|
||||
desc = "A cap surgeons wear during operations. Keeps thier hair from tickling your internal organs. This one is baby blue"
|
||||
icon_state = "surgcap_blue"
|
||||
|
||||
/obj/item/clothing/head/surgery/green
|
||||
desc = "A cap surgeons wear during operations. Keeps thier hair from tickling your internal organs. This one is dark green"
|
||||
icon_state = "surgcap_green"
|
||||
|
||||
@@ -76,3 +76,12 @@
|
||||
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
|
||||
w_class = 2
|
||||
gas_transfer_coefficient = 0.90
|
||||
|
||||
/obj/item/clothing/mask/pig
|
||||
name = "pig mask"
|
||||
desc = "A rubber pig mask."
|
||||
icon_state = "pig"
|
||||
item_state = "pig"
|
||||
flags = FPRINT|TABLEPASS|BLOCKHAIR
|
||||
flags_inv = HIDEFACE
|
||||
w_class = 2
|
||||
|
||||
@@ -77,7 +77,6 @@
|
||||
/obj/item/clothing/shoes/orange
|
||||
name = "orange shoes"
|
||||
icon_state = "orange"
|
||||
var/chained = 0
|
||||
color = "orange"
|
||||
|
||||
/obj/item/clothing/shoes/orange/attack_self(mob/user as mob)
|
||||
@@ -92,6 +91,7 @@
|
||||
..()
|
||||
if ((istype(H, /obj/item/weapon/handcuffs) && !( src.chained )))
|
||||
//H = null
|
||||
if (src.icon_state != "orange") return
|
||||
del(H)
|
||||
src.chained = 1
|
||||
src.slowdown = 15
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "capspace"
|
||||
item_state = "capspacehelmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Only for the most fashionable of military figureheads."
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE
|
||||
flags_inv = HIDEFACE
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50)
|
||||
@@ -18,11 +18,11 @@
|
||||
w_class = 4
|
||||
gas_transfer_coefficient = 0.01
|
||||
permeability_coefficient = 0.02
|
||||
flags = FPRINT | TABLEPASS
|
||||
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
|
||||
slowdown = 1.5
|
||||
armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50)
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
//Captain's Spacesuit
|
||||
/obj/item/clothing/head/helmet/space/capspace
|
||||
name = "space helmet"
|
||||
icon_state = "capspace"
|
||||
item_state = "capspacehelmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Only for the most fashionable of military figureheads."
|
||||
flags_inv = HIDEFACE
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50)
|
||||
|
||||
//Captain's space suit This is not the proper path but I don't currently know enough about how this all works to mess with it.
|
||||
/obj/item/clothing/suit/armor/captain
|
||||
name = "Captain's armor"
|
||||
desc = "A bulky, heavy-duty piece of exclusive Nanotrasen armor. YOU are in charge!"
|
||||
icon_state = "caparmor"
|
||||
item_state = "capspacesuit"
|
||||
w_class = 4
|
||||
gas_transfer_coefficient = 0.01
|
||||
permeability_coefficient = 0.02
|
||||
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
|
||||
slowdown = 1.5
|
||||
armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50)
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE
|
||||
|
||||
//Deathsquad suit
|
||||
/obj/item/clothing/head/helmet/space/deathsquad
|
||||
name = "deathsquad helmet"
|
||||
@@ -11,14 +39,14 @@
|
||||
desc = "An armored beret commonly used by special operations officers."
|
||||
icon_state = "beret_badge"
|
||||
armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 30, rad = 30)
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE
|
||||
|
||||
//Space santa outfit suit
|
||||
/obj/item/clothing/head/helmet/space/santahat
|
||||
name = "Santa's hat"
|
||||
desc = "Ho ho ho. Merrry X-mas!"
|
||||
icon_state = "santahat"
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE
|
||||
|
||||
/obj/item/clothing/suit/space/santa
|
||||
name = "Santa's suit"
|
||||
@@ -26,7 +54,7 @@
|
||||
icon_state = "santa"
|
||||
item_state = "santa"
|
||||
slowdown = 0
|
||||
flags = FPRINT | TABLEPASS
|
||||
flags = FPRINT | TABLEPASS | ONESIZEFITSALL | STOPSPRESSUREDMAGE
|
||||
allowed = list(/obj/item) //for stuffing exta special presents
|
||||
|
||||
|
||||
@@ -37,7 +65,7 @@
|
||||
icon_state = "pirate"
|
||||
item_state = "pirate"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE
|
||||
|
||||
/obj/item/clothing/suit/space/pirate
|
||||
name = "pirate coat"
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
desc = "An armored vest that protects against some damage."
|
||||
icon_state = "armor"
|
||||
item_state = "armor"
|
||||
flags = FPRINT | TABLEPASS
|
||||
blood_overlay_type = "armor"
|
||||
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
|
||||
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
|
||||
|
||||
|
||||
@@ -42,6 +43,7 @@
|
||||
desc = "A vest that excels in protecting the wearer against high-velocity solid projectiles."
|
||||
icon_state = "bulletproof"
|
||||
item_state = "armor"
|
||||
blood_overlay_type = "armor"
|
||||
armor = list(melee = 10, bullet = 80, laser = 10, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
|
||||
@@ -50,6 +52,7 @@
|
||||
desc = "A vest that excels in protecting the wearer against energy projectiles."
|
||||
icon_state = "armor_reflec"
|
||||
item_state = "armor_reflec"
|
||||
blood_overlay_type = "armor"
|
||||
armor = list(melee = 10, bullet = 10, laser = 80, energy = 50, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
|
||||
@@ -75,6 +78,7 @@
|
||||
desc = "An armored jacket used in special operations."
|
||||
icon_state = "detective"
|
||||
item_state = "det_suit"
|
||||
blood_overlay_type = "coat"
|
||||
flags_inv = 0
|
||||
|
||||
|
||||
@@ -83,7 +87,8 @@
|
||||
desc = "An armored vest with a detective's badge on it."
|
||||
icon_state = "detective-armor"
|
||||
item_state = "armor"
|
||||
flags = FPRINT | TABLEPASS
|
||||
blood_overlay_type = "armor"
|
||||
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
|
||||
|
||||
@@ -96,6 +101,7 @@
|
||||
var/active = 0.0
|
||||
icon_state = "reactiveoff"
|
||||
item_state = "reactiveoff"
|
||||
blood_overlay_type = "armor"
|
||||
slowdown = 1
|
||||
flags = FPRINT | TABLEPASS
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
armor = list(melee = 50, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
|
||||
/obj/item/clothing/suit/det_suit/armor
|
||||
/obj/item/clothing/suit/storage/det_suit/armor
|
||||
name = "detective's armor"
|
||||
desc = "An armored vest with a detective's badge on it."
|
||||
icon_state = "detective-armor"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
desc = "A basic blue apron."
|
||||
icon_state = "apron"
|
||||
item_state = "apron"
|
||||
blood_overlay_type = "armor"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
allowed = list (/obj/item/weapon/reagent_containers/spray/plantbgone,/obj/item/device/analyzer/plant_analyzer,/obj/item/seeds,/obj/item/nutrient,/obj/item/weapon/minihoe)
|
||||
|
||||
@@ -54,20 +55,22 @@
|
||||
desc = "A basic, dull, white chef's apron."
|
||||
icon_state = "apronchef"
|
||||
item_state = "apronchef"
|
||||
blood_overlay_type = "armor"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
|
||||
//Detective
|
||||
/obj/item/clothing/suit/det_suit
|
||||
/obj/item/clothing/suit/storage/det_suit
|
||||
name = "coat"
|
||||
desc = "An 18th-century multi-purpose trenchcoat. Someone who wears this means serious business."
|
||||
icon_state = "detective"
|
||||
item_state = "det_suit"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/cigpacket,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
|
||||
armor = list(melee = 50, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
//Forensics
|
||||
/obj/item/clothing/suit/forensics
|
||||
/obj/item/clothing/suit/storage/forensics
|
||||
name = "jacket"
|
||||
desc = "A forensics technician jacket."
|
||||
item_state = "det_suit"
|
||||
@@ -75,36 +78,39 @@
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/cigpacket,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
|
||||
armor = list(melee = 10, bullet = 10, laser = 15, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
/obj/item/clothing/suit/forensics/red
|
||||
/obj/item/clothing/suit/storage/forensics/red
|
||||
name = "red jacket"
|
||||
desc = "A red forensics technician jacket."
|
||||
icon_state = "forensics_red"
|
||||
|
||||
/obj/item/clothing/suit/forensics/blue
|
||||
/obj/item/clothing/suit/storage/forensics/blue
|
||||
name = "blue jacket"
|
||||
desc = "A blue forensics technician jacket."
|
||||
icon_state = "forensics_blue"
|
||||
|
||||
//Engineering
|
||||
/obj/item/clothing/suit/hazardvest
|
||||
/obj/item/clothing/suit/storage/hazardvest
|
||||
name = "hazard vest"
|
||||
desc = "A high-visibility vest used in work zones."
|
||||
icon_state = "hazard"
|
||||
item_state = "hazard"
|
||||
blood_overlay_type = "armor"
|
||||
|
||||
//Lawyer
|
||||
/obj/item/clothing/suit/lawyer/bluejacket
|
||||
/obj/item/clothing/suit/storage/lawyer/bluejacket
|
||||
name = "Blue Suit Jacket"
|
||||
desc = "A snappy dress jacket."
|
||||
icon_state = "suitjacket_blue_open"
|
||||
item_state = "suitjacket_blue_open"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
|
||||
/obj/item/clothing/suit/lawyer/purpjacket
|
||||
/obj/item/clothing/suit/storage/lawyer/purpjacket
|
||||
name = "Purple Suit Jacket"
|
||||
desc = "A snappy dress jacket."
|
||||
icon_state = "suitjacket_purp"
|
||||
item_state = "suitjacket_purp"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
|
||||
//Mime
|
||||
@@ -113,9 +119,10 @@
|
||||
desc = "They suspend the illusion of the mime's play."
|
||||
icon = 'icons/obj/clothing/belts.dmi'
|
||||
icon_state = "suspenders"
|
||||
blood_overlay_type = "armor" //it's the less thing that I can put here
|
||||
|
||||
/obj/item/clothing/suit/fr_jacket
|
||||
name = "first responder jacket"
|
||||
desc = "A high-visibility jacket worn by medical first responders."
|
||||
icon_state = "fr_jacket_open"
|
||||
item_state = "fr_jacket"
|
||||
item_state = "fr_jacket"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/obj/item/clothing/suit/labcoat
|
||||
/obj/item/clothing/suit/storage/labcoat
|
||||
name = "labcoat"
|
||||
desc = "A suit that protects against minor chemical spills."
|
||||
icon_state = "labcoat_open"
|
||||
item_state = "labcoat"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0)
|
||||
@@ -63,34 +64,34 @@
|
||||
return
|
||||
usr.update_inv_wear_suit() //so our overlays update
|
||||
|
||||
/obj/item/clothing/suit/labcoat/cmo
|
||||
/obj/item/clothing/suit/storage/labcoat/cmo
|
||||
name = "chief medical officer's labcoat"
|
||||
desc = "Bluer than the standard model."
|
||||
icon_state = "labcoat_cmo_open"
|
||||
item_state = "labcoat_cmo"
|
||||
|
||||
/obj/item/clothing/suit/labcoat/mad
|
||||
/obj/item/clothing/suit/storage/labcoat/mad
|
||||
name = "The Mad's labcoat"
|
||||
desc = "It makes you look capable of konking someone on the noggin and shooting them into space."
|
||||
icon_state = "labgreen_open"
|
||||
item_state = "labgreen"
|
||||
|
||||
/obj/item/clothing/suit/labcoat/genetics
|
||||
/obj/item/clothing/suit/storage/labcoat/genetics
|
||||
name = "Geneticist Labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has a blue stripe on the shoulder."
|
||||
icon_state = "labcoat_gen_open"
|
||||
|
||||
/obj/item/clothing/suit/labcoat/chemist
|
||||
/obj/item/clothing/suit/storage/labcoat/chemist
|
||||
name = "Chemist Labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has an orange stripe on the shoulder."
|
||||
icon_state = "labcoat_chem_open"
|
||||
|
||||
/obj/item/clothing/suit/labcoat/virologist
|
||||
/obj/item/clothing/suit/storage/labcoat/virologist
|
||||
name = "Virologist Labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has a green stripe on the shoulder."
|
||||
icon_state = "labcoat_vir_open"
|
||||
|
||||
/obj/item/clothing/suit/labcoat/science
|
||||
/obj/item/clothing/suit/storage/labcoat/science
|
||||
name = "Scientist Labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has a purple stripe on the shoulder."
|
||||
icon_state = "labcoat_tox_open"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
desc = "Blue Pride, Station Wide"
|
||||
icon_state = "bluetag"
|
||||
item_state = "bluetag"
|
||||
blood_overlay_type = "armor"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
allowed = list (/obj/item/weapon/gun/energy/laser/bluetag)
|
||||
|
||||
@@ -21,6 +22,7 @@
|
||||
desc = "Pew pew pew"
|
||||
icon_state = "redtag"
|
||||
item_state = "redtag"
|
||||
blood_overlay_type = "armor"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
allowed = list (/obj/item/weapon/gun/energy/laser/redtag)
|
||||
|
||||
@@ -95,6 +97,7 @@
|
||||
desc = "For some classy, murderous fun."
|
||||
icon_state = "vest"
|
||||
item_state = "wcoat"
|
||||
blood_overlay_type = "armor"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
|
||||
|
||||
@@ -283,4 +286,4 @@
|
||||
name = "green skimpy dress"
|
||||
desc = "A rather skimpy green dress."
|
||||
icon_state = "stripper_g_over"
|
||||
item_state = "stripper_g"
|
||||
item_state = "stripper_g"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
item_state = "bluesuit"
|
||||
color = "bluesuit"
|
||||
|
||||
/obj/item/clothing/suit/lawyer/bluejacket
|
||||
/obj/item/clothing/suit/storage/lawyer/bluejacket
|
||||
name = "blue suit jacket"
|
||||
desc = "A snappy dress jacket."
|
||||
icon_state = "suitjacket_blue_open"
|
||||
@@ -47,7 +47,7 @@
|
||||
item_state = "lawyer_purp"
|
||||
color = "lawyer_purp"
|
||||
|
||||
/obj/item/clothing/suit/lawyer/purpjacket
|
||||
/obj/item/clothing/suit/storage/lawyer/purpjacket
|
||||
name = "purple suit jacket"
|
||||
desc = "A snappy dress jacket."
|
||||
icon_state = "suitjacket_purp"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
hi
|
||||
// Add custom items you give to people here, and put their icons in custom_items.dmi
|
||||
// Remember to change 'icon = 'custom_items.dmi'' for items not using /obj/item/fluff as a base
|
||||
// Clothing item_state doesn't use custom_items.dmi. Just add them to the normal clothing files.
|
||||
@@ -66,10 +67,20 @@
|
||||
desc = "A neatly folded handkerchief embroidered with a 'M'."
|
||||
icon_state = "maurice_bedford_1"
|
||||
|
||||
/obj/item/weapon/book/fluff/johnathan_falcian_1
|
||||
name = "sketchbook"
|
||||
desc = "A small, well-used sketchbook."
|
||||
icon = 'custom_items.dmi'
|
||||
icon_state = "johnathan_notebook"
|
||||
dat = "In the notebook there are numerous drawings of various crew-mates, locations, and scenes on the ship. They are of fairly good quality."
|
||||
author = "Johnathan Falcian"
|
||||
title = "Falcian's sketchbook"
|
||||
|
||||
//////////////////////////////////
|
||||
////////// Usable Items //////////
|
||||
//////////////////////////////////
|
||||
|
||||
|
||||
/obj/item/weapon/pen/fluff/multi //spaceman96: Trenna Seber
|
||||
name = "multicolor pen"
|
||||
desc = "It's a cool looking pen. Lots of colors!"
|
||||
@@ -330,10 +341,17 @@
|
||||
/obj/item/weapon/crowbar/fluff/zelda_creedy_1 //daaneesh: Zelda Creedy
|
||||
name = "Zelda's Crowbar"
|
||||
desc = "A pink crow bar that has an engraving that reads, 'To Zelda. Love always, Dawn'"
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon = 'custom_items.dmi'
|
||||
icon_state = "zeldacrowbar"
|
||||
item_state = "crowbar"
|
||||
|
||||
////// Ripley customisation kit - Butchery Royce - MayeDay
|
||||
|
||||
/obj/item/weapon/fluff/butcher_royce_1
|
||||
name = "Ripley customisation kit"
|
||||
desc = "A kit containing all the needed tools and parts to turn an APLU Ripley into a Titan's Fist worker mech."
|
||||
icon = 'custom_items.dmi'
|
||||
icon_state = "royce_kit"
|
||||
|
||||
//////////////////////////////////
|
||||
//////////// Clothing ////////////
|
||||
@@ -384,6 +402,19 @@
|
||||
icon = 'custom_items.dmi'
|
||||
icon_state = "ian_colm_1"
|
||||
|
||||
////// Medical eyepatch - Thysse Ezinwa - Jadepython
|
||||
/obj/item/clothing/glasses/eyepatch/fluff/thysse_1
|
||||
name = "medical eyepatch"
|
||||
desc = "On the strap, EZINWA is written in white block letters."
|
||||
|
||||
////// Safety Goggles - Arjun Chopra - MindPhyre - APPROVED
|
||||
/obj/item/clothing/glasses/fluff/arjun_chopra_1
|
||||
name = "safety goggles"
|
||||
desc = "A used pair of leather safety goggles."
|
||||
icon = 'custom_items.dmi'
|
||||
icon_state = "arjun_chopra"
|
||||
item_state = "arjun_chopra"
|
||||
|
||||
//////////// Hats ////////////
|
||||
|
||||
/obj/item/clothing/head/secsoft/fluff/swatcap //deusdactyl: James Girard
|
||||
@@ -424,13 +455,13 @@
|
||||
|
||||
//////////// Suits ////////////
|
||||
|
||||
/obj/item/clothing/suit/labcoat/fluff/pink //spaceman96: Trenna Seber
|
||||
/obj/item/clothing/suit/storage/labcoat/fluff/pink //spaceman96: Trenna Seber
|
||||
name = "pink labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has a pink stripe down from the shoulders."
|
||||
icon = 'custom_items.dmi'
|
||||
icon_state = "labcoat_pink_open"
|
||||
|
||||
/obj/item/clothing/suit/det_suit/fluff/graycoat //vinceluk: Seth Sealis
|
||||
/obj/item/clothing/suit/storage/det_suit/fluff/graycoat //vinceluk: Seth Sealis
|
||||
name = "gray coat"
|
||||
desc = "Old, worn out coat. It's seen better days."
|
||||
icon = 'custom_items.dmi'
|
||||
@@ -438,7 +469,7 @@
|
||||
item_state = "graycoat"
|
||||
color = "graycoat"
|
||||
|
||||
/obj/item/clothing/suit/det_suit/fluff/leatherjack //atomicdog92: Seth Sealis
|
||||
/obj/item/clothing/suit/storage/det_suit/fluff/leatherjack //atomicdog92: Seth Sealis
|
||||
name = "leather jacket"
|
||||
desc = "A black leather coat, popular amongst punks, greasers, and other galactic scum."
|
||||
icon = 'custom_items.dmi'
|
||||
@@ -446,7 +477,7 @@
|
||||
item_state = "leatherjack"
|
||||
color = "leatherjack"
|
||||
|
||||
/obj/item/clothing/suit/labcoat/fluff/burnt //Jamini: Edwin Atweeke
|
||||
/obj/item/clothing/suit/storage/labcoat/fluff/burnt //Jamini: Edwin Atweeke
|
||||
name = "burnt labcoat"
|
||||
desc = "This lab coat has clearly seen better, less burnt, days."
|
||||
icon = 'custom_items.dmi'
|
||||
@@ -500,6 +531,50 @@
|
||||
item_state = "ara_bar_uniform"
|
||||
color = "ara_bar_uniform"
|
||||
|
||||
/////// NT-SID Suit //Zuhayr: Jane Doe
|
||||
|
||||
/obj/item/clothing/under/fluff/jane_sidsuit
|
||||
name = "NT-SID jumpsuit"
|
||||
desc = "A NanoTrasen Synthetic Intelligence Division jumpsuit, issued to 'volunteers'. On other people it looks fine, but right here a scientist has noted: on you it looks stupid."
|
||||
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "jane_sid_suit"
|
||||
item_state = "jane_sid_suit"
|
||||
color = "jane_sid_suit"
|
||||
has_sensor = 2
|
||||
sensor_mode = 3
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
//Suit roll-down toggle.
|
||||
/obj/item/clothing/under/fluff/jane_sidsuit/verb/toggle_zipper()
|
||||
set name = "Toggle Jumpsuit Zipper"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return 0
|
||||
|
||||
if(src.icon_state == "jane_sid_suit_down")
|
||||
src.color = "jane_sid_suit"
|
||||
usr << "You zip up the [src]."
|
||||
else
|
||||
src.color = "jane_sid_suit_down"
|
||||
usr << "You unzip and roll down the [src]."
|
||||
|
||||
src.icon_state = "[color]"
|
||||
src.item_state = "[color]"
|
||||
usr.update_inv_w_uniform()
|
||||
|
||||
////// Wyatt's Ex-Commander Jumpsuit - RawrTaicho
|
||||
/obj/item/clothing/under/fluff/wyatt_1
|
||||
|
||||
name = "ex-commander jumpsuit"
|
||||
desc = "A standard Central Command Engineering Commander jumpsuit tailored to fight the wearer tightly. It has a Medal of Service pinned onto the left side of it."
|
||||
icon = 'custom_items.dmi'
|
||||
icon_state = "wyatt_uniform"
|
||||
item_state = "wyatt_uniform"
|
||||
color = "wyatt_uniform"
|
||||
|
||||
//////////// Masks ////////////
|
||||
|
||||
/*
|
||||
@@ -522,6 +597,41 @@
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 1
|
||||
|
||||
////// Small locket - Altair An-Nasaqan - Serithi
|
||||
|
||||
/obj/item/clothing/tie/fluff/altair_locket
|
||||
name = "small locket"
|
||||
desc = "A small golden locket attached to an Ii'rka-reed string. Inside the locket is a holo-picture of a female Tajaran, and an inscription writtin in Siik'mas."
|
||||
icon = 'custom_items.dmi'
|
||||
icon_state = "altair_locket"
|
||||
item_state = "altair_locket"
|
||||
color = "altair_locket"
|
||||
slot_flags = 0
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 1
|
||||
slot_flags = SLOT_MASK
|
||||
|
||||
////// Medallion - Nasir Khayyam - Jamini
|
||||
|
||||
/obj/item/clothing/tie/fluff/nasir_khayyam_1
|
||||
name = "medallion"
|
||||
desc = "This silvered medallion bears the symbol of the Hadii Clan of the Tajaran."
|
||||
icon = 'custom_items.dmi'
|
||||
icon_state = "nasir_khayyam_1"
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 1
|
||||
slot_flags = SLOT_MASK
|
||||
|
||||
////// Emerald necklace - Ty Foster - Nega
|
||||
|
||||
/obj/item/clothing/mask/mara_kilpatrick_1
|
||||
name = "emerald necklace"
|
||||
desc = "A brass necklace with a green emerald placed at the end. It has a small inscription on the top of the chain, saying \'Foster\'"
|
||||
icon = 'custom_items.dmi'
|
||||
icon_state = "ty_foster"
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 1
|
||||
|
||||
//////////// Shoes ////////////
|
||||
|
||||
/obj/item/clothing/shoes/magboots/fluff/susan_harris_1 //sniperyeti: Susan Harris
|
||||
@@ -529,27 +639,11 @@
|
||||
desc = "A colorful pair of magboots with the name Susan Harris clearly written on the back."
|
||||
icon = 'custom_items.dmi'
|
||||
icon_state = "atmosmagboots0"
|
||||
toggle()
|
||||
set name = "Toggle Magboots"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(src.magpulse)
|
||||
src.flags &= ~NOSLIP
|
||||
src.slowdown = SHOES_SLOWDOWN
|
||||
src.magpulse = 0
|
||||
icon_state = "atmosmagboots0"
|
||||
usr << "You disable the mag-pulse traction system."
|
||||
else
|
||||
src.flags |= NOSLIP
|
||||
src.slowdown = 2
|
||||
src.magpulse = 1
|
||||
icon_state = "atmosmagboots1"
|
||||
usr << "You enable the mag-pulse traction system."
|
||||
|
||||
//////////// Sets ////////////
|
||||
|
||||
/*
|
||||
/obj/item/clothing/suit/labcoat/fluff/cdc_labcoat
|
||||
/obj/item/clothing/suit/storage/labcoat/fluff/cdc_labcoat
|
||||
name = "\improper CDC labcoat"
|
||||
desc = "A standard-issue CDC labcoat that protects against minor chemical spills. It has the name \"Wiles\" sewn on to the breast pocket."
|
||||
icon = 'custom_items.dmi'
|
||||
@@ -564,7 +658,7 @@
|
||||
icon_state = "medical_short"
|
||||
color = "medical_short"
|
||||
|
||||
/obj/item/clothing/suit/labcoat/fluff/red
|
||||
/obj/item/clothing/suit/storage/labcoat/fluff/red
|
||||
name = "red labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has a red stripe on the shoulders and rolled up sleeves."
|
||||
icon = 'custom_items.dmi'
|
||||
@@ -572,7 +666,7 @@
|
||||
|
||||
////// Retired Patrol Outfit //desiderium: Rook Maudlin
|
||||
|
||||
/obj/item/clothing/suit/det_suit/fluff/retpolcoat
|
||||
/obj/item/clothing/suit/storage/det_suit/fluff/retpolcoat
|
||||
name = "retired colony patrolman's coat"
|
||||
desc = "A clean, black nylon windbreaker with the words \"OUTER LIGHT POLICE\" embroidered in gold-dyed thread on the back. \"RETIRED\" is tastefully embroidered below in a smaller font."
|
||||
icon = 'custom_items.dmi'
|
||||
@@ -593,3 +687,19 @@
|
||||
icon_state = "retpoluniform"
|
||||
color = "retpoluniform"
|
||||
|
||||
//////////// Weapons ////////////
|
||||
|
||||
///// Colt Peacemaker - Ana Ka'Rimah - SueTheCake
|
||||
|
||||
/obj/item/weapon/gun/energy/stunrevolver/fluff/ana_peacemaker
|
||||
|
||||
name = "Peacemaker"
|
||||
desc = "A nickel-plated revolver with pearl grips. It has a certain Old West flair!"
|
||||
icon = 'custom_items.dmi'
|
||||
icon_state = "peacemaker"
|
||||
|
||||
///// Well-used baton - Oen'g Issek - Donofnyc3
|
||||
|
||||
/obj/item/weapon/melee/baton/fluff/oeng_baton
|
||||
name = "well-used stun baton"
|
||||
desc = "A stun baton used for incapacitating targets; there seems to be a bunch of tally marks set into the handle."
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
/proc/EquipCustomItems(mob/living/carbon/human/M)
|
||||
// load lines
|
||||
var/file = file2text("config/custom_items.txt")
|
||||
var/lines = dd_text2list(file, "\n")
|
||||
var/lines = text2list(file, "\n")
|
||||
|
||||
for(var/line in lines)
|
||||
// split & clean up
|
||||
var/list/Entry = dd_text2list(line, ":")
|
||||
var/list/Entry = text2list(line, ":")
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i])
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
continue;
|
||||
|
||||
if(Entry[1] == M.ckey && Entry[2] == M.real_name)
|
||||
var/list/Paths = dd_text2list(Entry[3], ",")
|
||||
var/list/Paths = text2list(Entry[3], ",")
|
||||
for(var/P in Paths)
|
||||
var/ok = 0 // 1 if the item was placed successfully
|
||||
P = trim(P)
|
||||
|
||||
@@ -26,7 +26,7 @@ proc/Intoxicated(phrase)
|
||||
proc/NewStutter(phrase,stunned)
|
||||
phrase = html_decode(phrase)
|
||||
|
||||
var/list/split_phrase = dd_text2list(phrase," ") //Split it up into words.
|
||||
var/list/split_phrase = text2list(phrase," ") //Split it up into words.
|
||||
|
||||
var/list/unstuttered_words = split_phrase.Copy()
|
||||
var/i = rand(1,3)
|
||||
@@ -67,7 +67,7 @@ proc/Ellipsis(original_msg, chance = 50)
|
||||
if(chance >= 100) return original_msg
|
||||
|
||||
var/list
|
||||
words = dd_text2list(original_msg," ")
|
||||
words = text2list(original_msg," ")
|
||||
new_words = list()
|
||||
|
||||
var/new_msg = ""
|
||||
|
||||
@@ -33,7 +33,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/SQLquery
|
||||
|
||||
/obj/machinery/librarypubliccomp/attack_hand(var/mob/user as mob)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Library Visitor</TITLE></HEAD><BODY>\n" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
|
||||
switch(screenstate)
|
||||
if(0)
|
||||
@@ -43,9 +43,8 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
dat += "<A href='?src=\ref[src];setauthor=1'>Filter by Author: [author]</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];search=1'>\[Start Search\]</A><BR>"
|
||||
if(1)
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
if(!dbcon.IsConnected())
|
||||
establish_old_db_connection()
|
||||
if(!dbcon_old.IsConnected())
|
||||
dat += "<font color=red><b>ERROR</b>: Unable to contact External Archive. Please contact your system administrator for assistance.</font><BR>"
|
||||
else if(!SQLquery)
|
||||
dat += "<font color=red><b>ERROR</b>: Malformed search request. Please contact your system administrator for assistance.</font><BR>"
|
||||
@@ -53,7 +52,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
dat += "<table>"
|
||||
dat += "<tr><td>AUTHOR</td><td>TITLE</td><td>CATEGORY</td><td>SS<sup>13</sup>BN</td></tr>"
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery(SQLquery)
|
||||
var/DBQuery/query = dbcon_old.NewQuery(SQLquery)
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
@@ -63,7 +62,6 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/id = query.item[4]
|
||||
dat += "<tr><td>[author]</td><td>[title]</td><td>[category]</td><td>[id]</td></tr>"
|
||||
dat += "</table><BR>"
|
||||
dbcon.Disconnect()
|
||||
dat += "<A href='?src=\ref[src];back=1'>\[Go Back\]</A><BR>"
|
||||
user << browse(dat, "window=publiclibrary")
|
||||
onclose(user, "publiclibrary")
|
||||
@@ -135,7 +133,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/bibledelay = 0 // LOL NO SPAM (1 minute delay) -- Doohl
|
||||
|
||||
/obj/machinery/librarycomp/attack_hand(var/mob/user as mob)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Book Inventory Management</TITLE></HEAD><BODY>\n" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
|
||||
switch(screenstate)
|
||||
if(0)
|
||||
@@ -191,16 +189,15 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
dat += "<A href='?src=\ref[src];switchscreen=0'>(Return to main menu)</A><BR>"
|
||||
if(4)
|
||||
dat += "<h3>External Archive</h3>"
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
if(!dbcon.IsConnected())
|
||||
establish_old_db_connection()
|
||||
if(!dbcon_old.IsConnected())
|
||||
dat += "<font color=red><b>ERROR</b>: Unable to contact External Archive. Please contact your system administrator for assistance.</font>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];orderbyid=1'>(Order book by SS<sup>13</sup>BN)</A><BR><BR>"
|
||||
dat += "<table>"
|
||||
dat += "<tr><td>AUTHOR</td><td>TITLE</td><td>CATEGORY</td><td></td></tr>"
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id, author, title, category FROM library")
|
||||
var/DBQuery/query = dbcon_old.NewQuery("SELECT id, author, title, category FROM library")
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
@@ -211,7 +208,6 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
dat += "<tr><td>[author]</td><td>[title]</td><td>[category]</td><td><A href='?src=\ref[src];targetid=[id]'>\[Order\]</A></td></tr>"
|
||||
dat += "</table>"
|
||||
dat += "<BR><A href='?src=\ref[src];switchscreen=0'>(Return to main menu)</A><BR>"
|
||||
dbcon.Disconnect()
|
||||
if(5)
|
||||
dat += "<H3>Upload a New Title</H3>"
|
||||
if(!scanner)
|
||||
@@ -333,9 +329,8 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
if(scanner.cache)
|
||||
var/choice = input("Are you certain you wish to upload this title to the Archive?") in list("Confirm", "Abort")
|
||||
if(choice == "Confirm")
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
if(!dbcon.IsConnected())
|
||||
establish_old_db_connection()
|
||||
if(!dbcon_old.IsConnected())
|
||||
alert("Connection to Archive has been severed. Aborting.")
|
||||
else
|
||||
/*
|
||||
@@ -348,18 +343,17 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/sqlauthor = sanitizeSQL(scanner.cache.author)
|
||||
var/sqlcontent = sanitizeSQL(scanner.cache.dat)
|
||||
var/sqlcategory = sanitizeSQL(upload_category)
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO library (author, title, content, category) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]')")
|
||||
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO library (author, title, content, category) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]')")
|
||||
if(!query.Execute())
|
||||
usr << query.ErrorMsg()
|
||||
else
|
||||
log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
|
||||
alert("Upload Complete.")
|
||||
dbcon.Disconnect()
|
||||
|
||||
if(href_list["targetid"])
|
||||
var/sqlid = sanitizeSQL(href_list["targetid"])
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
if(!dbcon.IsConnected())
|
||||
establish_old_db_connection()
|
||||
if(!dbcon_old.IsConnected())
|
||||
alert("Connection to Archive has been severed. Aborting.")
|
||||
if(bibledelay)
|
||||
for (var/mob/V in hearers(src))
|
||||
@@ -368,7 +362,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
bibledelay = 1
|
||||
spawn(60)
|
||||
bibledelay = 0
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM library WHERE id=[sqlid]")
|
||||
var/DBQuery/query = dbcon_old.NewQuery("SELECT * FROM library WHERE id=[sqlid]")
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
@@ -383,7 +377,6 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
B.icon_state = "book[rand(1,7)]"
|
||||
src.visible_message("[src]'s printer hums as it produces a completely bound book. How did it do that?")
|
||||
break
|
||||
dbcon.Disconnect()
|
||||
if(href_list["orderbyid"])
|
||||
var/orderid = input("Enter your order:") as num|null
|
||||
if(orderid)
|
||||
@@ -411,7 +404,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
O.loc = src
|
||||
|
||||
/obj/machinery/libraryscanner/attack_hand(var/mob/user as mob)
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Scanner Control Interface</TITLE></HEAD><BODY>\n" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
|
||||
if(cache)
|
||||
dat += "<FONT color=#005500>Data stored in memory.</FONT><BR>"
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
/obj/machinery/mineral/processing_unit_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["sel_iron"])
|
||||
if (href_list["sel_iron"] == "yes")
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
/obj/machinery/mineral/stacking_unit_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["release"])
|
||||
switch(href_list["release"])
|
||||
|
||||
@@ -112,7 +112,7 @@ proc/move_mining_shuttle()
|
||||
/obj/machinery/computer/mining_shuttle/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["move"])
|
||||
if(ticker.mode.name == "blob")
|
||||
@@ -287,7 +287,3 @@ proc/move_mining_shuttle()
|
||||
density = 1
|
||||
icon_opened = "miningcaropen"
|
||||
icon_closed = "miningcar"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -186,6 +186,8 @@
|
||||
spreadChance = 0
|
||||
spread = 0
|
||||
|
||||
/*
|
||||
commented out in r5061, I left it because of the shroom thingies
|
||||
|
||||
/turf/simulated/mineral/ReplaceWithFloor()
|
||||
if(!icon_old) icon_old = icon_state
|
||||
@@ -212,7 +214,7 @@
|
||||
W.fullUpdateMineralOverlays()
|
||||
W.levelupdate()
|
||||
return W
|
||||
|
||||
*/
|
||||
|
||||
/turf/simulated/mineral/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
@@ -272,9 +274,11 @@
|
||||
if (src.mineralName == "Clown")
|
||||
new /obj/item/weapon/ore/clown(src)
|
||||
if (prob(src.artifactChance))
|
||||
//spawn a rare, xeno-archaelogical artifact here
|
||||
//spawn a rare artifact here
|
||||
new /obj/machinery/artifact(src)
|
||||
ReplaceWithFloor()
|
||||
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
|
||||
N.fullUpdateMineralOverlays()
|
||||
|
||||
if(destroyed) //Display message about being a terrible miner
|
||||
usr << "\red You destroy some of the rocks!"
|
||||
return
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
/obj/machinery/mineral/mint/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(processing==1)
|
||||
usr << "\blue The machine is processing."
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
/obj/item/weapon/moneybag/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["remove"])
|
||||
var/obj/item/weapon/coin/COIN
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
/obj/structure/ore_box/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["removeall"])
|
||||
for (var/obj/item/weapon/ore/O in contents)
|
||||
|
||||
@@ -25,10 +25,7 @@
|
||||
verbs += /mob/dead/observer/proc/dead_tele
|
||||
stat = DEAD
|
||||
|
||||
dead_mob_list += src
|
||||
add_to_mob_list(src)
|
||||
var/turf/T
|
||||
|
||||
if(ismob(body))
|
||||
T = get_turf(body) //Where is the body located?
|
||||
attack_log = body.attack_log //preserve our attack logs by copying them to our ghost
|
||||
@@ -53,7 +50,7 @@
|
||||
if(!name) //To prevent nameless ghosts
|
||||
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
real_name = name
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
return 1
|
||||
@@ -257,6 +254,17 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
client.be_pai = 1
|
||||
src << "You will now be considered a viable candidate when a pAI device requests a new personality, effective until the end of this round."
|
||||
|
||||
/mob/dead/observer/verb/toggle_spaceninja_candidate()
|
||||
set name = "Toggle Be Space Ninja Candidate"
|
||||
set category = "Ghost"
|
||||
set desc = "Determines whether you will be a candidate for when a new space ninja spawns. (toggle)"
|
||||
if(client.be_spaceninja)
|
||||
client.be_spaceninja = 0
|
||||
src << "You are now excluded from space ninja candidate lists until end of round."
|
||||
else
|
||||
client.be_spaceninja = 1
|
||||
src << "You are now included in space ninja candidate lists until end of round."
|
||||
|
||||
/mob/dead/observer/memory()
|
||||
set hidden = 1
|
||||
src << "\red You are dead! You have no mind to store memory!"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
say_message = "hisses"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
gender = NEUTER
|
||||
dna = null
|
||||
|
||||
var/storedPlasma = 250
|
||||
var/max_plasma = 500
|
||||
@@ -21,7 +22,7 @@
|
||||
var/move_delay_add = 0 // movement delay to add
|
||||
|
||||
status_flags = CANPARALYSE
|
||||
var/heal_rate = 5
|
||||
var/heal_rate = 1
|
||||
var/plasma_rate = 5
|
||||
|
||||
var/oxygen_alert = 0
|
||||
@@ -36,7 +37,7 @@
|
||||
|
||||
/mob/living/carbon/alien/adjustFireLoss(amount) // Weak to Fire
|
||||
if(amount > 0)
|
||||
..(amount * 1.5)
|
||||
..(amount * 2)
|
||||
else
|
||||
..(amount)
|
||||
return
|
||||
@@ -172,6 +173,11 @@
|
||||
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/getDNA()
|
||||
return null
|
||||
|
||||
/mob/living/carbon/alien/setDNA()
|
||||
return
|
||||
|
||||
/*----------------------------------------
|
||||
Proc: AddInfectionImages()
|
||||
@@ -197,6 +203,7 @@ Des: Removes all infected images from the alien.
|
||||
del(I)
|
||||
return
|
||||
|
||||
|
||||
#undef HEAT_DAMAGE_LEVEL_1
|
||||
#undef HEAT_DAMAGE_LEVEL_2
|
||||
#undef HEAT_DAMAGE_LEVEL_3
|
||||
|
||||
@@ -76,29 +76,37 @@ Doesn't work on other aliens/AI.*/
|
||||
src << "\green You need to be closer."
|
||||
return
|
||||
|
||||
/*Xenos now have a proc and a verb for drenching stuff in acid. I couldn't get them to work right when combined so this was the next best solution.
|
||||
The first proc defines the acid throw function while the other two work in the game itself. Probably a good idea to revise this later.
|
||||
I kind of like the right click only--the window version can get a little confusing. Perhaps something telling the alien they need to right click?
|
||||
/N*/
|
||||
/obj/proc/acid(user as mob)
|
||||
var/obj/effect/alien/acid/A = new(src.loc)
|
||||
A.target = src
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\green <B>[user] vomits globs of vile stuff all over [src]. It begins to sizzle and melt under the bubbling mess of acid!</B>"), 1)
|
||||
A.tick()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/corrosive_acid(obj/O as obj in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
|
||||
/mob/living/carbon/alien/humanoid/proc/corrosive_acid(O as obj|turf in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
|
||||
set name = "Corrossive Acid (200)"
|
||||
set desc = "Drench an object in acid, destroying it over time."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(200))
|
||||
if(O in oview(1))
|
||||
if(O.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
|
||||
src << "\green You cannot dissolve this object."
|
||||
else
|
||||
adjustToxLoss(-200)
|
||||
O.acid(src)
|
||||
// OBJ CHECK
|
||||
if(isobj(O))
|
||||
var/obj/I = O
|
||||
if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
|
||||
src << "\green You cannot dissolve this object."
|
||||
return
|
||||
// TURF CHECK
|
||||
else if(istype(O, /turf/simulated))
|
||||
var/turf/T = O
|
||||
// R WALL
|
||||
if(istype(T, /turf/simulated/wall/r_wall))
|
||||
src << "\green You cannot dissolve this object."
|
||||
return
|
||||
// R FLOOR
|
||||
if(istype(T, /turf/simulated/floor/engine))
|
||||
src << "\green You cannot dissolve this object."
|
||||
return
|
||||
else// Not a type we can acid.
|
||||
return
|
||||
|
||||
adjustToxLoss(-200)
|
||||
new /obj/effect/alien/acid(get_turf(O), O)
|
||||
visible_message("\green <B>[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!</B>")
|
||||
else
|
||||
src << "\green Target is too far away."
|
||||
return
|
||||
@@ -106,7 +114,7 @@ I kind of like the right click only--the window version can get a little confusi
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/neurotoxin(mob/target as mob in oview())
|
||||
set name = "Spit Neurotoxin (50)"
|
||||
set desc = "Spits neurotoxin at someone, paralyzing them for a short time."
|
||||
set desc = "Spits neurotoxin at someone, paralyzing them for a short time if they are not wearing protective gear."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(50))
|
||||
@@ -129,12 +137,12 @@ I kind of like the right click only--the window version can get a little confusi
|
||||
if(!istype(T, /turf))
|
||||
return
|
||||
if (U == T)
|
||||
usr.bullet_act(src, get_organ_target())
|
||||
usr.bullet_act(new /obj/item/projectile/neurotoxin(usr.loc), get_organ_target())
|
||||
return
|
||||
if(!istype(U, /turf))
|
||||
return
|
||||
|
||||
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(usr.loc)
|
||||
var/obj/item/projectile/neurotoxin/A = new /obj/item/projectile/neurotoxin(usr.loc)
|
||||
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
@@ -143,14 +151,14 @@ I kind of like the right click only--the window version can get a little confusi
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/resin() // -- TLE
|
||||
set name = "Secrete Resin (100)"
|
||||
set name = "Secrete Resin (75)"
|
||||
set desc = "Secrete tough malleable resin."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(100))
|
||||
if(powerc(75))
|
||||
var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin door","resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
|
||||
if(!choice || !powerc(100)) return
|
||||
adjustToxLoss(-100)
|
||||
if(!choice || !powerc(75)) return
|
||||
adjustToxLoss(-75)
|
||||
src << "\green You shape a [choice]."
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[src] vomits up a thick purple substance and begins to shape it!</B>"), 1)
|
||||
@@ -164,3 +172,18 @@ I kind of like the right click only--the window version can get a little confusi
|
||||
if("resin nest")
|
||||
new /obj/structure/stool/bed/nest(loc)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/regurgitate()
|
||||
set name = "Regurgitate"
|
||||
set desc = "Empties the contents of your stomach"
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc())
|
||||
if(stomach_contents.len)
|
||||
for(var/mob/M in src)
|
||||
if(M in stomach_contents)
|
||||
stomach_contents.Remove(M)
|
||||
M.loc = loc
|
||||
//Paralyse(10)
|
||||
src.visible_message("\green <B>[src] hurls out the contents of their stomach!</B>")
|
||||
return
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
src.name = text("alien drone ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/resin,/mob/living/carbon/alien/humanoid/proc/corrosive_acid)
|
||||
//verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers //<-- pointless
|
||||
add_to_mob_list(src)
|
||||
..()
|
||||
//Drones use the same base as generic humanoids.
|
||||
//Drone verbs
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
if(name == "alien hunter")
|
||||
name = text("alien hunter ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
add_to_mob_list(src)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter
|
||||
|
||||
@@ -73,19 +73,4 @@
|
||||
update_icons()
|
||||
src << "\green You are no longer invisible."
|
||||
return
|
||||
*/
|
||||
/mob/living/carbon/alien/humanoid/hunter/verb/regurgitate()
|
||||
set name = "Regurgitate"
|
||||
set desc = "Empties the contents of your stomach"
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc())
|
||||
if(stomach_contents.len)
|
||||
for(var/mob/M in src)
|
||||
if(M in stomach_contents)
|
||||
stomach_contents.Remove(M)
|
||||
M.loc = loc
|
||||
Paralyse(10)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] hurls out the contents of their stomach!</B>"), 1)
|
||||
return
|
||||
*/
|
||||
@@ -16,7 +16,7 @@
|
||||
name = text("alien sentinel ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin)
|
||||
add_to_mob_list(src)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
||||
act = copytext(act,1,length(act))
|
||||
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
||||
var/m_type = 1
|
||||
var/message
|
||||
|
||||
@@ -500,7 +500,7 @@ In all, this is a lot like the monkey code. /N
|
||||
|
||||
/mob/living/carbon/alien/humanoid/show_inv(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
health = 250
|
||||
icon_state = "alienq_s"
|
||||
nopush = 1
|
||||
heal_rate = 10 // Let's regenerate more than our average underling.
|
||||
heal_rate = 5
|
||||
plasma_rate = 20
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
real_name = src.name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
|
||||
verbs -= /mob/living/carbon/alien/verb/ventcrawl
|
||||
add_to_mob_list(src)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
//Queen verbs
|
||||
/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
|
||||
|
||||
set name = "Lay Egg (50)"
|
||||
set name = "Lay Egg (75)"
|
||||
set desc = "Lay an egg to produce huggers to impregnate prey with."
|
||||
set category = "Alien"
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
src << "There's already an egg here."
|
||||
return
|
||||
|
||||
if(powerc(50,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustToxLoss(-50)
|
||||
if(powerc(75,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustToxLoss(-75)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
|
||||
new /obj/effect/alien/egg(loc)
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
||||
act = copytext(act,1,length(act))
|
||||
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
||||
var/m_type = 1
|
||||
var/message
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
|
||||
/mob/living/carbon/alien/larva/show_inv(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR><BR>
|
||||
|
||||
@@ -16,6 +16,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
item_state = "facehugger"
|
||||
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
|
||||
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH|MASKCOVERSEYES
|
||||
throw_range = 5
|
||||
|
||||
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
|
||||
|
||||
@@ -83,13 +84,18 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
HasProximity(target)
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/on_found(mob/finder as mob)
|
||||
HasProximity(finder)
|
||||
return 1
|
||||
|
||||
/obj/item/clothing/mask/facehugger/dropped()
|
||||
..()
|
||||
GoActive()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/throw_impact(atom/hit_atom)
|
||||
Attach(hit_atom)
|
||||
if(prob(25))
|
||||
Attach(hit_atom)
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/Attach(M as mob)
|
||||
@@ -129,17 +135,21 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
for(var/mob/O in viewers(target, null))
|
||||
O.show_message("\red \b [src] tears [W] off of [target]'s face!", 1)
|
||||
|
||||
loc = target
|
||||
layer = 20
|
||||
target.wear_mask = src
|
||||
target.update_inv_wear_mask()
|
||||
if(prob(75))
|
||||
loc = target
|
||||
layer = 20
|
||||
target.wear_mask = src
|
||||
target.update_inv_wear_mask()
|
||||
|
||||
GoIdle() //so it doesn't jump the people that tear it off
|
||||
GoIdle() //so it doesn't jump the people that tear it off
|
||||
|
||||
if(!sterile) target.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
|
||||
if(!sterile) target.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
|
||||
|
||||
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
|
||||
Impregnate(target)
|
||||
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
|
||||
Impregnate(target)
|
||||
else
|
||||
for(var/mob/O in viewers(target, null))
|
||||
O.show_message("\red \b [src] misses [target]'s face!", 1)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
||||
act = copytext(act,1,length(act))
|
||||
|
||||
if(src.stat == DEAD)
|
||||
return
|
||||
switch(act)
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
swap_hand()
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if (src.health > 0)
|
||||
if (src.health > config.health_threshold_crit)
|
||||
if(src == M && istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
src.visible_message( \
|
||||
@@ -329,6 +329,9 @@
|
||||
target_vent = vent_found //travel back. No additional time required.
|
||||
src << "\red The vent you were heading to appears to be welded."
|
||||
loc = target_vent.loc
|
||||
var/area/new_area = get_area(loc)
|
||||
if(new_area)
|
||||
new_area.Entered(src)
|
||||
|
||||
else
|
||||
src << "You need to remain still while entering a vent."
|
||||
@@ -416,8 +419,6 @@
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
|
||||
|
||||
log_attack("<font color='red'>[usr.name] ([usr.ckey]) Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
|
||||
log_admin("ATTACK: [usr.name] ([usr.ckey]) Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]")
|
||||
msg_admin_attack("ATTACK: [usr.name] ([usr.ckey]) Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]")
|
||||
|
||||
if(!item) return //Grab processing has a chance of returning null
|
||||
|
||||
|
||||
@@ -11,6 +11,14 @@
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
for(var/datum/organ/external/E in src.organs)
|
||||
if(istype(E, /datum/organ/external/chest))
|
||||
continue
|
||||
// Only make the limb drop if it's not too damaged
|
||||
if(prob(100 - E.get_damage()))
|
||||
// Override the current limb status and don't cause an explosion
|
||||
E.droplimb(1,1)
|
||||
|
||||
flick("gibbed-h", animation)
|
||||
hgibs(loc, viruses, dna)
|
||||
|
||||
@@ -100,4 +108,4 @@
|
||||
/mob/living/carbon/human/proc/Drain()
|
||||
ChangeToHusk()
|
||||
mutations |= NOCLONE
|
||||
return
|
||||
return
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
||||
act = copytext(act,1,length(act))
|
||||
|
||||
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
||||
//var/m_type = 1
|
||||
|
||||
@@ -50,17 +53,27 @@
|
||||
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
|
||||
if (!input)
|
||||
return
|
||||
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
|
||||
if (input2 == "Visible")
|
||||
m_type = 1
|
||||
else if (input2 == "Hearable")
|
||||
if (src.miming)
|
||||
return
|
||||
m_type = 2
|
||||
else
|
||||
alert("Unable to use this emote, must be either hearable or visible.")
|
||||
if(copytext(input,1,5) == "says")
|
||||
src << "\red Invalid emote."
|
||||
return
|
||||
message = "<B>[src]</B> [input]"
|
||||
else if(copytext(input,1,9) == "exclaims")
|
||||
src << "\red Invalid emote."
|
||||
return
|
||||
else if(copytext(input,1,5) == "asks")
|
||||
src << "\red Invalid emote."
|
||||
return
|
||||
else
|
||||
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
|
||||
if (input2 == "Visible")
|
||||
m_type = 1
|
||||
else if (input2 == "Hearable")
|
||||
if (src.miming)
|
||||
return
|
||||
m_type = 2
|
||||
else
|
||||
alert("Unable to use this emote, must be either hearable or visible.")
|
||||
return
|
||||
message = "<B>[src]</B> [input]"
|
||||
|
||||
if ("me")
|
||||
if(silent)
|
||||
@@ -75,6 +88,15 @@
|
||||
return
|
||||
if(!(message))
|
||||
return
|
||||
if(copytext(message,1,5) == "says")
|
||||
src << "\red Invalid emote."
|
||||
return
|
||||
else if(copytext(message,1,9) == "exclaims")
|
||||
src << "\red Invalid emote."
|
||||
return
|
||||
else if(copytext(message,1,5) == "asks")
|
||||
src << "\red Invalid emote."
|
||||
return
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
|
||||
@@ -96,26 +118,36 @@
|
||||
m_type = 1
|
||||
|
||||
if ("choke")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> chokes!"
|
||||
m_type = 2
|
||||
if(miming)
|
||||
message = "<B>[src]</B> clutches his throat desperately!"
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a strong noise."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> chokes!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a strong noise."
|
||||
m_type = 2
|
||||
|
||||
if ("clap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> claps."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
if ("flap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> flaps his wings."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("aflap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> flaps his wings ANGRILY!"
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("drool")
|
||||
message = "<B>[src]</B> drools."
|
||||
@@ -126,12 +158,16 @@
|
||||
m_type = 1
|
||||
|
||||
if ("chuckle")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> chuckles."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
message = "<B>[src]</B> appears to chuckle."
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> chuckles."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("twitch")
|
||||
message = "<B>[src]</B> twitches violently."
|
||||
@@ -149,12 +185,16 @@
|
||||
m_type = 1
|
||||
|
||||
if ("cough")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> coughs!"
|
||||
m_type = 2
|
||||
if(miming)
|
||||
message = "<B>[src]</B> appears to cough!"
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a strong noise."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> coughs!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a strong noise."
|
||||
m_type = 2
|
||||
|
||||
if ("frown")
|
||||
message = "<B>[src]</B> frowns."
|
||||
@@ -173,24 +213,32 @@
|
||||
m_type = 1
|
||||
|
||||
if ("gasp")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> gasps!"
|
||||
m_type = 2
|
||||
if(miming)
|
||||
message = "<B>[src]</B> appears to be gasping!"
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> gasps!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
m_type = 2
|
||||
|
||||
if ("deathgasp")
|
||||
message = "<B>[src]</B> seizes up and falls limp, \his eyes dead and lifeless..."
|
||||
m_type = 1
|
||||
|
||||
if ("giggle")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> giggles."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
message = "<B>[src]</B> giggles silently!"
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> giggles."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("glare")
|
||||
var/M = null
|
||||
@@ -244,34 +292,51 @@
|
||||
m_type = 1
|
||||
|
||||
if ("cry")
|
||||
if (!muzzled)
|
||||
if(miming)
|
||||
message = "<B>[src]</B> cries."
|
||||
m_type = 2
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise. \He frowns."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> cries."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise. \He frowns."
|
||||
m_type = 2
|
||||
|
||||
if ("sigh")
|
||||
if (!muzzled)
|
||||
if(miming)
|
||||
message = "<B>[src]</B> sighs."
|
||||
m_type = 2
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> sighs."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
m_type = 2
|
||||
|
||||
if ("laugh")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> laughs."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
message = "<B>[src]</B> acts out a laugh."
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> laughs."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("mumble")
|
||||
message = "<B>[src]</B> mumbles!"
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("grumble")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> grumbles!"
|
||||
m_type = 1
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> grumbles!"
|
||||
m_type = 2
|
||||
@@ -280,16 +345,24 @@
|
||||
m_type = 2
|
||||
|
||||
if ("groan")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> groans!"
|
||||
m_type = 2
|
||||
if(miming)
|
||||
message = "<B>[src]</B> appears to groan!"
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a loud noise."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> groans!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a loud noise."
|
||||
m_type = 2
|
||||
|
||||
if ("moan")
|
||||
message = "<B>[src]</B> moans!"
|
||||
m_type = 2
|
||||
if(miming)
|
||||
message = "<B>[src]</B> appears to moan!"
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> moans!"
|
||||
m_type = 2
|
||||
|
||||
if ("johnny")
|
||||
var/M
|
||||
@@ -298,8 +371,12 @@
|
||||
if (!M)
|
||||
param = null
|
||||
else
|
||||
message = "<B>[src]</B> says, \"[M], please. He had a family.\" [src.name] takes a drag from a cigarette and blows his name out in smoke."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
message = "<B>[src]</B> takes a drag from a cigarette and blows \"[M]\" out in smoke."
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> says, \"[M], please. He had a family.\" [src.name] takes a drag from a cigarette and blows his name out in smoke."
|
||||
m_type = 2
|
||||
|
||||
if ("point")
|
||||
if (!src.restrained())
|
||||
@@ -350,6 +427,8 @@
|
||||
if ("shiver")
|
||||
message = "<B>[src]</B> shivers."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("pale")
|
||||
message = "<B>[src]</B> goes pale for a second."
|
||||
@@ -360,32 +439,46 @@
|
||||
m_type = 1
|
||||
|
||||
if ("sneeze")
|
||||
if (!muzzled)
|
||||
if (miming)
|
||||
message = "<B>[src]</B> sneezes."
|
||||
m_type = 2
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a strange noise."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> sneezes."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a strange noise."
|
||||
m_type = 2
|
||||
|
||||
if ("sniff")
|
||||
message = "<B>[src]</B> sniffs."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("snore")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> snores."
|
||||
m_type = 2
|
||||
if (miming)
|
||||
message = "<B>[src]</B> sleeps soundly."
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> snores."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("whimper")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> whimpers."
|
||||
m_type = 2
|
||||
if (miming)
|
||||
message = "<B>[src]</B> appears hurt."
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> whimpers."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
m_type = 2
|
||||
|
||||
if ("wink")
|
||||
message = "<B>[src]</B> winks."
|
||||
@@ -395,11 +488,15 @@
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> yawns."
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if ("collapse")
|
||||
Paralyse(2)
|
||||
message = "<B>[src]</B> collapses!"
|
||||
m_type = 2
|
||||
if(miming)
|
||||
m_type = 1
|
||||
|
||||
if("hug")
|
||||
m_type = 1
|
||||
@@ -436,7 +533,7 @@
|
||||
else
|
||||
message = "<B>[src]</B> holds out \his hand to [M]."
|
||||
|
||||
if("daps")
|
||||
if("dap")
|
||||
m_type = 1
|
||||
if (!src.restrained())
|
||||
var/M = null
|
||||
@@ -451,12 +548,16 @@
|
||||
message = "<B>[src]</B> sadly can't find anybody to give daps to, and daps \himself. Shameful."
|
||||
|
||||
if ("scream")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> screams!"
|
||||
m_type = 2
|
||||
if (miming)
|
||||
message = "<B>[src]</B> acts out a scream!"
|
||||
m_type = 1
|
||||
else
|
||||
message = "<B>[src]</B> makes a very loud noise."
|
||||
m_type = 2
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> screams!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a very loud noise."
|
||||
m_type = 2
|
||||
|
||||
if ("help")
|
||||
src << "blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough,\ncry, custom, deathgasp, drool, eyebrow, frown, gasp, giggle, groan, grumble, handshake, hug-(none)/mob, glare-(none)/mob,\ngrin, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, raise, salute, shake, shiver, shrug,\nsigh, signal-#1-10, smile, sneeze, sniff, snore, stare-(none)/mob, tremble, twitch, twitch_s, whimper,\nwink, yawn"
|
||||
|
||||
@@ -547,7 +547,7 @@
|
||||
|
||||
/mob/living/carbon/human/show_inv(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
@@ -671,7 +671,7 @@
|
||||
|
||||
if (href_list["mach_close"])
|
||||
var/t1 = text("window=[]", href_list["mach_close"])
|
||||
machine = null
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
|
||||
if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
|
||||
switch(M.a_intent)
|
||||
if ("help")
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
|
||||
visible_message(text("\blue [M] caresses [src] with its scythe like arm."))
|
||||
if ("grab")
|
||||
if(M == src) return
|
||||
if (w_uniform)
|
||||
@@ -21,9 +19,7 @@
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
visible_message(text("\red [] has grabbed [] passively!", M, src))
|
||||
|
||||
if("hurt")
|
||||
if (w_uniform)
|
||||
@@ -42,27 +38,24 @@
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
if (damage >= 25)
|
||||
visible_message("\red <B>[M] has wounded [src]!</B>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
apply_effect(rand(0.5,3), WEAKEN, armor_block)
|
||||
updatehealth()
|
||||
|
||||
if("disarm")
|
||||
var/randn = rand(1, 100)
|
||||
if (randn <= 90)
|
||||
if (prob(80))
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
Weaken(rand(10,15))
|
||||
Weaken(rand(0.5,3))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1)
|
||||
if (prob(25))
|
||||
M.Weaken(rand(2,4))
|
||||
else
|
||||
if (randn <= 99)
|
||||
if (prob(80))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
drop_item()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] disarmed []!</B>", M, src), 1)
|
||||
visible_message(text("\red <B>[] disarmed []!</B>", M, src))
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has tried to disarm []!</B>", M, src), 1)
|
||||
visible_message(text("\red <B>[] has tried to disarm []!</B>", M, src))
|
||||
return
|
||||
@@ -20,9 +20,6 @@
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Stungloved [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_admin("ATTACK: [M.name] ([M.ckey]) stungloved [src.name] ([src.ckey])")
|
||||
msg_admin_attack("ATTACK: [M.name] ([M.ckey]) stungloved [src.name] ([src.ckey])") //BS12 EDIT ALG
|
||||
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) stungloved [src.name] ([src.ckey])</font>")
|
||||
|
||||
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
|
||||
@@ -112,9 +109,6 @@
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Used Electric Hands nanoaug power on [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been shocked by [M.name] with the Electric Hands nanoaug ([M.ckey])</font>")
|
||||
|
||||
log_admin("ATTACK: [M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name] ([src.ckey]), shocking them")
|
||||
msg_admin_attack("ATTACK: [M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name] ([src.ckey]), shocking them") //BS12 EDIT ALG
|
||||
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name]([src.ckey]), shocking them </font>")
|
||||
|
||||
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
|
||||
@@ -137,9 +131,6 @@
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>[attack_verb]ed [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [attack_verb]ed by [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_admin("ATTACK: [M.name] ([M.ckey]) [attack_verb]ed [src.name] ([src.ckey])")
|
||||
msg_admin_attack("ATTACK: [M.name] ([M.ckey]) [attack_verb]ed [src.name] ([src.ckey])") //BS12 EDIT ALG
|
||||
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) [attack_verb]ed [src.name] ([src.ckey])</font>")
|
||||
|
||||
var/damage = rand(0, 5)//BS12 EDIT
|
||||
|
||||
@@ -113,7 +113,12 @@ emp_act
|
||||
/mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
|
||||
if(!I || !user) return 0
|
||||
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting))
|
||||
var/target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, src)
|
||||
if(!target_zone)
|
||||
visible_message("\red <B>[user] misses [src] with \the [I]!")
|
||||
return
|
||||
|
||||
var/datum/organ/external/affecting = get_organ(target_zone)
|
||||
if (!affecting)
|
||||
return
|
||||
if(affecting.status & ORGAN_DESTROYED)
|
||||
@@ -148,21 +153,8 @@ emp_act
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(get_dist(H, src) > 1) //people with TK won't get smeared with blood
|
||||
if(H.wear_suit)
|
||||
H.wear_suit.add_blood(src)
|
||||
H.update_inv_wear_suit(0) //updates mob overlays to show the new blood (no refresh)
|
||||
else if(H.w_uniform)
|
||||
H.w_uniform.add_blood(src)
|
||||
H.update_inv_w_uniform(0) //updates mob overlays to show the new blood (no refresh)
|
||||
if (H.gloves)
|
||||
H.gloves.add_blood(H)
|
||||
H.gloves:transfer_blood = 2
|
||||
H.gloves:bloody_hands_mob = H
|
||||
else
|
||||
H.add_blood(H)
|
||||
H.bloody_hands = 2
|
||||
H.bloody_hands_mob = H
|
||||
H.update_inv_gloves() //updates on-mob overlays for bloody hands and/or bloody gloves
|
||||
H.bloody_body(src)
|
||||
H.bloody_hands(src)
|
||||
|
||||
switch(hit_area)
|
||||
if("head")//Harder to score a stun but if you do it lasts a bit longer
|
||||
@@ -189,10 +181,23 @@ emp_act
|
||||
visible_message("\red <B>[src] has been knocked down!</B>")
|
||||
|
||||
if(bloody)
|
||||
bloody_body(src)
|
||||
|
||||
if(wear_suit)
|
||||
wear_suit.add_blood(src)
|
||||
update_inv_wear_suit(0)
|
||||
if(w_uniform)
|
||||
w_uniform.add_blood(src)
|
||||
update_inv_w_uniform(0)
|
||||
/mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2)
|
||||
if (gloves)
|
||||
gloves.add_blood(source)
|
||||
gloves:transfer_blood = amount
|
||||
gloves:bloody_hands_mob = source
|
||||
else
|
||||
add_blood(source)
|
||||
bloody_hands = amount
|
||||
bloody_hands_mob = source
|
||||
update_inv_gloves() //updates on-mob overlays for bloody hands and/or bloody gloves
|
||||
|
||||
/mob/living/carbon/human/proc/bloody_body(var/mob/living/source)
|
||||
if(wear_suit)
|
||||
wear_suit.add_blood(source)
|
||||
update_inv_wear_suit(0)
|
||||
if(w_uniform)
|
||||
w_uniform.add_blood(source)
|
||||
update_inv_w_uniform(0)
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
/obj/effect/equip_e/human/process()
|
||||
if (item)
|
||||
item.add_fingerprint(source)
|
||||
if (!item)
|
||||
else
|
||||
switch(place)
|
||||
if("mask")
|
||||
if (!( target.wear_mask ))
|
||||
@@ -409,6 +409,9 @@
|
||||
if("legcuff")
|
||||
message = "\red <B>[source] is trying to unlegcuff [target]!</B>"
|
||||
if("uniform")
|
||||
for(var/obj/item/I in list(target.l_store, target.r_store))
|
||||
if(I.on_found(source))
|
||||
return
|
||||
if(target.w_uniform && !target.w_uniform.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
else
|
||||
@@ -416,19 +419,8 @@
|
||||
if("s_store")
|
||||
message = "\red <B>[source] is trying to take off \a [target.s_store] from [target]'s suit!</B>"
|
||||
if("pockets")
|
||||
for(var/obj/item/weapon/mousetrap/MT in list(target.l_store, target.r_store))
|
||||
if(MT.armed)
|
||||
for(var/mob/O in viewers(target, null))
|
||||
if(O == source)
|
||||
O.show_message("\red <B>You reach into the [target]'s pockets, but there was a live mousetrap in there!</B>", 1)
|
||||
else
|
||||
O.show_message("\red <B>[source] reaches into [target]'s pockets and sets off a hidden mousetrap!</B>", 1)
|
||||
target.u_equip(MT)
|
||||
if (target.client)
|
||||
target.client.screen -= MT
|
||||
MT.loc = source.loc
|
||||
MT.triggered(source, source.hand ? "l_hand" : "r_hand")
|
||||
MT.layer = OBJ_LAYER
|
||||
for(var/obj/item/I in list(target.l_store, target.r_store))
|
||||
if(I.on_found(source))
|
||||
return
|
||||
message = "\red <B>[source] is trying to empty [target]'s pockets.</B>"
|
||||
if("CPR")
|
||||
@@ -541,7 +533,7 @@ It can still be worn/put on as normal.
|
||||
if (target.legcuffed)
|
||||
strip_item = target.legcuffed
|
||||
if("CPR")
|
||||
if ((target.health >= -99.0 && target.health <= 0))
|
||||
if ((target.health > config.health_threshold_dead && target.health < config.health_threshold_crit))
|
||||
var/suff = min(target.getOxyLoss(), 7)
|
||||
target.adjustOxyLoss(-suff)
|
||||
target.updatehealth()
|
||||
|
||||
@@ -8,23 +8,29 @@
|
||||
#define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point
|
||||
#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 1000K point
|
||||
|
||||
#define COLD_DAMAGE_LEVEL_1 1 //Amount of damage applied when your body temperature just passes the 260.15k safety point
|
||||
#define COLD_DAMAGE_LEVEL_2 2 //Amount of damage applied when your body temperature passes the 200K point
|
||||
#define COLD_DAMAGE_LEVEL_3 4 //Amount of damage applied when your body temperature passes the 120K point
|
||||
#define COLD_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when your body temperature just passes the 260.15k safety point
|
||||
#define COLD_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when your body temperature passes the 200K point
|
||||
#define COLD_DAMAGE_LEVEL_3 3 //Amount of damage applied when your body temperature passes the 120K point
|
||||
|
||||
//Note that gas heat damage is only applied once every FOUR ticks.
|
||||
#define HEAT_GAS_DAMAGE_LEVEL_1 2 //Amount of damage applied when the current breath's temperature just passes the 360.15k safety point
|
||||
#define HEAT_GAS_DAMAGE_LEVEL_2 4 //Amount of damage applied when the current breath's temperature passes the 400K point
|
||||
#define HEAT_GAS_DAMAGE_LEVEL_3 8 //Amount of damage applied when the current breath's temperature passes the 1000K point
|
||||
|
||||
#define COLD_GAS_DAMAGE_LEVEL_1 1 //Amount of damage applied when the current breath's temperature just passes the 260.15k safety point
|
||||
#define COLD_GAS_DAMAGE_LEVEL_2 2 //Amount of damage applied when the current breath's temperature passes the 200K point
|
||||
#define COLD_GAS_DAMAGE_LEVEL_3 4 //Amount of damage applied when the current breath's temperature passes the 120K point
|
||||
#define COLD_GAS_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when the current breath's temperature just passes the 260.15k safety point
|
||||
#define COLD_GAS_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when the current breath's temperature passes the 200K point
|
||||
#define COLD_GAS_DAMAGE_LEVEL_3 3 //Amount of damage applied when the current breath's temperature passes the 120K point
|
||||
|
||||
var/const/BLOOD_VOLUME_SAFE = 501
|
||||
var/const/BLOOD_VOLUME_OKAY = 336
|
||||
var/const/BLOOD_VOLUME_BAD = 224
|
||||
var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
|
||||
/mob/living/carbon/human
|
||||
var/oxygen_alert = 0
|
||||
var/toxins_alert = 0
|
||||
var/fire_alert = 0
|
||||
var/pressure_alert = 0
|
||||
var/prev_gender = null // Debug for plural genders
|
||||
var/temperature_alert = 0
|
||||
|
||||
@@ -152,11 +158,11 @@
|
||||
|
||||
|
||||
switch(blood_volume)
|
||||
if(501 to 10000)
|
||||
if(BLOOD_VOLUME_SAFE to 10000)
|
||||
if(pale)
|
||||
pale = 0
|
||||
update_body()
|
||||
if(336 to 500)
|
||||
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
|
||||
if(!pale)
|
||||
pale = 1
|
||||
update_body()
|
||||
@@ -168,7 +174,7 @@
|
||||
if(oxyloss < 20)
|
||||
// hint that they're getting close to suffocation
|
||||
oxyloss += 3
|
||||
if(224 to 335)
|
||||
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
|
||||
if(!pale)
|
||||
pale = 1
|
||||
update_body()
|
||||
@@ -180,19 +186,25 @@
|
||||
Paralyse(rand(1,3))
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
src << "\red You feel extremely [word]"
|
||||
if(122 to 244)
|
||||
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
|
||||
oxyloss += 5
|
||||
toxloss += 5
|
||||
if(prob(15))
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
src << "\red You feel extremely [word]"
|
||||
if(0 to 122)
|
||||
if(0 to BLOOD_VOLUME_SURVIVE)
|
||||
// There currently is a strange bug here. If the mob is not below -100 health
|
||||
// when death() is called, apparently they will be just fine, and this way it'll
|
||||
// spam deathgasp. Adjusting toxloss ensures the mob will stay dead.
|
||||
toxloss += 300 // just to be safe!
|
||||
death()
|
||||
|
||||
// Without enough blood you slowly go hungry.
|
||||
if(blood_volume < BLOOD_VOLUME_SAFE)
|
||||
if(nutrition >= 300)
|
||||
nutrition -= 10
|
||||
else if(nutrition >= 200)
|
||||
nutrition -= 3
|
||||
|
||||
var/blood_max = 0
|
||||
for(var/datum/organ/external/temp in organs)
|
||||
@@ -241,7 +253,7 @@
|
||||
if (prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
if (getBrainLoss() >= 60 && stat != 2)
|
||||
if (prob(7))
|
||||
if (prob(3))
|
||||
switch(pick(1,2,3))
|
||||
if(1)
|
||||
say(pick("IM A PONY NEEEEEEIIIIIIIIIGH", "without oxigen blob don't evoluate?", "CAPTAINS A COMDOM", "[pick("", "that faggot traitor")] [pick("joerge", "george", "gorge", "gdoruge")] [pick("mellens", "melons", "mwrlins")] is grifing me HAL;P!!!", "can u give me [pick("telikesis","halk","eppilapse")]?", "THe saiyans screwed", "Bi is THE BEST OF BOTH WORLDS>", "I WANNA PET TEH monkeyS", "stop grifing me!!!!", "SOTP IT#"))
|
||||
@@ -755,12 +767,12 @@
|
||||
//Place is colder than we are
|
||||
var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||
if(thermal_protection < 1)
|
||||
bodytemperature += (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR)
|
||||
bodytemperature += min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX)
|
||||
else
|
||||
//Place is hotter than we are
|
||||
var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||
if(thermal_protection < 1)
|
||||
bodytemperature += (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
|
||||
bodytemperature += min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
|
||||
|
||||
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
|
||||
if(bodytemperature > 360.15)
|
||||
@@ -795,10 +807,23 @@
|
||||
// Made it possible to actually have something that can protect against high pressure... Done by Errorage. Polymorph now has an axe sticking from his head for his previous hardcoded nonsense!
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure > HAZARD_HIGH_PRESSURE)
|
||||
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
|
||||
if(adjusted_pressure > HAZARD_HIGH_PRESSURE)
|
||||
adjustBruteLoss( min( (adjusted_pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT , MAX_PRESSURE_DAMAGE) )
|
||||
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
|
||||
switch(adjusted_pressure)
|
||||
if(HAZARD_HIGH_PRESSURE to INFINITY)
|
||||
adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) )
|
||||
pressure_alert = 2
|
||||
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
|
||||
pressure_alert = 1
|
||||
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
|
||||
pressure_alert = 0
|
||||
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
|
||||
pressure_alert = -1
|
||||
else
|
||||
if( !(COLD_RESISTANCE in mutations) )
|
||||
adjustBruteLoss( LOW_PRESSURE_DAMAGE )
|
||||
pressure_alert = -2
|
||||
else
|
||||
pressure_alert = -1
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -1416,17 +1441,7 @@
|
||||
else nutrition_icon.icon_state = "nutrition4"
|
||||
|
||||
if(pressure)
|
||||
if(istype(wear_suit, /obj/item/clothing/suit/space)||istype(wear_suit, /obj/item/clothing/suit/armor/captain))
|
||||
pressure.icon_state = "pressure0"
|
||||
else
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if(environment)
|
||||
switch(environment.return_pressure())
|
||||
if(HAZARD_HIGH_PRESSURE to INFINITY) pressure.icon_state = "pressure2"
|
||||
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE) pressure.icon_state = "pressure1"
|
||||
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE) pressure.icon_state = "pressure0"
|
||||
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE) pressure.icon_state = "pressure-1"
|
||||
else pressure.icon_state = "pressure-2"
|
||||
pressure.icon_state = "pressure[pressure_alert]"
|
||||
|
||||
if(pullin)
|
||||
if(pulling) pullin.icon_state = "pull1"
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
if(src.dna)
|
||||
/*if(src.dna.mutantrace == "lizard") //Soghun stutterss-s-ss-sss.
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = dd_replacetext(message, "s", stutter("ss"))
|
||||
*/
|
||||
message = replacetext(message, "s", stutter("ss"))*/
|
||||
if(src.dna.mutantrace == "metroid" && prob(5))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
if(copytext(message, 1, 2) == ";")
|
||||
@@ -36,7 +35,7 @@
|
||||
|
||||
if(stat != DEAD)
|
||||
for(var/datum/disease/pierrot_throat/D in viruses)
|
||||
var/list/temp_message = dd_text2list(message, " ") //List each word in the message
|
||||
var/list/temp_message = text2list(message, " ") //List each word in the message
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++) //Create a second list for excluding words down the line
|
||||
pick_list += i
|
||||
@@ -50,31 +49,35 @@
|
||||
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/luchador))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = dd_replacetext(message, "captain", "CAPIT<49>N")
|
||||
message = dd_replacetext(message, "station", "ESTACI<43>N")
|
||||
message = dd_replacetext(message, "sir", "SE<53>OR")
|
||||
message = dd_replacetext(message, "the ", "el ")
|
||||
message = dd_replacetext(message, "my ", "mi ")
|
||||
message = dd_replacetext(message, "is ", "es ")
|
||||
message = dd_replacetext(message, "it's", "es")
|
||||
message = dd_replacetext(message, "friend", "amigo")
|
||||
message = dd_replacetext(message, "buddy", "amigo")
|
||||
message = dd_replacetext(message, "hello", "hola")
|
||||
message = dd_replacetext(message, " hot", " caliente")
|
||||
message = dd_replacetext(message, " very ", " muy ")
|
||||
message = dd_replacetext(message, "sword", "espada")
|
||||
message = dd_replacetext(message, "library", "biblioteca")
|
||||
message = dd_replacetext(message, "traitor", "traidor")
|
||||
message = dd_replacetext(message, "wizard", "mago")
|
||||
message = replacetext(message, "captain", "CAPIT<49>N")
|
||||
message = replacetext(message, "station", "ESTACI<43>N")
|
||||
message = replacetext(message, "sir", "SE<53>OR")
|
||||
message = replacetext(message, "the ", "el ")
|
||||
message = replacetext(message, "my ", "mi ")
|
||||
message = replacetext(message, "is ", "es ")
|
||||
message = replacetext(message, "it's", "es")
|
||||
message = replacetext(message, "friend", "amigo")
|
||||
message = replacetext(message, "buddy", "amigo")
|
||||
message = replacetext(message, "hello", "hola")
|
||||
message = replacetext(message, " hot", " caliente")
|
||||
message = replacetext(message, " very ", " muy ")
|
||||
message = replacetext(message, "sword", "espada")
|
||||
message = replacetext(message, "library", "biblioteca")
|
||||
message = replacetext(message, "traitor", "traidor")
|
||||
message = replacetext(message, "wizard", "mago")
|
||||
message = uppertext(message) //Things end up looking better this way (no mixed cases), and it fits the macho wrestler image.
|
||||
if(prob(25))
|
||||
message += " OLE!"
|
||||
|
||||
if ((HULK in mutations) && health >= 25)
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = "[uppertext(message)]!!" //because I don't know how to code properly in getting vars from other files -Bro
|
||||
|
||||
//Ninja mask obscures text and voice if set to do so.
|
||||
//Would make it more global but it's sort of ninja specific.
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
var/list/temp_message = dd_text2list(message, " ")
|
||||
var/list/temp_message = text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
pick_list += i
|
||||
@@ -84,37 +87,37 @@
|
||||
temp_message[H] = ninjaspeak(temp_message[H])
|
||||
pick_list -= H
|
||||
message = dd_list2text(temp_message, " ")
|
||||
message = dd_replacetext(message, "o", "<22>")
|
||||
message = dd_replacetext(message, "p", "<22>")
|
||||
message = dd_replacetext(message, "l", "<22>")
|
||||
message = dd_replacetext(message, "s", "<22>")
|
||||
message = dd_replacetext(message, "u", "<22>")
|
||||
message = dd_replacetext(message, "b", "<22>")
|
||||
message = replacetext(message, "o", "<22>")
|
||||
message = replacetext(message, "p", "<22>")
|
||||
message = replacetext(message, "l", "<22>")
|
||||
message = replacetext(message, "s", "<22>")
|
||||
message = replacetext(message, "u", "<22>")
|
||||
message = replacetext(message, "b", "<22>")
|
||||
/*This text is hilarious but also absolutely retarded.
|
||||
message = dd_replacetext(message, "l", "r")
|
||||
message = dd_replacetext(message, "rr", "ru")
|
||||
message = dd_replacetext(message, "v", "b")
|
||||
message = dd_replacetext(message, "f", "hu")
|
||||
message = dd_replacetext(message, "'t", "")
|
||||
message = dd_replacetext(message, "t ", "to ")
|
||||
message = dd_replacetext(message, " I ", " ai ")
|
||||
message = dd_replacetext(message, "th", "z")
|
||||
message = dd_replacetext(message, "ish", "isu")
|
||||
message = dd_replacetext(message, "is", "izu")
|
||||
message = dd_replacetext(message, "ziz", "zis")
|
||||
message = dd_replacetext(message, "se", "su")
|
||||
message = dd_replacetext(message, "br", "bur")
|
||||
message = dd_replacetext(message, "ry", "ri")
|
||||
message = dd_replacetext(message, "you", "yuu")
|
||||
message = dd_replacetext(message, "ck", "cku")
|
||||
message = dd_replacetext(message, "eu", "uu")
|
||||
message = dd_replacetext(message, "ow", "au")
|
||||
message = dd_replacetext(message, "are", "aa")
|
||||
message = dd_replacetext(message, "ay", "ayu")
|
||||
message = dd_replacetext(message, "ea", "ii")
|
||||
message = dd_replacetext(message, "ch", "chi")
|
||||
message = dd_replacetext(message, "than", "sen")
|
||||
message = dd_replacetext(message, ".", "")
|
||||
message = replacetext(message, "l", "r")
|
||||
message = replacetext(message, "rr", "ru")
|
||||
message = replacetext(message, "v", "b")
|
||||
message = replacetext(message, "f", "hu")
|
||||
message = replacetext(message, "'t", "")
|
||||
message = replacetext(message, "t ", "to ")
|
||||
message = replacetext(message, " I ", " ai ")
|
||||
message = replacetext(message, "th", "z")
|
||||
message = replacetext(message, "ish", "isu")
|
||||
message = replacetext(message, "is", "izu")
|
||||
message = replacetext(message, "ziz", "zis")
|
||||
message = replacetext(message, "se", "su")
|
||||
message = replacetext(message, "br", "bur")
|
||||
message = replacetext(message, "ry", "ri")
|
||||
message = replacetext(message, "you", "yuu")
|
||||
message = replacetext(message, "ck", "cku")
|
||||
message = replacetext(message, "eu", "uu")
|
||||
message = replacetext(message, "ow", "au")
|
||||
message = replacetext(message, "are", "aa")
|
||||
message = replacetext(message, "ay", "ayu")
|
||||
message = replacetext(message, "ea", "ii")
|
||||
message = replacetext(message, "ch", "chi")
|
||||
message = replacetext(message, "than", "sen")
|
||||
message = replacetext(message, ".", "")
|
||||
message = lowertext(message)
|
||||
*/
|
||||
if (src.slurring)
|
||||
|
||||
@@ -667,13 +667,18 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
var/t_state
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat) )
|
||||
t_state = "armor"
|
||||
else if( istype(wear_suit, /obj/item/clothing/suit/det_suit || /obj/item/clothing/suit/labcoat) )
|
||||
else if( istype(wear_suit, /obj/item/clothing/suit/storage/det_suit || /obj/item/clothing/suit/storage/labcoat) )
|
||||
t_state = "coat"
|
||||
else
|
||||
t_state = "suit"
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood")
|
||||
|
||||
if(wear_suit.blood_DNA)
|
||||
var/obj/item/clothing/suit/S = wear_suit
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood")
|
||||
|
||||
overlays_lying[SUIT_LAYER] = lying
|
||||
overlays_standing[SUIT_LAYER] = standing
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
var/list/temp_message = dd_text2list(message, " ")
|
||||
var/list/temp_message = text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
pick_list += i
|
||||
@@ -48,12 +48,12 @@
|
||||
temp_message[H] = ninjaspeak(temp_message[H])
|
||||
pick_list -= H
|
||||
message = dd_list2text(temp_message, " ")
|
||||
message = dd_replacetext(message, "o", "<22>")
|
||||
message = dd_replacetext(message, "p", "<22>")
|
||||
message = dd_replacetext(message, "l", "<22>")
|
||||
message = dd_replacetext(message, "s", "<22>")
|
||||
message = dd_replacetext(message, "u", "<22>")
|
||||
message = dd_replacetext(message, "b", "<22>")
|
||||
message = replacetext(message, "o", "<22>")
|
||||
message = replacetext(message, "p", "<22>")
|
||||
message = replacetext(message, "l", "<22>")
|
||||
message = replacetext(message, "s", "<22>")
|
||||
message = replacetext(message, "u", "<22>")
|
||||
message = replacetext(message, "b", "<22>")
|
||||
|
||||
if (src.stuttering)
|
||||
message = stutter(message)
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
//param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
||||
act = copytext(act,1,length(act))
|
||||
|
||||
var/m_type = 1
|
||||
var/message
|
||||
|
||||
|
||||
@@ -50,465 +50,474 @@
|
||||
var/Tempstun = 0 // temporary temperature stuns
|
||||
var/Discipline = 0 // if a metroid has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
|
||||
var/SStun = 0 // stun variable
|
||||
proc
|
||||
|
||||
AIprocess() // the master AI process
|
||||
/mob/living/carbon/metroid/proc/AIprocess() // the master AI process
|
||||
|
||||
if(AIproc || stat == DEAD || client) return
|
||||
//world << "AI proc started."
|
||||
if(AIproc || stat == DEAD || client) return
|
||||
|
||||
var/hungry = 0
|
||||
var/starving = 0
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
switch(nutrition)
|
||||
if(400 to 1100) hungry = 1
|
||||
if(0 to 399)
|
||||
starving = 1
|
||||
else
|
||||
switch(nutrition)
|
||||
if(150 to 900) hungry = 1
|
||||
if(0 to 149) starving = 1
|
||||
AIproc = 1
|
||||
while(AIproc && stat != 2 && (attacked > 0 || starving || hungry || rabid || Victim))
|
||||
if(Victim) // can't eat AND have this little process at the same time
|
||||
break
|
||||
var/hungry = 0
|
||||
var/starving = 0
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
switch(nutrition)
|
||||
if(400 to 1100) hungry = 1
|
||||
if(0 to 399)
|
||||
starving = 1
|
||||
else
|
||||
switch(nutrition)
|
||||
if(150 to 900) hungry = 1
|
||||
if(0 to 149) starving = 1
|
||||
AIproc = 1
|
||||
//world << "AIproc [AIproc] && stat != 2 [stat] && (attacked > 0 [attacked] || starving [starving] || hungry [hungry] || rabid [rabid] || Victim [Victim] || Target [Target]"
|
||||
while(AIproc && stat != 2 && (attacked > 0 || starving || hungry || rabid || Victim))
|
||||
if(Victim) // can't eat AND have this little process at the same time
|
||||
//world << "break 1"
|
||||
break
|
||||
|
||||
if(!Target || client)
|
||||
break
|
||||
if(!Target || client)
|
||||
//world << "break 2"
|
||||
break
|
||||
|
||||
|
||||
if(Target.health <= -70 || Target.stat == 2)
|
||||
if(Target.health <= -70 || Target.stat == 2)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
//world << "break 3"
|
||||
break
|
||||
|
||||
if(Target)
|
||||
//world << "[Target] Target Found"
|
||||
for(var/mob/living/carbon/metroid/M in view(1,Target))
|
||||
if(M.Victim == Target)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
//world << "break 4"
|
||||
break
|
||||
if(!AIproc)
|
||||
//world << "break 5"
|
||||
break
|
||||
|
||||
if(Target in view(1,src))
|
||||
|
||||
if(istype(Target, /mob/living/silicon))
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(15)
|
||||
Atkcool = 0
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
//world << "retrun 1"
|
||||
return
|
||||
if(!Target.lying && prob(80))
|
||||
|
||||
if(Target.client && Target.health >= 20)
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(25)
|
||||
Atkcool = 0
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
|
||||
|
||||
if(prob(30))
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
Feedon(Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
Feedon(Target)
|
||||
|
||||
else
|
||||
if(Target in view(7, src))
|
||||
if(get_obstacle_ok(Target))
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
Target = null
|
||||
AIproc = 0
|
||||
//world << "break 6"
|
||||
break
|
||||
|
||||
if(Target)
|
||||
for(var/mob/living/carbon/metroid/M in view(1,Target))
|
||||
if(M.Victim == Target)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
if(!AIproc)
|
||||
break
|
||||
var/sleeptime = movement_delay()
|
||||
if(sleeptime <= 0) sleeptime = 1
|
||||
|
||||
if(Target in view(1,src))
|
||||
sleep(sleeptime + 2) // this is about as fast as a player Metroid can go
|
||||
|
||||
if(istype(Target, /mob/living/silicon))
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(15)
|
||||
Atkcool = 0
|
||||
AIproc = 0
|
||||
//world << "AI proc ended."
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
return
|
||||
if(!Target.lying && prob(80))
|
||||
/mob/living/carbon/metroid/proc/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
adjustToxLoss(rand(10,20))
|
||||
return
|
||||
|
||||
if(Target.client && Target.health >= 20)
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(25)
|
||||
Atkcool = 0
|
||||
//var/environment_heat_capacity = environment.heat_capacity()
|
||||
var/loc_temp = T0C
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
//environment_heat_capacity = loc:heat_capacity
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
loc_temp = heat_turf.temperature
|
||||
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
loc_temp = loc:air_contents.temperature
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
/*
|
||||
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
|
||||
var/transfer_coefficient
|
||||
|
||||
transfer_coefficient = 1
|
||||
if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
|
||||
transfer_coefficient *= wear_mask.heat_transfer_coefficient
|
||||
|
||||
// handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
|
||||
*/
|
||||
|
||||
|
||||
if(prob(30))
|
||||
step_to(src, Target)
|
||||
if(loc_temp < 310.15) // a cold place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
else // a hot place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
Feedon(Target)
|
||||
/*
|
||||
if(stat==2)
|
||||
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
Feedon(Target)
|
||||
*/
|
||||
//Account for massive pressure differences
|
||||
|
||||
else
|
||||
if(Target in view(7, src))
|
||||
if(get_obstacle_ok(Target))
|
||||
step_to(src, Target)
|
||||
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
|
||||
if(bodytemperature <= (T0C - 40)) // stun temperature
|
||||
Tempstun = 1
|
||||
|
||||
else
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
|
||||
var/sleeptime = movement_delay()
|
||||
if(sleeptime <= 0) sleeptime = 1
|
||||
|
||||
sleep(sleeptime + 2) // this is about as fast as a player Metroid can go
|
||||
|
||||
AIproc = 0
|
||||
|
||||
handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
adjustFireLoss(rand(10,20))
|
||||
return
|
||||
|
||||
//var/environment_heat_capacity = environment.heat_capacity()
|
||||
var/loc_temp = T0C
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
//environment_heat_capacity = loc:heat_capacity
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
loc_temp = heat_turf.temperature
|
||||
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
loc_temp = loc:air_contents.temperature
|
||||
if(bodytemperature <= (T0C - 50)) // hurt temperature
|
||||
if(bodytemperature <= 50) // sqrting negative numbers is bad
|
||||
adjustToxLoss(200)
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
adjustToxLoss(round(sqrt(bodytemperature)) * 2)
|
||||
|
||||
/*
|
||||
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
|
||||
var/transfer_coefficient
|
||||
else
|
||||
Tempstun = 0
|
||||
|
||||
transfer_coefficient = 1
|
||||
if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
|
||||
transfer_coefficient *= wear_mask.heat_transfer_coefficient
|
||||
updatehealth()
|
||||
|
||||
// handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
|
||||
*/
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
if(loc_temp < 310.15) // a cold place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
else // a hot place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
/mob/living/carbon/metroid/proc/adjust_body_temperature(current, loc_temp, boost)
|
||||
var/temperature = current
|
||||
var/difference = abs(current-loc_temp) //get difference
|
||||
var/increments// = difference/10 //find how many increments apart they are
|
||||
if(difference > 50)
|
||||
increments = difference/5
|
||||
else
|
||||
increments = difference/10
|
||||
var/change = increments*boost // Get the amount to change by (x per increment)
|
||||
var/temp_change
|
||||
if(current < loc_temp)
|
||||
temperature = min(loc_temp, temperature+change)
|
||||
else if(current > loc_temp)
|
||||
temperature = max(loc_temp, temperature-change)
|
||||
temp_change = (temperature - current)
|
||||
return temp_change
|
||||
|
||||
/*
|
||||
if(stat==2)
|
||||
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
/mob/living/carbon/metroid/proc/handle_chemicals_in_body()
|
||||
|
||||
*/
|
||||
//Account for massive pressure differences
|
||||
|
||||
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
|
||||
if(bodytemperature <= (T0C - 40)) // stun temperature
|
||||
Tempstun = 1
|
||||
|
||||
if(bodytemperature <= (T0C - 50)) // hurt temperature
|
||||
if(bodytemperature <= 50) // sqrting negative numbers is bad
|
||||
adjustFireLoss(200)
|
||||
else
|
||||
adjustFireLoss(round(sqrt(bodytemperature)) * 2)
|
||||
|
||||
else
|
||||
Tempstun = 0
|
||||
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
|
||||
adjust_body_temperature(current, loc_temp, boost)
|
||||
var/temperature = current
|
||||
var/difference = abs(current-loc_temp) //get difference
|
||||
var/increments// = difference/10 //find how many increments apart they are
|
||||
if(difference > 50)
|
||||
increments = difference/5
|
||||
else
|
||||
increments = difference/10
|
||||
var/change = increments*boost // Get the amount to change by (x per increment)
|
||||
var/temp_change
|
||||
if(current < loc_temp)
|
||||
temperature = min(loc_temp, temperature+change)
|
||||
else if(current > loc_temp)
|
||||
temperature = max(loc_temp, temperature-change)
|
||||
temp_change = (temperature - current)
|
||||
return temp_change
|
||||
src.updatehealth()
|
||||
|
||||
handle_chemicals_in_body()
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
src.updatehealth()
|
||||
/mob/living/carbon/metroid/proc/handle_regular_status_updates()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
else
|
||||
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
else
|
||||
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
|
||||
|
||||
|
||||
if(health < config.health_threshold_dead && stat != 2)
|
||||
death()
|
||||
return
|
||||
if(health < config.health_threshold_dead && stat != 2)
|
||||
death()
|
||||
return
|
||||
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
// if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
// if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(10)
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(10)
|
||||
|
||||
if(src.stat != DEAD) src.stat = UNCONSCIOUS
|
||||
if(src.stat != DEAD) src.stat = UNCONSCIOUS
|
||||
|
||||
if(prob(30))
|
||||
adjustOxyLoss(-1)
|
||||
adjustToxLoss(-1)
|
||||
adjustFireLoss(-1)
|
||||
adjustCloneLoss(-1)
|
||||
adjustBruteLoss(-1)
|
||||
if(prob(30))
|
||||
adjustOxyLoss(-1)
|
||||
adjustToxLoss(-1)
|
||||
adjustFireLoss(-1)
|
||||
adjustCloneLoss(-1)
|
||||
adjustBruteLoss(-1)
|
||||
|
||||
|
||||
if (src.stat == DEAD)
|
||||
if (src.stat == DEAD)
|
||||
|
||||
src.lying = 1
|
||||
src.blinded = 1
|
||||
src.lying = 1
|
||||
src.blinded = 1
|
||||
|
||||
else
|
||||
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 0
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
else
|
||||
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 0
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
|
||||
else
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
else
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
|
||||
if (src.stuttering) src.stuttering = 0
|
||||
if (src.stuttering) src.stuttering = 0
|
||||
|
||||
if (src.eye_blind)
|
||||
src.eye_blind = 0
|
||||
src.blinded = 1
|
||||
if (src.eye_blind)
|
||||
src.eye_blind = 0
|
||||
src.blinded = 1
|
||||
|
||||
if (src.ear_deaf > 0) src.ear_deaf = 0
|
||||
if (src.ear_damage < 25)
|
||||
src.ear_damage = 0
|
||||
if (src.ear_deaf > 0) src.ear_deaf = 0
|
||||
if (src.ear_damage < 25)
|
||||
src.ear_damage = 0
|
||||
|
||||
src.density = !( src.lying )
|
||||
src.density = !( src.lying )
|
||||
|
||||
if (src.sdisabilities & BLIND)
|
||||
src.blinded = 1
|
||||
if (src.sdisabilities & DEAF)
|
||||
src.ear_deaf = 1
|
||||
if (src.sdisabilities & BLIND)
|
||||
src.blinded = 1
|
||||
if (src.sdisabilities & DEAF)
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry = 0
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry = 0
|
||||
|
||||
if (src.druggy > 0)
|
||||
src.druggy = 0
|
||||
if (src.druggy > 0)
|
||||
src.druggy = 0
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
|
||||
handle_nutrition()
|
||||
/mob/living/carbon/metroid/proc/handle_nutrition()
|
||||
|
||||
if(prob(20))
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) nutrition-=rand(4,6)
|
||||
else nutrition-=rand(2,3)
|
||||
if(prob(20))
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) nutrition-=rand(4,6)
|
||||
else nutrition-=rand(2,3)
|
||||
|
||||
if(nutrition <= 0)
|
||||
nutrition = 0
|
||||
if(prob(75))
|
||||
if(nutrition <= 0)
|
||||
nutrition = 0
|
||||
if(prob(75))
|
||||
|
||||
adjustToxLoss(rand(0,5))
|
||||
adjustToxLoss(rand(0,5))
|
||||
|
||||
else
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(nutrition >= 1000)
|
||||
if(prob(40)) amount_grown++
|
||||
else
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(nutrition >= 1000)
|
||||
if(prob(40)) amount_grown++
|
||||
|
||||
else
|
||||
if(nutrition >= 800)
|
||||
if(prob(40)) amount_grown++
|
||||
|
||||
//lay eggs or grow
|
||||
if(amount_grown >= 10 && !Victim && !Target)
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!client && nutrition >= 1000)
|
||||
var/number = pick(1,1,1,1,1,1,2,2,2,3) //number of eggs laid
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/roro_egg/E
|
||||
for(var/i=1,i<=number,i++)
|
||||
E = new/obj/item/weapon/reagent_containers/food/snacks/roro_egg(loc)
|
||||
src.nutrition -= 200
|
||||
step_away(E,src)
|
||||
|
||||
else
|
||||
if(!client)
|
||||
var/mob/living/carbon/metroid/adult/A = new/mob/living/carbon/metroid/adult(src.loc)
|
||||
A.nutrition = nutrition
|
||||
A.nutrition += 100
|
||||
A.powerlevel = max(0, powerlevel-1)
|
||||
A.Friends = Friends
|
||||
A.tame = tame
|
||||
A.rabid = rabid
|
||||
del(src)
|
||||
|
||||
|
||||
handle_virus_updates()
|
||||
if(bodytemperature > 406)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
return
|
||||
|
||||
handle_targets()
|
||||
if(Tempstun)
|
||||
if(!Victim) // not while they're eating!
|
||||
canmove = 0
|
||||
else
|
||||
canmove = 1
|
||||
|
||||
if(attacked > 50) attacked = 50
|
||||
|
||||
if(attacked > 0)
|
||||
if(prob(85))
|
||||
attacked--
|
||||
|
||||
if(Discipline > 0)
|
||||
|
||||
if(Discipline >= 5 && rabid)
|
||||
if(prob(60)) rabid = 0
|
||||
|
||||
if(prob(10))
|
||||
Discipline--
|
||||
else
|
||||
if(nutrition >= 800)
|
||||
if(prob(40)) amount_grown++
|
||||
|
||||
//lay eggs or grow
|
||||
if(amount_grown >= 10 && !Victim && !Target)
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!client && nutrition >= 1000)
|
||||
var/number = pick(1,1,1,1,1,1,2,2,2,3) //number of eggs laid
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/egg/roro/E
|
||||
for(var/i=1,i<=number,i++)
|
||||
E = new(loc)
|
||||
src.nutrition -= 200
|
||||
step_away(E,src)
|
||||
|
||||
else
|
||||
if(!client)
|
||||
var/mob/living/carbon/metroid/adult/A = new/mob/living/carbon/metroid/adult(src.loc)
|
||||
A.nutrition = nutrition
|
||||
A.nutrition += 100
|
||||
A.powerlevel = max(0, powerlevel-1)
|
||||
A.Friends = Friends
|
||||
A.tame = tame
|
||||
A.rabid = rabid
|
||||
del(src)
|
||||
|
||||
if(!canmove) return
|
||||
/mob/living/carbon/metroid/proc/handle_virus_updates()
|
||||
if(bodytemperature > 406)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
return
|
||||
|
||||
// DO AI STUFF HERE
|
||||
/mob/living/carbon/metroid/proc/handle_targets()
|
||||
if(Tempstun)
|
||||
if(!Victim) // not while they're eating!
|
||||
canmove = 0
|
||||
else
|
||||
canmove = 1
|
||||
|
||||
if(Target)
|
||||
if(attacked <= 0)
|
||||
Target = null
|
||||
if(attacked > 50) attacked = 50
|
||||
|
||||
if(Victim) return // if it's eating someone already, continue eating!
|
||||
if(attacked > 0)
|
||||
if(prob(85))
|
||||
attacked--
|
||||
|
||||
if(Discipline > 0)
|
||||
|
||||
if(Discipline >= 5 && rabid)
|
||||
if(prob(60)) rabid = 0
|
||||
|
||||
if(prob(10))
|
||||
Discipline--
|
||||
|
||||
|
||||
if(prob(5))
|
||||
emote(pick("click","chatter","sway","light","vibrate","chatter","shriek"))
|
||||
if(!client)
|
||||
|
||||
if(AIproc && SStun) return
|
||||
if(!canmove) return
|
||||
|
||||
// DO AI STUFF HERE
|
||||
|
||||
if(Target)
|
||||
if(attacked <= 0)
|
||||
Target = null
|
||||
|
||||
if(Victim) return // if it's eating someone already, continue eating!
|
||||
|
||||
|
||||
var/hungry = 0 // determines if the metroid is hungry
|
||||
var/starving = 0 // determines if the metroid is starving-hungry
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) // 1200 max nutrition
|
||||
switch(nutrition)
|
||||
if(601 to 900)
|
||||
if(prob(25)) hungry = 1//Ensures they continue eating, but aren't as aggressive at the same time
|
||||
if(301 to 600) hungry = 1
|
||||
if(0 to 300)
|
||||
starving = 1
|
||||
if(prob(5))
|
||||
emote(pick("click","chatter","sway","light","vibrate","chatter","shriek"))
|
||||
|
||||
else
|
||||
switch(nutrition) // 1000 max nutrition
|
||||
if(501 to 700)
|
||||
if(prob(25)) hungry = 1
|
||||
if(201 to 500) hungry = 1
|
||||
if(0 to 200) starving = 1
|
||||
if(AIproc && SStun) return
|
||||
|
||||
|
||||
if(starving && !client) // if a metroid is starving, it starts losing its friends
|
||||
if(Friends.len > 0 && prob(1))
|
||||
var/mob/nofriend = pick(Friends)
|
||||
Friends -= nofriend
|
||||
var/hungry = 0 // determines if the metroid is hungry
|
||||
var/starving = 0 // determines if the metroid is starving-hungry
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) // 1200 max nutrition
|
||||
switch(nutrition)
|
||||
if(601 to 900)
|
||||
if(prob(25)) hungry = 1//Ensures they continue eating, but aren't as aggressive at the same time
|
||||
if(301 to 600) hungry = 1
|
||||
if(0 to 300)
|
||||
starving = 1
|
||||
|
||||
if(!Target)
|
||||
var/list/targets = list()
|
||||
else
|
||||
switch(nutrition) // 1000 max nutrition
|
||||
if(501 to 700)
|
||||
if(prob(25)) hungry = 1
|
||||
if(201 to 500) hungry = 1
|
||||
if(0 to 200) starving = 1
|
||||
|
||||
if(hungry || starving) //Only add to the list if we need to
|
||||
for(var/mob/living/L in view(7,src))
|
||||
|
||||
//Ignore other metroids, dead mobs and simple_animals
|
||||
if(ismetroid(L) || L.stat == DEAD || isanimal(L))
|
||||
if(starving && !client) // if a metroid is starving, it starts losing its friends
|
||||
if(Friends.len > 0 && prob(1))
|
||||
var/mob/nofriend = pick(Friends)
|
||||
Friends -= nofriend
|
||||
|
||||
if(!Target)
|
||||
var/list/targets = list()
|
||||
|
||||
if(hungry || starving) //Only add to the list if we need to
|
||||
for(var/mob/living/L in view(7,src))
|
||||
|
||||
//Ignore other metroids, dead mobs and simple_animals
|
||||
if(ismetroid(L) || L.stat != CONSCIOUS || isanimal(L))
|
||||
continue
|
||||
|
||||
if(issilicon(L))
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
|
||||
if(!starving && Discipline > 0)
|
||||
continue
|
||||
|
||||
if(issilicon(L))
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
|
||||
if(!starving && Discipline > 0)
|
||||
continue
|
||||
if(tame) //Tame metroids ignore electronic life
|
||||
continue
|
||||
|
||||
if(tame) //Tame metroids ignore electronic life
|
||||
targets += L //Possible target found!
|
||||
|
||||
else if(iscarbon(L))
|
||||
|
||||
if(istype(L, /mob/living/carbon/human)) //Ignore metroid(wo)men
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.dna)
|
||||
if(H.dna.mutantrace == "metroid")
|
||||
continue
|
||||
|
||||
targets += L //Possible target found!
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
|
||||
if(!starving && Discipline > 0)
|
||||
continue
|
||||
|
||||
else if(iscarbon(L))
|
||||
if(L in Friends) //No eating friends!
|
||||
continue
|
||||
|
||||
if(istype(L, /mob/living/carbon/human)) //Ignore metroid(wo)men
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.dna)
|
||||
if(H.dna.mutantrace == "metroid")
|
||||
continue
|
||||
if(tame && ishuman(L)) //Tame metroids dont eat people.
|
||||
continue
|
||||
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
|
||||
if(!starving && Discipline > 0)
|
||||
continue
|
||||
if(!L.canmove) //Only one metroid can latch on at a time.
|
||||
|
||||
if(L in Friends) //No eating friends!
|
||||
continue
|
||||
var/notarget = 0
|
||||
for(var/mob/living/carbon/metroid/M in view(1,L))
|
||||
if(M.Victim == L)
|
||||
notarget = 1
|
||||
if(notarget)
|
||||
continue
|
||||
|
||||
if(tame && ishuman(L)) //Tame metroids dont eat people.
|
||||
continue
|
||||
|
||||
if(!L.canmove) //Only one metroid can latch on at a time.
|
||||
|
||||
var/notarget = 0
|
||||
for(var/mob/living/carbon/metroid/M in view(1,L))
|
||||
if(M.Victim == L)
|
||||
notarget = 1
|
||||
if(notarget)
|
||||
continue
|
||||
|
||||
targets += L //Possible target found!
|
||||
targets += L //Possible target found!
|
||||
|
||||
|
||||
|
||||
if((hungry || starving) && targets.len > 0)
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!starving)
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
if(!Discipline && prob(5))
|
||||
if(ishuman(C))
|
||||
Target = C
|
||||
break
|
||||
if(isalienadult(C))
|
||||
Target = C
|
||||
break
|
||||
|
||||
if(islarva(C))
|
||||
Target = C
|
||||
break
|
||||
if(ismonkey(C))
|
||||
Target = C
|
||||
break
|
||||
else
|
||||
Target = targets[1]
|
||||
else
|
||||
Target = targets[1] // closest target
|
||||
|
||||
if(targets.len > 0)
|
||||
if(attacked > 0 || rabid)
|
||||
Target = targets[1] //closest mob probably attacked it, so override Target and attack the nearest!
|
||||
|
||||
|
||||
if(!Target)
|
||||
if(hungry || starving)
|
||||
if(canmove && isturf(loc) && prob(50))
|
||||
step(src, pick(cardinal))
|
||||
if((hungry || starving) && targets.len > 0)
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!starving)
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
if(!Discipline && prob(5))
|
||||
if(ishuman(C))
|
||||
Target = C
|
||||
break
|
||||
if(isalienadult(C))
|
||||
Target = C
|
||||
break
|
||||
|
||||
if(islarva(C))
|
||||
Target = C
|
||||
break
|
||||
if(ismonkey(C))
|
||||
Target = C
|
||||
break
|
||||
else
|
||||
if(canmove && isturf(loc) && prob(33))
|
||||
step(src, pick(cardinal))
|
||||
Target = targets[1]
|
||||
else
|
||||
if(!AIproc)
|
||||
spawn() AIprocess()
|
||||
Target = targets[1] // closest target
|
||||
|
||||
if(targets.len > 0)
|
||||
if(attacked > 0 || rabid)
|
||||
Target = targets[1] //closest mob probably attacked it, so override Target and attack the nearest!
|
||||
|
||||
|
||||
if(!Target)
|
||||
if(hungry || starving)
|
||||
if(canmove && isturf(loc) && prob(50))
|
||||
step(src, pick(cardinal))
|
||||
|
||||
else
|
||||
if(canmove && isturf(loc) && prob(33))
|
||||
step(src, pick(cardinal))
|
||||
else
|
||||
if(!AIproc)
|
||||
spawn() AIprocess()
|
||||
|
||||
@@ -189,6 +189,10 @@
|
||||
stat(null,"Power Level: [powerlevel]")
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/adjustFireLoss(amount)
|
||||
..(-abs(amount)) // Heals them
|
||||
return
|
||||
|
||||
/mob/living/carbon/metroid/bullet_act(var/obj/item/projectile/Proj)
|
||||
attacked += 10
|
||||
..(Proj)
|
||||
@@ -659,7 +663,7 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
|
||||
/mob/living/carbon/metroid/show_inv(mob/user as mob)
|
||||
|
||||
user.machine = src
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR><BR>
|
||||
@@ -783,7 +787,7 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
var/Flush = 30
|
||||
var/Uses = 5 // uses before it goes inert
|
||||
|
||||
New()
|
||||
/obj/item/metroid_core/New()
|
||||
..()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
@@ -791,7 +795,7 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
POWERFLAG = rand(1,10)
|
||||
Uses = rand(7, 25)
|
||||
//flags |= NOREACT
|
||||
|
||||
/*
|
||||
spawn()
|
||||
Life()
|
||||
|
||||
@@ -802,8 +806,9 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
if(Flush <= 0)
|
||||
reagents.clear_reagents()
|
||||
Flush = 30
|
||||
*/
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/roro_egg
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro
|
||||
name = "roro egg"
|
||||
desc = "A small, gelatinous egg."
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
@@ -812,32 +817,37 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
origin_tech = "biotech=4"
|
||||
var/grown = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 5)
|
||||
spawn(rand(1200,1500))//the egg takes a while to "ripen"
|
||||
Grow()
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 4)
|
||||
reagents.add_reagent("rorojelly", 1)
|
||||
spawn(rand(1200,1500))//the egg takes a while to "ripen"
|
||||
Grow()
|
||||
|
||||
proc/Grow()
|
||||
grown = 1
|
||||
icon_state = "roro egg-grown"
|
||||
processing_objects.Add(src)
|
||||
return
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/proc/Grow()
|
||||
grown = 1
|
||||
icon_state = "roro egg-grown"
|
||||
processing_objects.Add(src)
|
||||
return
|
||||
|
||||
proc/Hatch()
|
||||
processing_objects.Remove(src)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/O in hearers(T))
|
||||
O.show_message("\blue The [name] pulsates and quivers!")
|
||||
spawn(rand(50,100))
|
||||
for(var/mob/O in hearers(T))
|
||||
O.show_message("\blue The [name] bursts open!")
|
||||
new/mob/living/carbon/metroid(T)
|
||||
del(src)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/proc/Hatch()
|
||||
processing_objects.Remove(src)
|
||||
var/turf/T = get_turf(src)
|
||||
src.visible_message("\blue The [name] pulsates and quivers!")
|
||||
spawn(rand(50,100))
|
||||
src.visible_message("\blue The [name] bursts open!")
|
||||
new/mob/living/carbon/metroid(T)
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/roro_egg/process()
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/process()
|
||||
var/turf/location = get_turf(src)
|
||||
var/datum/gas_mixture/environment = location.return_air()
|
||||
if (environment.toxins > MOLES_PLASMA_VISIBLE)//plasma exposure causes the egg to hatch
|
||||
src.Hatch()
|
||||
src.Hatch()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype( W, /obj/item/toy/crayon ))
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user