Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into sync_to_bay_10/10/2015

Conflicts:
	.travis.yml
	code/game/gamemodes/changeling/changeling_powers.dm
	code/game/gamemodes/changeling/modularchangling.dm
	code/game/turfs/simulated.dm
	code/global.dm
	icons/misc/fullscreen.dmi
	polaris.dme
This commit is contained in:
Neerti
2015-10-10 23:17:26 -04:00
415 changed files with 10938 additions and 11366 deletions
+20 -6
View File
@@ -349,6 +349,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
var/bdcolor = "#ffdddd" //banned dark
var/ulcolor = "#eeffee" //unbanned light
var/udcolor = "#ddffdd" //unbanned dark
var/alcolor = "#eeeeff" // auto-unbanned light
var/adcolor = "#ddddff" // auto-unbanned dark
output += "<table width='90%' bgcolor='#e3e3e3' cellpadding='5' cellspacing='0' align='center'>"
output += "<tr>"
@@ -400,6 +402,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits, ip, computerid FROM erro_ban WHERE 1 [playersearch] [adminsearch] [ipsearch] [cidsearch] [bantypesearch] ORDER BY bantime DESC LIMIT 100")
select_query.Execute()
var/now = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") // MUST BE the same format as SQL gives us the dates in, and MUST be least to most specific (i.e. year, month, day not day, month, year)
while(select_query.NextRow())
var/banid = select_query.item[1]
var/bantime = select_query.item[2]
@@ -417,36 +421,42 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
var/ip = select_query.item[14]
var/cid = select_query.item[15]
// true if this ban has expired
var/auto = (bantype in list("TEMPBAN", "JOB_TEMPBAN")) && now > expiration // oh how I love ISO 8601 (ish) date strings
var/lcolor = blcolor
var/dcolor = bdcolor
if(unbanned)
lcolor = ulcolor
dcolor = udcolor
else if(auto)
lcolor = alcolor
dcolor = adcolor
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>"
typedesc = "<b>TEMPBAN</b><br><font size='2'>([duration] minutes) [(unbanned || auto) ? "" : "(<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])"
typedesc = "<b>JOBBAN</b><br><font size='2'>([job])</font>"
if("JOB_TEMPBAN")
typedesc = "<b>TEMP JOBBAN</b><br><font size='2'>([job])<br>([duration] minutes<br>Expires [expiration]"
typedesc = "<b>TEMP JOBBAN</b><br><font size='2'>([job])<br>([duration] minutes<br>Expires [expiration]</font>"
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 += "<td align='center'>[(unbanned || auto) ? "" : "<b><a href=\"byond://?src=\ref[src];dbbanedit=unban;dbbanid=[banid]\">Unban</a></b>"]</td>"
output += "</tr>"
output += "<tr bgcolor='[dcolor]'>"
output += "<td align='center' colspan='2' bgcolor=''><b>IP:</b> [ip]</td>"
output += "<td align='center' colspan='3' bgcolor=''><b>CIP:</b> [cid]</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 += "<td align='center' colspan='5'><b>Reason: [(unbanned || auto) ? "" : "(<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]'>"
@@ -459,10 +469,14 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
output += "<tr bgcolor='[dcolor]'>"
output += "<td align='center' colspan='5' bgcolor=''><b>UNBANNED by admin [unbanckey] on [unbantime]</b></td>"
output += "</tr>"
else if(auto)
output += "<tr bgcolor='[dcolor]'>"
output += "<td align='center' colspan='5' bgcolor=''><b>EXPIRED at [expiration]</b></td>"
output += "</tr>"
output += "<tr>"
output += "<td colspan='5' bgcolor='white'>&nbsp</td>"
output += "</tr>"
output += "</table></div>"
usr << browse(output,"window=lookupbans;size=900x700")
usr << browse(output,"window=lookupbans;size=900x700")
+7 -6
View File
@@ -58,7 +58,7 @@ proc/admin_notice(var/message, var/rights)
<a href='?src=\ref[src];traitor=\ref[M]'>TP</a> -
<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a> -
<a href='?src=\ref[src];subtlemessage=\ref[M]'>SM</a> -
[admin_jump_link(M, src)]\] </b><br>
[admin_jump_link(M, src)]\] <br>
<b>Mob type</b> = [M.type]<br><br>
<A href='?src=\ref[src];boot2=\ref[M]'>Kick</A> |
<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> |
@@ -335,7 +335,7 @@ proc/admin_notice(var/message, var/rights)
if(0)
dat += {"Welcome to the admin newscaster.<BR> Here you can add, edit and censor every newspiece on the network.
<BR>Feed channels and stories entered through here will be uneditable and handled as official news by the rest of the units.
<BR>Note that this panel allows full freedom over the news network, there are no constrictions except the few basic ones. Don't break things!</FONT>
<BR>Note that this panel allows full freedom over the news network, there are no constrictions except the few basic ones. Don't break things!
"}
if(news_network.wanted_issue)
dat+= "<HR><A href='?src=\ref[src];ac_view_wanted=1'>Read Wanted Issue</A>"
@@ -420,7 +420,7 @@ proc/admin_notice(var/message, var/rights)
if(src.admincaster_feed_channel.censored)
dat+={"
<FONT COLOR='red'><B>ATTENTION: </B></FONT>This channel has been deemed as threatening to the welfare of the station, and marked with a [company_name] D-Notice.<BR>
No further feed story additions are allowed while the D-Notice is in effect.</FONT><BR><BR>
No further feed story additions are allowed while the D-Notice is in effect.<BR><BR>
"}
else
if( isemptylist(src.admincaster_feed_channel.messages) )
@@ -487,7 +487,7 @@ proc/admin_notice(var/message, var/rights)
if(src.admincaster_feed_channel.censored)
dat+={"
<FONT COLOR='red'><B>ATTENTION: </B></FONT>This channel has been deemed as threatening to the welfare of the station, and marked with a [company_name] D-Notice.<BR>
No further feed story additions are allowed while the D-Notice is in effect.</FONT><BR><BR>
No further feed story additions are allowed while the D-Notice is in effect.<BR><BR>
"}
else
if( isemptylist(src.admincaster_feed_channel.messages) )
@@ -634,7 +634,7 @@ proc/admin_notice(var/message, var/rights)
if(confirm == "Cancel")
return
if(confirm == "Yes")
world << "\red <b>Restarting world!</b> \blue Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!"
world << "<span class='danger'>Restarting world!</span> <span class='notice'>Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!</span>"
log_admin("[key_name(usr)] initiated a reboot.")
feedback_set_details("end_error","admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]")
@@ -657,7 +657,8 @@ proc/admin_notice(var/message, var/rights)
if(message)
if(!check_rights(R_SERVER,0))
message = sanitize(message, 500, extra = 0)
world << "\blue <b>[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:</b>\n \t [message]"
message = replacetext(message, "\n", "<br>") // required since we're putting it in a <p> tag
world << "<span class=notice><b>[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:</b><p style='text-indent: 50px'>[message]</p></span>"
log_admin("Announce: [key_name(usr)] : [message]")
feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+180 -180
View File
@@ -1,180 +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
// 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!</b>"
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
+6 -3
View File
@@ -183,6 +183,7 @@ var/list/admin_verbs_debug = list(
/client/proc/show_plant_genes,
/client/proc/enable_debug_verbs,
/client/proc/callproc,
/client/proc/callproc_target,
/client/proc/toggledebuglogs,
/client/proc/SDQL_query,
/client/proc/SDQL2_query,
@@ -194,6 +195,7 @@ var/list/admin_verbs_debug = list(
var/list/admin_verbs_paranoid_debug = list(
/client/proc/callproc,
/client/proc/callproc_target,
/client/proc/debug_controller
)
@@ -263,6 +265,7 @@ var/list/admin_verbs_hideable = list(
/client/proc/restart_controller,
/client/proc/cmd_admin_list_open_jobs,
/client/proc/callproc,
/client/proc/callproc_target,
/client/proc/Debug2,
/client/proc/reload_admins,
/client/proc/kill_air,
@@ -408,7 +411,7 @@ var/list/admin_verbs_mentor = list(
var/mob/dead/observer/ghost = body.ghostize(1)
ghost.admin_ghosted = 1
if(body)
body.aghosted = ghost
body.teleop = ghost
if(!body.key)
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
feedback_add_details("admin_verb","O") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -546,8 +549,8 @@ var/list/admin_verbs_mentor = list(
ban_unban_log_save("[ckey] warned [warned_ckey], resulting in a [AUTOBANTIME] minute autoban.")
if(C)
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban.")
C << "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes."
qdel(C)
C << "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.</font>"
del(C)
else
message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban.")
AddBan(warned_ckey, D.last_id, "Autobanning due to too many formal warnings", ckey, 1, AUTOBANTIME)
+152
View File
@@ -0,0 +1,152 @@
/client/proc/callproc()
set category = "Debug"
set name = "Advanced ProcCall"
if(!check_rights(R_DEBUG)) return
if(config.debugparanoid && !check_rights(R_ADMIN)) return
var/target = null
var/targetselected = 0
switch(alert("Proc owned by something?",, "Yes", "No", "Cancel"))
if("Yes")
targetselected=1
switch(input("Proc owned by...", "Owner", null) as null|anything in list("Obj", "Mob", "Area or Turf", "Client"))
if("Obj")
target = input("Select target:", "Target") as null|obj in world
if("Mob")
target = input("Select target:", "Target", usr) as null|mob in world
if("Area or Turf")
target = input("Select target:", "Target", get_turf(usr)) as null|area|turf in world
if("Client")
target = input("Select target:", "Target", usr.client) as null|anything in clients
else
return
if(!target)
usr << "Proc call cancelled."
return
if("Cancel")
return
if("No")
; // do nothing
callproc_targetpicked(targetselected, target)
/client/proc/callproc_target(atom/A in world)
set category = "Debug"
set name = "Advanced ProcCall Target"
if(!check_rights(R_DEBUG)) return
if(config.debugparanoid && !check_rights(R_ADMIN)) return
callproc_targetpicked(1, A)
/client/proc/callproc_targetpicked(hastarget, datum/target)
// this needs checking again here because VV's 'Call Proc' option directly calls this proc with the target datum
if(!check_rights(R_DEBUG)) return
if(config.debugparanoid && !check_rights(R_ADMIN)) return
var/returnval = null
var/procname = input("Proc name", "Proc") as null|text
if(!procname) return
if(hastarget)
if(!target)
usr << "Your callproc target no longer exists."
return
if(!hascall(target, procname))
usr << "\The [target] has no call [procname]()"
return
var/list/arguments = list()
var/done = 0
var/current = null
while(!done)
if(hastarget && !target)
usr << "Your callproc target no longer exists."
return
switch(input("Type of [arguments.len+1]\th variable", "argument [arguments.len+1]") as null|anything in list(
"finished", "null", "text", "num", "type", "obj reference", "mob reference",
"area/turf reference", "icon", "file", "client", "mob's area", "marked datum"))
if(null)
return
if("finished")
done = 1
if("null")
current = null
if("text")
current = input("Enter text for [arguments.len+1]\th argument") as null|text
if(isnull(current)) return
if("num")
current = input("Enter number for [arguments.len+1]\th argument") as null|num
if(isnull(current)) return
if("type")
current = input("Select type for [arguments.len+1]\th argument") as null|anything in typesof(/obj, /mob, /area, /turf)
if(isnull(current)) return
if("obj reference")
current = input("Select object for [arguments.len+1]\th argument") as null|obj in world
if(isnull(current)) return
if("mob reference")
current = input("Select mob for [arguments.len+1]\th argument") as null|mob in world
if(isnull(current)) return
if("area/turf reference")
current = input("Select area/turf for [arguments.len+1]\th argument") as null|area|turf in world
if(isnull(current)) return
if("icon")
current = input("Provide icon for [arguments.len+1]\th argument") as null|icon
if(isnull(current)) return
if("client")
current = input("Select client for [arguments.len+1]\th argument") as null|anything in clients
if(isnull(current)) return
if("mob's area")
var/mob/M = input("Select mob to take area for [arguments.len+1]\th argument") as null|mob in world
if(!M) return
current = get_area(M)
if(!current)
switch(alert("\The [M] appears to not have an area; do you want to pass null instead?",, "Yes", "Cancel"))
if("Yes")
; // do nothing
if("Cancel")
return
if("marked datum")
current = holder.marked_datum
if(!current)
switch(alert("You do not currently have a marked datum; do you want to pass null instead?",, "Yes", "Cancel"))
if("Yes")
; // do nothing
if("Cancel")
return
if(!done)
arguments += current
if(hastarget)
if(!target)
usr << "Your callproc target no longer exists."
return
log_admin("[key_name(src)] called [target]'s [procname]() with [arguments.len ? "the arguments [list2params(arguments)]" : "no arguments"].")
if(arguments.len)
returnval = call(target, procname)(arglist(arguments))
else
returnval = call(target, procname)()
else
log_admin("[key_name(src)] called [procname]() with [arguments.len ? "the arguments [list2params(arguments)]" : "no arguments"].")
returnval = call(procname)(arglist(arguments))
usr << "<span class='info'>[procname]() returned: [isnull(returnval) ? "null" : returnval]</span>"
feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+13 -3
View File
@@ -1,10 +1,17 @@
/datum/admins/proc/capture_map(tx as num, ty as num, tz as num, range as num)
/datum/admins/proc/capture_map(tx as null|num, ty as null|num, tz as null|num, range as null|num)
set category = "Server"
set name = "Capture Map Part"
set desc = "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range (captures part of a map originating from bottom left corner)"
if(!check_rights(R_ADMIN|R_DEBUG|R_SERVER))
return
if(isnull(tx) || isnull(ty) || isnull(tz) || isnull(range))
usr << "Capture Map Part, captures part of a map using camara like rendering."
usr << "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range"
usr << "Target coordinates specify bottom left corner of the capture, range defines render distance to opposite corner."
return
if(range > 32 || range <= 0)
usr << "Capturing range is incorrect, it must be within 1-32."
return
@@ -45,5 +52,8 @@
var/yoff = (A.y - ty) * 32
cap.Blend(img, blendMode2iconMode(A.blend_mode), A.pixel_x + xoff, A.pixel_y + yoff)
usr << browse_rsc(cap, "map_capture_x[tx]_y[ty]_z[tz]_r[range].png")
var/file_name = "map_capture_x[tx]_y[ty]_z[tz]_r[range].png"
usr << "Saved capture in cache as [file_name]."
usr << browse_rsc(cap, file_name)
else
usr << "Target coordinates are incorrect."
@@ -33,7 +33,7 @@
output += "<tr>"
output += "<td style='text-align:right;'>[adm_ckey] <a class='small' href='?src=\ref[src];editrights=remove;ckey=[adm_ckey]'>\[-\]</a></td>"
output += "<td><a href='?src=\ref[src];editrights=rank;ckey=[adm_ckey]'>[rank]</a></td>"
output += "<td><a class='small' href='?src=\ref[src];editrights=permissions;ckey=[adm_ckey]'>[rights]</a></font></td>"
output += "<td><a class='small' href='?src=\ref[src];editrights=permissions;ckey=[adm_ckey]'>[rights]</a></td>"
output += "</tr>"
output += {"
+2 -2
View File
@@ -106,7 +106,7 @@ datum/admins/proc/notes_gethtml(var/ckey)
message_admins("\blue [key_name_admin(user)] has edited [key]'s notes.")
log_admin("[key_name(user)] has edited [key]'s notes.")
qdel(info)
del(info) // savefile, so NOT qdel
//Updating list of keys with notes on them
var/savefile/note_list = new("data/player_notes.sav")
@@ -115,7 +115,7 @@ datum/admins/proc/notes_gethtml(var/ckey)
if(!note_keys) note_keys = list()
if(!note_keys.Find(key)) note_keys += key
note_list << note_keys
qdel(note_list)
del(note_list) // savefile, so NOT qdel
/proc/notes_del(var/key, var/index)
+1 -1
View File
@@ -290,7 +290,7 @@
<a id='link[i]'
onmouseover='expand("item[i]","[M_job]","[M_name]","[M_rname]","--unused--","[M_key]","[M.lastKnownIP]",[is_antagonist],"\ref[M]")'
>
<b id='search[i]'>[M_name] - [M_rname] - [M_key] ([M_job])</b>
<span id='search><b>[i]'>[M_name] - [M_rname] - [M_key] ([M_job])</b></span>
</a>
<br><span id='item[i]'></span>
</td>
@@ -6,7 +6,7 @@
if(!.)
return
var/dat = "<B>Bombing List<HR>"
var/dat = "<B>Bombing List</B>"
for(var/l in bombers)
dat += text("[l]<BR>")
user << browse(dat, "window=bombers")
+2 -2
View File
@@ -85,7 +85,7 @@
banreason = "[banreason] (CUSTOM CID)"
else
message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom ip and computer id fields replaced with the ip and computer id from the located mob")
notes_add(playermob.ckey,banreason,usr)
notes_add(banckey,banreason,usr)
DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey, banip, bancid )
@@ -1334,7 +1334,7 @@
src.owner << "You sent [input] to [L] via a secure channel."
log_admin("[src.owner] replied to [key_name(L)]'s Centcomm message with the message [input].")
message_admins("[src.owner] replied to [key_name(L)]'s Centcom message with: \"[input]\"")
if(!L.isMobAI())
if(!isAI(L))
L << "<span class='info'>You hear something crackle in your headset for a moment before a voice speaks.</span>"
L << "<span class='info'>Please stand by for a message from Central Command.</span>"
L << "<span class='info'>Message as follows.</span>"
+1 -133
View File
@@ -14,139 +14,7 @@
feedback_add_details("admin_verb","DG2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/* 21st Sept 2010
Updated by Skie -- Still not perfect but better!
Stuff you can't do:
Call proc /mob/proc/make_dizzy() for some player
Because if you select a player mob as owner it tries to do the proc for
/mob/living/carbon/human/ instead. And that gives a run-time error.
But you can call procs that are of type /mob/living/carbon/human/proc/ for that player.
*/
/client/proc/callproc()
set category = "Debug"
set name = "Advanced ProcCall"
if(!check_rights(R_DEBUG)) return
if(config.debugparanoid && !check_rights(R_ADMIN)) return
spawn(0)
var/target = null
var/targetselected = 0
var/lst[] // List reference
lst = new/list() // Make the list
var/returnval = null
var/class = null
switch(alert("Proc owned by something?",,"Yes","No"))
if("Yes")
targetselected = 1
class = input("Proc owned by...","Owner",null) as null|anything in list("Obj","Mob","Area or Turf","Client")
switch(class)
if("Obj")
target = input("Enter target:","Target",usr) as obj in world
if("Mob")
target = input("Enter target:","Target",usr) as mob in world
if("Area or Turf")
target = input("Enter target:","Target",usr.loc) as area|turf in world
if("Client")
var/list/keys = list()
for(var/client/C)
keys += C
target = input("Please, select a player!", "Selection", null, null) as null|anything in keys
else
return
if("No")
target = null
targetselected = 0
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
if(!procname) return
if(targetselected)
if(!target)
usr << "<span class='danger'>Your target no longer exists.</span>"
return
if(!hascall(target,procname))
usr << "<font color='red'>Error: callproc(): target has no such call [procname].</font>"
return
else
if(copytext(procname, 1, 7) == "/proc/")
// nothing
else if(copytext(procname, 1, 6) == "proc/")
procname = "/[procname]"
else if(copytext(procname, 1, 2) == "/")
procname = "/proc[procname]"
else
procname = "/proc/[procname]"
// Procs have the strange property that text2path will return non-null, but ispath() will return false.
var/path = text2path(procname)
if(!path || ispath(path))
usr << "<span class='danger'>Invalid proc [procname]</span>"
return
var/argnum = input("Number of arguments","Number:",0) as num|null
if(!argnum && (argnum!=0)) return
lst.len = argnum // Expand to right length
//TODO: make a list to store whether each argument was initialised as null.
//Reason: So we can abort the proccall if say, one of our arguments was a mob which no longer exists
//this will protect us from a fair few errors ~Carn
var/i
for(i=1, i<argnum+1, i++) // Lists indexed from 1 forwards in byond
// Make a list with each index containing one variable, to be given to the proc
class = input("What kind of variable?","Variable Type") in list("text","num","type","reference","mob reference","icon","file","client","mob's area","CANCEL")
switch(class)
if("CANCEL")
return
if("text")
lst[i] = input("Enter new text:","Text",null) as text
if("num")
lst[i] = input("Enter new number:","Num",0) as num
if("type")
lst[i] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
if("reference")
lst[i] = input("Select reference:","Reference",src) as mob|obj|turf|area in world
if("mob reference")
lst[i] = input("Select reference:","Reference",usr) as mob in world
if("file")
lst[i] = input("Pick file:","File") as file
if("icon")
lst[i] = input("Pick icon:","Icon") as icon
if("client")
var/list/keys = list()
for(var/mob/M in world)
keys += M.client
lst[i] = input("Please, select a player!", "Selection", null, null) as null|anything in keys
if("mob's area")
var/mob/temp = input("Select mob", "Selection", usr) as mob in world
lst[i] = temp.loc
if(targetselected)
if(!target)
usr << "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>"
return
log_admin("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
returnval = call(target,procname)(arglist(lst)) // Pass the lst as an argument list to the proc
else
log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc
usr << "<font color='blue'>[procname] returned: [returnval ? returnval : "null"]</font>"
feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
// callproc moved to code/modules/admin/callproc
/client/proc/Cell()
set category = "Debug"
+3 -3
View File
@@ -536,7 +536,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("[key_name_admin(src)] has created a command report", 1)
feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in world)
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in view())
set category = "Admin"
set name = "Delete"
@@ -778,7 +778,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(confirm != "Yes") return
var/choice
if(ticker.mode.name == "revolution" || ticker.mode.name == "confliction")
if(ticker.mode.auto_recall_shuttle)
choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice == "Confirm")
emergency_shuttle.auto_recall = 1 //enable auto-recall
@@ -865,7 +865,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.", 1)
if(notifyplayers == "Yes")
world << "\blue <b>Admin [usr.key] has forced the players to have completely random identities!"
world << "\blue <b>Admin [usr.key] has forced the players to have completely random identities!</b>"
usr << "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>."
@@ -0,0 +1,93 @@
// Keep these two together, they *must* be defined on both
// If /client ever becomes /datum/client or similar, they can be merged
/client/proc/get_view_variables_header()
return "<b>[src]</b>"
/datum/proc/get_view_variables_header()
return "<b>[src]</b>"
/atom/get_view_variables_header()
return {"
<a href='?_src_=vars;datumedit=\ref[src];varnameedit=name'><b>[src]</b></a>
<br><font size='1'>
<a href='?_src_=vars;rotatedatum=\ref[src];rotatedir=left'><<</a>
<a href='?_src_=vars;datumedit=\ref[src];varnameedit=dir'>[dir2text(dir)]</a>
<a href='?_src_=vars;rotatedatum=\ref[src];rotatedir=right'>>></a>
</font>
"}
/mob/living/get_view_variables_header()
return {"
<a href='?_src_=vars;rename=\ref[src]'><b>[src]</b></a><font size='1'>
<br><a href='?_src_=vars;rotatedatum=\ref[src];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[src];varnameedit=dir'>[dir2text(dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[src];rotatedir=right'>>></a>
<br><a href='?_src_=vars;datumedit=\ref[src];varnameedit=ckey'>[ckey ? ckey : "No ckey"]</a> / <a href='?_src_=vars;datumedit=\ref[src];varnameedit=real_name'>[real_name ? real_name : "No real name"]</a>
<br>
BRUTE:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=brute'>[getBruteLoss()]</a>
FIRE:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=fire'>[getFireLoss()]</a>
TOXIN:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=toxin'>[getToxLoss()]</a>
OXY:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=oxygen'>[getOxyLoss()]</a>
CLONE:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=clone'>[getCloneLoss()]</a>
BRAIN:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=brain'>[getBrainLoss()]</a>
</font>
"}
// Same for these as for get_view_variables_header() above
/client/proc/get_view_variables_options()
return ""
/datum/proc/get_view_variables_options()
return ""
/mob/get_view_variables_options()
return ..() + {"
<option value='?_src_=vars;mob_player_panel=\ref[src]'>Show player panel</option>
<option>---</option>
<option value='?_src_=vars;give_spell=\ref[src]'>Give Spell</option>
<option value='?_src_=vars;give_disease2=\ref[src]'>Give Disease</option>
<option value='?_src_=vars;give_disease=\ref[src]'>Give TG-style Disease</option>
<option value='?_src_=vars;godmode=\ref[src]'>Toggle Godmode</option>
<option value='?_src_=vars;build_mode=\ref[src]'>Toggle Build Mode</option>
<option value='?_src_=vars;ninja=\ref[src]'>Make Space Ninja</option>
<option value='?_src_=vars;make_skeleton=\ref[src]'>Make 2spooky</option>
<option value='?_src_=vars;direct_control=\ref[src]'>Assume Direct Control</option>
<option value='?_src_=vars;drop_everything=\ref[src]'>Drop Everything</option>
<option value='?_src_=vars;regenerateicons=\ref[src]'>Regenerate Icons</option>
<option value='?_src_=vars;addlanguage=\ref[src]'>Add Language</option>
<option value='?_src_=vars;remlanguage=\ref[src]'>Remove Language</option>
<option value='?_src_=vars;addorgan=\ref[src]'>Add Organ</option>
<option value='?_src_=vars;remorgan=\ref[src]'>Remove Organ</option>
<option value='?_src_=vars;fix_nano=\ref[src]'>Fix NanoUI</option>
<option value='?_src_=vars;addverb=\ref[src]'>Add Verb</option>
<option value='?_src_=vars;remverb=\ref[src]'>Remove Verb</option>
<option>---</option>
<option value='?_src_=vars;gib=\ref[src]'>Gib</option>
<option value='?_src_=vars;explode=\ref[src]'>Trigger explosion</option>
<option value='?_src_=vars;emp=\ref[src]'>Trigger EM pulse</option>
"}
/mob/living/carbon/human/get_view_variables_options()
return ..() + {"
<option value='?_src_=vars;setspecies=\ref[src]'>Set Species</option>
<option value='?_src_=vars;makeai=\ref[src]'>Make AI</option>
<option value='?_src_=vars;makerobot=\ref[src]'>Make cyborg</option>
<option value='?_src_=vars;makemonkey=\ref[src]'>Make monkey</option>
<option value='?_src_=vars;makealien=\ref[src]'>Make alien</option>
<option value='?_src_=vars;makeslime=\ref[src]'>Make slime</option>
"}
/obj/get_view_variables_options()
return ..() + {"
<option value='?_src_=vars;delall=\ref[src]'>Delete all of type</option>
<option value='?_src_=vars;explode=\ref[src]'>Trigger explosion</option>
<option value='?_src_=vars;emp=\ref[src]'>Trigger EM pulse</option>
"}
/turf/get_view_variables_options()
return ..() + {"
<option value='?_src_=vars;explode=\ref[src]'>Trigger explosion</option>
<option value='?_src_=vars;emp=\ref[src]'>Trigger EM pulse</option>
"}
+546
View File
@@ -0,0 +1,546 @@
/client/proc/view_var_Topic(href, href_list, hsrc)
//This should all be moved over to datum/admins/Topic() or something ~Carn
if( (usr.client != src) || !src.holder )
return
if(href_list["Vars"])
debug_variables(locate(href_list["Vars"]))
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
else if(href_list["rename"])
if(!check_rights(R_VAREDIT)) return
var/mob/M = locate(href_list["rename"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
var/new_name = sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null, MAX_NAME_LEN)
if( !new_name || !M ) return
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
M.fully_replace_character_name(M.real_name,new_name)
href_list["datumrefresh"] = href_list["rename"]
else if(href_list["varnameedit"] && href_list["datumedit"])
if(!check_rights(R_VAREDIT)) return
var/D = locate(href_list["datumedit"])
if(!istype(D,/datum) && !istype(D,/client))
usr << "This can only be used on instances of types /client or /datum"
return
modify_variables(D, href_list["varnameedit"], 1)
else if(href_list["varnamechange"] && href_list["datumchange"])
if(!check_rights(R_VAREDIT)) return
var/D = locate(href_list["datumchange"])
if(!istype(D,/datum) && !istype(D,/client))
usr << "This can only be used on instances of types /client or /datum"
return
modify_variables(D, href_list["varnamechange"], 0)
else if(href_list["varnamemass"] && href_list["datummass"])
if(!check_rights(R_VAREDIT)) return
var/atom/A = locate(href_list["datummass"])
if(!istype(A))
usr << "This can only be used on instances of type /atom"
return
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
else if(href_list["mob_player_panel"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["mob_player_panel"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.holder.show_player_panel(M)
href_list["datumrefresh"] = href_list["mob_player_panel"]
else if(href_list["give_spell"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_spell"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_spell(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["give_disease"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_disease"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_disease(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["give_disease2"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_disease2"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_disease2(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["godmode"])
if(!check_rights(R_REJUVINATE)) return
var/mob/M = locate(href_list["godmode"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.cmd_admin_godmode(M)
href_list["datumrefresh"] = href_list["godmode"]
else if(href_list["gib"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["gib"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.cmd_admin_gib(M)
else if(href_list["build_mode"])
if(!check_rights(R_BUILDMODE)) return
var/mob/M = locate(href_list["build_mode"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
togglebuildmode(M)
href_list["datumrefresh"] = href_list["build_mode"]
else if(href_list["drop_everything"])
if(!check_rights(R_DEBUG|R_ADMIN)) return
var/mob/M = locate(href_list["drop_everything"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
if(usr.client)
usr.client.cmd_admin_drop_everything(M)
else if(href_list["direct_control"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["direct_control"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
if(usr.client)
usr.client.cmd_assume_direct_control(M)
else if(href_list["make_skeleton"])
if(!check_rights(R_FUN)) return
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
return
H.ChangeToSkeleton()
href_list["datumrefresh"] = href_list["make_skeleton"]
else if(href_list["delall"])
if(!check_rights(R_DEBUG|R_SERVER)) return
var/obj/O = locate(href_list["delall"])
if(!isobj(O))
usr << "This can only be used on instances of type /obj"
return
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
if(action_type == "Cancel" || !action_type)
return
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
return
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
return
var/O_type = O.type
switch(action_type)
if("Strict type")
var/i = 0
for(var/obj/Obj in world)
if(Obj.type == O_type)
i++
qdel(Obj)
if(!i)
usr << "No objects of this type exist"
return
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted)")
message_admins("<span class='notice'>[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted)</span>")
if("Type and subtypes")
var/i = 0
for(var/obj/Obj in world)
if(istype(Obj,O_type))
i++
qdel(Obj)
if(!i)
usr << "No objects of this type exist"
return
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted)")
message_admins("<span class='notice'>[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted)</span>")
else if(href_list["explode"])
if(!check_rights(R_DEBUG|R_FUN)) return
var/atom/A = locate(href_list["explode"])
if(!isobj(A) && !ismob(A) && !isturf(A))
usr << "This can only be done to instances of type /obj, /mob and /turf"
return
src.cmd_admin_explosion(A)
href_list["datumrefresh"] = href_list["explode"]
else if(href_list["emp"])
if(!check_rights(R_DEBUG|R_FUN)) return
var/atom/A = locate(href_list["emp"])
if(!isobj(A) && !ismob(A) && !isturf(A))
usr << "This can only be done to instances of type /obj, /mob and /turf"
return
src.cmd_admin_emp(A)
href_list["datumrefresh"] = href_list["emp"]
else if(href_list["mark_object"])
if(!check_rights(0)) return
var/datum/D = locate(href_list["mark_object"])
if(!istype(D))
usr << "This can only be done to instances of type /datum"
return
src.holder.marked_datum = D
href_list["datumrefresh"] = href_list["mark_object"]
else if(href_list["rotatedatum"])
if(!check_rights(0)) return
var/atom/A = locate(href_list["rotatedatum"])
if(!istype(A))
usr << "This can only be done to instances of type /atom"
return
switch(href_list["rotatedir"])
if("right") A.set_dir(turn(A.dir, -45))
if("left") A.set_dir(turn(A.dir, 45))
href_list["datumrefresh"] = href_list["rotatedatum"]
else if(href_list["makemonkey"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
else if(href_list["makerobot"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
else if(href_list["makealien"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makealien"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makealien"=href_list["makealien"]))
else if(href_list["makeslime"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeslime"=href_list["makeslime"]))
else if(href_list["makeai"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makeai"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeai"=href_list["makeai"]))
else if(href_list["setspecies"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["setspecies"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
var/new_species = input("Please choose a new species.","Species",null) as null|anything in all_species
if(!H)
usr << "Mob doesn't exist anymore"
return
if(H.set_species(new_species))
usr << "Set species of [H] to [H.species]."
else
usr << "Failed! Something went wrong."
else if(href_list["addlanguage"])
if(!check_rights(R_SPAWN)) return
var/mob/H = locate(href_list["addlanguage"])
if(!istype(H))
usr << "This can only be done to instances of type /mob"
return
var/new_language = input("Please choose a language to add.","Language",null) as null|anything in all_languages
if(!new_language)
return
if(!H)
usr << "Mob doesn't exist anymore"
return
if(H.add_language(new_language))
usr << "Added [new_language] to [H]."
else
usr << "Mob already knows that language."
else if(href_list["remlanguage"])
if(!check_rights(R_SPAWN)) return
var/mob/H = locate(href_list["remlanguage"])
if(!istype(H))
usr << "This can only be done to instances of type /mob"
return
if(!H.languages.len)
usr << "This mob knows no languages."
return
var/datum/language/rem_language = input("Please choose a language to remove.","Language",null) as null|anything in H.languages
if(!rem_language)
return
if(!H)
usr << "Mob doesn't exist anymore"
return
if(H.remove_language(rem_language.name))
usr << "Removed [rem_language] from [H]."
else
usr << "Mob doesn't know that language."
else if(href_list["addverb"])
if(!check_rights(R_DEBUG)) return
var/mob/living/H = locate(href_list["addverb"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living"
return
var/list/possibleverbs = list()
possibleverbs += "Cancel" // One for the top...
possibleverbs += typesof(/mob/proc,/mob/verb,/mob/living/proc,/mob/living/verb)
switch(H.type)
if(/mob/living/carbon/human)
possibleverbs += typesof(/mob/living/carbon/proc,/mob/living/carbon/verb,/mob/living/carbon/human/verb,/mob/living/carbon/human/proc)
if(/mob/living/silicon/robot)
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/robot/proc,/mob/living/silicon/robot/verb)
if(/mob/living/silicon/ai)
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb)
possibleverbs -= H.verbs
possibleverbs += "Cancel" // ...And one for the bottom
var/verb = input("Select a verb!", "Verbs",null) as anything in possibleverbs
if(!H)
usr << "Mob doesn't exist anymore"
return
if(!verb || verb == "Cancel")
return
else
H.verbs += verb
else if(href_list["remverb"])
if(!check_rights(R_DEBUG)) return
var/mob/H = locate(href_list["remverb"])
if(!istype(H))
usr << "This can only be done to instances of type /mob"
return
var/verb = input("Please choose a verb to remove.","Verbs",null) as null|anything in H.verbs
if(!H)
usr << "Mob doesn't exist anymore"
return
if(!verb)
return
else
H.verbs -= verb
else if(href_list["addorgan"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/M = locate(href_list["addorgan"])
if(!istype(M))
usr << "This can only be done to instances of type /mob/living/carbon"
return
var/new_organ = input("Please choose an organ to add.","Organ",null) as null|anything in typesof(/obj/item/organ)-/obj/item/organ
if(!new_organ) return
if(!M)
usr << "Mob doesn't exist anymore"
return
if(locate(new_organ) in M.internal_organs)
usr << "Mob already has that organ."
return
new new_organ(M)
else if(href_list["remorgan"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/M = locate(href_list["remorgan"])
if(!istype(M))
usr << "This can only be done to instances of type /mob/living/carbon"
return
var/obj/item/organ/rem_organ = input("Please choose an organ to remove.","Organ",null) as null|anything in M.internal_organs
if(!M)
usr << "Mob doesn't exist anymore"
return
if(!(locate(rem_organ) in M.internal_organs))
usr << "Mob does not have that organ."
return
usr << "Removed [rem_organ] from [M]."
rem_organ.removed()
qdel(rem_organ)
else if(href_list["fix_nano"])
if(!check_rights(R_DEBUG)) return
var/mob/H = locate(href_list["fix_nano"])
if(!istype(H) || !H.client)
usr << "This can only be done on mobs with clients"
return
nanomanager.send_resources(H.client)
usr << "Resource files sent"
H << "Your NanoUI Resource files have been refreshed"
log_admin("[key_name(usr)] resent the NanoUI resource files to [key_name(H)] ")
else if(href_list["regenerateicons"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["regenerateicons"])
if(!ismob(M))
usr << "This can only be done to instances of type /mob"
return
M.regenerate_icons()
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
if(!check_rights(R_DEBUG|R_ADMIN|R_FUN)) return
var/mob/living/L = locate(href_list["mobToDamage"])
if(!istype(L)) return
var/Text = href_list["adjustDamage"]
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
if(!L)
usr << "Mob doesn't exist anymore"
return
switch(Text)
if("brute") L.adjustBruteLoss(amount)
if("fire") L.adjustFireLoss(amount)
if("toxin") L.adjustToxLoss(amount)
if("oxygen")L.adjustOxyLoss(amount)
if("brain") L.adjustBrainLoss(amount)
if("clone") L.adjustCloneLoss(amount)
else
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
return
if(amount != 0)
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L]")
message_admins("<span class='notice'>[key_name(usr)] dealt [amount] amount of [Text] damage to [L]</span>")
href_list["datumrefresh"] = href_list["mobToDamage"]
else if(href_list["call_proc"])
var/datum/D = locate(href_list["call_proc"])
if(istype(D) || istype(D, /client)) // can call on clients too, not just datums
callproc_targetpicked(1, D)
if(href_list["datumrefresh"])
var/datum/DAT = locate(href_list["datumrefresh"])
if(istype(DAT, /datum) || istype(DAT, /client))
debug_variables(DAT)
return
@@ -0,0 +1,160 @@
// Variables to not even show in the list.
// step_* and bound_* are here because they literally break the game and do nothing else.
// parent_type is here because it's pointless to show in VV.
/var/list/view_variables_hide_vars = list("bound_x", "bound_y", "bound_height", "bound_width", "bounds", "parent_type", "step_x", "step_y", "step_size")
// Variables not to expand the lists of. Vars is pointless to expand, and overlays/underlays cannot be expanded.
/var/list/view_variables_dont_expand = list("overlays", "underlays", "vars")
/client/proc/debug_variables(datum/D in world)
set category = "Debug"
set name = "View Variables"
if(!check_rights(0))
return
if(!D)
return
var/icon/sprite
if(istype(D, /atom))
var/atom/A = D
if(A.icon && A.icon_state)
sprite = icon(A.icon, A.icon_state)
usr << browse_rsc(sprite, "view_vars_sprite.png")
usr << browse_rsc('code/js/view_variables.js', "view_variables.js")
var/html = {"
<html>
<head>
<script src='view_variables.js'></script>
<title>[D] (\ref[D] - [D.type])</title>
<style>
body { font-family: Verdana, sans-serif; font-size: 9pt; }
.value { font-family: "Courier New", monospace; font-size: 8pt; }
</style>
</head>
<body onload='selectTextField(); updateSearch()'; onkeyup='updateSearch()'>
<div align='center'>
<table width='100%'><tr>
<td width='50%'>
<table align='center' width='100%'><tr>
[sprite ? "<td><img src='view_vars_sprite.png'></td>" : ""]
<td><div align='center'>[D.get_view_variables_header()]</div></td>
</tr></table>
<div align='center'>
<b><font size='1'>[replacetext("[D.type]", "/", "/<wbr>")]</font></b>
[holder.marked_datum == D ? "<br/><font size='1' color='red'><b>Marked Object</b></font>" : ""]
</div>
</td>
<td width='50%'>
<div align='center'>
<a href='?_src_=vars;datumrefresh=\ref[D]'>Refresh</a>
<form>
<select name='file'
size='1'
onchange='loadPage(this.form.elements\[0\])'
target='_parent._top'
onmouseclick='this.focus()'
style='background-color:#ffffff'>
<option>Select option</option>
<option />
<option value='?_src_=vars;mark_object=\ref[D]'>Mark Object</option>
<option value='?_src_=vars;call_proc=\ref[D]'>Call Proc</option>
[D.get_view_variables_options()]
</select>
</form>
</div>
</td>
</tr></table>
</div>
<hr/>
<font size='1'>
<b>E</b> - Edit, tries to determine the variable type by itself.<br/>
<b>C</b> - Change, asks you for the var type first.<br/>
<b>M</b> - Mass modify: changes this variable for all objects of this type.<br/>
</font>
<hr/>
<table width='100%'><tr>
<td width='20%'>
<div align='center'>
<b>Search:</b>
</div>
</td>
<td width='80%'>
<input type='text'
id='filter'
name='filter_text'
value=''
style='width:100%;' />
</td>
</tr></table>
<hr/>
<ol id='vars'>
[make_view_variables_var_list(D)]
</ol>
</body>
</html>
"}
usr << browse(html, "window=variables\ref[D];size=475x650")
/proc/make_view_variables_var_list(datum/D)
. = ""
var/list/variables = list()
for(var/x in D.vars)
if(x in view_variables_hide_vars)
continue
variables += x
variables = sortList(variables)
for(var/x in variables)
. += make_view_variables_var_entry(D, x, D.vars[x])
/proc/make_view_variables_var_entry(datum/D, varname, value, level=0)
var/ecm = null
var/vtext = null
var/extra = null
if(D)
ecm = {"
(<a href='?_src_=vars;datumedit=\ref[D];varnameedit=[varname]'>E</a>)
(<a href='?_src_=vars;datumchange=\ref[D];varnamechange=[varname]'>C</a>)
(<a href='?_src_=vars;datummass=\ref[D];varnamemass=[varname]'>M</a>)
"}
if(isnull(value))
vtext = "null"
else if(istext(value))
vtext = "\"[value]\""
else if(isicon(value))
vtext = "[value]"
else if(isfile(value))
vtext = "'[value]'"
else if(istype(value, /datum))
var/datum/DA = value
if("[DA]" == "[DA.type]" || !"[DA]")
vtext = "<a href='?_src_=vars;Vars=\ref[DA]'>\ref[DA]</a> - [DA.type]"
else
vtext = "<a href='?_src_=vars;Vars=\ref[DA]'>\ref[DA]</a> - [DA] ([DA.type])"
else if(istype(value, /client))
var/client/C = value
vtext = "<a href='?_src_=vars;Vars=\ref[C]'>\ref[C]</a> - [C] ([C.type])"
else if(islist(value))
var/list/L = value
vtext = "/list ([L.len])"
if(!(varname in view_variables_dont_expand) && L.len > 0 && L.len < 100)
extra = "<ul>"
var/index = 1
for (var/entry in L)
if(istext(entry))
extra += make_view_variables_var_entry(null, entry, L[entry], level+1)
else
extra += make_view_variables_var_entry(null, index, L[index], level+1)
index++
extra += "</ul>"
else
vtext = "[value]"
return "<li>[ecm][varname] = <span class='value'>[vtext]</span>[extra]</li>"
+206
View File
@@ -0,0 +1,206 @@
//I will need to recode parts of this but I am way too tired atm
/obj/effect/blob
name = "blob"
icon = 'icons/mob/blob.dmi'
icon_state = "blob"
light_range = 3
desc = "Some blob creature thingy"
density = 1
opacity = 0
anchored = 1
mouse_opacity = 2
var/maxHealth = 30
var/health
var/brute_resist = 4
var/fire_resist = 1
var/expandType = /obj/effect/blob
/obj/effect/blob/New(loc)
health = maxHealth
update_icon()
return ..(loc)
/obj/effect/blob/CanPass(var/atom/movable/mover, vra/turf/target, var/height = 0, var/air_group = 0)
if(air_group || height == 0)
return 1
return 0
/obj/effect/blob/ex_act(var/severity)
switch(severity)
if(1)
take_damage(rand(100, 120) / brute_resist)
if(2)
take_damage(rand(60, 100) / brute_resist)
if(3)
take_damage(rand(20, 60) / brute_resist)
/obj/effect/blob/update_icon()
if(health > maxHealth / 2)
icon_state = "blob"
else
icon_state = "blob_damaged"
/obj/effect/blob/proc/take_damage(var/damage)
health -= damage
if(health < 0)
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
qdel(src)
else
update_icon()
/obj/effect/blob/proc/regen()
health = min(health + 1, maxHealth)
update_icon()
/obj/effect/blob/proc/expand(var/turf/T)
if(istype(T, /turf/unsimulated/) || istype(T, /turf/space))
return
if(istype(T, /turf/simulated/wall))
var/turf/simulated/wall/SW = T
SW.take_damage(80)
return
var/obj/structure/girder/G = locate() in T
if(G)
if(prob(40))
G.dismantle()
return
var/obj/structure/window/W = locate() in T
if(W)
W.shatter()
return
var/obj/structure/grille/GR = locate() in T
if(GR)
qdel(GR)
return
for(var/obj/machinery/door/D in T) // There can be several - and some of them can be open, locate() is not suitable
if(D.density)
D.ex_act(2)
return
var/obj/structure/foamedmetal/F = locate() in T
if(F)
qdel(F)
return
var/obj/structure/inflatable/I = locate() in T
if(I)
I.deflate(1)
return
var/obj/vehicle/V = locate() in T
if(V)
V.ex_act(2)
return
var/obj/machinery/bot/B = locate() in T
if(B)
B.ex_act(2)
return
var/obj/mecha/M = locate() in T
if(M)
M.visible_message("<span class='danger'>The blob attacks \the [M]!</span>")
M.take_damage(40)
return
// Above things, we destroy completely and thus can use locate. Mobs are different.
for(var/mob/living/L in T)
if(L.stat == DEAD)
continue
L.visible_message("<span class='danger'>The blob attacks \the [L]!</span>", "<span class='danger'>The blob attacks you!</span>")
playsound(loc, 'sound/effects/attackblob.ogg', 50, 1)
L.take_organ_damage(rand(30, 40))
return
new expandType(T, min(health, 30))
/obj/effect/blob/proc/pulse(var/forceLeft, var/list/dirs)
regen()
sleep(5)
var/pushDir = pick(dirs)
var/turf/T = get_step(src, pushDir)
var/obj/effect/blob/B = (locate() in T)
if(!B)
if(prob(health))
expand(T)
return
B.pulse(forceLeft - 1, dirs)
/obj/effect/blob/bullet_act(var/obj/item/projectile/Proj)
if(!Proj)
return
switch(Proj.damage_type)
if(BRUTE)
take_damage(Proj.damage / brute_resist)
if(BURN)
take_damage(Proj.damage / fire_resist)
return 0
/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
playsound(loc, 'sound/effects/attackblob.ogg', 50, 1)
visible_message("<span class='danger'>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]</span>")
var/damage = 0
switch(W.damtype)
if("fire")
damage = (W.force / fire_resist)
if(istype(W, /obj/item/weapon/weldingtool))
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
if("brute")
damage = (W.force / brute_resist)
take_damage(damage)
return
/obj/effect/blob/core
name = "blob core"
icon = 'icons/mob/blob.dmi'
icon_state = "blob_core"
maxHealth = 200
brute_resist = 2
fire_resist = 2
expandType = /obj/effect/blob/shield
/obj/effect/blob/core/update_icon()
return
/obj/effect/blob/core/New(loc)
processing_objects.Add(src)
return ..(loc)
/obj/effect/blob/core/Destroy()
processing_objects.Remove(src)
return ..()
/obj/effect/blob/core/process()
pulse(20, list(NORTH, EAST))
pulse(20, list(NORTH, WEST))
pulse(20, list(SOUTH, EAST))
pulse(20, list(SOUTH, WEST))
/obj/effect/blob/shield
name = "strong blob"
icon = 'icons/mob/blob.dmi'
icon_state = "blob_idle"
desc = "Some blob creature thingy"
maxHealth = 60
brute_resist = 1
fire_resist = 2
/obj/effect/blob/shield/New()
..()
update_nearby_tiles()
/obj/effect/blob/shield/Destroy()
density = 0
update_nearby_tiles()
..()
/obj/effect/blob/shield/update_icon()
if(health > maxHealth * 2 / 3)
icon_state = "blob_idle"
else if(health > maxHealth / 3)
icon_state = "blob"
else
icon_state = "blob_damaged"
/obj/effect/blob/shield/CanPass(var/atom/movable/mover, var/turf/target, var/height = 0, var/air_group = 0)
return !density
+24 -20
View File
@@ -404,7 +404,7 @@ datum/preferences
dat += "- [species] cannot choose secondary languages.<br>"
dat += "<b>Language Keys</b><br>"
dat += " [english_list(language_prefixes, and_text = " ", comma_text = " ")] <a href='byond://?src=\ref[user];preference=language_prefix'>Change</a><br>"
dat += " [english_list(language_prefixes, and_text = " ", comma_text = " ")] <a href='byond://?src=\ref[user];preference=language_prefix;add=1'>Change</a> <a href='byond://?src=\ref[user];preference=language_prefix;reset=1'>Reset</a><br>"
dat += "<br><br>"
var/list/undies = gender == MALE ? underwear_m : underwear_f
@@ -466,7 +466,7 @@ datum/preferences
for (var/i in special_roles)
if(special_roles[i]) //if mode is available on the server
if(jobban_isbanned(user, i) || (i == "positronic brain" && jobban_isbanned(user, "AI") && jobban_isbanned(user, "Cyborg")) || (i == "pAI candidate" && jobban_isbanned(user, "pAI")))
dat += "<b>Be [i]:<b> <font color=red><b> \[BANNED]</b></font><br>"
dat += "<b>Be [i]:</b> <font color=red><b> \[BANNED]</b></font><br>"
else
dat += "<b>Be [i]:</b> <a href='?_src_=prefs;preference=be_special;num=[n]'><b>[src.be_special&(1<<n) ? "Yes" : "No"]</b></a><br>"
n++
@@ -1180,25 +1180,29 @@ datum/preferences
alternate_languages |= new_lang
else if(href_list["preference"] == "language_prefix")
var/char
var/keys[0]
do
char = input("Enter a single special character.\nYou may re-select the same characters.\nThe following characters are already in use by radio: ; : .\nThe following characters are already in use by special say commands: ! *", "Enter Character - [3 - keys.len] remaining") as null|text
if(char)
if(length(char) > 1)
alert("Only single characters allowed.", "Error", "Ok")
else if(char in list(";", ":", "."))
alert("Radio character. Rejected.", "Error", "Ok")
else if(char in list("!","*"))
alert("Say character. Rejected.", "Error", "Ok")
else if(contains_az09(char))
alert("Non-special character. Rejected.", "Error", "Ok")
else
keys.Add(char)
while(char && keys.len < 3)
if(href_list["add"])
var/char
var/keys[0]
do
char = input("Enter a single special character.\nYou may re-select the same characters.\nThe following characters are already in use by radio: ; : .\nThe following characters are already in use by special say commands: ! * ^", "Enter Character - [3 - keys.len] remaining") as null|text
if(char)
if(length(char) > 1)
alert("Only single characters allowed.", "Error", "Ok")
else if(char in list(";", ":", "."))
alert("Radio character. Rejected.", "Error", "Ok")
else if(char in list("!","*", "^"))
alert("Say character. Rejected.", "Error", "Ok")
else if(contains_az09(char))
alert("Non-special character. Rejected.", "Error", "Ok")
else
keys.Add(char)
while(char && keys.len < 3)
if(keys.len == 3)
language_prefixes = keys
else if(href_list["reset"])
language_prefixes = config.language_prefixes.Copy()
if(keys.len == 3)
language_prefixes = keys
switch(href_list["task"])
if("change")
if(href_list["preference"] == "species")
@@ -234,7 +234,7 @@
if(target)
var/obj/item/firing = new fabrication_type()
firing.loc = get_turf(src)
firing.forceMove(get_turf(src))
H.visible_message("<span class='danger'>[H] launches \a [firing]!</span>")
firing.throw_at(target,fire_force,fire_distance)
else
@@ -242,7 +242,7 @@
H << "<span class='danger'>Your hands are full.</span>"
else
var/obj/item/new_weapon = new fabrication_type()
new_weapon.loc = H
new_weapon.forceMove(H)
H << "<font color='blue'><b>You quickly fabricate \a [new_weapon].</b></font>"
H.put_in_hands(new_weapon)
@@ -68,9 +68,9 @@
if(!verb_holder)
verb_holder = new(src)
if(integrated_ai)
verb_holder.loc = integrated_ai
verb_holder.forceMove(integrated_ai)
else
verb_holder.loc = src
verb_holder.forceMove(src)
/obj/item/rig_module/ai_container/accepts_item(var/obj/item/input_device, var/mob/living/user)
@@ -179,7 +179,7 @@
else if(user)
user.put_in_hands(ai_card)
else
ai_card.loc = get_turf(src)
ai_card.forceMove(get_turf(src))
ai_card = null
integrated_ai = null
update_verb_holder()
@@ -209,7 +209,7 @@
return 0
else
user.drop_from_inventory(ai)
ai.loc = src
ai.forceMove(src)
ai_card = ai
ai_mob << "<font color='blue'>You have been transferred to \the [holder]'s [src].</font>"
user << "<font color='blue'>You load [ai_mob] into \the [holder]'s [src].</font>"
@@ -123,13 +123,13 @@
H << "<span class='warning'>You cannot teleport to a location with solid objects.</span>"
phase_out(H,get_turf(H))
H.loc = T
H.forceMove(T)
phase_in(H,get_turf(H))
for(var/obj/item/weapon/grab/G in H.contents)
if(G.affecting)
phase_out(G.affecting,get_turf(G.affecting))
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)
G.affecting.forceMove(locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z))
phase_in(G.affecting,get_turf(G.affecting))
return 1
+12 -4
View File
@@ -92,7 +92,7 @@
if(src.loc == usr)
usr << "The maintenance panel is [open ? "open" : "closed"]."
usr << "Hardsuit systems are [offline ? "<font color='red'>offline</font>" : "<font color='green'>online</green>"]."
usr << "Hardsuit systems are [offline ? "<font color='red'>offline</font>" : "<font color='green'>online</font>"]."
/obj/item/weapon/rig/New()
..()
@@ -160,7 +160,11 @@
M.drop_from_inventory(piece)
qdel(piece)
processing_objects -= src
..()
qdel(wires)
wires = null
qdel(spark_system)
spark_system = null
return ..()
/obj/item/weapon/rig/proc/suit_is_deployed()
if(!istype(wearer) || src.loc != wearer || wearer.back != src)
@@ -629,7 +633,11 @@
if(check_slot)
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
else
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</b></span>"
use_obj.forceMove(H)
if(!H.equip_to_slot_if_possible(use_obj, equip_to, 0))
use_obj.forceMove(src)
else
H << "<span class='notice'>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</span>"
if(piece == "helmet" && helmet)
helmet.update_light(H)
@@ -745,7 +753,7 @@
if(dam_module.damage >= 2)
wearer << "<span class='danger'>The [source] has disabled your [dam_module.interface_name]!</span>"
else
wearer << "<span class='warning'>The [source] has damaged your [dam_module.interface_name]!"
wearer << "<span class='warning'>The [source] has damaged your [dam_module.interface_name]!</span>"
dam_module.deactivate()
/obj/item/weapon/rig/proc/malfunction_check(var/mob/living/carbon/human/user)
@@ -58,7 +58,7 @@
user.drop_from_inventory(W)
air_supply = W
W.loc = src
W.forceMove(src)
user << "You slot [W] into [src] and tighten the connecting valve."
return
@@ -87,7 +87,7 @@
user << "You install \the [mod] into \the [src]."
user.drop_from_inventory(mod)
installed_modules |= mod
mod.loc = src
mod.forceMove(src)
mod.installed(src)
update_icon()
return 1
@@ -96,7 +96,7 @@
user << "You jack \the [W] into \the [src]'s battery mount."
user.drop_from_inventory(W)
W.loc = src
W.forceMove(src)
src.cell = W
return
@@ -107,7 +107,7 @@
return
if(user.r_hand && user.l_hand)
air_supply.loc = get_turf(user)
air_supply.forceMove(get_turf(user))
else
user.put_in_hands(air_supply)
user << "You detach and remove \the [air_supply]."
@@ -139,9 +139,9 @@
for(var/obj/item/rig_module/module in installed_modules)
module.deactivate()
if(user.r_hand && user.l_hand)
cell.loc = get_turf(user)
cell.forceMove(get_turf(user))
else
cell.loc = user.put_in_hands(cell)
cell.forceMove(user.put_in_hands(cell))
cell = null
else
user << "There is nothing loaded in that mount."
@@ -164,7 +164,7 @@
var/obj/item/rig_module/removed = possible_removals[removal_choice]
user << "You detatch \the [removed] from \the [src]."
removed.loc = get_turf(src)
removed.forceMove(get_turf(src))
removed.removed()
installed_modules -= removed
update_icon()
@@ -1,6 +1,6 @@
/obj/item/clothing/head/helmet/space/rig/merc
light_overlay = "helmet_light_dual_green"
camera_networks = list("NUKE")
camera_networks = list(NETWORK_MERCENARY)
/obj/item/weapon/rig/merc
name = "crimson hardsuit control module"
@@ -7,7 +7,7 @@
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60)
siemens_coefficient = 0.6
species_restricted = list("Human")
camera_networks = list("NUKE")
camera_networks = list(NETWORK_MERCENARY)
light_overlay = "helmet_light_green" //todo: species-specific light overlays
/obj/item/clothing/suit/space/void/merc
+3 -4
View File
@@ -80,7 +80,7 @@
for(var/datum/money_account/D in all_money_accounts)
if(D.account_number == attempt_account_number && !D.suspended)
D.money += amount
//create a transaction log entry
var/datum/transaction/T = new()
T.target_name = source_name
@@ -93,10 +93,9 @@
T.time = worldtime2text()
T.source_terminal = terminal_id
D.transaction_log.Add(T)
return 1
break
return 0
//this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account
+3 -2
View File
@@ -12,12 +12,13 @@
if(!T)
kill()
return
Blob = new /obj/effect/blob/core(T, 120)
Blob = new /obj/effect/blob/core(T)
for(var/i = 1; i < rand(3, 4), i++)
Blob.process()
/datum/event/blob/tick()
if(!Blob)
if(!Blob || !Blob.loc)
Blob = null
kill()
return
if(IsMultiple(activeFor, 3))
+12 -12
View File
@@ -1,12 +1,12 @@
/proc/communications_blackout(var/silent = 1)
if(!silent)
command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg')
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
A << "<br>"
A << "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>"
A << "<br>"
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)
/proc/communications_blackout(var/silent = 1)
if(!silent)
command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg')
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
A << "<br>"
A << "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT</b></span>"
A << "<br>"
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)
+10 -3
View File
@@ -3,9 +3,12 @@
endWhen = 7
var/next_meteor = 6
var/waves = 1
var/start_side
/datum/event/meteor_wave/setup()
waves = severity * rand(1,3)
start_side = pick(cardinal)
endWhen = worst_case_end()
/datum/event/meteor_wave/announce()
switch(severity)
@@ -14,13 +17,17 @@
else
command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
//meteor showers are lighter and more common,
/datum/event/meteor_wave/tick()
if(waves && activeFor >= next_meteor)
spawn() spawn_meteors(severity * rand(1,2), get_meteors())
var/pick_side = prob(80) ? start_side : (prob(50) ? turn(start_side, 90) : turn(start_side, -90))
spawn() spawn_meteors(severity * rand(1,2), get_meteors(), pick_side)
next_meteor += rand(15, 30) / severity
waves--
endWhen = (waves ? next_meteor + 1 : activeFor + 15)
endWhen = worst_case_end()
/datum/event/meteor_wave/proc/worst_case_end()
return activeFor + ((30 / severity) * waves) + 10
/datum/event/meteor_wave/end()
switch(severity)
-5
View File
@@ -163,11 +163,6 @@
emergencyShutdown()
..()
/obj/machinery/computer/HolodeckControl/blob_act()
emergencyShutdown()
..()
/obj/machinery/computer/HolodeckControl/power_change()
var/oldstat
..()
+1 -1
View File
@@ -101,7 +101,7 @@
if(seed.get_trait(TRAIT_REQUIRES_NUTRIENTS))
if(seed.get_trait(TRAIT_NUTRIENT_CONSUMPTION) < 0.05)
dat += "<td>Low</td>"
else if(seed.get_trait(TRAIT_REQUIRES_NUTRIENTS) > 0.2)
else if(seed.get_trait(TRAIT_NUTRIENT_CONSUMPTION) > 0.2)
dat += "<td>High</td>"
else
dat += "<td>Norm</td>"
@@ -7,7 +7,7 @@
if(!istype(M))
return
if(!buckled_mob && !M.buckled && !M.anchored && (M.small || prob(round(seed.get_trait(TRAIT_POTENCY)/6))))
if(!buckled_mob && !M.buckled && !M.anchored && (issmall(M) || prob(round(seed.get_trait(TRAIT_POTENCY)/6))))
//wait a tick for the Entered() proc that called HasProximity() to finish (and thus the moving animation),
//so we don't appear to teleport from two tiles away when moving into a turf adjacent to vines.
spawn(1)
@@ -36,7 +36,9 @@
if(age >= seed.get_trait(TRAIT_MATURATION))
overlay_stage = seed.growth_stages
else
var/maturation = round(seed.get_trait(TRAIT_MATURATION)/seed.growth_stages)
var/maturation = seed.get_trait(TRAIT_MATURATION)/seed.growth_stages
if(maturation < 1)
maturation = 1
overlay_stage = maturation ? max(1,round(age/maturation)) : 1
var/ikey = "[seed.get_trait(TRAIT_PLANT_ICON)]-[overlay_stage]"
var/image/plant_overlay = plant_controller.plant_icon_cache["[ikey]-[seed.get_trait(TRAIT_PLANT_COLOUR)]"]
+29 -19
View File
@@ -1,3 +1,5 @@
//So much copypasta in this file, supposedly in the name of performance. If you change anything make sure to consider other places where the code may have been copied.
/datum/light_source
var/atom/top_atom
var/atom/source_atom
@@ -11,9 +13,10 @@
var/lum_g
var/lum_b
var/tmp/old_lum_r
var/tmp/old_lum_g
var/tmp/old_lum_b
//hold onto the actual applied lum values so we can undo them when the lighting changes
var/tmp/applied_lum_r
var/tmp/applied_lum_g
var/tmp/applied_lum_b
var/list/effect_str
var/list/effect_turf
@@ -107,11 +110,6 @@
if(light_range && light_power && !applied)
. = 1
if(. || source_atom.light_color != light_color)//Save the old lumcounts if we need to update, if the colour changed DO IT BEFORE we parse the colour and LOSE the old lumcounts!
old_lum_r = lum_r
old_lum_g = lum_g
old_lum_b = lum_b
if(source_atom.light_color != light_color)
light_color = source_atom.light_color
parse_light_color()
@@ -149,6 +147,12 @@
/datum/light_source/proc/apply_lum()
applied = 1
//Keep track of the last applied lum values so that the lighting can be reversed
applied_lum_r = lum_r
applied_lum_g = lum_g
applied_lum_b = lum_b
if(istype(source_turf))
FOR_DVIEW(var/turf/T, light_range, source_turf, INVISIBILITY_LIGHTING)
if(T.lighting_overlay)
@@ -164,9 +168,9 @@
effect_str += strength
T.lighting_overlay.update_lumcount(
lum_r * strength,
lum_g * strength,
lum_b * strength
applied_lum_r * strength,
applied_lum_g * strength,
applied_lum_b * strength
)
else
@@ -188,7 +192,11 @@
if(T.lighting_overlay)
var/str = effect_str[i]
T.lighting_overlay.update_lumcount(-str * old_lum_r, -str * old_lum_g, -str * old_lum_b)
T.lighting_overlay.update_lumcount(
-str * applied_lum_r,
-str * applied_lum_g,
-str * applied_lum_b
)
i++
@@ -218,9 +226,9 @@
effect_str += .
T.lighting_overlay.update_lumcount(
lum_r * .,
lum_g * .,
lum_b * .
applied_lum_r * .,
applied_lum_g * .,
applied_lum_b * .
)
else
@@ -241,7 +249,7 @@
if(T.lighting_overlay)
var/str = effect_str[idx]
T.lighting_overlay.update_lumcount(-str * lum_r, -str * lum_g, -str * lum_b)
T.lighting_overlay.update_lumcount(-str * applied_lum_r, -str * applied_lum_g, -str * applied_lum_b)
effect_turf.Cut(idx, idx + 1)
effect_str.Cut(idx, idx + 1)
@@ -279,10 +287,12 @@
effect_str[idx] = .
//Since the applied_lum values are what are (later) removed by remove_lum.
//Anything we apply to the lighting overlays HAS to match what remove_lum uses.
T.lighting_overlay.update_lumcount(
lum_r * .,
lum_g * .,
lum_b * .
applied_lum_r * .,
applied_lum_g * .,
applied_lum_b * .
)
#undef LUM_FALLOFF
+2 -1
View File
@@ -16,6 +16,7 @@
for(var/i in 1 to codelen)
code += pick(digits)
digits -= code[code.len]
generate_loot()
@@ -166,7 +167,7 @@
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
var/turf/T = get_turf(src.loc)
explosion(T, 0, 0, 1, 2)
del(src)
qdel(src)
/obj/structure/closet/crate/secure/loot/emag_act(var/remaining_charges, var/mob/user)
if (locked)
+7 -7
View File
@@ -46,20 +46,20 @@
if(!machine.ores_stored[ore] && !show_all_ores) continue
var/ore/O = ore_data[ore]
if(!O) continue
dat += "<tr><td width = 40><b>[capitalize(O.display_name)]</b></td><td width = 30>[machine.ores_stored[ore]]</td><td width = 100><font color='"
dat += "<tr><td width = 40><b>[capitalize(O.display_name)]</b></td><td width = 30>[machine.ores_stored[ore]]</td><td width = 100>"
if(machine.ores_processing[ore])
switch(machine.ores_processing[ore])
if(0)
dat += "red'>not processing"
dat += "<font color='red'>not processing</font>"
if(1)
dat += "orange'>smelting"
dat += "<font color='orange'>smelting</font>"
if(2)
dat += "blue'>compressing"
dat += "<font color='blue'>compressing</font>"
if(3)
dat += "gray'>alloying"
dat += "<font color='gray'>alloying</font>"
else
dat += "red'>not processing"
dat += "</font>.</td><td width = 30><a href='?src=\ref[src];toggle_smelting=[ore]'>\[change\]</a></td></tr>"
dat += "<font color='red'>not processing</font>"
dat += ".</td><td width = 30><a href='?src=\ref[src];toggle_smelting=[ore]'>\[change\]</a></td></tr>"
dat += "</table><hr>"
dat += "Currently displaying [show_all_ores ? "all ore types" : "only available ore types"]. <A href='?src=\ref[src];toggle_ores=1'>\[[show_all_ores ? "show less" : "show more"]\]</a></br>"
+4 -1
View File
@@ -108,7 +108,10 @@ note dizziness decrements automatically in the mob's Life() proc.
return
/mob/proc/make_floating(var/n)
if(buckled)
if(is_floating)
stop_floating()
return
floatiness = n
if(floatiness && !is_floating)
+11 -4
View File
@@ -123,7 +123,7 @@ Works together with spawning an observer, noted above.
if(antagHUD)
var/list/target_list = list()
for(var/mob/living/target in oview(src, 14))
if(target.mind&&(target.mind.special_role||issilicon(target)) )
if(target.mind && target.mind.special_role)
target_list += target
if(target_list.len)
assess_targets(target_list, src)
@@ -141,6 +141,8 @@ Works together with spawning an observer, noted above.
var/client/C = U.client
for(var/mob/living/carbon/human/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
for(var/mob/living/silicon/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
return 1
/mob/proc/ghostize(var/can_reenter_corpse = 1)
@@ -215,7 +217,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
mind.current.ajourn=0
mind.current.key = key
mind.current.aghosted = null
mind.current.teleop = null
if(!admin_ghosted)
announce_ghost_joinleave(mind, 0, "They now occupy their body again.")
return 1
@@ -460,6 +462,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!MayRespawn(1))
return
var/turf/T = get_turf(src)
if(!T || (T.z in config.admin_levels))
src << "<span class='warning'>You may not spawn as a mouse on this Z-level.</span>"
return
var/timedifference = world.time - client.time_died_as_mouse
if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
var/timedifference_text
@@ -475,8 +482,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/mob/living/simple_animal/mouse/host
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/list/found_vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
if(!v.welded && v.z == src.z)
for(var/obj/machinery/atmospherics/unary/vent_pump/v in machines)
if(!v.welded && v.z == T.z)
found_vents.Add(v)
if(found_vents.len)
vent_found = pick(found_vents)
+15 -11
View File
@@ -78,13 +78,13 @@ var/list/slot_equipment_priority = list( \
if(istype(src.back,/obj/item/weapon/storage))
var/obj/item/weapon/storage/backpack = src.back
if(backpack.contents.len < backpack.storage_slots)
newitem.loc = src.back
newitem.forceMove(src.back)
return 1
// Try to place it in any item that can store stuff, on the mob.
for(var/obj/item/weapon/storage/S in src.contents)
if (S.contents.len < S.storage_slots)
newitem.loc = S
newitem.forceMove(S)
return 1
return 0
@@ -106,7 +106,7 @@ var/list/slot_equipment_priority = list( \
if(lying) return 0
if(!istype(W)) return 0
if(!l_hand)
W.loc = src //TODO: move to equipped?
W.forceMove(src) //TODO: move to equipped?
l_hand = W
W.layer = 20 //TODO: move to equipped?
// l_hand.screen_loc = ui_lhand
@@ -122,7 +122,7 @@ var/list/slot_equipment_priority = list( \
if(lying) return 0
if(!istype(W)) return 0
if(!r_hand)
W.loc = src
W.forceMove(src)
r_hand = W
W.layer = 20
// r_hand.screen_loc = ui_rhand
@@ -157,7 +157,7 @@ var/list/slot_equipment_priority = list( \
update_inv_r_hand()
return 1
else
W.loc = get_turf(src)
W.forceMove(get_turf(src))
W.layer = initial(W.layer)
W.dropped()
return 0
@@ -219,16 +219,20 @@ var/list/slot_equipment_priority = list( \
/mob/proc/canUnEquip(obj/item/I)
if(!I) //If there's nothing to drop, the drop is automatically successful.
return 1
var/slot = get_inventory_slot(I)
if(slot && !I.mob_can_unequip(src, slot))
return 0
drop_from_inventory(I)
return 1
/mob/proc/get_inventory_slot(obj/item/I)
var/slot
for(var/s in slot_back to slot_tie) //kind of worries me
if(get_equipped_item(s) == I)
slot = s
break
if(slot && !I.mob_can_unequip(src, slot))
return 0
return 1
return slot
//This differs from remove_from_mob() in that it checks if the item can be unequipped first.
/mob/proc/unEquip(obj/item/I, force = 0) //Force overrides NODROP for things like wizarditis and admin undress.
@@ -246,7 +250,7 @@ var/list/slot_equipment_priority = list( \
O.screen_loc = null
if(istype(O, /obj/item))
var/obj/item/I = O
I.loc = src.loc
I.forceMove(src.loc)
I.dropped(src)
return 1
+1 -1
View File
@@ -25,7 +25,7 @@
speech_verb = "says"
whisper_verb = "whispers"
key = "0"
flags = RESTRICTED | COMMON_VERBS
flags = RESTRICTED
syllables = list("blah","blah","blah","bleh","meh","neh","nah","wah")
//TODO flag certain languages to use the mob-type specific say_quote and then get rid of these.
+3 -3
View File
@@ -19,7 +19,7 @@
var/list/syllables // Used when scrambling text for a non-speaker.
var/list/space_chance = 55 // Likelihood of getting a space in the random scramble string
/datum/language/proc/get_random_name(var/gender, name_count=2, syllable_count=4)
/datum/language/proc/get_random_name(var/gender, name_count=2, syllable_count=4, syllable_divisor=2)
if(!syllables || !syllables.len)
if(gender==FEMALE)
return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
@@ -31,7 +31,7 @@
for(var/i = 0;i<name_count;i++)
new_name = ""
for(var/x = rand(Floor(syllable_count/2),syllable_count);x>0;x--)
for(var/x = rand(Floor(syllable_count/syllable_divisor),syllable_count);x>0;x--)
new_name += pick(syllables)
full_name += " [capitalize(lowertext(new_name))]"
@@ -136,7 +136,7 @@
var/datum/language/new_language = all_languages[language]
if(!istype(new_language) || new_language in languages)
if(!istype(new_language) || (new_language in languages))
return 0
languages.Add(new_language)
+9 -1
View File
@@ -123,7 +123,15 @@
colour = "alien"
key = "v"
flags = WHITELISTED
syllables = list("caw","caw","caw","caw","ka")
space_chance = 50
syllables = list(
"ca", "ra", "ma", "sa", "na", "ta", "la", "sha", "scha", "a", "a",
"ce", "re", "me", "se", "ne", "te", "le", "she", "sche", "e", "e",
"ci", "ri", "mi", "si", "ni", "ti", "li", "shi", "schi", "i", "i"
)
/datum/language/resomi/get_random_name(gender)
return ..(gender, 1, 4, 1.5)
//Syllable Lists
/*
+1 -1
View File
@@ -29,7 +29,7 @@
if(drone_only && !istype(S,/mob/living/silicon/robot/drone))
continue
else if(istype(S , /mob/living/silicon/ai))
message_start = "<i><span class='game say'>[name], <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[speaker];trackname=[html_encode(speaker.name)]'><span class='name'>[speaker.name]</span></a></span>"
message_start = "<i><span class='game say'>[name], <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[speaker];trackname=[html_encode(speaker.name)]'><span class='name'>[speaker.name]</span></a></span></i>"
else if (!S.binarycheck())
continue
+96
View File
@@ -0,0 +1,96 @@
#define AUTOHISS_OFF 0
#define AUTOHISS_BASIC 1
#define AUTOHISS_FULL 2
#define AUTOHISS_NUM 3
/mob/living/proc/handle_autohiss(message, datum/language/L)
return message // no autohiss at this level
/mob/living/carbon/human/handle_autohiss(message, datum/language/L)
if(!client || client.autohiss_mode == AUTOHISS_OFF) // no need to process if there's no client or they have autohiss off
return message
return species.handle_autohiss(message, L, client.autohiss_mode)
/client
var/autohiss_mode = AUTOHISS_OFF
/client/verb/toggle_autohiss()
set name = "Toggle Auto-Hiss"
set desc = "Toggle automatic hissing as Unathi and r-rolling as Taj"
set category = "OOC"
autohiss_mode = (autohiss_mode + 1) % AUTOHISS_NUM
switch(autohiss_mode)
if(AUTOHISS_OFF)
src << "Auto-hiss is now OFF."
if(AUTOHISS_BASIC)
src << "Auto-hiss is now BASIC."
if(AUTOHISS_FULL)
src << "Auto-hiss is now FULL."
else
soft_assert(0, "invalid autohiss value [autohiss_mode]")
autohiss_mode = AUTOHISS_OFF
src << "Auto-hiss is now OFF."
/datum/species
var/list/autohiss_basic_map = null
var/list/autohiss_extra_map = null
var/list/autohiss_exempt = null
/datum/species/unathi
autohiss_basic_map = list(
"s" = list("ss", "sss", "ssss")
)
autohiss_extra_map = list(
"x" = list("ks", "kss", "ksss")
)
autohiss_exempt = list("Sinta'unathi")
/datum/species/tajaran
autohiss_basic_map = list(
"r" = list("rr", "rrr", "rrrr")
)
autohiss_exempt = list("Siik'tajr")
/datum/species/proc/handle_autohiss(message, datum/language/lang, mode)
if(!autohiss_basic_map)
return message
if(autohiss_exempt && (lang.name in autohiss_exempt))
return message
var/map = autohiss_basic_map.Copy()
if(mode == AUTOHISS_FULL && autohiss_extra_map)
map |= autohiss_extra_map
. = list()
while(length(message))
var/min_index = 10000 // if the message is longer than this, the autohiss is the least of your problems
var/min_char = null
for(var/char in map)
var/i = findtext(message, char)
if(!i) // no more of this character anywhere in the string, don't even bother searching next time
map -= char
else if(i < min_index)
min_index = i
min_char = char
if(!min_char) // we didn't find any of the mapping characters
. += message
break
. += copytext(message, 1, min_index)
if(copytext(message, min_index, min_index+1) == uppertext(min_char))
. += capitalize(pick(map[min_char]))
else
. += pick(map[min_char])
message = copytext(message, min_index + 1)
return list2text(.)
#undef AUTOHISS_OFF
#undef AUTOHISS_BASIC
#undef AUTOHISS_FULL
#undef AUTOHISS_NUM
-253
View File
@@ -1,253 +0,0 @@
/mob/living/blob
name = "blob fragment"
real_name = "blob fragment"
icon = 'icons/mob/blob.dmi'
icon_state = "blob_spore_temp"
pass_flags = PASSBLOB
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
var/ghost_name = "Unknown"
var/creating_blob = 0
faction = "blob"
use_me = 0 //Blobs can't emote
New()
real_name += " [pick(rand(1, 99))]"
name = real_name
..()
say(var/message)
return//No talking for you
emote(var/act,var/m_type=1,var/message = null)
return
Life()
set invisibility = 0
set background = 1
clamp_values()
UpdateDamage()
if(health < 0)
src.dust()
proc/clamp_values()
AdjustStunned(0)
AdjustParalysis(0)
AdjustWeakened(0)
sleeping = 0
if(stat)
stat = CONSCIOUS
return
proc/UpdateDamage()
health = 60 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
return
death(gibbed)
ghostize()
..(gibbed)
blob_act()
src << "The blob attempts to reabsorb you."
adjustToxLoss(20)
return
Process_Spacemove()
if(locate(/obj/effect/blob) in oview(1,src))
return 1
return (..())
/mob/living/blob/verb/create_node()
set category = "Blob"
set name = "Create Node"
set desc = "Create a Node."
if(creating_blob) return
var/turf/T = get_turf(src)
creating_blob = 1
if(!T)
creating_blob = 0
return
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
if(!B)//We are on a blob
usr << "There is no blob here!"
creating_blob = 0
return
if(istype(B,/obj/effect/blob/node)||istype(B,/obj/effect/blob/core)||istype(B,/obj/effect/blob/factory))
usr << "Unable to use this blob, find a normal one."
creating_blob = 0
return
for(var/obj/effect/blob/node/blob in orange(5))
usr << "There is another node nearby, move more than 5 tiles away from it!"
creating_blob = 0
return
for(var/obj/effect/blob/factory/blob in orange(2))
usr << "There is a porus blob nearby, move more than 2 tiles away from it!"
creating_blob = 0
B.change_to("Node")
src.dust()
return
/mob/living/blob/verb/create_factory()
set category = "Blob"
set name = "Create Defense"
set desc = "Create a Spore producing blob."
if(creating_blob) return
var/turf/T = get_turf(src)
creating_blob = 1
if(!T)
creating_blob = 0
return
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
if(!B)
usr << "You must be on a blob!"
creating_blob = 0
return
if(istype(B,/obj/effect/blob/node)||istype(B,/obj/effect/blob/core)||istype(B,/obj/effect/blob/factory))
usr << "Unable to use this blob, find a normal one."
creating_blob = 0
return
for(var/obj/effect/blob/blob in orange(2))//Not right next to nodes/cores
if(istype(B,/obj/effect/blob/node))
usr << "There is a node nearby, move away from it!"
creating_blob = 0
return
if(istype(B,/obj/effect/blob/core))
usr << "There is a core nearby, move away from it!"
creating_blob = 0
return
if(istype(B,/obj/effect/blob/factory))
usr << "There is another porous blob nearby, move away from it!"
creating_blob = 0
return
B.change_to("Factory")
src.dust()
return
/mob/living/blob/verb/revert()
set category = "Blob"
set name = "Purge Defense"
set desc = "Removes a porous blob."
if(creating_blob) return
var/turf/T = get_turf(src)
creating_blob = 1
if(!T)
creating_blob = 0
return
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
if(!B)
usr << "You must be on a blob!"
creating_blob = 0
return
if(!istype(B,/obj/effect/blob/factory))
usr << "Unable to use this blob, find another one."
creating_blob = 0
return
B.change_to("Normal")
src.dust()
return
/mob/living/blob/verb/spawn_blob()
set category = "Blob"
set name = "Create new blob"
set desc = "Attempts to create a new blob in this tile."
if(creating_blob) return
var/turf/T = get_turf(src)
creating_blob = 1
if(!T)
creating_blob = 0
return
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
if(B)
usr << "There is a blob here!"
creating_blob = 0
return
new/obj/effect/blob(src.loc)
src.dust()
return
///mob/proc/Blobize()
/client/proc/Blobcount()
set category = "Debug"
set name = "blobreport"
set desc = "blob report."
set hidden = 1
if(!holder)
src << "Only administrators may use this command."
return
if(ticker && ticker.mode)
src << "blobs: [blobs.len]"
src << "cores: [blob_cores.len]"
src << "nodes: [blob_nodes.len]"
return
/client/proc/Blobize()//Mostly stolen from the respawn command
set category = "Debug"
set name = "Ghostblob"
set desc = "Ghost into blobthing."
set hidden = 1
if(!holder)
src << "Only administrators may use this command."
return
var/input = input(src, "Please specify which key will be turned into a bloby.", "Key", "")
var/mob/dead/observer/G_found
if(!input)
var/list/ghosts = list()
for(var/mob/dead/observer/G in player_list)
ghosts += G
if(ghosts.len)
G_found = pick(ghosts)
else
for(var/mob/dead/observer/G in player_list)
if(G.client&&ckey(G.key)==ckey(input))
G_found = G
break
if(!G_found)//If a ghost was not found.
alert("There is no active key like that in the game or the person is not currently a ghost. Aborting command.")
return
if(G_found.client)
G_found.client.screen.len = null
var/mob/living/blob/B = new/mob/living/blob(locate(0,0,1))//temp area also just in case should do this better but tired
if(blob_cores.len > 0)
var/obj/effect/blob/core/core = pick(blob_cores)
if(core)
B.loc = core.loc
B.ghost_name = G_found.real_name
if (G_found.client)
G_found.client.mob = B
B.verbs += /mob/living/blob/verb/create_node
B.verbs += /mob/living/blob/verb/create_factory
B << "<B>You are now a blob fragment.</B>"
B << "You are a weak bit that has temporarily broken off of the blob."
B << "If you stay on the blob for too long you will likely be reabsorbed."
B << "If you stray from the blob you will likely be killed by other organisms."
B << "You have the power to create a new blob node that will help expand the blob."
B << "To create this node you will have to be on a normal blob tile and far enough away from any other node."
B << "Check your Blob verbs and hit Create Node to build a node."
spawn(10)
qdel(G_found)
+6
View File
@@ -70,6 +70,11 @@
else
icon_state = "secbot[on]"
if(on)
set_light(2, 1, "#FF6A00")
else
set_light(0)
/mob/living/bot/secbot/attack_hand(var/mob/user)
user.set_machine(src)
var/dat
@@ -183,6 +188,7 @@
if(!Adjacent(target))
awaiting_surrender = 5 // I'm done playing nice
mode = SECBOT_HUNT
return
var/threat = check_threat(target)
if(threat < 4)
target = null
@@ -31,26 +31,3 @@
adjustFireLoss(f_loss)
updatehealth()
/mob/living/carbon/alien/blob_act()
if (stat == 2)
return
var/shielded = 0
var/damage = null
if (stat != 2)
damage = rand(10,30)
if(shielded)
damage /= 4
//paralysis += 1
show_message("\red The blob attacks you!")
adjustFireLoss(damage)
updatehealth()
return
+1 -1
View File
@@ -262,7 +262,7 @@
var/show_ssd
var/mob/living/carbon/human/H = src
if(istype(H)) show_ssd = H.species.show_ssd
if(show_ssd && !client && !aghosted)
if(show_ssd && !client && !teleop)
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!</span>", \
"<span class='notice'>You shake [src], but they do not respond... Maybe they have S.S.D?</span>")
else if(lying || src.sleeping)
+23 -14
View File
@@ -168,15 +168,6 @@
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message)
if(update) UpdateDamageIcon()
/mob/living/carbon/human/blob_act()
if(stat == 2) return
show_message("\red The blob attacks you!")
var/dam_zone = pick(organs_by_name)
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
apply_damage(rand(30,40), BRUTE, affecting, run_armor_check(affecting, "melee"))
return
/mob/living/carbon/human/proc/implant_loyalty(mob/living/carbon/human/M, override = FALSE) // Won't override by default.
if(!config.use_loyalty_implants && !override) return // Nuh-uh.
@@ -238,7 +229,7 @@
// Other incidentals.
if(istype(suit) && suit.has_sensor == 1)
dat += "<BR><A href='?src=\ref[src];item=sensors'>Set sensors.</A>"
dat += "<BR><A href='?src=\ref[src];item=sensors'>Set sensors</A>"
if(handcuffed)
dat += "<BR><A href='?src=\ref[src];item=[slot_handcuffed]'>Handcuffed</A>"
if(legcuffed)
@@ -696,6 +687,28 @@
number += 2
return number
//Used by various things that knock people out by applying blunt trauma to the head.
//Checks that the species has a "head" (brain containing organ) and that hit_zone refers to it.
/mob/living/carbon/human/proc/headcheck(var/target_zone, var/brain_tag = "brain")
if(!species.has_organ[brain_tag])
return 0
var/obj/item/organ/affecting = internal_organs_by_name[brain_tag]
target_zone = check_zone(target_zone)
if(!affecting || affecting.parent_organ != target_zone)
return 0
//if the parent organ is significantly larger than the brain organ, then hitting it is not guaranteed
var/obj/item/organ/parent = get_organ(target_zone)
if(!parent)
return 0
if(parent.w_class > affecting.w_class + 1)
return prob(100 / 2**(parent.w_class - affecting.w_class - 1))
return 1
/mob/living/carbon/human/IsAdvancedToolUser(var/silent)
if(species.has_fine_manipulation)
return 1
@@ -1155,10 +1168,6 @@
else
return 0
mob_bump_flag = species.bump_flag
mob_swap_flags = species.swap_flags
mob_push_flags = species.push_flags
/mob/living/carbon/human/proc/bloody_doodle()
set category = "IC"
set name = "Write in blood"
@@ -155,7 +155,7 @@ emp_act
if(user == src) // Attacking yourself can't miss
target_zone = user.zone_sel.selecting
if(!target_zone)
visible_message("\red <B>[user] misses [src] with \the [I]!")
visible_message("<span class='danger'>[user] misses [src] with \the [I]!</span>")
return 1
var/obj/item/organ/external/affecting = get_organ(target_zone)
@@ -219,29 +219,32 @@ emp_act
H.bloody_hands(src)
if(!stat)
if(headcheck(hit_area))
//Harder to score a stun but if you do it lasts a bit longer
if(prob(effective_force))
apply_effect(20, PARALYZE, armor)
visible_message("<span class='danger'>[src] [species.knockout_message]</span>")
else
//Easier to score a stun but lasts less time
if(prob(effective_force + 10))
apply_effect(6, WEAKEN, armor)
visible_message("<span class='danger'>[src] has been knocked down!</span>")
//Apply blood
if(bloody)
switch(hit_area)
if("head")//Harder to score a stun but if you do it lasts a bit longer
if(prob(effective_force))
apply_effect(20, PARALYZE, armor)
visible_message("\red <B>[src] has been knocked unconscious!</B>")
if(bloody)//Apply blood
if(wear_mask)
wear_mask.add_blood(src)
update_inv_wear_mask(0)
if(head)
head.add_blood(src)
update_inv_head(0)
if(glasses && prob(33))
glasses.add_blood(src)
update_inv_glasses(0)
if("chest")//Easier to score a stun but lasts less time
if(prob((effective_force + 10)))
apply_effect(6, WEAKEN, armor)
visible_message("\red <B>[src] has been knocked down!</B>")
if(bloody)
bloody_body(src)
if("head")
if(wear_mask)
wear_mask.add_blood(src)
update_inv_wear_mask(0)
if(head)
head.add_blood(src)
update_inv_head(0)
if(glasses && prob(33))
glasses.add_blood(src)
update_inv_glasses(0)
if("chest")
bloody_body(src)
if(Iforce > 10 || Iforce >= 5 && prob(33))
forcesay(hit_appends) //forcesay checks stat already
+7 -35
View File
@@ -159,7 +159,7 @@
for(var/mob/O in viewers(src, null))
if(O == src)
continue
O.show_message(text("\red <B>[src] starts having a seizure!"), 1)
O.show_message(text("<span class='danger'>[src] starts having a seizure!</span>"), 1)
Paralyse(10)
make_jittery(1000)
if (disabilities & COUGHING)
@@ -920,11 +920,7 @@
if(status_flags & GODMODE) return 0
//SSD check, if a logged player is awake put them back to sleep!
if(species.show_ssd && !client && !aghosted)
sleeping = 2
//SSD check, if a logged player is awake put them back to sleep!
if(species.show_ssd && !client && !aghosted)
if(species.show_ssd && !client && !teleop)
Sleeping(2)
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
@@ -1684,35 +1680,11 @@
if (BITTEST(hud_updateflag, SPECIALROLE_HUD))
var/image/holder = hud_list[SPECIALROLE_HUD]
holder.icon_state = "hudblank"
if(mind)
// TODO: Update to new antagonist system.
switch(mind.special_role)
if("traitor","Mercenary")
holder.icon_state = "hudsyndicate"
if("Revolutionary")
holder.icon_state = "hudrevolutionary"
if("Head Revolutionary")
holder.icon_state = "hudheadrevolutionary"
if("Cultist")
holder.icon_state = "hudcultist"
if("Changeling")
holder.icon_state = "hudchangeling"
if("Wizard","Fake Wizard")
holder.icon_state = "hudwizard"
if("Death Commando")
holder.icon_state = "huddeathsquad"
if("Ninja")
holder.icon_state = "hudninja"
if("head_loyalist")
holder.icon_state = "hudloyalist"
if("loyalist")
holder.icon_state = "hudloyalist"
if("head_mutineer")
holder.icon_state = "hudmutineer"
if("mutineer")
holder.icon_state = "hudmutineer"
if(mind && mind.special_role)
if(hud_icon_reference[mind.special_role])
holder.icon_state = hud_icon_reference[mind.special_role]
else
holder.icon_state = "hudsyndicate"
hud_list[SPECIALROLE_HUD] = holder
hud_updateflag = 0
@@ -28,7 +28,7 @@
var/tail_hair
var/race_key = 0 // Used for mob icon cache string.
var/icon/icon_template // Used for mob icon generation for non-32x32 species.
var/is_small
var/mob_size = MOB_MEDIUM
var/show_ssd = "fast asleep"
var/virus_immune
var/short_sighted
@@ -40,6 +40,7 @@
var/list/speech_sounds // A list of sounds to potentially play when speaking.
var/list/speech_chance // The likelihood of a speech sound playing.
var/num_alternate_languages = 0 // How many secondary languages are available to select at character creation
var/name_language = "Galactic Common" // The language to use when determining names for this species, or null to use the first name/last name generator
// Combat vars.
var/total_health = 100 // Point at which the mob will enter crit.
@@ -65,6 +66,7 @@
var/dusted_anim = "dust-h"
var/death_sound
var/death_message = "seizes up and falls limp, their eyes dead and lifeless..."
var/knockout_message = "has been knocked unconscious!"
// Environment tolerance/life processes vars.
var/reagent_tag //Used for metabolizing reagents.
@@ -148,6 +150,8 @@
var/push_flags = ~HEAVY // What can we push?
var/swap_flags = ~HEAVY // What can we swap place with?
var/pass_flags = 0
/datum/species/New()
if(hud_type)
hud = new hud_type()
@@ -195,7 +199,13 @@
H << "<span class='danger'>[pick(heat_discomfort_strings)]</span>"
/datum/species/proc/get_random_name(var/gender)
var/datum/language/species_language = all_languages[language]
if(!name_language)
if(gender == FEMALE)
return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
else
return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
var/datum/language/species_language = all_languages[name_language]
if(!species_language)
species_language = all_languages[default_language]
if(!species_language)
@@ -271,6 +281,11 @@
/datum/species/proc/handle_post_spawn(var/mob/living/carbon/human/H) //Handles anything not already covered by basic species assignment.
add_inherent_verbs(H)
H.mob_bump_flag = bump_flag
H.mob_swap_flags = swap_flags
H.mob_push_flags = push_flags
H.pass_flags = pass_flags
H.mob_size = mob_size
/datum/species/proc/handle_death(var/mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns).
return
@@ -11,7 +11,7 @@
language = null
default_language = "Chimpanzee"
greater_form = "Human"
is_small = 1
mob_size = MOB_SMALL
has_fine_manipulation = 0
show_ssd = null
@@ -38,6 +38,8 @@
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL|ALIEN
pass_flags = PASSTABLE
/datum/species/monkey/handle_npc(var/mob/living/carbon/human/H)
if(H.stat != CONSCIOUS)
return
@@ -8,6 +8,7 @@
num_alternate_languages = 2
secondary_langs = list("Resomi")
name_language = "Resomi"
blood_color = "#D514F7"
flesh_color = "#5F7BB0"
@@ -26,7 +27,7 @@
total_health = 50
brute_mod = 1.35
burn_mod = 1.35
is_small = 1
mob_size = MOB_SMALL
holder_type = /obj/item/weapon/holder/human
short_sighted = 1
gluttonous = 1
@@ -1,7 +1,7 @@
/datum/species/slime
name = "Slime"
name_plural = "slimes"
is_small = 1
mob_size = MOB_SMALL
icobase = 'icons/mob/human_races/r_slime.dmi'
deform = 'icons/mob/human_races/r_slime.dmi'
@@ -10,6 +10,7 @@
worlds tumultous at best."
num_alternate_languages = 2
secondary_langs = list("Sol Common")
name_language = null // Use the first-name last-name generator rather than a language scrambler
spawn_flags = CAN_JOIN
appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR
@@ -32,6 +33,7 @@
brute_mod = 0.8
num_alternate_languages = 2
secondary_langs = list("Sinta'unathi")
name_language = "Sinta'unathi"
blurb = "A heavily reptillian species, Unathi (or 'Sinta as they call themselves) hail from the \
Uuosa-Eso system, which roughly translates to 'burning mother'.<br/><br/>Coming from a harsh, radioactive \
@@ -88,6 +90,7 @@
gluttonous = 1
num_alternate_languages = 2
secondary_langs = list("Siik'tajr")
name_language = "Siik'tajr"
blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \
S'randarr system. They have been brought up into the space age by the Humans and Skrell, and have been \
@@ -138,6 +141,7 @@
the secrets of their empire to their allies."
num_alternate_languages = 2
secondary_langs = list("Skrellian")
name_language = null
spawn_flags = CAN_JOIN | IS_WHITELISTED
appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR
@@ -163,7 +167,7 @@
eyes = "blank_eyes"
show_ssd = "completely quiescent"
num_alternate_languages = 1
name_language = "Rootspeak"
blurb = "Commonly referred to (erroneously) as 'plant people', the Dionaea are a strange space-dwelling collective \
species hailing from Epsilon Ursae Minoris. Each 'diona' is a cluster of numerous cat-sized organisms called nymphs; \
@@ -269,11 +273,14 @@
unarmed_types = list(/datum/unarmed_attack/punch)
rarity_value = 2
num_alternate_languages = 1 // potentially could be 2?
name_language = "Encoded Audio Language"
eyes = "blank_eyes"
brute_mod = 1.875 // 100% * 1.875 * 0.8 (robolimbs) ~= 150%
burn_mod = 1.875 // So they take 50% extra damage from brute/burn overall.
show_ssd = "flashing a 'system offline' glyph on their monitor"
death_message = "gives one shrill beep before falling lifeless."
knockout_message = "encounters a hardware fault and suddenly reboots!"
warning_low_pressure = 50
hazard_low_pressure = 0
@@ -113,24 +113,25 @@ Please contact me on #coderbus IRC. ~Carn x
#define ID_LAYER 5
#define SHOES_LAYER 6
#define GLOVES_LAYER 7
#define SUIT_LAYER 8
#define TAIL_LAYER 9 //bs12 specific. this hack is probably gonna come back to haunt me
#define GLASSES_LAYER 10
#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 12
#define BACK_LAYER 13
#define HAIR_LAYER 14 //TODO: make part of head layer?
#define EARS_LAYER 15
#define FACEMASK_LAYER 16
#define HEAD_LAYER 17
#define COLLAR_LAYER 18
#define HANDCUFF_LAYER 19
#define LEGCUFF_LAYER 20
#define L_HAND_LAYER 21
#define R_HAND_LAYER 22
#define FIRE_LAYER 23 //If you're on fire
#define TARGETED_LAYER 24 //BS12: Layer for the target overlay from weapon targeting system
#define TOTAL_LAYERS 24
#define BELT_LAYER 8
#define SUIT_LAYER 9
#define TAIL_LAYER 10 //bs12 specific. this hack is probably gonna come back to haunt me
#define GLASSES_LAYER 11
#define BELT_LAYER_ALT 12
#define SUIT_STORE_LAYER 13
#define BACK_LAYER 14
#define HAIR_LAYER 15 //TODO: make part of head layer?
#define EARS_LAYER 16
#define FACEMASK_LAYER 17
#define HEAD_LAYER 18
#define COLLAR_LAYER 19
#define HANDCUFF_LAYER 20
#define LEGCUFF_LAYER 21
#define L_HAND_LAYER 22
#define R_HAND_LAYER 23
#define FIRE_LAYER 24 //If you're on fire
#define TARGETED_LAYER 25 //BS12: Layer for the target overlay from weapon targeting system
#define TOTAL_LAYERS 25
//////////////////////////////////
/mob/living/carbon/human
@@ -718,15 +719,24 @@ var/global/list/damage_icon_parts = list()
else
standing.icon = 'icons/mob/belt.dmi'
if(belt.contents.len && istype(belt, /obj/item/weapon/storage/belt))
for(var/obj/item/i in belt.contents)
var/i_state = i.item_state
if(!i_state) i_state = i.icon_state
standing.overlays += image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[i_state]")
var/belt_layer = BELT_LAYER
if(istype(belt, /obj/item/weapon/storage/belt))
var/obj/item/weapon/storage/belt/ubelt = belt
if(ubelt.show_above_suit)
overlays_standing[BELT_LAYER] = null
belt_layer = BELT_LAYER_ALT
else
overlays_standing[BELT_LAYER_ALT] = null
if(belt.contents.len)
for(var/obj/item/i in belt.contents)
var/i_state = i.item_state
if(!i_state) i_state = i.icon_state
standing.overlays += image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[i_state]")
overlays_standing[BELT_LAYER] = standing
overlays_standing[belt_layer] = standing
else
overlays_standing[BELT_LAYER] = null
overlays_standing[BELT_LAYER_ALT] = null
if(update_icons) update_icons()
@@ -194,26 +194,6 @@
updatehealth()
/mob/living/carbon/slime/blob_act()
if (stat == 2)
return
var/shielded = 0
var/damage = null
if (stat != 2)
damage = rand(10,30)
if(shielded)
damage /= 4
show_message("<span class='danger'> The blob attacks you!</span>")
adjustFireLoss(damage)
updatehealth()
return
/mob/living/carbon/slime/u_equip(obj/item/W as obj)
return
+1 -1
View File
@@ -2,7 +2,7 @@
/mob/living/carbon/process_resist()
//drop && roll
if(on_fire)
if(on_fire && !buckled)
fire_stacks -= 1.2
Weaken(3)
spin(32,2)
+2 -2
View File
@@ -41,7 +41,7 @@
/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0, var/check_protection = 1)
if(!effect || (blocked >= 2)) return 0
switch(effecttype)
if(STUN)
@@ -53,7 +53,7 @@
if(AGONY)
halloss += effect // Useful for objects that cause "subdual" damage. PAIN!
if(IRRADIATE)
var/rad_protection = getarmor(null, "rad")/100
var/rad_protection = check_protection ? getarmor(null, "rad")/100 : 0
radiation += max((1-rad_protection)*effect/(blocked+1),0)//Rads auto check armor
if(STUTTER)
if(status_flags & CANSTUN) // stun is usually associated with stutter
+10 -31
View File
@@ -87,8 +87,8 @@ default behaviour is:
if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
forceMove(tmob.loc)
tmob.forceMove(oldloc)
now_pushing = 0
for(var/mob/living/carbon/slime/slime in view(1,tmob))
if(slime.Victim == tmob)
@@ -573,21 +573,12 @@ default behaviour is:
set name = "Resist"
set category = "IC"
if(can_resist())
if(!(stat || next_move > world.time))
setClickCooldown(20)
resist_grab()
if(!weakened && !restrained())
if(!weakened)
process_resist()
/mob/living/proc/can_resist()
//need to allow !canmove, or otherwise neck grabs can't be resisted
//similar thing with weakened and pinning
if(stat)
return 0
if(!canClick())
return 0
return 1
/mob/living/proc/process_resist()
//Getting out of someone's inventory.
if(istype(src.loc, /obj/item/weapon/holder))
@@ -614,7 +605,7 @@ default behaviour is:
src << "<span class='warning'>You wriggle out of [M]'s grip!</span>"
else if(istype(H.loc,/obj/item))
src << "<span class='warning'>You struggle free of [H.loc].</span>"
H.loc = get_turf(H)
H.forceMove(get_turf(H))
if(istype(M))
for(var/atom/A in M.contents)
@@ -655,27 +646,15 @@ default behaviour is:
set category = "IC"
resting = !resting
src << "<span class='notice'>You are now [resting ? "resting" : "getting up"].</span>"
src << "<span class='notice'>You are now [resting ? "resting" : "getting up"]</span>"
/mob/living/proc/is_allowed_vent_crawl_item(var/obj/item/carried_item)
if(istype(carried_item, /obj/item/weapon/implant))
return 1
if(istype(carried_item, /obj/item/clothing/mask/facehugger))
return 1
return 0
/mob/living/carbon/is_allowed_vent_crawl_item(var/obj/item/carried_item)
if(carried_item in internal_organs)
return 1
return ..()
/mob/living/carbon/human/is_allowed_vent_crawl_item(var/obj/item/carried_item)
if(carried_item in organs)
return 1
return ..()
return isnull(get_inventory_slot(carried_item))
/mob/living/simple_animal/spiderbot/is_allowed_vent_crawl_item(var/obj/item/carried_item)
return carried_item != held_item
if(carried_item == held_item)
return 0
return ..()
/mob/living/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null, var/ignore_items = 0) // -- TLE -- Merged by Carn
if(stat)
+1 -1
View File
@@ -230,7 +230,7 @@
/mob/living/proc/handle_fire()
if(fire_stacks < 0)
fire_stacks = min(0, fire_stacks++) //If we've doused ourselves in water to avoid fire, dry off slowly
fire_stacks = min(0, ++fire_stacks) //If we've doused ourselves in water to avoid fire, dry off slowly
if(!on_fire)
return 1
@@ -39,10 +39,7 @@
var/tod = null // Time of death
var/update_slimes = 1
var/silent = null // Can't talk. Value goes down every life proc.
var/mob_size // Used by lockers.
var/on_fire = 0 //The "Are we on fire?" var
var/fire_stacks
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
+9 -13
View File
@@ -161,19 +161,13 @@ proc/get_radio_key_from_channel(var/channel)
else
speaking = get_default_language()
if (speaking)
// This is broadcast to all mobs with the language,
// irrespective of distance or anything else.
if(speaking.flags & HIVEMIND)
speaking.broadcast(src,trim(message))
return 1
//If we've gotten this far, keep going!
if(speaking.flags & COMMON_VERBS)
verb = say_quote(message)
else
verb = speaking.get_spoken_verb(copytext(message, length(message)))
else
verb = say_quote(message)
// This is broadcast to all mobs with the language,
// irrespective of distance or anything else.
if(speaking && (speaking.flags & HIVEMIND))
speaking.broadcast(src,trim(message))
return 1
verb = say_quote(message, speaking)
if(is_muzzled())
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
@@ -182,6 +176,8 @@ proc/get_radio_key_from_channel(var/channel)
message = trim_left(message)
if(!(speaking && (speaking.flags & NO_STUTTER)))
message = handle_autohiss(message, speaking)
var/list/handle_s = handle_speech_problems(message, verb)
message = handle_s[1]
verb = handle_s[2]
+2 -2
View File
@@ -128,8 +128,8 @@ var/list/ai_verbs_default = list(
aiRadio = new(src)
common_radio = aiRadio
aiRadio.myAi = src
additional_law_channels += "Binary"
additional_law_channels += "Holopad"
additional_law_channels["Binary"] = ":b"
additional_law_channels["Holopad"] = ":h"
aiCamera = new/obj/item/device/camera/siliconcam/ai_camera(src)
+1 -1
View File
@@ -79,7 +79,7 @@
//Blind the AI
updateicon()
src.blind.screen_loc = "1,1 to 15,15"
src.blind.screen_loc = ui_entire_screen
if (src.blind.layer!=18)
src.blind.layer = 18
src.sight = src.sight&~SEE_TURFS
+2 -2
View File
@@ -6,12 +6,12 @@
flash = new /obj/screen()
flash.icon_state = "blank"
flash.name = "flash"
flash.screen_loc = "1,1 to 15,15"
flash.screen_loc = ui_entire_screen
flash.layer = 17
blind = new /obj/screen()
blind.icon_state = "black"
blind.name = " "
blind.screen_loc = "1,1 to 15,15"
blind.screen_loc = ui_entire_screen
blind.layer = 0
client.screen.Add( blind, flash )
+1 -2
View File
@@ -136,6 +136,5 @@
// Cleaner proc for creating powersupply for an AI.
/mob/living/silicon/ai/proc/create_powersupply()
if(psupply)
del(psupply)
qdel(psupply)
psupply = new/obj/machinery/ai_powersupply(src)
+7 -6
View File
@@ -1,6 +1,6 @@
/mob/living/silicon
var/datum/ai_laws/laws = null
var/list/additional_law_channels = list("State")
var/list/additional_law_channels = list("State" = "")
/mob/living/silicon/proc/laws_sanity_check()
if (!src.laws)
@@ -59,11 +59,12 @@
/mob/living/silicon/proc/statelaws(var/datum/ai_laws/laws)
var/prefix = ""
switch(lawchannel)
if(MAIN_CHANNEL) prefix = ";"
if("Binary") prefix = ":b "
else
prefix = get_radio_key_from_channel(lawchannel == "Holopad" ? "department" : lawchannel) + " "
if(MAIN_CHANNEL == lawchannel)
prefix = ";"
else if(lawchannel in additional_law_channels)
prefix = additional_law_channels[lawchannel]
else
prefix = get_radio_key_from_channel(lawchannel)
dostatelaws(lawchannel, prefix, laws)
+4 -8
View File
@@ -4,8 +4,8 @@
icon_state = "repairbot"
emote_type = 2 // pAIs emotes are heard, not seen, so they can be seen through a container (eg. person)
small = 1
pass_flags = 1
mob_size = MOB_SMALL
var/network = "SS13"
var/obj/machinery/camera/current = null
@@ -119,13 +119,6 @@
return -1
return 0
/mob/living/silicon/pai/blob_act()
if (src.stat != 2)
src.adjustBruteLoss(60)
src.updatehealth()
return 1
return 0
/mob/living/silicon/pai/restrained()
if(istype(src.loc,/obj/item/device/paicard))
return 0
@@ -379,6 +372,9 @@
src.client.perspective = EYE_PERSPECTIVE
src.client.eye = card
//stop resting
resting = 0
// If we are being held, handle removing our holder from their inv.
var/obj/item/weapon/holder/H = loc
if(istype(H))
@@ -42,6 +42,8 @@ var/list/mob_hat_cache = list()
mob_push_flags = SIMPLE_ANIMAL
mob_always_swap = 1
mob_size = MOB_TINY
//Used for self-mailing.
var/mail_destination = ""
var/obj/machinery/drone_fabricator/master_fabricator
@@ -68,6 +70,7 @@ var/list/mob_hat_cache = list()
can_pull_mobs = 1
hat_x_offset = 1
hat_y_offset = -12
mob_size = MOB_SMALL
/mob/living/silicon/robot/drone/New()
@@ -95,7 +98,7 @@ var/list/mob_hat_cache = list()
/mob/living/silicon/robot/drone/init()
aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src)
additional_law_channels["Drone"] = ":d"
if(!laws) laws = new law_type
if(!module) module = new module_type(src)
@@ -30,7 +30,7 @@
for(var/mob/living/silicon/robot/drone/D in world)
if(D.z != src.z)
continue
dat += "<BR>[D.real_name] ([D.stat == 2 ? "<font color='red'>INACTIVE" : "<font color='green'>ACTIVE"]</FONT>)"
dat += "<BR>[D.real_name] ([D.stat == 2 ? "<font color='red'>INACTIVE</FONT>" : "<font color='green'>ACTIVE</FONT>"])"
dat += "<font dize = 9><BR>Cell charge: [D.cell.charge]/[D.cell.maxcharge]."
dat += "<BR>Currently located in: [get_area(D)]."
dat += "<BR><A href='?src=\ref[src];resync=\ref[D]'>Resync</A> | <A href='?src=\ref[src];shutdown=\ref[D]'>Shutdown</A></font>"
@@ -22,7 +22,7 @@
src << "<b>Laws synced with AI, be sure to note any changes.</b>"
// TODO: Update to new antagonist system.
if(mind && mind.special_role == "traitor" && mind.original == src)
src << "<b>Remember, your AI does NOT share or know about your law 0."
src << "<b>Remember, your AI does NOT share or know about your law 0.</b>"
else
src << "<b>No AI selected to sync laws with, disabling lawsync protocol.</b>"
lawupdate = 0
@@ -314,7 +314,7 @@
killswitch_time --
if(killswitch_time <= 0)
if(src.client)
src << "\red <B>Killswitch Activated"
src << "<span class='danger'>Killswitch Activated</span>"
killswitch = 0
spawn(5)
gib()
@@ -325,7 +325,7 @@
weaponlock_time --
if(weaponlock_time <= 0)
if(src.client)
src << "\red <B>Weapon Lock Timed Out!"
src << "<span class='danger'>Weapon Lock Timed Out!</span>"
weapon_lock = 0
weaponlock_time = 120
@@ -155,7 +155,7 @@
/mob/living/silicon/robot/proc/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
laws = new /datum/ai_laws/nanotrasen()
additional_law_channels += "Binary"
additional_law_channels["Binary"] = ":b"
var/new_ai = select_active_ai_with_fewest_borgs()
if(new_ai)
lawupdate = 1
@@ -214,7 +214,9 @@
mmi = null
if(connected_ai)
connected_ai.connected_robots -= src
..()
qdel(wires)
wires = null
return ..()
/mob/living/silicon/robot/proc/set_module_sprites(var/list/new_sprites)
module_sprites = new_sprites.Copy()
@@ -34,7 +34,7 @@ var/global/list/robot_modules = list(
var/list/obj/item/borg/upgrade/supported_upgrades = list()
// Bookkeeping
var/list/added_languages = list()
var/list/original_languages = list()
var/list/added_networks = list()
/obj/item/weapon/robot_module/New(var/mob/living/silicon/robot/R)
@@ -69,7 +69,7 @@ var/global/list/robot_modules = list(
for(var/module in modules)
qdel(module)
for(var/synth in synths)
qdel(synths)
qdel(synth)
modules.Cut()
synths.Cut()
qdel(emag)
@@ -105,14 +105,22 @@ var/global/list/robot_modules = list(
modules += O
/obj/item/weapon/robot_module/proc/add_languages(var/mob/living/silicon/robot/R)
// Stores the languages as they were before receiving the module, and whether they could be synthezized.
for(var/datum/language/language_datum in R.languages)
original_languages[language_datum] = (language_datum in R.speech_synthesizer_langs)
for(var/language in languages)
if(R.add_language(language, languages[language]))
added_languages |= language
R.add_language(language, languages[language])
/obj/item/weapon/robot_module/proc/remove_languages(var/mob/living/silicon/robot/R)
for(var/language in added_languages)
// Clear all added languages, whether or not we originally had them.
for(var/language in languages)
R.remove_language(language)
added_languages.Cut()
// Then add back all the original languages, and the relevant synthezising ability
for(var/original_language in original_languages)
R.add_language(original_language, original_languages[original_language])
original_languages.Cut()
/obj/item/weapon/robot_module/proc/add_camera_networks(var/mob/living/silicon/robot/R)
if(R.camera && (NETWORK_ROBOTS in R.camera.network))
+12 -13
View File
@@ -97,13 +97,6 @@
/mob/living/silicon/IsAdvancedToolUser()
return 1
/mob/living/silicon/blob_act()
if (src.stat != 2)
src.adjustBruteLoss(60)
src.updatehealth()
return 1
return 0
/mob/living/silicon/bullet_act(var/obj/item/projectile/Proj)
if(!Proj.nodamage)
@@ -201,16 +194,22 @@
return universal_speak || (speaking in src.speech_synthesizer_langs) //need speech synthesizer support to vocalize a language
/mob/living/silicon/add_language(var/language, var/can_speak=1)
if (..(language) && can_speak)
speech_synthesizer_langs.Add(all_languages[language])
var/var/datum/language/added_language = all_languages[language]
if(!added_language)
return
. = ..(language)
if (can_speak && (added_language in languages) && !(added_language in speech_synthesizer_langs))
speech_synthesizer_langs += added_language
return 1
/mob/living/silicon/remove_language(var/rem_language)
..(rem_language)
var/var/datum/language/removed_language = all_languages[rem_language]
if(!removed_language)
return
for (var/datum/language/L in speech_synthesizer_langs)
if (L.name == rem_language)
speech_synthesizer_langs -= L
..(rem_language)
speech_synthesizer_langs -= removed_language
/mob/living/silicon/check_languages()
set name = "Check Known Languages"
+1 -1
View File
@@ -76,7 +76,7 @@
set name = "Law Manager"
set category = "Subystems"
law_manager.ui_interact(usr, state = self_state)
law_manager.ui_interact(usr, state = conscious_state)
/********************
* Power Monitor *
@@ -34,9 +34,6 @@
/mob/living/captive_brain/emote(var/message)
return
/mob/living/captive_brain/can_resist()
return !(stat || !canClick())
/mob/living/captive_brain/process_resist()
//Resisting control by an alien mind.
if(istype(src.loc,/mob/living/simple_animal/borer))
@@ -59,7 +59,7 @@
if(istype(user, /mob/living/simple_animal/construct/builder))
if(health < maxHealth)
adjustBruteLoss(-5)
user.visible_message("<span class='notice'>\The [user]</b> mends some of \the [src]'s wounds.</span>")
user.visible_message("<span class='notice'>\The [user] mends some of \the [src]'s wounds.</span>")
else
user << "<span class='notice'>\The [src] is undamaged.</span>"
return
@@ -98,7 +98,7 @@
melee_damage_lower = 30
melee_damage_upper = 30
attacktext = "smashed their armoured gauntlet into"
mob_size = 20
mob_size = MOB_LARGE
speed = 3
environment_smash = 2
attack_sound = 'sound/weapons/heavysmash.ogg'
@@ -23,7 +23,7 @@
minbodytemp = 223 //Below -50 Degrees Celcius
maxbodytemp = 323 //Above 50 Degrees Celcius
holder_type = /obj/item/weapon/holder/cat
mob_size = 5
mob_size = MOB_SMALL
/mob/living/simple_animal/cat/Life()
//MICE!
@@ -5,7 +5,7 @@
icon_state = "crab"
icon_living = "crab"
icon_dead = "crab_dead"
small = 1
mob_size = MOB_SMALL
speak_emote = list("clicks")
emote_hear = list("clicks")
emote_see = list("clacks")
@@ -55,9 +55,9 @@
if(!pulledby)
var/obj/effect/plant/food
food = locate(/obj/effect/plant) in oview(5,loc)
food = locate(/obj/effect/plant) in oview(5,loc)
if(food)
var/step = get_step_to(src, food, 0)
var/step = get_step_to(src, food, 0)
Move(step)
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
@@ -167,7 +167,7 @@
health = 1
var/amount_grown = 0
pass_flags = PASSTABLE | PASSGRILLE
small = 1
mob_size = MOB_MINISCULE
/mob/living/simple_animal/chick/New()
..()
@@ -209,7 +209,7 @@ var/global/chicken_count = 0
var/eggsleft = 0
var/body_color
pass_flags = PASSTABLE
small = 1
mob_size = MOB_SMALL
/mob/living/simple_animal/chicken/New()
..()
@@ -5,7 +5,6 @@
icon_state = "lizard"
icon_living = "lizard"
icon_dead = "lizard-dead"
small = 1
speak_emote = list("hisses")
health = 5
maxHealth = 5
@@ -15,4 +14,4 @@
response_help = "pets"
response_disarm = "shoos"
response_harm = "stomps on"
mob_size = 1
mob_size = MOB_MINISCULE
@@ -10,7 +10,6 @@
emote_hear = list("squeeks","squeaks","squiks")
emote_see = list("runs in a circle", "shakes", "scritches at something")
pass_flags = PASSTABLE
small = 1
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
@@ -29,7 +28,7 @@
universal_speak = 0
universal_understand = 1
holder_type = /obj/item/weapon/holder/mouse
mob_size = 1
mob_size = MOB_MINISCULE
/mob/living/simple_animal/mouse/Life()
..()
@@ -4,7 +4,7 @@
icon_state = "mushroom"
icon_living = "mushroom"
icon_dead = "mushroom_dead"
small = 1
mob_size = MOB_SMALL
speak_chance = 0
turns_per_move = 1
maxHealth = 5
@@ -5,7 +5,7 @@
max_co2 = 0
minbodytemp = 0
maxbodytemp = 500
mob_size = 5
mob_size = MOB_SMALL
var/obj/item/device/radio/borg/radio = null
var/mob/living/silicon/ai/connected_ai = null
@@ -39,7 +39,6 @@
var/obj/item/held_item = null //Storage for single item they can hold.
speed = -1 //Spiderbots gotta go fast.
pass_flags = PASSTABLE
small = 1
speak_emote = list("beeps","clicks","chirps")
/mob/living/simple_animal/spiderbot/New()
@@ -132,7 +131,7 @@
else
attacked_with_item(O, user)
/mob/living/simple_animal/spiderbot/emag_act(var/remaining_charges, var/mob/user)
if (emagged)
user << "<span class='warning'>[src] is already overloaded - better run.</span>"
@@ -33,7 +33,7 @@
icon_living = "parrot_fly"
icon_dead = "parrot_dead"
pass_flags = PASSTABLE
small = 1
mob_size = MOB_SMALL
speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me")
speak_emote = list("squawks","says","yells")
@@ -285,7 +285,7 @@
if(meat_type && (stat == DEAD)) //if the animal has a meat, and if it is dead.
if(istype(O, /obj/item/weapon/material/knife) || istype(O, /obj/item/weapon/material/knife/butch))
harvest(user)
else
else
attacked_with_item(O, user)
//TODO: refactor mob attackby(), attacked_by(), and friends.
@@ -307,7 +307,7 @@
usr << "<span class='danger'>This weapon is ineffective, it does no damage.</span>"
visible_message("<span class='danger'>\The [src] has been attacked with \the [O] by [user].</span>")
user.do_attack_animation(src)
user.do_attack_animation(src)
/mob/living/simple_animal/movement_delay()
var/tally = 0 //Incase I need to add stuff other than "speed" later
@@ -396,7 +396,7 @@
for(var/i=0;i<actual_meat_amount;i++)
var/obj/item/meat = new meat_type(get_turf(src))
meat.name = "[src.name] [meat.name]"
if(small)
if(issmall(src))
user.visible_message("<span class='danger'>[user] chops up \the [src]!</span>")
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
qdel(src)
+2 -2
View File
@@ -17,10 +17,10 @@
spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!")
if(matches)
if(M.client)
message_admins("<font color='red'><B>Notice: </B><font color='blue'><A href='?src=\ref[usr];priv_msg=\ref[src]'>[key_name_admin(src)]</A> has the same [matches] as <A href='?src=\ref[usr];priv_msg=\ref[M]'>[key_name_admin(M)]</A>.</font>", 1)
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'><A href='?src=\ref[usr];priv_msg=\ref[src]'>[key_name_admin(src)]</A> has the same [matches] as <A href='?src=\ref[usr];priv_msg=\ref[M]'>[key_name_admin(M)]</A>.</font>", 1)
log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)].")
else
message_admins("<font color='red'><B>Notice: </B><font color='blue'><A href='?src=\ref[usr];priv_msg=\ref[src]'>[key_name_admin(src)]</A> has the same [matches] as [key_name_admin(M)] (no longer logged in). </font>", 1)
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'><A href='?src=\ref[usr];priv_msg=\ref[src]'>[key_name_admin(src)]</A> has the same [matches] as [key_name_admin(M)] (no longer logged in). </font>", 1)
log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).")
/mob/Login()
+1 -1
View File
@@ -966,7 +966,7 @@ mob/proc/yank_out_object()
var/mob/living/carbon/human/human_user = U
human_user.bloody_hands(H)
selection.loc = get_turf(src)
selection.forceMove(get_turf(src))
if(!(U.l_hand && U.r_hand))
U.put_in_hands(selection)
+4 -5
View File
@@ -89,7 +89,6 @@
var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas.
var/lastpuke = 0
var/unacidable = 0
var/small = 0
var/list/pinned = list() // List of things pinning this creature to walls (see living_defense.dm)
var/list/embedded = list() // Embedded items, since simple mobs don't have organs.
var/list/languages = list() // For speaking/listening.
@@ -215,12 +214,12 @@
var/stance_damage = 0 //Whether this mob's ability to stand has been affected
//Indicates if a clientless mob is actually an admin aghosting
var/mob/dead/observer/aghosted = null
//If set, indicates that the client "belonging" to this (clientless) mob is currently controlling some other mob
//so don't treat them as being SSD even though their client var is null.
var/mob/teleop = null
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/list/shouldnt_see = list() //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes
var/list/active_genes=list()
var/mob_size = MOB_MEDIUM
+6 -6
View File
@@ -91,15 +91,15 @@
var/damage = 20
var/obj/item/clothing/hat = attacker.head
if(istype(hat))
damage += hat.force * 10
damage += hat.force * 3
var/armor = target.run_armor_check("head", "melee")
target.apply_damage(damage*rand(90, 110)/100, BRUTE, "head", armor)
attacker.apply_damage(10*rand(90, 110)/100, BRUTE, "head", attacker.run_armor_check("head", "melee"))
target.apply_damage(damage, BRUTE, "head", armor)
attacker.apply_damage(10, BRUTE, "head", attacker.run_armor_check("head", "melee"))
if(!armor && prob(damage))
if(!armor && target.headcheck("head") && prob(damage))
target.apply_effect(20, PARALYZE)
target.visible_message("<span class='danger'>[target] has been knocked unconscious!</span>")
target.visible_message("<span class='danger'>[target] [target.species.knockout_message]</span>")
playsound(attacker.loc, "swing_hit", 25, 1, -1)
attacker.attack_log += text("\[[time_stamp()]\] <font color='red'>Headbutted [target.name] ([target.ckey])</font>")
@@ -149,7 +149,7 @@
if(istype(H) && H.species.gluttonous)
if(H.species.gluttonous == 2)
can_eat = 2
else if(!ishuman(target) && !issmall(target) && (target.small || iscarbon(target)))
else if((H.mob_size > target.mob_size) && !ishuman(target) && iscarbon(target))
can_eat = 1
if(can_eat)
+12 -127
View File
@@ -1,14 +1,4 @@
// fun if you want to typecast humans/monkeys/etc without writing long path-filled lines.
/proc/ishuman(A)
if(istype(A, /mob/living/carbon/human))
return 1
return 0
/proc/isalien(A)
if(istype(A, /mob/living/carbon/alien))
return 1
return 0
/proc/isxenomorph(A)
if(istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/H = A
@@ -16,85 +6,12 @@
return 0
/proc/issmall(A)
if(A && istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/H = A
if(H.species && H.species.is_small)
return 1
if(A && istype(A, /mob/living))
var/mob/living/L = A
return L.mob_size <= MOB_SMALL
return 0
/proc/isbrain(A)
if(A && istype(A, /mob/living/carbon/brain))
return 1
return 0
/proc/isslime(A)
if(istype(A, /mob/living/carbon/slime))
return 1
return 0
/proc/isrobot(A)
if(istype(A, /mob/living/silicon/robot))
return 1
return 0
/proc/isanimal(A)
if(istype(A, /mob/living/simple_animal))
return 1
return 0
/proc/iscorgi(A)
if(istype(A, /mob/living/simple_animal/corgi))
return 1
return 0
/proc/iscrab(A)
if(istype(A, /mob/living/simple_animal/crab))
return 1
return 0
/proc/iscat(A)
if(istype(A, /mob/living/simple_animal/cat))
return 1
return 0
/proc/ismouse(A)
if(istype(A, /mob/living/simple_animal/mouse))
return 1
return 0
/proc/isbear(A)
if(istype(A, /mob/living/simple_animal/hostile/bear))
return 1
return 0
/proc/iscarp(A)
if(istype(A, /mob/living/simple_animal/hostile/carp))
return 1
return 0
/proc/isclown(A)
if(istype(A, /mob/living/simple_animal/hostile/retaliate/clown))
return 1
return 0
/mob/proc/isSilicon()
return 0
/mob/living/silicon/isSilicon()
return 1
/proc/isAI(A)
if(istype(A, /mob/living/silicon/ai))
return 1
return 0
/mob/proc/isMobAI()
return 0
/mob/living/silicon/ai/isMobAI()
return 1
/mob/proc/isSynthetic()
/mob/living/proc/isSynthetic()
return 0
/mob/living/carbon/human/isSynthetic()
@@ -107,56 +24,18 @@
/mob/living/silicon/isSynthetic()
return 1
/mob/living/carbon/human/isMonkey()
return istype(species, /datum/species/monkey)
/mob/proc/isMonkey()
return 0
/mob/living/carbon/human/isMonkey()
return istype(species, /datum/species/monkey)
/proc/ispAI(A)
if(istype(A, /mob/living/silicon/pai))
return 1
return 0
/proc/iscarbon(A)
if(istype(A, /mob/living/carbon))
return 1
return 0
/proc/issilicon(A)
if(istype(A, /mob/living/silicon))
return 1
return 0
/proc/isliving(A)
if(istype(A, /mob/living))
return 1
return 0
proc/isobserver(A)
if(istype(A, /mob/dead/observer))
return 1
return 0
proc/isorgan(A)
if(istype(A, /obj/item/organ/external))
return 1
return 0
proc/isdeaf(A)
if(istype(A, /mob))
var/mob/M = A
return (M.sdisabilities & DEAF) || M.ear_deaf
return 0
proc/isnewplayer(A)
if(istype(A, /mob/new_player))
return 1
return 0
proc/hasorgans(A) // Fucking really??
return ishuman(A)
@@ -410,7 +289,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
/proc/shake_camera(mob/M, duration, strength=1)
if(!M || !M.client || M.shakecamera)
if(!M || !M.client || M.shakecamera || M.stat || isEye(M) || isAI(M))
return
M.shakecamera = 1
spawn(1)
@@ -626,6 +505,12 @@ proc/is_blind(A)
return 0
/mob/living/carbon/assess_perp(var/obj/access_obj, var/check_access, var/auth_weapons, var/check_records, var/check_arrest)
if(handcuffed)
return SAFE_PERP
return ..()
/mob/living/carbon/human/assess_perp(var/obj/access_obj, var/check_access, var/auth_weapons, var/check_records, var/check_arrest)
var/threatcount = ..()
if(. == SAFE_PERP)
@@ -638,7 +523,7 @@ proc/is_blind(A)
// A proper CentCom id is hard currency.
else if(id && istype(id, /obj/item/weapon/card/id/centcom))
return SAFE_PERP
if(check_access && !access_obj.allowed(src))
threatcount += 4
+5 -5
View File
@@ -176,7 +176,7 @@
if(!mob.control_object) return
mob.control_object.dir = direct
else
mob.control_object.loc = get_step(mob.control_object,direct)
mob.control_object.forceMove(get_step(mob.control_object,direct))
return
@@ -382,7 +382,7 @@
mob << "<span class='warning'>You cannot get past holy grounds while you are in this plane of existence!</span>"
return
else
mob.loc = get_step(mob, direct)
mob.forceMove(get_step(mob, direct))
mob.dir = direct
if(2)
if(prob(50))
@@ -411,7 +411,7 @@
return
else
return
mob.loc = locate(locx,locy,mobloc.z)
mob.forceMove(locate(locx,locy,mobloc.z))
spawn(0)
var/limit = 2//For only two trailing shadows.
for(var/turf/T in getline(mobloc, mob.loc))
@@ -422,7 +422,7 @@
else
spawn(0)
anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir)
mob.loc = get_step(mob, direct)
mob.forceMove(get_step(mob, direct))
mob.dir = direct
// Crossed is always a bit iffy
for(var/obj/S in mob.loc)
@@ -457,7 +457,7 @@
return 0
//Check to see if we slipped
if(prob(Process_Spaceslipping(5)))
if(prob(Process_Spaceslipping(5)) && !buckled)
src << "\blue <B>You slipped!</B>"
src.inertia_dir = src.last_move
step(src, src.inertia_dir)
+9 -15
View File
@@ -1,3 +1,9 @@
/var/atom/movable/lobby_image = new /atom/movable{icon = 'icons/misc/title.dmi'; icon_state = "title"; screen_loc = "1,1"; name = "Baystation12"}
/mob/new_player
var/client/my_client // Need to keep track of this ourselves, since by the time Logout() is called the client has already been nulled
/mob/new_player/Login()
update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying
if(join_motd)
@@ -8,24 +14,12 @@
mind.active = 1
mind.current = src
if(length(newplayer_start))
loc = pick(newplayer_start)
else
loc = locate(1,1,1)
lastarea = loc
loc = null
client.screen += lobby_image
my_client = client
sight |= SEE_TURFS
player_list |= src
/*
var/list/watch_locations = list()
for(var/obj/effect/landmark/landmark in landmarks_list)
if(landmark.tag == "landmark*new_player")
watch_locations += landmark.loc
if(watch_locations.len>0)
loc = pick(watch_locations)
*/
new_player_panel()
spawn(40)
if(client)
+7 -1
View File
@@ -1,7 +1,13 @@
/mob/new_player/Logout()
ready = 0
// see login.dm
if(my_client)
my_client.screen -= lobby_image
my_client = null
..()
if(!spawning)//Here so that if they are spawning and log out, the other procs can play out and they will have a mob to come back to.
key = null//We null their key before deleting the mob, so they are properly kicked out.
qdel(src)
return
return
+2 -18
View File
@@ -330,23 +330,7 @@
return
//Find our spawning point.
var/join_message
var/datum/spawnpoint/S
if(spawning_at)
S = spawntypes[spawning_at]
if(S && istype(S))
if(S.check_job_spawning(rank))
character.loc = pick(S.turfs)
join_message = S.msg
else
character << "Your chosen spawnpoint ([S.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead."
character.loc = pick(latejoin)
join_message = "has arrived on the station"
else
character.loc = pick(latejoin)
join_message = "has arrived on the station"
var/join_message = job_master.LateSpawn(character, rank)
character.lastarea = get_area(loc)
// Moving wheelchair if they have one
@@ -486,7 +470,7 @@
src << browse(null, "window=playersetup") //closes the player setup window
proc/has_admin_rights()
return client.holder.rights & R_ADMIN
return check_rights(R_ADMIN, 0, src)
proc/is_species_whitelisted(datum/species/S)
if(!S) return 1
+40 -20
View File
@@ -55,32 +55,52 @@
/obj/structure/stairs
name = "Stairs"
desc = "Stairs. You walk up and down them."
icon_state = "rampbottom"
icon = 'icons/obj/structures.dmi'
desc = "Stairs leading to another deck. Not too useful if the gravity goes out."
icon = 'icons/obj/stairs.dmi'
density = 0
opacity = 0
anchored = 1
var/obj/structure/stairs/connected
New()
..()
var/turf/above = GetAbove(src)
if(istype(above, /turf/space))
above.ChangeTurf(/turf/simulated/open)
initialize()
var/updown = icon_state == "rampbottom" ? UP : DOWN
for(var/turf/turf in locs)
var/turf/simulated/open/above = GetAbove(turf)
if(!above)
warning("Stair created without level above: ([loc.x], [loc.y], [loc.z])")
return qdel(src)
if(!istype(above))
above.ChangeTurf(/turf/simulated/open)
var/turf/T = get_step(src, dir | updown)
connected = locate() in T
ASSERT(connected)
Uncross(var/atom/movable/M)
if(connected && M.dir == dir)
M.loc = connected.loc
Uncross(atom/movable/A)
if(A.dir == dir)
// This is hackish but whatever.
var/turf/target = get_step(GetAbove(A), dir)
var/turf/source = A.loc
if(target.Enter(A, source))
A.loc = target
target.Entered(A, source)
return 0
return 1
CanPass(obj/mover, turf/source, height, airflow)
return airflow || !density
return airflow || !density
// type paths to make mapping easier.
north
dir = NORTH
bound_height = 64
bound_y = -32
pixel_y = -32
south
dir = SOUTH
bound_height = 64
east
dir = EAST
bound_width = 64
bound_x = -32
pixel_x = -32
west
dir = WEST
bound_width = 64
+6 -6
View File
@@ -11,10 +11,10 @@
var/list/underlay_references
var/global/overlay_map = list()
/turf/simulated/open/New()
. = ..()
ASSERT(HasBelow(z))
/turf/simulated/open/initialize()
..()
below = GetBelow(src)
ASSERT(HasBelow(z))
/turf/simulated/open/Entered(var/atom/movable/mover)
// only fall down in defined areas (read: areas with artificial gravitiy)
@@ -29,7 +29,7 @@
return
// Prevent pipes from falling into the void... if there is a pipe to support it.
if(istype(mover, /obj/item/pipe) && \
if(mover.anchored || istype(mover, /obj/item/pipe) && \
(locate(/obj/structure/disposalpipe/up) in below) || \
locate(/obj/machinery/atmospherics/pipe/zpipe/up in below))
return
@@ -54,9 +54,9 @@
if(!soft)
if(!istype(mover, /mob))
if(istype(below, /turf/simulated/open))
below.visible_message("\The [mover] falls from the deck above through \the [below]!", "You hear a whoosh of displaced air.")
mover.visible_message("\The [mover] falls from the deck above through \the [below]!", "You hear a whoosh of displaced air.")
else
below.visible_message("\The [mover] falls from the deck above and slams into \the [below]!", "You hear something slam into the deck.")
mover.visible_message("\The [mover] falls from the deck above and slams into \the [below]!", "You hear something slam into the deck.")
else
var/mob/M = mover
if(istype(below, /turf/simulated/open))

Some files were not shown because too many files have changed in this diff Show More