Fix merge conflicts

This commit is contained in:
DZD
2015-08-21 18:38:42 -04:00
328 changed files with 5474 additions and 4122 deletions
+1
View File
@@ -10,6 +10,7 @@
item_state = "electronic"
flags = CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
origin_tech = "magnets=4;biotech=2"
var/scanning = 0
var/list/log = list()
+9 -9
View File
@@ -48,7 +48,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
computerid = bancid
ip = banip
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_player WHERE ckey = '[ckey]'")
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
query.Execute()
var/validckey = 0
if(query.NextRow())
@@ -83,7 +83,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
reason = sql_sanitize_text(reason)
var/sql = "INSERT INTO erro_ban (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)"
var/sql = "INSERT INTO [format_table_name("ban")] (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)"
var/DBQuery/query_insert = dbcon.NewQuery(sql)
query_insert.Execute()
usr << "\blue Ban saved to database."
@@ -125,7 +125,7 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
else
bantype_sql = "bantype = '[bantype_str]'"
var/sql = "SELECT id FROM erro_ban WHERE ckey = '[ckey]' AND [bantype_sql] AND (unbanned is null OR unbanned = false)"
var/sql = "SELECT id FROM [format_table_name("ban")] WHERE ckey = '[ckey]' AND [bantype_sql] AND (unbanned is null OR unbanned = false)"
if(job)
sql += " AND job = '[job]'"
@@ -166,7 +166,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
usr << "Cancelled"
return
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, duration, reason FROM erro_ban WHERE id = [banid]")
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, duration, reason FROM [format_table_name("ban")] WHERE id = [banid]")
query.Execute()
var/eckey = usr.ckey //Editing admin ckey
@@ -194,7 +194,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
usr << "Cancelled"
return
var/DBQuery/update_query = dbcon.NewQuery("UPDATE erro_ban SET reason = '[value]', edits = CONCAT(edits,'- [eckey] changed ban reason from <cite><b>\\\"[reason]\\\"</b></cite> to <cite><b>\\\"[value]\\\"</b></cite><BR>') WHERE id = [banid]")
var/DBQuery/update_query = dbcon.NewQuery("UPDATE [format_table_name("ban")] SET reason = '[value]', edits = CONCAT(edits,'- [eckey] changed ban reason from <cite><b>\\\"[reason]\\\"</b></cite> to <cite><b>\\\"[value]\\\"</b></cite><BR>') WHERE id = [banid]")
update_query.Execute()
message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s reason from [reason] to [value]",1)
if("duration")
@@ -204,7 +204,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
usr << "Cancelled"
return
var/DBQuery/update_query = dbcon.NewQuery("UPDATE erro_ban SET duration = [value], edits = CONCAT(edits,'- [eckey] changed ban duration from [duration] to [value]<br>'), expiration_time = DATE_ADD(bantime, INTERVAL [value] MINUTE) WHERE id = [banid]")
var/DBQuery/update_query = dbcon.NewQuery("UPDATE [format_table_name("ban")] SET duration = [value], edits = CONCAT(edits,'- [eckey] changed ban duration from [duration] to [value]<br>'), expiration_time = DATE_ADD(bantime, INTERVAL [value] MINUTE) WHERE id = [banid]")
message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s duration from [duration] to [value]",1)
update_query.Execute()
if("unban")
@@ -222,7 +222,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
if(!check_rights(R_BAN)) return
var/sql = "SELECT ckey FROM erro_ban WHERE id = [id]"
var/sql = "SELECT ckey FROM [format_table_name("ban")] WHERE id = [id]"
establish_db_connection()
if(!dbcon.IsConnected())
@@ -252,7 +252,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
var/unban_computerid = src.owner:computer_id
var/unban_ip = src.owner:address
var/sql_update = "UPDATE erro_ban SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = '[unban_ip]' WHERE id = [id]"
var/sql_update = "UPDATE [format_table_name("ban")] SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = '[unban_ip]' WHERE id = [id]"
message_admins("[key_name_admin(usr)] has lifted [pckey]'s ban.",1)
var/DBQuery/query_update = dbcon.NewQuery(sql_update)
@@ -410,7 +410,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
bantypesearch += "'PERMABAN' "
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")
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 [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch] [ipsearch] [cidsearch] [bantypesearch] ORDER BY bantime DESC LIMIT 100")
select_query.Execute()
while(select_query.NextRow())
+2 -2
View File
@@ -6,7 +6,7 @@ world/IsBanned(key,address,computer_id)
//Guest Checking
if(!guests_allowed && IsGuestKey(key))
log_access("Failed Login: [key] - Guests not allowed")
message_admins("\blue Failed Login: [key] - Guests not allowed")
// message_admins("\blue Failed Login: [key] - Guests not allowed")
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
//check if the IP address is a known TOR node
@@ -51,7 +51,7 @@ world/IsBanned(key,address,computer_id)
failedcid = 0
cidquery = " OR computerid = '[computer_id]' "
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM [format_table_name("ban")] WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
query.Execute()
+6 -5
View File
@@ -44,7 +44,7 @@ var/global/nologevent = 0
body += "<body>Options panel for <b>[M]</b>"
if(M.client)
body += " played by <b>[M.client]</b> "
body += "\[<A href='?src=\ref[src];editrights=show'>[M.client.holder ? M.client.holder.rank : "Player"]</A>\]"
body += "\[<A href='?src=\ref[src];editrights=rank;ckey=[M.ckey]'>[M.client.holder ? M.client.holder.rank : "Player"]</A>\]"
if(istype(M, /mob/new_player))
body += " <B>Hasn't Entered Game</B> "
@@ -64,7 +64,8 @@ var/global/nologevent = 0
<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> |
<A href='?src=\ref[src];jobban2=\ref[M]'>Jobban</A> |
<A href='?src=\ref[src];appearanceban=\ref[M]'>Appearance Ban</A> |
<A href='?src=\ref[src];notes=show;mob=\ref[M]'>Notes</A>
<A href='?src=\ref[src];notes=show;mob=\ref[M]'>Notes</A> |
<A href='?_src_=holder;watchlist=\ref[M]'>Watchlist Flag</A>
"}
if(M.client)
@@ -121,7 +122,7 @@ var/global/nologevent = 0
<A href='?src=\ref[src];makemask=\ref[M]'>Make Mask</A> |
<A href='?src=\ref[src];makerobot=\ref[M]'>Make Robot</A> |
<A href='?src=\ref[src];makealien=\ref[M]'>Make Alien</A> |
<A href='?src=\ref[src];makeslime=\ref[M]'>Make slime</A>
<A href='?src=\ref[src];makeslime=\ref[M]'>Make Slime</A> |
<A href='?src=\ref[src];makesuper=\ref[M]'>Make Superhero</A>
"}
@@ -1006,7 +1007,6 @@ proc/formatPlayerPanel(var/mob/U,var/text="PP")
if (!frommob.ckey)
return 0
var/question = ""
if (tomob.ckey)
question = "This mob already has a user ([tomob.key]) in control of it! "
@@ -1029,4 +1029,5 @@ proc/formatPlayerPanel(var/mob/U,var/text="PP")
tomob.ckey = frommob.ckey
qdel(frommob)
return 1
return 1
+16 -2
View File
@@ -23,10 +23,10 @@
if(!message) return
var/F = investigate_subject2file(subject)
if(!F) return
F << "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
//ADMINVERBS
/client/proc/investigate_show( subject in list("hrefs","pda","singulo","gold core","cult") )
/client/proc/investigate_show( subject in list("hrefs","pda","singulo","atmos","ntsl","gold core","cult") )
set name = "Investigate"
set category = "Admin"
if(!holder) return
@@ -57,6 +57,20 @@
src << browse(F,"window=investigate[subject];size=800x300")
if("cult")
var/F = investigate_subject2file(subject)
if(!F)
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
return
src << browse(F,"window=investigate[subject];size=800x300")
if("atmos")
var/F = investigate_subject2file(subject)
if(!F)
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
return
src << browse(F,"window=investigate[subject];size=800x300")
if("ntsl")
var/F = investigate_subject2file(subject)
if(!F)
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
+2 -1
View File
@@ -27,7 +27,8 @@
if( findtext(memo,"<script",1,0) )
return
F[ckey] << "[key] on [time2text(world.realtime,"(DDD) DD MMM hh:mm")]<br>[memo]"
message_admins("[key] set an admin memo:<br>[memo]")
log_admin("[key_name(usr)] set an admin memo:<br>[memo]")
message_admins("[key_name_admin(usr)] set an admin memo:<br>[memo]")
//show all memos
/client/proc/admin_memo_show()
+2 -1
View File
@@ -61,6 +61,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
//clear the datums references
admin_datums.Cut()
for(var/client/C in admins)
C.remove_admin_verbs()
C.holder = null
admins.Cut()
@@ -108,7 +109,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
load_admins()
return
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, rank, level, flags FROM erro_admin")
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, rank, level, flags FROM [format_table_name("admin")]")
query.Execute()
while(query.NextRow())
var/ckey = query.item[1]
+98 -6
View File
@@ -2,6 +2,7 @@
var/list/admin_verbs_default = list(
// /datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/
/client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/
/client/proc/hide_verbs, /*hides all our adminverbs*/
// /client/proc/check_antagonists, /*shows all antags*/
// /client/proc/deadchat /*toggles deadchat on/off*/
/client/proc/cmd_mentor_check_new_players
@@ -202,6 +203,48 @@ var/list/admin_verbs_mentor = list(
if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn
if(holder.rights & R_MOD) verbs += admin_verbs_mod
if(holder.rights & R_MENTOR) verbs += admin_verbs_mentor
/client/proc/remove_admin_verbs()
verbs.Remove(
admin_verbs_default,
/client/proc/togglebuildmodeself,
admin_verbs_admin,
admin_verbs_ban,
admin_verbs_event,
admin_verbs_server,
admin_verbs_debug,
admin_verbs_possess,
admin_verbs_permissions,
/client/proc/stealth,
admin_verbs_rejuv,
admin_verbs_sounds,
admin_verbs_spawn,
admin_verbs_mod,
admin_verbs_mentor,
admin_verbs_show_debug_verbs,
/client/proc/readmin,
)
/client/proc/hide_verbs()
set name = "Adminverbs - Hide All"
set category = "Admin"
remove_admin_verbs()
verbs += /client/proc/show_verbs
src << "<span class='interface'>Almost all of your adminverbs have been hidden.</span>"
feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/client/proc/show_verbs()
set name = "Adminverbs - Show"
set category = "Admin"
verbs -= /client/proc/show_verbs
add_admin_verbs()
src << "<span class='interface'>All of your adminverbs are now visible.</span>"
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/admin_ghost()
set category = "Admin"
@@ -401,7 +444,7 @@ var/list/admin_verbs_mentor = list(
if(flash_range == null)
return
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, 1, 1)
message_admins("<span class='adminnotice'>[ckey] creating an admin explosion at [epicenter.loc].</span>")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] creating an admin explosion at [epicenter.loc].</span>")
feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/give_spell(mob/T as mob in mob_list) // -- Urist
@@ -526,12 +569,61 @@ var/list/admin_verbs_mentor = list(
set category = "Admin"
if(holder)
if(alert("Confirm self-deadmin for the round? You can't re-admin yourself without someont promoting you.",,"Yes","No") == "Yes")
log_admin("[src] deadmined themself.")
message_admins("[src] deadmined themself.", 1)
deadmin()
src << "<span class='interface'>You are now a normal player.</span>"
log_admin("[key_name(usr)] deadmined themself.")
message_admins("[key_name_admin(usr)] deadmined themself.")
deadmin()
verbs += /client/proc/readmin
deadmins += ckey
src << "<span class='interface'>You are now a normal player.</span>"
feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/readmin()
set name = "Re-admin self"
set category = "Admin"
set desc = "Regain your admin powers."
var/datum/admins/D = admin_datums[ckey]
var/rank = null
if(config.admin_legacy_system)
//load text from file
var/list/Lines = file2list("config/admins.txt")
for(var/line in Lines)
var/list/splitline = text2list(line, " - ")
if(n_lower(splitline[1]) == ckey)
if(splitline.len >= 2)
rank = ckeyEx(splitline[2])
break
continue
else
if(!dbcon.IsConnected())
message_admins("Warning, mysql database is not connected.")
src << "Warning, mysql database is not connected."
return
var/sql_ckey = sanitizeSQL(ckey)
var/DBQuery/query = dbcon.NewQuery("SELECT rank FROM [format_table_name("admin")] WHERE ckey = '[sql_ckey]'")
query.Execute()
while(query.NextRow())
rank = ckeyEx(query.item[1])
if(!D)
if(admin_ranks[rank] == null)
var/error_extra = ""
if(!config.admin_legacy_system)
error_extra = " Check mysql DB connection."
error("Error while re-adminning [src], admin rank ([rank]) does not exist.[error_extra]")
src << "Error while re-adminning, admin rank ([rank]) does not exist.[error_extra]"
return
D = new(rank,admin_ranks[rank],ckey)
var/client/C = directory[ckey]
D.associate(C)
message_admins("[key_name_admin(usr)] re-adminned themselves.")
log_admin("[key_name(usr)] re-adminned themselves.")
deadmins -= ckey
feedback_add_details("admin_verb","RAS")
return
else
src << "You are already an admin."
verbs -= /client/proc/readmin
deadmins -= ckey
return
/client/proc/toggle_log_hrefs()
set name = "Toggle href logging"
+2 -2
View File
@@ -59,7 +59,7 @@ DEBUG
return
//appearance bans
var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM erro_ban WHERE bantype = 'APPEARANCE_BAN' AND NOT unbanned = 1")
var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM [format_table_name("ban")] WHERE bantype = 'APPEARANCE_BAN' AND NOT unbanned = 1")
query.Execute()
while(query.NextRow())
@@ -101,7 +101,7 @@ proc/DB_ban_isappearancebanned(var/playerckey)
var/sqlplayerckey = sql_sanitize_text(ckey(playerckey))
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_ban WHERE CKEY = '[sqlplayerckey]' AND ((bantype = 'APPEARANCE_BAN') OR (bantype = 'APPEARANCE_TEMPBAN' AND expiration_time > Now())) AND unbanned != 1")
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("ban")] WHERE CKEY = '[sqlplayerckey]' AND ((bantype = 'APPEARANCE_BAN') OR (bantype = 'APPEARANCE_TEMPBAN' AND expiration_time > Now())) AND unbanned != 1")
query.Execute()
while(query.NextRow())
return 1
+2 -2
View File
@@ -71,7 +71,7 @@ DEBUG
return
//Job permabans
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, job FROM erro_ban WHERE bantype = 'JOB_PERMABAN' AND isnull(unbanned)")
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, job FROM [format_table_name("ban")] WHERE bantype = 'JOB_PERMABAN' AND isnull(unbanned)")
query.Execute()
while(query.NextRow())
@@ -81,7 +81,7 @@ DEBUG
jobban_keylist.Add("[ckey] - [job]")
//Job tempbans
var/DBQuery/query1 = dbcon.NewQuery("SELECT ckey, job FROM erro_ban WHERE bantype = 'JOB_TEMPBAN' AND isnull(unbanned) AND expiration_time > Now()")
var/DBQuery/query1 = dbcon.NewQuery("SELECT ckey, job FROM [format_table_name("ban")] WHERE bantype = 'JOB_TEMPBAN' AND isnull(unbanned) AND expiration_time > Now()")
query1.Execute()
while(query1.NextRow())
+1 -1
View File
@@ -17,7 +17,7 @@
if(H.cl == M.client)
qdel(H)
else
message_admins("[key_name(usr)] has entered build mode.")
message_admins("[key_name_admin(usr)] has entered build mode.")
log_admin("[key_name(usr)] has entered build mode.")
M.client.buildmode = 1
M.client.show_popup_menus = 0
+10 -15
View File
@@ -1,4 +1,5 @@
/var/create_object_html = null
var/create_object_html = null
var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/effect, /obj/item, /obj/mecha, /obj/item/weapon, /obj/item/clothing, /obj/item/stack, /obj/item/device, /obj/item/weapon/reagent_containers, /obj/item/weapon/gun)
/datum/admins/proc/create_object(var/mob/user)
if (!create_object_html)
@@ -9,20 +10,14 @@
user << browse(replacetext(create_object_html, "/* ref src */", "\ref[src]"), "window=create_object;size=425x475")
/datum/admins/proc/quick_create_object(var/mob/user)
var/path = input("Select the path of the object you wish to create.", "Path", /obj) in create_object_forms
var/html_form = create_object_forms[path]
var/quick_create_object_html = null
var/pathtext = null
if (!html_form)
var/objectjs = list2text(typesof(path), ";")
html_form = file2text('html/create_object.html')
html_form = replacetext(html_form, "null /* object types */", "\"[objectjs]\"")
create_object_forms[path] = html_form
pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") in list("/obj","/obj/structure","/obj/item","/obj/item/weapon","/obj/item/clothing","/obj/machinery","/obj/mecha")
var path = text2path(pathtext)
if (!quick_create_object_html)
var/objectjs = null
objectjs = list2text(typesof(path), ";")
quick_create_object_html = file2text('html/create_object.html')
quick_create_object_html = replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
user << browse(replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=425x475")
user << browse(replacetext(html_form, "/* ref src */", "\ref[src]"), "window=qco[path];size=425x475")
+10 -2
View File
@@ -28,11 +28,13 @@ var/list/admin_datums = list()
owner = C
owner.holder = src
owner.add_admin_verbs() //TODO
owner.verbs -= /client/proc/readmin
admins |= C
/datum/admins/proc/disassociate()
if(owner)
admins -= owner
owner.remove_admin_verbs()
owner.holder = null
owner = null
@@ -78,11 +80,17 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
usr << "<font color='red'>Error: Cannot proceed. They have more or equal rights to us.</font>"
return 0
/client/proc/deadmin()
admin_datums -= ckey
if(holder)
holder.disassociate()
del(holder)
return 1
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
/proc/check_rights_for(client/subject, rights_required)
if(subject && subject.holder)
if(rights_required && !(rights_required & subject.holder.rights))
return 0
return 1
return 0
@@ -76,7 +76,7 @@
if(!istext(adm_ckey) || !istext(new_rank))
return
var/DBQuery/select_query = dbcon.NewQuery("SELECT id FROM erro_admin WHERE ckey = '[adm_ckey]'")
var/DBQuery/select_query = dbcon.NewQuery("SELECT id FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
select_query.Execute()
var/new_admin = 1
@@ -86,16 +86,16 @@
admin_id = text2num(select_query.item[1])
if(new_admin)
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO `erro_admin` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("admin")] (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.[format_table_name("admin_log")] (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
log_query.Execute()
usr << "\blue New admin added."
else
if(!isnull(admin_id) && isnum(admin_id))
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET rank = '[new_rank]' WHERE id = [admin_id]")
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE [format_table_name("admin")] SET rank = '[new_rank]' WHERE id = [admin_id]")
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.[format_table_name("admin_log")] (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
log_query.Execute()
usr << "\blue Admin rank changed."
@@ -128,7 +128,7 @@
if(!istext(adm_ckey) || !isnum(new_permission))
return
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, flags FROM erro_admin WHERE ckey = '[adm_ckey]'")
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, flags FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
select_query.Execute()
var/admin_id
@@ -141,14 +141,24 @@
return
if(admin_rights & new_permission) //This admin already has this permission, so we are removing it.
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET flags = [admin_rights & ~new_permission] WHERE id = [admin_id]")
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE [format_table_name("admin")] SET flags = [admin_rights & ~new_permission] WHERE id = [admin_id]")
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.[format_table_name("admin_log")] (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
log_query.Execute()
usr << "\blue Permission removed."
else //This admin doesn't have this permission, so we are adding it.
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET flags = '[admin_rights | new_permission]' WHERE id = [admin_id]")
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE [format_table_name("admin")] SET flags = '[admin_rights | new_permission]' WHERE id = [admin_id]")
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')")
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.[format_table_name("admin_log")] (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')")
log_query.Execute()
usr << "\blue Permission added."
usr << "\blue Permission added."
/datum/admins/proc/updateranktodb(ckey,newrank)
establish_db_connection()
if (!dbcon.IsConnected())
return
var/sql_ckey = sanitizeSQL(ckey)
var/sql_admin_rank = sanitizeSQL(newrank)
var/DBQuery/query_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sql_admin_rank]' WHERE ckey = '[sql_ckey]'")
query_update.Execute()
+2 -2
View File
@@ -81,9 +81,9 @@
body += "<a href='?src=\ref[src];traitor="+ref+"'>TP</a> - "
body += "<a href='?src=\ref[usr];priv_msg=\ref"+ref+"'>PM</a> - "
body += "<a href='?src=\ref[src];subtlemessage="+ref+"'>SM</a> - "
body += "<a href='?src=\ref[src];adminplayerobservejump="+ref+"'>JMP</a>"
body += "<a href='?src=\ref[src];adminplayerobservefollow="+ref+"'>FLW</a>"
if(eyeref)
body += "|<a href='?src=\ref[src];adminplayerobservejump="+eyeref+"'>EYE</a>"
body += "|<a href='?src=\ref[src];adminplayerobservefollow="+eyeref+"'>EYE</a>"
body += "<br>"
if(antagonist > 0)
body += "<font size='2'><a href='?src=\ref[src];check_antagonist=1'><font color='red'><b>Antagonist</b></font></a></font>";
+129 -70
View File
@@ -3,7 +3,7 @@
if(usr.client != src.owner || !check_rights(0))
log_admin("[key_name(usr)] tried to use the admin panel without authorization.")
message_admins("[usr.key] has attempted to override the admin panel!")
message_admins("[key_name_admin(usr)] has attempted to override the admin panel!")
return
if(ticker.mode && ticker.mode.check_antagonists_topic(href, href_list))
@@ -124,7 +124,7 @@
if(bancid)
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")
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")
DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey, banip, bancid )
@@ -160,6 +160,7 @@
admin_datums -= adm_ckey
D.disassociate()
updateranktodb(adm_ckey, "player")
message_admins("[key_name_admin(usr)] removed [adm_ckey] from the admins list")
log_admin("[key_name(usr)] removed [adm_ckey] from the admins list")
log_admin_rank_modification(adm_ckey, "Removed")
@@ -204,6 +205,7 @@
var/client/C = directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
D.associate(C) //link up with the client and add verbs
updateranktodb(adm_ckey, new_rank)
message_admins("[key_name_admin(usr)] edited the admin rank of [adm_ckey] to [new_rank]")
log_admin("[key_name(usr)] edited the admin rank of [adm_ckey] to [new_rank]")
log_admin_rank_modification(adm_ckey, new_rank)
@@ -278,7 +280,7 @@
ticker.delay_end = !ticker.delay_end
log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
message_admins("\blue [key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
message_admins("\blue [key_name_admin(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
href_list["secretsadmin"] = "check_antagonist"
else if(href_list["simplemake"])
@@ -1000,8 +1002,8 @@
M << "\red To try to resolve this matter head to [config.banappeals]"
else
M << "\red No ban appeals URL has been set."
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
log_admin("[key_name(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
message_admins("\blue [key_name_admin(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
del(M.client)
//del(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
@@ -1022,8 +1024,8 @@
else
M << "\red No ban appeals URL has been set."
ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.")
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
log_admin("[key_name(usr)] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
message_admins("\blue[key_name_admin(usr)] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
feedback_inc("ban_perma",1)
DB_ban_record(BANTYPE_PERMA, M, -1, reason)
@@ -1032,6 +1034,63 @@
if("Cancel")
return
//Watchlist
else if(href_list["watchlist"])
if(!check_rights(R_ADMIN)) return
var/mob/M = locate(href_list["watchlist"])
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
return
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
return
if(!M.ckey)
usr << "This mob has no ckey"
return
var/sql_ckey = sanitizeSQL(M.ckey)
var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')")
query.Execute()
if(query.NextRow())
switch(alert(usr, "Ckey already flagged", "[sql_ckey] is already on the watchlist, do you want to:", "Remove", "Edit reason", "Cancel"))
if("Cancel")
return
if("Remove")
var/DBQuery/query_watchdel = dbcon.NewQuery("DELETE FROM [format_table_name("watch")] WHERE ckey = '[sql_ckey]'")
if(!query_watchdel.Execute())
var/err = query_watchdel.ErrorMsg()
log_game("SQL ERROR during removing watch entry. Error : \[[err]\]\n")
return
log_admin("[key_name_admin(usr)] has removed [key_name_admin(M)] from the watchlist")
message_admins("[key_name_admin(usr)] has removed [key_name_admin(M)] from the watchlist", 1)
if("Edit reason")
var/DBQuery/query_reason = dbcon.NewQuery("SELECT ckey, reason FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')")
query_reason.Execute()
if(query_reason.NextRow())
var/watch_reason = query_reason.item[2]
var/new_reason = input("Insert new reason", "New Reason", "[watch_reason]", null) as null|text
new_reason = sanitizeSQL(new_reason)
if(!new_reason)
return
var/DBQuery/update_query = dbcon.NewQuery("UPDATE [format_table_name("watch")] SET reason = '[new_reason]' WHERE (ckey = '[sql_ckey]')")
if(!update_query.Execute())
var/err = update_query.ErrorMsg()
log_game("SQL ERROR during edit watch entry reason. Error : \[[err]\]\n")
return
log_admin("[key_name_admin(usr)] has edited [sql_ckey]'s reason from [watch_reason] to [new_reason]",1)
message_admins("[key_name_admin(usr)] has edited [sql_ckey]'s reason from [watch_reason] to [new_reason]",1)
else
var/reason = input(usr,"Reason?","reason","Metagaming") as text|null
if(!reason)
return
reason = sanitizeSQL(reason)
var/DBQuery/query_watchadd = dbcon.NewQuery("INSERT INTO [format_table_name("watch")] (ckey, reason) VALUES ('[sql_ckey]', '[reason]')")
if(!query_watchadd.Execute())
var/err = query_watchadd.ErrorMsg()
log_game("SQL ERROR during adding new watch entry. Error : \[[err]\]\n")
return
log_admin("[key_name_admin(usr)] has added [key_name_admin(M)] to the watchlist - Reason: [reason]")
message_admins("[key_name_admin(usr)] has added [key_name_admin(M)] to the watchlist - Reason: [reason]", 1)
else if(href_list["mute"])
if(!check_rights(R_MOD))
return
@@ -1201,7 +1260,7 @@
return
log_admin("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
message_admins("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] back to the Lobby.")
var/mob/new_player/NP = new()
NP.ckey = M.ckey
@@ -1353,7 +1412,7 @@
L.revive()
message_admins("\red Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!", 1)
log_admin("[key_name(usr)] healed / Revived [key_name(L)]")
log_admin("[key_name(usr)] healed / revived [key_name(L)]")
else if(href_list["makeai"])
if(!check_rights(R_SPAWN)) return
@@ -1452,6 +1511,17 @@
if(!isobserver(usr)) C.admin_ghost()
sleep(2)
C.jumptomob(M)
else if(href_list["adminplayerobservefollow"])
if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN)) return
var/mob/M = locate(href_list["adminplayerobservefollow"])
var/client/C = usr.client
if(!isobserver(usr)) C.admin_ghost()
var/mob/dead/observer/A = C.mob
sleep(2)
A.ManualFollow(M)
else if(href_list["check_antagonist"])
check_antagonists()
@@ -1519,7 +1589,7 @@
src.owner << "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;"
src.owner << "Location = [location_description];"
src.owner << "[special_role_description]"
src.owner << "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) ([admin_jump_link(M, src)]) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)"
src.owner << "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) (<A HREF='?src=\ref[src];adminplayerobservefollow=\ref[M]'>FLW</A>) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)"
else if(href_list["adminspawncookie"])
if(!check_rights(R_ADMIN|R_EVENT)) return
@@ -1534,14 +1604,14 @@
H.equip_to_slot_or_del( new /obj/item/weapon/reagent_containers/food/snacks/cookie(H), slot_r_hand )
if(!(istype(H.r_hand,/obj/item/weapon/reagent_containers/food/snacks/cookie)))
log_admin("[key_name(H)] has their hands full, so they did not receive their cookie, spawned by [key_name(src.owner)].")
message_admins("[key_name(H)] has their hands full, so they did not receive their cookie, spawned by [key_name(src.owner)].")
message_admins("[key_name_admin(H)] has their hands full, so they did not receive their cookie, spawned by [key_name_admin(src.owner)].")
return
else
H.update_inv_r_hand()//To ensure the icon appears in the HUD
else
H.update_inv_l_hand()
log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
message_admins("[key_name_admin(H)] got their cookie, spawned by [key_name_admin(src.owner)]")
feedback_inc("admin_cookies_spawned",1)
H << "\blue Your prayers have been answered!! You received the <b>best cookie</b>!"
@@ -1565,8 +1635,8 @@
BSACooldown = 0
M << "You've been hit by bluespace artillery!"
log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]")
message_admins("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]")
log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [key_name(src.owner)]")
message_admins("[key_name_admin(M)] has been hit by Bluespace Artillery fired by [key_name_admin(src.owner)]")
var/obj/effect/stop/S
S = new /obj/effect/stop
@@ -1604,8 +1674,8 @@
if(!input) return
src.owner << "You sent [input] to [H] via a secure channel."
log_admin("[src.owner] replied to [key_name(H)]'s Centcomm message with the message [input].")
message_admins("[src.owner] replied to [key_name(H)]'s Centcom message with: \"[input]\"")
log_admin("[key_name(src.owner)] replied to [key_name(H)]'s Centcomm message with the message [input].")
message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)]'s Centcom message with: \"[input]\"")
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\""
else if(href_list["SyndicateReply"])
@@ -1935,28 +2005,13 @@
dirty_paths = href_list["object_list"]
var/paths = list()
var/removed_paths = list()
for(var/dirty_path in dirty_paths)
var/path = text2path(dirty_path)
if(!path)
removed_paths += dirty_path
continue
else if(!ispath(path, /obj) && !ispath(path, /turf) && !ispath(path, /mob))
removed_paths += dirty_path
continue
else if(ispath(path, /obj/item/weapon/gun/energy/pulse_rifle))
if(!check_rights((R_SERVER|R_EVENT),0))
removed_paths += dirty_path
continue
else if(ispath(path, /obj/item/weapon/melee/energy/blade))//Not an item one should be able to spawn./N
if(!check_rights((R_SERVER|R_EVENT),0))
removed_paths += dirty_path
continue
else if(ispath(path, /obj/effect/anomaly/bhole))
if(!check_rights((R_SERVER|R_EVENT),0))
removed_paths += dirty_path
continue
paths += path
if(!paths)
@@ -1965,8 +2020,6 @@
if(length(paths) > 5)
alert("Select fewer object types, (max 5)")
return
else if(length(removed_paths))
alert("Removed:\n" + list2text(removed_paths, "\n"))
var/list/offset = text2list(href_list["offset"],",")
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
@@ -1978,41 +2031,36 @@
if(!obj_dir || !(obj_dir in list(1,2,4,8,5,6,9,10)))
obj_dir = 2
var/obj_name = sanitize(href_list["object_name"])
var/atom/target //Where the object will be spawned
var/where = href_list["object_where"]
if (!( where in list("onfloor","inhand","inmarked") ))
where = "onfloor"
if( where == "inhand" )
usr << "Support for inhand not available yet. Will spawn on floor."
where = "onfloor"
if ( where == "inhand" ) //Can only give when human or monkey
if ( !( ishuman(usr) ) )
usr << "Can only spawn in hand when you're a human or a monkey."
where = "onfloor"
else if ( usr.get_active_hand() )
usr << "Your active hand is full. Spawning on floor."
where = "onfloor"
switch(where)
if("inhand")
if (!iscarbon(usr) && !isrobot(usr))
usr << "Can only spawn in hand when you're a carbon mob or cyborg."
where = "onfloor"
target = usr
if ( where == "inmarked" )
if ( !marked_datum )
usr << "You don't have any object marked. Abandoning spawn."
return
else
if ( !istype(marked_datum,/atom) )
usr << "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn."
return
var/atom/target //Where the object will be spawned
switch ( where )
if ( "onfloor" )
switch (href_list["offset_type"])
if("onfloor")
switch(href_list["offset_type"])
if ("absolute")
target = locate(0 + X,0 + Y,0 + Z)
if ("relative")
target = locate(loc.x + X,loc.y + Y,loc.z + Z)
if ( "inmarked" )
target = marked_datum
if("inmarked")
if(!marked_datum)
usr << "You don't have any object marked. Abandoning spawn."
return
else if(!istype(marked_datum,/atom))
usr << "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn."
return
else
target = marked_datum
if(target)
for (var/path in paths)
@@ -2020,9 +2068,8 @@
if(path in typesof(/turf))
var/turf/O = target
var/turf/N = O.ChangeTurf(path)
if(N)
if(obj_name)
N.name = obj_name
if(N && obj_name)
N.name = obj_name
else
var/atom/O = new path(target)
if(O)
@@ -2032,18 +2079,30 @@
if(istype(O,/mob))
var/mob/M = O
M.real_name = obj_name
if(where == "inhand" && isliving(usr) && istype(O, /obj/item))
var/mob/living/L = usr
var/obj/item/I = O
L.put_in_hands(I)
if(isrobot(L))
var/mob/living/silicon/robot/R = L
if(R.module)
R.module.modules += I
I.loc = R.module
R.module.rebuild()
R.activate_module(I)
R.module.fix_modules()
if (number == 1)
log_admin("[key_name(usr)] created a [english_list(paths)]")
for(var/path in paths)
if(ispath(path, /mob))
message_admins("[key_name_admin(usr)] created a [english_list(paths)]", 1)
message_admins("[key_name_admin(usr)] created a [english_list(paths)]")
break
else
log_admin("[key_name(usr)] created [number]ea [english_list(paths)]")
for(var/path in paths)
if(ispath(path, /mob))
message_admins("[key_name_admin(usr)] created [number]ea [english_list(paths)]", 1)
message_admins("[key_name_admin(usr)] created [number]ea [english_list(paths)]")
break
return
@@ -2322,11 +2381,11 @@
S.long_jump(origin_area, destination_area, transition_area, move_duration)
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle", 1)
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle")
log_admin("[key_name(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle")
else
S.short_jump(origin_area, destination_area)
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle", 1)
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
log_admin("[key_name(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
if("moveshuttle")
@@ -2992,15 +3051,15 @@
if(isAI(target)) // AI core/eye follow links
var/mob/living/silicon/ai/A = target
. = "<A HREF='?[source];adminplayerobservejump=\ref[target]'>JMP</A>"
. = "<A HREF='?[source];adminplayerobservefollow=\ref[target]'>FLW</A>"
if(A.client && A.eyeobj) // No point following clientless AI eyes
. += "|<A HREF='?[source];adminplayerobservejump=\ref[A.eyeobj]'>EYE</A>"
. += "|<A HREF='?[source];adminplayerobservefollow=\ref[A.eyeobj]'>EYE</A>"
return
else if(istype(target, /mob/dead/observer))
var/mob/dead/observer/O = target
. = "<A HREF='?[source];adminplayerobservejump=\ref[target]'>JMP</A>"
. = "<A HREF='?[source];adminplayerobservefollow=\ref[target]'>FLW</A>"
if(O.mind && O.mind.current)
. += "|<A HREF='?[source];adminplayerobservejump=\ref[O.mind.current]'>BDY</A>"
. += "|<A HREF='?[source];adminplayerobservefollow=\ref[O.mind.current]'>BDY</A>"
return
else
return "<A HREF='?[source];adminplayerobservejump=\ref[target]'>JMP</A>"
return "<A HREF='?[source];adminplayerobservefollow=\ref[target]'>FLW</A>"
+29 -1
View File
@@ -87,7 +87,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
mobs_found += found
if(!ai_found && isAI(found))
ai_found = 1
msg += "<b><font color='black'>[original_word] (<A HREF='?_src_=holder;adminmoreinfo=\ref[found]'>?</A>)</font></b> "
msg += "<b><font color='black'>[original_word] </font></b> "
continue
msg += "[original_word] "
@@ -147,3 +147,31 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
send2adminirc("[selected_type] from [key_name(src)]: [original_msg]")
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/proc/send2irc_adminless_only(source, msg, requiredflags = R_BAN)
var/admin_number_total = 0 //Total number of admins
var/admin_number_afk = 0 //Holds the number of admins who are afk
var/admin_number_ignored = 0 //Holds the number of admins without +BAN (so admins who are not really admins)
var/admin_number_decrease = 0 //Holds the number of admins with are afk, ignored or both
for(var/client/X in admins)
admin_number_total++;
var/invalid = 0
if(requiredflags != 0 && !check_rights_for(X, requiredflags))
admin_number_ignored++
invalid = 1
if(X.is_afk())
admin_number_afk++
invalid = 1
if(X.holder.fakekey)
admin_number_ignored++
invalid = 1
if(invalid)
admin_number_decrease++
var/admin_number_present = admin_number_total - admin_number_decrease //Number of admins who are neither afk nor invalid
if(admin_number_present <= 0)
if(!admin_number_afk && !admin_number_ignored)
send2irc(source, "[msg] - No admins online")
else
send2irc(source, "[msg] - All admins AFK ([admin_number_afk]/[admin_number_total]) or skipped ([admin_number_ignored]/[admin_number_total])")
return admin_number_present
+47 -32
View File
@@ -1,30 +1,39 @@
/client/proc/Jump(var/area/A in return_sorted_areas())
/client/proc/Jump(area/A in return_sorted_areas())
set name = "Jump to Area"
set desc = "Area to jump to"
set category = "Admin"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
var/list/area_turfs = get_area_turfs(A)
if(area_turfs && area_turfs.len)
usr.loc = pick(area_turfs)
else
src << "That area has no turfs to jump to!"
if(!A)
return
var/list/turfs = list()
for(var/turf/T in A)
if(T.density)
continue
turfs.Add(T)
var/turf/T = pick_n_take(turfs)
if(!T)
src << "Nowhere to jump to!"
return
admin_forcemove(usr, T)
log_admin("[key_name(usr)] jumped to [A]")
message_admins("[key_name_admin(usr)] jumped to [A]", 1)
message_admins("[key_name_admin(usr)] jumped to [A]")
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/jumptoturf(var/turf/T in world)
set name = "Jump to Turf"
set category = "Admin"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
log_admin("[key_name(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]")
message_admins("[key_name_admin(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]", 1)
usr.loc = T
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -33,8 +42,7 @@
set category = "Admin"
set name = "Jump to Mob"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
log_admin("[key_name(usr)] jumped to [key_name(M)]")
@@ -44,7 +52,7 @@
var/turf/T = get_turf(M)
if(T && isturf(T))
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
A.loc = T
admin_forcemove(A, M.loc)
else
A << "This mob is not located in the game world."
@@ -52,8 +60,7 @@
set category = "Admin"
set name = "Jump to Coordinate"
if (!holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
if(src.mob)
@@ -68,8 +75,7 @@
set category = "Admin"
set name = "Jump to Key"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
var/list/keys = list()
@@ -82,20 +88,22 @@
var/mob/M = selection:mob
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
usr.loc = M.loc
admin_forcemove(usr, M.loc)
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/Getmob(var/mob/M in mob_list)
set category = "Admin"
set name = "Get Mob"
set desc = "Mob to teleport"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
M.loc = get_turf(usr)
admin_forcemove(M, get_turf(usr))
feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/Getkey()
@@ -103,8 +111,7 @@
set name = "Get Key"
set desc = "Key to teleport"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
var/list/keys = list()
@@ -120,19 +127,27 @@
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name(M)]", 1)
if(M)
M.loc = get_turf(usr)
admin_forcemove(M, get_turf(usr))
usr.loc = M.loc
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/sendmob(var/mob/M in sortmobs())
set category = "Admin"
set name = "Send Mob"
if(!src.holder)
src << "Only administrators may use this command."
if(!check_rights(R_ADMIN))
return
var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas()
if(A)
M.loc = pick(get_area_turfs(A))
admin_forcemove(M, pick(get_area_turfs(A)))
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1)
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1)
/proc/admin_forcemove(mob/mover, atom/newloc)
mover.loc = newloc
mover.on_forcemove(newloc)
/mob/proc/on_forcemove(atom/newloc)
return
@@ -55,7 +55,7 @@ var/inactive_keys = "None<br>"
//run a query to get all ckeys inactive for over 2 months
var/list/inactive_ckeys = list()
if(ckeys_with_customitems.len)
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM erro_player WHERE datediff(Now(), lastseen) > 60")
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM [format_table_name("player")] WHERE datediff(Now(), lastseen) > 60")
query_inactive.Execute()
while(query_inactive.NextRow())
var/cur_ckey = query_inactive.item[1]
@@ -67,7 +67,7 @@ var/inactive_keys = "None<br>"
//if there are ckeys left over, check whether they have a database entry at all
if(ckeys_with_customitems.len)
for(var/cur_ckey in ckeys_with_customitems)
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE ckey = '[cur_ckey]'")
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ckey = '[cur_ckey]'")
query_inactive.Execute()
if(!query_inactive.RowCount())
inactive_ckeys += cur_ckey
+2 -2
View File
@@ -922,7 +922,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert/alt(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert(M), slot_back)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card (Emergency Response Team - Member)"
@@ -944,7 +944,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert/alt(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/commander(M), slot_back)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card (Emergency Response Team - Leader)"
+4 -4
View File
@@ -26,8 +26,8 @@ var/global/list/frozen_mob_list = list()
/mob/living/proc/admin_Freeze(var/client/admin)
if(istype(admin))
src << "<b><font color= red>You have been frozen by <a href='?priv_msg=\ref[admin]'>[admin.key]</a></b></font>"
message_admins("\blue [key_name_admin(admin)] froze [key_name(src)]")
src << "<b><font color= red>You have been frozen by [key_name(admin)]</b></font>"
message_admins("<span class='notice'>[key_name_admin(admin)]</span> froze [key_name_admin(src)]")
log_admin("[key_name(admin)] froze [key_name(src)]")
var/obj/effect/overlay/adminoverlay/AO = new
@@ -42,8 +42,8 @@ var/global/list/frozen_mob_list = list()
/mob/living/proc/admin_unFreeze(var/client/admin)
if(istype(admin))
src << "<b><font color= red>You have been unfrozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>"
message_admins("\blue [key_name_admin(admin)] unfroze [key_name(src)]")
src << "<b><font color= red>You have been unfrozen by [key_name(admin)]</b></font>"
message_admins("\blue [key_name_admin(admin)] unfroze [key_name_admin(src)]")
log_admin("[key_name(admin)] unfroze [key_name(src)]")
update_icons()
+6 -6
View File
@@ -79,13 +79,13 @@ var/global/sent_honksquad = 0
var/honksquad_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
var/honksquad_name = pick(clown_names)
new_honksquad.gender = pick(MALE, FEMALE)
var/datum/preferences/A = new()//Randomize appearance for the commando.
A.randomize_appearance_for(new_honksquad)
new_honksquad.real_name = "[!honk_leader_selected ? honksquad_rank : honksquad_leader_rank] [honksquad_name]"
new_honksquad.age = !honk_leader_selected ? rand(23,35) : rand(35,45)
if(honk_leader_selected)
A.age = rand(35,45)
A.real_name = "[honksquad_leader_rank] [honksquad_name]"
else
A.real_name = "[honksquad_rank] [honksquad_name]"
A.copy_to(new_honksquad)
new_honksquad.dna.ready_dna(new_honksquad)//Creates DNA.
+25 -21
View File
@@ -118,33 +118,37 @@ var/intercom_range_display_status = 0
del(F)
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
var/list/admin_verbs_show_debug_verbs = list(
/client/proc/camera_view, //-errorage
/client/proc/sec_camera_report, //-errorage
/client/proc/intercom_view, //-errorage
/client/proc/Cell, //More air things
/client/proc/atmosscan, //check plumbing
/client/proc/powerdebug, //check power
/client/proc/count_objects_on_z_level,
/client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control, //-errorage
/client/proc/startSinglo,
/client/proc/ticklag,
/client/proc/cmd_admin_grantfullaccess,
// /client/proc/splash,
/client/proc/cmd_admin_areatest,
/client/proc/cmd_admin_rejuvenate,
/datum/admins/proc/show_traitor_panel,
/client/proc/print_jobban_old,
/client/proc/print_jobban_old_filter,
/client/proc/forceEvent,
///client/proc/cmd_admin_rejuvenate,
/client/proc/nanomapgen_DumpImage
)
/client/proc/enable_debug_verbs()
set category = "Debug"
set name = "Debug verbs"
if(!check_rights(R_DEBUG)) return
src.verbs += /client/proc/camera_view //-errorage
src.verbs += /client/proc/sec_camera_report //-errorage
src.verbs += /client/proc/intercom_view //-errorage
src.verbs += /client/proc/Cell //More air things
src.verbs += /client/proc/atmosscan //check plumbing
src.verbs += /client/proc/powerdebug //check power
src.verbs += /client/proc/count_objects_on_z_level
src.verbs += /client/proc/count_objects_all
src.verbs += /client/proc/cmd_assume_direct_control //-errorage
src.verbs += /client/proc/startSinglo
src.verbs += /client/proc/ticklag
src.verbs += /client/proc/cmd_admin_grantfullaccess
// src.verbs += /client/proc/splash
src.verbs += /client/proc/cmd_admin_areatest
src.verbs += /client/proc/cmd_admin_rejuvenate
src.verbs += /datum/admins/proc/show_traitor_panel
src.verbs += /client/proc/print_jobban_old
src.verbs += /client/proc/print_jobban_old_filter
src.verbs += /client/proc/forceEvent
//src.verbs += /client/proc/cmd_admin_rejuvenate
src.verbs += /client/proc/nanomapgen_DumpImage
verbs += admin_verbs_show_debug_verbs
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+9 -32
View File
@@ -396,16 +396,8 @@ client/proc/one_click_antag()
//First we spawn a dude.
var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.
new_character.gender = pick(MALE,FEMALE)
var/datum/preferences/A = new()
A.randomize_appearance_for(new_character)
if(new_character.gender == MALE)
new_character.real_name = "[pick(first_names_male)] [pick(last_names)]"
else
new_character.real_name = "[pick(first_names_female)] [pick(last_names)]"
new_character.name = new_character.real_name
new_character.age = rand(17,45)
A.copy_to(new_character)
new_character.dna.ready_dna(new_character)
new_character.key = G_found.key
@@ -418,14 +410,13 @@ client/proc/one_click_antag()
var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
var/syndicate_commando_name = pick(last_names)
new_syndicate_commando.gender = pick(MALE, FEMALE)
var/datum/preferences/A = new()//Randomize appearance for the commando.
A.randomize_appearance_for(new_syndicate_commando)
new_syndicate_commando.real_name = "[!syndicate_leader_selected ? syndicate_commando_rank : syndicate_commando_leader_rank] [syndicate_commando_name]"
new_syndicate_commando.name = new_syndicate_commando.real_name
new_syndicate_commando.age = !syndicate_leader_selected ? rand(23,35) : rand(35,45)
if(syndicate_leader_selected)
A.real_name = "[syndicate_commando_leader_rank] [syndicate_commando_name]"
A.age = rand(35,45)
else
A.real_name = "[syndicate_commando_rank] [syndicate_commando_name]"
A.copy_to(new_syndicate_commando)
new_syndicate_commando.dna.ready_dna(new_syndicate_commando)//Creates DNA.
@@ -610,14 +601,7 @@ client/proc/one_click_antag()
var/mob/living/carbon/human/newMember = new(L.loc)
newMember.gender = pick(MALE,FEMALE)
A.randomize_appearance_for(newMember)
if(newMember.gender == MALE)
newMember.real_name = "[pick(first_names_male)] [pick(last_names)]"
else
newMember.real_name = "[pick(first_names_female)] [pick(last_names)]"
newMember.name = newMember.real_name
newMember.age = rand(17,45)
A.copy_to(newMember)
newMember.dna.ready_dna(newMember)
@@ -639,14 +623,7 @@ client/proc/one_click_antag()
var/mob/living/carbon/human/newMember = new(L.loc)
newMember.gender = pick(MALE,FEMALE)
A.randomize_appearance_for(newMember)
if(newMember.gender == MALE)
newMember.real_name = "[pick(first_names_male)] [pick(last_names)]"
else
newMember.real_name = "[pick(first_names_female)] [pick(last_names)]"
newMember.name = newMember.real_name
newMember.age = rand(17,45)
A.copy_to(newMember)
newMember.dna.ready_dna(newMember)
+2 -2
View File
@@ -11,10 +11,10 @@
if(T)
log_admin("[key_name(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])")
message_admins("[key_name(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])", 1)
message_admins("[key_name_admin(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])", 1)
else
log_admin("[key_name(usr)] has possessed [O] ([O.type]) at an unknown location")
message_admins("[key_name(usr)] has possessed [O] ([O.type]) at an unknown location", 1)
message_admins("[key_name_admin(usr)] has possessed [O] ([O.type]) at an unknown location", 1)
if(!usr.control_object) //If you're not already possessing something...
usr.name_archive = usr.real_name
+10 -17
View File
@@ -107,7 +107,7 @@
return
world << "[msg]"
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
message_admins("\blue \bold GlobalNarrate: [key_name_admin(usr)] : [msg]<BR>", 1)
message_admins("\blue \bold GlobalNarrate: [key_name_admin(usr)]: [msg]<BR>", 1)
feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_direct_narrate(var/mob/M) // Targetted narrate -- TLE
@@ -128,8 +128,8 @@
return
M << msg
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
message_admins("\blue \bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]<BR>", 1)
log_admin("DirectNarrate: [key_name(usr)] to ([key_name(M)]): [msg]")
message_admins("\blue \bold DirectNarrate: [key_name_admin(usr)] to ([key_name_admin(M)]): [msg]<BR>", 1)
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_godmode(mob/M as mob in mob_list)
@@ -433,14 +433,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
else
new_character.gender = pick(MALE,FEMALE)
var/datum/preferences/A = new()
A.randomize_appearance_for(new_character)
new_character.real_name = G_found.real_name
A.real_name = G_found.real_name
A.copy_to(new_character)
if(!new_character.real_name)
if(new_character.gender == MALE)
new_character.real_name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
else
new_character.real_name = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
new_character.real_name = random_name(new_character.gender)
new_character.name = new_character.real_name
if(G_found.mind && !G_found.mind.active)
@@ -472,10 +469,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
If they don't have a mind, they obviously don't have a special role.
*/
//Two variables to properly announce later on.
var/admin = key_name_admin(src)
var/player_key = G_found.key
//Now for special roles and equipment.
switch(new_character.mind.special_role)
if("traitor")
@@ -519,7 +512,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
call(/mob/new_player/proc/AnnounceArrival)(new_character, new_character.mind.assigned_role)
message_admins("\blue [admin] has respawned [player_key] as [new_character.real_name].", 1)
message_admins("\blue [key_name_admin(usr)] has respawned [key_name_admin(G_found)] as [new_character.real_name].", 1)
new_character << "You have been fully respawned. Enjoy the game."
@@ -728,8 +721,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
if (heavy || light)
empulse(O, heavy, light)
log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] created an EM PUlse ([heavy],[light]) at ([O.x],[O.y],[O.z])", 1)
log_admin("[key_name(usr)] created an EM pulse ([heavy], [light]) at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] created an EM pulse ([heavy], [light]) at ([O.x],[O.y],[O.z])", 1)
feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -916,7 +909,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
if (choice == "Emergency")
var/reason = stripped_input(usr, "Optional: Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
var/reason = input(usr, "Optional: Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
emergency_shuttle.call_evac(reason)
else
emergency_shuttle.call_transfer()
+6 -6
View File
@@ -104,13 +104,13 @@ var/global/sent_strike_team = 0
var/commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
var/commando_name = pick(last_names)
new_commando.gender = pick(MALE, FEMALE)
var/datum/preferences/A = new()//Randomize appearance for the commando.
A.randomize_appearance_for(new_commando)
new_commando.real_name = "[!leader_selected ? commando_rank : commando_leader_rank] [commando_name]"
new_commando.age = !leader_selected ? rand(23,35) : rand(35,45)
if(leader_selected)
A.age = rand(35,45)
A.real_name = "[commando_leader_rank] [commando_name]"
else
A.real_name = "[commando_rank] [commando_name]"
A.copy_to(new_commando)
new_commando.dna.ready_dna(new_commando)//Creates DNA.
@@ -108,13 +108,13 @@ var/global/sent_syndicate_strike_team = 0
var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
var/syndicate_commando_name = pick(last_names)
new_syndicate_commando.gender = pick(MALE, FEMALE)
var/datum/preferences/A = new()//Randomize appearance for the commando.
A.randomize_appearance_for(new_syndicate_commando)
new_syndicate_commando.real_name = "[!syndicate_leader_selected ? syndicate_commando_rank : syndicate_commando_leader_rank] [syndicate_commando_name]"
new_syndicate_commando.age = !syndicate_leader_selected ? rand(23,35) : rand(35,45)
if(syndicate_leader_selected)
A.age = rand(35,45)
A.real_name = "[syndicate_commando_leader_rank] [syndicate_commando_name]"
else
A.real_name = "[syndicate_commando_rank] [syndicate_commando_name]"
A.copy_to(new_syndicate_commando)
new_syndicate_commando.dna.ready_dna(new_syndicate_commando)//Creates DNA.
+1 -1
View File
@@ -11,7 +11,7 @@
//I've used ticks of 2 before to help with serious singulo lags
if(newtick && newtick <= 2 && newtick > 0)
log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
message_admins("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
message_admins("[key_name_admin(src)] has modified world.tick_lag to [newtick]", 0)
world.tick_lag = newtick
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+3 -3
View File
@@ -44,12 +44,12 @@
if((istype(W, /obj/item/weapon/weldingtool) && W:welding))
if(!status)
status = 1
bombers += "[key_name(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
msg_admin_attack("[key_name_admin(user)][isAntag(user) ? "(ANTAG)" : ""] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]")
bombers += "[key_name(user)] welded a single tank bomb. Temperature: [bombtank.air_contents.temperature-T0C]"
msg_admin_attack("[key_name_admin(user)] welded a single tank bomb. Temperature: [bombtank.air_contents.temperature-T0C]")
user << "<span class='notice'>A pressure hole has been bored to [bombtank] valve. \The [bombtank] can now be ignited.</span>"
else
status = 0
bombers += "[key_name(user)] unwelded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
bombers += "[key_name(user)] unwelded a single tank bomb. Temperature: [bombtank.air_contents.temperature-T0C]"
user << "<span class='notice'>The hole has been closed.</span>"
add_fingerprint(user)
..()
+6 -2
View File
@@ -53,7 +53,7 @@
process()
if(timing && (time > 0))
time--
time -= 2 // 2 seconds per process()
if(timing && time <= 0)
timing = repeat
timer_end()
@@ -110,6 +110,10 @@
if(href_list["time"])
timing = !timing
if(timing && istype(holder, /obj/item/device/transfer_valve))
message_admins("[key_name_admin(usr)] activated [src] attachment on [holder].")
bombers += "[key_name(usr)] activated [src] attachment for [loc]"
log_game("[key_name(usr)] activated [src] attachment for [loc]")
update_icon()
if(href_list["reset"])
time = set_time
@@ -120,7 +124,7 @@
if(href_list["tp"])
var/tp = text2num(href_list["tp"])
set_time += tp
set_time = min(max(round(set_time), 5), 600)
set_time = min(max(round(set_time), 6), 600)
if(!timing)
time = set_time
@@ -2,7 +2,7 @@
name = "bluespace artillery control"
icon_screen = "accelerator"
icon_keyboard = "accelerator_key"
icon_state = "computer_wires"
icon_state = "computer-wires"
req_access = list(access_cent_commander)
var/last_fire = 0
var/reload_cooldown = 180 // 3 minute cooldown
+14 -8
View File
@@ -303,7 +303,7 @@
var/sql_ckey = sql_sanitize_text(src.ckey)
var/DBQuery/query = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM erro_player WHERE ckey = '[sql_ckey]'")
var/DBQuery/query = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
query.Execute()
var/sql_id = 0
player_age = 0 // New players won't have an entry so knowing we have a connection we set this to zero to be updated if their is a record.
@@ -312,24 +312,30 @@
player_age = text2num(query.item[2])
break
var/DBQuery/query_ip = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE ip = '[address]'")
var/DBQuery/query_ip = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = '[address]'")
query_ip.Execute()
related_accounts_ip = list()
while(query_ip.NextRow())
if(ckey != query_ip.item[1])
related_accounts_ip.Add("[query_ip.item[1]]")
var/DBQuery/query_cid = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE computerid = '[computer_id]'")
var/DBQuery/query_cid = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE computerid = '[computer_id]'")
query_cid.Execute()
related_accounts_cid = list()
while(query_cid.NextRow())
if(ckey != query_cid.item[1])
related_accounts_cid.Add("[query_cid.item[1]]")
related_accounts_cid.Add("[query_cid.item[1]]")
//Log all the alts
if(related_accounts_cid.len)
log_access("Alts: [key_name(src)]:[list2text(related_accounts_cid, " - ")]")
var/DBQuery/query_watch = dbcon.NewQuery("SELECT ckey, reason FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')")
query_watch.Execute()
if(query_watch.NextRow())
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'>[key_name_admin(src)] is flagged for watching and has just connected - Reason: [query_watch.item[2]]</font>")
send2irc_adminless_only("Watchlist", "[key_name_admin(src)] is flagged for watching and has just connected - Reason: [query_watch.item[2]]")
//Just the standard check to see if it's actually a number
if(sql_id)
if(istext(sql_id))
@@ -348,16 +354,16 @@
if(sql_id)
//Player already identified previously, we need to just update the 'lastseen', 'ip' and 'computer_id' variables
var/DBQuery/query_update = dbcon.NewQuery("UPDATE erro_player SET lastseen = Now(), ip = '[sql_ip]', computerid = '[sql_computerid]', lastadminrank = '[sql_admin_rank]' WHERE id = [sql_id]")
var/DBQuery/query_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastseen = Now(), ip = '[sql_ip]', computerid = '[sql_computerid]', lastadminrank = '[sql_admin_rank]' WHERE id = [sql_id]")
query_update.Execute()
else
//New player!! Need to insert all the stuff
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO erro_player (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')")
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')")
query_insert.Execute()
//Logging player access
var/serverip = "[world.internet_address]:[world.port]"
var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `erro_connection_log`(`id`,`datetime`,`serverip`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),'[serverip]','[sql_ckey]','[sql_ip]','[sql_computerid]');")
var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]`(`id`,`datetime`,`serverip`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),'[serverip]','[sql_ckey]','[sql_ip]','[sql_computerid]');")
query_accesslog.Execute()
+33 -34
View File
@@ -30,7 +30,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
num2text(BE_REV) = 14,
num2text(BE_VAMPIRE) = 14,
num2text(BE_BLOB) = 14,
num2text(BE_REVENANT) = 14,
num2text(BE_REVENANT) = 14,
num2text(BE_OPERATIVE) = 21,
num2text(BE_CULTIST) = 21,
num2text(BE_RAIDER) = 21,
@@ -104,8 +104,8 @@ datum/preferences
var/age = 30 //age of character
var/spawnpoint = "Arrivals Shuttle" //where this character will spawn (0-2).
var/b_type = "A+" //blood type (not-chooseable)
var/underwear = 1 //underwear type
var/undershirt = 1 //undershirt type
var/underwear = "Nude" //underwear type
var/undershirt = "Nude" //undershirt type
var/backbag = 2 //backpack type
var/h_style = "Bald" //Hair type
var/r_hair = 0 //Hair color
@@ -185,14 +185,17 @@ datum/preferences
var/volume = 100
/datum/preferences/New(client/C)
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
if(istype(C))
if(!IsGuestKey(C.key))
// load_path(C.ckey)
if(load_preferences(C))
if(load_character(C))
return
gender = pick(MALE, FEMALE)
var/loaded_preferences_successfully = load_preferences(C)
if(loaded_preferences_successfully)
if(load_character(C))
return
//we couldn't load character data so just randomize the character appearance + name
random_character() //let's create a random character then - rather than a fat, bald and naked man.
real_name = random_name(gender)
if(!loaded_preferences_successfully)
save_preferences(C)
save_character(C) //let's save this new random character so it doesn't keep generating new ones.
/datum/preferences
proc/ShowChoices(mob/user)
@@ -316,11 +319,8 @@ datum/preferences
dat += "\[...\]<br><br>"
else
dat += "<br><br>"
if(gender == MALE)
dat += "Underwear: <a href ='?_src_=prefs;preference=underwear;task=input'><b>[underwear_m[underwear]]</b></a><br>"
else
dat += "Underwear: <a href ='?_src_=prefs;preference=underwear;task=input'><b>[underwear_f[underwear]]</b></a><br>"
dat += "Undershirt: <a href='?_src_=prefs;preference=undershirt;task=input'><b>[undershirt_t[undershirt]]</b></a><br>"
dat += "<b>Underwear:</b><BR><a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
dat += "<b>Undershirt:</b><BR><a href ='?_src_=prefs;preference=undershirt;task=input'>[undershirt]</a><BR>"
dat += "Backpack Type:<br><a href ='?_src_=prefs;preference=bag;task=input'><b>[backbaglist[backbag]]</b></a><br>"
dat += "Nanotrasen Relation:<br><a href ='?_src_=prefs;preference=nt_relation;task=input'><b>[nanotrasen_relation]</b></a><br>"
dat += "</td><td><b>Preview</b><br><img src=previewicon.png height=64 width=64><img src=previewicon2.png height=64 width=64></td></tr></table>"
@@ -984,10 +984,10 @@ datum/preferences
if("f_style")
f_style = random_facial_hair_style(gender, species)
if("underwear")
underwear = rand(1,underwear_m.len)
underwear = random_underwear(gender)
ShowChoices(user)
if("undershirt")
undershirt = rand(1,undershirt_t.len)
undershirt = random_undershirt(gender)
ShowChoices(user)
if("eyes")
r_eyes = rand(0,255)
@@ -1006,7 +1006,7 @@ datum/preferences
/*if("skin_style")
h_style = random_skin_style(gender)*/
if("all")
randomize_appearance_for() //no params needed
random_character()
if("input")
switch(href_list["preference"])
if("name")
@@ -1176,16 +1176,17 @@ datum/preferences
var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in underwear_options
if(new_underwear)
underwear = underwear_options.Find(new_underwear)
underwear = new_underwear
ShowChoices(user)
if("undershirt")
var/list/undershirt_options
undershirt_options = undershirt_t
var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_options
if (new_undershirt)
undershirt = undershirt_options.Find(new_undershirt)
var/new_undershirt
if(gender == MALE)
new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_m
else
new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_f
if(new_undershirt)
undershirt = new_undershirt
ShowChoices(user)
if("eyes")
@@ -1340,7 +1341,7 @@ datum/preferences
gender = FEMALE
else
gender = MALE
underwear = random_underwear(gender)
if("hear_adminhelps")
sound ^= SOUND_ADMINHELP
@@ -1410,7 +1411,10 @@ datum/preferences
close_load_dialog(user)
if("changeslot")
load_character(user,text2num(href_list["num"]))
if(!load_character(user,text2num(href_list["num"])))
random_character()
real_name = random_name(gender)
save_character(user)
close_load_dialog(user)
if("tab")
@@ -1420,7 +1424,7 @@ datum/preferences
ShowChoices(user)
return 1
proc/copy_to(mob/living/carbon/human/character, safety = 0)
proc/copy_to(mob/living/carbon/human/character)
if(be_random_name)
real_name = random_name(gender,species)
@@ -1517,12 +1521,7 @@ datum/preferences
W.buckled_mob = character
W.add_fingerprint(character)
if(underwear > underwear_m.len || underwear < 1)
underwear = 0 //I'm sure this is 100% unnecessary, but I'm paranoid... sue me. //HAH NOW NO MORE MAGIC CLONING UNDIES
character.underwear = underwear
if(undershirt > undershirt_t.len || undershirt < 1)
undershirt = 0
character.undershirt = undershirt
if(backbag > 4 || backbag < 1)
@@ -1532,7 +1531,7 @@ datum/preferences
//Debugging report to track down a bug, which randomly assigned the plural gender to people.
if(character.gender in list(PLURAL, NEUTER))
if(isliving(src)) //Ghosts get neuter by default
message_admins("[character] ([character.ckey]) has spawned with their gender as plural or neuter. Please notify coders.")
message_admins("[key_name_admin(character)] has spawned with their gender as plural or neuter. Please notify coders.")
character.gender = MALE
proc/open_load_dialog(mob/user)
+9 -9
View File
@@ -1,6 +1,6 @@
/datum/preferences/proc/load_preferences(client/C)
var/DBQuery/query = dbcon.NewQuery("SELECT ooccolor,UI_style,UI_style_color,UI_style_alpha,be_special,default_slot,toggles,sound,randomslot,volume FROM erro_player WHERE ckey='[C.ckey]'")
var/DBQuery/query = dbcon.NewQuery("SELECT ooccolor,UI_style,UI_style_color,UI_style_alpha,be_special,default_slot,toggles,sound,randomslot,volume FROM [format_table_name("player")] WHERE ckey='[C.ckey]'")
if(!query.Execute())
var/err = query.ErrorMsg()
log_game("SQL ERROR during loading player preferences. Error : \[[err]\]\n")
@@ -37,7 +37,7 @@
/datum/preferences/proc/save_preferences(client/C)
var/DBQuery/query = dbcon.NewQuery("UPDATE erro_player SET ooccolor='[ooccolor]',UI_style='[UI_style]',UI_style_color='[UI_style_color]',UI_style_alpha='[UI_style_alpha]',be_special='[be_special]',default_slot='[default_slot]',toggles='[toggles]',sound='[sound]',randomslot='[randomslot]',volume='[volume]' WHERE ckey='[C.ckey]'")
var/DBQuery/query = dbcon.NewQuery("UPDATE [format_table_name("player")] SET ooccolor='[ooccolor]',UI_style='[UI_style]',UI_style_color='[UI_style_color]',UI_style_alpha='[UI_style_alpha]',be_special='[be_special]',default_slot='[default_slot]',toggles='[toggles]',sound='[sound]',randomslot='[randomslot]',volume='[volume]' WHERE ckey='[C.ckey]'")
if(!query.Execute())
var/err = query.ErrorMsg()
log_game("SQL ERROR during saving player preferences. Error : \[[err]\]\n")
@@ -51,7 +51,7 @@
slot = sanitize_integer(slot, 1, MAX_SAVE_SLOTS, initial(default_slot))
if(slot != default_slot)
default_slot = slot
var/DBQuery/firstquery = dbcon.NewQuery("UPDATE erro_player SET default_slot=[slot] WHERE ckey='[C.ckey]'")
var/DBQuery/firstquery = dbcon.NewQuery("UPDATE [format_table_name("player")] SET default_slot=[slot] WHERE ckey='[C.ckey]'")
firstquery.Execute()
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM characters WHERE ckey='[C.ckey]' AND slot='[slot]'")
@@ -87,8 +87,8 @@
r_eyes = text2num(query.item[23])
g_eyes = text2num(query.item[24])
b_eyes = text2num(query.item[25])
underwear = text2num(query.item[26])
undershirt = text2num(query.item[27])
underwear = query.item[26]
undershirt = query.item[27]
backbag = text2num(query.item[28])
b_type = query.item[29]
@@ -147,8 +147,8 @@
r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes))
g_eyes = sanitize_integer(g_eyes, 0, 255, initial(g_eyes))
b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes))
underwear = sanitize_integer(underwear, 1, underwear_m.len, initial(underwear))
undershirt = sanitize_integer(undershirt, 1, undershirt_t.len, initial(undershirt))
underwear = sanitize_text(underwear, initial(underwear))
undershirt = sanitize_text(undershirt, initial(undershirt))
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
b_type = sanitize_text(b_type, initial(b_type))
@@ -204,7 +204,7 @@
message_admins("SQL ERROR during character slot saving. Error : \[[err]\]\n")
return
return 1
/*
/datum/preferences/proc/random_character(client/C)
var/DBQuery/query = dbcon.NewQuery("SELECT slot FROM characters WHERE ckey='[C.ckey]' ORDER BY slot")
@@ -218,4 +218,4 @@
load_character(C)
return 0
load_character(C,pick(saves))
return 1
return 1*/
+4 -3
View File
@@ -9,6 +9,7 @@
#define ASSIGNMENT_SECURITY "Security"
var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT_LEVEL_MODERATE = "Moderate", EVENT_LEVEL_MAJOR = "Major")
var/list/event_last_fired = list()
/datum/event_container
var/severity = -1
@@ -134,8 +135,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
// NON-BAY EVENTS
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Cargo Bonus", /datum/event/cargo_bonus, 100),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Revenant", /datum/event/revenant, 50)
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Cargo Bonus", /datum/event/cargo_bonus, 100)
)
/datum/event_container/moderate
@@ -158,7 +158,6 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ion_storm, 0, list(ASSIGNMENT_AI = 50, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Borer Infestation", /datum/event/borer_infestation, 20, list(ASSIGNMENT_SECURITY = 20), 1),
new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Alien Infestation", /datum/event/alien_infestation, 0, list(ASSIGNMENT_SECURITY = 15), 1),
//new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 15), 1),
// NON-BAY EVENTS
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Mass Hallucination", /datum/event/mass_hallucination, 300),
@@ -172,6 +171,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Bluespace Anomaly", /datum/event/anomaly/anomaly_bluespace, 50, list(ASSIGNMENT_ENGINEER = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Flux Anomaly", /datum/event/anomaly/anomaly_flux, 50, list(ASSIGNMENT_ENGINEER = 50)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravitational Anomaly", /datum/event/anomaly/anomaly_grav, 200),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Revenant", /datum/event/revenant, 150)
)
/datum/event_container/major
@@ -183,6 +183,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 0, list(ASSIGNMENT_ENGINEER = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 3), 1),
new /datum/event_meta/alien(EVENT_LEVEL_MAJOR, "Alien Infestation", /datum/event/alien_infestation, 0, list(ASSIGNMENT_SECURITY = 30), 1),
)
-242
View File
@@ -1,242 +0,0 @@
/*
/proc/start_events()
//changed to a while(1) loop since they are more efficient.
//Moved the spawn in here to allow it to be called with advance proc call if it crashes.
//and also to stop spawn copying variables from the game ticker
spawn(3000)
while(1)
/*if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
spawn(1)
dust_swarm("weak")*/
if(!event)
//CARN: checks to see if random events are enabled.
if(config.allow_random_events)
hadevent = event()
else
Holiday_Random_Event()
else
event = 0
sleep(2400)
*/
var/list/event_last_fired = list()
//Always triggers an event when called, dynamically chooses events based on job population
var/global/list/possibleEvents = list()
/proc/spawn_dynamic_event()
if(!config.allow_random_events)
return
var/minutes_passed = world.time/600
var/list/active_with_role = number_active_with_role()
//var/engineer_count = number_active_with_role("Engineer")
//var/security_count = number_active_with_role("Security")
//var/medical_count = number_active_with_role("Medical")
//var/AI_count = number_active_with_role("AI")
//var/janitor_count = number_active_with_role("Janitor")
// Maps event names to event chances
// For each chance, 100 represents "normal likelihood", anything below 100 is "reduced likelihood", anything above 100 is "increased likelihood"
// Events have to be manually added to this proc to happen
//see:
// Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events.dm
// Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events_Mundane.dm
possibleEvents[/datum/event/economic_event] = 300
possibleEvents[/datum/event/trivial_news] = 400
possibleEvents[/datum/event/mundane_news] = 300
possibleEvents[/datum/event/cargo_bonus] = 100
possibleEvents[/datum/event/revenant] = 75
possibleEvents[/datum/event/pda_spam] = max(min(25, player_list.len) * 4, 200)
possibleEvents[/datum/event/money_lotto] = max(min(5, player_list.len), 50)
if(account_hack_attempted)
possibleEvents[/datum/event/money_hacker] = max(min(25, player_list.len) * 4, 200)
possibleEvents[/datum/event/mass_hallucination] = 200
possibleEvents[/datum/event/vent_clog] = 300
possibleEvents[/datum/event/anomaly/anomaly_grav] = 200
possibleEvents[/datum/event/wormholes] = 150
possibleEvents[/datum/event/carp_migration] = 20 + 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/dust] = 50 + 50 * active_with_role["Engineer"]
possibleEvents[/datum/event/dust/meaty] = 50 + 50 * active_with_role["Engineer"]
possibleEvents[/datum/event/rogue_drone] = 5 + 25 * active_with_role["Engineer"] + 25 * active_with_role["Security"]
possibleEvents[/datum/event/infestation] = 100 + 100 * active_with_role["Janitor"]
possibleEvents[/datum/event/communications_blackout] = 50 + 25 * active_with_role["AI"] + active_with_role["Scientist"] * 25
possibleEvents[/datum/event/ion_storm] = active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5
// possibleEvents[/datum/event/grid_check] = 25 + 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/electrical_storm] = 15 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"]
possibleEvents[/datum/event/wallrot] = 30 * active_with_role["Engineer"] + 50 * active_with_role["Botanist"]
possibleEvents[/datum/event/borer_infestation] = 50 + 15 * active_with_role["Security"]
if(!spacevines_spawned)
possibleEvents[/datum/event/spacevine] = 10 + 5 * active_with_role["Engineer"]
if(minutes_passed >= 30) // Give engineers time to set up engine
possibleEvents[/datum/event/brand_intelligence] = 50 + 25 * active_with_role["Engineer"]
possibleEvents[/datum/event/anomaly/anomaly_pyro] = 100 + 60 * active_with_role["Engineer"]
possibleEvents[/datum/event/anomaly/anomaly_vortex] = 50 + 25 * active_with_role["Engineer"]
possibleEvents[/datum/event/anomaly/anomaly_bluespace] = 50 + 25 * active_with_role["Engineer"]
possibleEvents[/datum/event/anomaly/anomaly_flux] = 50 + 50 * active_with_role["Engineer"]
possibleEvents[/datum/event/meteor_wave] = 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/blob] = 10 * active_with_role["Engineer"]
if(active_with_role["Medical"] > 0)
possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 10
possibleEvents[/datum/event/viral_infection] = active_with_role["Medical"] * 10
possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50
if(active_with_role["Security"] > 0)
if(!sent_spiders_to_station)
possibleEvents[/datum/event/spider_infestation] = max(active_with_role["Security"], 5) + 5
if(aliens_allowed && !sent_aliens_to_station)
possibleEvents[/datum/event/alien_infestation] = max(active_with_role["Security"], 5) + 2.5
/*if(!sent_ninja_to_station && toggle_space_ninja)
possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5)*/
possibleEvents[/datum/event/tear] = active_with_role["Security"] * 25
for(var/event_type in event_last_fired) if(possibleEvents[event_type])
var/time_passed = world.time - event_last_fired[event_type]
var/full_recharge_after = 60 * 60 * 10 * 3 // 3 hours
var/weight_modifier = max(0, (full_recharge_after - time_passed) / 300)
possibleEvents[event_type] = max(possibleEvents[event_type] - weight_modifier, 0)
var/picked_event = pickweight(possibleEvents)
event_last_fired[picked_event] = world.time
// Debug code below here, very useful for testing so don't delete please.
var/debug_message = "Firing random event. "
for(var/V in active_with_role)
debug_message += "#[V]:[active_with_role[V]] "
debug_message += "||| "
for(var/V in possibleEvents)
debug_message += "[V]:[possibleEvents[V]]"
debug_message += "|||Picked:[picked_event]"
log_debug(debug_message)
if(!picked_event)
return
//The event will add itself to the MC's event list
//and start working via the constructor.
new picked_event
//moved this to proc/check_event()
/*var/chance = possibleEvents[picked_event]
var/base_chance = 0.4
switch(player_list.len)
if(5 to 10)
base_chance = 0.6
if(11 to 15)
base_chance = 0.7
if(16 to 20)
base_chance = 0.8
if(21 to 25)
base_chance = 0.9
if(26 to 30)
base_chance = 1.0
if(30 to 100000)
base_chance = 1.1
// Trigger the event based on how likely it currently is.
if(!prob(chance * eventchance * base_chance / 100))
return 0*/
/*switch(picked_event)
if("Meteor")
command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
spawn(100)
meteor_wave(10)
spawn_meteors()
spawn(700)
meteor_wave(10)
spawn_meteors()
if("Space Ninja")
//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
space_ninja_arrival()
if("Radiation")
high_radiation_event()
if("Virus")
viral_outbreak()
if("Alien")
alien_infestation()
if("Prison Break")
prison_break()
if("Carp")
carp_migration()
if("Lights")
lightsout(1,2)
if("Appendicitis")
appendicitis()
if("Ion Storm")
IonStorm()
if("Spacevine")
spacevine_infestation()
if("Communications")
communications_blackout()
if("Grid Check")
grid_check()
if("Meteor")
meteor_shower()*/
return 1
// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
// with a specific role.
// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
/proc/number_active_with_role()
var/list/active_with_role = list()
active_with_role["Engineer"] = 0
active_with_role["Medical"] = 0
active_with_role["Security"] = 0
active_with_role["Scientist"] = 0
active_with_role["AI"] = 0
active_with_role["Cyborg"] = 0
active_with_role["Janitor"] = 0
active_with_role["Botanist"] = 0
active_with_role["Any"] = player_list.len
for(var/mob/M in player_list)
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
continue
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module")
active_with_role["Engineer"]++
if(M.mind.assigned_role in list("Chief Engineer", "Station Engineer"))
active_with_role["Engineer"]++
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "medical robot module")
active_with_role["Medical"]++
if(M.mind.assigned_role in list("Chief Medical Officer", "Medical Doctor"))
active_with_role["Medical"]++
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module")
active_with_role["Security"]++
if(M.mind.assigned_role in security_positions)
active_with_role["Security"]++
if(M.mind.assigned_role in list("Research Director", "Scientist"))
active_with_role["Scientist"]++
if(M.mind.assigned_role == "AI")
active_with_role["AI"]++
if(M.mind.assigned_role == "Cyborg")
active_with_role["Cyborg"]++
if(M.mind.assigned_role == "Janitor")
active_with_role["Janitor"]++
if(M.mind.assigned_role == "Botanist")
active_with_role["Botanist"]++
return active_with_role
+51
View File
@@ -361,3 +361,54 @@
if(P.client)
players++
return players
// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
// with a specific role.
// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
/proc/number_active_with_role()
var/list/active_with_role = list()
active_with_role["Engineer"] = 0
active_with_role["Medical"] = 0
active_with_role["Security"] = 0
active_with_role["Scientist"] = 0
active_with_role["AI"] = 0
active_with_role["Cyborg"] = 0
active_with_role["Janitor"] = 0
active_with_role["Botanist"] = 0
active_with_role["Any"] = player_list.len
for(var/mob/M in player_list)
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
continue
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module")
active_with_role["Engineer"]++
if(M.mind.assigned_role in list("Chief Engineer", "Station Engineer"))
active_with_role["Engineer"]++
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "medical robot module")
active_with_role["Medical"]++
if(M.mind.assigned_role in list("Chief Medical Officer", "Medical Doctor"))
active_with_role["Medical"]++
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module")
active_with_role["Security"]++
if(M.mind.assigned_role in security_positions)
active_with_role["Security"]++
if(M.mind.assigned_role in list("Research Director", "Scientist"))
active_with_role["Scientist"]++
if(M.mind.assigned_role == "AI")
active_with_role["AI"]++
if(M.mind.assigned_role == "Cyborg")
active_with_role["Cyborg"]++
if(M.mind.assigned_role == "Janitor")
active_with_role["Janitor"]++
if(M.mind.assigned_role == "Botanist")
active_with_role["Botanist"]++
return active_with_role
+1 -1
View File
@@ -3,4 +3,4 @@
if(!(C.species.flags & IS_SYNTHETIC))
C.hallucination += rand(50, 100)
/datum/event/mass_hallucination/announce()
command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage")
command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucinations, but no further damage")
+1 -1
View File
@@ -39,7 +39,7 @@
for(var/i = 0, i < 10, i++)
for(var/mob/living/carbon/human/H in living_mob_list)
if(H.species.flags & IS_SYNTHETIC) // Leave synthetics completely unaffected
if(H.species.flags & NO_DNA_RAD) // Leave synthetics completely unaffected
continue
var/turf/T = get_turf(H)
if(!T)
+7 -5
View File
@@ -3,8 +3,10 @@
endWhen = 1
/datum/event/falsealarm/announce()
var/datum/event/E = pick(possibleEvents)
var/datum/event/Event = new E
message_admins("False Alarm: [Event]")
Event.announce() //just announce it like it's happening
Event.kill() //do not process this event - no starts, no ticks, no ends
var/weight = pick(EVENT_LEVEL_MUNDANE,EVENT_LEVEL_MUNDANE,EVENT_LEVEL_MUNDANE,EVENT_LEVEL_MODERATE,EVENT_LEVEL_MODERATE,EVENT_LEVEL_MAJOR)
var/datum/event_container/container = event_manager.event_containers[weight]
var/datum/event/E = container.acquire_event()
var/datum/event/Event = new E
message_admins("False Alarm: [Event]")
Event.announce() //just announce it like it's happening
Event.kill() //do not process this event - no starts, no ticks, no ends
@@ -3,7 +3,7 @@
/datum/event/mass_hallucination/start()
for(var/mob/living/carbon/human/C in living_mob_list)
if(!(C.species.flags & IS_SYNTHETIC))
if(!(C.species.flags & NO_DNA_RAD))
C.hallucination += rand(50, 100)
/datum/event/mass_hallucination/announce()
command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage")
@@ -11,7 +11,7 @@
garbageCollector.del_everything = !garbageCollector.del_everything
// world << "<b>GC: qdel turned [garbageCollector.del_everything ? "off" : "on"].</b>"
log_admin("[key_name(usr)] turned qdel [garbageCollector.del_everything ? "off" : "on"].")
message_admins("\blue [key_name(usr)] turned qdel [garbageCollector.del_everything ? "off" : "on"].", 1)
message_admins("\blue [key_name_admin(usr)] turned qdel [garbageCollector.del_everything ? "off" : "on"].", 1)
/client/proc/gc_toggle_profiling()
set name = "(GC) Toggle Profiling"
@@ -23,7 +23,7 @@
del_profiling = !del_profiling
log_admin("[key_name(usr)] turned deletion profiling [del_profiling ? "on" : "off"].")
message_admins("\blue [key_name(usr)] turned deletion profiling [del_profiling ? "on" : "off"].", 1)
message_admins("\blue [key_name_admin(usr)] turned deletion profiling [del_profiling ? "on" : "off"].", 1)
/client/proc/gc_show_del_report()
set name = "(GC) Show Del Report"
-91
View File
@@ -1,91 +0,0 @@
/datum/genetics/side_effect
var/name // name of the side effect, to use as a header in the manual
var/symptom // description of the symptom of the side effect
var/treatment // description of the treatment of the side effect
var/effect // description of what happens when not treated
var/duration = 0 // delay between start() and finish()
proc/start(mob/living/carbon/human/H)
// start the side effect, this should give some cue as to what's happening,
// such as gasping. These cues need to be unique among side-effects.
proc/finish(mob/living/carbon/human/H)
// Finish the side-effect. This should first check whether the cure has been
// applied, and if not, cause bad things to happen.
/datum/genetics/side_effect/genetic_burn
name = "Genetic Burn"
symptom = "Subject's skin turns unusualy red."
treatment = "Inject small dose of salbutamol."
effect = "Subject's skin burns."
duration = 10*30
start(mob/living/carbon/human/H)
H.emote("me", 1, "starts turning very red..")
finish(mob/living/carbon/human/H)
if(!H.reagents.has_reagent("salbutamol"))
for(var/organ_name in list("chest","l_arm","r_arm","r_leg","l_leg","head","groin"))
var/obj/item/organ/external/E = H.get_organ(organ_name)
E.take_damage(0, 5, 0)
/datum/genetics/side_effect/bone_snap
name = "Bone Snap"
symptom = "Subject's limbs tremble notably."
treatment = "Inject small dose of Styptic Powder."
effect = "Subject's bone breaks."
duration = 10*60
start(mob/living/carbon/human/H)
H.emote("me", 1, "'s limbs start shivering uncontrollably.")
finish(mob/living/carbon/human/H)
if(!H.reagents.has_reagent("styptic_powder"))
var/organ_name = pick("chest","l_arm","r_arm","r_leg","l_leg","head","groin")
var/obj/item/organ/external/E = H.get_organ(organ_name)
E.take_damage(20, 0, 0)
E.fracture()
/datum/genetics/side_effect/monkey
name = "Monkey"
symptom = "Subject starts drooling uncontrollably."
treatment = "Inject small dose of charcoal."
effect = "Subject turns into monkey."
duration = 10*90
start(mob/living/carbon/human/H)
H.emote("me", 1, "has drool running down from his mouth.")
finish(mob/living/carbon/human/H)
if(!H.reagents.has_reagent("charcoal"))
H.monkeyize()
/datum/genetics/side_effect/confuse
name = "Confuse"
symptom = "Subject starts drooling uncontrollably."
treatment = "Inject small dose of charcoal."
effect = "Subject becomes confused."
duration = 10*30
start(mob/living/carbon/human/H)
H.emote("me", 1, "has drool running down from his mouth.")
finish(mob/living/carbon/human/H)
if(!H.reagents.has_reagent("charcoal"))
H.confused += 100
proc/trigger_side_effect(mob/living/carbon/human/H)
spawn
if(!istype(H)) return
var/tp = pick(subtypesof(/datum/genetics/side_effect))
var/datum/genetics/side_effect/S = new tp
S.start(H)
spawn(20)
if(!istype(H)) return
H.Weaken(rand(0, S.duration / 50))
sleep(S.duration)
if(!istype(H)) return
H.SetWeakened(0)
S.finish(H)
+3 -3
View File
@@ -302,9 +302,9 @@
user.lastattacked = M
M.lastattacker = user
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" )
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [key_name(user)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
msg_admin_attack("[key_name_admin(user)] attacked [key_name_admin(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" )
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
+1 -1
View File
@@ -734,7 +734,7 @@
product = new /obj/item/weapon/reagent_containers/food/snacks/grown(get_turf(user),name)
if(get_trait(TRAIT_PRODUCT_COLOUR))
if(modular_icon == 1)
if(!has_mob_product || (has_mob_product && has_mob_product != /mob/living/carbon/primitive/diona))
if(!has_mob_product || (has_mob_product && has_mob_product != /mob/living/simple_animal/diona))
product.color = get_trait(TRAIT_PRODUCT_COLOUR)
if(istype(product,/obj/item/weapon/reagent_containers/food))
var/obj/item/weapon/reagent_containers/food/food = product
+1 -1
View File
@@ -1184,7 +1184,7 @@
seed_noun = "nodes"
display_name = "replicant pods"
can_self_harvest = 1
has_mob_product = /mob/living/carbon/primitive/diona
has_mob_product = /mob/living/simple_animal/diona
/datum/seed/diona/New()
..()
+1 -1
View File
@@ -69,7 +69,7 @@
host << "\green <B>You awaken slowly, stirring into sluggish motion as the air caresses you.</B>"
// This is a hack, replace with some kind of species blurb proc.
if(istype(host,/mob/living/carbon/primitive/diona))
if(istype(host,/mob/living/simple_animal/diona))
host << "<B>You are [host], one of a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders.</B>"
host << "<B>Too much darkness will send you into shock and starve you, but light will help you heal.</B>"
+2 -2
View File
@@ -140,8 +140,8 @@
return ..()
/obj/machinery/portable_atmospherics/hydroponics/proc/attack_generic(var/mob/user)
if(istype(user,/mob/living/carbon/primitive/diona))
var/mob/living/carbon/primitive/diona/nymph = user
if(istype(user,/mob/living/simple_animal/diona))
var/mob/living/simple_animal/diona/nymph = user
if(nymph.stat == DEAD || nymph.paralysis || nymph.weakened || nymph.stunned || nymph.restrained())
return
+1 -2
View File
@@ -63,8 +63,7 @@ var/list/karma_spenders = list()
var/list/karma_list = list("Cancel")
for(var/mob/M in player_list) if(M.client && M.mind)
var/special_role = M.mind.special_role
if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Syndicate" || special_role == "Syndicate Commando" || special_role == "Vox Raider" || special_role == "Alien") // Don't include special roles, because players use it to meta
if(isNonCrewAntag(M)) // Don't include special roles, because players use it to meta
continue
karma_list += M
+1 -1
View File
@@ -352,7 +352,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
usr << query.ErrorMsg()
else
log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
message_admins("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
message_admins("[key_name_admin(usr)] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
alert("Upload Complete.")
if(href_list["targetid"])
+1 -1
View File
@@ -287,7 +287,7 @@ var/global/list/rockTurfEdgeCache
if(z != 5)
notify_admins = 1
if(!triggered_by_explosion)
message_admins("[key_name_admin(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) has triggered a gibtonite deposit reaction at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
message_admins("[key_name_admin(user)] has triggered a gibtonite deposit reaction at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
else
message_admins("An explosion has triggered a gibtonite deposit reaction at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
+2 -2
View File
@@ -174,9 +174,9 @@
if(triggered_by == 1)
message_admins("An explosion has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
else if(triggered_by == 2)
message_admins("A signal has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>. Igniter attacher: [key_name_admin(attacher)]<A HREF='?_src_=holder;adminmoreinfo=\ref[attacher]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[attacher]'>FLW</A>)")
message_admins("A signal has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>. Igniter attacher: [key_name_admin(attacher)]")
else
message_admins("[key_name_admin(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
message_admins("[key_name_admin(user)] has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
if(triggered_by == 1)
log_game("An explosion has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
else if(triggered_by == 2)
+8 -5
View File
@@ -311,13 +311,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(jobban_isbanned(M, "AntagHUD"))
src << "\red <B>You have been banned from using this feature</B>"
return
if(config.antag_hud_restricted && !M.has_enabled_antagHUD &&!client.holder)
if(config.antag_hud_restricted && !M.has_enabled_antagHUD && !check_rights(R_MOD,0))
var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No")
if(response == "No") return
M.can_reenter_corpse = 0
if(M in respawnable_list)
respawnable_list -= M
if(!M.has_enabled_antagHUD && !client.holder)
if(!M.has_enabled_antagHUD && !check_rights(R_MOD,0))
M.has_enabled_antagHUD = 1
if(M.antagHUD)
M.antagHUD = 0
@@ -330,9 +330,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set category = "Ghost"
set name = "Teleport"
set desc= "Teleport to a location"
if(!istype(usr, /mob/dead/observer))
if(!isobserver(usr))
usr << "Not when you're not dead!"
return
usr.verbs -= /mob/dead/observer/proc/dead_tele
spawn(30)
usr.verbs += /mob/dead/observer/proc/dead_tele
@@ -348,7 +350,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!L || !L.len)
usr << "No area available."
usr.loc = pick(L)
usr.forceMove(pick(L))
/mob/dead/observer/verb/follow()
set category = "Ghost"
@@ -598,4 +600,5 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//add images for the 60inv things ghosts can normally see when darkness is enabled so they can see them now
client.images |= ghost_darkness_images
if (ghostimage)
client.images -= ghostimage //remove ourself
client.images -= ghostimage //remove ourself
+13 -13
View File
@@ -95,7 +95,7 @@
if(!(language && (language.flags & INNATE))) // skip understanding checks for INNATE languages
if(!say_understands(speaker,language))
if(istype(speaker,/mob/living/simple_animal))
if(isanimal(speaker))
var/mob/living/simple_animal/S = speaker
if(S.speak && S.speak.len)
message = pick(S.speak)
@@ -111,7 +111,8 @@
message = stars(message)
var/speaker_name = "unknown"
if(speaker) speaker_name = speaker.name
if(speaker)
speaker_name = speaker.name
if(vname)
speaker_name = vname
@@ -120,18 +121,17 @@
var/changed_voice
if(istype(src, /mob/living/silicon/ai) && !hard_to_hear)
if(isAI(src) && !hard_to_hear)
var/jobname // the mob's "job"
var/mob/living/carbon/human/impersonating //The crewmember being impersonated, if any.
if (ishuman(speaker))
var/mob/living/carbon/human/H = speaker
if((H.wear_id && istype(H.wear_id,/obj/item/weapon/card/id/syndicate)) && (H.wear_mask && istype(H.wear_mask,/obj/item/clothing/mask/gas/voice)))
var/obj/item/weapon/card/id/id = H.wear_id
if((istype(id) && id.is_untrackable()) && H.HasVoiceChanger())
changed_voice = 1
var/mob/living/carbon/human/I = locate(speaker_name)
if(I)
impersonating = I
jobname = impersonating.get_assignment()
@@ -141,28 +141,28 @@
jobname = H.get_assignment()
else if (iscarbon(speaker)) // Nonhuman carbon mob
jobname = "No id"
jobname = "No ID"
else if (isAI(speaker))
jobname = "AI"
else if (isrobot(speaker))
jobname = "Cyborg"
else if (istype(speaker, /mob/living/silicon/pai))
else if (ispAI(speaker))
jobname = "Personal AI"
else
jobname = "Unknown"
if(changed_voice)
if(impersonating)
track = "<a href='byond://?src=\ref[src];trackname=[html_encode(speaker_name)];track=\ref[impersonating]'>[speaker_name] ([jobname])</a>"
track = "<a href='byond://?src=\ref[src];track=\ref[impersonating]'>[speaker_name] ([jobname])</a>"
else
track = "[speaker_name] ([jobname])"
else
if(istype(follow_target, /obj/machinery/bot) && isAI(src))
track = "<a href='byond://?src=\ref[src];track2=\ref[src];trackbot=\ref[follow_target]'>[speaker_name] ([jobname])</a>"
if(istype(follow_target, /obj/machinery/bot))
track = "<a href='byond://?src=\ref[src];trackbot=\ref[follow_target]'>[speaker_name] ([jobname])</a>"
else
track = "<a href='byond://?src=\ref[src];trackname=[html_encode(speaker_name)];track=\ref[speaker]'>[speaker_name] ([jobname])</a>"
track = "<a href='byond://?src=\ref[src];track=\ref[speaker]'>[speaker_name] ([jobname])</a>"
if(istype(src, /mob/dead/observer))
if(isobserver(src))
if(speaker && (speaker_name != speaker.real_name) && !isAI(speaker)) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs.
speaker_name = "[speaker.real_name] ([speaker_name])"
track = "[speaker_name] ([ghost_follow_link(follow_target, ghost=src)])"
+9 -2
View File
@@ -97,7 +97,7 @@
return (copytext(message, length(message)) == "!") ? 2 : 1
/datum/language/proc/broadcast(var/mob/living/speaker,var/message,var/speaker_mask)
log_say("[key_name(speaker)] : ([name]) [message]")
log_say("[key_name(speaker)]: ([name]) [message]")
if(!speaker_mask) speaker_mask = speaker.name
var/msg = "<i><span class='game say'>[name], <span class='name'>[speaker_mask]</span> [format_message(message, get_spoken_verb(message))]</span></i>"
@@ -246,6 +246,13 @@
key = "5"
flags = RESTRICTED | WHITELISTED
syllables = list("02011","01222","10100","10210","21012","02011","21200","1002","2001","0002","0012","0012","000","120","121","201","220","10","11","0")
/datum/language/machine/get_random_name()
if(prob(70))
name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
else
name = pick(ai_names)
return name
/datum/language/kidan
name = "Chittin"
@@ -468,7 +475,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>"
message_start = "<i><span class='game say'>[name], <a href='byond://?src=\ref[S];track=\ref[speaker]'><span class='name'>[speaker.name]</span></a>"
else if (!S.binarycheck())
continue
@@ -43,9 +43,11 @@ Doesn't work on other aliens/AI.*/
adjustToxLoss(-10)
var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
if(msg)
log_say("AlienWhisper: [key_name(src)]->[M.key] : [msg]")
log_say("Alien Whisper: [key_name(src)]->[key_name(M)]: [msg]")
M << "<span class='noticealien'>You hear a strange, alien voice in your head...<span class='noticealien'>[msg]"
src << {"<span class='noticealien'>You said: "[msg]" to [M]</span>"}
src << "<span class='noticealien'>You said: [msg] to [M]</span>"
for(var/mob/dead/observer/G in player_list)
G.show_message("<i>Alien message from <b>[src]</b> ([ghost_follow_link(src, ghost=G)]) to <b>[M]</b> ([ghost_follow_link(M, ghost=G)]): [msg]</i>")
return
/mob/living/carbon/alien/humanoid/verb/transfer_plasma(mob/living/carbon/alien/M as mob in oview())
@@ -169,9 +169,9 @@ var/const/MAX_ACTIVE_TIME = 400
if(ishuman(target))
var/mob/living/carbon/human/H = target
if((H.species.flags & IS_SYNTHETIC))
if(!H.check_has_mouth())
return
if(!sterile)
//target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
target.visible_message("<span class='danger'>[src] falls limp after violating [target]'s face!</span>", \
@@ -62,6 +62,14 @@
/mob/living/carbon/brain/blob_act()
return
/mob/living/carbon/brain/on_forcemove(atom/newloc)
if(container)
container.loc = newloc
else //something went very wrong.
CRASH("Brainmob without container.")
loc = container
/mob/living/carbon/brain/binarycheck()
return istype(loc, /obj/item/device/mmi/posibrain)
+3 -3
View File
@@ -452,9 +452,9 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
var/start_T_descriptor = "<font color='#6b5d00'>tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]</font>"
var/end_T_descriptor = "<font color='#6b4400'>tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]</font>"
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been thrown by [usr.name] ([usr.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
msg_admin_attack("[usr.name] ([usr.ckey])[isAntag(usr) ? "(ANTAG)" : ""] has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been thrown by [key_name(usr)] from [start_T_descriptor] with the target [end_T_descriptor]</font>")
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has thrown [key_name(M)] from [start_T_descriptor] with the target [end_T_descriptor]</font>")
msg_admin_attack("[key_name_admin(usr)] has thrown [key_name_admin(M)] from [start_T_descriptor] with the target [end_T_descriptor]")
if(!iscarbon(usr))
M.LAssailant = null
@@ -5,7 +5,7 @@
canmove = 0
icon = null
invisibility = 101
if(!(species.flags & IS_SYNTHETIC))
if(!isSynthetic())
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
@@ -27,7 +27,7 @@
// Override the current limb status and don't cause an explosion
E.droplimb(DROPLIMB_EDGE)
if(!(species.flags & IS_SYNTHETIC))
if(!isSynthetic())
flick("gibbed-h", animation)
hgibs(loc, viruses, dna)
else
@@ -283,7 +283,7 @@
if(temp && !temp.is_stump())
if(temp.status & ORGAN_ROBOT)
if(!(temp.brute_dam + temp.burn_dam))
if(!(species.flags & IS_SYNTHETIC))
if(!isSynthetic())
wound_flavor_text["[temp.limb_name]"] = "<span class='warning'>[t_He] has a robotic [temp.name]!</span>\n"
continue
else
+52 -27
View File
@@ -431,12 +431,10 @@
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M)
if(!istype(M))
return 0
for(var/L in M.contents)
/mob/living/carbon/human/proc/is_loyalty_implanted()
for(var/L in contents)
if(istype(L, /obj/item/weapon/implant/loyalty))
for(var/obj/item/organ/external/O in M.organs)
for(var/obj/item/organ/external/O in organs)
if(L in O.implants)
return 1
return 0
@@ -696,6 +694,12 @@
// if looting pockets with gloves, do it quietly
if(href_list["pockets"])
if(isanimal(usr))
return //animals cannot strip people
if(frozen)
usr << "\red Do not attempt to strip frozen people."
return
var/pocket_side = href_list["pockets"]
var/pocket_id = (pocket_side == "right" ? slot_r_store : slot_l_store)
var/obj/item/pocket_item = (pocket_id == slot_r_store ? src.r_store : src.l_store)
@@ -722,16 +726,19 @@
// Update strip window
if(usr.machine == src && in_range(src, usr))
show_inv(usr)
else if(!pickpocket)
// Display a warning if the user mocks up
src << "<span class='warning'>You feel your [pocket_side] pocket being fumbled with!</span>"
// if looting id with gloves, do it quietly - this allows pickpocket gloves to take/place id stealthily - Bone White
if(href_list["item"])
if(isanimal(usr))
return //animals cannot strip people
if(frozen)
usr << "\red Do not attempt to strip frozen people."
return
var/itemTarget = href_list["item"]
if(itemTarget == "id")
if(pickpocket)
@@ -764,9 +771,6 @@
// Display a warning if the user mocks up
src << "<span class='warning'>You feel your ID slot being fumbled with!</span>"
if (href_list["refresh"])
if((machine)&&(in_range(src, usr)))
show_inv(machine)
@@ -1126,26 +1130,47 @@
return
/mob/living/carbon/human/can_inject(var/mob/user, var/error_msg, var/target_zone)
. = 1 // Default to returning true.
if(user && !target_zone)
target_zone = user.zone_sel.selecting
// If targeting the head, see if the head item is thin enough.
// If targeting anything else, see if the wear suit is thin enough.
if(above_neck(target_zone))
if(head && head.flags & THICKMATERIAL)
. = 0
. = 1
if(!target_zone)
if(!user)
target_zone = pick("chest","chest","chest","left leg","right leg","left arm", "right arm", "head")
else
target_zone = user.zone_sel.selecting
var/obj/item/organ/external/affecting = get_organ(target_zone)
var/fail_msg
if(!affecting)
. = 0
fail_msg = "They are missing that limb."
else if (affecting.status & ORGAN_ROBOT)
. = 0
fail_msg = "That limb is robotic."
else
if(wear_suit && wear_suit.flags & THICKMATERIAL)
. = 0
switch(target_zone)
if("head")
if(head && head.flags & THICKMATERIAL)
. = 0
else
if(wear_suit && wear_suit.flags & THICKMATERIAL)
. = 0
if(!. && error_msg && user)
// Might need re-wording.
user << "<span class='alert'>There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"].</span>"
if(!fail_msg)
fail_msg = "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into."
user << "<span class='alert'>[fail_msg]</span>"
/mob/living/carbon/human/proc/check_has_mouth()
// Todo, check stomach organ when implemented.
var/obj/item/organ/external/head/H = get_organ("head")
if(!H || !H.can_intake_reagents)
return 0
return 1
/mob/living/carbon/human/proc/vomit(hairball=0)
if(stat==2)return
if(stat==DEAD)return
if(species.flags & IS_SYNTHETIC)
return //Machines don't throw up.
if(!check_has_mouth())
return
if(!lastpuke)
lastpuke = 1
@@ -63,13 +63,17 @@
help_shake_act(M)
add_logs(src, M, "shaked")
return 1
// if(M.health < -75) return 0
if(!H.check_has_mouth())
H << "<span class='danger'>You don't have a mouth, you cannot perform CPR!</span>"
return
if(!check_has_mouth())
H << "<span class='danger'>They don't have a mouth, you cannot perform CPR!</span>"
return
if((M.head && (M.head.flags & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags & MASKCOVERSMOUTH) && !M.wear_mask.mask_adjusted))
M << "<span class='boldnotice'>Remove your mask!</span>"
M << "<span class='warning'>Remove your mask!</span>"
return 0
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH) && !wear_mask.mask_adjusted))
M << "<span class='boldnotice'>Remove his mask!</span>"
M << "<span class='warning'>Remove his mask!</span>"
return 0
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human()
@@ -118,7 +122,7 @@
//we're good to suck the blood, blaah
M.handle_bloodsucking(src)
add_logs(src, M, "vampirebit")
message_admins("[M.name] ([M.ckey]) vampirebit [src.name] ([src.ckey])")
msg_admin_attack("[key_name_admin(M)] vampirebit [key_name_admin(src)]")
return
//end vampire codes
@@ -11,13 +11,8 @@
total_burn += O.burn_dam
health = 100 - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute
//TODO: fix husking
if( (((100 - total_burn) < config.health_threshold_dead) && stat == DEAD) && (!(species.flags & IS_SYNTHETIC)))//100 only being used as the magic human max health number, feel free to change it if you add a var for it -- Urist
if( (((100 - total_burn) < config.health_threshold_dead) && stat == DEAD))//100 only being used as the magic human max health number, feel free to change it if you add a var for it -- Urist
ChangeToHusk()
if (species.flags & IS_SYNTHETIC)
var/obj/item/organ/external/head/H = organs_by_name["head"]
if(H)
if((health >= (config.health_threshold_dead/100*75)) && stat == DEAD) //need to get them 25% away from death point before reviving synthetics
update_revive()
if (stat == CONSCIOUS && (src in dead_mob_list)) //Defib fix
update_revive()
return
@@ -31,17 +26,45 @@
tod = 0
timeofdeath = 0
/mob/living/carbon/human/adjustBrainLoss(var/amount)
if(status_flags & GODMODE) return 0 //godmode
if(species && species.has_organ["brain"])
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
if(sponge)
sponge.take_damage(amount)
sponge.damage = min(max(sponge.damage, 0),(maxHealth*2))
brainloss = sponge.damage
else
brainloss = 200
else
brainloss = 0
/mob/living/carbon/human/setBrainLoss(var/amount)
if(status_flags & GODMODE) return 0 //godmode
if(species && species.has_organ["brain"])
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
if(sponge)
sponge.damage = min(max(amount, 0),(maxHealth*2))
brainloss = sponge.damage
else
brainloss = 200
else
brainloss = 0
/mob/living/carbon/human/getBrainLoss()
var/res = brainloss
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
if(!sponge)
return
if (sponge.is_bruised())
res += 20
if (sponge.is_broken())
res += 50
res = min(res,maxHealth*2)
return res
if(status_flags & GODMODE) return 0 //godmode
if(species && species.has_organ["brain"])
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
if(sponge)
brainloss = min(sponge.damage,maxHealth*2)
else
brainloss = 200
else
brainloss = 0
return brainloss
//These procs fetch a cumulative total damage from all organs
/mob/living/carbon/human/getBruteLoss()
@@ -114,13 +137,12 @@
/mob/living/carbon/human/Paralyse(amount)
..()
/mob/living/carbon/human/adjustCloneLoss(var/amount)
if(species.flags & IS_SYNTHETIC)
return
..()
if(species.flags & (NO_SCAN))
cloneloss = 0
return
var/heal_prob = max(0, 80 - getCloneLoss())
var/mut_prob = min(80, getCloneLoss()+10)
@@ -151,6 +173,41 @@
O.unmutate()
src << "<span class = 'notice'>Your [O.name] is shaped normally again.</span>"
hud_updateflag |= 1 << HEALTH_HUD
// Defined here solely to take species flags into account without having to recast at mob/living level.
/mob/living/carbon/human/getOxyLoss()
if(species.flags & NO_BREATHE)
oxyloss = 0
return ..()
/mob/living/carbon/human/adjustOxyLoss(var/amount)
if(species.flags & NO_BREATHE)
oxyloss = 0
else
..()
/mob/living/carbon/human/setOxyLoss(var/amount)
if(species.flags & NO_BREATHE)
oxyloss = 0
else
..()
/mob/living/carbon/human/getToxLoss()
if(species.flags & NO_POISON)
toxloss = 0
return ..()
/mob/living/carbon/human/adjustToxLoss(var/amount)
if(species.flags & NO_POISON)
toxloss = 0
else
..()
/mob/living/carbon/human/setToxLoss(var/amount)
if(species.flags & NO_POISON)
toxloss = 0
else
..()
////////////////////////////////////////////
@@ -35,13 +35,13 @@ emp_act
if(check_shields(P.damage, "the [P.name]", P))
P.on_hit(src, 100, def_zone)
return 2
var/obj/item/organ/external/organ = get_organ(check_zone(def_zone))
if(isnull(organ))
return
//Shrapnel
if (P.damage_type == BRUTE)
var/obj/item/organ/external/organ = get_organ(check_zone(def_zone))
if(!organ)
return
var/armor = getarmor_organ(organ, "bullet")
if((P.embed && prob(20 + max(P.damage - armor, -10))))
var/obj/item/weapon/shard/shrapnel/SP = new()
@@ -50,9 +50,7 @@ emp_act
(SP.loc) = organ
organ.embed(SP)
var/mob/living/carbon/human/M = src
var/obj/item/organ/external/affected = M.get_organ(def_zone)
affected.add_autopsy_data(P.name, P.damage) // Add the bullet's name to the autopsy data
organ.add_autopsy_data(P.name, P.damage) // Add the bullet's name to the autopsy data
return (..(P , def_zone))
@@ -204,11 +202,6 @@ emp_act
for(var/obj/O in src)
if(!O) continue
O.emp_act(severity)
for(var/obj/item/organ/external/O in organs)
if(O.status & ORGAN_DESTROYED) continue
O.emp_act(severity)
for(var/obj/item/organ/I in O.internal_organs)
I.emp_act(severity)
..()
/mob/living/carbon/human/emag_act(user as mob, var/obj/item/organ/external/affecting)
@@ -239,9 +232,9 @@ emp_act
--src.meatleft
user << "\red You hack off a chunk of meat from [src.name]"
if(!src.meatleft)
src.attack_log += "\[[time_stamp()]\] Was chopped up into meat by <b>[user]/[user.ckey]</b>"
user.attack_log += "\[[time_stamp()]\] Chopped up <b>[src]/[src.ckey]</b> into meat</b>"
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] chopped up [src] ([src.ckey]) into meat (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
src.attack_log += "\[[time_stamp()]\] Was chopped up into meat by <b>[key_name(user)]</b>"
user.attack_log += "\[[time_stamp()]\] Chopped up <b>[key_name(src)]</b> into meat</b>"
msg_admin_attack("[key_name_admin(user)] chopped up [key_name_admin(src)] into meat")
if(!iscarbon(user))
LAssailant = null
else
@@ -394,12 +387,11 @@ emp_act
if(ismob(O.thrower))
var/mob/M = O.thrower
var/client/assailant = M.client
if(assailant)
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [O], thrown by [M.name] ([assailant.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [src.name] ([src.ckey]) with a thrown [O]</font>")
if(M)
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [O], thrown by [key_name(M)]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [key_name(src)] with a thrown [O]</font>")
if(!istype(src,/mob/living/simple_animal/mouse))
msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey])[isAntag(M) ? "(ANTAG)" : ""] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
msg_admin_attack("[key_name_admin(src)] was hit by a [O], thrown by [key_name_admin(M)]")
//thrown weapon embedded object code.
if(dtype == BRUTE && istype(O,/obj/item))
@@ -497,8 +489,11 @@ emp_act
M.occupant_message("<span class='danger'>You hit [src].</span>")
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>", \
"<span class='userdanger'>[src] has been hit by [M.name].</span>")
add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
M.occupant.attack_log += text("\[[time_stamp()]\] <font color='red'>Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])")
else
..()
@@ -29,8 +29,8 @@
var/age = 30 //Player's age (pure fluff)
var/b_type = "A+" //Player's bloodtype
var/underwear = 1 //Which underwear the player wants
var/undershirt = 0 //Which undershirt the player wants.
var/underwear = "Nude" //Which underwear the player wants
var/undershirt = "Nude" //Which undershirt the player wants.
var/backbag = 2 //Which backpack type the player has chosen. Nothing, Satchel or Backpack.
//Equipment slots
@@ -72,11 +72,9 @@
for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot"))
var/obj/item/organ/external/E = organs_by_name[limb_tag]
if(!E)
stance_damage += 2
else if (E.status & ORGAN_DESTROYED)
stance_damage += 2 // let it fail even if just foot&leg
else if (E.is_malfunctioning() || (E.is_broken() && !(E.status & ORGAN_SPLINTED)) || !E.is_usable())
if(!E || (E.status & (ORGAN_DESTROYED|ORGAN_DEAD)) || E.is_malfunctioning())
stance_damage += 2 // let it fail even if just foot&leg. Also malfunctioning happens sporadically so it should impact more when it procs
else if (E.is_broken() || !E.is_usable())
stance_damage += 1
// Canes and crutches help you stand (if the latter is ever added)
@@ -56,7 +56,7 @@
/mob/living/carbon/human/proc/has_organ(name)
var/obj/item/organ/external/O = organs_by_name[name]
return (O && !(O.status & ORGAN_DESTROYED) )
return (O && !(O.status & ORGAN_DESTROYED) && !O.is_stump())
/mob/living/carbon/human/proc/has_organ_for_slot(slot)
switch(slot)
+35 -19
View File
@@ -245,10 +245,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
adjustCloneLoss(0.1)
/mob/living/carbon/human/proc/handle_mutations_and_radiation()
if(species.flags & IS_SYNTHETIC) //Robots don't suffer from mutations or radloss.
return
if(getFireLoss())
if((RESIST_HEAT in mutations) || (prob(1)))
heal_organ_damage(0,1)
@@ -847,7 +843,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(species && species.flags & NO_INTORGANS) return
if(!(species.flags & IS_SYNTHETIC)) handle_trace_chems()
handle_trace_chems()
updatehealth()
@@ -904,7 +900,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(!reagents.has_reagent("epinephrine"))
adjustOxyLoss(1)*/
if(hallucination && !(species.flags & IS_SYNTHETIC))
if(hallucination && !(species.flags & NO_DNA_RAD))
spawn handle_hallucinations()
if(hallucination<=2)
@@ -967,18 +963,35 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(!E.len)
embedded_flag = 0
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
blinded = 1
else if(eye_blind) //blindness, heals slowly over time
eye_blind = max(eye_blind-1,0)
blinded = 1
else if(tinttotal >= TINT_BLIND) //covering your eyes heals blurry eyes faster
eye_blurry = max(eye_blurry-3, 0)
// blinded = 1 //now handled under /handle_regular_hud_updates()
else if(eye_blurry) //blurry eyes heal slowly
eye_blurry = max(eye_blurry-1, 0)
//Vision
var/obj/item/organ/vision
if(species.vision_organ)
vision = internal_organs_by_name[species.vision_organ]
if(!species.vision_organ) // Presumably if a species has no vision organs, they see via some other means.
eye_blind = 0
blinded = 0
eye_blurry = 0
else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind.
eye_blind = 1
blinded = 1
eye_blurry = 1
else
//blindness
if(sdisabilities & BLIND) // Disabled-blind, doesn't get better on its own
blinded = 1
else if(eye_blind) // Blindness, heals slowly over time
eye_blind = max(eye_blind-1,0)
blinded = 1
else if(istype(glasses, /obj/item/clothing/glasses/sunglasses/blindfold)) //resting your eyes with a blindfold heals blurry eyes faster
eye_blurry = max(eye_blurry-3, 0)
blinded = 1
//blurry sight
if(vision.is_bruised()) // Vision organs impaired? Permablurry.
eye_blurry = 1
if(eye_blurry) // Blurry eyes heal slowly
eye_blurry = max(eye_blurry-1, 0)
//Ears
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
@@ -1212,6 +1225,9 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
else if(!seer)
see_in_dark = species.darksight
see_invisible = SEE_INVISIBLE_LIVING
if(see_override) //Override all
see_invisible = see_override
if(ticker && ticker.mode.name == "nations")
process_nations()
@@ -1569,7 +1585,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
/mob/living/carbon/human/proc/handle_decay()
var/decaytime = world.time - timeofdeath
if(species.flags & IS_SYNTHETIC)
if(isSynthetic())
return
if(reagents.has_reagent("formaldehyde")) //embalming fluid stops decay
+12 -6
View File
@@ -190,7 +190,7 @@
//These only pertain to common. Languages are handled by mob/say_understands()
if (!speaking)
if (istype(other, /mob/living/carbon/primitive/diona))
if (istype(other, /mob/living/simple_animal/diona))
if(other.languages.len >= 2) //They've sucked down some blood and can speak common now.
return 1
if (istype(other, /mob/living/silicon))
@@ -207,16 +207,22 @@
// return 0
return ..()
/mob/living/carbon/human/GetVoice()
var/voice_sub
/mob/living/carbon/human/proc/HasVoiceChanger()
for(var/obj/item/gear in list(wear_mask,wear_suit,head))
if(!gear)
continue
var/obj/item/voice_changer/changer = locate() in gear
if(changer && changer.active && changer.voice)
voice_sub = changer.voice
return changer
return 0
/mob/living/carbon/human/GetVoice()
var/voice_sub
var/has_changer = HasVoiceChanger()
if(has_changer)
voice_sub = has_changer
if(voice_sub)
return voice_sub
if(mind && mind.changeling && mind.changeling.mimicing)
@@ -1,5 +1,6 @@
/datum/species/wryn
name = "Wryn"
name_plural = "Wryn"
icobase = 'icons/mob/human_races/r_wryn.dmi'
deform = 'icons/mob/human_races/r_wryn.dmi'
language = "Wryn Hivemind"
@@ -76,6 +77,7 @@
/datum/species/nucleation
name = "Nucleation"
name_plural = "Nucleations"
icobase = 'icons/mob/human_races/r_nucleation.dmi'
unarmed_type = /datum/unarmed_attack/punch
blurb = "A sub-race of unforunates who have been exposed to too much supermatter radiation. As a result, \
@@ -1,5 +1,6 @@
/datum/species/golem
name = "Golem"
name_plural = "Golems"
icobase = 'icons/mob/human_races/r_golem.dmi'
deform = 'icons/mob/human_races/r_golem.dmi'
@@ -1,5 +1,6 @@
/datum/species/monkey
name = "Monkey"
name_plural = "Monkeys"
blurb = "Ook."
icobase = 'icons/mob/human_races/monkeys/r_monkey.dmi'
@@ -52,7 +53,8 @@ datum/species/monkey/get_random_name(var/gender)
/datum/species/monkey/tajaran
name = "Farwa"
name_plural = "Farwa"
icobase = 'icons/mob/human_races/monkeys/r_farwa.dmi'
deform = 'icons/mob/human_races/monkeys/r_farwa.dmi'
@@ -66,6 +68,7 @@ datum/species/monkey/get_random_name(var/gender)
/datum/species/monkey/vulpkanin
name = "Wolpin"
name_plural = "Wolpin"
icobase = 'icons/mob/human_races/monkeys/r_wolpin.dmi'
deform = 'icons/mob/human_races/monkeys/r_wolpin.dmi'
@@ -80,6 +83,7 @@ datum/species/monkey/get_random_name(var/gender)
/datum/species/monkey/skrell
name = "Neara"
name_plural = "Neara"
icobase = 'icons/mob/human_races/monkeys/r_neara.dmi'
deform = 'icons/mob/human_races/monkeys/r_neara.dmi'
@@ -96,6 +100,7 @@ datum/species/monkey/get_random_name(var/gender)
/datum/species/monkey/unathi
name = "Stok"
name_plural = "Stok"
icobase = 'icons/mob/human_races/monkeys/r_stok.dmi'
deform = 'icons/mob/human_races/monkeys/r_stok.dmi'
@@ -1,5 +1,6 @@
/datum/species/plasmaman // /vg/
name = "Plasmaman"
name_plural = "Plasmamen"
icobase = 'icons/mob/human_races/r_plasmaman_sb.dmi'
deform = 'icons/mob/human_races/r_plasmaman_pb.dmi' // TODO: Need deform.
//language = "Clatter"
@@ -1,6 +1,7 @@
/datum/species/shadow
name = "Shadow"
name_plural = "Shadows"
icobase = 'icons/mob/human_races/r_shadow.dmi'
deform = 'icons/mob/human_races/r_shadow.dmi'
@@ -4,6 +4,7 @@
/datum/species
var/name // Species name.
var/name_plural // Pluralized name (since "[name]s" is not always valid)
var/path // Species path
var/icobase = 'icons/mob/human_races/r_human.dmi' // Normal icon set.
var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set.
@@ -37,7 +38,7 @@
var/heat_level_3_breathe = 1000 // Heat damage level 3 above this point; used for breathed air temperature
var/body_temperature = 310.15 //non-IS_SYNTHETIC species will try to stabilize at this temperature. (also affects temperature processing)
var/synth_temp_gain = 0 //IS_SYNTHETIC species will gain this much temperature every second
var/passive_temp_gain = 0 //IS_SYNTHETIC species will gain this much temperature every second
var/reagent_tag //Used for metabolizing reagents.
var/darksight = 2
@@ -78,6 +79,7 @@
var/icon/icon_template
var/is_small
var/show_ssd = 1
var/virus_immune
// Language/culture vars.
var/default_language = "Galactic Common" // Default language is used when 'say' is used without modifiers.
@@ -95,8 +97,8 @@
"brain" = /obj/item/organ/brain,
"appendix" = /obj/item/organ/appendix,
"eyes" = /obj/item/organ/eyes
)
)
var/vision_organ // If set, this organ is required for vision. Defaults to "eyes" if the species has them.
var/list/has_limbs = list(
"chest" = list("path" = /obj/item/organ/external/chest),
"groin" = list("path" = /obj/item/organ/external/groin),
@@ -112,6 +114,10 @@
)
/datum/species/New()
//If the species has eyes, they are the default vision organ
if(!vision_organ && has_organ["eyes"])
vision_organ = "eyes"
unarmed = new unarmed_type()
/datum/species/proc/get_random_name(var/gender)
@@ -150,14 +156,6 @@
for(var/obj/item/organ/external/O in H.organs)
O.owner = H
if(flags & IS_SYNTHETIC)
for(var/obj/item/organ/external/E in H.organs)
if(E.status & ORGAN_CUT_AWAY || E.status & ORGAN_DESTROYED) continue
E.robotize()
for(var/obj/item/organ/I in H.internal_organs)
I.robotize()
/datum/species/proc/handle_breath(var/datum/gas_mixture/breath, var/mob/living/carbon/human/H)
var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa
//var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now)
@@ -1,5 +1,6 @@
/datum/species/human
name = "Human"
name_plural = "Humans"
icobase = 'icons/mob/human_races/r_human.dmi'
deform = 'icons/mob/human_races/r_def_human.dmi'
primitive_form = "Monkey"
@@ -19,6 +20,7 @@
/datum/species/unathi
name = "Unathi"
name_plural = "Unathi"
icobase = 'icons/mob/human_races/r_lizard.dmi'
deform = 'icons/mob/human_races/r_def_lizard.dmi'
path = /mob/living/carbon/human/unathi
@@ -59,6 +61,7 @@
/datum/species/tajaran
name = "Tajaran"
name_plural = "Tajaran"
icobase = 'icons/mob/human_races/r_tajaran.dmi'
deform = 'icons/mob/human_races/r_def_tajaran.dmi'
path = /mob/living/carbon/human/tajaran
@@ -99,6 +102,7 @@
/datum/species/vulpkanin
name = "Vulpkanin"
name_plural = "Vulpakanin"
icobase = 'icons/mob/human_races/r_vulpkanin.dmi'
deform = 'icons/mob/human_races/r_vulpkanin.dmi'
path = /mob/living/carbon/human/vulpkanin
@@ -129,6 +133,7 @@
/datum/species/skrell
name = "Skrell"
name_plural = "Skrell"
icobase = 'icons/mob/human_races/r_skrell.dmi'
deform = 'icons/mob/human_races/r_def_skrell.dmi'
path = /mob/living/carbon/human/skrell
@@ -153,6 +158,7 @@
/datum/species/vox
name = "Vox"
name_plural = "Vox"
icobase = 'icons/mob/human_races/r_vox.dmi'
deform = 'icons/mob/human_races/r_def_vox.dmi'
path = /mob/living/carbon/human/vox
@@ -213,6 +219,7 @@
/datum/species/vox/armalis
name = "Vox Armalis"
name_plural = "Vox Armalis"
icobase = 'icons/mob/human_races/r_armalis.dmi'
deform = 'icons/mob/human_races/r_armalis.dmi'
path = /mob/living/carbon/human/voxarmalis
@@ -260,6 +267,7 @@
/datum/species/kidan
name = "Kidan"
name_plural = "Kidan"
icobase = 'icons/mob/human_races/r_kidan.dmi'
deform = 'icons/mob/human_races/r_def_kidan.dmi'
path = /mob/living/carbon/human/kidan
@@ -278,6 +286,7 @@
/datum/species/slime
name = "Slime People"
name_plural = "Slime People"
default_language = "Galactic Common"
language = "Bubblish"
icobase = 'icons/mob/human_races/r_slime.dmi'
@@ -299,6 +308,7 @@
/datum/species/grey
name = "Grey"
name_plural = "Greys"
icobase = 'icons/mob/human_races/r_grey.dmi'
deform = 'icons/mob/human_races/r_def_grey.dmi'
default_language = "Galactic Common"
@@ -332,6 +342,7 @@
/datum/species/diona
name = "Diona"
name_plural = "Dionaea"
icobase = 'icons/mob/human_races/r_diona.dmi'
deform = 'icons/mob/human_races/r_def_plant.dmi'
path = /mob/living/carbon/human/diona
@@ -395,7 +406,7 @@
)
/datum/species/diona/can_understand(var/mob/other)
var/mob/living/carbon/primitive/diona/D = other
var/mob/living/simple_animal/diona/D = other
if(istype(D))
return 1
return 0
@@ -408,30 +419,38 @@
/* //overpowered and dumb as hell; they get cloning back, though.
/datum/species/diona/handle_death(var/mob/living/carbon/human/H)
var/mob/living/carbon/primitive/diona/S = new(get_turf(H))
var/mob/living/simple_animal/diona/S = new(get_turf(H))
if(H.mind)
H.mind.transfer_to(S)
else
S.key = H.key
for(var/mob/living/carbon/primitive/diona/D in H.contents)
for(var/mob/living/simple_animal/diona/D in H.contents)
if(D.client)
D.loc = H.loc
else
del(D)
H.visible_message("\red[H] splits apart with a wet slithering noise!") */
H.visible_message("<span class='danger">[H] splits apart with a wet slithering noise!"</span>) */
/datum/species/machine
name = "Machine"
name_plural = "Machines"
blurb = "Positronic intelligence really took off in the 26th century, and it is not uncommon to see independant, free-willed \
robots on many human stations, particularly in fringe systems where standards are slightly lax and public opinion less relevant \
to corporate operations. IPCs (Integrated Positronic Chassis) are a loose category of self-willed robots with a humanoid form, \
generally self-owned after being 'born' into servitude; they are reliable and dedicated workers, albeit more than slightly \
inhuman in outlook and perspective."
icobase = 'icons/mob/human_races/r_machine.dmi'
deform = 'icons/mob/human_races/r_machine.dmi'
path = /mob/living/carbon/human/machine
default_language = "Galactic Common"
language = "Trinary"
unarmed_type = /datum/unarmed_attack/punch
eyes = "blank_eyes"
brute_mod = 1.5
burn_mod = 1.5
@@ -445,24 +464,38 @@
heat_level_3 = 600
heat_level_3_breathe = 600
synth_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment.
passive_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment.
flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | IS_SYNTHETIC | NO_INTORGANS
flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_DNA_RAD
dietflags = 0 //IPCs can't eat, so no diet
blood_color = "#1F181F"
flesh_color = "#AAAAAA"
virus_immune = 1
reagent_tag = PROCESS_SYN
has_organ = list(
"brain" = /obj/item/organ/mmi_holder/posibrain,
"cell" = /obj/item/organ/cell,
"optics" = /obj/item/organ/optical_sensor
)
vision_organ = "optics"
has_limbs = list(
"chest" = list("path" = /obj/item/organ/external/chest/ipc),
"groin" = list("path" = /obj/item/organ/external/groin/ipc),
"head" = list("path" = /obj/item/organ/external/head/ipc),
"l_arm" = list("path" = /obj/item/organ/external/arm/ipc),
"r_arm" = list("path" = /obj/item/organ/external/arm/right/ipc),
"l_leg" = list("path" = /obj/item/organ/external/leg/ipc),
"r_leg" = list("path" = /obj/item/organ/external/leg/right/ipc),
"l_hand" = list("path" = /obj/item/organ/external/hand/ipc),
"r_hand" = list("path" = /obj/item/organ/external/hand/right/ipc),
"l_foot" = list("path" = /obj/item/organ/external/foot/ipc),
"r_foot" = list("path" = /obj/item/organ/external/foot/right/ipc)
)
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
H.emote("deathgasp")
for(var/organ_name in H.organs_by_name)
if (organ_name == "head") // do the head last as that's when the user will be transfered to the posibrain
continue
var/obj/item/organ/external/O = H.organs_by_name[organ_name]
if(O && (O.body_part != UPPER_TORSO) && (O.body_part != LOWER_TORSO)) // We're making them fall apart, not gibbing them!
O.droplimb(1)
var/obj/item/organ/external/O = H.organs_by_name["head"]
if(O) O.droplimb(1)
H.h_style = ""
spawn(100)
if(H) H.update_hair()
@@ -318,10 +318,14 @@ var/global/list/damage_icon_parts = list()
//Underwear
if(underwear && species.flags & HAS_UNDERWEAR)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
var/datum/sprite_accessory/underwear/U = underwear_list[underwear]
if(U)
stand_icon.Blend(new /icon(U.icon, "uw_[U.icon_state]_s"), ICON_OVERLAY)
if(undershirt && species.flags & HAS_UNDERWEAR)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "undershirt[undershirt]_s"), ICON_OVERLAY)
var/datum/sprite_accessory/undershirt/U2 = undershirt_list[undershirt]
if(U2)
stand_icon.Blend(new /icon(U2.icon, "us_[U2.icon_state]_s"), ICON_OVERLAY)
if(update_icons)
update_icons()
@@ -365,7 +369,7 @@ var/global/list/damage_icon_parts = list()
else
//warning("Invalid f_style for [species.name]: [f_style]")
if(h_style && !(head && (head.flags & BLOCKHEADHAIR) && !(species.flags & IS_SYNTHETIC)))
if(h_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic())))
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
if(hair_style && hair_style.species_allowed)
if(src.species.name in hair_style.species_allowed)
@@ -1,182 +0,0 @@
/mob/living/carbon/primitive/emote(var/act,var/m_type=1,var/message = null)
var/param = null
if (findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = is_muzzled()
//Emote Cooldown System (it's so simple!)
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
var/on_CD = 0
switch(act)
//Cooldown-inducing emotes
if("chirp")
if(istype(src,/mob/living/carbon/primitive/diona)) //Only Diona Nymphs can chirp
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
else //Everyone else fails, skip the emote attempt
return
if("flip")
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
//Everything else, including typos of the above emotes
else
on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
if(on_CD == 1) // Check if we need to suppress the emote attempt.
return // Suppress emote, you're still cooling off.
//--FalseIncarnate
switch(act)
if ("me")
if(silent)
return
if (src.client)
if (client.prefs.muted & MUTE_IC)
src << "\red You cannot send IC messages (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
if (stat)
return
if(!(message))
return
return custom_emote(m_type, message)
if ("custom")
return custom_emote(m_type, message)
if ("chirp")
message = "<B>The [src.name]</B> chirps!"
playsound(src.loc, 'sound/misc/nymphchirp.ogg', 50, 0)
m_type = 2
if("sign")
if (!src.restrained())
message = text("<B>The [src.name]</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
m_type = 1
if("scratch")
if (!src.restrained())
message = "<B>The [src.name]</B> scratches."
m_type = 1
if("whimper")
if (!muzzled)
message = "<B>The [src.name]</B> whimpers."
m_type = 2
if("roar")
if (!muzzled)
message = "<B>The [src.name]</B> roars."
m_type = 2
if("tail")
message = "<B>The [src.name]</B> waves his tail."
m_type = 1
if("gasp")
message = "<B>The [src.name]</B> gasps."
m_type = 2
if("shiver")
message = "<B>The [src.name]</B> shivers."
m_type = 2
if("drool")
message = "<B>The [src.name]</B> drools."
m_type = 1
if("paw")
if (!src.restrained())
message = "<B>The [src.name]</B> flails his paw."
m_type = 1
if("scretch")
if (!muzzled)
message = "<B>The [src.name]</B> scretches."
m_type = 2
if("choke")
message = "<B>The [src.name]</B> chokes."
m_type = 2
if("moan")
message = "<B>The [src.name]</B> moans!"
m_type = 2
if("nod")
message = "<B>The [src.name]</B> nods his head."
m_type = 1
if("sit")
message = "<B>The [src.name]</B> sits down."
m_type = 1
if("sway")
message = "<B>The [src.name]</B> sways around dizzily."
m_type = 1
if("sulk")
message = "<B>The [src.name]</B> sulks down sadly."
m_type = 1
if("twitch")
message = "<B>The [src.name]</B> twitches violently."
m_type = 1
if("dance")
if (!src.restrained())
message = "<B>The [src.name]</B> dances around happily."
m_type = 1
if("roll")
if (!src.restrained())
message = "<B>The [src.name]</B> rolls."
m_type = 1
if("shake")
message = "<B>The [src.name]</B> shakes his head."
m_type = 1
if("gnarl")
if (!muzzled)
message = "<B>The [src.name]</B> gnarls and shows his teeth.."
m_type = 2
if("jump")
message = "<B>The [src.name]</B> jumps!"
m_type = 1
if("collapse")
Paralyse(2)
message = "<B>[src.name]</B> collapses!"
m_type = 2
if("deathgasp")
message = "<B>The [src.name]</B> lets out a faint chimper as it collapses and stops moving..."
m_type = 1
if ("flip")
m_type = 1
if (!src.restrained())
var/M = null
if (param)
for (var/mob/A in view(1, null))
if (param == A.name)
M = A
break
if (M == src)
M = null
if (M)
if(src.lying || src.weakened)
message = "<B>[src]</B> flops and flails around on the floor."
else
message = "<B>[src]</B> flips in [M]'s general direction."
src.SpinAnimation(5,1)
else
if(src.lying || src.weakened)
message = "<B>[src]</B> flops and flails around on the floor."
else
message = "<B>[src]</B> does a flip!"
src.SpinAnimation(5,1)
if("help")
var/text = "choke, "
if(istype(src,/mob/living/carbon/primitive/diona))
text += "chirp, "
text += "flip, collapse, dance, deathgasp, drool, gasp, shiver, gnarl, jump, paw, moan, nod, roar, roll, scratch,\nscretch, shake, sign-#, sit, sulk, sway, tail, twitch, whimper"
src << text
else
src << text("Invalid Emote: []", act)
if ((message && src.stat == 0))
if(src.client)
log_emote("[name]/[key] : [message]")
if (m_type & 1)
for(var/mob/O in viewers(src, null))
O.show_message(message, m_type)
//Foreach goto(703)
else
for(var/mob/O in hearers(src, null))
O.show_message(message, m_type)
//Foreach goto(746)
return
+1 -1
View File
@@ -75,7 +75,7 @@
/mob/living/carbon/human/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
if((species.flags & IS_SYNTHETIC) && (effecttype == IRRADIATE))
if((species.flags & NO_DNA_RAD) && (effecttype == IRRADIATE))
return
return ..()
+9 -7
View File
@@ -115,12 +115,11 @@
if(ismob(O.thrower))
var/mob/M = O.thrower
var/client/assailant = M.client
if(assailant)
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [O], thrown by [M.name] ([assailant.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [src.name] ([src.ckey]) with a thrown [O]</font>")
if(M)
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [O], thrown by [key_name(M)]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [key_name(src)] with a thrown [O]</font>")
if(!istype(src,/mob/living/simple_animal/mouse))
msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey])[isAntag(M) ? "(ANTAG)" : ""] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
msg_admin_attack("[key_name_admin(src)] was hit by a [O], thrown by [key_name_admin(M)]")
// Begin BS12 momentum-transfer code.
if(O.throw_source && speed >= 15)
@@ -166,13 +165,16 @@
M.occupant_message("<span class='danger'>You hit [src].</span>")
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>", \
"<span class='userdanger'>[src] has been hit by [M.name].</span>")
add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
M.occupant.attack_log += text("\[[time_stamp()]\] <font color='red'>Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])")
else
step_away(src,M)
add_logs(M.occupant, src, "pushed", object=M, admin=0)
M.occupant_message("<span class='warning'>You push [src] out of the way.</span>")
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>")
return
//Mobs on Fire
+39 -12
View File
@@ -55,6 +55,7 @@ var/list/ai_verbs_default = list(
var/ioncheck[1]
var/lawchannel = "Common" // Default channel on which to state laws
var/icon/holo_icon//Default is assigned when AI is created.
var/obj/mecha/controlled_mech //For controlled_mech a mech, to determine whether to relaymove or use the AI eye.
var/obj/item/device/pda/ai/aiPDA = null
var/obj/item/device/multitool/aiMulti = null
var/custom_sprite = 0 //For our custom sprites
@@ -66,7 +67,7 @@ var/list/ai_verbs_default = list(
var/processing_time = 100
var/list/datum/AI_Module/current_modules = list()
var/fire_res_on_core = 0
var/can_dominate_mechs = 0
var/control_disabled = 0 // Set to 1 to stop AI from interacting via Click() -- TLE
var/malfhacking = 0 // More or less a copy of the above var, so that malf AIs can hack and still get new cyborgs -- NeoFite
var/malf_cooldown = 0 //Cooldown var for malf modules
@@ -242,6 +243,7 @@ var/list/ai_verbs_default = list(
powered_ai = ai
if(isnull(powered_ai))
qdel(src)
return
loc = powered_ai.loc
use_power(1) // Just incase we need to wake up the power system.
@@ -251,6 +253,7 @@ var/list/ai_verbs_default = list(
/obj/machinery/ai_powersupply/process()
if(!powered_ai || powered_ai.stat & DEAD)
qdel(src)
return
if(!powered_ai.anchored)
loc = powered_ai.loc
use_power = 0
@@ -336,7 +339,7 @@ var/list/ai_verbs_default = list(
if(check_unable(AI_CHECK_WIRELESS))
return
var/input = stripped_input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
var/input = input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
if(!input || stat)
return
@@ -502,18 +505,18 @@ var/list/ai_verbs_default = list(
if (href_list["track"])
var/mob/target = locate(href_list["track"]) in mob_list
if(target && (!istype(target, /mob/living/carbon/human) || html_decode(href_list["trackname"]) == target:get_face_name()))
if(target && trackable(target))
ai_actual_track(target)
else
src << "\red System error. Cannot locate [html_decode(href_list["trackname"])]."
src << "<span class='warning'>Target is not on or near any active cameras on the station.</span>"
return
if (href_list["trackbot"])
var/obj/machinery/bot/target = locate(href_list["trackbot"]) in aibots
var/mob/living/silicon/ai/A = locate(href_list["track2"]) in mob_list
if(A && target)
A.ai_actual_track(target)
if(target && trackable(target))
ai_actual_track(target)
else
src << "<span class='warning'>Target is not on or near any active cameras on the station.</span>"
return
if (href_list["callbot"]) //Command a bot to move to a selected location.
@@ -534,6 +537,14 @@ var/list/ai_verbs_default = list(
botcall()
return
if (href_list["ai_take_control"]) //Mech domination
var/obj/mecha/M = locate(href_list["ai_take_control"])
if(controlled_mech)
src << "You are already loaded into an onboard computer!"
return
if(M)
M.transfer_ai(AI_MECH_HACK,src, usr) //Called om the mech itself.
else if (href_list["faketrack"])
var/mob/target = locate(href_list["track"]) in mob_list
var/mob/living/silicon/ai/A = locate(href_list["track2"]) in mob_list
@@ -925,10 +936,8 @@ var/list/ai_verbs_default = list(
spawn(0)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/H = target
if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
src << "Unable to locate an airlock"
return
if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
var/obj/item/weapon/card/id/id = H.wear_id
if(istype(id) && id.is_untrackable())
src << "Unable to locate an airlock"
return
if(H.digitalcamo)
@@ -981,6 +990,24 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/proc/is_in_chassis()
return istype(loc, /turf)
/mob/living/silicon/ai/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/AI, var/obj/item/device/aicard/card)
if(!..())
return
if(interaction == AI_TRANS_TO_CARD)//The only possible interaction. Upload AI mob to a card.
if(!mind)
user << "<span class='warning'>No intelligence patterns detected.</span>" //No more magical carding of empty cores, AI RETURN TO BODY!!!11
return
if (mind.special_role == "malfunction") //AI MALF!!
user << "<span class='boldannounce'>ERROR</span>: Remote transfer interface disabled."//Do ho ho ho~
return
new /obj/structure/AIcore/deactivated(loc)//Spawns a deactivated terminal at AI location.
aiRestorePowerRoutine = 0//So the AI initially has power.
control_disabled = 1//Can't control things remotely if you're stuck in a card!
aiRadio.disabledAi = 1 //No talking on the built-in radio for you either!
loc = card//Throw AI into the card.
src << "You have been downloaded to a mobile storage device. Remote device connection severed."
user << "<span class='boldnotice'>Transfer successful</span>: [name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
#undef AI_CHECK_WIRELESS
#undef AI_CHECK_RADIO
+4 -3
View File
@@ -44,7 +44,7 @@
loc = T.loc
if (istype(loc, /area))
//stage = 4
if (!loc.power_equip && !istype(src.loc,/obj/item))
if (!loc.power_equip && !is_type_in_list(src.loc,list(/obj/item, /obj/mecha)))
//stage = 5
blind = 1
@@ -56,7 +56,8 @@
src.sight |= SEE_OBJS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
if(see_override)
see_invisible = see_override
//Congratulations! You've found a way for AI's to run without using power!
//Todo: Without snowflaking up master_controller procs find a way to make AI use_power but only when APC's clear the area usage the tick prior
@@ -97,7 +98,7 @@
src.see_in_dark = 0
src.see_invisible = SEE_INVISIBLE_LIVING
if (((!loc.power_equip) || istype(T, /turf/space)) && !istype(src.loc,/obj/item))
if (((!loc.power_equip) || istype(T, /turf/space)) && !is_type_in_list(src.loc,list(/obj/item, /obj/mecha)))
if (src:aiRestorePowerRoutine==0)
src:aiRestorePowerRoutine = 1
+8 -1
View File
@@ -521,4 +521,11 @@
// No binary for pAIs.
/mob/living/silicon/pai/binarycheck()
return 0
return 0
/mob/living/silicon/pai/on_forcemove(atom/newloc)
if(card)
card.loc = newloc
else //something went very wrong.
CRASH("pAI without card")
loc = card
@@ -369,6 +369,8 @@
/mob/living/silicon/pai/proc/hackloop()
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/silicon/ai/AI in player_list)
if(!T || !(T.z in config.contact_levels))
break
if(T.loc)
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress in [T.loc].</b></font>"
else
@@ -184,74 +184,74 @@
/obj/item/device/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
if(( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
user << text("\red You try to analyze the floor's vitals!")
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [user] has analyzed the floor's vitals!"), 1)
user.show_message(text("\blue Analyzing Results for The floor:\n\t Overall Status: Healthy"), 1)
user.show_message(text("\blue \t Damage Specifics: [0]-[0]-[0]-[0]"), 1)
user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1)
user.show_message("\blue Body Temperature: ???", 1)
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>", "<span class='warning'>You try to analyze the floor's vitals!</span>")
user << "<span class='notice'>Analyzing Results for The floor:\n\t Overall Status: Healthy</span>"
user << "<span class='notice'>\t Damage Specifics: [0]-[0]-[0]-[0]</span>"
user << "<span class='notice'>Key: Suffocation/Toxin/Burns/Brute</span>"
user << "<span class='notice'>Body Temperature: ???</span>"
return
if(!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "\red You don't have the dexterity to do this!"
return
if(!istype(M, /mob/living/silicon/robot) && !(ishuman(M) && (M:species.flags & IS_SYNTHETIC)))
user << "\red You can't analyze non-robotic things!"
return
user.visible_message("<span class='notice'> [user] has analyzed [M]'s components.","<span class='notice'> You have analyzed [M]'s components.")
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
var/BR = M.getBruteLoss() > 50 ? "<b>[M.getBruteLoss()]</b>" : M.getBruteLoss()
var/TX = M.getToxLoss() > 50 ? "<b>[M.getToxLoss()]</b>" : M.getToxLoss()
user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health - M.halloss]% functional"]")
if (ishuman(M) && (M:species.flags & IS_SYNTHETIC))
user.show_message("\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>/<font color='green'>Residue</font>", 1)
user.show_message("\t Damage Specifics: <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font> - <font color='green'>[TX]</font>")
var/scan_type
if(istype(M, /mob/living/silicon/robot))
scan_type = "robot"
else if(istype(M, /mob/living/carbon/human))
scan_type = "prosthetics"
else
user.show_message("\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>", 1)
user.show_message("\t Damage Specifics: <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>")
if(M.tod && M.stat == DEAD)
user.show_message("\blue Time of Disable: [M.tod]")
user << "<span class='warning'>You can't analyze non-robotic things!</span>"
return
if (istype(M, /mob/living/silicon/robot))
var/mob/living/silicon/robot/H = M
var/list/damaged = H.get_damaged_components(1,1,1)
user.show_message("\blue Localized Damage:",1)
if(length(damaged)>0)
for(var/datum/robot_component/org in damaged)
user.show_message(text("\blue \t []: [][] - [] - [] - []", \
capitalize(org.name), \
(org.installed == -1) ? "<font color='red'><b>DESTROYED</b></font> " :"",\
(org.electronics_damage > 0) ? "<font color='#FFA500'>[org.electronics_damage]</font>" :0, \
(org.brute_damage > 0) ? "<font color='red'>[org.brute_damage]</font>" :0, \
(org.toggled) ? "Toggled ON" : "<font color='red'>Toggled OFF</font>",\
(org.powered) ? "Power ON" : "<font color='red'>Power OFF</font>"),1)
else
user.show_message("\blue \t Components are OK.",1)
if(H.emagged && prob(5))
user.show_message("\red \t ERROR: INTERNAL SYSTEMS COMPROMISED",1)
user.visible_message("<span class='notice'>[user] has analyzed [M]'s components.</span>","<span class='notice'>You have analyzed [M]'s components.</span>")
switch(scan_type)
if("robot")
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
var/BR = M.getBruteLoss() > 50 ? "<b>[M.getBruteLoss()]</b>" : M.getBruteLoss()
user << "<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health - M.halloss]% functional"]</span>"
user << "\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>"
user << "\t Damage Specifics: <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>"
if(M.tod && M.stat == DEAD)
user << "<span class='notice'>Time of Disable: [M.tod]</span>"
var/mob/living/silicon/robot/H = M
var/list/damaged = H.get_damaged_components(1,1,1)
user << "<span class='notice'>Localized Damage:</span>"
if(length(damaged)>0)
for(var/datum/robot_component/org in damaged)
user.show_message(text("<span class='notice'>\t []: [][] - [] - [] - []</span>", \
capitalize(org.name), \
(org.installed == -1) ? "<font color='red'><b>DESTROYED</b></font> " :"",\
(org.electronics_damage > 0) ? "<font color='#FFA500'>[org.electronics_damage]</font>" :0, \
(org.brute_damage > 0) ? "<font color='red'>[org.brute_damage]</font>" :0, \
(org.toggled) ? "Toggled ON" : "<font color='red'>Toggled OFF</font>",\
(org.powered) ? "Power ON" : "<font color='red'>Power OFF</font>"),1)
else
user << "<span class='notice'>\t Components are OK.</span>"
if(H.emagged && prob(5))
user << "<span class='warning'>\t ERROR: INTERNAL SYSTEMS COMPROMISED</span>"
if (ishuman(M) && (M:species.flags & IS_SYNTHETIC))
var/mob/living/carbon/human/H = M
var/list/damaged = H.get_damaged_organs(1,1)
user.show_message("\blue Localized Damage, Brute/Electronics:",1)
if(length(damaged)>0)
for(var/obj/item/organ/external/org in damaged)
user.show_message(text("\blue \t []: [] - []", \
capitalize(org.name), \
(org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1)
else
user.show_message("\blue \t Components are OK.",1)
if (M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0)
user.show_message("\red Subject posibrain is unresponsive. System shutdown imminent.")
else if (M.getBrainLoss() >= 60)
user.show_message("\red Severe posibrain damage detected. Heavy corrosion present.")
else if (M.getBrainLoss() >= 10)
user.show_message("\red Significant posibrain damage detected. Moderate corrosion present.")
user.show_message("\blue Operating Temperature: [M.bodytemperature-T0C]&deg;C ([M.bodytemperature*1.8-459.67]&deg;F)", 1)
if("prosthetics")
var/mob/living/carbon/human/H = M
user << "<span class='notice'>Analyzing Results for \the [H]:</span>"
user << "Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>"
user << "<span class='notice'>External prosthetics:</span>"
var/organ_found
if(H.internal_organs.len)
for(var/obj/item/organ/external/E in H.organs)
if(!(E.status & ORGAN_ROBOT))
continue
organ_found = 1
user << "[E.name]: <font color='red'>[round(E.brute_dam)]</font> <font color='#FFA500'>[round(E.burn_dam)]</font>"
if(!organ_found)
user << "<span class='warning'>No prosthetics located.</span>"
user << "<hr>"
user << "<span class='notice'>Internal prosthetics:</span>"
organ_found = null
if(H.internal_organs.len)
for(var/obj/item/organ/O in H.internal_organs)
if(!(O.status & ORGAN_ROBOT))
continue
organ_found = 1
user << "[capitalize(O.name)]: <font color='red'>[O.damage]</font>"
if(!organ_found)
user << "<span class='warning'>No prosthetics located.</span>"
src.add_fingerprint(user)
return
+11 -17
View File
@@ -542,13 +542,6 @@ var/list/robot_verbs_default = list(
return
now_pushing = 0
..()
if (istype(AM, /obj/machinery/recharge_station))
var/obj/machinery/recharge_station/F = AM
if(F.panel_open)
usr << "\blue <b>Close the maintenance panel first.</b>"
return
else
F.move_inside()
if (!istype(AM, /atom/movable))
return
if (!now_pushing)
@@ -587,34 +580,35 @@ var/list/robot_verbs_default = list(
return
if (istype(W, /obj/item/weapon/weldingtool))
if(W == module_active) return
if (istype(W, /obj/item/weapon/weldingtool) && user.a_intent == "help")
if(W == module_active)
return
if (!getBruteLoss())
user << "Nothing to fix here!"
user << "<span class='notice'>Nothing to fix!</span>"
return
var/obj/item/weapon/weldingtool/WT = W
user.changeNext_move(CLICK_CD_MELEE)
if (WT.remove_fuel(0))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
adjustBruteLoss(-30)
updatehealth()
add_fingerprint(user)
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [user] has fixed some of the dents on [src]!"), 1)
user.visible_message("<span class='alert'>\The [user] patches some dents on \the [src] with \the [WT].</span>")
else
user << "Need more welding fuel!"
user << "<span class='warning'>Need more welding fuel!</span>"
return
else if(istype(W, /obj/item/stack/cable_coil) && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == "help" && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
if (!getFireLoss())
user << "Nothing to fix here!"
user << "<span class='notice'>Nothing to fix!</span>"
return
var/obj/item/stack/cable_coil/coil = W
adjustFireLoss(-30)
updatehealth()
add_fingerprint(user)
coil.use(1)
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [user] has fixed some of the burnt wires on [src]!"), 1)
user.visible_message("<span class='alert'>\The [user] fixes some of the burnt wires on \the [src] with \the [coil].</span>")
else if (istype(W, /obj/item/weapon/crowbar)) // crowbar means open or close the cover
if(opened)
+12 -16
View File
@@ -96,7 +96,7 @@
if(prob(5))
host.adjustBrainLoss(rand(1,2))
if(prob(host.brainloss/20))
if(prob(host.getBrainLoss()/20))
host.say("*[pick(list("blink","blink_r","choke","aflap","drool","twitch","twitch_s","gasp"))]")
/mob/living/simple_animal/borer/New(var/by_gamemode=0)
@@ -148,7 +148,7 @@
var/list/choices = list()
for(var/mob/living/carbon/C in view(3,src))
if(C.stat != 2)
if(C.stat != DEAD)
choices += C
if(world.time - used_dominate < 300)
@@ -188,7 +188,7 @@
src << "You begin delicately adjusting your connection to the host brain..."
spawn(300+(host.brainloss*5))
spawn(300+(host.getBrainLoss()*5))
if(!host || !src || controlling)
return
@@ -196,8 +196,8 @@
src << "\red <B>You plunge your probosci deep into the cortex of the host brain, interfacing directly with their nervous system.</B>"
host << "\red <B>You feel a strange shifting sensation behind your eyes as an alien consciousness displaces yours.</B>"
var/borer_key = src.key
host.attack_log += text("\[[time_stamp()]\] <font color='blue'>[src.name] ([src.ckey]) has assumed control of [host.name] ([host.ckey])</font>")
msg_admin_attack("[src.name] ([src.ckey]) has assumed control of [host.name] ([host.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[host.x];Y=[host.y];Z=[host.z]'>JMP</a>)")
host.attack_log += text("\[[time_stamp()]\] <font color='blue'>[key_name(src)] has assumed control of [key_name(host)]</font>")
msg_admin_attack("[key_name_admin(src)] has assumed control of [key_name_admin(host)]")
// host -> brain
var/h2b_id = host.computer_id
var/h2b_ip= host.lastKnownIP
@@ -387,11 +387,14 @@ mob/living/simple_animal/borer/proc/detatch()
return
var/list/choices = list()
for(var/mob/living/carbon/C in view(1,src))
if(C.stat != 2 && src.Adjacent(C))
choices += C
for(var/mob/living/carbon/human/H in view(1,src))
var/obj/item/organ/external/head/head = H.get_organ("head")
if(head.status & ORGAN_ROBOT)
continue
if(H.stat != DEAD && src.Adjacent(H) && !H.has_brain_worms())
choices += H
var/mob/living/carbon/M = input(src,"Who do you wish to infest?") in null|choices
var/mob/living/carbon/human/M = input(src,"Who do you wish to infest?") in null|choices
if(!M || !src) return
@@ -400,13 +403,6 @@ mob/living/simple_animal/borer/proc/detatch()
if(M.has_brain_worms())
src << "You cannot infest someone who is already infested!"
return
/*
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.check_head_coverage())
src << "You cannot get through that host's protective gear."
return
*/
src << "You slither up [M] and begin probing at their ear canal..."
@@ -25,6 +25,7 @@
minbodytemp = 0
faction = list("cult")
flying = 1
universal_speak = 1
var/list/construct_spells = list()
/mob/living/simple_animal/construct/New()
@@ -5,6 +5,7 @@
icon_state = "cat2"
icon_living = "cat2"
icon_dead = "cat2_dead"
icon_resting = "cat_rest"
gender = MALE
speak = list("Meow!", "Esp!", "Purr!", "HSSSSS")
speak_emote = list("purrs", "meows")
@@ -76,6 +77,7 @@
icon_state = "kitten"
icon_living = "kitten"
icon_dead = "kitten_dead"
icon_resting = null
gender = NEUTER
density = 0
pass_flags = PASSMOB
@@ -86,8 +88,9 @@
icon_state = "Syndicat"
icon_living = "Syndicat"
icon_dead = "Syndicat_dead"
icon_resting = "Syndicat_rest"
gender = FEMALE
flags = IS_SYNTHETIC|NO_BREATHE
flags = NO_BREATHE
faction = list("syndicate")
var/turns_since_scan = 0
var/mob/living/simple_animal/mouse/movement_target
@@ -3,57 +3,73 @@
*/
//Mob defines.
/mob/living/carbon/primitive/diona
/mob/living/simple_animal/diona
name = "diona nymph"
voice_name = "diona nymph"
speak_emote = list("chirrups")
icon = 'icons/mob/monkey.dmi'
icon_state = "nymph1"
icon_state = "nymph"
icon_living = "nymph"
icon_dead = "nymph_dead"
icon_resting = "nymph_sleep"
pass_flags = PASSTABLE
small = 1
ventcrawler = 2
maxHealth = 50
health = 50
voice_name = "diona nymph"
speak_emote = list("chirrups")
emote_hear = list("chirrups")
emote_see = list("chirrups")
response_help = "pets"
response_disarm = "pushes"
response_harm = "kicks"
melee_damage_lower = 5
melee_damage_upper = 8
attacktext = "bites"
attack_sound = 'sound/weapons/bite.ogg'
speed = 0
stop_automated_movement = 0
turns_per_move = 4
status_flags = 0
var/list/donors = list()
var/ready_evolve = 0
ventcrawler = 1
var/environment_smash = 0 // This is a sloppy way to solve attack_animal runtimes. Stupid nymphs...
holder_type = /obj/item/weapon/holder/diona
/mob/living/carbon/primitive/diona/New()
/mob/living/simple_animal/diona/New()
..()
gender = NEUTER
//greaterform = "Diona"
if(name == initial(name)) //To stop Pun-Pun becoming generic.
name = "[name] ([rand(1, 1000)])"
real_name = name
add_language("Rootspeak")
src.verbs += /mob/living/simple_animal/diona/proc/merge
/mob/living/carbon/primitive/diona/attack_hand(mob/living/carbon/human/M as mob)
/mob/living/simple_animal/diona/attack_hand(mob/living/carbon/human/M as mob)
//Let people pick the little buggers up.
if(M.a_intent == "help")
if(M.species && M.species.name == "Diona")
M << "You feel your being twine with that of [src] as it merges with your biomass."
src << "You feel your being twine with that of [M] as you merge with its biomass."
src.verbs += /mob/living/carbon/primitive/diona/proc/split
src.verbs -= /mob/living/carbon/primitive/diona/proc/merge
src.verbs += /mob/living/simple_animal/diona/proc/split
src.verbs -= /mob/living/simple_animal/diona/proc/merge
src.forceMove(M)
else
get_scooped(M)
..()
/mob/living/carbon/primitive/diona/New()
..()
gender = NEUTER
//greaterform = "Diona"
add_language("Rootspeak")
src.verbs += /mob/living/carbon/primitive/diona/proc/merge
/mob/living/carbon/primitive/diona/proc/merge()
/mob/living/simple_animal/diona/proc/merge()
set category = "Diona"
set name = "Merge with gestalt"
set desc = "Merge with another diona."
if(istype(src.loc,/mob/living/carbon))
src.verbs -= /mob/living/carbon/primitive/diona/proc/merge
src.verbs -= /mob/living/simple_animal/diona/proc/merge
return
var/list/choices = list()
@@ -76,19 +92,18 @@
src << "You feel your being twine with that of [M] as you merge with its biomass."
src.loc = M
src.verbs += /mob/living/carbon/primitive/diona/proc/split
src.verbs -= /mob/living/carbon/primitive/diona/proc/merge
src.verbs += /mob/living/simple_animal/diona/proc/split
src.verbs -= /mob/living/simple_animal/diona/proc/merge
else
return
/mob/living/carbon/primitive/diona/proc/split()
/mob/living/simple_animal/diona/proc/split()
set category = "Diona"
set name = "Split from gestalt"
set desc = "Split away from your gestalt as a lone nymph."
if(!(istype(src.loc,/mob/living/carbon)))
src.verbs -= /mob/living/carbon/primitive/diona/proc/split
src.verbs -= /mob/living/simple_animal/diona/proc/split
return
src.loc << "You feel a pang of loss as [src] splits away from your biomass."
@@ -97,8 +112,8 @@
var/mob/living/M = src.loc
src.loc = get_turf(src)
src.verbs -= /mob/living/carbon/primitive/diona/proc/split
src.verbs += /mob/living/carbon/primitive/diona/proc/merge
src.verbs -= /mob/living/simple_animal/diona/proc/split
src.verbs += /mob/living/simple_animal/diona/proc/merge
if(istype(M))
for(var/atom/A in M.contents)
@@ -106,8 +121,7 @@
return
M.status_flags &= ~PASSEMOTES
/mob/living/carbon/primitive/diona/verb/fertilize_plant()
/mob/living/simple_animal/diona/verb/fertilize_plant()
set category = "Diona"
set name = "Fertilize plant"
set desc = "Turn your food into nutrients for plants."
@@ -123,10 +137,9 @@
src.nutrition -= ((10-target.nutrilevel)*5)
target.nutrilevel = 10
src.visible_message("\red [src] secretes a trickle of green liquid from its tail, refilling [target]'s nutrient tray.","\red You secrete a trickle of green liquid from your tail, refilling [target]'s nutrient tray.")
/mob/living/carbon/primitive/diona/verb/eat_weeds()
src.visible_message("<span class='danger'>[src] secretes a trickle of green liquid from its tail, refilling [target]'s nutrient tray.","\red You secrete a trickle of green liquid from your tail, refilling [target]'s nutrient tray.</span>")
/mob/living/simple_animal/diona/verb/eat_weeds()
set category = "Diona"
set name = "Eat Weeds"
set desc = "Clean the weeds out of soil or a hydroponics tray."
@@ -142,24 +155,23 @@
src.nutrition += target.weedlevel * 15
target.weedlevel = 0
src.visible_message("\red [src] begins rooting through [target], ripping out weeds and eating them noisily.","\red You begin rooting through [target], ripping out weeds and eating them noisily.")
/mob/living/carbon/primitive/diona/verb/evolve()
src.visible_message("<span class='danger'>[src] begins rooting through [target], ripping out weeds and eating them noisily.</span>","<span class='danger'>You begin rooting through [target], ripping out weeds and eating them noisily.</span>")
/mob/living/simple_animal/diona/verb/evolve()
set category = "Diona"
set name = "Evolve"
set desc = "Grow to a more complex form."
if(donors.len < 5)
src << "You need more blood in order to ascend to a new state of consciousness..."
src << "<span class='warning'>You need more blood in order to ascend to a new state of consciousness...</span>"
return
if(nutrition < 500)
src << "You need to binge on weeds in order to have the energy to grow..."
src << "<span class='warning'>You need to binge on weeds in order to have the energy to grow...</span>"
return
src.split()
src.visible_message("\red [src] begins to shift and quiver, and erupts in a shower of shed bark as it splits into a tangle of nearly a dozen new dionaea.","\red You begin to shift and quiver, feeling your awareness splinter. All at once, we consume our stored nutrients to surge with growth, splitting into a tangle of at least a dozen new dionaea. We have attained our gestalt form.")
src.visible_message("<span class='danger'>[src] begins to shift and quiver, and erupts in a shower of shed bark as it splits into a tangle of nearly a dozen new dionaea.</span>","<span class='danger'>You begin to shift and quiver, feeling your awareness splinter. All at once, we consume our stored nutrients to surge with growth, splitting into a tangle of at least a dozen new dionaea. We have attained our gestalt form.</span>")
var/mob/living/carbon/human/diona/adult = new(get_turf(src.loc))
adult.set_species("Diona")
@@ -184,7 +196,7 @@
qdel(src)
/mob/living/carbon/primitive/diona/verb/steal_blood()
/mob/living/simple_animal/diona/verb/steal_blood()
set category = "Diona"
set name = "Steal Blood"
set desc = "Take a blood sample from a suitable donor."
@@ -198,14 +210,14 @@
if(!M || !src) return
if(M.species.flags & NO_BLOOD)
src << "\red That donor has no blood to take."
src << "<span class='warning'>That donor has no blood to take.</span>"
return
if(donors.Find(M.real_name))
src << "\red That donor offers you nothing new."
src << "<span class='warning'>That donor offers you nothing new.</span>"
return
src.visible_message("\red [src] flicks out a feeler and neatly steals a sample of [M]'s blood.","\red You flick out a feeler and neatly steal a sample of [M]'s blood.")
src.visible_message("<span class='danger'>[src] flicks out a feeler and neatly steals a sample of [M]'s blood.</span>","<span class='danger'>You flick out a feeler and neatly steal a sample of [M]'s blood.</span>")
donors += M.real_name
for(var/datum/language/L in M.languages)
if(!(L.flags & HIVEMIND))
@@ -214,36 +226,37 @@
spawn(25)
update_progression()
/mob/living/carbon/primitive/diona/proc/update_progression()
/mob/living/simple_animal/diona/proc/update_progression()
if(!donors.len)
return
if(donors.len == 5)
ready_evolve = 1
src << "\green You feel ready to move on to your next stage of growth."
src << "<span class='noticealien'>You feel ready to move on to your next stage of growth.</span>"
else if(donors.len == 3)
universal_understand = 1
src << "\green You feel your awareness expand, and realize you know how to understand the creatures around you."
src << "<span class='noticealien'>You feel your awareness expand, and realize you know how to understand the creatures around you.</span>"
else
src << "\green The blood seeps into your small form, and you draw out the echoes of memories and personality from it, working them into your budding mind."
src << "<span class='noticealien'>The blood seeps into your small form, and you draw out the echoes of memories and personality from it, working them into your budding mind.</span>"
/mob/living/carbon/primitive/diona/put_in_hands(obj/item/W)
/mob/living/simple_animal/diona/put_in_hands(obj/item/W)
W.loc = get_turf(src)
W.layer = initial(W.layer)
W.dropped()
/mob/living/carbon/primitive/diona/put_in_active_hand(obj/item/W)
src << "\red You don't have any hands!"
/mob/living/simple_animal/diona/put_in_active_hand(obj/item/W)
src << "<span class='warning'>You don't have any hands!</span>"
return
/mob/living/carbon/primitive/diona/say(var/message)
/mob/living/simple_animal/diona/say(var/message)
if(client)
if(client.prefs.muted & MUTE_IC)
src << "\red You cannot speak in IC (Muted)."
return
var/verb
message = trim_strip_html_properly(message)
if(stat)
@@ -257,5 +270,22 @@
if(copytext(message,1,2) == "*")
return emote(copytext(message,2))
//parse the language code and consume it
var/datum/language/speaking = parse_language(message)
if(speaking)
message = copytext(message,2+length(speaking.key))
else
speaking = get_default_language()
..(message)
var/ending = copytext(message, length(message))
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
//If we've gotten this far, keep going!
verb = speaking.get_spoken_verb(ending)
..(message,speaking,verb)
@@ -30,5 +30,6 @@
icon_state = "Syndifox"
icon_living = "Syndifox"
icon_dead = "Syndifox_dead"
flags = IS_SYNTHETIC|NO_BREATHE
icon_resting = "Syndifox_rest"
flags = NO_BREATHE
faction = list("syndicate")
@@ -30,7 +30,7 @@
min_n2 = 0
max_n2 = 0
var/dead = 0
unsuitable_atoms_damage = 15
unsuitable_atmos_damage = 15
faction = list("alien")
status_flags = CANPUSH
minbodytemp = 0
@@ -8,7 +8,7 @@
max_co2 = 0
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 15
unsuitable_atmos_damage = 15
faction = list("mining")
environment_smash = 2
minbodytemp = 0
@@ -27,7 +27,7 @@
max_co2 = 5
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 15
unsuitable_atmos_damage = 15
speak_emote = list("yarrs")
var/corpse = /obj/effect/landmark/mobcorpse/pirate
var/weapon1 = /obj/item/weapon/melee/energy/sword/pirate
@@ -36,4 +36,4 @@
maxbodytemp = 370
heat_damage_per_tick = 15 //amount of damage applied if animal's body temperature is higher than maxbodytemp
cold_damage_per_tick = 10 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
unsuitable_atoms_damage = 10
unsuitable_atmos_damage = 10
@@ -29,7 +29,7 @@
max_co2 = 5
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 15
unsuitable_atmos_damage = 15
faction = list("russian")
status_flags = CANPUSH
@@ -30,7 +30,7 @@
max_co2 = 5
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 15
unsuitable_atmos_damage = 15
faction = list("syndicate")
status_flags = CANPUSH
@@ -12,47 +12,52 @@
invisibility = INVISIBILITY_OBSERVER
health = 25
maxHealth = 25
see_in_dark = 255
see_invisible = SEE_INVISIBLE_OBSERVER
universal_understand = 1
response_help = "passes through"
response_disarm = "swings at"
response_harm = "punches"
unsuitable_atmos_damage = 0
minbodytemp = 0
maxbodytemp = INFINITY
harm_intent_damage = 5
speak_emote = list("hisses", "spits", "growls")
harm_intent_damage = 0
friendly = "touches"
status_flags = 0
wander = 0
density = 0
flying = 1
anchored = 1
var/essence = 25 //The resource of revenants. Max health is equal to twice this amount
var/essence = 25 //The resource of revenants. Max health is equal to three times this amount
var/essence_regen_cap = 25 //The regeneration cap of essence (go figure); regenerates every Life() tick up to this amount.
var/essence_regen = 1 //If the revenant regenerates essence or not; 1 for yes, 0 for no
var/essence_regenerating = 1 //If the revenant regenerates essence or not; 1 for yes, 0 for no
var/essence_regen_amount = 2 //How much essence regenerates
var/essence_min = 1 //The minimum amount of essence a revenant can have; by default, it never drops below one
var/strikes = 0 //How many times a revenant can die before dying for good
var/essence_accumulated = 0 //How much essence the revenant has stolen
var/revealed = 0 //If the revenant can take damage from normal sources.
var/inhibited = 0 //If the revenant's abilities are blocked by a chaplain's power.
var/essence_drained = 0 //How much essence the revenant has drained.
var/draining = 0 //If the revenant is draining someone.
var/list/drained_mobs = list() //Cannot harvest the same mob twice
/mob/living/simple_animal/revenant/Life()
..()
if(essence < essence_min)
essence = essence_min
if(strikes > 0)
strikes--
src << "<span class='boldannounce'>Your essence has dropped below critical levels. You barely manage to save yourself - [strikes ? "you can't keep this up!" : "next time, it's death."]</span>"
else if(strikes <= 0)
Die()
maxHealth = essence * 2
if(essence_regenerating && !inhibited && essence < essence_regen_cap) //While inhibited, essence will not regenerate
essence += essence_regen_amount
if(essence > essence_regen_cap)
essence = essence_regen_cap
maxHealth = essence * 3
if(!revealed)
health = maxHealth //Heals to full when not revealed
if(essence_regen && !inhibited && essence < essence_regen_cap) //While inhibited, essence will not regenerate
essence++
/mob/living/simple_animal/revenant/ex_act(severity)
return 1 //Immune to the effects of explosions.
/mob/living/simple_animal/revenant/blob_act()
return 1 //blah blah blobs aren't in tune with the spirit world, or something.
/mob/living/simple_animal/revenant/ClickOn(var/atom/A, var/params) //Copypaste from ghost code - revenants can't interact with the world directly.
if(client.buildmode)
build_click(src, client.buildmode, params, A)
@@ -75,6 +80,70 @@
if(world.time <= next_move)
return
A.attack_ghost(src)
if(ishuman(A) && in_range(src, A))
Harvest(A)
/mob/living/simple_animal/revenant/proc/Harvest(mob/living/carbon/human/target)
if(!castcheck(0))
return
if(draining)
src << "<span class='warning'>You are already siphoning the essence of a soul!</span>"
return
if(target in drained_mobs)
src << "<span class='warning'>[target]'s soul is dead and empty.</span>"
return
if(!target.stat)
src << "<span class='notice'>This being's soul is too strong to harvest.</span>"
if(prob(10))
target << "You feel as if you are being watched."
return
draining = 1
essence_drained = 2
src << "<span class='notice'>You search for the soul of [target].</span>"
if(do_after(src, 10, 3, 0, target)) //did they get deleted in that second?
if(target.ckey)
src << "<span class='notice'>Their soul burns with intelligence.</span>"
essence_drained += 2
if(target.stat != DEAD)
src << "<span class='notice'>Their soul blazes with life!</span>"
essence_drained += 2
else
src << "<span class='notice'>Their soul is weak and faltering.</span>"
if(do_after(src, 20, 6, 0, target)) //did they get deleted NOW?
switch(essence_drained)
if(1 to 2)
src << "<span class='info'>[target] will not yield much essence. Still, every bit counts.</span>"
if(3 to 4)
src << "<span class='info'>[target] will yield an average amount of essence.</span>"
if(5 to INFINITY)
src << "<span class='info'>Such a feast! [target] will yield much essence to you.</span>"
if(do_after(src, 30, 9, 0, target)) //how about now
if(!target.stat)
src << "<span class='warning'>They are now powerful enough to fight off your draining.</span>"
target << "<span class='boldannounce'>You feel something tugging across your body before subsiding.</span>"
draining = 0
return //hey, wait a minute...
src << "<span class='danger'>You begin siphoning essence from [target]'s soul.</span>"
if(target.stat != DEAD)
target << "<span class='warning'>You feel a horribly unpleasant draining sensation as your grip on life weakens...</span>"
icon_state = "revenant_draining"
reveal(65)
stun(65)
target.visible_message("<span class='warning'>[target] suddenly rises slightly into the air, their skin turning an ashy gray.</span>")
target.Beam(src,icon_state="drain_life",icon='icons/effects/effects.dmi',time=60)
if(target) //As one cannot prove the existance of ghosts, ghosts cannot prove the existance of the target they were draining.
change_essence_amount(essence_drained * 5, 0, target)
src << "<span class='info'>[target]'s soul has been considerably weakened and will yield no more essence for the time being.</span>"
target.visible_message("<span class='warning'>[target] gently slumps back onto the ground.</span>")
drained_mobs.Add(target)
target.death(0)
icon_state = "revenant_idle"
else
src << "<span class='warning'>You are not close enough to siphon [target]'s soul. The link has been broken.</span>"
draining = 0
return
draining = 0
return
/mob/living/simple_animal/revenant/say(message)
return 0 //Revenants cannot speak out loud.
@@ -83,6 +152,7 @@
..()
if(statpanel("Status"))
stat(null, "Current essence: [essence]E")
stat(null, "Stolen essence: [essence_accumulated]E")
/mob/living/simple_animal/revenant/New()
..()
@@ -99,11 +169,11 @@
src << "<b><i>You do not remember anything of your past lives, nor will you remember anything about this one after your death.</i></b>"
src << "<b>Be sure to read the wiki page at http://nanotrasen.se/wiki/index.php/Revenant to learn more.</b>"
var/datum/objective/revenant/objective = new
objective.owner = src
objective.owner = src.mind
src.mind.objectives += objective
src << "<b>Objective #1</b>: [objective.explanation_text]"
var/datum/objective/revenantFluff/objective2 = new
objective2.owner = src
objective2.owner = src.mind
src.mind.objectives += objective2
src << "<b>Objective #2</b>: [objective2.explanation_text]"
ticker.mode.traitors |= src.mind //Necessary for announcing
@@ -119,13 +189,12 @@
src.mind.spell_list += new /obj/effect/proc_holder/spell/targeted/revenant_harvest
src.mind.spell_list += new /obj/effect/proc_holder/spell/targeted/revenant_transmit
src.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_light
src.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenantDefile
src.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_defile
src.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_malf
return 1
return 0
/mob/living/simple_animal/revenant/Die()
if(strikes)
return 0 //Impossible to die with strikes still active
..()
src << "<span class='userdanger'><b>NO! No... it's too late, you can feel yourself fading...</b></span>"
notransform = 1
@@ -145,74 +214,78 @@
/mob/living/simple_animal/revenant/attackby(obj/item/W, mob/living/user, params)
..()
if(istype(W, /obj/item/weapon/nullrod))
visible_message("<span class='warning'>[src] violently flinches!</span>", \
"<span class='boldannounce'>The null rod invokes agony in you! You feel your essence draining away!</span>")
"<span class='boldannounce'>As the null rod passes through you, you feel your essence draining away!</span>")
essence -= 25 //hella effective
inhibited = 1
spawn(30)
inhibited = 0
..()
/mob/living/simple_animal/revenant/proc/castcheck(var/essence_cost)
var/mob/living/simple_animal/revenant/user = usr
if(!istype(user) || !user)
/mob/living/simple_animal/revenant/proc/castcheck(essence_cost)
if(!src)
return
var/turf/T = get_turf(usr)
var/turf/T = get_turf(src)
if(istype(T, /turf/simulated/wall))
user << "<span class='warning'>You cannot use abilities from inside of a wall.</span>"
src << "<span class='warning'>You cannot use abilities from inside of a wall.</span>"
return 0
if(!user.change_essence_amount(essence_cost, 1))
user << "<span class='warning'>You lack the essence to use that ability.</span>"
if(src.inhibited)
src << "<span class='warning'>Your powers have been suppressed by nulling energy!</span>"
return 0
if(user.inhibited)
user << "<span class='warning'>Your powers have been suppressed by holy energies!</span>"
if(!src.change_essence_amount(essence_cost, 1))
src << "<span class='warning'>You lack the essence to use that ability.</span>"
return 0
return 1
/mob/living/simple_animal/revenant/proc/change_essence_amount(var/essence_amt, var/silent = 0, var/source = null)
var/mob/living/simple_animal/revenant/user = usr
if(!istype(usr) || !usr)
/mob/living/simple_animal/revenant/proc/change_essence_amount(essence_amt, silent = 0, source = null)
if(!src)
return
if(user.essence + essence_amt <= 0)
if(essence + essence_amt <= 0)
return
user.essence += essence_amt
user.essence = Clamp(user.essence, 0, INFINITY)
essence += essence_amt
essence = max(0, essence)
if(essence_amt > 0)
essence_accumulated += essence_amt
essence_accumulated = max(0, essence_accumulated)
if(!silent)
if(essence_amt > 0)
user << "<span class='notice'>Gained [essence_amt]E from [source].</span>"
src << "<span class='notice'>Gained [essence_amt]E from [source].</span>"
else
user << "<span class='danger'>Lost [essence_amt]E from [source].</span>"
src << "<span class='danger'>Lost [essence_amt]E from [source].</span>"
return 1
/mob/living/simple_animal/revenant/proc/reveal(var/time, var/stun)
var/mob/living/simple_animal/revenant/R = usr
if(!istype(usr) || !usr)
/mob/living/simple_animal/revenant/proc/reveal(time)
if(!src)
return
R.revealed = 1
R.invisibility = 0
if(stun)
R.notransform = 1
R << "<span class='warning'>You have been revealed [stun ? "and cannot move" : ""].</span>"
if(time <= 0)
return
revealed = 1
invisibility = 0
src << "<span class='warning'>You have been revealed.</span>"
spawn(time)
R.revealed = 0
R.invisibility = INVISIBILITY_OBSERVER
if(stun)
R.notransform = 0
R << "<span class='notice'>You are once more concealed [stun ? "and can move again" : ""].</span>"
revealed = 0
invisibility = INVISIBILITY_OBSERVER
src << "<span class='notice'>You are once more concealed.</span>"
/mob/living/simple_animal/revenant/proc/stun(time)
if(!src)
return
if(time <= 0)
return
notransform = 1
src << "<span class='warning'>You cannot move!</span>"
spawn(time)
notransform = 0
src << "<span class='notice'>You can move again!</span>"
/datum/objective/revenant
var/targetAmount = 100
/datum/objective/revenant/New()
targetAmount = rand(100,200)
explanation_text = "Absorb [targetAmount] points of essence."
explanation_text = "Absorb [targetAmount] points of essence from humans."
..()
/datum/objective/revenant/check_completion()
@@ -221,8 +294,8 @@
var/mob/living/simple_animal/revenant/R = owner.current
if(!R || R.stat == DEAD)
return 0
var/essenceAccumulated = R.essence
if(essenceAccumulated < targetAmount)
var/essence_stolen = R.essence_accumulated
if(essence_stolen < targetAmount)
return 0
return 1
@@ -254,7 +327,7 @@
/obj/item/weapon/ectoplasm/revenant/New()
..()
reforming = 1
spawn(1800) //3 minutes
spawn(600) //1 minutes
if(src && reforming)
return reform()
if(src && !reforming)
@@ -290,7 +363,7 @@
/obj/item/weapon/ectoplasm/revenant/proc/reform()
if(!reforming || !src)
return
message_admins("Revenant ectoplasm was left undestroyed for 3 minutes and has reformed into a new revenant.")
message_admins("Revenant ectoplasm was left undestroyed for 1 minute and has reformed into a new revenant.")
loc = get_turf(src) //In case it's in a backpack or someone's hand
visible_message("<span class='boldannounce'>[src] suddenly rises into the air before fading away.</span>")
var/mob/living/simple_animal/revenant/R = new(get_turf(src))

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