mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into ipcmasterrace
Conflicts: code/modules/mob/living/simple_animal/friendly/fox.dm code/modules/organs/organ_alien.dm
This commit is contained in:
@@ -17,19 +17,19 @@ atom/proc/add_fibers(mob/living/carbon/human/M)
|
||||
if(M.wear_suit)
|
||||
fibertext = "Material from \a [M.wear_suit]."
|
||||
if(prob(10*item_multiplier) && !(fibertext in suit_fibers))
|
||||
//world.log << "Added fibertext: [fibertext]"
|
||||
//log_to_dd("Added fibertext: [fibertext]")
|
||||
suit_fibers += fibertext
|
||||
if(!(M.wear_suit.body_parts_covered & UPPER_TORSO))
|
||||
if(M.w_uniform)
|
||||
fibertext = "Fibers from \a [M.w_uniform]."
|
||||
if(prob(12*item_multiplier) && !(fibertext in suit_fibers)) //Wearing a suit means less of the uniform exposed.
|
||||
//world.log << "Added fibertext: [fibertext]"
|
||||
//log_to_dd("Added fibertext: [fibertext]")
|
||||
suit_fibers += fibertext
|
||||
if(!(M.wear_suit.body_parts_covered & HANDS))
|
||||
if(M.gloves)
|
||||
fibertext = "Material from a pair of [M.gloves.name]."
|
||||
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
|
||||
//world.log << "Added fibertext: [fibertext]"
|
||||
//log_to_dd("Added fibertext: [fibertext]")
|
||||
suit_fibers += fibertext
|
||||
else if(M.w_uniform)
|
||||
fibertext = "Fibers from \a [M.w_uniform]."
|
||||
@@ -39,10 +39,10 @@ atom/proc/add_fibers(mob/living/carbon/human/M)
|
||||
if(M.gloves)
|
||||
fibertext = "Material from a pair of [M.gloves.name]."
|
||||
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
|
||||
//world.log << "Added fibertext: [fibertext]"
|
||||
//log_to_dd("Added fibertext: [fibertext]")
|
||||
suit_fibers += "Material from a pair of [M.gloves.name]."
|
||||
else if(M.gloves)
|
||||
fibertext = "Material from a pair of [M.gloves.name]."
|
||||
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
|
||||
//world.log << "Added fibertext: [fibertext]"
|
||||
//log_to_dd("Added fibertext: [fibertext]")
|
||||
suit_fibers += "Material from a pair of [M.gloves.name]."
|
||||
@@ -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())
|
||||
|
||||
@@ -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
|
||||
@@ -34,7 +34,7 @@ world/IsBanned(key,address,computer_id)
|
||||
var/ckeytext = ckey(key)
|
||||
|
||||
if(!establish_db_connection())
|
||||
world.log << "Ban database connection failure. Key [ckeytext] not checked"
|
||||
log_to_dd("Ban database connection failure. Key [ckeytext] not checked")
|
||||
diary << "Ban database connection failure. Key [ckeytext] not checked"
|
||||
return
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -102,13 +103,13 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
world.log << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||
log_to_dd("Failed to connect to database in load_admins(). Reverting to legacy system.")
|
||||
diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||
config.admin_legacy_system = 1
|
||||
load_admins()
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, rank, level, flags FROM erro_admin")
|
||||
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]
|
||||
@@ -122,7 +123,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
//find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
D.associate(directory[ckey])
|
||||
if(!admin_datums)
|
||||
world.log << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
|
||||
log_to_dd("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.")
|
||||
diary << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
|
||||
config.admin_legacy_system = 1
|
||||
load_admins()
|
||||
|
||||
@@ -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"
|
||||
@@ -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("[src] deadmined themself.")
|
||||
message_admins("[src] 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("[src] re-adminned themselves.")
|
||||
log_admin("[src] 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"
|
||||
|
||||
@@ -52,14 +52,14 @@ DEBUG
|
||||
log_admin("appearance_keylist was empty")
|
||||
else
|
||||
if(!establish_db_connection())
|
||||
world.log << "Database connection failed. Reverting to the legacy ban system."
|
||||
log_to_dd("Database connection failed. Reverting to the legacy ban system.")
|
||||
diary << "Database connection failed. Reverting to the legacy ban system."
|
||||
config.ban_legacy_system = 1
|
||||
appearance_loadbanfile()
|
||||
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
|
||||
|
||||
@@ -64,14 +64,14 @@ DEBUG
|
||||
log_admin("jobban_keylist was empty")
|
||||
else
|
||||
if(!establish_db_connection())
|
||||
world.log << "Database connection failed. Reverting to the legacy ban system."
|
||||
log_to_dd("Database connection failed. Reverting to the legacy ban system.")
|
||||
diary << "Database connection failed. Reverting to the legacy ban system."
|
||||
config.ban_legacy_system = 1
|
||||
jobban_loadbanfile()
|
||||
return
|
||||
|
||||
//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,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")
|
||||
@@ -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()
|
||||
@@ -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>";
|
||||
|
||||
+112
-53
@@ -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)
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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>"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1103,7 +1103,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.regenerate_icons()
|
||||
|
||||
log_admin("[key_name(usr)] changed the equipment of [key_name(M)] to [dresscode].")
|
||||
message_admins("\blue [key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode]..", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode].", 1)
|
||||
return
|
||||
|
||||
/client/proc/startSinglo()
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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!
|
||||
|
||||
|
||||
@@ -546,7 +546,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
if("marked datum")
|
||||
O.vars[variable] = holder.marked_datum
|
||||
|
||||
world.log << "### VarEdit by [src]: [O.type] [variable]=[html_encode("[O.vars[variable]]")]"
|
||||
log_to_dd("### VarEdit by [src]: [O.type] [variable]=[html_encode("[O.vars[variable]]")]")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [variable] to [O.vars[variable]]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [variable] to [O.vars[variable]]", 1)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
msg = "\blue <b><font color=orange>CENTCOMM: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color='#DC143C'>SYNDICATE:</font> [key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
msg = "\blue <b><font color='#DC143C'>SYNDICATE: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/proc/HONK_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color=pink>HONK:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;HONKReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
msg = "\blue <b><font color=pink>HONK: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;HONKReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
@@ -50,8 +50,15 @@
|
||||
|
||||
/proc/ERT_Announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color=orange>ERT REQUEST:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;ErtReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
msg = "\blue <b><font color=orange>ERT REQUEST: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;ErtReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
X << msg
|
||||
X << msg
|
||||
|
||||
/proc/Nuke_request(text , mob/Sender)
|
||||
var/nuke_code = get_nuke_code()
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST: </font>[key_name(Sender)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
|
||||
admins << msg
|
||||
admins << "<span class='adminnotice'><b>The nuke code is [nuke_code].</b></span>"
|
||||
@@ -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)
|
||||
@@ -911,10 +908,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
choice = input("The shuttle will not be able to leave if you call it. Call anyway?") in list("Confirm", "Cancel")
|
||||
if(choice != "Confirm")
|
||||
return
|
||||
|
||||
|
||||
|
||||
choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
|
||||
if (choice == "Emergency")
|
||||
emergency_shuttle.call_evac()
|
||||
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()
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,15 +1,59 @@
|
||||
|
||||
/obj/machinery/artillerycontrol
|
||||
var/reload = 180
|
||||
/obj/machinery/computer/artillerycontrol
|
||||
name = "bluespace artillery control"
|
||||
icon_state = "control_boxp1"
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon_screen = "accelerator"
|
||||
icon_keyboard = "accelerator_key"
|
||||
icon_state = "computer-wires"
|
||||
req_access = list(access_cent_commander)
|
||||
var/last_fire = 0
|
||||
var/reload_cooldown = 180 // 3 minute cooldown
|
||||
|
||||
light_color = LIGHT_COLOR_LIGHTBLUE
|
||||
|
||||
/obj/machinery/artillerycontrol/process()
|
||||
if(src.reload<180)
|
||||
src.reload++
|
||||
/obj/machinery/computer/artillerycontrol/attack_ai(user as mob)
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
return
|
||||
|
||||
/obj/machinery/computer/artillerycontrol/attack_hand(user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/artillerycontrol/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
var/time_to_wait = round(reload_cooldown - ((world.time / 10) - last_fire), 1)
|
||||
var/mins = round(time_to_wait / 60)
|
||||
var/seconds = time_to_wait - (60*mins)
|
||||
data["reloadtime_mins"] = mins
|
||||
data["reloadtime_secs"] = (seconds < 10) ? "0[seconds]" : seconds
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "bluespace_artillery.tmpl", "Bluespace Control", 400, 260)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/computer/artillerycontrol/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
var/A
|
||||
A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
|
||||
var/area/thearea = teleportlocs[A]
|
||||
if(..() || !istype(thearea))
|
||||
return
|
||||
|
||||
var/delta = (world.time / 10) - last_fire
|
||||
if(reload_cooldown > delta)
|
||||
return 1
|
||||
|
||||
command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.")
|
||||
message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1)
|
||||
var/list/L = list()
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L+=T
|
||||
var/loc = pick(L)
|
||||
explosion(loc,2,5,11)
|
||||
last_fire = world.time / 10
|
||||
|
||||
/obj/structure/artilleryplaceholder
|
||||
name = "artillery"
|
||||
@@ -19,47 +63,3 @@
|
||||
|
||||
/obj/structure/artilleryplaceholder/decorative
|
||||
density = 0
|
||||
|
||||
/obj/machinery/artillerycontrol/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
var/dat = "<B>Bluespace Artillery Control:</B><BR>"
|
||||
dat += "Locked on<BR>"
|
||||
dat += "<B>Charge progress: [reload]/180:</B><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];fire=1'>Open Fire</A><BR>"
|
||||
dat += "Deployment of weapon authorized by <br>Nanotrasen Naval Command<br><br>Remember, friendly fire is grounds for termination of your contract and life.<HR>"
|
||||
user << browse(dat, "window=scroll")
|
||||
onclose(user, "scroll")
|
||||
return
|
||||
|
||||
/obj/machinery/artillerycontrol/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
var/A
|
||||
A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
|
||||
var/area/thearea = teleportlocs[A]
|
||||
if (usr.stat || usr.restrained()) return
|
||||
if(src.reload < 180) return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.")
|
||||
message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1)
|
||||
var/list/L = list()
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L+=T
|
||||
var/loc = pick(L)
|
||||
explosion(loc,2,5,11)
|
||||
reload = 0
|
||||
|
||||
/*mob/proc/openfire()
|
||||
var/A
|
||||
A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
|
||||
var/area/thearea = teleportlocs[A]
|
||||
command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.")
|
||||
spawn(30)
|
||||
var/list/L = list()
|
||||
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L+=T
|
||||
var/loc = pick(L)
|
||||
explosion(loc,2,5,11)*/
|
||||
@@ -585,7 +585,7 @@ proc/SwapMaps_CreateFromTemplate(template_id)
|
||||
else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[template_id].txt"))
|
||||
text=1
|
||||
else
|
||||
world.log << "SwapMaps error in SwapMaps_CreateFromTemplate(): map_[template_id] file not found."
|
||||
log_to_dd("SwapMaps error in SwapMaps_CreateFromTemplate(): map_[template_id] file not found.")
|
||||
return
|
||||
if(text)
|
||||
S=new
|
||||
@@ -612,7 +612,7 @@ proc/SwapMaps_LoadChunk(chunk_id,turf/locorner)
|
||||
else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[chunk_id].txt"))
|
||||
text=1
|
||||
else
|
||||
world.log << "SwapMaps error in SwapMaps_LoadChunk(): map_[chunk_id] file not found."
|
||||
log_to_dd("SwapMaps error in SwapMaps_LoadChunk(): map_[chunk_id] file not found.")
|
||||
return
|
||||
if(text)
|
||||
S=new
|
||||
@@ -630,9 +630,9 @@ proc/SwapMaps_LoadChunk(chunk_id,turf/locorner)
|
||||
|
||||
proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2)
|
||||
if(!corner1 || !corner2)
|
||||
world.log << "SwapMaps error in SwapMaps_SaveChunk():"
|
||||
if(!corner1) world.log << " corner1 turf is null"
|
||||
if(!corner2) world.log << " corner2 turf is null"
|
||||
log_to_dd("SwapMaps error in SwapMaps_SaveChunk():")
|
||||
if(!corner1) log_to_dd(" corner1 turf is null")
|
||||
if(!corner2) log_to_dd(" corner2 turf is null")
|
||||
return
|
||||
var/swapmap/M=new
|
||||
M.id=chunk_id
|
||||
@@ -659,7 +659,7 @@ proc/SwapMaps_GetSize(id)
|
||||
else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[id].txt"))
|
||||
text=1
|
||||
else
|
||||
world.log << "SwapMaps error in SwapMaps_GetSize(): map_[id] file not found."
|
||||
log_to_dd("SwapMaps error in SwapMaps_GetSize(): map_[id] file not found.")
|
||||
return
|
||||
if(text)
|
||||
S=new
|
||||
|
||||
@@ -44,7 +44,7 @@ proc/createRandomZlevel()
|
||||
if(air_master)
|
||||
air_master.setup_allturfs(block(locate(1, 1, world.maxz), locate(world.maxx, world.maxy, world.maxz)))
|
||||
create_lighting_overlays(world.maxz)
|
||||
world.log << "away mission loaded: [map]"
|
||||
log_to_dd("away mission loaded: [map]")
|
||||
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if (L.name != "awaystart")
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
//search the href for script injection
|
||||
if( findtext(href,"<script",1,0) )
|
||||
world.log << "Attempted use of scripts within a topic call, by [src]"
|
||||
log_to_dd("Attempted use of scripts within a topic call, by [src]")
|
||||
message_admins("Attempted use of scripts within a topic call, by [src]")
|
||||
//del(usr)
|
||||
return
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
@@ -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>"
|
||||
@@ -337,7 +337,7 @@ datum/preferences
|
||||
else
|
||||
dat += "[flavor_text]"
|
||||
else
|
||||
dat += "[copytext(flavor_text, 1, 37)]...<br>"
|
||||
dat += "[TextPreview(flavor_text)]...<br>"
|
||||
dat += "<br>"
|
||||
|
||||
var/hairname = "Hair"
|
||||
@@ -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)
|
||||
|
||||
@@ -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*/
|
||||
@@ -129,7 +129,10 @@
|
||||
if(!computer.radio.subspace)
|
||||
return
|
||||
if(authenticated)
|
||||
call_shuttle_proc(usr)
|
||||
var/input = stripped_input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
|
||||
if(!input || ..(href, href_list) || !authenticated)
|
||||
return
|
||||
call_shuttle_proc(usr, input)
|
||||
if(emergency_shuttle.online())
|
||||
post_status("shuttle")
|
||||
state = STATE_DEFAULT
|
||||
@@ -236,7 +239,10 @@
|
||||
if("ai-callshuttle2" in href_list)
|
||||
if(!computer.radio.subspace)
|
||||
return
|
||||
call_shuttle_proc(usr)
|
||||
var/input = stripped_input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
|
||||
if(!input || ..(href, href_list))
|
||||
return
|
||||
call_shuttle_proc(usr, input)
|
||||
aistate = STATE_DEFAULT
|
||||
if("ai-messagelist" in href_list)
|
||||
aicurrmsg = 0
|
||||
|
||||
@@ -49,10 +49,10 @@
|
||||
if(!stored_computer)
|
||||
if(contents.len)
|
||||
for(var/obj/O in contents)
|
||||
O.loc = loc
|
||||
O.forceMove(loc)
|
||||
usr << "\The [src] crumbles to pieces."
|
||||
spawn(5)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!stored_computer.manipulating)
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
spawn(5)
|
||||
stored_computer.manipulating = 0
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
else
|
||||
usr << "\red You are already opening the computer!"
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
AltClick()
|
||||
if(Adjacent(usr))
|
||||
open_computer()
|
||||
|
||||
Destroy()
|
||||
return QDEL_HINT_HARDDEL_NOW // Warning: GC'ing will cause the laptop to vanish when it next closes
|
||||
|
||||
//Quickfix until Snapshot works out how he wants to redo power. ~Z
|
||||
/obj/item/device/laptop/verb/eject_id()
|
||||
@@ -150,12 +153,12 @@
|
||||
return
|
||||
|
||||
if(!portable)
|
||||
portable=new
|
||||
portable = new
|
||||
portable.stored_computer = src
|
||||
|
||||
if(!manipulating)
|
||||
portable.loc = loc
|
||||
loc = portable
|
||||
portable.forceMove(loc)
|
||||
forceMove(portable)
|
||||
stat |= MAINT
|
||||
usr << "You close \the [src]."
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ log transactions
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
var/obj/machinery/account_database/linked_db
|
||||
var/obj/machinery/computer/account_database/linked_db
|
||||
var/datum/money_account/authenticated_account
|
||||
var/number_incorrect_tries = 0
|
||||
var/previous_account_number = 0
|
||||
@@ -80,7 +80,7 @@ log transactions
|
||||
authenticated_account.charge(-amount,null,"Credit deposit",terminal_id=machine_id,dest_name = "Terminal")
|
||||
|
||||
/obj/machinery/atm/proc/reconnect_database()
|
||||
for(var/obj/machinery/account_database/DB in world) //Hotfix until someone finds out why it isn't in 'machines'
|
||||
for(var/obj/machinery/computer/account_database/DB in world) //Hotfix until someone finds out why it isn't in 'machines'
|
||||
if( DB.z == src.z && !(DB.stat & NOPOWER) && DB.activated )
|
||||
linked_db = DB
|
||||
break
|
||||
|
||||
@@ -3,7 +3,7 @@ var/global/num_financial_terminals = 1
|
||||
var/global/datum/money_account/station_account
|
||||
var/global/list/datum/money_account/department_accounts = list()
|
||||
var/global/next_account_number = 0
|
||||
var/global/obj/machinery/account_database/centcomm_account_db
|
||||
var/global/obj/machinery/computer/account_database/centcomm_account_db
|
||||
var/global/datum/money_account/vendor_account
|
||||
var/global/list/all_money_accounts = list()
|
||||
|
||||
@@ -57,7 +57,7 @@ var/global/list/all_money_accounts = list()
|
||||
//the current ingame time (hh:mm) can be obtained by calling:
|
||||
//worldtime2text()
|
||||
|
||||
/proc/create_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/obj/machinery/account_database/source_db)
|
||||
/proc/create_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/obj/machinery/computer/account_database/source_db)
|
||||
|
||||
//create a new account
|
||||
var/datum/money_account/M = new()
|
||||
@@ -336,7 +336,7 @@ var/global/list/all_money_accounts = list()
|
||||
|
||||
src.attack_hand(usr)
|
||||
*/
|
||||
/obj/machinery/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
|
||||
/obj/machinery/computer/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
|
||||
if(!activated)
|
||||
return 0
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
@@ -367,7 +367,7 @@ var/global/list/all_money_accounts = list()
|
||||
if( D.security_level <= security_level_passed && (!D.security_level || D.remote_access_pin == attempt_pin_number || !pin_needed) )
|
||||
return D
|
||||
|
||||
/obj/machinery/account_database/proc/get_account(var/account_number)
|
||||
/obj/machinery/computer/account_database/proc/get_account(var/account_number)
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
if(D.account_number == account_number)
|
||||
return D
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
|
||||
/obj/machinery/account_database
|
||||
name = "Accounts uplink terminal"
|
||||
/obj/machinery/computer/account_database
|
||||
name = "Accounts Uplink Terminal"
|
||||
desc = "Access transaction logs, account data and all kinds of other financial records."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "aiupload"
|
||||
icon_screen = "accounts"
|
||||
density = 1
|
||||
req_one_access = list(access_hop, access_captain, access_cent_commander)
|
||||
var/receipt_num
|
||||
@@ -12,34 +11,38 @@
|
||||
var/datum/money_account/detailed_account_view
|
||||
var/creating_new_account = 0
|
||||
var/activated = 1
|
||||
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
proc/get_access_level()
|
||||
if (!held_card)
|
||||
return 0
|
||||
if(access_cent_commander in held_card.access)
|
||||
return 2
|
||||
else if(access_hop in held_card.access || access_captain in held_card.access)
|
||||
return 1
|
||||
/obj/machinery/computer/account_database/proc/get_access_level(user as mob)
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 2
|
||||
if (!held_card)
|
||||
return 0
|
||||
if(access_cent_commander in held_card.access)
|
||||
return 2
|
||||
else if(access_hop in held_card.access || access_captain in held_card.access)
|
||||
return 1
|
||||
|
||||
proc/create_transation(target, reason, amount)
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = target
|
||||
T.purpose = reason
|
||||
T.amount = amount
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = machine_id
|
||||
return T
|
||||
/obj/machinery/computer/account_database/proc/create_transation(target, reason, amount)
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = target
|
||||
T.purpose = reason
|
||||
T.amount = amount
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = machine_id
|
||||
return T
|
||||
|
||||
proc/accounting_letterhead(report_name)
|
||||
return {"
|
||||
<center><h1><b>[report_name]</b></h1></center>
|
||||
<center><small><i>[station_name()] Accounting Report</i></small></center>
|
||||
<hr>
|
||||
<u>Generated By:</u> [held_card.registered_name], [held_card.assignment]<br>
|
||||
"}
|
||||
/obj/machinery/computer/account_database/proc/accounting_letterhead(report_name)
|
||||
return {"
|
||||
<center><h1><b>[report_name]</b></h1></center>
|
||||
<center><small><i>[station_name()] Accounting Report</i></small></center>
|
||||
<hr>
|
||||
<u>Generated By:</u> [held_card.registered_name], [held_card.assignment]<br>
|
||||
"}
|
||||
|
||||
/obj/machinery/account_database/New()
|
||||
/obj/machinery/computer/account_database/New()
|
||||
if(!station_account)
|
||||
create_station_account()
|
||||
|
||||
@@ -56,7 +59,7 @@
|
||||
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
|
||||
..()
|
||||
|
||||
/obj/machinery/account_database/attackby(obj/O, mob/user, params)
|
||||
/obj/machinery/computer/account_database/attackby(obj/O, mob/user, params)
|
||||
if(!istype(O, /obj/item/weapon/card/id))
|
||||
return ..()
|
||||
|
||||
@@ -69,18 +72,17 @@
|
||||
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/account_database/attack_hand(mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
/obj/machinery/computer/account_database/attack_hand(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/account_database/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
/obj/machinery/computer/account_database/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/data[0]
|
||||
data["src"] = "\ref[src]"
|
||||
data["id_inserted"] = !!held_card
|
||||
data["id_card"] = held_card ? text("[held_card.registered_name], [held_card.assignment]") : "-----"
|
||||
data["access_level"] = get_access_level()
|
||||
data["access_level"] = get_access_level(user)
|
||||
data["machine_id"] = machine_id
|
||||
data["creating_new_account"] = creating_new_account
|
||||
data["detailed_account_view"] = !!detailed_account_view
|
||||
@@ -124,10 +126,29 @@
|
||||
ui = new(user, src, ui_key, "accounts_terminal.tmpl", src.name, 400, 640)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/account_database/Topic(href, href_list)
|
||||
|
||||
/obj/machinery/computer/account_database/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if("insert_card")
|
||||
if(held_card)
|
||||
held_card.loc = src.loc
|
||||
|
||||
if(ishuman(usr) && !usr.get_active_hand())
|
||||
usr.put_in_hands(held_card)
|
||||
held_card = null
|
||||
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
usr.drop_item()
|
||||
C.loc = src
|
||||
held_card = C
|
||||
|
||||
if(!get_access_level(usr))
|
||||
return 1
|
||||
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(usr, src, "main")
|
||||
|
||||
@@ -167,21 +188,6 @@
|
||||
ui.close()
|
||||
|
||||
creating_new_account = 0
|
||||
if("insert_card")
|
||||
if(held_card)
|
||||
held_card.loc = src.loc
|
||||
|
||||
if(ishuman(usr) && !usr.get_active_hand())
|
||||
usr.put_in_hands(held_card)
|
||||
held_card = null
|
||||
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
usr.drop_item()
|
||||
C.loc = src
|
||||
held_card = C
|
||||
|
||||
if("view_account_detail")
|
||||
var/index = text2num(href_list["account_index"])
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/transaction_amount = 0
|
||||
var/transaction_purpose = "Default charge"
|
||||
var/access_code = 0
|
||||
var/obj/machinery/account_database/linked_db
|
||||
var/obj/machinery/computer/account_database/linked_db
|
||||
var/datum/money_account/linked_account
|
||||
|
||||
/obj/item/device/eftpos/New()
|
||||
@@ -53,7 +53,7 @@
|
||||
if(!location)
|
||||
return
|
||||
|
||||
for(var/obj/machinery/account_database/DB in world) //Hotfix until someone finds out why it isn't in 'machines'
|
||||
for(var/obj/machinery/computer/account_database/DB in world) //Hotfix until someone finds out why it isn't in 'machines'
|
||||
if(DB.z == location.z)
|
||||
linked_db = DB
|
||||
break
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
////////////////////////
|
||||
|
||||
/proc/get_money_account(var/account_number, var/from_z=-1)
|
||||
for(var/obj/machinery/account_database/DB in world)
|
||||
for(var/obj/machinery/computer/account_database/DB in world)
|
||||
if(from_z > -1 && DB.z != from_z) continue
|
||||
if((DB.stat & NOPOWER) || !DB.activated ) continue
|
||||
var/datum/money_account/acct = DB.get_account(account_number)
|
||||
|
||||
@@ -104,10 +104,7 @@
|
||||
//Commented out because we don't send messages like this anymore. Instead it will just popup in their chat window.
|
||||
//P.tnote += "<i><b>← From [sender] (Unknown / spam?):</b></i><br>[message]<br>"
|
||||
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
if(!P.silent) O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
P.play_ringtone()
|
||||
//Search for holder of the PDA.
|
||||
var/mob/living/L = null
|
||||
if(P.loc && isliving(P.loc))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
var/releaseWhen = 60
|
||||
var/list/area/areas = list() //List of areas to affect. Filled by start()
|
||||
|
||||
|
||||
var/eventDept = "Security" //Department name in announcement
|
||||
var/list/areaName = list("Brig") //Names of areas mentioned in AI and Engineering announcements
|
||||
var/list/areaType = list(/area/security/prison, /area/security/brig, /area/security/permabrig) //Area types to include.
|
||||
@@ -54,7 +54,7 @@
|
||||
A << "<span class='danger'>Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department].</span>"
|
||||
|
||||
else
|
||||
world.log << "ERROR: Could not initate grey-tide. Unable to find suitable containment area."
|
||||
log_to_dd("ERROR: Could not initate grey-tide. Unable to find suitable containment area.")
|
||||
kill()
|
||||
|
||||
|
||||
|
||||
@@ -166,4 +166,4 @@ var/global/datum/controller/process/garbage_collector/garbageCollector
|
||||
return ..()
|
||||
|
||||
/proc/gcwarning(msg)
|
||||
world.log << "## GC WARNING: [msg]"
|
||||
log_to_dd("## GC WARNING: [msg]")
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
..()
|
||||
|
||||
@@ -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>"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>.")
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
@@ -598,4 +598,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
|
||||
|
||||
@@ -115,12 +115,6 @@
|
||||
|
||||
if(vname)
|
||||
speaker_name = vname
|
||||
|
||||
if(istype(speaker, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = speaker
|
||||
if(H.voice)
|
||||
speaker_name = H.voice
|
||||
|
||||
if(hard_to_hear)
|
||||
speaker_name = "unknown"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
tod = worldtime2text() //weasellos time of death patch
|
||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
if(ticker && ticker.mode)
|
||||
// world.log << "k"
|
||||
// log_to_dd("k")
|
||||
sql_report_death(src)
|
||||
ticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -841,11 +841,11 @@
|
||||
set desc = "Sets a description which will be shown when someone examines you."
|
||||
set category = "IC"
|
||||
|
||||
pose = sanitize(copytext(input(usr, "This is [src]. \He is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
|
||||
pose = sanitize(copytext(input(usr, "This is [src]. \He is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
/mob/living/carbon/human/verb/set_flavor()
|
||||
set name = "Set Flavour Text"
|
||||
set desc = "Sets an extended description of your character's features."
|
||||
set category = "IC"
|
||||
|
||||
flavor_text = sanitize(copytext(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text, 1))
|
||||
flavor_text = TextPreview(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -105,16 +105,19 @@
|
||||
if(M.zone_sel && M.zone_sel.selecting == "head" && src != M)
|
||||
if(M.mind && M.mind.vampire && (M.mind in ticker.mode.vampires) && !M.mind.vampire.draining)
|
||||
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
M << "\red Remove their mask!"
|
||||
M << "<span class='warning'>Remove their mask!</span>"
|
||||
return 0
|
||||
if((M.head && (M.head.flags & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
M << "\red Remove your mask!"
|
||||
M << "<span class='warning'>Remove your mask!</span>"
|
||||
return 0
|
||||
if(mind && mind.vampire && (mind in ticker.mode.vampires))
|
||||
M << "\red Your fangs fail to pierce [src.name]'s cold flesh"
|
||||
M << "<span class='warning'>Your fangs fail to pierce [src.name]'s cold flesh</span>"
|
||||
return 0
|
||||
if(SKELETON in mutations)
|
||||
M << "\red There is no blood in a skeleton!"
|
||||
M << "<span class='warning'>There is no blood in a skeleton!</span>"
|
||||
return 0
|
||||
if(issmall(src) && !ckey) //Monkeyized humans are okay, humanized monkeys are okey, monkeys are not.
|
||||
M << "<span class='warning'>Blood from a monkey is useless!</span>"
|
||||
return 0
|
||||
//we're good to suck the blood, blaah
|
||||
M.handle_bloodsucking(src)
|
||||
|
||||
@@ -232,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
|
||||
@@ -387,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))
|
||||
@@ -490,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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -406,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
|
||||
@@ -419,14 +419,14 @@
|
||||
/* //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
|
||||
@@ -498,4 +498,4 @@
|
||||
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()
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -242,6 +242,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 +252,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
|
||||
@@ -329,20 +331,21 @@ var/list/ai_verbs_default = list(
|
||||
set name = "Call Emergency Shuttle"
|
||||
set category = "AI Commands"
|
||||
|
||||
if(src.stat == 2)
|
||||
src << "You can't call the shuttle because you are dead!"
|
||||
if(src.stat == DEAD)
|
||||
src << "<span class='warning'>You can't call the shuttle because you are dead!</span>"
|
||||
return
|
||||
|
||||
if(check_unable(AI_CHECK_WIRELESS))
|
||||
return
|
||||
|
||||
var/confirm = alert("Are you sure you want to call the shuttle?", "Confirm Shuttle Call", "Yes", "No")
|
||||
var/input = input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
|
||||
if(!input || stat)
|
||||
return
|
||||
|
||||
if(check_unable(AI_CHECK_WIRELESS))
|
||||
return
|
||||
|
||||
if(confirm == "Yes")
|
||||
call_shuttle_proc(src)
|
||||
call_shuttle_proc(src, input)
|
||||
|
||||
// hack to display shuttle timer
|
||||
if(emergency_shuttle.online())
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
if(!O)
|
||||
return 0
|
||||
|
||||
O.mouse_opacity = 2
|
||||
if(istype(O,/obj/item/borg/sight))
|
||||
var/obj/item/borg/sight/S = O
|
||||
sight_mode &= ~S.sight_mode
|
||||
@@ -44,6 +45,7 @@
|
||||
src << "Already activated"
|
||||
return
|
||||
if(!module_state_1)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_1 = O
|
||||
O.layer = 20
|
||||
O.screen_loc = inv1.screen_loc
|
||||
@@ -51,6 +53,7 @@
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_1:sight_mode
|
||||
else if(!module_state_2)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_2 = O
|
||||
O.layer = 20
|
||||
O.screen_loc = inv2.screen_loc
|
||||
@@ -58,6 +61,7 @@
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_2:sight_mode
|
||||
else if(!module_state_3)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_3 = O
|
||||
O.layer = 20
|
||||
O.screen_loc = inv3.screen_loc
|
||||
|
||||
@@ -30,6 +30,15 @@
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.emag = new /obj/item/toy/sword(src)
|
||||
src.emag.name = "Placeholder Emag Item"
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/proc/fix_modules()
|
||||
for(var/obj/item/I in modules)
|
||||
I.flags |= NODROP
|
||||
I.mouse_opacity = 2
|
||||
if(emag)
|
||||
emag.flags |= NODROP
|
||||
emag.mouse_opacity = 2
|
||||
|
||||
/obj/item/weapon/robot_module/proc/respawn_consumable(var/mob/living/silicon/robot/R)
|
||||
if(!stacktypes || !stacktypes.len) return
|
||||
@@ -85,15 +94,16 @@
|
||||
name = "standard robot module"
|
||||
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/melee/baton/loaded(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.modules += new /obj/item/device/healthanalyzer(src)
|
||||
src.emag = new /obj/item/weapon/melee/energy/sword/cyborg(src)
|
||||
return
|
||||
/obj/item/weapon/robot_module/standard/New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/melee/baton/loaded(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.modules += new /obj/item/device/healthanalyzer(src)
|
||||
src.emag = new /obj/item/weapon/melee/energy/sword/cyborg(src)
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/weapon/robot_module/medical
|
||||
name = "medical robot module"
|
||||
@@ -105,36 +115,37 @@
|
||||
/obj/item/stack/nanopaste = 5
|
||||
)
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/device/healthanalyzer/advanced(src)
|
||||
src.modules += new /obj/item/device/reagent_scanner/adv(src)
|
||||
src.modules += new /obj/item/weapon/borg_defib(src)
|
||||
src.modules += new /obj/item/roller_holder(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/borghypo(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/dropper(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/syringe(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher/mini(src)
|
||||
src.modules += new /obj/item/stack/medical/advanced/bruise_pack(src)
|
||||
src.modules += new /obj/item/stack/medical/advanced/ointment(src)
|
||||
src.modules += new /obj/item/stack/medical/splint(src)
|
||||
src.modules += new /obj/item/stack/nanopaste(src)
|
||||
src.modules += new /obj/item/weapon/scalpel(src)
|
||||
src.modules += new /obj/item/weapon/hemostat(src)
|
||||
src.modules += new /obj/item/weapon/retractor(src)
|
||||
src.modules += new /obj/item/weapon/cautery(src)
|
||||
src.modules += new /obj/item/weapon/bonegel(src)
|
||||
src.modules += new /obj/item/weapon/FixOVein(src)
|
||||
src.modules += new /obj/item/weapon/bonesetter(src)
|
||||
src.modules += new /obj/item/weapon/circular_saw(src)
|
||||
src.modules += new /obj/item/weapon/surgicaldrill(src)
|
||||
/obj/item/weapon/robot_module/medical/New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/device/healthanalyzer/advanced(src)
|
||||
src.modules += new /obj/item/device/reagent_scanner/adv(src)
|
||||
src.modules += new /obj/item/weapon/borg_defib(src)
|
||||
src.modules += new /obj/item/roller_holder(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/borghypo(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/dropper(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/syringe(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher/mini(src)
|
||||
src.modules += new /obj/item/stack/medical/advanced/bruise_pack(src)
|
||||
src.modules += new /obj/item/stack/medical/advanced/ointment(src)
|
||||
src.modules += new /obj/item/stack/medical/splint(src)
|
||||
src.modules += new /obj/item/stack/nanopaste(src)
|
||||
src.modules += new /obj/item/weapon/scalpel(src)
|
||||
src.modules += new /obj/item/weapon/hemostat(src)
|
||||
src.modules += new /obj/item/weapon/retractor(src)
|
||||
src.modules += new /obj/item/weapon/cautery(src)
|
||||
src.modules += new /obj/item/weapon/bonegel(src)
|
||||
src.modules += new /obj/item/weapon/FixOVein(src)
|
||||
src.modules += new /obj/item/weapon/bonesetter(src)
|
||||
src.modules += new /obj/item/weapon/circular_saw(src)
|
||||
src.modules += new /obj/item/weapon/surgicaldrill(src)
|
||||
|
||||
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
|
||||
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
|
||||
|
||||
src.emag.reagents.add_reagent("facid", 250)
|
||||
src.emag.name = "Polyacid spray"
|
||||
return
|
||||
src.emag.reagents.add_reagent("facid", 250)
|
||||
src.emag.name = "Polyacid spray"
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/weapon/robot_module/medical/respawn_consumable(var/mob/living/silicon/robot/R)
|
||||
if(src.emag)
|
||||
@@ -155,115 +166,113 @@
|
||||
/obj/item/stack/tile/plasteel = 15
|
||||
)
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/borg/sight/meson(src)
|
||||
src.modules += new /obj/item/weapon/rcd/borg(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher(src)
|
||||
src.modules += new /obj/item/weapon/weldingtool/largetank(src)
|
||||
src.modules += new /obj/item/weapon/screwdriver(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.modules += new /obj/item/weapon/wirecutters(src)
|
||||
src.modules += new /obj/item/device/multitool(src)
|
||||
src.modules += new /obj/item/device/t_scanner(src)
|
||||
src.modules += new /obj/item/device/analyzer(src)
|
||||
src.modules += new /obj/item/taperoll/engineering(src)
|
||||
src.modules += new /obj/item/weapon/gripper(src)
|
||||
src.modules += new /obj/item/weapon/matter_decompiler(src)
|
||||
/obj/item/weapon/robot_module/engineering/New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/borg/sight/meson(src)
|
||||
src.modules += new /obj/item/weapon/rcd/borg(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher(src)
|
||||
src.modules += new /obj/item/weapon/weldingtool/largetank(src)
|
||||
src.modules += new /obj/item/weapon/screwdriver(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.modules += new /obj/item/weapon/wirecutters(src)
|
||||
src.modules += new /obj/item/device/multitool(src)
|
||||
src.modules += new /obj/item/device/t_scanner(src)
|
||||
src.modules += new /obj/item/device/analyzer(src)
|
||||
src.modules += new /obj/item/taperoll/engineering(src)
|
||||
src.modules += new /obj/item/weapon/gripper(src)
|
||||
src.modules += new /obj/item/weapon/matter_decompiler(src)
|
||||
|
||||
src.emag = new /obj/item/borg/stun(src)
|
||||
src.emag = new /obj/item/borg/stun(src)
|
||||
|
||||
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
|
||||
M.amount = 50
|
||||
src.modules += M
|
||||
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
|
||||
M.amount = 50
|
||||
src.modules += M
|
||||
|
||||
var/obj/item/stack/sheet/rglass/cyborg/R = new /obj/item/stack/sheet/rglass/cyborg(src)
|
||||
R.amount = 50
|
||||
src.modules += R
|
||||
var/obj/item/stack/sheet/rglass/cyborg/R = new /obj/item/stack/sheet/rglass/cyborg(src)
|
||||
R.amount = 50
|
||||
src.modules += R
|
||||
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src)
|
||||
G.amount = 50
|
||||
src.modules += G
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src)
|
||||
G.amount = 50
|
||||
src.modules += G
|
||||
|
||||
var/obj/item/stack/cable_coil/cyborg/W = new /obj/item/stack/cable_coil/cyborg(src)
|
||||
W.amount = 50
|
||||
src.modules += W
|
||||
var/obj/item/stack/cable_coil/cyborg/W = new /obj/item/stack/cable_coil/cyborg(src)
|
||||
W.amount = 50
|
||||
src.modules += W
|
||||
|
||||
var/obj/item/stack/rods/Q = new /obj/item/stack/rods(src)
|
||||
Q.amount = 15
|
||||
src.modules += Q
|
||||
var/obj/item/stack/rods/Q = new /obj/item/stack/rods(src)
|
||||
Q.amount = 15
|
||||
src.modules += Q
|
||||
|
||||
var/obj/item/stack/tile/plasteel/F = new /obj/item/stack/tile/plasteel(src) //floor tiles not regular plasteel, calm down
|
||||
F.amount = 15
|
||||
src.modules += F
|
||||
var/obj/item/stack/tile/plasteel/F = new /obj/item/stack/tile/plasteel(src) //floor tiles not regular plasteel, calm down
|
||||
F.amount = 15
|
||||
src.modules += F
|
||||
|
||||
return
|
||||
fix_modules()
|
||||
|
||||
/obj/item/weapon/robot_module/security
|
||||
name = "security robot module"
|
||||
subsystems = list(/mob/living/silicon/proc/subsystem_crew_monitor)
|
||||
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/melee/baton/loaded/robot(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/disabler/cyborg(src)
|
||||
src.modules += new /obj/item/taperoll/police(src)
|
||||
src.modules += new /obj/item/clothing/mask/gas/sechailer/cyborg(src)
|
||||
src.emag = new /obj/item/weapon/gun/energy/laser/cyborg(src)
|
||||
return
|
||||
/obj/item/weapon/robot_module/security/New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/melee/baton/loaded/robot(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/disabler/cyborg(src)
|
||||
src.modules += new /obj/item/taperoll/police(src)
|
||||
src.modules += new /obj/item/clothing/mask/gas/sechailer/cyborg(src)
|
||||
src.emag = new /obj/item/weapon/gun/energy/laser/cyborg(src)
|
||||
|
||||
fix_modules()
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/janitor
|
||||
name = "janitorial robot module"
|
||||
|
||||
/obj/item/weapon/robot_module/janitor/New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/soap/nanotrasen(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/trash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/mop(src)
|
||||
src.modules += new /obj/item/device/lightreplacer(src)
|
||||
src.modules += new /obj/item/weapon/holosign_creator(src)
|
||||
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/soap/nanotrasen(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/trash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/mop(src)
|
||||
src.modules += new /obj/item/device/lightreplacer(src)
|
||||
src.modules += new /obj/item/weapon/holosign_creator(src)
|
||||
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
|
||||
|
||||
src.emag.reagents.add_reagent("lube", 250)
|
||||
src.emag.name = "Lube spray"
|
||||
return
|
||||
|
||||
|
||||
src.emag.reagents.add_reagent("lube", 250)
|
||||
src.emag.name = "Lube spray"
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/weapon/robot_module/butler
|
||||
name = "service robot module"
|
||||
|
||||
/obj/item/weapon/robot_module/butler/New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
|
||||
src.modules += new /obj/item/weapon/pen(src)
|
||||
src.modules += new /obj/item/weapon/razor(src)
|
||||
src.modules += new /obj/item/device/violin(src)
|
||||
src.modules += new /obj/item/device/guitar(src)
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
|
||||
src.modules += new /obj/item/weapon/pen(src)
|
||||
src.modules += new /obj/item/weapon/razor(src)
|
||||
src.modules += new /obj/item/device/violin(src)
|
||||
src.modules += new /obj/item/device/guitar(src)
|
||||
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
|
||||
M.matter = 30
|
||||
src.modules += M
|
||||
|
||||
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
|
||||
M.matter = 30
|
||||
src.modules += M
|
||||
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
|
||||
src.modules += new /obj/item/weapon/lighter/zippo(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/tray/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/shaker(src)
|
||||
src.emag = new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
|
||||
|
||||
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
|
||||
src.modules += new /obj/item/weapon/lighter/zippo(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/tray/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/shaker(src)
|
||||
src.emag = new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
src.emag.reagents = R
|
||||
R.my_atom = src.emag
|
||||
R.add_reagent("beer2", 50)
|
||||
src.emag.name = "Mickey Finn's Special Brew"
|
||||
return
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
src.emag.reagents = R
|
||||
R.my_atom = src.emag
|
||||
R.add_reagent("beer2", 50)
|
||||
src.emag.name = "Mickey Finn's Special Brew"
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/weapon/robot_module/butler/respawn_consumable(var/mob/living/silicon/robot/R)
|
||||
var/obj/item/weapon/reagent_containers/food/condiment/enzyme/E = locate() in src.modules
|
||||
@@ -307,19 +316,19 @@
|
||||
/obj/item/weapon/robot_module/miner
|
||||
name = "miner robot module"
|
||||
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/borg/sight/meson(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/screwdriver(src)
|
||||
src.modules += new /obj/item/device/t_scanner/adv_mining_scanner/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/ore/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/pickaxe/drill/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/kinetic_accelerator/cyborg(src)
|
||||
src.emag = new /obj/item/borg/stun(src)
|
||||
return
|
||||
/obj/item/weapon/robot_module/miner/New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/borg/sight/meson(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/screwdriver(src)
|
||||
src.modules += new /obj/item/device/t_scanner/adv_mining_scanner/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/ore/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/pickaxe/drill/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/kinetic_accelerator/cyborg(src)
|
||||
src.emag = new /obj/item/borg/stun(src)
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/weapon/robot_module/deathsquad
|
||||
name = "NT advanced combat module"
|
||||
@@ -332,7 +341,8 @@
|
||||
src.modules += new /obj/item/weapon/tank/jetpack/carbondioxide(src)
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.emag = null
|
||||
return
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/weapon/robot_module/syndicate
|
||||
name = "syndicate robot module"
|
||||
@@ -347,38 +357,42 @@
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.modules += new /obj/item/weapon/pinpointer/operative(src)
|
||||
src.emag = null
|
||||
return
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/weapon/robot_module/combat
|
||||
name = "combat robot module"
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/borg/sight/thermal(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/laser/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/plasmacutter(src)
|
||||
src.modules += new /obj/item/borg/combat/shield(src)
|
||||
src.modules += new /obj/item/borg/combat/mobility(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src) //Is a combat android really going to be stopped by a chair?
|
||||
src.emag = new /obj/item/weapon/gun/energy/lasercannon/cyborg(src)
|
||||
return
|
||||
/obj/item/weapon/robot_module/combat/New()
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/borg/sight/thermal(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/laser/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/plasmacutter(src)
|
||||
src.modules += new /obj/item/borg/combat/shield(src)
|
||||
src.modules += new /obj/item/borg/combat/mobility(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src) //Is a combat android really going to be stopped by a chair?
|
||||
src.emag = new /obj/item/weapon/gun/energy/lasercannon/cyborg(src)
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/weapon/robot_module/alien/hunter
|
||||
name = "alien hunter module"
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/weapon/melee/energy/alien/claws(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg/alien(src)
|
||||
src.modules += new /obj/item/borg/sight/thermal/alien(src)
|
||||
var/obj/item/weapon/reagent_containers/spray/alien/stun/S = new /obj/item/weapon/reagent_containers/spray/alien/stun(src)
|
||||
S.reagents.add_reagent("ether",250) //nerfed to sleeptoxin to make it less instant drop.
|
||||
src.modules += S
|
||||
var/obj/item/weapon/reagent_containers/spray/alien/smoke/A = new /obj/item/weapon/reagent_containers/spray/alien/smoke(src)
|
||||
S.reagents.add_reagent("water",50) //Water is used as a dummy reagent for the smoke bombs. More of an ammo counter.
|
||||
src.modules += A
|
||||
src.emag = new /obj/item/weapon/reagent_containers/spray/alien/acid(src)
|
||||
src.emag.reagents.add_reagent("facid", 125)
|
||||
src.emag.reagents.add_reagent("sacid", 125)
|
||||
/obj/item/weapon/robot_module/alien/hunter/New()
|
||||
src.modules += new /obj/item/weapon/melee/energy/alien/claws(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg/alien(src)
|
||||
src.modules += new /obj/item/borg/sight/thermal/alien(src)
|
||||
var/obj/item/weapon/reagent_containers/spray/alien/stun/S = new /obj/item/weapon/reagent_containers/spray/alien/stun(src)
|
||||
S.reagents.add_reagent("ether",250) //nerfed to sleeptoxin to make it less instant drop.
|
||||
src.modules += S
|
||||
var/obj/item/weapon/reagent_containers/spray/alien/smoke/A = new /obj/item/weapon/reagent_containers/spray/alien/smoke(src)
|
||||
S.reagents.add_reagent("water",50) //Water is used as a dummy reagent for the smoke bombs. More of an ammo counter.
|
||||
src.modules += A
|
||||
src.emag = new /obj/item/weapon/reagent_containers/spray/alien/acid(src)
|
||||
src.emag.reagents.add_reagent("facid", 125)
|
||||
src.emag.reagents.add_reagent("sacid", 125)
|
||||
|
||||
fix_modules()
|
||||
|
||||
/obj/item/weapon/robot_module/alien/hunter/add_languages(var/mob/living/silicon/robot/R)
|
||||
..()
|
||||
@@ -398,27 +412,27 @@
|
||||
/obj/item/stack/cable_coil/cyborg = 30
|
||||
)
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/weapon/weldingtool(src)
|
||||
src.modules += new /obj/item/weapon/screwdriver(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.modules += new /obj/item/weapon/wirecutters(src)
|
||||
src.modules += new /obj/item/device/multitool(src)
|
||||
src.modules += new /obj/item/device/lightreplacer(src)
|
||||
src.modules += new /obj/item/weapon/gripper(src)
|
||||
src.modules += new /obj/item/weapon/matter_decompiler(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/spray/cleaner/drone(src)
|
||||
src.modules += new /obj/item/weapon/soap(src)
|
||||
/obj/item/weapon/robot_module/drone/New()
|
||||
src.modules += new /obj/item/weapon/weldingtool(src)
|
||||
src.modules += new /obj/item/weapon/screwdriver(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.modules += new /obj/item/weapon/wirecutters(src)
|
||||
src.modules += new /obj/item/device/multitool(src)
|
||||
src.modules += new /obj/item/device/lightreplacer(src)
|
||||
src.modules += new /obj/item/weapon/gripper(src)
|
||||
src.modules += new /obj/item/weapon/matter_decompiler(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/spray/cleaner/drone(src)
|
||||
src.modules += new /obj/item/weapon/soap(src)
|
||||
|
||||
src.emag = new /obj/item/weapon/pickaxe/drill/cyborg/diamond(src)
|
||||
src.emag = new /obj/item/weapon/pickaxe/drill/cyborg/diamond(src)
|
||||
|
||||
for(var/T in stacktypes)
|
||||
var/obj/item/stack/sheet/W = new T(src)
|
||||
W.amount = stacktypes[T]
|
||||
src.modules += W
|
||||
for(var/T in stacktypes)
|
||||
var/obj/item/stack/sheet/W = new T(src)
|
||||
W.amount = stacktypes[T]
|
||||
src.modules += W
|
||||
|
||||
return
|
||||
fix_modules()
|
||||
|
||||
/obj/item/weapon/robot_module/drone/respawn_consumable(var/mob/living/silicon/robot/R)
|
||||
var/obj/item/weapon/reagent_containers/spray/cleaner/C = locate() in src.modules
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
BorgIndexToWireColor[flagIndex] = colorIndex
|
||||
BorgWireColorToIndex[colorIndex] = flagIndex
|
||||
colorIndexList -= colorIndex // Shortens the list.
|
||||
//world.log << "Flag: [flag], CIndex: [colorIndex], FIndex: [flagIndex]"
|
||||
//log_to_dd("Flag: [flag], CIndex: [colorIndex], FIndex: [flagIndex]")
|
||||
flagIndex+=1
|
||||
return Borgwires
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
set desc = "Sets an extended description of your character's features."
|
||||
set category = "IC"
|
||||
|
||||
flavor_text = sanitize(copytext(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text, 1))
|
||||
flavor_text = sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text)
|
||||
|
||||
/mob/living/silicon/binarycheck()
|
||||
return 1
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,6 +88,7 @@
|
||||
icon_state = "Syndicat"
|
||||
icon_living = "Syndicat"
|
||||
icon_dead = "Syndicat_dead"
|
||||
icon_resting = "Syndicat_rest"
|
||||
gender = FEMALE
|
||||
flags = NO_BREATHE
|
||||
faction = list("syndicate")
|
||||
|
||||
+88
-58
@@ -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"
|
||||
icon_resting = "Syndifox_rest"
|
||||
flags = NO_BREATHE
|
||||
faction = list("syndicate")
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
var/icon_living = ""
|
||||
var/icon_dead = ""
|
||||
var/icon_resting = ""
|
||||
var/icon_gib = null //We only try to show a gibbing animation if this exists.
|
||||
|
||||
var/oxygen_alert = 0
|
||||
@@ -86,6 +87,10 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/Life()
|
||||
if(paralysis || stunned || weakened || buckled || resting)
|
||||
canmove = 0
|
||||
else
|
||||
canmove = 1
|
||||
|
||||
//Health
|
||||
if(stat == DEAD)
|
||||
@@ -97,12 +102,16 @@
|
||||
density = 1
|
||||
return 0
|
||||
|
||||
|
||||
if(health < 1)
|
||||
Die()
|
||||
|
||||
if(health > maxHealth)
|
||||
health = maxHealth
|
||||
|
||||
if(resting && icon_resting && stat != DEAD)
|
||||
icon_state = icon_resting
|
||||
else if(icon_resting && stat != DEAD)
|
||||
icon_state = icon_living
|
||||
|
||||
if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
@@ -548,7 +557,7 @@
|
||||
gib()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/say(var/message)
|
||||
/mob/living/simple_animal/say(var/message,var/datum/language/speaking,var/verb)
|
||||
if(stat)
|
||||
return
|
||||
|
||||
@@ -558,11 +567,11 @@
|
||||
if(stat)
|
||||
return
|
||||
|
||||
var/verb = "says"
|
||||
verb = "says"
|
||||
|
||||
if(speak_emote.len)
|
||||
verb = pick(speak_emote)
|
||||
|
||||
message = capitalize(trim_left(message))
|
||||
|
||||
..(message, null, verb)
|
||||
..(message, speaking, verb)
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
|
||||
if(ckey in deadmins)
|
||||
verbs += /client/proc/readmin
|
||||
|
||||
//Clear ability list and update from mob.
|
||||
client.verbs -= ability_verbs
|
||||
|
||||
@@ -57,27 +60,3 @@
|
||||
client.verbs |= H.species.abilities
|
||||
|
||||
CallHook("Login", list("client" = src.client, "mob" = src))
|
||||
|
||||
//Update morgues on login/logout
|
||||
if (stat == DEAD)
|
||||
var/obj/structure/morgue/Morgue = null
|
||||
var/mob/living/carbon/human/C = null
|
||||
if (istype(src,/mob/dead/observer)) //We're a ghost, let's find our corpse
|
||||
var/mob/dead/observer/G = src
|
||||
if(!G.mind) //This'll probably break morgue sprites, but the line under the next If statement causes runtimes with Assume Direct Control.
|
||||
return
|
||||
if (G.can_reenter_corpse && G.mind.current)
|
||||
C = G.mind.current
|
||||
else if (istype(src,/mob/living/carbon/human))
|
||||
C = src
|
||||
|
||||
if (C) //We found our corpse, is it inside a morgue?
|
||||
if (istype(C.loc,/obj/structure/morgue))
|
||||
Morgue = C.loc
|
||||
else if (istype(C.loc,/obj/structure/closet/body_bag))
|
||||
var/obj/structure/closet/body_bag/B = C.loc
|
||||
if (istype(B.loc,/obj/structure/morgue))
|
||||
Morgue = B.loc
|
||||
if (Morgue)
|
||||
Morgue.update()
|
||||
|
||||
|
||||
@@ -10,28 +10,7 @@
|
||||
if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
|
||||
send2adminirc("[key_name(src)] logged out - no more admins online.")
|
||||
..()
|
||||
|
||||
//Update morgues on login/logout
|
||||
if (stat == DEAD)
|
||||
var/obj/structure/morgue/Morgue = null
|
||||
var/mob/living/carbon/human/C = null
|
||||
if (istype(src,/mob/dead/observer)) //We're a ghost, let's find our corpse
|
||||
var/mob/dead/observer/G = src
|
||||
if(!G.mind) //This'll probably break morgue sprites, but the line under the next If statement causes runtimes with Assume Direct Control.
|
||||
return 1
|
||||
if (G.can_reenter_corpse && G.mind.current)
|
||||
C = G.mind.current
|
||||
else if (istype(src,/mob/living/carbon/human))
|
||||
C = src
|
||||
|
||||
if (C) //We found our corpse, is it inside a morgue?
|
||||
if (istype(C.loc,/obj/structure/morgue))
|
||||
Morgue = C.loc
|
||||
else if (istype(C.loc,/obj/structure/closet/body_bag))
|
||||
var/obj/structure/closet/body_bag/B = C.loc
|
||||
if (istype(B.loc,/obj/structure/morgue))
|
||||
Morgue = B.loc
|
||||
if (Morgue)
|
||||
Morgue.update()
|
||||
|
||||
|
||||
CallHook("Logout", list("client" = src.client, "mob" = src))
|
||||
|
||||
return 1
|
||||
@@ -605,7 +605,7 @@ var/list/slot_equipment_priority = list( \
|
||||
if(lentext(msg) <= 40)
|
||||
return "\blue [msg]"
|
||||
else
|
||||
return "\blue [copytext(msg, 1, 37)]... <a href='byond://?src=\ref[src];flavor_more=1'>More...</a>"
|
||||
return "\blue [copytext_preserve_html(msg, 1, 37)]... <a href='byond://?src=\ref[src];flavor_more=1'>More...</a>"
|
||||
|
||||
/mob/proc/is_dead()
|
||||
return stat == DEAD
|
||||
|
||||
@@ -406,7 +406,7 @@
|
||||
if(isalien(attacker) && iscarbon(prey)) //Xenomorphs eating carbon mobs
|
||||
return 1
|
||||
|
||||
if(ishuman(attacker) && attacker.get_species() == "Kidan" && istype(prey,/mob/living/carbon/primitive/diona)) //Kidan eating nymphs
|
||||
if(ishuman(attacker) && attacker.get_species() == "Kidan" && istype(prey,/mob/living/simple_animal/diona)) //Kidan eating nymphs
|
||||
return 1
|
||||
|
||||
if(ishuman(attacker) && attacker.get_species() == "Tajaran" && istype(prey,/mob/living/simple_animal/mouse)) //Tajaran eating mice. Meow!
|
||||
|
||||
@@ -480,7 +480,7 @@ var/list/intents = list("help","disarm","grab","harm")
|
||||
name = realname
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && (M.client.holder.rights & R_MOD))) && (M.client.prefs.toggles & CHAT_DEAD))
|
||||
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || check_rights(R_MOD,0)) && (M.client.prefs.toggles & CHAT_DEAD))
|
||||
var/follow
|
||||
var/lname
|
||||
if(subject)
|
||||
@@ -491,7 +491,7 @@ var/list/intents = list("help","disarm","grab","harm")
|
||||
var/mob/dead/observer/DM
|
||||
if(istype(subject, /mob/dead/observer))
|
||||
DM = subject
|
||||
if(M.client.holder) // What admins see
|
||||
if(check_rights(R_MOD,0)) // What admins see
|
||||
lname = "[keyname][(DM && DM.anonsay) ? "*" : (DM ? "" : "^")] ([name])"
|
||||
else
|
||||
if(DM && DM.anonsay) // If the person is actually observer they have the option to be anonymous
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
CallHook("Login", list("client" = src.client, "mob" = src))
|
||||
|
||||
new_player_panel()
|
||||
if(ckey in deadmins)
|
||||
verbs += /client/proc/readmin
|
||||
spawn(40)
|
||||
if(client)
|
||||
handle_privacy_poll()
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
var/isadmin = 0
|
||||
if(src.client && src.client.holder)
|
||||
isadmin = 1
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM erro_poll_vote WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM erro_poll_textreply WHERE ckey = \"[ckey]\")")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[ckey]\")")
|
||||
query.Execute()
|
||||
var/newpoll = 0
|
||||
while(query.NextRow())
|
||||
@@ -178,7 +178,7 @@
|
||||
var/voted = 0
|
||||
|
||||
//First check if the person has not voted yet.
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM erro_privacy WHERE ckey='[src.ckey]'")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM [format_table_name("privacy")] WHERE ckey='[src.ckey]'")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
voted = 1
|
||||
@@ -203,7 +203,7 @@
|
||||
return
|
||||
|
||||
if(!voted)
|
||||
var/sql = "INSERT INTO erro_privacy VALUES (null, Now(), '[src.ckey]', '[option]')"
|
||||
var/sql = "INSERT INTO [format_table_name("privacy")] VALUES (null, Now(), '[src.ckey]', '[option]')"
|
||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||
query_insert.Execute()
|
||||
usr << "<b>Thank you for your vote!</b>"
|
||||
@@ -468,11 +468,9 @@
|
||||
if(is_alien_whitelisted(src, client.prefs.language) || !config.usealienwhitelist || !(chosen_language.flags & WHITELISTED))
|
||||
new_character.add_language(client.prefs.language)
|
||||
if(ticker.random_players || appearance_isbanned(new_character))
|
||||
new_character.gender = pick(MALE, FEMALE)
|
||||
client.prefs.random_character()
|
||||
client.prefs.real_name = random_name(new_character.gender)
|
||||
client.prefs.randomize_appearance_for(new_character)
|
||||
else
|
||||
client.prefs.copy_to(new_character)
|
||||
client.prefs.copy_to(new_character)
|
||||
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
return
|
||||
var/voted = 0
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM erro_privacy WHERE ckey='[src.ckey]'")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM [format_table_name("privacy")] WHERE ckey='[src.ckey]'")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
voted = 1
|
||||
@@ -53,7 +53,7 @@
|
||||
if(src.client && src.client.holder)
|
||||
isadmin = 1
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, question FROM erro_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, question FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime")
|
||||
select_query.Execute()
|
||||
|
||||
var/output = "<div align='center'><B>Player polls</B>"
|
||||
@@ -84,7 +84,7 @@
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM erro_poll_question WHERE id = [pollid]")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid]")
|
||||
select_query.Execute()
|
||||
|
||||
var/pollstarttime = ""
|
||||
@@ -109,7 +109,7 @@
|
||||
switch(polltype)
|
||||
//Polls that have enumerated options
|
||||
if("OPTION")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM erro_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
var/voted = 0
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
var/list/datum/polloption/options = list()
|
||||
|
||||
var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM erro_poll_option WHERE pollid = [pollid]")
|
||||
var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
|
||||
options_query.Execute()
|
||||
while(options_query.NextRow())
|
||||
var/datum/polloption/PO = new()
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
//Polls with a text input
|
||||
if("TEXT")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT replytext FROM erro_poll_textreply WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT replytext FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
var/voted = 0
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
//Polls with a text input
|
||||
if("NUMVAL")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM erro_poll_option o, erro_poll_vote v WHERE o.pollid = [pollid] AND v.ckey = '[usr.ckey]' AND o.id = v.optionid")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM [format_table_name("poll_option")] o, erro_poll_vote v WHERE o.pollid = [pollid] AND v.ckey = '[usr.ckey]' AND o.id = v.optionid")
|
||||
voted_query.Execute()
|
||||
|
||||
var/output = "<div align='center'><B>Player poll</B>"
|
||||
@@ -230,7 +230,7 @@
|
||||
var/minid = 999999
|
||||
var/maxid = 0
|
||||
|
||||
var/DBQuery/option_query = dbcon.NewQuery("SELECT id, text, minval, maxval, descmin, descmid, descmax FROM erro_poll_option WHERE pollid = [pollid]")
|
||||
var/DBQuery/option_query = dbcon.NewQuery("SELECT id, text, minval, maxval, descmin, descmid, descmax FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
|
||||
option_query.Execute()
|
||||
while(option_query.NextRow())
|
||||
var/optionid = text2num(option_query.item[1])
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
src << browse(output,"window=playerpoll;size=500x500")
|
||||
if("MULTICHOICE")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM erro_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
var/list/votedfor = list()
|
||||
@@ -286,7 +286,7 @@
|
||||
var/maxoptionid = 0
|
||||
var/minoptionid = 0
|
||||
|
||||
var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM erro_poll_option WHERE pollid = [pollid]")
|
||||
var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
|
||||
options_query.Execute()
|
||||
while(options_query.NextRow())
|
||||
var/datum/polloption/PO = new()
|
||||
@@ -345,7 +345,7 @@
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
select_query.Execute()
|
||||
|
||||
var/validpoll = 0
|
||||
@@ -363,7 +363,7 @@
|
||||
usr << "\red Poll is not valid."
|
||||
return
|
||||
|
||||
var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM erro_poll_option WHERE id = [optionid] AND pollid = [pollid]")
|
||||
var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE id = [optionid] AND pollid = [pollid]")
|
||||
select_query2.Execute()
|
||||
|
||||
var/validoption = 0
|
||||
@@ -378,7 +378,7 @@
|
||||
|
||||
var/alreadyvoted = 0
|
||||
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
while(voted_query.NextRow())
|
||||
@@ -399,7 +399,7 @@
|
||||
adminrank = usr.client.holder.rank
|
||||
|
||||
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]')")
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]')")
|
||||
insert_query.Execute()
|
||||
|
||||
usr << "\blue Vote successful."
|
||||
@@ -415,7 +415,7 @@
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
select_query.Execute()
|
||||
|
||||
var/validpoll = 0
|
||||
@@ -432,7 +432,7 @@
|
||||
|
||||
var/alreadyvoted = 0
|
||||
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_textreply WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
while(voted_query.NextRow())
|
||||
@@ -457,7 +457,7 @@
|
||||
usr << "The text you entered was blank, contained illegal characters or was too long. Please correct the text and submit again."
|
||||
return
|
||||
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_textreply (id ,datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (null, Now(), [pollid], '[usr.ckey]', '[usr.client.address]', '[replytext]', '[adminrank]')")
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_textreply")] (id ,datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (null, Now(), [pollid], '[usr.ckey]', '[usr.client.address]', '[replytext]', '[adminrank]')")
|
||||
insert_query.Execute()
|
||||
|
||||
usr << "\blue Feedback logging successful."
|
||||
@@ -473,7 +473,7 @@
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
select_query.Execute()
|
||||
|
||||
var/validpoll = 0
|
||||
@@ -488,7 +488,7 @@
|
||||
usr << "\red Poll is not valid."
|
||||
return
|
||||
|
||||
var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM erro_poll_option WHERE id = [optionid] AND pollid = [pollid]")
|
||||
var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE id = [optionid] AND pollid = [pollid]")
|
||||
select_query2.Execute()
|
||||
|
||||
var/validoption = 0
|
||||
@@ -503,7 +503,7 @@
|
||||
|
||||
var/alreadyvoted = 0
|
||||
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_vote WHERE optionid = [optionid] AND ckey = '[usr.ckey]'")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE optionid = [optionid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
while(voted_query.NextRow())
|
||||
@@ -519,7 +519,7 @@
|
||||
adminrank = usr.client.holder.rank
|
||||
|
||||
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])")
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])")
|
||||
insert_query.Execute()
|
||||
|
||||
usr << "\blue Vote successful."
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
datum/preferences
|
||||
//The mob should have a gender you want before running this proc. Will run fine without H
|
||||
proc/randomize_appearance_for(var/mob/living/carbon/human/H)
|
||||
if(H)
|
||||
if(H.gender == MALE)
|
||||
gender = MALE
|
||||
else
|
||||
gender = FEMALE
|
||||
proc/random_character(gender_override)
|
||||
if(gender_override)
|
||||
gender = gender_override
|
||||
else
|
||||
gender = pick(MALE, FEMALE)
|
||||
underwear = random_underwear(gender)
|
||||
undershirt = random_undershirt(gender)
|
||||
if(species == "Human")
|
||||
s_tone = random_skin_tone()
|
||||
h_style = random_hair_style(gender, species)
|
||||
@@ -16,12 +17,8 @@ datum/preferences
|
||||
randomize_eyes_color()
|
||||
if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Vulpkanin")
|
||||
randomize_skin_color()
|
||||
underwear = rand(1,underwear_m.len)
|
||||
undershirt = rand(1,undershirt_t.len)
|
||||
backbag = 2
|
||||
age = rand(AGE_MIN,AGE_MAX)
|
||||
if(H)
|
||||
copy_to(H,1)
|
||||
|
||||
|
||||
proc/randomize_hair_color(var/target = "hair")
|
||||
@@ -256,12 +253,16 @@ datum/preferences
|
||||
|
||||
|
||||
var/icon/underwear_s = null
|
||||
if(underwear > 0 && underwear < 7 && current_species.flags & HAS_UNDERWEAR)
|
||||
underwear_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = "underwear[underwear]_[g]_s")
|
||||
if(underwear && current_species.flags & HAS_UNDERWEAR)
|
||||
var/datum/sprite_accessory/underwear/U = underwear_list[underwear]
|
||||
if(U)
|
||||
underwear_s = new/icon(U.icon, "[U.icon_state]_s", ICON_OVERLAY)
|
||||
|
||||
var/icon/undershirt_s = null
|
||||
if(undershirt > 0 && undershirt < 45 && current_species.flags & HAS_UNDERWEAR)
|
||||
undershirt_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = "undershirt[undershirt]_s")
|
||||
if(undershirt && current_species.flags & HAS_UNDERWEAR)
|
||||
var/datum/sprite_accessory/undershirt/U2 = undershirt_list[undershirt]
|
||||
if(U2)
|
||||
undershirt_s = new/icon(U2.icon, "[U2.icon_state]_s", ICON_OVERLAY)
|
||||
|
||||
var/icon/clothes_s = null
|
||||
var/uniform_dmi='icons/mob/uniform.dmi'
|
||||
|
||||
@@ -17,16 +17,29 @@
|
||||
conversion in savefile.dm
|
||||
*/
|
||||
|
||||
/proc/init_sprite_accessory_subtypes(var/prototype, var/list/L, var/list/male, var/list/female)
|
||||
if(!istype(L)) L = list()
|
||||
if(!istype(male)) male = list()
|
||||
if(!istype(female)) female = list()
|
||||
|
||||
for(var/path in subtypesof(prototype))
|
||||
var/datum/sprite_accessory/D = new path()
|
||||
|
||||
L[D.name] = D
|
||||
|
||||
switch(D.gender)
|
||||
if(MALE) male += D.name
|
||||
if(FEMALE) female += D.name
|
||||
else
|
||||
male += D.name
|
||||
female += D.name
|
||||
return L
|
||||
|
||||
/datum/sprite_accessory
|
||||
|
||||
var/icon // the icon file the accessory is located in
|
||||
var/icon_state // the icon_state of the accessory
|
||||
var/preview_state // a custom preview state for whatever reason
|
||||
|
||||
var/name // the preview name of the accessory
|
||||
|
||||
// Determines if the accessory will be skipped or included in random hair generations
|
||||
var/gender = NEUTER
|
||||
var/icon //the icon file the accessory is located in
|
||||
var/icon_state //the icon_state of the accessory
|
||||
var/name //the preview name of the accessory
|
||||
var/gender = NEUTER //Determines if the accessory will be skipped or included in random hair generations
|
||||
|
||||
// Restrict some styles to specific species
|
||||
var/list/species_allowed = list("Human")
|
||||
@@ -935,3 +948,316 @@
|
||||
icon_state = "default"
|
||||
icon = 'icons/mob/human_races/r_skrell.dmi'
|
||||
species_allowed = list("Skrell")
|
||||
|
||||
///////////////////////////
|
||||
// Underwear Definitions //
|
||||
///////////////////////////
|
||||
/datum/sprite_accessory/underwear
|
||||
icon = 'icons/mob/underwear.dmi'
|
||||
|
||||
species_allowed = list("Human","Unathi","Vox","Diona","Kidan","Grey","Plasmaman","Skellington")
|
||||
|
||||
nude
|
||||
name = "Nude"
|
||||
icon_state = null
|
||||
gender = NEUTER
|
||||
|
||||
male_white
|
||||
name = "Mens White"
|
||||
icon_state = "male_white"
|
||||
gender = MALE
|
||||
|
||||
male_grey
|
||||
name = "Mens Grey"
|
||||
icon_state = "male_grey"
|
||||
gender = MALE
|
||||
|
||||
male_green
|
||||
name = "Mens Green"
|
||||
icon_state = "male_green"
|
||||
gender = MALE
|
||||
|
||||
male_blue
|
||||
name = "Mens Blue"
|
||||
icon_state = "male_blue"
|
||||
gender = MALE
|
||||
|
||||
male_black
|
||||
name = "Mens Black"
|
||||
icon_state = "male_black"
|
||||
gender = MALE
|
||||
|
||||
male_mankini
|
||||
name = "Mankini"
|
||||
icon_state = "male_mankini"
|
||||
gender = MALE
|
||||
|
||||
female_red
|
||||
name = "Ladies Red"
|
||||
icon_state = "female_red"
|
||||
gender = FEMALE
|
||||
|
||||
female_white
|
||||
name = "Ladies White"
|
||||
icon_state = "female_white"
|
||||
gender = FEMALE
|
||||
|
||||
female_yellow
|
||||
name = "Ladies Yellow"
|
||||
icon_state = "female_yellow"
|
||||
gender = FEMALE
|
||||
|
||||
female_blue
|
||||
name = "Ladies Blue"
|
||||
icon_state = "female_blue"
|
||||
gender = FEMALE
|
||||
|
||||
female_black
|
||||
name = "Ladies Black"
|
||||
icon_state = "female_black"
|
||||
gender = FEMALE
|
||||
|
||||
female_kinky
|
||||
name = "Ladies Kinky"
|
||||
icon_state = "female_kinky"
|
||||
gender = FEMALE
|
||||
|
||||
////////////////////////////
|
||||
// Undershirt Definitions //
|
||||
////////////////////////////
|
||||
/datum/sprite_accessory/undershirt
|
||||
icon = 'icons/mob/underwear.dmi'
|
||||
|
||||
species_allowed = list("Human","Unathi","Vox","Diona","Kidan","Grey","Plasmaman","Skellington")
|
||||
|
||||
/datum/sprite_accessory/undershirt/nude
|
||||
name = "Nude"
|
||||
icon_state = null
|
||||
gender = NEUTER
|
||||
|
||||
//plain color shirts
|
||||
/datum/sprite_accessory/undershirt/shirt_white
|
||||
name = "White Shirt"
|
||||
icon_state = "shirt_white"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_black
|
||||
name = "Black Shirt"
|
||||
icon_state = "shirt_black"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_grey
|
||||
name = "Grey Shirt"
|
||||
icon_state = "shirt_grey"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_red
|
||||
name = "Red Shirt"
|
||||
icon_state = "shirt_red"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_blue
|
||||
name = "Blue Shirt"
|
||||
icon_state = "shirt_blue"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_yellow
|
||||
name = "Yellow Shirt"
|
||||
icon_state = "shirt_yellow"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_green
|
||||
name = "Green Shirt"
|
||||
icon_state = "shirt_green"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_darkblue
|
||||
name = "Dark Blue Shirt"
|
||||
icon_state = "shirt_darkblue"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_darkred
|
||||
name = "Dark Red Shirt"
|
||||
icon_state = "shirt_darkred"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_darkgreen
|
||||
name = "Dark Green Shirt"
|
||||
icon_state = "shirt_darkgreen"
|
||||
gender = NEUTER
|
||||
//end plain color shirts
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_heart
|
||||
name = "Heart Shirt"
|
||||
icon_state = "shirt_heart"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_corgi
|
||||
name = "Corgi Shirt"
|
||||
icon_state = "shirt_corgi"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_jack
|
||||
name = "Union Jack Shirt"
|
||||
icon_state = "shirt_jack"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/love_nt
|
||||
name = "I Love NT Shirt"
|
||||
icon_state = "shirt_lovent"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/peace
|
||||
name = "Peace Shirt"
|
||||
icon_state = "shirt_peace"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/mondmondjaja
|
||||
name = "Band Shirt"
|
||||
icon_state = "shirt_band"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/pacman
|
||||
name = "Pogoman Shirt"
|
||||
icon_state = "shirt_pogoman"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_ss13
|
||||
name = "SS13 Shirt"
|
||||
icon_state = "shirt_ss13"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_question
|
||||
name = "Question Mark Shirt"
|
||||
icon_state = "shirt_question"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_skull
|
||||
name = "Skull Shirt"
|
||||
icon_state = "shirt_skull"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_commie
|
||||
name = "Communist Shirt"
|
||||
icon_state = "shirt_commie"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_nano
|
||||
name = "Nanotrasen Shirt"
|
||||
icon_state = "shirt_nano"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_meat
|
||||
name = "Meat Shirt"
|
||||
icon_state = "shirt_meat"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/shirt_tiedie
|
||||
name = "Tiedie Shirt"
|
||||
icon_state = "shirt_tiedie"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/blue_striped
|
||||
name = "Striped Blue Shirt"
|
||||
icon_state = "shirt_bluestripe"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/brightblue_striped
|
||||
name = "Striped Bright Blue Shirt"
|
||||
icon_state = "shirt_brightbluestripe"
|
||||
gender = NEUTER
|
||||
|
||||
|
||||
//short sleeved
|
||||
/datum/sprite_accessory/undershirt/short_white
|
||||
name = "White Short-sleeved Shirt"
|
||||
icon_state = "short_white"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/short_purple
|
||||
name = "Purple Short-sleeved Shirt"
|
||||
icon_state = "short_purple"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/short_blue
|
||||
name = "Blue Short-sleeved Shirt"
|
||||
icon_state = "short_blue"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/short_green
|
||||
name = "Green Short-sleeved Shirt"
|
||||
icon_state = "short_green"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/short_black
|
||||
name = "Black Short-sleeved Shirt"
|
||||
icon_state = "short_black"
|
||||
gender = NEUTER
|
||||
//end short sleeved
|
||||
|
||||
//polo shirts
|
||||
/datum/sprite_accessory/undershirt/polo_blue
|
||||
name = "Blue Polo Shirt"
|
||||
icon_state = "polo_blue"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/polo_red
|
||||
name = "Red Polo Shirt"
|
||||
icon_state = "polo_red"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/polo_greyelllow
|
||||
name = "Grey-Yellow Polo Shirt"
|
||||
icon_state = "polo_greyellow"
|
||||
gender = NEUTER
|
||||
//end polo shirts
|
||||
|
||||
//sport shirts
|
||||
/datum/sprite_accessory/undershirt/sport_green
|
||||
name = "Green Sports Shirt"
|
||||
icon_state = "sport_green"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/sport_red
|
||||
name = "Red Sports Shirt"
|
||||
icon_state = "sport_red"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/sport_blue
|
||||
name = "Blue Sports Shirt"
|
||||
icon_state = "sport_blue"
|
||||
gender = NEUTER
|
||||
//end sport shirts
|
||||
|
||||
/datum/sprite_accessory/undershirt/jersey_red
|
||||
name = "Red Jersey"
|
||||
icon_state = "jersey_red"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/jersey_blue
|
||||
name = "Blue Jersey"
|
||||
icon_state = "jersey_blue"
|
||||
gender = NEUTER
|
||||
|
||||
|
||||
//tanktops
|
||||
/datum/sprite_accessory/undershirt/tank_white
|
||||
name = "White Tank-Top"
|
||||
icon_state = "tank_white"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/tank_black
|
||||
name = "Black Tank-Top"
|
||||
icon_state = "tank_black"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/tank_grey
|
||||
name = "Grey Tank-Top"
|
||||
icon_state = "tank_grey"
|
||||
gender = NEUTER
|
||||
|
||||
/datum/sprite_accessory/undershirt/tank_fire
|
||||
name = "Fire Tank-Top"
|
||||
icon_state = "tank_fire"
|
||||
gender = NEUTER
|
||||
//end tanktops
|
||||
@@ -121,8 +121,9 @@
|
||||
O.add_ai_verbs()
|
||||
|
||||
O.rename_self("ai",1)
|
||||
. = O
|
||||
qdel(src)
|
||||
spawn
|
||||
qdel(src)
|
||||
return O
|
||||
|
||||
/mob/living/carbon/human/make_into_mask(var/should_gib = 0)
|
||||
for(var/t in organs)
|
||||
@@ -481,7 +482,7 @@
|
||||
return 1
|
||||
|
||||
//Friendly Creatures!
|
||||
if(ispath(MP, /mob/living/carbon/primitive/diona) && !jobban_isbanned(src, "Dionaea"))
|
||||
if(ispath(MP, /mob/living/simple_animal/diona) && !jobban_isbanned(src, "Dionaea"))
|
||||
return 1
|
||||
|
||||
//Not in here? Must be untested!
|
||||
|
||||
@@ -19,42 +19,42 @@
|
||||
/client/proc/nanomapgen_DumpImage()
|
||||
set name = "Generate NanoUI Map"
|
||||
set category = "Mapping"
|
||||
|
||||
|
||||
if(holder)
|
||||
nanomapgen_DumpTile(1, 1, text2num(input(usr,"Enter the Z level to generate")))
|
||||
nanomapgen_DumpTile(1, 1, text2num(input(usr,"Enter the Z level to generate")))
|
||||
|
||||
/client/proc/nanomapgen_DumpTile(var/startX = 1, var/startY = 1, var/currentZ = 1, var/endX = -1, var/endY = -1)
|
||||
|
||||
if (endX < 0 || endX > world.maxx)
|
||||
endX = world.maxx
|
||||
|
||||
|
||||
if (endY < 0 || endY > world.maxy)
|
||||
endY = world.maxy
|
||||
|
||||
|
||||
if (currentZ < 0 || currentZ > world.maxz)
|
||||
usr << "NanoMapGen: <B>ERROR: currentZ ([currentZ]) must be between 1 and [world.maxz]</B>"
|
||||
|
||||
|
||||
sleep(3)
|
||||
return NANOMAP_TERMINALERR
|
||||
|
||||
|
||||
if (startX > endX)
|
||||
usr << "NanoMapGen: <B>ERROR: startX ([startX]) cannot be greater than endX ([endX])</B>"
|
||||
|
||||
|
||||
sleep(3)
|
||||
return NANOMAP_TERMINALERR
|
||||
|
||||
|
||||
if (startY > endX)
|
||||
usr << "NanoMapGen: <B>ERROR: startY ([startY]) cannot be greater than endY ([endY])</B>"
|
||||
sleep(3)
|
||||
return NANOMAP_TERMINALERR
|
||||
|
||||
|
||||
var/icon/Tile = icon(file("nano/mapbase1024.png"))
|
||||
if (Tile.Width() != NANOMAP_MAX_ICON_DIMENSION || Tile.Height() != NANOMAP_MAX_ICON_DIMENSION)
|
||||
world.log << "NanoMapGen: <B>ERROR: BASE IMAGE DIMENSIONS ARE NOT [NANOMAP_MAX_ICON_DIMENSION]x[NANOMAP_MAX_ICON_DIMENSION]</B>"
|
||||
log_to_dd("NanoMapGen: <B>ERROR: BASE IMAGE DIMENSIONS ARE NOT [NANOMAP_MAX_ICON_DIMENSION]x[NANOMAP_MAX_ICON_DIMENSION]</B>")
|
||||
sleep(3)
|
||||
return NANOMAP_TERMINALERR
|
||||
|
||||
world.log << "NanoMapGen: <B>GENERATE MAP ([startX],[startY],[currentZ]) to ([endX],[endY],[currentZ])</B>"
|
||||
|
||||
log_to_dd("NanoMapGen: <B>GENERATE MAP ([startX],[startY],[currentZ]) to ([endX],[endY],[currentZ])</B>")
|
||||
usr << "NanoMapGen: <B>GENERATE MAP ([startX],[startY],[currentZ]) to ([endX],[endY],[currentZ])</B>"
|
||||
|
||||
var/count = 0;
|
||||
@@ -62,26 +62,26 @@
|
||||
for(var/WorldY = startY, WorldY <= endY, WorldY++)
|
||||
|
||||
var/atom/Turf = locate(WorldX, WorldY, currentZ)
|
||||
|
||||
|
||||
var/icon/TurfIcon = new(Turf.icon, Turf.icon_state)
|
||||
TurfIcon.Scale(NANOMAP_ICON_SIZE, NANOMAP_ICON_SIZE)
|
||||
|
||||
|
||||
Tile.Blend(TurfIcon, ICON_OVERLAY, ((WorldX - 1) * NANOMAP_ICON_SIZE), ((WorldY - 1) * NANOMAP_ICON_SIZE))
|
||||
|
||||
|
||||
count++
|
||||
|
||||
|
||||
if (count % 8000 == 0)
|
||||
world.log << "NanoMapGen: <B>[count] tiles done</B>"
|
||||
log_to_dd("NanoMapGen: <B>[count] tiles done</B>")
|
||||
sleep(1)
|
||||
|
||||
|
||||
var/mapFilename = "nanomap_z[currentZ]-new.png"
|
||||
|
||||
world.log << "NanoMapGen: <B>sending [mapFilename] to client</B>"
|
||||
|
||||
log_to_dd("NanoMapGen: <B>sending [mapFilename] to client</B>")
|
||||
|
||||
usr << browse(Tile, "window=picture;file=[mapFilename];display=0")
|
||||
|
||||
world.log << "NanoMapGen: <B>Done.</B>"
|
||||
|
||||
|
||||
log_to_dd("NanoMapGen: <B>Done.</B>")
|
||||
|
||||
usr << "NanoMapGen: <B>Done. File [mapFilename] uploaded to your cache.</B>"
|
||||
|
||||
if (Tile.Width() != NANOMAP_MAX_ICON_DIMENSION || Tile.Height() != NANOMAP_MAX_ICON_DIMENSION)
|
||||
|
||||
@@ -216,10 +216,17 @@
|
||||
display_to << "<span class='danger'>Error: unable to deliver message.</span>"
|
||||
display_spideros()
|
||||
return
|
||||
P.tnote += "<i><b>← From an unknown source:</b></i><br>[t]<br>"
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
P.audible_message("\icon[P] *[P.ttone]*", null, 3)
|
||||
//Search for holder of the PDA.
|
||||
var/mob/living/L = null
|
||||
if(P.loc && isliving(P.loc))
|
||||
L = P.loc
|
||||
//Maybe they are a pAI!
|
||||
else
|
||||
L = get(P, /mob/living/silicon)
|
||||
|
||||
if(L)
|
||||
L << "\icon[P] <b>Message from unknown source: </b>\"[t]\" (Unable to Reply)"
|
||||
P.play_ringtone()
|
||||
P.overlays.Cut()
|
||||
P.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
|
||||
|
||||
@@ -242,9 +242,9 @@ var/list/organ_cache = list()
|
||||
|
||||
if(owner && vital)
|
||||
if(user)
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
owner.attack_log += "\[[time_stamp()]\]<font color='orange'> had a vital organ ([src]) removed by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> removed a vital organ ([src]) from [key_name(owner)] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
owner.attack_log += "\[[time_stamp()]\]<font color='orange'> had a vital organ ([src]) removed by [key_name(user)] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[key_name_admin(user)] removed a vital organ ([src]) from [key_name_admin(owner)]")
|
||||
owner.death()
|
||||
owner = null
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
return 0
|
||||
|
||||
spawn(1) // So it has time to be thrown about by the gib() proc.
|
||||
var/mob/living/carbon/alien/diona/D = new(get_turf(organ))
|
||||
var/mob/living/simple_animal/diona/D = new(get_turf(organ))
|
||||
var/datum/ghosttrap/plant/P = get_ghost_trap("living plant")
|
||||
P.request_player(D, "A diona nymph has split off from its gestalt. ")
|
||||
spawn(60)
|
||||
|
||||
+15
-21
@@ -750,7 +750,7 @@
|
||||
return
|
||||
|
||||
var/list/data = list(
|
||||
"locked" = locked,
|
||||
"locked" = is_locked(user),
|
||||
"isOperating" = operating,
|
||||
"externalPower" = main_status,
|
||||
"powerCellStatus" = cell ? cell.percent() : null,
|
||||
@@ -799,7 +799,7 @@
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new one
|
||||
ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 500, data["siliconUser"] ? 465 : 390)
|
||||
ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 510, data["siliconUser"] ? 465 : 390)
|
||||
// When the UI is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
@@ -834,25 +834,9 @@
|
||||
|
||||
|
||||
/obj/machinery/power/apc/proc/can_use(mob/user as mob, var/loud = 0) //used by attack_hand() and Topic()
|
||||
if (user.stat && !isobserver(user))
|
||||
user << "<span class='warning'>You must be conscious to use this [src]!</span>"
|
||||
return 0
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
if(!user.client)
|
||||
return 0
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||
istype(user, /mob/living/silicon)))
|
||||
user << "<span class='warning'>You don't have the dexterity to use this [src]!</span>"
|
||||
return 0
|
||||
if(user.restrained())
|
||||
user << "<span class='warning'>You must have free hands to use this [src]</span>"
|
||||
return 0
|
||||
if(user.lying)
|
||||
user << "<span class='warning'>You must stand to use this [src]!</span>"
|
||||
return 0
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 1
|
||||
|
||||
autoflag = 5
|
||||
if (istype(user, /mob/living/silicon))
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
@@ -886,10 +870,20 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/apc/proc/is_authenticated(mob/user as mob)
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 1
|
||||
if(isAI(user) || isrobot(user))
|
||||
return 1
|
||||
else
|
||||
return !locked
|
||||
|
||||
/obj/machinery/power/apc/proc/is_locked(mob/user as mob)
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 0
|
||||
if(isAI(user) || isrobot(user))
|
||||
return 0
|
||||
else
|
||||
return locked
|
||||
|
||||
/obj/machinery/power/apc/Topic(href, href_list, var/usingUI = 1)
|
||||
if(..())
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
|
||||
//remove the old powernet and replace it with a new one throughout the network.
|
||||
/proc/propagate_network(var/obj/O, var/datum/powernet/PN)
|
||||
//world.log << "propagating new network"
|
||||
//log_to_dd("propagating new network")
|
||||
var/list/worklist = list()
|
||||
var/list/found_machines = list()
|
||||
var/index = 1
|
||||
@@ -282,7 +282,7 @@
|
||||
//merge net2 into net1
|
||||
for(var/obj/structure/cable/Cable in net2.cables) //merge cables
|
||||
net1.add_cable(Cable)
|
||||
|
||||
|
||||
if(!net2) return net1
|
||||
|
||||
for(var/obj/machinery/power/Node in net2.nodes) //merge power machines
|
||||
|
||||
@@ -107,17 +107,17 @@
|
||||
if(src.active==1)
|
||||
src.active = 0
|
||||
user << "You turn off the [src]."
|
||||
msg_admin_attack("Emitter turned off by [key_name(user, user.client)][isAntag(user) ? "(ANTAG)" : ""](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter turned off by [user.ckey]([user]) in ([x],[y],[z])")
|
||||
investigate_log("turned <font color='red'>off</font> by [user.key]","singulo")
|
||||
message_admins("Emitter turned off by [key_name_admin(user)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter turned off by [key_name(user)] in ([x],[y],[z])")
|
||||
investigate_log("turned <font color='red'>off</font> by [key_name(usr)]","singulo")
|
||||
else
|
||||
src.active = 1
|
||||
user << "You turn on the [src]."
|
||||
src.shot_number = 0
|
||||
src.fire_delay = 100
|
||||
msg_admin_attack("Emitter turned on by [key_name(user, user.client)][isAntag(user) ? "(ANTAG)" : ""](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter turned on by [user.ckey]([user]) in ([x],[y],[z])")
|
||||
investigate_log("turned <font color='green'>on</font> by [user.key]","singulo")
|
||||
message_admins("Emitter turned on by [key_name_admin(user)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter turned on by [key_name(user)] in ([x],[y],[z])")
|
||||
investigate_log("turned <font color='green'>on</font> by [key_name(usr)]","singulo")
|
||||
update_icon()
|
||||
else
|
||||
user << "\red The controls are locked!"
|
||||
|
||||
@@ -122,9 +122,11 @@
|
||||
if(strength > strength_upper_limit)
|
||||
strength = strength_upper_limit
|
||||
else
|
||||
msg_admin_attack("PA Control Computer increased to [strength] by [key_name(usr, usr.client)][isAntag(usr) ? "(ANTAG)" : ""](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer increased to [strength] by [usr.ckey]([usr]) in ([x],[y],[z])")
|
||||
use_log += text("\[[time_stamp()]\] <font color='red'>[usr.name] ([usr.ckey]) has increased the PA Control Computer to [strength].</font>")
|
||||
message_admins("PA Control Computer increased to [strength] by [key_name_admin(usr)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer increased to [strength] by [key_name(usr)] in ([x],[y],[z])")
|
||||
investigate_log("increased to <font color='red'>[strength]</font> by [key_name(usr)]","singulo")
|
||||
use_log += text("\[[time_stamp()]\] <font color='red'>[usr.name] ([key_name(usr)]) has increased the PA Control Computer to [strength].</font>")
|
||||
|
||||
investigate_log("increased to <font color='red'>[strength]</font> by [usr.key]","singulo")
|
||||
strength_change()
|
||||
|
||||
@@ -134,8 +136,11 @@
|
||||
if(strength < 0)
|
||||
strength = 0
|
||||
else
|
||||
investigate_log("decreased to <font color='green'>[strength]</font> by [usr.key]","singulo")
|
||||
use_log += text("\[[time_stamp()]\] <font color='orange'>[usr.name] ([usr.ckey]) has decreased the PA Control Computer to [strength].</font>")
|
||||
message_admins("PA Control Computer decreased to [strength] by [key_name_admin(usr)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer decreased to [strength] by [key_name(usr)] in ([x],[y],[z])")
|
||||
investigate_log("decreased to <font color='green'>[strength]</font> by [key_name(usr)]","singulo")
|
||||
use_log += text("\[[time_stamp()]\] <font color='orange'>[usr.name] ([key_name(usr)]) has decreased the PA Control Computer to [strength].</font>")
|
||||
|
||||
strength_change()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/power_change()
|
||||
@@ -215,7 +220,7 @@
|
||||
src.active = !src.active
|
||||
investigate_log("turned [active?"<font color='red'>ON</font>":"<font color='green'>OFF</font>"] by [usr ? usr.key : "outside forces"]","singulo")
|
||||
if (active)
|
||||
msg_admin_attack("PA Control Computer turned ON by [key_name(usr, usr.client)][isAntag(usr) ? "(ANTAG)" : ""](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
msg_admin_attack("PA Control Computer turned ON by [key_name(usr, usr.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer turned ON by [usr.ckey]([usr]) in ([x],[y],[z])")
|
||||
use_log += text("\[[time_stamp()]\] <font color='red'>[usr.name] ([usr.ckey]) has turned on the PA Control Computer.</font>")
|
||||
if(src.active)
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
var/mob/living/user = AM
|
||||
user.dust()
|
||||
power += 200
|
||||
message_admins("[src] has consumed [key_name_admin(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>(JMP)</a>.")
|
||||
message_admins("[src] has consumed [key_name_admin(user)] <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>(JMP)</a>.")
|
||||
investigate_log("has consumed [key_name(user)].", "supermatter")
|
||||
else if(isobj(AM) && !istype(AM, /obj/effect))
|
||||
investigate_log("has consumed [AM].", "supermatter")
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if (!user.IsAdvancedToolUser() || istype(user, /mob/living/carbon/primitive/diona))
|
||||
if (!user.IsAdvancedToolUser() || istype(user, /mob/living/simple_animal/diona))
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if(istype(user, /mob/living))
|
||||
|
||||
@@ -308,7 +308,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
flags = CONDUCT | OPENCONTAINER
|
||||
attack_verb = list("attacked", "slashed", "cut", "sliced")
|
||||
charge_cost = 250
|
||||
fire_delay = 10
|
||||
fire_delay = 15
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
can_charge = 0
|
||||
|
||||
@@ -336,7 +336,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
modifystate = "adv_plasmacutter"
|
||||
origin_tech = "combat=3;materials=4;magnets=3;plasmatech=3;engineering=2"
|
||||
projectile_type = /obj/item/projectile/plasma/adv
|
||||
fire_delay = 8
|
||||
fire_delay = 10
|
||||
charge_cost = 100
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler
|
||||
|
||||
@@ -142,18 +142,18 @@
|
||||
playsound(loc, hitsound, 20, 1, -1)
|
||||
visible_message("\red [A.name] is hit by the [src.name] in the [parse_zone(def_zone)]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
|
||||
if(istype(firer, /mob))
|
||||
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>[reagent_note]"
|
||||
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>[reagent_note]"
|
||||
M.attack_log += "\[[time_stamp()]\] <b>[key_name(firer)]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>[reagent_note]"
|
||||
firer.attack_log += "\[[time_stamp()]\] <b>[key_name(firer)]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>[reagent_note]"
|
||||
if(M.ckey && chatlog_attacks)
|
||||
msg_admin_attack("[firer] ([firer.ckey])[isAntag(firer) ? "(ANTAG)" : ""] shot [M] ([M.ckey]) with a [src][reagent_note] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
|
||||
msg_admin_attack("[key_name_admin(firer)] shot [key_name_admin(M)] with a [src][reagent_note]") //BS12 EDIT ALG
|
||||
if(!iscarbon(firer))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = firer
|
||||
else
|
||||
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>[reagent_note]"
|
||||
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[key_name(M)]</b> with a <b>[src]</b>[reagent_note]"
|
||||
if(M.ckey && chatlog_attacks)
|
||||
msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a [src][reagent_note] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
|
||||
msg_admin_attack("UNKNOWN shot [key_name_admin(M)] with a [src][reagent_note] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
|
||||
|
||||
spawn(0)
|
||||
if(A)
|
||||
|
||||
@@ -244,29 +244,31 @@ obj/item/projectile/kinetic/New()
|
||||
icon_state = "plasmacutter"
|
||||
damage_type = BRUTE
|
||||
damage = 5
|
||||
range = 1
|
||||
range = 3
|
||||
|
||||
/obj/item/projectile/plasma/New()
|
||||
var/turf/proj_turf = get_turf(src)
|
||||
if(!istype(proj_turf, /turf))
|
||||
return
|
||||
var/datum/gas_mixture/environment = proj_turf.return_air()
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure < 30)
|
||||
name = "full strength plasma blast"
|
||||
damage *= 3
|
||||
range += 3
|
||||
if(environment)
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure < 30)
|
||||
name = "full strength plasma blast"
|
||||
damage *= 3
|
||||
..()
|
||||
|
||||
/obj/item/projectile/plasma/on_hit(var/atom/target)
|
||||
/obj/item/projectile/plasma/on_hit(atom/target)
|
||||
. = ..()
|
||||
if(istype(target, /turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = target
|
||||
M.gets_drilled(firer)
|
||||
return ..()
|
||||
range = max(range - 1, 1)
|
||||
return -1
|
||||
|
||||
/obj/item/projectile/plasma/adv
|
||||
range = 2
|
||||
range = 5
|
||||
|
||||
/obj/item/projectile/plasma/adv/mech
|
||||
damage = 10
|
||||
range = 3
|
||||
range = 6
|
||||
|
||||
@@ -155,8 +155,8 @@
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_dispenser/Topic(href, href_list)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return 0 // don't update UIs attached to this object
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["amount"])
|
||||
amount = round(text2num(href_list["amount"]), 5) // round to nearest 5
|
||||
@@ -245,6 +245,9 @@
|
||||
|
||||
/obj/machinery/chem_dispenser/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_dispenser/attack_ghost(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_dispenser/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
@@ -444,9 +447,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/chem_master/Topic(href, href_list)
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
usr.set_machine(src)
|
||||
@@ -457,7 +459,8 @@
|
||||
loaded_pill_bottle.loc = src.loc
|
||||
loaded_pill_bottle = null
|
||||
else if(href_list["close"])
|
||||
usr << browse(null, "window=chemmaster")
|
||||
usr << browse(null, "window=chem_master")
|
||||
onclose(usr, "chem_master")
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
@@ -559,6 +562,7 @@
|
||||
var/count = 1
|
||||
if (href_list["createpill_multiple"]) count = isgoodnumber(input("Select the number of pills to make.", 10, pillamount) as num)
|
||||
if (count > 20) count = 20 //Pevent people from creating huge stacks of pills easily. Maybe move the number to defines?
|
||||
if (count <= 0) return
|
||||
var/amount_per_pill = reagents.total_volume/count
|
||||
if (amount_per_pill > 50) amount_per_pill = 50
|
||||
var/name = reject_bad_text(input(usr,"Name:","Name your pill!","[reagents.get_master_reagent_name()] ([amount_per_pill] units)"))
|
||||
@@ -636,6 +640,9 @@
|
||||
|
||||
/obj/machinery/chem_master/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_master/attack_ghost(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_master/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user